diff --git a/.gitignore b/.gitignore index 4d29575..800f3a8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ # production /build +/dist # misc .DS_Store diff --git a/dist/2022-place.png b/dist/2022-place.png deleted file mode 100644 index c16d899..0000000 Binary files a/dist/2022-place.png and /dev/null differ diff --git a/dist/assets/index-4dcfe413.js b/dist/assets/index-4dcfe413.js deleted file mode 100644 index fe83122..0000000 --- a/dist/assets/index-4dcfe413.js +++ /dev/null @@ -1,68 +0,0 @@ -function Lh(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function wc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sc={exports:{}},Eo={},kc={exports:{}},H={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var oi=Symbol.for("react.element"),Th=Symbol.for("react.portal"),Nh=Symbol.for("react.fragment"),Mh=Symbol.for("react.strict_mode"),Oh=Symbol.for("react.profiler"),Dh=Symbol.for("react.provider"),zh=Symbol.for("react.context"),Ah=Symbol.for("react.forward_ref"),jh=Symbol.for("react.suspense"),Ih=Symbol.for("react.memo"),Fh=Symbol.for("react.lazy"),Iu=Symbol.iterator;function Bh(e){return e===null||typeof e!="object"?null:(e=Iu&&e[Iu]||e["@@iterator"],typeof e=="function"?e:null)}var Ec={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xc=Object.assign,Cc={};function lr(e,t,n){this.props=e,this.context=t,this.refs=Cc,this.updater=n||Ec}lr.prototype.isReactComponent={};lr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};lr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _c(){}_c.prototype=lr.prototype;function Ls(e,t,n){this.props=e,this.context=t,this.refs=Cc,this.updater=n||Ec}var Ts=Ls.prototype=new _c;Ts.constructor=Ls;xc(Ts,lr.prototype);Ts.isPureReactComponent=!0;var Fu=Array.isArray,Rc=Object.prototype.hasOwnProperty,Ns={current:null},Pc={key:!0,ref:!0,__self:!0,__source:!0};function Lc(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)Rc.call(t,r)&&!Pc.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,ye=P[ne];if(0>>1;ne<_n;){var ee=2*(ne+1)-1,xt=P[ee],mt=ee+1,Rn=P[mt];if(0>i(xt,B))mti(Rn,xt)?(P[ne]=Rn,P[mt]=B,ne=mt):(P[ne]=xt,P[ee]=B,ne=ee);else if(mti(Rn,B))P[ne]=Rn,P[mt]=B,ne=mt;else break e}}return A}function i(P,A){var B=P.sortIndex-A.sortIndex;return B!==0?B:P.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var u=[],a=[],d=1,p=null,m=3,k=!1,w=!1,v=!1,R=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(P){for(var A=n(a);A!==null;){if(A.callback===null)r(a);else if(A.startTime<=P)r(a),A.sortIndex=A.expirationTime,t(u,A);else break;A=n(a)}}function c(P){if(v=!1,y(P),!w)if(n(u)!==null)w=!0,Q(x);else{var A=n(a);A!==null&&V(c,A.startTime-P)}}function x(P,A){w=!1,v&&(v=!1,h(N),N=-1),k=!0;var B=m;try{for(y(A),p=n(u);p!==null&&(!(p.expirationTime>A)||P&&!de());){var ne=p.callback;if(typeof ne=="function"){p.callback=null,m=p.priorityLevel;var ye=ne(p.expirationTime<=A);A=e.unstable_now(),typeof ye=="function"?p.callback=ye:p===n(u)&&r(u),y(A)}else r(u);p=n(u)}if(p!==null)var _n=!0;else{var ee=n(a);ee!==null&&V(c,ee.startTime-A),_n=!1}return _n}finally{p=null,m=B,k=!1}}var L=!1,_=null,N=-1,W=5,I=-1;function de(){return!(e.unstable_now()-IP||125ne?(P.sortIndex=B,t(a,P),n(u)===null&&P===n(a)&&(v?(h(N),N=-1):v=!0,V(c,B-ne))):(P.sortIndex=ye,t(u,P),w||k||(w=!0,Q(x))),P},e.unstable_shouldYield=de,e.unstable_wrapCallback=function(P){var A=m;return function(){var B=m;m=A;try{return P.apply(this,arguments)}finally{m=B}}}})(Oc);Mc.exports=Oc;var Zh=Mc.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Dc=D,Qe=Zh;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_l=Object.prototype.hasOwnProperty,Jh=/^[: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]*$/,Uu={},$u={};function bh(e){return _l.call($u,e)?!0:_l.call(Uu,e)?!1:Jh.test(e)?$u[e]=!0:(Uu[e]=!0,!1)}function ep(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 tp(e,t,n,r){if(t===null||typeof t>"u"||ep(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 je(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new je(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){Pe[e]=new je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new je(e,5,!1,e.toLowerCase(),null,!1,!1)});var Os=/[\-:]([a-z])/g;function Ds(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(Os,Ds);Pe[t]=new je(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(Os,Ds);Pe[t]=new je(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(Os,Ds);Pe[t]=new je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new je(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new je(e,1,!1,e.toLowerCase(),null,!0,!0)});function zs(e,t,n,r){var i=Pe.hasOwnProperty(t)?Pe[t]:null;(i!==null?i.type!==0:r||!(2s||i[l]!==o[s]){var u=` -`+i[l].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=s);break}}}finally{Zo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Rr(e):""}function np(e){switch(e.tag){case 5:return Rr(e.type);case 16:return Rr("Lazy");case 13:return Rr("Suspense");case 19:return Rr("SuspenseList");case 0:case 2:case 15:return e=Jo(e.type,!1),e;case 11:return e=Jo(e.type.render,!1),e;case 1:return e=Jo(e.type,!0),e;default:return""}}function Tl(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 Mn:return"Fragment";case Nn:return"Portal";case Rl:return"Profiler";case As:return"StrictMode";case Pl:return"Suspense";case Ll:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case jc:return(e.displayName||"Context")+".Consumer";case Ac:return(e._context.displayName||"Context")+".Provider";case js:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Is:return t=e.displayName||null,t!==null?t:Tl(e.type)||"Memo";case Ut:t=e._payload,e=e._init;try{return Tl(e(t))}catch{}}return null}function rp(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 Tl(t);case 8:return t===As?"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 en(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ip(e){var t=Fc(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 i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gi(e){e._valueTracker||(e._valueTracker=ip(e))}function Bc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Fc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Gi(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 Nl(e,t){var n=t.checked;return ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Wu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=en(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 Uc(e,t){t=t.checked,t!=null&&zs(e,"checked",t,!1)}function Ml(e,t){Uc(e,t);var n=en(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")?Ol(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ol(e,t.type,en(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hu(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 Ol(e,t,n){(t!=="number"||Gi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pr=Array.isArray;function Hn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=vi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mr={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},op=["Webkit","ms","Moz","O"];Object.keys(Mr).forEach(function(e){op.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mr[t]=Mr[e]})});function Hc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mr.hasOwnProperty(e)&&Mr[e]?(""+t).trim():t+"px"}function Qc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Hc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var lp=ce({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 Al(e,t){if(t){if(lp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function jl(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 Il=null;function Fs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fl=null,Qn=null,Yn=null;function Ku(e){if(e=ui(e)){if(typeof Fl!="function")throw Error(C(280));var t=e.stateNode;t&&(t=Po(t),Fl(e.stateNode,e.type,t))}}function Yc(e){Qn?Yn?Yn.push(e):Yn=[e]:Qn=e}function Kc(){if(Qn){var e=Qn,t=Yn;if(Yn=Qn=null,Ku(e),t)for(e=0;e>>=0,e===0?32:31-(gp(e)/vp|0)|0}var wi=64,Si=4194304;function Lr(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 eo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=Lr(s):(o&=l,o!==0&&(r=Lr(o)))}else l=n&~i,l!==0?r=Lr(l):o!==0&&(r=Lr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===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 li(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=n}function Ep(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=Dr),na=String.fromCharCode(32),ra=!1;function pf(e,t){switch(e){case"keyup":return Gp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var On=!1;function Jp(e,t){switch(e){case"compositionend":return mf(t);case"keypress":return t.which!==32?null:(ra=!0,na);case"textInput":return e=t.data,e===na&&ra?null:e;default:return null}}function bp(e,t){if(On)return e==="compositionend"||!Ys&&pf(e,t)?(e=df(),Ii=Ws=Ht=null,On=!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=sa(n)}}function wf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sf(){for(var e=window,t=Gi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gi(e.document)}return t}function Ks(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 um(e){var t=Sf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&wf(n.ownerDocument.documentElement,n)){if(r!==null&&Ks(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 i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ua(n,o);var l=ua(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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,Dn=null,Hl=null,Ar=null,Ql=!1;function aa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ql||Dn==null||Dn!==Gi(r)||(r=Dn,"selectionStart"in r&&Ks(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}),Ar&&Xr(Ar,r)||(Ar=r,r=ro(Hl,"onSelect"),0jn||(e.current=Zl[jn],Zl[jn]=null,jn--)}function te(e,t){jn++,Zl[jn]=e.current,e.current=t}var tn={},Oe=rn(tn),Be=rn(!1),vn=tn;function bn(e,t){var n=e.type.contextTypes;if(!n)return tn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ue(e){return e=e.childContextTypes,e!=null}function oo(){ie(Be),ie(Oe)}function ya(e,t,n){if(Oe.current!==tn)throw Error(C(168));te(Oe,t),te(Be,n)}function Tf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(C(108,rp(e)||"Unknown",i));return ce({},n,r)}function lo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tn,vn=Oe.current,te(Oe,e),te(Be,Be.current),!0}function ga(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=Tf(e,t,vn),r.__reactInternalMemoizedMergedChildContext=e,ie(Be),ie(Oe),te(Oe,e)):ie(Be),te(Be,n)}var Pt=null,Lo=!1,dl=!1;function Nf(e){Pt===null?Pt=[e]:Pt.push(e)}function Sm(e){Lo=!0,Nf(e)}function on(){if(!dl&&Pt!==null){dl=!0;var e=0,t=G;try{var n=Pt;for(G=1;e>=l,i-=l,Lt=1<<32-ct(t)+i|n<N?(W=_,_=null):W=_.sibling;var I=m(h,_,y[N],c);if(I===null){_===null&&(_=W);break}e&&_&&I.alternate===null&&t(h,_),f=o(I,f,N),L===null?x=I:L.sibling=I,L=I,_=W}if(N===y.length)return n(h,_),oe&&an(h,N),x;if(_===null){for(;NN?(W=_,_=null):W=_.sibling;var de=m(h,_,I.value,c);if(de===null){_===null&&(_=W);break}e&&_&&de.alternate===null&&t(h,_),f=o(de,f,N),L===null?x=de:L.sibling=de,L=de,_=W}if(I.done)return n(h,_),oe&&an(h,N),x;if(_===null){for(;!I.done;N++,I=y.next())I=p(h,I.value,c),I!==null&&(f=o(I,f,N),L===null?x=I:L.sibling=I,L=I);return oe&&an(h,N),x}for(_=r(h,_);!I.done;N++,I=y.next())I=k(_,h,N,I.value,c),I!==null&&(e&&I.alternate!==null&&_.delete(I.key===null?N:I.key),f=o(I,f,N),L===null?x=I:L.sibling=I,L=I);return e&&_.forEach(function(Z){return t(h,Z)}),oe&&an(h,N),x}function R(h,f,y,c){if(typeof y=="object"&&y!==null&&y.type===Mn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case yi:e:{for(var x=y.key,L=f;L!==null;){if(L.key===x){if(x=y.type,x===Mn){if(L.tag===7){n(h,L.sibling),f=i(L,y.props.children),f.return=h,h=f;break e}}else if(L.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ut&&Ca(x)===L.type){n(h,L.sibling),f=i(L,y.props),f.ref=vr(h,L,y),f.return=h,h=f;break e}n(h,L);break}else t(h,L);L=L.sibling}y.type===Mn?(f=yn(y.props.children,h.mode,c,y.key),f.return=h,h=f):(c=Qi(y.type,y.key,y.props,null,h.mode,c),c.ref=vr(h,f,y),c.return=h,h=c)}return l(h);case Nn:e:{for(L=y.key;f!==null;){if(f.key===L)if(f.tag===4&&f.stateNode.containerInfo===y.containerInfo&&f.stateNode.implementation===y.implementation){n(h,f.sibling),f=i(f,y.children||[]),f.return=h,h=f;break e}else{n(h,f);break}else t(h,f);f=f.sibling}f=Sl(y,h.mode,c),f.return=h,h=f}return l(h);case Ut:return L=y._init,R(h,f,L(y._payload),c)}if(Pr(y))return w(h,f,y,c);if(hr(y))return v(h,f,y,c);Pi(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,f!==null&&f.tag===6?(n(h,f.sibling),f=i(f,y),f.return=h,h=f):(n(h,f),f=wl(y,h.mode,c),f.return=h,h=f),l(h)):n(h,f)}return R}var tr=Ff(!0),Bf=Ff(!1),ai={},kt=rn(ai),Jr=rn(ai),br=rn(ai);function hn(e){if(e===ai)throw Error(C(174));return e}function nu(e,t){switch(te(br,t),te(Jr,e),te(kt,ai),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zl(t,e)}ie(kt),te(kt,t)}function nr(){ie(kt),ie(Jr),ie(br)}function Uf(e){hn(br.current);var t=hn(kt.current),n=zl(t,e.type);t!==n&&(te(Jr,e),te(kt,n))}function ru(e){Jr.current===e&&(ie(kt),ie(Jr))}var ue=rn(0);function ho(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 hl=[];function iu(){for(var e=0;en?n:4,e(!0);var r=pl.transition;pl.transition={};try{e(!1),t()}finally{G=n,pl.transition=r}}function nd(){return nt().memoizedState}function Cm(e,t,n){var r=Jt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rd(e))id(t,n);else if(n=zf(e,t,n,r),n!==null){var i=ze();ft(n,e,r,i),od(n,t,r)}}function _m(e,t,n){var r=Jt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rd(e))id(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,dt(s,l)){var u=t.interleaved;u===null?(i.next=i,eu(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=zf(e,t,i,r),n!==null&&(i=ze(),ft(n,e,r,i),od(n,t,r))}}function rd(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function id(e,t){jr=po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function od(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Us(e,n)}}var mo={readContext:tt,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useInsertionEffect:Te,useLayoutEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useMutableSource:Te,useSyncExternalStore:Te,useId:Te,unstable_isNewReconciler:!1},Rm={readContext:tt,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:tt,useEffect:Ra,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$i(4194308,4,Zf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $i(4194308,4,e,t)},useInsertionEffect:function(e,t){return $i(4,2,e,t)},useMemo:function(e,t){var n=gt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gt();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=Cm.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:_a,useDebugValue:au,useDeferredValue:function(e){return gt().memoizedState=e},useTransition:function(){var e=_a(!1),t=e[0];return e=xm.bind(null,e[1]),gt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ae,i=gt();if(oe){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),Ce===null)throw Error(C(349));Sn&30||Wf(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ra(Qf.bind(null,r,o,e),[e]),r.flags|=2048,ni(9,Hf.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=gt(),t=Ce.identifierPrefix;if(oe){var n=Tt,r=Lt;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ei++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[wt]=t,e[Zr]=r,pd(e,t,!1,!1),t.stateNode=e;e:{switch(l=jl(n,r),n){case"dialog":re("cancel",e),re("close",e),i=r;break;case"iframe":case"object":case"embed":re("load",e),i=r;break;case"video":case"audio":for(i=0;iir&&(t.flags|=128,r=!0,wr(o,!1),t.lanes=4194304)}else{if(!r)if(e=ho(l),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"&&!l.alternate&&!oe)return Ne(t),null}else 2*me()-o.renderingStartTime>ir&&n!==1073741824&&(t.flags|=128,r=!0,wr(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=me(),t.sibling=null,n=ue.current,te(ue,r?n&1|2:n&1),t):(Ne(t),null);case 22:case 23:return mu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ve&1073741824&&(Ne(t),t.subtreeFlags&6&&(t.flags|=8192)):Ne(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function zm(e,t){switch(qs(t),t.tag){case 1:return Ue(t.type)&&oo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nr(),ie(Be),ie(Oe),iu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ru(t),null;case 13:if(ie(ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(ue),null;case 4:return nr(),null;case 10:return bs(t.type._context),null;case 22:case 23:return mu(),null;case 24:return null;default:return null}}var Ti=!1,Me=!1,Am=typeof WeakSet=="function"?WeakSet:Set,O=null;function Un(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fe(e,t,r)}else n.current=null}function as(e,t,n){try{n()}catch(r){fe(e,t,r)}}var Aa=!1;function jm(e,t){if(Yl=to,e=Sf(),Ks(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 i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,s=-1,u=-1,a=0,d=0,p=e,m=null;t:for(;;){for(var k;p!==n||i!==0&&p.nodeType!==3||(s=l+i),p!==o||r!==0&&p.nodeType!==3||(u=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(k=p.firstChild)!==null;)m=p,p=k;for(;;){if(p===e)break t;if(m===n&&++a===i&&(s=l),m===o&&++d===r&&(u=l),(k=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=k}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kl={focusedElem:e,selectionRange:n},to=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,R=w.memoizedState,h=t.stateNode,f=h.getSnapshotBeforeUpdate(t.elementType===t.type?v:ot(t.type,v),R);h.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(c){fe(t,t.return,c)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return w=Aa,Aa=!1,w}function Ir(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&as(t,n,o)}i=i.next}while(i!==r)}}function Mo(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 cs(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 gd(e){var t=e.alternate;t!==null&&(e.alternate=null,gd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wt],delete t[Zr],delete t[Gl],delete t[vm],delete t[wm])),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 vd(e){return e.tag===5||e.tag===3||e.tag===4}function ja(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vd(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 fs(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=io));else if(r!==4&&(e=e.child,e!==null))for(fs(e,t,n),e=e.sibling;e!==null;)fs(e,t,n),e=e.sibling}function ds(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(ds(e,t,n),e=e.sibling;e!==null;)ds(e,t,n),e=e.sibling}var _e=null,lt=!1;function Bt(e,t,n){for(n=n.child;n!==null;)wd(e,t,n),n=n.sibling}function wd(e,t,n){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(xo,n)}catch{}switch(n.tag){case 5:Me||Un(n,t);case 6:var r=_e,i=lt;_e=null,Bt(e,t,n),_e=r,lt=i,_e!==null&&(lt?(e=_e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_e.removeChild(n.stateNode));break;case 18:_e!==null&&(lt?(e=_e,n=n.stateNode,e.nodeType===8?fl(e.parentNode,n):e.nodeType===1&&fl(e,n),Yr(e)):fl(_e,n.stateNode));break;case 4:r=_e,i=lt,_e=n.stateNode.containerInfo,lt=!0,Bt(e,t,n),_e=r,lt=i;break;case 0:case 11:case 14:case 15:if(!Me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&as(n,t,l),i=i.next}while(i!==r)}Bt(e,t,n);break;case 1:if(!Me&&(Un(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){fe(n,t,s)}Bt(e,t,n);break;case 21:Bt(e,t,n);break;case 22:n.mode&1?(Me=(r=Me)||n.memoizedState!==null,Bt(e,t,n),Me=r):Bt(e,t,n);break;default:Bt(e,t,n)}}function Ia(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Am),t.forEach(function(r){var i=Qm.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function it(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Fm(r/1960))-r,10e?16:e,Qt===null)var r=!1;else{if(e=Qt,Qt=null,vo=0,X&6)throw Error(C(331));var i=X;for(X|=4,O=e.current;O!==null;){var o=O,l=o.child;if(O.flags&16){var s=o.deletions;if(s!==null){for(var u=0;ume()-hu?mn(e,0):du|=n),$e(e,t)}function Pd(e,t){t===0&&(e.mode&1?(t=Si,Si<<=1,!(Si&130023424)&&(Si=4194304)):t=1);var n=ze();e=Dt(e,t),e!==null&&(li(e,t,n),$e(e,n))}function Hm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Pd(e,n)}function Qm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),Pd(e,n)}var Ld;Ld=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Be.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,Om(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,oe&&t.flags&1048576&&Mf(t,uo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vi(e,t),e=t.pendingProps;var i=bn(t,Oe.current);Xn(t,n),i=lu(null,t,r,e,i,n);var o=su();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ue(r)?(o=!0,lo(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,tu(t),i.updater=To,t.stateNode=i,i._reactInternals=t,ns(t,r,e,n),t=os(null,t,r,!0,o,n)):(t.tag=0,oe&&o&&Xs(t),De(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vi(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Km(r),e=ot(r,e),i){case 0:t=is(null,t,r,e,n);break e;case 1:t=Oa(null,t,r,e,n);break e;case 11:t=Na(null,t,r,e,n);break e;case 14:t=Ma(null,t,r,ot(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ot(r,i),is(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ot(r,i),Oa(e,t,r,i,n);case 3:e:{if(fd(t),e===null)throw Error(C(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Af(e,t),fo(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=rr(Error(C(423)),t),t=Da(e,t,r,n,i);break e}else if(r!==i){i=rr(Error(C(424)),t),t=Da(e,t,r,n,i);break e}else for(We=qt(t.stateNode.containerInfo.firstChild),He=t,oe=!0,at=null,n=Bf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(er(),r===i){t=zt(e,t,n);break e}De(e,t,r,n)}t=t.child}return t;case 5:return Uf(t),e===null&&bl(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Xl(r,i)?l=null:o!==null&&Xl(r,o)&&(t.flags|=32),cd(e,t),De(e,t,l,n),t.child;case 6:return e===null&&bl(t),null;case 13:return dd(e,t,n);case 4:return nu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tr(t,null,r,n):De(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ot(r,i),Na(e,t,r,i,n);case 7:return De(e,t,t.pendingProps,n),t.child;case 8:return De(e,t,t.pendingProps.children,n),t.child;case 12:return De(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,te(ao,r._currentValue),r._currentValue=l,o!==null)if(dt(o.value,l)){if(o.children===i.children&&!Be.current){t=zt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Nt(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var d=a.pending;d===null?u.next=u:(u.next=d.next,d.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),es(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(C(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),es(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}De(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xn(t,n),i=tt(i),r=r(i),t.flags|=1,De(e,t,r,n),t.child;case 14:return r=t.type,i=ot(r,t.pendingProps),i=ot(r.type,i),Ma(e,t,r,i,n);case 15:return ud(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ot(r,i),Vi(e,t),t.tag=1,Ue(r)?(e=!0,lo(t)):e=!1,Xn(t,n),If(t,r,i),ns(t,r,i,n),os(null,t,r,!0,e,n);case 19:return hd(e,t,n);case 22:return ad(e,t,n)}throw Error(C(156,t.tag))};function Td(e,t){return ef(e,t)}function Ym(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 be(e,t,n,r){return new Ym(e,t,n,r)}function gu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Km(e){if(typeof e=="function")return gu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===js)return 11;if(e===Is)return 14}return 2}function bt(e,t){var n=e.alternate;return n===null?(n=be(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 Qi(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")gu(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Mn:return yn(n.children,i,o,t);case As:l=8,i|=8;break;case Rl:return e=be(12,n,t,i|2),e.elementType=Rl,e.lanes=o,e;case Pl:return e=be(13,n,t,i),e.elementType=Pl,e.lanes=o,e;case Ll:return e=be(19,n,t,i),e.elementType=Ll,e.lanes=o,e;case Ic:return Do(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ac:l=10;break e;case jc:l=9;break e;case js:l=11;break e;case Is:l=14;break e;case Ut:l=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=be(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function yn(e,t,n,r){return e=be(7,e,r,t),e.lanes=n,e}function Do(e,t,n,r){return e=be(22,e,r,t),e.elementType=Ic,e.lanes=n,e.stateNode={isHidden:!1},e}function wl(e,t,n){return e=be(6,e,null,t),e.lanes=n,e}function Sl(e,t,n){return t=be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xm(e,t,n,r,i){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=el(0),this.expirationTimes=el(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=el(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function vu(e,t,n,r,i,o,l,s,u){return e=new Xm(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=be(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},tu(o),e}function qm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dd)}catch(e){console.error(e)}}Dd(),Nc.exports=Ye;var zd=Nc.exports;const ey=wc(zd);var Qa=zd;Cl.createRoot=Qa.createRoot,Cl.hydrateRoot=Qa.hydrateRoot;/** - * @remix-run/router v1.9.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function or(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ny(){return Math.random().toString(36).substr(2,8)}function Ka(e,t){return{usr:e.state,key:e.key,idx:t}}function ii(e,t,n,r){return n===void 0&&(n=null),se({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?jt(t):t,{state:n,key:t&&t.key||r||ny()})}function ci(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function jt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ry(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,s=ge.Pop,u=null,a=d();a==null&&(a=0,l.replaceState(se({},l.state,{idx:a}),""));function d(){return(l.state||{idx:null}).idx}function p(){s=ge.Pop;let R=d(),h=R==null?null:R-a;a=R,u&&u({action:s,location:v.location,delta:h})}function m(R,h){s=ge.Push;let f=ii(v.location,R,h);n&&n(f,R),a=d()+1;let y=Ka(f,a),c=v.createHref(f);try{l.pushState(y,"",c)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(c)}o&&u&&u({action:s,location:v.location,delta:1})}function k(R,h){s=ge.Replace;let f=ii(v.location,R,h);n&&n(f,R),a=d();let y=Ka(f,a),c=v.createHref(f);l.replaceState(y,"",c),o&&u&&u({action:s,location:v.location,delta:0})}function w(R){let h=i.location.origin!=="null"?i.location.origin:i.location.href,f=typeof R=="string"?R:ci(R);return K(h,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,h)}let v={get action(){return s},get location(){return e(i,l)},listen(R){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(Ya,p),u=R,()=>{i.removeEventListener(Ya,p),u=null}},createHref(R){return t(i,R)},createURL:w,encodeLocation(R){let h=w(R);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:m,replace:k,go(R){return l.go(R)}};return v}var pe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(pe||(pe={}));const iy=new Set(["lazy","caseSensitive","path","id","index","children"]);function oy(e){return e.index===!0}function gs(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let l=[...n,o],s=typeof i.id=="string"?i.id:l.join("-");if(K(i.index!==!0||!i.children,"Cannot specify children on an index route"),K(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),oy(i)){let u=se({},i,t(i),{id:s});return r[s]=u,u}else{let u=se({},i,t(i),{id:s,children:void 0});return r[s]=u,i.children&&(u.children=gs(i.children,t,l,r)),u}})}function Vn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?jt(t):t,i=fi(r.pathname||"/",n);if(i==null)return null;let o=Ad(e);sy(o);let l=null;for(let s=0;l==null&&s{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};u.relativePath.startsWith("/")&&(K(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let a=gn([r,u.relativePath]),d=n.concat(u);o.children&&o.children.length>0&&(K(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),Ad(o.children,t,d,a)),!(o.path==null&&!o.index)&&t.push({path:a,score:py(a,o.index),routesMeta:d})};return e.forEach((o,l)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,l);else for(let u of jd(o.path))i(o,l,u)}),t}function jd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=jd(r.join("/")),s=[];return s.push(...l.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...l),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function sy(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:my(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const uy=/^:\w+$/,ay=3,cy=2,fy=1,dy=10,hy=-2,Xa=e=>e==="*";function py(e,t){let n=e.split("/"),r=n.length;return n.some(Xa)&&(r+=hy),t&&(r+=cy),n.filter(i=>!Xa(i)).reduce((i,o)=>i+(uy.test(o)?ay:o===""?fy:dy),r)}function my(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function yy(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let l=0;l{if(d==="*"){let m=s[p]||"";l=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}return a[d]=Sy(s[p]||"",d),a},{}),pathname:o,pathnameBase:l,pattern:e}}function vy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),or(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(l,s)=>(r.push(s),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function wy(e){try{return decodeURI(e)}catch(t){return or(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Sy(e,t){try{return decodeURIComponent(e)}catch(n){return or(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function fi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ky(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?jt(e):e;return{pathname:n?n.startsWith("/")?n:Ey(n,t):t,search:_y(r),hash:Ry(i)}}function Ey(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function kl(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Id(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function xy(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=jt(e):(i=se({},e),K(!i.pathname||!i.pathname.includes("?"),kl("?","pathname","search",i)),K(!i.pathname||!i.pathname.includes("#"),kl("#","pathname","hash",i)),K(!i.search||!i.search.includes("#"),kl("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,s;if(r||l==null)s=n;else{let p=t.length-1;if(l.startsWith("..")){let m=l.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}s=p>=0?t[p]:"/"}let u=ky(i,s),a=l&&l!=="/"&&l.endsWith("/"),d=(o||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(a||d)&&(u.pathname+="/"),u}const gn=e=>e.join("/").replace(/\/\/+/g,"/"),Cy=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_y=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ry=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Eu{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Fd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Bd=["post","put","patch","delete"],Py=new Set(Bd),Ly=["get",...Bd],Ty=new Set(Ly),Ny=new Set([301,302,303,307,308]),My=new Set([307,308]),El={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Oy={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},kr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ud=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dy=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function zy(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;K(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let g=e.detectErrorBoundary;i=S=>({hasErrorBoundary:g(S)})}else i=Dy;let o={},l=gs(e.routes,i,void 0,o),s,u=e.basename||"/",a=se({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),d=null,p=new Set,m=null,k=null,w=null,v=e.hydrationData!=null,R=Vn(l,e.history.location,u),h=null;if(R==null){let g=qe(404,{pathname:e.history.location.pathname}),{matches:S,route:E}=nc(l);R=S,h={[E.id]:g}}let f=!R.some(g=>g.route.lazy)&&(!R.some(g=>g.route.loader)||e.hydrationData!=null),y,c={historyAction:e.history.action,location:e.history.location,matches:R,initialized:f,navigation:El,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||h,fetchers:new Map,blockers:new Map},x=ge.Pop,L=!1,_,N=!1,W=!1,I=[],de=[],Z=new Map,Xe=0,ht=-1,pt=new Map,Q=new Set,V=new Map,P=new Map,A=new Map,B=!1;function ne(){return d=e.history.listen(g=>{let{action:S,location:E,delta:M}=g;if(B){B=!1;return}or(A.size===0||M!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let U=Du({currentLocation:c.location,nextLocation:E,historyAction:S});if(U&&M!=null){B=!0,e.history.go(M*-1),hi(U,{state:"blocked",location:E,proceed(){hi(U,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),e.history.go(M)},reset(){let F=new Map(c.blockers);F.set(U,kr),ee({blockers:F})}});return}return ln(S,E)}),c.initialized||ln(ge.Pop,c.location),y}function ye(){d&&d(),p.clear(),_&&_.abort(),c.fetchers.forEach((g,S)=>Vo(S)),c.blockers.forEach((g,S)=>Ou(S))}function _n(g){return p.add(g),()=>p.delete(g)}function ee(g){c=se({},c,g),p.forEach(S=>S(c))}function xt(g,S){var E,M;let U=c.actionData!=null&&c.navigation.formMethod!=null&&st(c.navigation.formMethod)&&c.navigation.state==="loading"&&((E=g.state)==null?void 0:E._isRedirect)!==!0,F;S.actionData?Object.keys(S.actionData).length>0?F=S.actionData:F=null:U?F=c.actionData:F=null;let $=S.loaderData?tc(c.loaderData,S.loaderData,S.matches||[],S.errors):c.loaderData,j=c.blockers;j.size>0&&(j=new Map(j),j.forEach((le,Le)=>j.set(Le,kr)));let z=L===!0||c.navigation.formMethod!=null&&st(c.navigation.formMethod)&&((M=g.state)==null?void 0:M._isRedirect)!==!0;s&&(l=s,s=void 0),N||x===ge.Pop||(x===ge.Push?e.history.push(g,g.state):x===ge.Replace&&e.history.replace(g,g.state)),ee(se({},S,{actionData:F,loaderData:$,historyAction:x,location:g,initialized:!0,navigation:El,revalidation:"idle",restoreScrollPosition:Au(g,S.matches||c.matches),preventScrollReset:z,blockers:j})),x=ge.Pop,L=!1,N=!1,W=!1,I=[],de=[]}async function mt(g,S){if(typeof g=="number"){e.history.go(g);return}let E=vs(c.location,c.matches,u,a.v7_prependBasename,g,S==null?void 0:S.fromRouteId,S==null?void 0:S.relative),{path:M,submission:U,error:F}=qa(a.v7_normalizeFormMethod,!1,E,S),$=c.location,j=ii(c.location,M,S&&S.state);j=se({},j,e.history.encodeLocation(j));let z=S&&S.replace!=null?S.replace:void 0,le=ge.Push;z===!0?le=ge.Replace:z===!1||U!=null&&st(U.formMethod)&&U.formAction===c.location.pathname+c.location.search&&(le=ge.Replace);let Le=S&&"preventScrollReset"in S?S.preventScrollReset===!0:void 0,q=Du({currentLocation:$,nextLocation:j,historyAction:le});if(q){hi(q,{state:"blocked",location:j,proceed(){hi(q,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),mt(g,S)},reset(){let b=new Map(c.blockers);b.set(q,kr),ee({blockers:b})}});return}return await ln(le,j,{submission:U,pendingError:F,preventScrollReset:Le,replace:S&&S.replace})}function Rn(){if($o(),ee({revalidation:"loading"}),c.navigation.state!=="submitting"){if(c.navigation.state==="idle"){ln(c.historyAction,c.location,{startUninterruptedRevalidation:!0});return}ln(x||c.historyAction,c.navigation.location,{overrideNavigation:c.navigation})}}async function ln(g,S,E){_&&_.abort(),_=null,x=g,N=(E&&E.startUninterruptedRevalidation)===!0,_h(c.location,c.matches),L=(E&&E.preventScrollReset)===!0;let M=s||l,U=E&&E.overrideNavigation,F=Vn(M,S,u);if(!F){let b=qe(404,{pathname:S.pathname}),{matches:he,route:sn}=nc(M);Wo(),xt(S,{matches:he,loaderData:{},errors:{[sn.id]:b}});return}if(c.initialized&&!W&&By(c.location,S)&&!(E&&E.submission&&st(E.submission.formMethod))){xt(S,{matches:F});return}_=new AbortController;let $=xr(e.history,S,_.signal,E&&E.submission),j,z;if(E&&E.pendingError)z={[Wn(F).route.id]:E.pendingError};else if(E&&E.submission&&st(E.submission.formMethod)){let b=await vh($,S,E.submission,F,{replace:E.replace});if(b.shortCircuited)return;j=b.pendingActionData,z=b.pendingActionError,U=xl(S,E.submission),$=new Request($.url,{signal:$.signal})}let{shortCircuited:le,loaderData:Le,errors:q}=await wh($,S,F,U,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,j,z);le||(_=null,xt(S,se({matches:F},j?{actionData:j}:{},{loaderData:Le,errors:q})))}async function vh(g,S,E,M,U){U===void 0&&(U={}),$o();let F=Wy(S,E);ee({navigation:F});let $,j=Ss(M,S);if(!j.route.action&&!j.route.lazy)$={type:pe.error,error:qe(405,{method:g.method,pathname:S.pathname,routeId:j.route.id})};else if($=await Er("action",g,j,M,o,i,u),g.signal.aborted)return{shortCircuited:!0};if(Gn($)){let z;return U&&U.replace!=null?z=U.replace:z=$.location===c.location.pathname+c.location.search,await cr(c,$,{submission:E,replace:z}),{shortCircuited:!0}}if(Ur($)){let z=Wn(M,j.route.id);return(U&&U.replace)!==!0&&(x=ge.Push),{pendingActionData:{},pendingActionError:{[z.route.id]:$.error}}}if(pn($))throw qe(400,{type:"defer-action"});return{pendingActionData:{[j.route.id]:$.data}}}async function wh(g,S,E,M,U,F,$,j,z){let le=M||xl(S,U),Le=U||F||oc(le),q=s||l,[b,he]=Ga(e.history,c,E,Le,S,W,I,de,V,Q,q,u,j,z);if(Wo(J=>!(E&&E.some(rt=>rt.route.id===J))||b&&b.some(rt=>rt.route.id===J)),ht=++Xe,b.length===0&&he.length===0){let J=Nu();return xt(S,se({matches:E,loaderData:{},errors:z||null},j?{actionData:j}:{},J?{fetchers:new Map(c.fetchers)}:{})),{shortCircuited:!0}}if(!N){he.forEach(rt=>{let Ft=c.fetchers.get(rt.key),Xo=Cr(void 0,Ft?Ft.data:void 0);c.fetchers.set(rt.key,Xo)});let J=j||c.actionData;ee(se({navigation:le},J?Object.keys(J).length===0?{actionData:null}:{actionData:J}:{},he.length>0?{fetchers:new Map(c.fetchers)}:{}))}he.forEach(J=>{Z.has(J.key)&&It(J.key),J.controller&&Z.set(J.key,J.controller)});let sn=()=>he.forEach(J=>It(J.key));_&&_.signal.addEventListener("abort",sn);let{results:un,loaderResults:fr,fetcherResults:Ho}=await Lu(c.matches,E,b,he,g);if(g.signal.aborted)return{shortCircuited:!0};_&&_.signal.removeEventListener("abort",sn),he.forEach(J=>Z.delete(J.key));let Ct=rc(un);if(Ct){if(Ct.idx>=b.length){let J=he[Ct.idx-b.length].key;Q.add(J)}return await cr(c,Ct.result,{replace:$}),{shortCircuited:!0}}let{loaderData:_t,errors:pi}=ec(c,E,b,fr,z,he,Ho,P);P.forEach((J,rt)=>{J.subscribe(Ft=>{(Ft||J.done)&&P.delete(rt)})});let Qo=Nu(),Yo=Mu(ht),Ko=Qo||Yo||he.length>0;return se({loaderData:_t,errors:pi},Ko?{fetchers:new Map(c.fetchers)}:{})}function Pu(g){return c.fetchers.get(g)||Oy}function Sh(g,S,E,M){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Z.has(g)&&It(g);let U=s||l,F=vs(c.location,c.matches,u,a.v7_prependBasename,E,S,M==null?void 0:M.relative),$=Vn(U,F,u);if(!$){di(g,S,qe(404,{pathname:F}));return}let{path:j,submission:z,error:le}=qa(a.v7_normalizeFormMethod,!0,F,M);if(le){di(g,S,le);return}let Le=Ss($,j);if(L=(M&&M.preventScrollReset)===!0,z&&st(z.formMethod)){kh(g,S,j,Le,$,z);return}V.set(g,{routeId:S,path:j}),Eh(g,S,j,Le,$,z)}async function kh(g,S,E,M,U,F){if($o(),V.delete(g),!M.route.action&&!M.route.lazy){let Se=qe(405,{method:F.formMethod,pathname:E,routeId:S});di(g,S,Se);return}let $=c.fetchers.get(g),j=Hy(F,$);c.fetchers.set(g,j),ee({fetchers:new Map(c.fetchers)});let z=new AbortController,le=xr(e.history,E,z.signal,F);Z.set(g,z);let Le=Xe,q=await Er("action",le,M,U,o,i,u);if(le.signal.aborted){Z.get(g)===z&&Z.delete(g);return}if(Gn(q))if(Z.delete(g),ht>Le){let Se=Ln(void 0);c.fetchers.set(g,Se),ee({fetchers:new Map(c.fetchers)});return}else{Q.add(g);let Se=Cr(F);return c.fetchers.set(g,Se),ee({fetchers:new Map(c.fetchers)}),cr(c,q,{fetcherSubmission:F})}if(Ur(q)){di(g,S,q.error);return}if(pn(q))throw qe(400,{type:"defer-action"});let b=c.navigation.location||c.location,he=xr(e.history,b,z.signal),sn=s||l,un=c.navigation.state!=="idle"?Vn(sn,c.navigation.location,u):c.matches;K(un,"Didn't find any matches after fetcher action");let fr=++Xe;pt.set(g,fr);let Ho=Cr(F,q.data);c.fetchers.set(g,Ho);let[Ct,_t]=Ga(e.history,c,un,F,b,W,I,de,V,Q,sn,u,{[M.route.id]:q.data},void 0);_t.filter(Se=>Se.key!==g).forEach(Se=>{let dr=Se.key,ju=c.fetchers.get(dr),Ph=Cr(void 0,ju?ju.data:void 0);c.fetchers.set(dr,Ph),Z.has(dr)&&It(dr),Se.controller&&Z.set(dr,Se.controller)}),ee({fetchers:new Map(c.fetchers)});let pi=()=>_t.forEach(Se=>It(Se.key));z.signal.addEventListener("abort",pi);let{results:Qo,loaderResults:Yo,fetcherResults:Ko}=await Lu(c.matches,un,Ct,_t,he);if(z.signal.aborted)return;z.signal.removeEventListener("abort",pi),pt.delete(g),Z.delete(g),_t.forEach(Se=>Z.delete(Se.key));let J=rc(Qo);if(J){if(J.idx>=Ct.length){let Se=_t[J.idx-Ct.length].key;Q.add(Se)}return cr(c,J.result)}let{loaderData:rt,errors:Ft}=ec(c,c.matches,Ct,Yo,void 0,_t,Ko,P);if(c.fetchers.has(g)){let Se=Ln(q.data);c.fetchers.set(g,Se)}let Xo=Mu(fr);c.navigation.state==="loading"&&fr>ht?(K(x,"Expected pending action"),_&&_.abort(),xt(c.navigation.location,{matches:un,loaderData:rt,errors:Ft,fetchers:new Map(c.fetchers)})):(ee(se({errors:Ft,loaderData:tc(c.loaderData,rt,un,Ft)},Xo||_t.length>0?{fetchers:new Map(c.fetchers)}:{})),W=!1)}async function Eh(g,S,E,M,U,F){let $=c.fetchers.get(g),j=Cr(F,$?$.data:void 0);c.fetchers.set(g,j),ee({fetchers:new Map(c.fetchers)});let z=new AbortController,le=xr(e.history,E,z.signal);Z.set(g,z);let Le=Xe,q=await Er("loader",le,M,U,o,i,u);if(pn(q)&&(q=await Wd(q,le.signal,!0)||q),Z.get(g)===z&&Z.delete(g),le.signal.aborted)return;if(Gn(q))if(ht>Le){let he=Ln(void 0);c.fetchers.set(g,he),ee({fetchers:new Map(c.fetchers)});return}else{Q.add(g),await cr(c,q);return}if(Ur(q)){let he=Wn(c.matches,S);c.fetchers.delete(g),ee({fetchers:new Map(c.fetchers),errors:{[he.route.id]:q.error}});return}K(!pn(q),"Unhandled fetcher deferred data");let b=Ln(q.data);c.fetchers.set(g,b),ee({fetchers:new Map(c.fetchers)})}async function cr(g,S,E){let{submission:M,fetcherSubmission:U,replace:F}=E===void 0?{}:E;S.revalidate&&(W=!0);let $=ii(g.location,S.location,{_isRedirect:!0});if(K($,"Expected a location on the redirect navigation"),n){let b=!1;if(S.reloadDocument)b=!0;else if(Ud.test(S.location)){const he=e.history.createURL(S.location);b=he.origin!==t.location.origin||fi(he.pathname,u)==null}if(b){F?t.location.replace(S.location):t.location.assign(S.location);return}}_=null;let j=F===!0?ge.Replace:ge.Push,{formMethod:z,formAction:le,formEncType:Le}=g.navigation;!M&&!U&&z&&le&&Le&&(M=oc(g.navigation));let q=M||U;if(My.has(S.status)&&q&&st(q.formMethod))await ln(j,$,{submission:se({},q,{formAction:S.location}),preventScrollReset:L});else{let b=xl($,M);await ln(j,$,{overrideNavigation:b,fetcherSubmission:U,preventScrollReset:L})}}async function Lu(g,S,E,M,U){let F=await Promise.all([...E.map(z=>Er("loader",U,z,S,o,i,u)),...M.map(z=>z.matches&&z.match&&z.controller?Er("loader",xr(e.history,z.path,z.controller.signal),z.match,z.matches,o,i,u):{type:pe.error,error:qe(404,{pathname:z.path})})]),$=F.slice(0,E.length),j=F.slice(E.length);return await Promise.all([ic(g,E,$,$.map(()=>U.signal),!1,c.loaderData),ic(g,M.map(z=>z.match),j,M.map(z=>z.controller?z.controller.signal:null),!0)]),{results:F,loaderResults:$,fetcherResults:j}}function $o(){W=!0,I.push(...Wo()),V.forEach((g,S)=>{Z.has(S)&&(de.push(S),It(S))})}function di(g,S,E){let M=Wn(c.matches,S);Vo(g),ee({errors:{[M.route.id]:E},fetchers:new Map(c.fetchers)})}function Vo(g){let S=c.fetchers.get(g);Z.has(g)&&!(S&&S.state==="loading"&&pt.has(g))&&It(g),V.delete(g),pt.delete(g),Q.delete(g),c.fetchers.delete(g)}function It(g){let S=Z.get(g);K(S,"Expected fetch controller: "+g),S.abort(),Z.delete(g)}function Tu(g){for(let S of g){let E=Pu(S),M=Ln(E.data);c.fetchers.set(S,M)}}function Nu(){let g=[],S=!1;for(let E of Q){let M=c.fetchers.get(E);K(M,"Expected fetcher: "+E),M.state==="loading"&&(Q.delete(E),g.push(E),S=!0)}return Tu(g),S}function Mu(g){let S=[];for(let[E,M]of pt)if(M0}function xh(g,S){let E=c.blockers.get(g)||kr;return A.get(g)!==S&&A.set(g,S),E}function Ou(g){c.blockers.delete(g),A.delete(g)}function hi(g,S){let E=c.blockers.get(g)||kr;K(E.state==="unblocked"&&S.state==="blocked"||E.state==="blocked"&&S.state==="blocked"||E.state==="blocked"&&S.state==="proceeding"||E.state==="blocked"&&S.state==="unblocked"||E.state==="proceeding"&&S.state==="unblocked","Invalid blocker state transition: "+E.state+" -> "+S.state);let M=new Map(c.blockers);M.set(g,S),ee({blockers:M})}function Du(g){let{currentLocation:S,nextLocation:E,historyAction:M}=g;if(A.size===0)return;A.size>1&&or(!1,"A router only supports one blocker at a time");let U=Array.from(A.entries()),[F,$]=U[U.length-1],j=c.blockers.get(F);if(!(j&&j.state==="proceeding")&&$({currentLocation:S,nextLocation:E,historyAction:M}))return F}function Wo(g){let S=[];return P.forEach((E,M)=>{(!g||g(M))&&(E.cancel(),S.push(M),P.delete(M))}),S}function Ch(g,S,E){if(m=g,w=S,k=E||null,!v&&c.navigation===El){v=!0;let M=Au(c.location,c.matches);M!=null&&ee({restoreScrollPosition:M})}return()=>{m=null,w=null,k=null}}function zu(g,S){return k&&k(g,S.map(M=>ly(M,c.loaderData)))||g.key}function _h(g,S){if(m&&w){let E=zu(g,S);m[E]=w()}}function Au(g,S){if(m){let E=zu(g,S),M=m[E];if(typeof M=="number")return M}return null}function Rh(g){o={},s=gs(g,i,void 0,o)}return y={get basename(){return u},get state(){return c},get routes(){return l},initialize:ne,subscribe:_n,enableScrollRestoration:Ch,navigate:mt,fetch:Sh,revalidate:Rn,createHref:g=>e.history.createHref(g),encodeLocation:g=>e.history.encodeLocation(g),getFetcher:Pu,deleteFetcher:Vo,dispose:ye,getBlocker:xh,deleteBlocker:Ou,_internalFetchControllers:Z,_internalActiveDeferreds:P,_internalSetRoutes:Rh},y}function Ay(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function vs(e,t,n,r,i,o,l){let s,u;if(o!=null&&l!=="path"){s=[];for(let d of t)if(s.push(d),d.route.id===o){u=d;break}}else s=t,u=t[t.length-1];let a=xy(i||".",Id(s).map(d=>d.pathnameBase),fi(e.pathname,n)||e.pathname,l==="path");return i==null&&(a.search=e.search,a.hash=e.hash),(i==null||i===""||i===".")&&u&&u.route.index&&!xu(a.search)&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(a.pathname=a.pathname==="/"?n:gn([n,a.pathname])),ci(a)}function qa(e,t,n,r){if(!r||!Ay(r))return{path:n};if(r.formMethod&&!Vy(r.formMethod))return{path:n,error:qe(405,{method:r.formMethod})};let i=()=>({path:n,error:qe(400,{type:"invalid-body"})}),o=r.formMethod||"get",l=e?o.toUpperCase():o.toLowerCase(),s=Vd(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!st(l))return i();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((k,w)=>{let[v,R]=w;return""+k+v+"="+R+` -`},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!st(l))return i();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return i()}}}K(typeof FormData=="function","FormData is not available in this environment");let u,a;if(r.formData)u=ws(r.formData),a=r.formData;else if(r.body instanceof FormData)u=ws(r.body),a=r.body;else if(r.body instanceof URLSearchParams)u=r.body,a=ba(u);else if(r.body==null)u=new URLSearchParams,a=new FormData;else try{u=new URLSearchParams(r.body),a=ba(u)}catch{return i()}let d={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(st(d.formMethod))return{path:n,submission:d};let p=jt(n);return t&&p.search&&xu(p.search)&&u.append("index",""),p.search="?"+u,{path:ci(p),submission:d}}function jy(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Ga(e,t,n,r,i,o,l,s,u,a,d,p,m,k){let w=k?Object.values(k)[0]:m?Object.values(m)[0]:void 0,v=e.createURL(t.location),R=e.createURL(i),h=k?Object.keys(k)[0]:void 0,y=jy(n,h).filter((x,L)=>{if(x.route.lazy)return!0;if(x.route.loader==null)return!1;if(Iy(t.loaderData,t.matches[L],x)||l.some(W=>W===x.route.id))return!0;let _=t.matches[L],N=x;return Za(x,se({currentUrl:v,currentParams:_.params,nextUrl:R,nextParams:N.params},r,{actionResult:w,defaultShouldRevalidate:o||v.pathname+v.search===R.pathname+R.search||v.search!==R.search||$d(_,N)}))}),c=[];return u.forEach((x,L)=>{if(!n.some(de=>de.route.id===x.routeId))return;let _=Vn(d,x.path,p);if(!_){c.push({key:L,routeId:x.routeId,path:x.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(L),W=Ss(_,x.path),I=!1;a.has(L)?I=!1:s.includes(L)?I=!0:N&&N.state!=="idle"&&N.data===void 0?I=o:I=Za(W,se({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:R,nextParams:n[n.length-1].params},r,{actionResult:w,defaultShouldRevalidate:o})),I&&c.push({key:L,routeId:x.routeId,path:x.path,matches:_,match:W,controller:new AbortController})}),[y,c]}function Iy(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function $d(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Za(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Ja(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];K(i,"No route found in manifest");let o={};for(let l in r){let u=i[l]!==void 0&&l!=="hasErrorBoundary";or(!u,'Route "'+i.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!u&&!iy.has(l)&&(o[l]=r[l])}Object.assign(i,o),Object.assign(i,se({},t(i),{lazy:void 0}))}async function Er(e,t,n,r,i,o,l,s){s===void 0&&(s={});let u,a,d,p=w=>{let v,R=new Promise((h,f)=>v=f);return d=()=>v(),t.signal.addEventListener("abort",d),Promise.race([w({request:t,params:n.params,context:s.requestContext}),R])};try{let w=n.route[e];if(n.route.lazy)if(w){let v,R=await Promise.all([p(w).catch(h=>{v=h}),Ja(n.route,o,i)]);if(v)throw v;a=R[0]}else if(await Ja(n.route,o,i),w=n.route[e],w)a=await p(w);else if(e==="action"){let v=new URL(t.url),R=v.pathname+v.search;throw qe(405,{method:t.method,pathname:R,routeId:n.route.id})}else return{type:pe.data,data:void 0};else if(w)a=await p(w);else{let v=new URL(t.url),R=v.pathname+v.search;throw qe(404,{pathname:R})}K(a!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(w){u=pe.error,a=w}finally{d&&t.signal.removeEventListener("abort",d)}if($y(a)){let w=a.status;if(Ny.has(w)){let h=a.headers.get("Location");if(K(h,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ud.test(h))h=vs(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,h);else if(!s.isStaticRequest){let f=new URL(t.url),y=h.startsWith("//")?new URL(f.protocol+h):new URL(h),c=fi(y.pathname,l)!=null;y.origin===f.origin&&c&&(h=y.pathname+y.search+y.hash)}if(s.isStaticRequest)throw a.headers.set("Location",h),a;return{type:pe.redirect,status:w,location:h,revalidate:a.headers.get("X-Remix-Revalidate")!==null,reloadDocument:a.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:u===pe.error?pe.error:pe.data,response:a};let v,R=a.headers.get("Content-Type");return R&&/\bapplication\/json\b/.test(R)?v=await a.json():v=await a.text(),u===pe.error?{type:u,error:new Eu(w,a.statusText,v),headers:a.headers}:{type:pe.data,data:v,statusCode:a.status,headers:a.headers}}if(u===pe.error)return{type:u,error:a};if(Uy(a)){var m,k;return{type:pe.deferred,deferredData:a,statusCode:(m=a.init)==null?void 0:m.status,headers:((k=a.init)==null?void 0:k.headers)&&new Headers(a.init.headers)}}return{type:pe.data,data:a}}function xr(e,t,n,r){let i=e.createURL(Vd(t)).toString(),o={signal:n};if(r&&st(r.formMethod)){let{formMethod:l,formEncType:s}=r;o.method=l.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=ws(r.formData):o.body=r.formData}return new Request(i,o)}function ws(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function ba(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Fy(e,t,n,r,i){let o={},l=null,s,u=!1,a={};return n.forEach((d,p)=>{let m=t[p].route.id;if(K(!Gn(d),"Cannot handle redirect results in processLoaderData"),Ur(d)){let k=Wn(e,m),w=d.error;r&&(w=Object.values(r)[0],r=void 0),l=l||{},l[k.route.id]==null&&(l[k.route.id]=w),o[m]=void 0,u||(u=!0,s=Fd(d.error)?d.error.status:500),d.headers&&(a[m]=d.headers)}else pn(d)?(i.set(m,d.deferredData),o[m]=d.deferredData.data):o[m]=d.data,d.statusCode!=null&&d.statusCode!==200&&!u&&(s=d.statusCode),d.headers&&(a[m]=d.headers)}),r&&(l=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:l,statusCode:s||200,loaderHeaders:a}}function ec(e,t,n,r,i,o,l,s){let{loaderData:u,errors:a}=Fy(t,n,r,i,s);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function nc(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function qe(e,t){let{pathname:n,routeId:r,method:i,type:o}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(l="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",s='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new Eu(e||500,l,new Error(s),!0)}function rc(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Gn(n))return{result:n,idx:t}}}function Vd(e){let t=typeof e=="string"?jt(e):e;return ci(se({},t,{hash:""}))}function By(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function pn(e){return e.type===pe.deferred}function Ur(e){return e.type===pe.error}function Gn(e){return(e&&e.type)===pe.redirect}function Uy(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function $y(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Vy(e){return Ty.has(e.toLowerCase())}function st(e){return Py.has(e.toLowerCase())}async function ic(e,t,n,r,i,o){for(let l=0;lp.route.id===u.route.id),d=a!=null&&!$d(a,u)&&(o&&o[u.route.id])!==void 0;if(pn(s)&&(i||d)){let p=r[l];K(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await Wd(s,p,i).then(m=>{m&&(n[l]=m||n[l])})}}}async function Wd(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:pe.data,data:e.deferredData.unwrappedData}}catch(i){return{type:pe.error,error:i}}return{type:pe.data,data:e.deferredData.data}}}function xu(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ss(e,t){let n=typeof t=="string"?jt(t).search:t.search;if(e[e.length-1].route.index&&xu(n||""))return e[e.length-1];let r=Id(e);return r[r.length-1]}function oc(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:l}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function xl(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Wy(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Cr(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Hy(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ln(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}/** - * React Router v6.16.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function ks(){return ks=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},v,{params:Object.assign({},l,v.params),pathname:gn([s,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:gn([s,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n);return t&&w?D.createElement(Fo.Provider,{value:{location:ks({pathname:"/",search:"",hash:"",state:null,key:"default"},a),navigationType:ge.Pop}},w):w}function Ky(){let e=tg(),t=Fd(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),n?D.createElement("pre",{style:i},n):null,o)}const Xy=D.createElement(Ky,null);class qy extends D.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?D.createElement(Bo.Provider,{value:this.props.routeContext},D.createElement(Kd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Gy(e){let{routeContext:t,match:n,children:r}=e,i=D.useContext(Hd);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),D.createElement(Bo.Provider,{value:t},r)}function Zy(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,l=(r=n)==null?void 0:r.errors;if(l!=null){let s=o.findIndex(u=>u.route.id&&(l==null?void 0:l[u.route.id]));s>=0||K(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((s,u,a)=>{let d=u.route.id?l==null?void 0:l[u.route.id]:null,p=null;n&&(p=u.route.errorElement||Xy);let m=t.concat(o.slice(0,a+1)),k=()=>{let w;return d?w=p:u.route.Component?w=D.createElement(u.route.Component,null):u.route.element?w=u.route.element:w=s,D.createElement(Gy,{match:u,routeContext:{outlet:s,matches:m,isDataRoute:n!=null},children:w})};return n&&(u.route.ErrorBoundary||u.route.errorElement||a===0)?D.createElement(qy,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:k(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):k()},null)}var Es=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Es||{});function Jy(e){let t=D.useContext(Qd);return t||K(!1),t}function by(e){let t=D.useContext(Bo);return t||K(!1),t}function eg(e){let t=by(),n=t.matches[t.matches.length-1];return n.route.id||K(!1),n.route.id}function tg(){var e;let t=D.useContext(Kd),n=Jy(Es.UseRouteError),r=eg(Es.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}const ng="startTransition",lc=Hh[ng];function rg(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=D.useState(n.state),{v7_startTransition:l}=r||{},s=D.useCallback(p=>{l&&lc?lc(()=>o(p)):o(p)},[o,l]);D.useLayoutEffect(()=>n.subscribe(s),[n,s]);let u=D.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:p=>n.navigate(p),push:(p,m,k)=>n.navigate(p,{state:m,preventScrollReset:k==null?void 0:k.preventScrollReset}),replace:(p,m,k)=>n.navigate(p,{replace:!0,state:m,preventScrollReset:k==null?void 0:k.preventScrollReset})}),[n]),a=n.basename||"/",d=D.useMemo(()=>({router:n,navigator:u,static:!1,basename:a}),[n,u,a]);return D.createElement(D.Fragment,null,D.createElement(Hd.Provider,{value:d},D.createElement(Qd.Provider,{value:i},D.createElement(og,{basename:a,location:i.location,navigationType:i.historyAction,navigator:u},i.initialized?D.createElement(ig,{routes:n.routes,state:i}):t))),null)}function ig(e){let{routes:t,state:n}=e;return Yy(t,void 0,n)}function og(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ge.Pop,navigator:o,static:l=!1}=e;Cu()&&K(!1);let s=t.replace(/^\/*/,"/"),u=D.useMemo(()=>({basename:s,navigator:o,static:l}),[s,o,l]);typeof r=="string"&&(r=jt(r));let{pathname:a="/",search:d="",hash:p="",state:m=null,key:k="default"}=r,w=D.useMemo(()=>{let v=fi(a,s);return v==null?null:{location:{pathname:v,search:d,hash:p,state:m,key:k},navigationType:i}},[s,a,d,p,m,k,i]);return w==null?null:D.createElement(Yd.Provider,{value:u},D.createElement(Fo.Provider,{children:n,value:w}))}new Promise(()=>{});function lg(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:D.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:D.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** - * React Router DOM v6.16.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function ko(){return ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t{Yi[Et[e]]=e});const cg={type:"error",data:"parser error"},fg=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dg=typeof ArrayBuffer=="function",hg=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Xd=({type:e,data:t},n,r)=>fg&&t instanceof Blob?n?r(t):ac(t,r):dg&&(t instanceof ArrayBuffer||hg(t))?n?r(t):ac(new Blob([t]),r):r(Et[e]+(t||"")),ac=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)},cc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,l,s,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const a=new ArrayBuffer(t),d=new Uint8Array(a);for(r=0;r>4,d[i++]=(l&15)<<4|s>>2,d[i++]=(s&3)<<6|u&63;return a},mg=typeof ArrayBuffer=="function",qd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Gd(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:yg(e.substring(1),t)}:Yi[n]?e.length>1?{type:Yi[n],data:e.substring(1)}:{type:Yi[n]}:cg},yg=(e,t)=>{if(mg){const n=pg(e);return Gd(n,t)}else return{base64:!0,data:e}},Gd=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},Zd=String.fromCharCode(30),gg=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,l)=>{Xd(o,!1,s=>{r[l]=s,++i===n&&t(r.join(Zd))})})},vg=(e,t)=>{const n=e.split(Zd),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function bd(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Sg=Je.setTimeout,kg=Je.clearTimeout;function Uo(e,t){t.useNativeTimers?(e.setTimeoutFn=Sg.bind(Je),e.clearTimeoutFn=kg.bind(Je)):(e.setTimeoutFn=Je.setTimeout.bind(Je),e.clearTimeoutFn=Je.clearTimeout.bind(Je))}const Eg=1.33;function xg(e){return typeof e=="string"?Cg(e):Math.ceil((e.byteLength||e.size)*Eg)}function Cg(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class _g extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class eh extends we{constructor(t){super(),this.writable=!1,Uo(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new _g(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=qd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}}const th="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),xs=64,Rg={};let fc=0,Oi=0,dc;function hc(e){let t="";do t=th[e%xs]+t,e=Math.floor(e/xs);while(e>0);return t}function nh(){const e=hc(+new Date);return e!==dc?(fc=0,dc=e):e+"."+hc(fc++)}for(;Oi{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};vg(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,gg(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=nh()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=rh(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Zn(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let Zn=class Ki extends we{constructor(t,n){super(),Uo(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=bd(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new oh(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Ki.requestsCount++,Ki.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Tg,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ki.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};Zn.requestsCount=0;Zn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pc);else if(typeof addEventListener=="function"){const e="onpagehide"in Je?"pagehide":"unload";addEventListener(e,pc,!1)}}function pc(){for(let e in Zn.requests)Zn.requests.hasOwnProperty(e)&&Zn.requests[e].abort()}const lh=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Di=Je.WebSocket||Je.MozWebSocket,mc=!0,Og="arraybuffer",yc=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Dg extends eh{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=yc?{}:bd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=mc&&!yc?n?new Di(t,n):new Di(t):new Di(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Og,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const l={};try{mc&&this.ws.send(o)}catch{}i&&lh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=nh()),this.supportsBinary||(t.b64=1);const i=rh(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Di}}const zg={websocket:Dg,polling:Mg},Ag=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,jg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Cs(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Ag.exec(e||""),o={},l=14;for(;l--;)o[jg[l]]=i[l]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Ig(o,o.path),o.queryKey=Fg(o,o.query),o}function Ig(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Fg(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let sh=class Tn extends we{constructor(t,n={}){super(),this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=Cs(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=Cs(n.host).host),Uo(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Pg(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Jd,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new zg[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Tn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Tn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Tn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const l=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){l("transport closed")}function u(){l("socket closed")}function a(p){n&&p.name!==n.name&&o()}const d=()=>{n.removeListener("open",i),n.removeListener("error",l),n.removeListener("close",s),this.off("close",u),this.off("upgrading",a)};n.once("open",i),n.once("error",l),n.once("close",s),this.once("close",u),this.once("upgrading",a),n.open()}onOpen(){if(this.readyState="open",Tn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Tn.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,uh=Object.prototype.toString,Vg=typeof Blob=="function"||typeof Blob<"u"&&uh.call(Blob)==="[object BlobConstructor]",Wg=typeof File=="function"||typeof File<"u"&&uh.call(File)==="[object FileConstructor]";function _u(e){return Ug&&(e instanceof ArrayBuffer||$g(e))||Vg&&e instanceof Blob||Wg&&e instanceof File}function Xi(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case Y.ACK:case Y.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Xg{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Qg(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const qg=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ru,Encoder:Kg,get PacketType(){return Y},protocol:Yg},Symbol.toStringTag,{value:"Module"}));function ut(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Gg=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ah extends we{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ut(t,"open",this.onopen.bind(this)),ut(t,"packet",this.onpacket.bind(this)),ut(t,"error",this.onerror.bind(this)),ut(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Gg.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Y.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const l=this.ids++,s=n.pop();this._registerAckCallback(l,s),r.id=l}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l{this.io.clearTimeoutFn(o),n.apply(this,[null,...l])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((l,s)=>r?l?o(l):i(s):i(l)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Y.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Y.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Y.EVENT:case Y.BINARY_EVENT:this.onevent(t);break;case Y.ACK:case Y.BINARY_ACK:this.onack(t);break;case Y.DISCONNECT:this.ondisconnect();break;case Y.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Y.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Y.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}ar.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};ar.prototype.reset=function(){this.attempts=0};ar.prototype.setMin=function(e){this.ms=e};ar.prototype.setMax=function(e){this.max=e};ar.prototype.setJitter=function(e){this.jitter=e};class Ps extends we{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Uo(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ar({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||qg;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new sh(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ut(n,"open",function(){r.onopen(),t&&t()}),o=ut(n,"error",l=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",l),t?t(l):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const l=this._timeout;l===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},l);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ut(t,"ping",this.onping.bind(this)),ut(t,"data",this.ondata.bind(this)),ut(t,"error",this.onerror.bind(this)),ut(t,"close",this.onclose.bind(this)),ut(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){lh(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new ah(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const _r={};function qi(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Bg(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,l=_r[i]&&o in _r[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let u;return s?u=new Ps(r,t):(_r[i]||(_r[i]=new Ps(r,t)),u=_r[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(qi,{Manager:Ps,Socket:ah,io:qi,connect:qi});function Zg(e){return new Promise(t=>{let n=new Blob([e],{type:"image/jpeg"}),r=new Image,i=URL.createObjectURL(n);r.onload=function(){t(r)},r.src=i})}function ch(e){let t=e.layerX,n=e.layerY,r=e.target.style.transform.match(/scale\((.*?)\)/)[1];return[Math.floor(t/r),Math.floor(n/r)]}function Jg(e){let t=document.createElement("canvas"),n=t.getContext("2d");return t.width=41,t.height=41,n&&(n.beginPath(),n.lineWidth=2,n.strokeStyle="#000000",n.moveTo(0,6),n.lineTo(12,6),n.moveTo(6,0),n.lineTo(6,12),n.stroke(),n.beginPath(),n.arc(25,25,14,0,2*Math.PI,!1),n.lineWidth=2,n.strokeStyle="#000000",n.stroke(),n.beginPath(),n.arc(25,25,13.4,0,2*Math.PI,!1),n.fillStyle=e,n.fill()),t.toDataURL()}const fh="WrapperMouseUp",dh="Zoom",hh="WrapperMouseMove",ph="WrapperMouseDown",mh="PickColor",yh="Offset",bg=8,ev={zoomLevel:1,wrapperLeft:0,wrapperTop:0,dotHoveX:0,dotHoveY:0,isPickingColor:!1,initialLeft:0,initialTop:0,mouseInitialX:0,mouseInitialY:0,draggingRef:null},gh=vt.createContext({});function tv(e,t){switch(t.type){case dh:{const{zoomLevel:n}=e,{oldLeft:r,oldTop:i,layerX:o,layerY:l,deltaY:s}=t.payload;let u=0,a=n,d=o,p=l;s>0?u=a-1:u=a+1;let k=parseFloat(r)-(u/a-1)*d,v=parseFloat(i)-(u/a-1)*p;return u<=1&&(u=1,k=0,v=0),{...e,zoomLevel:u,wrapperLeft:k,wrapperTop:v}}case fh:{console.log("wrapper mouseUp");let{mouseMoveX:n,mouseMoveY:r,isPickingColor:i}=e;const{event:o,socket:l,currentColor:s,ctx:u,onPickColor:a,canvas:d,onPixelClick:p}=t.payload;let m=Math.sqrt(n**2+r**2);if(!i&&m<3&&!i){let k=o.layerX,w=o.layerY;const v=e.zoomLevel;let R=Math.floor(w/v),h=Math.floor(k/v);p({row:R,col:h,color:s}),l.emit("draw-dot",{row:R,col:h,color:s})}else if(i&&i&&u.current){let[k,w]=ch(o),R="#"+Array.from(u.current.getImageData(k,w,1,1).data).slice(0,3).map(h=>h.toString(16).padStart(2,"0")).join("");a(R),d.current&&(d.current.style.cursor=""),i=!1}return n=0,r=0,{...e,isPickingColor:i,mouseMoveX:n,mouseMoveY:r}}case hh:{const n=e.zoomLevel,{layerX:r,layerY:i}=t.payload;let o=0;r&&(o=Math.floor(r/n));let l=Math.floor(i/n);return{...e,dotHoveX:o,dotHoveY:l}}case ph:return{...e,...t.payload};case mh:return{...e,isPickingColor:!e.isPickingColor};case yh:{const{mouseX:n,mouseY:r}=t.payload,{mouseInitialX:i,mouseInitialY:o,initialX:l,initialY:s}=e,u=n-i,a=r-o,d=l+u,p=s+a;return{...e,wrapperLeft:d,wrapperTop:p,mouseMoveX:u,mouseMoveY:a}}}}const nv={display:"block",boxShadow:"0px 0px 3px black"};function rv({onPickColor:e,currentColor:t,onPixelClick:n,socket:r}){const[i,o]=D.useState(100),[l,s]=D.useState(100),{state:u,dispatch:a}=D.useContext(gh),d=D.useRef(null),p=D.useRef(null),m=D.useRef(null),k=D.useRef(!1),{wrapperLeft:w,wrapperTop:v,isPickingColor:R,zoomLevel:h,dotHoveX:f,dotHoveY:y}=u,c=Q=>{const V=Q.nativeEvent;a({type:fh,payload:{event:V,currentColor:t,socket:r,onPickColor:e,onPixelClick:n,canvas:d,ctx:m,draggingRef:k}})},x=Q=>{const V=Q.nativeEvent;p.current&&(k.current=!0,a({type:ph,payload:{initialTop:parseFloat(p.current.style.top),initialLeft:parseFloat(p.current.style.left),mouseInitialX:V.clientX,mouseInitialY:V.clientY,initialX:w,initialY:v,draggingRef:k}}))},L=Q=>{const V=Q.nativeEvent;a({type:hh,payload:{layerX:V.layerX,layerY:V.layerY}})},_=()=>{a({type:mh})};function N(Q){k.current=!1;const V=Q;V.target===d.current&&V.preventDefault(),V.stopPropagation(),p&&p.current&&a({type:dh,payload:{deltaY:V.deltaY||0,oldLeft:p.current.style.left||0,oldTop:p.current.style.top||0,layerX:V.layerX||0,layerY:V.layerY||0,width:p.current.clientWidth||0,height:p.current.clientHeight||0}})}function W(Q){if(k.current){console.log("window.mousemove");const V=Q.clientX,P=Q.clientY;p.current&&a({type:yh,payload:{mouseX:V,mouseY:P}})}}const I=async Q=>{const V=await Zg(Q);d.current&&(d.current.width=V.width,d.current.height=V.height),m.current&&m.current.drawImage(V,0,0),console.log(V.width,V.height),o(V.width),s(V.height)},de=()=>{console.log("window mouseUp"),k.current=!1,d.current&&(d.current.style.cursor="")},Z=({row:Q,col:V,color:P})=>{Xe(V,Q,P)};D.useEffect(()=>{if(!(!p.current||!d.current))return d.current.focus(),d.current.addEventListener("wheel",N),window.addEventListener("mousemove",W),window.addEventListener("mouseup",de),d.current&&(d.current.style.imageRendering="pixelated",m.current=d.current.getContext("2d")),r.on("initial-pixel-data",I),r.on("update-dot",Z),()=>{r.off(),window.removeEventListener("mousemove",W),window.removeEventListener("mouseup",de)}},[]);const Xe=(Q,V,P)=>{m.current&&(m.current.fillStyle=P,m.current.fillRect(Q,V,1,1))},ht=()=>{let Q=document.getElementById("color-pick-placeholder");return Q?ey.createPortal(T.jsx("button",{style:{marginLeft:"20px"},onClick:_,children:R?"正在取色":"取色"}),Q):null},pt=Q=>{if(R&&m.current&&d.current){let[V,P]=ch(Q.nativeEvent),B=`rgba(${Array.from(m.current.getImageData(V,P,1,1).data)})`,ne=Jg(B);d&&(d.current.style.cursor=`url(${ne}) 6 6, crosshair`)}};return T.jsxs("div",{style:{width:i,height:l,overflow:"hidden",margin:"20px",display:"inline-block",border:"1px solid",position:"relative"},children:[ht(),T.jsxs("div",{ref:p,className:"canvas-wrapper",style:{position:"absolute",left:w,top:v},onMouseDown:x,onMouseMove:L,onMouseUp:c,children:[T.jsx("span",{className:"dot-hover-box",style:{boxShadow:"0 0 1px black",width:`${h}px`,height:`${h}px`,position:"absolute",left:f*h,top:y*h,zIndex:bg,pointerEvents:"none"}}),T.jsx("canvas",{style:{...nv,transform:`scale(${h})`,transformOrigin:"top left"},ref:d,onMouseMove:pt})]})]})}const iv=["#ffffff","#000000","#ff0000","#ffa500","#ffff00","#00ff00","#00ffff","#0000ff","#800080"],ov={margin:0,padding:0,marginLeft:"20px",marginRight:"20px",float:"left"},lv={float:"left",listStyle:"none"},sv={width:"1em",height:"1em"};function uv(e){return T.jsxs("div",{children:[T.jsx("input",{type:"color",value:e.color,onChange:t=>e.onChange(t.target.value)}),T.jsx("ul",{style:ov,children:iv.map(t=>T.jsx("li",{style:lv,children:T.jsx("button",{onClick:()=>e.onChange(t),style:{...sv,backgroundColor:t}})},t))})]})}function av(e){var[t,n]=D.useState(0);return e.on("online-count",n),t}function cv({socket:e}){var t=av(e);return T.jsxs("div",{style:{margin:"20px"},children:["在线人数: ",t]})}const gc=qi("http://localhost:3001");function fv(){const[e,t]=D.useState("#ff0000"),[n,r]=D.useReducer(tv,ev),i=()=>{},o=l=>{t(l)};return T.jsx(vt.StrictMode,{children:T.jsx("div",{children:T.jsxs(gh.Provider,{value:{state:n,dispatch:r},children:[T.jsx(rv,{onPickColor:o,currentColor:e,onPixelClick:i,socket:gc}),T.jsx(uv,{onChange:o,color:e}),T.jsx(cv,{socket:gc}),T.jsx("span",{id:"color-pick-placeholder"})]})})})}const dv="_homePage_2244l_1",hv="_personalContent_2244l_4",vc={homePage:dv,personalContent:hv};function pv(){return T.jsxs("div",{className:vc.homePage,children:[T.jsx("h1",{children:"This is a Home Page"}),T.jsxs("main",{children:["There are some demo written by me",T.jsx("a",{href:"/html",children:"HTML"}),",",T.jsx("a",{href:"/css",children:"CSS"}),",",T.jsx("a",{href:"/pixel",children:"Pixel-Painter"}),T.jsx("div",{className:vc.personalContent,children:"©Zer0fire"})]}),T.jsx("main",{children:"There are some link for me Github Leetcode"})]})}function mv(){return T.jsx("div",{children:"some css demo animation slider graph"})}function yv(){return T.jsxs("div",{children:["some HTML demo",T.jsx("header",{}),T.jsx("main",{}),T.jsx("footer",{}),T.jsx("aside",{}),T.jsx("code",{})]})}function gv(){return T.jsxs(T.Fragment,{children:[T.jsx("input",{type:"radio",name:"carousel",id:"rd1",checked:!0}),T.jsx("input",{type:"radio",name:"carousel",id:"rd2"}),T.jsx("input",{type:"radio",name:"carousel",id:"rd3"}),T.jsx("input",{type:"radio",name:"carousel",id:"rd4"}),T.jsxs("div",{className:"carousel-view",children:[T.jsxs("div",{className:"carousel-main",children:[T.jsxs("div",{className:"carousel-choice first",children:[T.jsx("span",{children:"熊本熊 酷MA萌"}),T.jsx("br",{}),T.jsx("a",{href:"http://zhuti.xiaomi.com/detail/31c6176f-5772-45fa-9df9-d86d2bae1e4a",children:"戳一戳、摸一摸,酷MA萌会在锁屏跟你亲密互动哦。"}),T.jsx("img",{src:"https://i1.mifile.cn/a4/xmad_15360565735203_Uuvyd.jpg",alt:""})]}),T.jsxs("div",{className:"carousel-choice second",children:[T.jsx("span",{children:"蚁人2"}),T.jsx("br",{}),T.jsx("a",{href:"http://zhuti.xiaomi.com/detail/8e7b9877-efe1-4b42-87c0-658d89a166c9",children:"小米主题和迪士尼首度合作,打造精品漫威系列主题"}),T.jsx("img",{src:"https://i1.mifile.cn/a4/xmad_15357000957252_GpoLc.png",alt:""})]}),T.jsxs("div",{className:"carousel-choice third",children:[T.jsx("span",{children:"复仇者联盟3-我的英雄"}),T.jsx("br",{}),T.jsx("a",{href:"http://zhuti.xiaomi.com/detail/a909fbe0-28bb-4361-892b-d49550468b44",children:"28张超级英雄个人专属锁屏及桌面壁纸随你挑!"}),T.jsx("img",{src:"https://i1.mifile.cn/a4/xmad_15290561352349_zNjLT.png",alt:""})]}),T.jsxs("div",{className:"carousel-choice fourth",children:[T.jsx("span",{children:"众多个性主题、百变锁屏与自由桌面让你的手机与众不同!"}),T.jsx("br",{}),T.jsx("a",{href:"http://zhuti.xiaomi.com/?from=mi",children:"前往MIUI主题市场"}),T.jsx("img",{src:"https://s01.mifile.cn/i/index/more-miui.jpg",alt:""})]})]}),T.jsxs("section",{children:[T.jsx("label",{htmlFor:"rd1"}),T.jsx("label",{htmlFor:"rd2"}),T.jsx("label",{htmlFor:"rd3"}),T.jsx("label",{htmlFor:"rd4"})]})]})]})}function vv(){return T.jsx(gv,{})}const wv=sg([{path:"/",element:vt.createElement(pv)},{path:"/pixel",element:vt.createElement(fv)},{path:"/css",element:vt.createElement(mv)},{path:"/html",element:vt.createElement(yv)},{path:"/practice",element:vt.createElement(vv)}]);function Sv(){return T.jsx(vt.StrictMode,{children:T.jsx(rg,{router:wv})})}Cl.createRoot(document.getElementById("root")).render(vt.createElement(Sv)); diff --git a/dist/assets/index-6d687a8a.css b/dist/assets/index-6d687a8a.css deleted file mode 100644 index 8584c1a..0000000 --- a/dist/assets/index-6d687a8a.css +++ /dev/null @@ -1 +0,0 @@ -body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.App{text-align:center}.App-logo{animation:App-logo-spin infinite 20s linear;height:40vmin;pointer-events:none}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#61dafb}@keyframes App-logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._homePage_2244l_1{display:flex}._homePage_2244l_1 ._personalContent_2244l_4{color:#000}body{background-color:#f5f5f5}.carousel-view{width:250px;height:300px;position:relative;overflow:hidden;border-top:solid #83c44e 1px}.carousel-main{width:250px;height:300px;position:absolute;transition:.3s linear}.carousel-choice{width:250px;height:300px;position:absolute;text-align:center;line-height:40px;top:0;bottom:0;right:0;left:0}.carousel-choice>img{color:inherit}.carousel-choice.second{left:250px}.carousel-choice.third{left:500px}.carousel-choice.fourth{left:750px}#rd1:checked~div>.carousel-main{right:0}#rd2:checked~div>.carousel-main{right:250px}#rd3:checked~div>.carousel-main{right:500px}#rd4:checked~div>.carousel-main{right:750px}section{position:absolute;bottom:0;right:0;left:0;width:100px;margin:auto;font-size:0}label[for^=rd]{cursor:pointer;vertical-align:middle;display:inline-block;margin-right:10px;width:5px;height:5px;background-color:#b0b0b0;border-radius:5px}label[for^=rd]:hover{background-color:#ff6700}#rd1:checked~div>section>label:nth-child(1),#rd2:checked~div>section>label:nth-child(2),#rd3:checked~div>section>label:nth-child(3),#rd4:checked~div>section>label:nth-child(4){background-color:#fff;border:solid #ff6700}input[id^=rd]{display:none} diff --git a/dist/favicon.ico b/dist/favicon.ico deleted file mode 100644 index a11777c..0000000 Binary files a/dist/favicon.ico and /dev/null differ diff --git a/dist/index.html b/dist/index.html deleted file mode 100644 index 3363712..0000000 --- a/dist/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - My page - - - - -
- - - diff --git a/dist/manifest.json b/dist/manifest.json deleted file mode 100644 index 1f2f141..0000000 --- a/dist/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/dist/react.svg b/dist/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/dist/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/dist/summber-drawing-board.png b/dist/summber-drawing-board.png deleted file mode 100644 index 37091dd..0000000 Binary files a/dist/summber-drawing-board.png and /dev/null differ diff --git a/dist/vite.svg b/dist/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/dist/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/package.json b/package.json index 033b0d4..87711f7 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "socket.io-client": "^4.4.1" }, "scripts": { - "dev": "vite", + "dev": "vite --host", "build": "tsc && vite build", "test": "node scripts/test.js", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", diff --git a/src/components/PixelGrid/PixelGrid.tsx b/src/components/PixelGrid/PixelGrid.tsx index 7b9fa71..42bbe8b 100644 --- a/src/components/PixelGrid/PixelGrid.tsx +++ b/src/components/PixelGrid/PixelGrid.tsx @@ -252,63 +252,63 @@ function PixelGrid({ onPickColor, currentColor, socket }: Props) { }, []); return ( -
- {el && - ReactDOM.createPortal( - , - el - )} +
- + {isPickingColor ? "正在取色" : "取色"} + , + el + )} +
- + onMouseDown={handleWrapperMousedown} + onMouseMove={handleWrapperMouseMove} + onMouseUp={handleWrapperMouseup} + > + + +
);