import{g as md,c as Le,a as ul,e as ev}from"./ace-builds-1.23.0.js";function yd(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var wd={exports:{}},Al={},Sd={exports:{}},q={};/** * @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"),tv=Symbol.for("react.portal"),nv=Symbol.for("react.fragment"),rv=Symbol.for("react.strict_mode"),ov=Symbol.for("react.profiler"),iv=Symbol.for("react.provider"),lv=Symbol.for("react.context"),av=Symbol.for("react.forward_ref"),uv=Symbol.for("react.suspense"),sv=Symbol.for("react.memo"),cv=Symbol.for("react.lazy"),Lc=Symbol.iterator;function fv(e){return e===null||typeof e!="object"?null:(e=Lc&&e[Lc]||e["@@iterator"],typeof e=="function"?e:null)}var _d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ed=Object.assign,Cd={};function eo(e,t,n){this.props=e,this.context=t,this.refs=Cd,this.updater=n||_d}eo.prototype.isReactComponent={};eo.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")};eo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function kd(){}kd.prototype=eo.prototype;function ls(e,t,n){this.props=e,this.context=t,this.refs=Cd,this.updater=n||_d}var as=ls.prototype=new kd;as.constructor=ls;Ed(as,eo.prototype);as.isPureReactComponent=!0;var Tc=Array.isArray,Pd=Object.prototype.hasOwnProperty,us={current:null},Rd={key:!0,ref:!0,__self:!0,__source:!0};function Md(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)Pd.call(t,r)&&!Rd.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,Ee=z[de];if(0>>1;dei(ee,Q))fti(dn,ee)?(z[de]=dn,z[ft]=Q,de=ft):(z[de]=ee,z[se]=Q,de=se);else if(fti(dn,Q))z[de]=dn,z[ft]=Q,de=ft;else break e}}return b}function i(z,b){var Q=z.sortIndex-b.sortIndex;return Q!==0?Q:z.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var u=[],s=[],c=1,f=null,d=3,v=!1,y=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(z){for(var b=n(s);b!==null;){if(b.callback===null)r(s);else if(b.startTime<=z)r(s),b.sortIndex=b.expirationTime,t(u,b);else break;b=n(s)}}function m(z){if(S=!1,w(z),!y)if(n(u)!==null)y=!0,Je(P);else{var b=n(s);b!==null&&rt(m,b.startTime-z)}}function P(z,b){y=!1,S&&(S=!1,g(T),T=-1),v=!0;var Q=d;try{for(w(b),f=n(u);f!==null&&(!(f.expirationTime>b)||z&&!U());){var de=f.callback;if(typeof de=="function"){f.callback=null,d=f.priorityLevel;var Ee=de(f.expirationTime<=b);b=e.unstable_now(),typeof Ee=="function"?f.callback=Ee:f===n(u)&&r(u),w(b)}else r(u);f=n(u)}if(f!==null)var fn=!0;else{var se=n(s);se!==null&&rt(m,se.startTime-b),fn=!1}return fn}finally{f=null,d=Q,v=!1}}var R=!1,M=null,T=-1,A=5,I=-1;function U(){return!(e.unstable_now()-Iz||125de?(z.sortIndex=Q,t(s,z),n(u)===null&&z===n(s)&&(S?(g(T),T=-1):S=!0,rt(m,Q-de))):(z.sortIndex=Ee,t(u,z),y||v||(y=!0,Je(P))),z},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(z){var b=d;return function(){var Q=d;d=b;try{return z.apply(this,arguments)}finally{d=Q}}}})(Dd);Od.exports=Dd;var Cv=Od.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 Nd=O,mt=Cv;function D(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"),au=Object.prototype.hasOwnProperty,kv=/^[: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]*$/,Nc={},zc={};function Pv(e){return au.call(zc,e)?!0:au.call(Nc,e)?!1:kv.test(e)?zc[e]=!0:(Nc[e]=!0,!1)}function Rv(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 Mv(e,t,n,r){if(t===null||typeof t>"u"||Rv(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 nt(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 Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new nt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new nt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new nt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new nt(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){Ve[e]=new nt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new nt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ve[e]=new nt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ve[e]=new nt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ve[e]=new nt(e,5,!1,e.toLowerCase(),null,!1,!1)});var cs=/[\-:]([a-z])/g;function fs(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(cs,fs);Ve[t]=new nt(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(cs,fs);Ve[t]=new nt(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(cs,fs);Ve[t]=new nt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new nt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new nt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ve[e]=new nt(e,1,!1,e.toLowerCase(),null,!0,!0)});function ds(e,t,n,r){var i=Ve.hasOwnProperty(t)?Ve[t]:null;(i!==null?i.type!==0:r||!(2a||i[l]!==o[a]){var u=` `+i[l].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=a);break}}}finally{Oa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Po(e):""}function xv(e){switch(e.tag){case 5:return Po(e.type);case 16:return Po("Lazy");case 13:return Po("Suspense");case 19:return Po("SuspenseList");case 0:case 2:case 15:return e=Da(e.type,!1),e;case 11:return e=Da(e.type.render,!1),e;case 1:return e=Da(e.type,!0),e;default:return""}}function fu(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 Cr:return"Fragment";case Er:return"Portal";case uu:return"Profiler";case hs:return"StrictMode";case su:return"Suspense";case cu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Id:return(e.displayName||"Context")+".Consumer";case Ad:return(e._context.displayName||"Context")+".Provider";case ps:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gs:return t=e.displayName||null,t!==null?t:fu(e.type)||"Memo";case yn:t=e._payload,e=e._init;try{return fu(e(t))}catch{}}return null}function Lv(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 fu(t);case 8:return t===hs?"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 Dn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tv(e){var t=jd(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 Oi(e){e._valueTracker||(e._valueTracker=Tv(e))}function $d(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=jd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function sl(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 du(e,t){var n=t.checked;return _e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ic(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Dn(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 Ud(e,t){t=t.checked,t!=null&&ds(e,"checked",t,!1)}function hu(e,t){Ud(e,t);var n=Dn(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")?pu(e,t.type,n):t.hasOwnProperty("defaultValue")&&pu(e,t.type,Dn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fc(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 pu(e,t,n){(t!=="number"||sl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ro=Array.isArray;function Ir(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Uo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Lo={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},Ov=["Webkit","ms","Moz","O"];Object.keys(Lo).forEach(function(e){Ov.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lo[t]=Lo[e]})});function Vd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Lo.hasOwnProperty(e)&&Lo[e]?(""+t).trim():t+"px"}function Wd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Vd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Dv=_e({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 mu(e,t){if(t){if(Dv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function yu(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 wu=null;function vs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Su=null,Fr=null,jr=null;function Uc(e){if(e=ai(e)){if(typeof Su!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Ul(t),Su(e.stateNode,e.type,t))}}function Qd(e){Fr?jr?jr.push(e):jr=[e]:Fr=e}function Kd(){if(Fr){var e=Fr,t=jr;if(jr=Fr=null,Uc(e),t)for(e=0;e>>=0,e===0?32:31-(Hv(e)/Vv|0)|0}var Ni=64,zi=4194304;function Mo(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 hl(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 a=l&~i;a!==0?r=Mo(a):(o&=l,o!==0&&(r=Mo(o)))}else l=n&~i,l!==0?r=Mo(l):o!==0&&(r=Mo(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 ii(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ut(t),e[t]=n}function Gv(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=Oo),Yc=String.fromCharCode(32),Xc=!1;function hh(e,t){switch(e){case"keyup":return Em.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ph(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kr=!1;function km(e,t){switch(e){case"compositionend":return ph(t);case"keypress":return t.which!==32?null:(Xc=!0,Yc);case"textInput":return e=t.data,e===Yc&&Xc?null:e;default:return null}}function Pm(e,t){if(kr)return e==="compositionend"||!ks&&hh(e,t)?(e=fh(),Zi=_s=En=null,kr=!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=ef(n)}}function yh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wh(){for(var e=window,t=sl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=sl(e.document)}return t}function Ps(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 zm(e){var t=wh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&yh(n.ownerDocument.documentElement,n)){if(r!==null&&Ps(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=tf(n,o);var l=tf(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,Pr=null,Ru=null,No=null,Mu=!1;function nf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mu||Pr==null||Pr!==sl(r)||(r=Pr,"selectionStart"in r&&Ps(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}),No&&Qo(No,r)||(No=r,r=vl(Ru,"onSelect"),0xr||(e.current=Nu[xr],Nu[xr]=null,xr--)}function fe(e,t){xr++,Nu[xr]=e.current,e.current=t}var Nn={},Xe=In(Nn),at=In(!1),tr=Nn;function Vr(e,t){var n=e.type.contextTypes;if(!n)return Nn;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 ut(e){return e=e.childContextTypes,e!=null}function yl(){ge(at),ge(Xe)}function cf(e,t,n){if(Xe.current!==Nn)throw Error(D(168));fe(Xe,t),fe(at,n)}function xh(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(D(108,Lv(e)||"Unknown",i));return _e({},n,r)}function wl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nn,tr=Xe.current,fe(Xe,e),fe(at,at.current),!0}function ff(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=xh(e,t,tr),r.__reactInternalMemoizedMergedChildContext=e,ge(at),ge(Xe),fe(Xe,e)):ge(at),fe(at,n)}var Zt=null,Bl=!1,Qa=!1;function Lh(e){Zt===null?Zt=[e]:Zt.push(e)}function Qm(e){Bl=!0,Lh(e)}function Fn(){if(!Qa&&Zt!==null){Qa=!0;var e=0,t=ie;try{var n=Zt;for(ie=1;e>=l,i-=l,qt=1<<32-Ut(t)+i|n<T?(A=M,M=null):A=M.sibling;var I=d(g,M,w[T],m);if(I===null){M===null&&(M=A);break}e&&M&&I.alternate===null&&t(g,M),h=o(I,h,T),R===null?P=I:R.sibling=I,R=I,M=A}if(T===w.length)return n(g,M),me&&Qn(g,T),P;if(M===null){for(;TT?(A=M,M=null):A=M.sibling;var U=d(g,M,I.value,m);if(U===null){M===null&&(M=A);break}e&&M&&U.alternate===null&&t(g,M),h=o(U,h,T),R===null?P=U:R.sibling=U,R=U,M=A}if(I.done)return n(g,M),me&&Qn(g,T),P;if(M===null){for(;!I.done;T++,I=w.next())I=f(g,I.value,m),I!==null&&(h=o(I,h,T),R===null?P=I:R.sibling=I,R=I);return me&&Qn(g,T),P}for(M=r(g,M);!I.done;T++,I=w.next())I=v(M,g,T,I.value,m),I!==null&&(e&&I.alternate!==null&&M.delete(I.key===null?T:I.key),h=o(I,h,T),R===null?P=I:R.sibling=I,R=I);return e&&M.forEach(function(N){return t(g,N)}),me&&Qn(g,T),P}function E(g,h,w,m){if(typeof w=="object"&&w!==null&&w.type===Cr&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Ti:e:{for(var P=w.key,R=h;R!==null;){if(R.key===P){if(P=w.type,P===Cr){if(R.tag===7){n(g,R.sibling),h=i(R,w.props.children),h.return=g,g=h;break e}}else if(R.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===yn&&yf(P)===R.type){n(g,R.sibling),h=i(R,w.props),h.ref=wo(g,R,w),h.return=g,g=h;break e}n(g,R);break}else t(g,R);R=R.sibling}w.type===Cr?(h=er(w.props.children,g.mode,m,w.key),h.return=g,g=h):(m=ll(w.type,w.key,w.props,null,g.mode,m),m.ref=wo(g,h,w),m.return=g,g=m)}return l(g);case Er:e:{for(R=w.key;h!==null;){if(h.key===R)if(h.tag===4&&h.stateNode.containerInfo===w.containerInfo&&h.stateNode.implementation===w.implementation){n(g,h.sibling),h=i(h,w.children||[]),h.return=g,g=h;break e}else{n(g,h);break}else t(g,h);h=h.sibling}h=eu(w,g.mode,m),h.return=g,g=h}return l(g);case yn:return R=w._init,E(g,h,R(w._payload),m)}if(Ro(w))return y(g,h,w,m);if(po(w))return S(g,h,w,m);Bi(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,h!==null&&h.tag===6?(n(g,h.sibling),h=i(h,w),h.return=g,g=h):(n(g,h),h=qa(w,g.mode,m),h.return=g,g=h),l(g)):n(g,h)}return E}var Qr=Fh(!0),jh=Fh(!1),ui={},Gt=In(ui),Xo=In(ui),Jo=In(ui);function Jn(e){if(e===ui)throw Error(D(174));return e}function zs(e,t){switch(fe(Jo,t),fe(Xo,e),fe(Gt,ui),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vu(t,e)}ge(Gt),fe(Gt,t)}function Kr(){ge(Gt),ge(Xo),ge(Jo)}function $h(e){Jn(Jo.current);var t=Jn(Gt.current),n=vu(t,e.type);t!==n&&(fe(Xo,e),fe(Gt,n))}function As(e){Xo.current===e&&(ge(Gt),ge(Xo))}var we=In(0);function Pl(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 Ka=[];function Is(){for(var e=0;en?n:4,e(!0);var r=Ga.transition;Ga.transition={};try{e(!1),t()}finally{ie=n,Ga.transition=r}}function tp(){return Lt().memoizedState}function Xm(e,t,n){var r=Tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},np(e))rp(t,n);else if(n=Nh(e,t,n,r),n!==null){var i=et();Bt(n,e,r,i),op(n,t,r)}}function Jm(e,t,n){var r=Tn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(np(e))rp(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,a=o(l,n);if(i.hasEagerState=!0,i.eagerState=a,bt(a,l)){var u=t.interleaved;u===null?(i.next=i,Ds(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Nh(e,t,i,r),n!==null&&(i=et(),Bt(n,e,r,i),op(n,t,r))}}function np(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function rp(e,t){zo=Rl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function op(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ys(e,n)}}var Ml={readContext:xt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},Zm={readContext:xt,useCallback:function(e,t){return Wt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:Sf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,nl(4194308,4,Xh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return nl(4194308,4,e,t)},useInsertionEffect:function(e,t){return nl(4,2,e,t)},useMemo:function(e,t){var n=Wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wt();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=Xm.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=Wt();return e={current:e},t.memoizedState=e},useState:wf,useDebugValue:Bs,useDeferredValue:function(e){return Wt().memoizedState=e},useTransition:function(){var e=wf(!1),t=e[0];return e=Ym.bind(null,e[1]),Wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=Wt();if(me){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),je===null)throw Error(D(349));rr&30||bh(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Sf(Vh.bind(null,r,o,e),[e]),r.flags|=2048,ei(9,Hh.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Wt(),t=je.identifierPrefix;if(me){var n=en,r=qt;n=(r&~(1<<32-Ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zo++,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[Qt]=t,e[Yo]=r,hp(e,t,!1,!1),t.stateNode=e;e:{switch(l=yu(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;iYr&&(t.flags|=128,r=!0,So(o,!1),t.lanes=4194304)}else{if(!r)if(e=Pl(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),So(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!me)return Ge(t),null}else 2*Re()-o.renderingStartTime>Yr&&n!==1073741824&&(t.flags|=128,r=!0,So(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=Re(),t.sibling=null,n=we.current,fe(we,r?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return Ks(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pt&1073741824&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function ly(e,t){switch(Ms(t),t.tag){case 1:return ut(t.type)&&yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kr(),ge(at),ge(Xe),Is(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return As(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Wr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Kr(),null;case 10:return Os(t.type._context),null;case 22:case 23:return Ks(),null;case 24:return null;default:return null}}var Hi=!1,Ye=!1,ay=typeof WeakSet=="function"?WeakSet:Set,$=null;function Dr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Pe(e,t,r)}else n.current=null}function Wu(e,t,n){try{n()}catch(r){Pe(e,t,r)}}var Lf=!1;function uy(e,t){if(xu=pl,e=wh(),Ps(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,a=-1,u=-1,s=0,c=0,f=e,d=null;t:for(;;){for(var v;f!==n||i!==0&&f.nodeType!==3||(a=l+i),f!==o||r!==0&&f.nodeType!==3||(u=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(v=f.firstChild)!==null;)d=f,f=v;for(;;){if(f===e)break t;if(d===n&&++s===i&&(a=l),d===o&&++c===r&&(u=l),(v=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=v}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lu={focusedElem:e,selectionRange:n},pl=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var S=y.memoizedProps,E=y.memoizedState,g=t.stateNode,h=g.getSnapshotBeforeUpdate(t.elementType===t.type?S:At(t.type,S),E);g.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(m){Pe(t,t.return,m)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return y=Lf,Lf=!1,y}function Ao(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&&Wu(t,n,o)}i=i.next}while(i!==r)}}function Vl(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 Qu(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 vp(e){var t=e.alternate;t!==null&&(e.alternate=null,vp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Qt],delete t[Yo],delete t[Du],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 mp(e){return e.tag===5||e.tag===3||e.tag===4}function Tf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mp(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 Ku(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=ml));else if(r!==4&&(e=e.child,e!==null))for(Ku(e,t,n),e=e.sibling;e!==null;)Ku(e,t,n),e=e.sibling}function Gu(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(Gu(e,t,n),e=e.sibling;e!==null;)Gu(e,t,n),e=e.sibling}var be=null,It=!1;function mn(e,t,n){for(n=n.child;n!==null;)yp(e,t,n),n=n.sibling}function yp(e,t,n){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(Il,n)}catch{}switch(n.tag){case 5:Ye||Dr(n,t);case 6:var r=be,i=It;be=null,mn(e,t,n),be=r,It=i,be!==null&&(It?(e=be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):be.removeChild(n.stateNode));break;case 18:be!==null&&(It?(e=be,n=n.stateNode,e.nodeType===8?Wa(e.parentNode,n):e.nodeType===1&&Wa(e,n),Vo(e)):Wa(be,n.stateNode));break;case 4:r=be,i=It,be=n.stateNode.containerInfo,It=!0,mn(e,t,n),be=r,It=i;break;case 0:case 11:case 14:case 15:if(!Ye&&(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)&&Wu(n,t,l),i=i.next}while(i!==r)}mn(e,t,n);break;case 1:if(!Ye&&(Dr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Pe(n,t,a)}mn(e,t,n);break;case 21:mn(e,t,n);break;case 22:n.mode&1?(Ye=(r=Ye)||n.memoizedState!==null,mn(e,t,n),Ye=r):mn(e,t,n);break;default:mn(e,t,n)}}function Of(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ay),t.forEach(function(r){var i=my.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function zt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=Re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*cy(r/1960))-r,10e?16:e,Cn===null)var r=!1;else{if(e=Cn,Cn=null,Tl=0,te&6)throw Error(D(331));var i=te;for(te|=4,$=e.current;$!==null;){var o=$,l=o.child;if($.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uRe()-Ws?qn(e,0):Vs|=n),st(e,t)}function Rp(e,t){t===0&&(e.mode&1?(t=zi,zi<<=1,!(zi&130023424)&&(zi=4194304)):t=1);var n=et();e=ln(e,t),e!==null&&(ii(e,t,n),st(e,n))}function vy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rp(e,n)}function my(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(D(314))}r!==null&&r.delete(t),Rp(e,n)}var Mp;Mp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||at.current)lt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return lt=!1,oy(e,t,n);lt=!!(e.flags&131072)}else lt=!1,me&&t.flags&1048576&&Th(t,_l,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;rl(e,t),e=t.pendingProps;var i=Vr(t,Xe.current);Ur(t,n),i=js(null,t,r,e,i,n);var o=$s();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,ut(r)?(o=!0,wl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ns(t),i.updater=bl,t.stateNode=i,i._reactInternals=t,ju(t,r,e,n),t=Bu(null,t,r,!0,o,n)):(t.tag=0,me&&o&&Rs(t),qe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(rl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=wy(r),e=At(r,e),i){case 0:t=Uu(null,t,r,e,n);break e;case 1:t=Rf(null,t,r,e,n);break e;case 11:t=kf(null,t,r,e,n);break e;case 14:t=Pf(null,t,r,At(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:At(r,i),Uu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:At(r,i),Rf(e,t,r,i,n);case 3:e:{if(cp(t),e===null)throw Error(D(387));r=t.pendingProps,o=t.memoizedState,i=o.element,zh(e,t),kl(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=Gr(Error(D(423)),t),t=Mf(e,t,r,n,i);break e}else if(r!==i){i=Gr(Error(D(424)),t),t=Mf(e,t,r,n,i);break e}else for(gt=Mn(t.stateNode.containerInfo.firstChild),vt=t,me=!0,jt=null,n=jh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wr(),r===i){t=an(e,t,n);break e}qe(e,t,r,n)}t=t.child}return t;case 5:return $h(t),e===null&&Au(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Tu(r,i)?l=null:o!==null&&Tu(r,o)&&(t.flags|=32),sp(e,t),qe(e,t,l,n),t.child;case 6:return e===null&&Au(t),null;case 13:return fp(e,t,n);case 4:return zs(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qr(t,null,r,n):qe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:At(r,i),kf(e,t,r,i,n);case 7:return qe(e,t,t.pendingProps,n),t.child;case 8:return qe(e,t,t.pendingProps.children,n),t.child;case 12:return qe(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,fe(El,r._currentValue),r._currentValue=l,o!==null)if(bt(o.value,l)){if(o.children===i.children&&!at.current){t=an(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){l=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=tn(-1,n&-n),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var c=s.pending;c===null?u.next=u:(u.next=c.next,c.next=u),s.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Iu(o.return,n,t),a.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(D(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Iu(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}qe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ur(t,n),i=xt(i),r=r(i),t.flags|=1,qe(e,t,r,n),t.child;case 14:return r=t.type,i=At(r,t.pendingProps),i=At(r.type,i),Pf(e,t,r,i,n);case 15:return ap(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:At(r,i),rl(e,t),t.tag=1,ut(r)?(e=!0,wl(t)):e=!1,Ur(t,n),Ih(t,r,i),ju(t,r,i,n),Bu(null,t,r,!0,e,n);case 19:return dp(e,t,n);case 22:return up(e,t,n)}throw Error(D(156,t.tag))};function xp(e,t){return eh(e,t)}function yy(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 Rt(e,t,n,r){return new yy(e,t,n,r)}function Ys(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wy(e){if(typeof e=="function")return Ys(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ps)return 11;if(e===gs)return 14}return 2}function On(e,t){var n=e.alternate;return n===null?(n=Rt(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 ll(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")Ys(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Cr:return er(n.children,i,o,t);case hs:l=8,i|=8;break;case uu:return e=Rt(12,n,t,i|2),e.elementType=uu,e.lanes=o,e;case su:return e=Rt(13,n,t,i),e.elementType=su,e.lanes=o,e;case cu:return e=Rt(19,n,t,i),e.elementType=cu,e.lanes=o,e;case Fd:return Ql(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ad:l=10;break e;case Id:l=9;break e;case ps:l=11;break e;case gs:l=14;break e;case yn:l=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=Rt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function er(e,t,n,r){return e=Rt(7,e,r,t),e.lanes=n,e}function Ql(e,t,n,r){return e=Rt(22,e,r,t),e.elementType=Fd,e.lanes=n,e.stateNode={isHidden:!1},e}function qa(e,t,n){return e=Rt(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Sy(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=za(0),this.expirationTimes=za(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=za(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Xs(e,t,n,r,i,o,l,a,u){return e=new Sy(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Rt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ns(o),e}function _y(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dp)}catch(e){console.error(e)}}Dp(),Td.exports=yt;var Jl=Td.exports;const Ry=md(Jl),nS=yd({__proto__:null,default:Ry},[Jl]);var $f=Jl;Dc.createRoot=$f.createRoot,Dc.hydrateRoot=$f.hydrateRoot;var Np={exports:{}},zp={};/** * @license React * use-sync-external-store-shim.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 Xr=O;function My(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xy=typeof Object.is=="function"?Object.is:My,Ly=Xr.useState,Ty=Xr.useEffect,Oy=Xr.useLayoutEffect,Dy=Xr.useDebugValue;function Ny(e,t){var n=t(),r=Ly({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Oy(function(){i.value=n,i.getSnapshot=t,tu(i)&&o({inst:i})},[e,n,t]),Ty(function(){return tu(i)&&o({inst:i}),e(function(){tu(i)&&o({inst:i})})},[e]),Dy(n),n}function tu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xy(e,n)}catch{return!0}}function zy(e,t){return t()}var Ay=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zy:Ny;zp.useSyncExternalStore=Xr.useSyncExternalStore!==void 0?Xr.useSyncExternalStore:Ay;Np.exports=zp;var Iy=Np.exports,Ap={exports:{}},Ip={};/** * @license React * use-sync-external-store-shim/with-selector.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 Zl=O,Fy=Iy;function jy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $y=typeof Object.is=="function"?Object.is:jy,Uy=Fy.useSyncExternalStore,By=Zl.useRef,by=Zl.useEffect,Hy=Zl.useMemo,Vy=Zl.useDebugValue;Ip.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=By(null);if(o.current===null){var l={hasValue:!1,value:null};o.current=l}else l=o.current;o=Hy(function(){function u(v){if(!s){if(s=!0,c=v,v=r(v),i!==void 0&&l.hasValue){var y=l.value;if(i(y,v))return f=y}return f=v}if(y=f,$y(c,v))return y;var S=r(v);return i!==void 0&&i(y,S)?y:(c=v,f=S)}var s=!1,c,f,d=n===void 0?null:n;return[function(){return u(t())},d===null?void 0:function(){return u(d())}]},[t,n,r,i]);var a=Uy(e,o[0],o[1]);return by(function(){l.hasValue=!0,l.value=a},[a]),Vy(a),a};Ap.exports=Ip;var Wy=Ap.exports;function Qy(e){e()}let Fp=Qy;const Ky=e=>Fp=e,Gy=()=>Fp,Uf=Symbol.for(`react-redux-context-${O.version}`),Bf=globalThis;function Yy(){let e=Bf[Uf];return e||(e=O.createContext(null),Bf[Uf]=e),e}const zn=new Proxy({},new Proxy({},{get(e,t){const n=Yy();return(r,...i)=>Reflect[t](n,...i)}}));function ec(e=zn){return function(){return O.useContext(e)}}const jp=ec(),Xy=()=>{throw new Error("uSES not initialized!")};let $p=Xy;const Jy=e=>{$p=e},Zy=(e,t)=>e===t;function qy(e=zn){const t=e===zn?jp:ec(e);return function(r,i={}){const{equalityFn:o=Zy,stabilityCheck:l=void 0,noopCheck:a=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:u,subscription:s,getServerState:c,stabilityCheck:f,noopCheck:d}=t();O.useRef(!0);const v=O.useCallback({[r.name](S){return r(S)}}[r.name],[r,f,l]),y=$p(s.addNestedSub,u.getState,c||u.getState,v,o);return O.useDebugValue(y),y}}const rS=qy();function bf(){return bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var Up={exports:{}},le={};/** @license React v16.13.1 * react-is.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 $e=typeof Symbol=="function"&&Symbol.for,tc=$e?Symbol.for("react.element"):60103,nc=$e?Symbol.for("react.portal"):60106,ql=$e?Symbol.for("react.fragment"):60107,ea=$e?Symbol.for("react.strict_mode"):60108,ta=$e?Symbol.for("react.profiler"):60114,na=$e?Symbol.for("react.provider"):60109,ra=$e?Symbol.for("react.context"):60110,rc=$e?Symbol.for("react.async_mode"):60111,oa=$e?Symbol.for("react.concurrent_mode"):60111,ia=$e?Symbol.for("react.forward_ref"):60112,la=$e?Symbol.for("react.suspense"):60113,e0=$e?Symbol.for("react.suspense_list"):60120,aa=$e?Symbol.for("react.memo"):60115,ua=$e?Symbol.for("react.lazy"):60116,t0=$e?Symbol.for("react.block"):60121,n0=$e?Symbol.for("react.fundamental"):60117,r0=$e?Symbol.for("react.responder"):60118,o0=$e?Symbol.for("react.scope"):60119;function St(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case tc:switch(e=e.type,e){case rc:case oa:case ql:case ta:case ea:case la:return e;default:switch(e=e&&e.$$typeof,e){case ra:case ia:case ua:case aa:case na:return e;default:return t}}case nc:return t}}}function Bp(e){return St(e)===oa}le.AsyncMode=rc;le.ConcurrentMode=oa;le.ContextConsumer=ra;le.ContextProvider=na;le.Element=tc;le.ForwardRef=ia;le.Fragment=ql;le.Lazy=ua;le.Memo=aa;le.Portal=nc;le.Profiler=ta;le.StrictMode=ea;le.Suspense=la;le.isAsyncMode=function(e){return Bp(e)||St(e)===rc};le.isConcurrentMode=Bp;le.isContextConsumer=function(e){return St(e)===ra};le.isContextProvider=function(e){return St(e)===na};le.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===tc};le.isForwardRef=function(e){return St(e)===ia};le.isFragment=function(e){return St(e)===ql};le.isLazy=function(e){return St(e)===ua};le.isMemo=function(e){return St(e)===aa};le.isPortal=function(e){return St(e)===nc};le.isProfiler=function(e){return St(e)===ta};le.isStrictMode=function(e){return St(e)===ea};le.isSuspense=function(e){return St(e)===la};le.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ql||e===oa||e===ta||e===ea||e===la||e===e0||typeof e=="object"&&e!==null&&(e.$$typeof===ua||e.$$typeof===aa||e.$$typeof===na||e.$$typeof===ra||e.$$typeof===ia||e.$$typeof===n0||e.$$typeof===r0||e.$$typeof===o0||e.$$typeof===t0)};le.typeOf=St;Up.exports=le;var i0=Up.exports,bp=i0,l0={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Hp={};Hp[bp.ForwardRef]=l0;Hp[bp.Memo]=a0;var ae={};/** * @license React * react-is.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 oc=Symbol.for("react.element"),ic=Symbol.for("react.portal"),sa=Symbol.for("react.fragment"),ca=Symbol.for("react.strict_mode"),fa=Symbol.for("react.profiler"),da=Symbol.for("react.provider"),ha=Symbol.for("react.context"),u0=Symbol.for("react.server_context"),pa=Symbol.for("react.forward_ref"),ga=Symbol.for("react.suspense"),va=Symbol.for("react.suspense_list"),ma=Symbol.for("react.memo"),ya=Symbol.for("react.lazy"),s0=Symbol.for("react.offscreen"),Vp;Vp=Symbol.for("react.module.reference");function Tt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case oc:switch(e=e.type,e){case sa:case fa:case ca:case ga:case va:return e;default:switch(e=e&&e.$$typeof,e){case u0:case ha:case pa:case ya:case ma:case da:return e;default:return t}}case ic:return t}}}ae.ContextConsumer=ha;ae.ContextProvider=da;ae.Element=oc;ae.ForwardRef=pa;ae.Fragment=sa;ae.Lazy=ya;ae.Memo=ma;ae.Portal=ic;ae.Profiler=fa;ae.StrictMode=ca;ae.Suspense=ga;ae.SuspenseList=va;ae.isAsyncMode=function(){return!1};ae.isConcurrentMode=function(){return!1};ae.isContextConsumer=function(e){return Tt(e)===ha};ae.isContextProvider=function(e){return Tt(e)===da};ae.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===oc};ae.isForwardRef=function(e){return Tt(e)===pa};ae.isFragment=function(e){return Tt(e)===sa};ae.isLazy=function(e){return Tt(e)===ya};ae.isMemo=function(e){return Tt(e)===ma};ae.isPortal=function(e){return Tt(e)===ic};ae.isProfiler=function(e){return Tt(e)===fa};ae.isStrictMode=function(e){return Tt(e)===ca};ae.isSuspense=function(e){return Tt(e)===ga};ae.isSuspenseList=function(e){return Tt(e)===va};ae.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===sa||e===fa||e===ca||e===ga||e===va||e===s0||typeof e=="object"&&e!==null&&(e.$$typeof===ya||e.$$typeof===ma||e.$$typeof===da||e.$$typeof===ha||e.$$typeof===pa||e.$$typeof===Vp||e.getModuleId!==void 0)};ae.typeOf=Tt;function c0(){const e=Gy();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const Hf={notify(){},get:()=>[]};function f0(e,t){let n,r=Hf;function i(f){return u(),r.subscribe(f)}function o(){r.notify()}function l(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function u(){n||(n=t?t.addNestedSub(l):e.subscribe(l),r=c0())}function s(){n&&(n(),n=void 0,r.clear(),r=Hf)}const c={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:l,isSubscribed:a,trySubscribe:u,tryUnsubscribe:s,getListeners:()=>r};return c}const d0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",h0=d0?O.useLayoutEffect:O.useEffect;function iS({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",noopCheck:o="once"}){const l=O.useMemo(()=>{const s=f0(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),a=O.useMemo(()=>e.getState(),[e]);h0(()=>{const{subscription:s}=l;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),a!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[l,a]);const u=t||zn;return xd.createElement(u.Provider,{value:l},n)}function Wp(e=zn){const t=e===zn?jp:ec(e);return function(){const{store:r}=t();return r}}const p0=Wp();function g0(e=zn){const t=e===zn?p0:Wp(e);return function(){return t().dispatch}}const lS=g0();Jy(Wy.useSyncExternalStoreWithSelector);Ky(Jl.unstable_batchedUpdates);/** * @remix-run/router v1.7.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 ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Jr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function m0(){return Math.random().toString(36).substr(2,8)}function Wf(e,t){return{usr:e.state,key:e.key,idx:t}}function ni(e,t,n,r){return n===void 0&&(n=null),ve({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?sn(t):t,{state:n,key:t&&t.key||r||m0()})}function lr(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 sn(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 y0(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,a=Me.Pop,u=null,s=c();s==null&&(s=0,l.replaceState(ve({},l.state,{idx:s}),""));function c(){return(l.state||{idx:null}).idx}function f(){a=Me.Pop;let E=c(),g=E==null?null:E-s;s=E,u&&u({action:a,location:S.location,delta:g})}function d(E,g){a=Me.Push;let h=ni(S.location,E,g);n&&n(h,E),s=c()+1;let w=Wf(h,s),m=S.createHref(h);try{l.pushState(w,"",m)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(m)}o&&u&&u({action:a,location:S.location,delta:1})}function v(E,g){a=Me.Replace;let h=ni(S.location,E,g);n&&n(h,E),s=c();let w=Wf(h,s),m=S.createHref(h);l.replaceState(w,"",m),o&&u&&u({action:a,location:S.location,delta:0})}function y(E){let g=i.location.origin!=="null"?i.location.origin:i.location.href,h=typeof E=="string"?E:lr(E);return J(g,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,g)}let S={get action(){return a},get location(){return e(i,l)},listen(E){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(Vf,f),u=E,()=>{i.removeEventListener(Vf,f),u=null}},createHref(E){return t(i,E)},createURL:y,encodeLocation(E){let g=y(E);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:v,go(E){return l.go(E)}};return S}var Oe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Oe||(Oe={}));const w0=new Set(["lazy","caseSensitive","path","id","index","children"]);function S0(e){return e.index===!0}function qu(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let l=[...n,o],a=typeof i.id=="string"?i.id:l.join("-");if(J(i.index!==!0||!i.children,"Cannot specify children on an index route"),J(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),S0(i)){let u=ve({},i,t(i),{id:a});return r[a]=u,u}else{let u=ve({},i,t(i),{id:a,children:void 0});return r[a]=u,i.children&&(u.children=qu(i.children,t,l,r)),u}})}function zr(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?sn(t):t,i=ro(r.pathname||"/",n);if(i==null)return null;let o=Qp(e);_0(o);let l=null;for(let a=0;l==null&&a{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};u.relativePath.startsWith("/")&&(J(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 s=nn([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(J(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Qp(o.children,t,c,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:x0(s,o.index),routesMeta:c})};return e.forEach((o,l)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,l);else for(let u of Kp(o.path))i(o,l,u)}),t}function Kp(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=Kp(r.join("/")),a=[];return a.push(...l.map(u=>u===""?o:[o,u].join("/"))),i&&a.push(...l),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function _0(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:L0(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const E0=/^:\w+$/,C0=3,k0=2,P0=1,R0=10,M0=-2,Qf=e=>e==="*";function x0(e,t){let n=e.split("/"),r=n.length;return n.some(Qf)&&(r+=M0),t&&(r+=k0),n.filter(i=>!Qf(i)).reduce((i,o)=>i+(E0.test(o)?C0:o===""?P0:R0),r)}function L0(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 T0(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let l=0;l{if(c==="*"){let d=a[f]||"";l=o.slice(0,o.length-d.length).replace(/(.)\/+$/,"$1")}return s[c]=z0(a[f]||"",c),s},{}),pathname:o,pathnameBase:l,pattern:e}}function D0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Jr(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,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function N0(e){try{return decodeURI(e)}catch(t){return Jr(!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 z0(e,t){try{return decodeURIComponent(e)}catch(n){return Jr(!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 ro(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 A0(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?sn(e):e;return{pathname:n?n.startsWith("/")?n:I0(n,t):t,search:j0(r),hash:$0(i)}}function I0(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 nu(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 wa(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function lc(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=sn(e):(i=ve({},e),J(!i.pathname||!i.pathname.includes("?"),nu("?","pathname","search",i)),J(!i.pathname||!i.pathname.includes("#"),nu("#","pathname","hash",i)),J(!i.search||!i.search.includes("#"),nu("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,a;if(r||l==null)a=n;else{let f=t.length-1;if(l.startsWith("..")){let d=l.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?t[f]:"/"}let u=A0(i,a),s=l&&l!=="/"&&l.endsWith("/"),c=(o||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||c)&&(u.pathname+="/"),u}const nn=e=>e.join("/").replace(/\/\/+/g,"/"),F0=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),j0=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$0=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ac{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 Gp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Yp=["post","put","patch","delete"],U0=new Set(Yp),B0=["get",...Yp],b0=new Set(B0),H0=new Set([301,302,303,307,308]),V0=new Set([307,308]),ru={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},W0={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Qi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Q0=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function K0(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;J(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 C=e.detectErrorBoundary;i=k=>({hasErrorBoundary:C(k)})}else i=Q0;let o={},l=qu(e.routes,i,void 0,o),a,u=e.basename||"/",s=ve({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,f=new Set,d=null,v=null,y=null,S=e.hydrationData!=null,E=zr(l,e.history.location,u),g=null;if(E==null){let C=Ct(404,{pathname:e.history.location.pathname}),{matches:k,route:L}=ed(l);E=k,g={[L.id]:C}}let h=!E.some(C=>C.route.lazy)&&(!E.some(C=>C.route.loader)||e.hydrationData!=null),w,m={historyAction:e.history.action,location:e.history.location,matches:E,initialized:h,navigation:ru,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||g,fetchers:new Map,blockers:new Map},P=Me.Pop,R=!1,M,T=!1,A=!1,I=[],U=[],N=new Map,ne=0,ue=-1,ct=new Map,Je=new Set,rt=new Map,z=new Map,b=new Map,Q=!1;function de(){return c=e.history.listen(C=>{let{action:k,location:L,delta:F}=C;if(Q){Q=!1;return}Jr(b.size===0||F!=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 Y=$n({currentLocation:m.location,nextLocation:L,historyAction:k});if(Y&&F!=null){Q=!0,e.history.go(F*-1),pr(Y,{state:"blocked",location:L,proceed(){pr(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),e.history.go(F)},reset(){let H=new Map(m.blockers);H.set(Y,Qi),se({blockers:H})}});return}return ze(k,L)}),m.initialized||ze(Me.Pop,m.location),w}function Ee(){c&&c(),f.clear(),M&&M.abort(),m.fetchers.forEach((C,k)=>uo(k)),m.blockers.forEach((C,k)=>wi(k))}function fn(C){return f.add(C),()=>f.delete(C)}function se(C){m=ve({},m,C),f.forEach(k=>k(m))}function ee(C,k){var L,F;let Y=m.actionData!=null&&m.navigation.formMethod!=null&&Ft(m.navigation.formMethod)&&m.navigation.state==="loading"&&((L=C.state)==null?void 0:L._isRedirect)!==!0,H;k.actionData?Object.keys(k.actionData).length>0?H=k.actionData:H=null:Y?H=m.actionData:H=null;let K=k.loaderData?qf(m.loaderData,k.loaderData,k.matches||[],k.errors):m.loaderData,G=new Map;b.clear();let B=R===!0||m.navigation.formMethod!=null&&Ft(m.navigation.formMethod)&&((F=C.state)==null?void 0:F._isRedirect)!==!0;a&&(l=a,a=void 0),T||P===Me.Pop||(P===Me.Push?e.history.push(C,C.state):P===Me.Replace&&e.history.replace(C,C.state)),se(ve({},k,{actionData:H,loaderData:K,historyAction:P,location:C,initialized:!0,navigation:ru,revalidation:"idle",restoreScrollPosition:so(C,k.matches||m.matches),preventScrollReset:B,blockers:G})),P=Me.Pop,R=!1,T=!1,A=!1,I=[],U=[]}async function ft(C,k){if(typeof C=="number"){e.history.go(C);return}let L=es(m.location,m.matches,u,s.v7_prependBasename,C,k==null?void 0:k.fromRouteId,k==null?void 0:k.relative),{path:F,submission:Y,error:H}=Kf(s.v7_normalizeFormMethod,!1,L,k),K=m.location,G=ni(m.location,F,k&&k.state);G=ve({},G,e.history.encodeLocation(G));let B=k&&k.replace!=null?k.replace:void 0,oe=Me.Push;B===!0?oe=Me.Replace:B===!1||Y!=null&&Ft(Y.formMethod)&&Y.formAction===m.location.pathname+m.location.search&&(oe=Me.Replace);let Z=k&&"preventScrollReset"in k?k.preventScrollReset===!0:void 0,Ue=$n({currentLocation:K,nextLocation:G,historyAction:oe});if(Ue){pr(Ue,{state:"blocked",location:G,proceed(){pr(Ue,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),ft(C,k)},reset(){let Ce=new Map(m.blockers);Ce.set(Ue,Qi),se({blockers:Ce})}});return}return await ze(oe,G,{submission:Y,pendingError:H,preventScrollReset:Z,replace:k&&k.replace})}function dn(){if(ao(),se({revalidation:"loading"}),m.navigation.state!=="submitting"){if(m.navigation.state==="idle"){ze(m.historyAction,m.location,{startUninterruptedRevalidation:!0});return}ze(P||m.historyAction,m.navigation.location,{overrideNavigation:m.navigation})}}async function ze(C,k,L){M&&M.abort(),M=null,P=C,T=(L&&L.startUninterruptedRevalidation)===!0,_i(m.location,m.matches),R=(L&&L.preventScrollReset)===!0;let F=a||l,Y=L&&L.overrideNavigation,H=zr(F,k,u);if(!H){let Ce=Ct(404,{pathname:k.pathname}),{matches:Ae,route:We}=ed(F);Un(),ee(k,{matches:Ae,loaderData:{},errors:{[We.id]:Ce}});return}if(m.initialized&&!A&&Z0(m.location,k)&&!(L&&L.submission&&Ft(L.submission.formMethod))){ee(k,{matches:H});return}M=new AbortController;let K=Co(e.history,k,M.signal,L&&L.submission),G,B;if(L&&L.pendingError)B={[Ar(H).route.id]:L.pendingError};else if(L&&L.submission&&Ft(L.submission.formMethod)){let Ce=await fi(K,k,L.submission,H,{replace:L.replace});if(Ce.shortCircuited)return;G=Ce.pendingActionData,B=Ce.pendingActionError,Y=Ki(k,L.submission),K=new Request(K.url,{signal:K.signal})}let{shortCircuited:oe,loaderData:Z,errors:Ue}=await di(K,k,H,Y,L&&L.submission,L&&L.fetcherSubmission,L&&L.replace,G,B);oe||(M=null,ee(k,ve({matches:H},G?{actionData:G}:{},{loaderData:Z,errors:Ue})))}async function fi(C,k,L,F,Y){Y===void 0&&(Y={}),ao();let H=r1(k,L);se({navigation:H});let K,G=ns(F,k);if(!G.route.action&&!G.route.lazy)K={type:Oe.error,error:Ct(405,{method:C.method,pathname:k.pathname,routeId:G.route.id})};else if(K=await Eo("action",C,G,F,o,i,u),C.signal.aborted)return{shortCircuited:!0};if(br(K)){let B;return Y&&Y.replace!=null?B=Y.replace:B=K.location===m.location.pathname+m.location.search,await jn(m,K,{submission:L,replace:B}),{shortCircuited:!0}}if(jo(K)){let B=Ar(F,G.route.id);return(Y&&Y.replace)!==!0&&(P=Me.Push),{pendingActionData:{},pendingActionError:{[B.route.id]:K.error}}}if(Zn(K))throw Ct(400,{type:"defer-action"});return{pendingActionData:{[G.route.id]:K.data}}}async function di(C,k,L,F,Y,H,K,G,B){let oe=F||Ki(k,Y),Z=Y||H||rd(oe),Ue=a||l,[Ce,Ae]=Gf(e.history,m,L,Z,k,A,I,U,rt,Je,Ue,u,G,B);if(Un(ce=>!(L&&L.some(ot=>ot.route.id===ce))||Ce&&Ce.some(ot=>ot.route.id===ce)),Ce.length===0&&Ae.length===0){let ce=mi();return ee(k,ve({matches:L,loaderData:{},errors:B||null},G?{actionData:G}:{},ce?{fetchers:new Map(m.fetchers)}:{})),{shortCircuited:!0}}if(!T){Ae.forEach(ot=>{let hn=m.fetchers.get(ot.key),Te=ko(void 0,hn?hn.data:void 0);m.fetchers.set(ot.key,Te)});let ce=G||m.actionData;se(ve({navigation:oe},ce?Object.keys(ce).length===0?{actionData:null}:{actionData:ce}:{},Ae.length>0?{fetchers:new Map(m.fetchers)}:{}))}ue=++ne,Ae.forEach(ce=>{N.has(ce.key)&&Ht(ce.key),ce.controller&&N.set(ce.key,ce.controller)});let We=()=>Ae.forEach(ce=>Ht(ce.key));M&&M.signal.addEventListener("abort",We);let{results:Bn,loaderResults:co,fetcherResults:gr}=await gi(m.matches,L,Ce,Ae,C);if(C.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",We),Ae.forEach(ce=>N.delete(ce.key));let Ot=td(Bn);if(Ot)return await jn(m,Ot,{replace:K}),{shortCircuited:!0};let{loaderData:vr,errors:mr}=Zf(m,L,Ce,co,B,Ae,gr,z);z.forEach((ce,ot)=>{ce.subscribe(hn=>{(hn||ce.done)&&z.delete(ot)})});let bn=mi(),Dt=yi(ue),yr=bn||Dt||Ae.length>0;return ve({loaderData:vr,errors:mr},yr?{fetchers:new Map(m.fetchers)}:{})}function io(C){return m.fetchers.get(C)||W0}function lo(C,k,L,F){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.");N.has(C)&&Ht(C);let Y=a||l,H=es(m.location,m.matches,u,s.v7_prependBasename,L,k,F==null?void 0:F.relative),K=zr(Y,H,u);if(!K){hr(C,k,Ct(404,{pathname:H}));return}let{path:G,submission:B,error:oe}=Kf(s.v7_normalizeFormMethod,!0,H,F);if(oe){hr(C,k,oe);return}let Z=ns(K,G);if(R=(F&&F.preventScrollReset)===!0,B&&Ft(B.formMethod)){hi(C,k,G,Z,K,B);return}rt.set(C,{routeId:k,path:G}),pi(C,k,G,Z,K,B)}async function hi(C,k,L,F,Y,H){if(ao(),rt.delete(C),!F.route.action&&!F.route.lazy){let Te=Ct(405,{method:H.formMethod,pathname:L,routeId:k});hr(C,k,Te);return}let K=m.fetchers.get(C),G=o1(H,K);m.fetchers.set(C,G),se({fetchers:new Map(m.fetchers)});let B=new AbortController,oe=Co(e.history,L,B.signal,H);N.set(C,B);let Z=await Eo("action",oe,F,Y,o,i,u);if(oe.signal.aborted){N.get(C)===B&&N.delete(C);return}if(br(Z)){N.delete(C),Je.add(C);let Te=ko(H);return m.fetchers.set(C,Te),se({fetchers:new Map(m.fetchers)}),jn(m,Z,{submission:H,isFetchActionRedirect:!0})}if(jo(Z)){hr(C,k,Z.error);return}if(Zn(Z))throw Ct(400,{type:"defer-action"});let Ue=m.navigation.location||m.location,Ce=Co(e.history,Ue,B.signal),Ae=a||l,We=m.navigation.state!=="idle"?zr(Ae,m.navigation.location,u):m.matches;J(We,"Didn't find any matches after fetcher action");let Bn=++ne;ct.set(C,Bn);let co=ko(H,Z.data);m.fetchers.set(C,co);let[gr,Ot]=Gf(e.history,m,We,H,Ue,A,I,U,rt,Je,Ae,u,{[F.route.id]:Z.data},void 0);Ot.filter(Te=>Te.key!==C).forEach(Te=>{let Ze=Te.key,Ei=m.fetchers.get(Ze),Ma=ko(void 0,Ei?Ei.data:void 0);m.fetchers.set(Ze,Ma),N.has(Ze)&&Ht(Ze),Te.controller&&N.set(Ze,Te.controller)}),se({fetchers:new Map(m.fetchers)});let vr=()=>Ot.forEach(Te=>Ht(Te.key));B.signal.addEventListener("abort",vr);let{results:mr,loaderResults:bn,fetcherResults:Dt}=await gi(m.matches,We,gr,Ot,Ce);if(B.signal.aborted)return;B.signal.removeEventListener("abort",vr),ct.delete(C),N.delete(C),Ot.forEach(Te=>N.delete(Te.key));let yr=td(mr);if(yr)return jn(m,yr);let{loaderData:ce,errors:ot}=Zf(m,m.matches,gr,bn,void 0,Ot,Dt,z);if(m.fetchers.has(C)){let Te=al(Z.data);m.fetchers.set(C,Te)}let hn=yi(Bn);m.navigation.state==="loading"&&Bn>ue?(J(P,"Expected pending action"),M&&M.abort(),ee(m.navigation.location,{matches:We,loaderData:ce,errors:ot,fetchers:new Map(m.fetchers)})):(se(ve({errors:ot,loaderData:qf(m.loaderData,ce,We,ot)},hn||Ot.length>0?{fetchers:new Map(m.fetchers)}:{})),A=!1)}async function pi(C,k,L,F,Y,H){let K=m.fetchers.get(C),G=ko(H,K?K.data:void 0);m.fetchers.set(C,G),se({fetchers:new Map(m.fetchers)});let B=new AbortController,oe=Co(e.history,L,B.signal);N.set(C,B);let Z=await Eo("loader",oe,F,Y,o,i,u);if(Zn(Z)&&(Z=await qp(Z,oe.signal,!0)||Z),N.get(C)===B&&N.delete(C),oe.signal.aborted)return;if(br(Z)){Je.add(C),await jn(m,Z);return}if(jo(Z)){let Ce=Ar(m.matches,k);m.fetchers.delete(C),se({fetchers:new Map(m.fetchers),errors:{[Ce.route.id]:Z.error}});return}J(!Zn(Z),"Unhandled fetcher deferred data");let Ue=al(Z.data);m.fetchers.set(C,Ue),se({fetchers:new Map(m.fetchers)})}async function jn(C,k,L){let{submission:F,replace:Y,isFetchActionRedirect:H}=L===void 0?{}:L;k.revalidate&&(A=!0);let K=ni(C.location,k.location,ve({_isRedirect:!0},H?{_isFetchActionRedirect:!0}:{}));if(J(K,"Expected a location on the redirect navigation"),Xp.test(k.location)&&n){let oe=e.history.createURL(k.location),Z=ro(oe.pathname,u)==null;if(t.location.origin!==oe.origin||Z){Y?t.location.replace(k.location):t.location.assign(k.location);return}}M=null;let G=Y===!0?Me.Replace:Me.Push,B=F||rd(C.navigation);if(V0.has(k.status)&&B&&Ft(B.formMethod))await ze(G,K,{submission:ve({},B,{formAction:k.location}),preventScrollReset:R});else if(H)await ze(G,K,{overrideNavigation:Ki(K),fetcherSubmission:B,preventScrollReset:R});else{let oe=Ki(K,B);await ze(G,K,{overrideNavigation:oe,preventScrollReset:R})}}async function gi(C,k,L,F,Y){let H=await Promise.all([...L.map(B=>Eo("loader",Y,B,k,o,i,u)),...F.map(B=>B.matches&&B.match&&B.controller?Eo("loader",Co(e.history,B.path,B.controller.signal),B.match,B.matches,o,i,u):{type:Oe.error,error:Ct(404,{pathname:B.path})})]),K=H.slice(0,L.length),G=H.slice(L.length);return await Promise.all([nd(C,L,K,K.map(()=>Y.signal),!1,m.loaderData),nd(C,F.map(B=>B.match),G,F.map(B=>B.controller?B.controller.signal:null),!0)]),{results:H,loaderResults:K,fetcherResults:G}}function ao(){A=!0,I.push(...Un()),rt.forEach((C,k)=>{N.has(k)&&(U.push(k),Ht(k))})}function hr(C,k,L){let F=Ar(m.matches,k);uo(C),se({errors:{[F.route.id]:L},fetchers:new Map(m.fetchers)})}function uo(C){let k=m.fetchers.get(C);N.has(C)&&!(k&&k.state==="loading"&&ct.has(C))&&Ht(C),rt.delete(C),ct.delete(C),Je.delete(C),m.fetchers.delete(C)}function Ht(C){let k=N.get(C);J(k,"Expected fetch controller: "+C),k.abort(),N.delete(C)}function vi(C){for(let k of C){let L=io(k),F=al(L.data);m.fetchers.set(k,F)}}function mi(){let C=[],k=!1;for(let L of Je){let F=m.fetchers.get(L);J(F,"Expected fetcher: "+L),F.state==="loading"&&(Je.delete(L),C.push(L),k=!0)}return vi(C),k}function yi(C){let k=[];for(let[L,F]of ct)if(F0}function Pa(C,k){let L=m.blockers.get(C)||Qi;return b.get(C)!==k&&b.set(C,k),L}function wi(C){m.blockers.delete(C),b.delete(C)}function pr(C,k){let L=m.blockers.get(C)||Qi;J(L.state==="unblocked"&&k.state==="blocked"||L.state==="blocked"&&k.state==="blocked"||L.state==="blocked"&&k.state==="proceeding"||L.state==="blocked"&&k.state==="unblocked"||L.state==="proceeding"&&k.state==="unblocked","Invalid blocker state transition: "+L.state+" -> "+k.state);let F=new Map(m.blockers);F.set(C,k),se({blockers:F})}function $n(C){let{currentLocation:k,nextLocation:L,historyAction:F}=C;if(b.size===0)return;b.size>1&&Jr(!1,"A router only supports one blocker at a time");let Y=Array.from(b.entries()),[H,K]=Y[Y.length-1],G=m.blockers.get(H);if(!(G&&G.state==="proceeding")&&K({currentLocation:k,nextLocation:L,historyAction:F}))return H}function Un(C){let k=[];return z.forEach((L,F)=>{(!C||C(F))&&(L.cancel(),k.push(F),z.delete(F))}),k}function Si(C,k,L){if(d=C,y=k,v=L||null,!S&&m.navigation===ru){S=!0;let F=so(m.location,m.matches);F!=null&&se({restoreScrollPosition:F})}return()=>{d=null,y=null,v=null}}function dt(C,k){return v&&v(C,k.map(F=>n1(F,m.loaderData)))||C.key}function _i(C,k){if(d&&y){let L=dt(C,k);d[L]=y()}}function so(C,k){if(d){let L=dt(C,k),F=d[L];if(typeof F=="number")return F}return null}function Ra(C){o={},a=qu(C,i,void 0,o)}return w={get basename(){return u},get state(){return m},get routes(){return l},initialize:de,subscribe:fn,enableScrollRestoration:Si,navigate:ft,fetch:lo,revalidate:dn,createHref:C=>e.history.createHref(C),encodeLocation:C=>e.history.encodeLocation(C),getFetcher:io,deleteFetcher:uo,dispose:Ee,getBlocker:Pa,deleteBlocker:wi,_internalFetchControllers:N,_internalActiveDeferreds:z,_internalSetRoutes:Ra},w}function G0(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function es(e,t,n,r,i,o,l){let a,u;if(o!=null&&l!=="path"){a=[];for(let c of t)if(a.push(c),c.route.id===o){u=c;break}}else a=t,u=t[t.length-1];let s=lc(i||".",wa(a).map(c=>c.pathnameBase),ro(e.pathname,n)||e.pathname,l==="path");return i==null&&(s.search=e.search,s.hash=e.hash),(i==null||i===""||i===".")&&u&&u.route.index&&!uc(s.search)&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(s.pathname=s.pathname==="/"?n:nn([n,s.pathname])),lr(s)}function Kf(e,t,n,r){if(!r||!G0(r))return{path:n};if(r.formMethod&&!t1(r.formMethod))return{path:n,error:Ct(405,{method:r.formMethod})};let i=()=>({path:n,error:Ct(400,{type:"invalid-body"})}),o=r.formMethod||"get",l=e?o.toUpperCase():o.toLowerCase(),a=Zp(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ft(l))return i();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((v,y)=>{let[S,E]=y;return""+v+S+"="+E+` `},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!Ft(l))return i();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:a,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}J(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=ts(r.formData),s=r.formData;else if(r.body instanceof FormData)u=ts(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=Jf(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=Jf(u)}catch{return i()}let c={formMethod:l,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(Ft(c.formMethod))return{path:n,submission:c};let f=sn(n);return t&&f.search&&uc(f.search)&&u.append("index",""),f.search="?"+u,{path:lr(f),submission:c}}function Y0(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 Gf(e,t,n,r,i,o,l,a,u,s,c,f,d,v){let y=v?Object.values(v)[0]:d?Object.values(d)[0]:void 0,S=e.createURL(t.location),E=e.createURL(i),g=v?Object.keys(v)[0]:void 0,w=Y0(n,g).filter((P,R)=>{if(P.route.lazy)return!0;if(P.route.loader==null)return!1;if(X0(t.loaderData,t.matches[R],P)||l.some(A=>A===P.route.id))return!0;let M=t.matches[R],T=P;return Yf(P,ve({currentUrl:S,currentParams:M.params,nextUrl:E,nextParams:T.params},r,{actionResult:y,defaultShouldRevalidate:o||S.pathname+S.search===E.pathname+E.search||S.search!==E.search||Jp(M,T)}))}),m=[];return u.forEach((P,R)=>{if(!n.some(N=>N.route.id===P.routeId))return;let M=zr(c,P.path,f);if(!M){m.push({key:R,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let T=t.fetchers.get(R),A=T&&T.state!=="idle"&&T.data===void 0&&!s.has(R),I=ns(M,P.path);(a.includes(R)||A||Yf(I,ve({currentUrl:S,currentParams:t.matches[t.matches.length-1].params,nextUrl:E,nextParams:n[n.length-1].params},r,{actionResult:y,defaultShouldRevalidate:o})))&&m.push({key:R,routeId:P.routeId,path:P.path,matches:M,match:I,controller:new AbortController})}),[w,m]}function X0(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function Jp(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Yf(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Xf(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];J(i,"No route found in manifest");let o={};for(let l in r){let u=i[l]!==void 0&&l!=="hasErrorBoundary";Jr(!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&&!w0.has(l)&&(o[l]=r[l])}Object.assign(i,o),Object.assign(i,ve({},t(i),{lazy:void 0}))}async function Eo(e,t,n,r,i,o,l,a){a===void 0&&(a={});let u,s,c,f=y=>{let S,E=new Promise((g,h)=>S=h);return c=()=>S(),t.signal.addEventListener("abort",c),Promise.race([y({request:t,params:n.params,context:a.requestContext}),E])};try{let y=n.route[e];if(n.route.lazy)if(y)s=(await Promise.all([f(y),Xf(n.route,o,i)]))[0];else if(await Xf(n.route,o,i),y=n.route[e],y)s=await f(y);else if(e==="action"){let S=new URL(t.url),E=S.pathname+S.search;throw Ct(405,{method:t.method,pathname:E,routeId:n.route.id})}else return{type:Oe.data,data:void 0};else if(y)s=await f(y);else{let S=new URL(t.url),E=S.pathname+S.search;throw Ct(404,{pathname:E})}J(s!==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(y){u=Oe.error,s=y}finally{c&&t.signal.removeEventListener("abort",c)}if(e1(s)){let y=s.status;if(H0.has(y)){let g=s.headers.get("Location");if(J(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xp.test(g))g=es(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,g);else if(!a.isStaticRequest){let h=new URL(t.url),w=g.startsWith("//")?new URL(h.protocol+g):new URL(g),m=ro(w.pathname,l)!=null;w.origin===h.origin&&m&&(g=w.pathname+w.search+w.hash)}if(a.isStaticRequest)throw s.headers.set("Location",g),s;return{type:Oe.redirect,status:y,location:g,revalidate:s.headers.get("X-Remix-Revalidate")!==null}}if(a.isRouteRequest)throw{type:u||Oe.data,response:s};let S,E=s.headers.get("Content-Type");return E&&/\bapplication\/json\b/.test(E)?S=await s.json():S=await s.text(),u===Oe.error?{type:u,error:new ac(y,s.statusText,S),headers:s.headers}:{type:Oe.data,data:S,statusCode:s.status,headers:s.headers}}if(u===Oe.error)return{type:u,error:s};if(q0(s)){var d,v;return{type:Oe.deferred,deferredData:s,statusCode:(d=s.init)==null?void 0:d.status,headers:((v=s.init)==null?void 0:v.headers)&&new Headers(s.init.headers)}}return{type:Oe.data,data:s}}function Co(e,t,n,r){let i=e.createURL(Zp(t)).toString(),o={signal:n};if(r&&Ft(r.formMethod)){let{formMethod:l,formEncType:a}=r;o.method=l.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=ts(r.formData):o.body=r.formData}return new Request(i,o)}function ts(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Jf(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function J0(e,t,n,r,i){let o={},l=null,a,u=!1,s={};return n.forEach((c,f)=>{let d=t[f].route.id;if(J(!br(c),"Cannot handle redirect results in processLoaderData"),jo(c)){let v=Ar(e,d),y=c.error;r&&(y=Object.values(r)[0],r=void 0),l=l||{},l[v.route.id]==null&&(l[v.route.id]=y),o[d]=void 0,u||(u=!0,a=Gp(c.error)?c.error.status:500),c.headers&&(s[d]=c.headers)}else Zn(c)?(i.set(d,c.deferredData),o[d]=c.deferredData.data):o[d]=c.data,c.statusCode!=null&&c.statusCode!==200&&!u&&(a=c.statusCode),c.headers&&(s[d]=c.headers)}),r&&(l=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:l,statusCode:a||200,loaderHeaders:s}}function Zf(e,t,n,r,i,o,l,a){let{loaderData:u,errors:s}=J0(t,n,r,i,a);for(let c=0;cr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function ed(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 Ct(e,t){let{pathname:n,routeId:r,method:i,type:o}=t===void 0?{}:t,l="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(l="Bad Request",i&&n&&r?a="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"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(l="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",a='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",i&&n&&r?a="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&&(a='Invalid request method "'+i.toUpperCase()+'"')),new ac(e||500,l,new Error(a),!0)}function td(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(br(n))return n}}function Zp(e){let t=typeof e=="string"?sn(e):e;return lr(ve({},t,{hash:""}))}function Z0(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Zn(e){return e.type===Oe.deferred}function jo(e){return e.type===Oe.error}function br(e){return(e&&e.type)===Oe.redirect}function q0(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 e1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function t1(e){return b0.has(e.toLowerCase())}function Ft(e){return U0.has(e.toLowerCase())}async function nd(e,t,n,r,i,o){for(let l=0;lf.route.id===u.route.id),c=s!=null&&!Jp(s,u)&&(o&&o[u.route.id])!==void 0;if(Zn(a)&&(i||c)){let f=r[l];J(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await qp(a,f,i).then(d=>{d&&(n[l]=d||n[l])})}}}async function qp(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Oe.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Oe.error,error:i}}return{type:Oe.data,data:e.deferredData.data}}}function uc(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function n1(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function ns(e,t){let n=typeof t=="string"?sn(t).search:t.search;if(e[e.length-1].route.index&&uc(n||""))return e[e.length-1];let r=wa(e);return r[r.length-1]}function rd(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 Ki(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 r1(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 ko(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," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function o1(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," _hasFetcherDoneAnything ":!0}}function al(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}/** * React Router v6.14.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 Nl(){return Nl=Object.assign?Object.assign.bind():function(e){for(var t=1;tu.pathnameBase)),l=O.useRef(!1);return tg(()=>{l.current=!0}),O.useCallback(function(u,s){if(s===void 0&&(s={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let c=lc(u,JSON.parse(o),i,s.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:nn([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,o,i,e])}const u1=O.createContext(null);function s1(e){let t=O.useContext(cn).outlet;return t&&O.createElement(u1.Provider,{value:e},t)}function aS(){let{matches:e}=O.useContext(cn),t=e[e.length-1];return t?t.params:{}}function cc(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=O.useContext(cn),{pathname:i}=ci(),o=JSON.stringify(wa(r).map(l=>l.pathnameBase));return O.useMemo(()=>lc(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function uS(e,t){return ng(e,t)}function ng(e,t,n){si()||J(!1);let{navigator:r}=O.useContext(fr),{matches:i}=O.useContext(cn),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let u=ci(),s;if(t){var c;let S=typeof t=="string"?sn(t):t;a==="/"||(c=S.pathname)!=null&&c.startsWith(a)||J(!1),s=S}else s=u;let f=s.pathname||"/",d=a==="/"?f:f.slice(a.length)||"/",v=zr(e,{pathname:d}),y=p1(v&&v.map(S=>Object.assign({},S,{params:Object.assign({},l,S.params),pathname:nn([a,r.encodeLocation?r.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?a:nn([a,r.encodeLocation?r.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),i,n);return t&&y?O.createElement(_a.Provider,{value:{location:Nl({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:Me.Pop}},y):y}function c1(){let e=m1(),t=Gp(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 O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),n?O.createElement("pre",{style:i},n):null,o)}const f1=O.createElement(c1,null);class d1 extends O.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?O.createElement(cn.Provider,{value:this.props.routeContext},O.createElement(eg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function h1(e){let{routeContext:t,match:n,children:r}=e,i=O.useContext(Sa);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),O.createElement(cn.Provider,{value:t},r)}function p1(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 a=o.findIndex(u=>u.route.id&&(l==null?void 0:l[u.route.id]));a>=0||J(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((a,u,s)=>{let c=u.route.id?l==null?void 0:l[u.route.id]:null,f=null;n&&(f=u.route.errorElement||f1);let d=t.concat(o.slice(0,s+1)),v=()=>{let y;return c?y=f:u.route.Component?y=O.createElement(u.route.Component,null):u.route.element?y=u.route.element:y=a,O.createElement(h1,{match:u,routeContext:{outlet:a,matches:d,isDataRoute:n!=null},children:y})};return n&&(u.route.ErrorBoundary||u.route.errorElement||s===0)?O.createElement(d1,{location:n.location,revalidation:n.revalidation,component:f,error:c,children:v(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):v()},null)}var rs;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(rs||(rs={}));var ar;(function(e){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"})(ar||(ar={}));function g1(e){let t=O.useContext(Sa);return t||J(!1),t}function fc(e){let t=O.useContext(sc);return t||J(!1),t}function v1(e){let t=O.useContext(cn);return t||J(!1),t}function rg(e){let t=v1(),n=t.matches[t.matches.length-1];return n.route.id||J(!1),n.route.id}function sS(){let{matches:e,loaderData:t}=fc(ar.UseMatches);return O.useMemo(()=>e.map(n=>{let{pathname:r,params:i}=n;return{id:n.route.id,pathname:r,params:i,data:t[n.route.id],handle:n.route.handle}}),[e,t])}function cS(e){return fc(ar.UseRouteLoaderData).loaderData[e]}function m1(){var e;let t=O.useContext(eg),n=fc(ar.UseRouteError),r=rg(ar.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function y1(){let{router:e}=g1(rs.UseNavigateStable),t=rg(ar.UseNavigateStable),n=O.useRef(!1);return tg(()=>{n.current=!0}),O.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Nl({fromRouteId:t},o)))},[e,t])}const w1="startTransition",od=vv[w1];function fS(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=O.useState(n.state),{v7_startTransition:l}=r||{},a=O.useCallback(f=>{l&&od?od(()=>o(f)):o(f)},[o,l]);O.useLayoutEffect(()=>n.subscribe(a),[n,a]);let u=O.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:f=>n.navigate(f),push:(f,d,v)=>n.navigate(f,{state:d,preventScrollReset:v==null?void 0:v.preventScrollReset}),replace:(f,d,v)=>n.navigate(f,{replace:!0,state:d,preventScrollReset:v==null?void 0:v.preventScrollReset})}),[n]),s=n.basename||"/",c=O.useMemo(()=>({router:n,navigator:u,static:!1,basename:s}),[n,u,s]);return O.createElement(O.Fragment,null,O.createElement(Sa.Provider,{value:c},O.createElement(sc.Provider,{value:i},O.createElement(E1,{basename:s,location:i.location,navigationType:i.historyAction,navigator:u},i.initialized?O.createElement(S1,{routes:n.routes,state:i}):t))),null)}function S1(e){let{routes:t,state:n}=e;return ng(t,void 0,n)}function dS(e){return s1(e.context)}function _1(e){J(!1)}function E1(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Me.Pop,navigator:o,static:l=!1}=e;si()&&J(!1);let a=t.replace(/^\/*/,"/"),u=O.useMemo(()=>({basename:a,navigator:o,static:l}),[a,o,l]);typeof r=="string"&&(r=sn(r));let{pathname:s="/",search:c="",hash:f="",state:d=null,key:v="default"}=r,y=O.useMemo(()=>{let S=ro(s,a);return S==null?null:{location:{pathname:S,search:c,hash:f,state:d,key:v},navigationType:i}},[a,s,c,f,d,v,i]);return y==null?null:O.createElement(fr.Provider,{value:u},O.createElement(_a.Provider,{children:n,value:y}))}var id;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(id||(id={}));new Promise(()=>{});function ld(e,t){t===void 0&&(t=[]);let n=[];return O.Children.forEach(e,(r,i)=>{if(!O.isValidElement(r))return;let o=[...t,i];if(r.type===O.Fragment){n.push.apply(n,ld(r.props.children,o));return}r.type!==_1&&J(!1),!r.props.index||!r.props.children||J(!1);let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=ld(r.props.children,o)),n.push(l)}),n}function C1(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:O.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:O.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.14.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 Zr(){return Zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function k1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function P1(e,t){return e.button===0&&(!t||t==="_self")&&!k1(e)}const R1=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],M1=["aria-current","caseSensitive","className","end","style","to","children"];function hS(e,t){return K0({basename:t==null?void 0:t.basename,future:Zr({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:v0({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||x1(),routes:e,mapRouteProperties:C1}).initialize()}function x1(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Zr({},t,{errors:L1(t.errors)})),t}function L1(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new ac(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){let o=new Error(i.message);o.stack="",n[r]=o}else n[r]=i;return n}const T1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",O1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,D1=O.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:l,state:a,target:u,to:s,preventScrollReset:c}=t,f=og(t,R1),{basename:d}=O.useContext(fr),v,y=!1;if(typeof s=="string"&&O1.test(s)&&(v=s,T1))try{let h=new URL(window.location.href),w=s.startsWith("//")?new URL(h.protocol+s):new URL(s),m=ro(w.pathname,d);w.origin===h.origin&&m!=null?s=m+w.search+w.hash:y=!0}catch{}let S=i1(s,{relative:i}),E=N1(s,{replace:l,state:a,target:u,preventScrollReset:c,relative:i});function g(h){r&&r(h),h.defaultPrevented||E(h)}return O.createElement("a",Zr({},f,{href:v||S,onClick:y||o?r:g,ref:n,target:u}))}),pS=O.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:l=!1,style:a,to:u,children:s}=t,c=og(t,M1),f=cc(u,{relative:c.relative}),d=ci(),v=O.useContext(sc),{navigator:y}=O.useContext(fr),S=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,E=d.pathname,g=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(E=E.toLowerCase(),g=g?g.toLowerCase():null,S=S.toLowerCase());let h=E===S||!l&&E.startsWith(S)&&E.charAt(S.length)==="/",w=g!=null&&(g===S||!l&&g.startsWith(S)&&g.charAt(S.length)==="/"),m=h?r:void 0,P;typeof o=="function"?P=o({isActive:h,isPending:w}):P=[o,h?"active":null,w?"pending":null].filter(Boolean).join(" ");let R=typeof a=="function"?a({isActive:h,isPending:w}):a;return O.createElement(D1,Zr({},c,{"aria-current":m,className:P,ref:n,style:R,to:u}),typeof s=="function"?s({isActive:h,isPending:w}):s)});var ad;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(ad||(ad={}));var ud;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ud||(ud={}));function N1(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:l}=t===void 0?{}:t,a=l1(),u=ci(),s=cc(e,{relative:l});return O.useCallback(c=>{if(P1(c,n)){c.preventDefault();let f=r!==void 0?r:lr(u)===lr(s);a(e,{replace:f,state:i,preventScrollReset:o,relative:l})}},[u,a,s,r,i,n,e,o,l])}var qr={},dc={},ig={exports:{}},z1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",A1=z1,I1=A1;function lg(){}function ag(){}ag.resetWarningCache=lg;var F1=function(){function e(r,i,o,l,a,u){if(u!==I1){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ag,resetWarningCache:lg};return n.PropTypes=n,n};ig.exports=F1();var hc=ig.exports,zl={exports:{}};zl.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,l=9007199254740991,a="[object Arguments]",u="[object Array]",s="[object AsyncFunction]",c="[object Boolean]",f="[object Date]",d="[object Error]",v="[object Function]",y="[object GeneratorFunction]",S="[object Map]",E="[object Number]",g="[object Null]",h="[object Object]",w="[object Promise]",m="[object Proxy]",P="[object RegExp]",R="[object Set]",M="[object String]",T="[object Symbol]",A="[object Undefined]",I="[object WeakMap]",U="[object ArrayBuffer]",N="[object DataView]",ne="[object Float32Array]",ue="[object Float64Array]",ct="[object Int8Array]",Je="[object Int16Array]",rt="[object Int32Array]",z="[object Uint8Array]",b="[object Uint8ClampedArray]",Q="[object Uint16Array]",de="[object Uint32Array]",Ee=/[\\^$.*+?()[\]{}|]/g,fn=/^\[object .+?Constructor\]$/,se=/^(?:0|[1-9]\d*)$/,ee={};ee[ne]=ee[ue]=ee[ct]=ee[Je]=ee[rt]=ee[z]=ee[b]=ee[Q]=ee[de]=!0,ee[a]=ee[u]=ee[U]=ee[c]=ee[N]=ee[f]=ee[d]=ee[v]=ee[S]=ee[E]=ee[h]=ee[P]=ee[R]=ee[M]=ee[I]=!1;var ft=typeof Le=="object"&&Le&&Le.Object===Object&&Le,dn=typeof self=="object"&&self&&self.Object===Object&&self,ze=ft||dn||Function("return this")(),fi=t&&!t.nodeType&&t,di=fi&&!0&&e&&!e.nodeType&&e,io=di&&di.exports===fi,lo=io&&ft.process,hi=function(){try{return lo&&lo.binding&&lo.binding("util")}catch{}}(),pi=hi&&hi.isTypedArray;function jn(p,_){for(var x=-1,j=p==null?0:p.length,he=0,X=[];++x-1}function Sg(p,_){var x=this.__data__,j=ki(x,p);return j<0?(++this.size,x.push([p,_])):x[j][1]=_,this}Ze.prototype.clear=Ei,Ze.prototype.delete=Ma,Ze.prototype.get=yg,Ze.prototype.has=wg,Ze.prototype.set=Sg;function Hn(p){var _=-1,x=p==null?0:p.length;for(this.clear();++_Ie))return!1;var ye=X.get(p);if(ye&&X.get(_))return ye==_;var ht=-1,Nt=!0,Qe=x&o?new Ci:void 0;for(X.set(p,_),X.set(_,p);++ht-1&&p%1==0&&p<_}function Vg(p){var _=typeof p;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?p!=="__proto__":p===null}function Wg(p){return!!_i&&_i in p}function Qg(p){var _=p&&p.constructor,x=typeof _=="function"&&_.prototype||$n;return p===x}function Kg(p){return so.call(p)}function Vn(p){if(p!=null){try{return Si.call(p)}catch{}try{return p+""}catch{}}return""}function Cc(p,_){return p===_||p!==p&&_!==_}var Gg=wc(function(){return arguments}())?wc:function(p){return ho(p)&&dt.call(p,"callee")&&!F.call(p,"callee")},Ri=Array.isArray;function Yg(p){return p!=null&&Pc(p.length)&&!kc(p)}var xa=G||qg;function Xg(p,_){return Sc(p,_)}function kc(p){if(!Rc(p))return!1;var _=fo(p);return _==v||_==y||_==s||_==m}function Pc(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=l}function Rc(p){var _=typeof p;return p!=null&&(_=="object"||_=="function")}function ho(p){return p!=null&&typeof p=="object"}var Mc=pi?uo(pi):Fg;function Jg(p){return Yg(p)?Ng(p):jg(p)}function Zg(){return[]}function qg(){return!1}e.exports=Xg})(zl,zl.exports);var ug=zl.exports,$t={};Object.defineProperty($t,"__esModule",{value:!0});$t.getAceInstance=$t.debounce=$t.editorEvents=$t.editorOptions=void 0;var j1=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];$t.editorOptions=j1;var $1=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];$t.editorEvents=$1;var U1=function(){var e;return typeof window>"u"?(Le.window={},e=ul,delete Le.window):window.ace?(e=window.ace,e.acequire=window.ace.require||window.ace.acequire):e=ul,e};$t.getAceInstance=U1;var B1=function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}};$t.debounce=B1;var b1=Le&&Le.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),os=Le&&Le.__assign||function(){return os=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&this.handleMarkers(R);var I=this.editor.$options;_r.editorOptions.forEach(function(U){I.hasOwnProperty(U)?n.editor.setOption(U,n.props[U]):n.props[U]&&console.warn("ReactAce: editor option ".concat(U," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(m)&&m.forEach(function(U){typeof U.exec=="string"?n.editor.commands.bindKey(U.bindKey,U.exec):n.editor.commands.addCommand(U)}),h&&this.editor.setKeyboardHandler("ace/keyboard/"+h),i&&(this.refEditor.className+=" "+i),w&&w(this.editor),this.editor.resize(),u&&this.editor.focus()},t.prototype.componentDidUpdate=function(n){for(var r=n,i=this.props,o=0;o<_r.editorOptions.length;o++){var l=_r.editorOptions[o];i[l]!==r[l]&&this.editor.setOption(l,i[l])}if(i.className!==r.className){var a=this.refEditor.className,u=a.trim().split(" "),s=r.className.trim().split(" ");s.forEach(function(d){var v=u.indexOf(d);u.splice(v,1)}),this.refEditor.className=" "+i.className+" "+u.join(" ")}var c=this.editor&&i.value!=null&&this.editor.getValue()!==i.value;if(c){this.silent=!0;var f=this.editor.session.selection.toJSON();this.editor.setValue(i.value,i.cursorStart),this.editor.session.selection.fromJSON(f),this.silent=!1}i.placeholder!==r.placeholder&&this.updatePlaceholder(),i.mode!==r.mode&&this.editor.getSession().setMode(typeof i.mode=="string"?"ace/mode/".concat(i.mode):i.mode),i.theme!==r.theme&&this.editor.setTheme("ace/theme/"+i.theme),i.keyboardHandler!==r.keyboardHandler&&(i.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+i.keyboardHandler):this.editor.setKeyboardHandler(null)),i.fontSize!==r.fontSize&&this.editor.setFontSize(typeof i.fontSize=="number"?"".concat(i.fontSize,"px"):i.fontSize),i.wrapEnabled!==r.wrapEnabled&&this.editor.getSession().setUseWrapMode(i.wrapEnabled),i.showPrintMargin!==r.showPrintMargin&&this.editor.setShowPrintMargin(i.showPrintMargin),i.showGutter!==r.showGutter&&this.editor.renderer.setShowGutter(i.showGutter),Gi(i.setOptions,r.setOptions)||this.handleOptions(i),(c||!Gi(i.annotations,r.annotations))&&this.editor.getSession().setAnnotations(i.annotations||[]),!Gi(i.markers,r.markers)&&Array.isArray(i.markers)&&this.handleMarkers(i.markers),Gi(i.scrollMargin,r.scrollMargin)||this.handleScrollMargins(i.scrollMargin),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!n.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(n){n===void 0&&(n=[0,0,0,0]),this.editor.renderer.setScrollMargin(n[0],n[1],n[2],n[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(n){if(this.props.onChange&&!this.silent){var r=this.editor.getValue();this.props.onChange(r,n)}},t.prototype.onSelectionChange=function(n){if(this.props.onSelectionChange){var r=this.editor.getSelection();this.props.onSelectionChange(r,n)}},t.prototype.onCursorChange=function(n){if(this.props.onCursorChange){var r=this.editor.getSelection();this.props.onCursorChange(r,n)}},t.prototype.onInput=function(n){this.props.onInput&&this.props.onInput(n),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(n){this.props.onFocus&&this.props.onFocus(n,this.editor)},t.prototype.onBlur=function(n){this.props.onBlur&&this.props.onBlur(n,this.editor)},t.prototype.onCopy=function(n){var r=n.text;this.props.onCopy&&this.props.onCopy(r)},t.prototype.onPaste=function(n){var r=n.text;this.props.onPaste&&this.props.onPaste(r)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(n){for(var r=Object.keys(n.setOptions),i=0;i-1}function Sw(e,t){var n=this.__data__,r=Ca(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}oo.prototype.clear=vw;oo.prototype.delete=mw;oo.prototype.get=yw;oo.prototype.has=ww;oo.prototype.set=Sw;function dr(e){var t=-1,n=e?e.length:0;for(this.clear();++t0&&n.handleMarkers(z,N);for(var ue=0;ue"u"&&(this.Diff_Timeout<=0?u=Number.MAX_VALUE:u=new Date().getTime()+this.Diff_Timeout*1e3);var s=u;if(o==null||l==null)throw new Error("Null input. (diff_main)");if(o==l)return o?[new t.Diff(i,o)]:[];typeof a>"u"&&(a=!0);var c=a,f=this.diff_commonPrefix(o,l),d=o.substring(0,f);o=o.substring(f),l=l.substring(f),f=this.diff_commonSuffix(o,l);var v=o.substring(o.length-f);o=o.substring(0,o.length-f),l=l.substring(0,l.length-f);var y=this.diff_compute_(o,l,c,s);return d&&y.unshift(new t.Diff(i,d)),v&&y.push(new t.Diff(i,v)),this.diff_cleanupMerge(y),y},t.prototype.diff_compute_=function(o,l,a,u){var s;if(!o)return[new t.Diff(r,l)];if(!l)return[new t.Diff(n,o)];var c=o.length>l.length?o:l,f=o.length>l.length?l:o,d=c.indexOf(f);if(d!=-1)return s=[new t.Diff(r,c.substring(0,d)),new t.Diff(i,f),new t.Diff(r,c.substring(d+f.length))],o.length>l.length&&(s[0][0]=s[2][0]=n),s;if(f.length==1)return[new t.Diff(n,o),new t.Diff(r,l)];var v=this.diff_halfMatch_(o,l);if(v){var y=v[0],S=v[1],E=v[2],g=v[3],h=v[4],w=this.diff_main(y,E,a,u),m=this.diff_main(S,g,a,u);return w.concat([new t.Diff(i,h)],m)}return a&&o.length>100&&l.length>100?this.diff_lineMode_(o,l,u):this.diff_bisect_(o,l,u)},t.prototype.diff_lineMode_=function(o,l,a){var u=this.diff_linesToChars_(o,l);o=u.chars1,l=u.chars2;var s=u.lineArray,c=this.diff_main(o,l,!1,a);this.diff_charsToLines_(c,s),this.diff_cleanupSemantic(c),c.push(new t.Diff(i,""));for(var f=0,d=0,v=0,y="",S="";f=1&&v>=1){c.splice(f-d-v,d+v),f=f-d-v;for(var E=this.diff_main(y,S,!1,a),g=E.length-1;g>=0;g--)c.splice(f,0,E[g]);f=f+E.length}v=0,d=0,y="",S="";break}f++}return c.pop(),c},t.prototype.diff_bisect_=function(o,l,a){for(var u=o.length,s=l.length,c=Math.ceil((u+s)/2),f=c,d=2*c,v=new Array(d),y=new Array(d),S=0;Sa);R++){for(var M=-R+h;M<=R-w;M+=2){var T=f+M,A;M==-R||M!=R&&v[T-1]u)w+=2;else if(I>s)h+=2;else if(g){var U=f+E-M;if(U>=0&&U=N)return this.diff_bisectSplit_(o,l,A,I,a)}}}for(var ne=-R+m;ne<=R-P;ne+=2){var U=f+ne,N;ne==-R||ne!=R&&y[U-1]u)P+=2;else if(ue>s)m+=2;else if(!g){var T=f+E-ne;if(T>=0&&T=N)return this.diff_bisectSplit_(o,l,A,I,a)}}}}return[new t.Diff(n,o),new t.Diff(r,l)]},t.prototype.diff_bisectSplit_=function(o,l,a,u,s){var c=o.substring(0,a),f=l.substring(0,u),d=o.substring(a),v=l.substring(u),y=this.diff_main(c,f,!1,s),S=this.diff_main(d,v,!1,s);return y.concat(S)},t.prototype.diff_linesToChars_=function(o,l){var a=[],u={};a[0]="";function s(v){for(var y="",S=0,E=-1,g=a.length;Eu?o=o.substring(a-u):al.length?o:l,u=o.length>l.length?l:o;if(a.length<4||u.length*2=w.length?[A,I,U,N,T]:null}var f=c(a,u,Math.ceil(a.length/4)),d=c(a,u,Math.ceil(a.length/2)),v;if(!f&&!d)return null;d?f?v=f[4].length>d[4].length?f:d:v=d:v=f;var y,S,E,g;o.length>l.length?(y=v[0],S=v[1],E=v[2],g=v[3]):(E=v[0],g=v[1],y=v[2],S=v[3]);var h=v[4];return[y,S,E,g,h]},t.prototype.diff_cleanupSemantic=function(o){for(var l=!1,a=[],u=0,s=null,c=0,f=0,d=0,v=0,y=0;c0?a[u-1]:-1,f=0,d=0,v=0,y=0,s=null,l=!0)),c++;for(l&&this.diff_cleanupMerge(o),this.diff_cleanupSemanticLossless(o),c=1;c=h?(g>=S.length/2||g>=E.length/2)&&(o.splice(c,0,new t.Diff(i,E.substring(0,g))),o[c-1][1]=S.substring(0,S.length-g),o[c+1][1]=E.substring(g),c++):(h>=S.length/2||h>=E.length/2)&&(o.splice(c,0,new t.Diff(i,S.substring(0,h))),o[c-1][0]=r,o[c-1][1]=E.substring(0,E.length-h),o[c+1][0]=n,o[c+1][1]=S.substring(h),c++),c++}c++}},t.prototype.diff_cleanupSemanticLossless=function(o){function l(h,w){if(!h||!w)return 6;var m=h.charAt(h.length-1),P=w.charAt(0),R=m.match(t.nonAlphaNumericRegex_),M=P.match(t.nonAlphaNumericRegex_),T=R&&m.match(t.whitespaceRegex_),A=M&&P.match(t.whitespaceRegex_),I=T&&m.match(t.linebreakRegex_),U=A&&P.match(t.linebreakRegex_),N=I&&h.match(t.blanklineEndRegex_),ne=U&&w.match(t.blanklineStartRegex_);return N||ne?5:I||U?4:R&&!T&&A?3:T||A?2:R||M?1:0}for(var a=1;a=E&&(E=g,v=u,y=s,S=c)}o[a-1][1]!=v&&(v?o[a-1][1]=v:(o.splice(a-1,1),a--),o[a][1]=y,S?o[a+1][1]=S:(o.splice(a+1,1),a--))}a++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(o){for(var l=!1,a=[],u=0,s=null,c=0,f=!1,d=!1,v=!1,y=!1;c0?a[u-1]:-1,v=y=!1),l=!0)),c++;l&&this.diff_cleanupMerge(o)},t.prototype.diff_cleanupMerge=function(o){o.push(new t.Diff(i,""));for(var l=0,a=0,u=0,s="",c="",f;l1?(a!==0&&u!==0&&(f=this.diff_commonPrefix(c,s),f!==0&&(l-a-u>0&&o[l-a-u-1][0]==i?o[l-a-u-1][1]+=c.substring(0,f):(o.splice(0,0,new t.Diff(i,c.substring(0,f))),l++),c=c.substring(f),s=s.substring(f)),f=this.diff_commonSuffix(c,s),f!==0&&(o[l][1]=c.substring(c.length-f)+o[l][1],c=c.substring(0,c.length-f),s=s.substring(0,s.length-f))),l-=a+u,o.splice(l,a+u),s.length&&(o.splice(l,0,new t.Diff(n,s)),l++),c.length&&(o.splice(l,0,new t.Diff(r,c)),l++),l++):l!==0&&o[l-1][0]==i?(o[l-1][1]+=o[l][1],o.splice(l,1)):l++,u=0,a=0,s="",c="";break}o[o.length-1][1]===""&&o.pop();var d=!1;for(l=1;ll));f++)s=a,c=u;return o.length!=f&&o[f][0]===n?c:c+(l-s)},t.prototype.diff_prettyHtml=function(o){for(var l=[],a=/&/g,u=//g,c=/\n/g,f=0;f");switch(d){case r:l[f]=''+y+"";break;case n:l[f]=''+y+"";break;case i:l[f]=""+y+"";break}}return l.join("")},t.prototype.diff_text1=function(o){for(var l=[],a=0;athis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var u=this.match_alphabet_(l),s=this;function c(A,I){var U=A/l.length,N=Math.abs(a-I);return s.Match_Distance?U+N/s.Match_Distance:N?1:U}var f=this.Match_Threshold,d=o.indexOf(l,a);d!=-1&&(f=Math.min(c(0,d),f),d=o.lastIndexOf(l,a+l.length),d!=-1&&(f=Math.min(c(0,d),f)));var v=1<=w;R--){var M=u[o.charAt(R-1)];if(h===0?P[R]=(P[R+1]<<1|1)&M:P[R]=(P[R+1]<<1|1)&M|((g[R+1]|g[R])<<1|1)|g[R+1],P[R]&v){var T=c(h,R-1);if(T<=f)if(f=T,d=R-1,d>a)w=Math.max(1,2*a-d);else break}}if(c(h+1,a)>f)break;g=P}return d},t.prototype.match_alphabet_=function(o){for(var l={},a=0;a"u")u=o,s=this.diff_main(u,l,!0),s.length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(o&&typeof o=="object"&&typeof l>"u"&&typeof a>"u")s=o,u=this.diff_text1(s);else if(typeof o=="string"&&l&&typeof l=="object"&&typeof a>"u")u=o,s=l;else if(typeof o=="string"&&typeof l=="string"&&a&&typeof a=="object")u=o,s=a;else throw new Error("Unknown call format to patch_make.");if(s.length===0)return[];for(var c=[],f=new t.patch_obj,d=0,v=0,y=0,S=u,E=u,g=0;g=2*this.Patch_Margin&&d&&(this.patch_addContext_(f,S),c.push(f),f=new t.patch_obj,d=0,S=E,v=y);break}h!==r&&(v+=w.length),h!==n&&(y+=w.length)}return d&&(this.patch_addContext_(f,S),c.push(f)),c},t.prototype.patch_deepCopy=function(o){for(var l=[],a=0;athis.Match_MaxBits?(v=this.match_main(l,d.substring(0,this.Match_MaxBits),f),v!=-1&&(y=this.match_main(l,d.substring(d.length-this.Match_MaxBits),f+d.length-this.Match_MaxBits),(y==-1||v>=y)&&(v=-1))):v=this.match_main(l,d,f),v==-1)s[c]=!1,u-=o[c].length2-o[c].length1;else{s[c]=!0,u=v-f;var S;if(y==-1?S=l.substring(v,v+d.length):S=l.substring(v,y+this.Match_MaxBits),d==S)l=l.substring(0,v)+this.diff_text2(o[c].diffs)+l.substring(v+d.length);else{var E=this.diff_main(d,S,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(E)/d.length>this.Patch_DeleteThreshold)s[c]=!1;else{this.diff_cleanupSemanticLossless(E);for(var g=0,h,w=0;wc[0][1].length){var f=l-c[0][1].length;c[0][1]=a.substring(c[0][1].length)+c[0][1],s.start1-=f,s.start2-=f,s.length1+=f,s.length2+=f}if(s=o[o.length-1],c=s.diffs,c.length==0||c[c.length-1][0]!=i)c.push(new t.Diff(i,a)),s.length1+=l,s.length2+=l;else if(l>c[c.length-1][1].length){var f=l-c[c.length-1][1].length;c[c.length-1][1]+=a.substring(0,f),s.length1+=f,s.length2+=f}return a},t.prototype.patch_splitMax=function(o){for(var l=this.Match_MaxBits,a=0;a2*l?(d.length1+=S.length,s+=S.length,v=!1,d.diffs.push(new t.Diff(y,S)),u.diffs.shift()):(S=S.substring(0,l-d.length1-this.Patch_Margin),d.length1+=S.length,s+=S.length,y===i?(d.length2+=S.length,c+=S.length):v=!1,d.diffs.push(new t.Diff(y,S)),S==u.diffs[0][1]?u.diffs.shift():u.diffs[0][1]=u.diffs[0][1].substring(S.length))}f=this.diff_text2(d.diffs),f=f.substring(f.length-this.Patch_Margin);var E=this.diff_text1(u.diffs).substring(0,this.Patch_Margin);E!==""&&(d.length1+=E.length,d.length2+=E.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===i?d.diffs[d.diffs.length-1][1]+=E:d.diffs.push(new t.Diff(i,E))),v||o.splice(++a,0,d)}}},t.prototype.patch_toText=function(o){for(var l=[],a=0;a