diff --git a/assets/index-a886f440.js b/assets/index-d402aaca.js similarity index 71% rename from assets/index-a886f440.js rename to assets/index-d402aaca.js index 5cd97e3..55bd8d3 100644 --- a/assets/index-a886f440.js +++ b/assets/index-d402aaca.js @@ -1,4 +1,4 @@ -(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function cl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dc={exports:{}},fl={},Fc={exports:{}},$={};/** +(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=t(i);fetch(i.href,l)}})();function cl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dc={exports:{}},fl={},jc={exports:{}},$={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Yr=Symbol.for("react.element"),eh=Symbol.for("react.portal"),nh=Symbol.for("react.fragment"),th=Symbol.for("react.strict_mode"),rh=Symbol.for("react.profiler"),ih=Symbol.for("react.provider"),lh=Symbol.for("react.context"),oh=Symbol.for("react.forward_ref"),uh=Symbol.for("react.suspense"),sh=Symbol.for("react.memo"),ah=Symbol.for("react.lazy"),Os=Symbol.iterator;function ch(e){return e===null||typeof e!="object"?null:(e=Os&&e[Os]||e["@@iterator"],typeof e=="function"?e:null)}var jc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bc=Object.assign,Uc={};function Jt(e,n,t){this.props=e,this.context=n,this.refs=Uc,this.updater=t||jc}Jt.prototype.isReactComponent={};Jt.prototype.setState=function(e,n){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,n,"setState")};Jt.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Hc(){}Hc.prototype=Jt.prototype;function vu(e,n,t){this.props=e,this.context=n,this.refs=Uc,this.updater=t||jc}var ku=vu.prototype=new Hc;ku.constructor=vu;Bc(ku,Jt.prototype);ku.isPureReactComponent=!0;var Rs=Array.isArray,$c=Object.prototype.hasOwnProperty,xu={current:null},Vc={key:!0,ref:!0,__self:!0,__source:!0};function Wc(e,n,t){var r,i={},l=null,o=null;if(n!=null)for(r in n.ref!==void 0&&(o=n.ref),n.key!==void 0&&(l=""+n.key),n)$c.call(n,r)&&!Vc.hasOwnProperty(r)&&(i[r]=n[r]);var u=arguments.length-2;if(u===1)i.children=t;else if(1>>1,b=I[Q];if(0>>1;Qi(ln,g))nei(hn,ln)?(I[Q]=hn,I[ne]=g,Q=ne):(I[Q]=ln,I[me]=g,Q=me);else if(nei(hn,g))I[Q]=hn,I[ne]=g,Q=ne;else break e}}return F}function i(I,F){var g=I.sortIndex-F.sortIndex;return g!==0?g:I.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var s=[],a=[],c=1,f=null,d=3,p=!1,k=!1,x=!1,T=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(I){for(var F=t(a);F!==null;){if(F.callback===null)r(a);else if(F.startTime<=I)r(a),F.sortIndex=F.expirationTime,n(s,F);else break;F=t(a)}}function S(I){if(x=!1,y(I),!k)if(t(s)!==null)k=!0,pe(C);else{var F=t(a);F!==null&&ce(S,F.startTime-I)}}function C(I,F){k=!1,x&&(x=!1,h(L),L=-1),p=!0;var g=d;try{for(y(F),f=t(s);f!==null&&(!(f.expirationTime>F)||I&&!A());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,d=f.priorityLevel;var b=Q(f.expirationTime<=F);F=e.unstable_now(),typeof b=="function"?f.callback=b:f===t(s)&&r(s),y(F)}else r(s);f=t(s)}if(f!==null)var v=!0;else{var me=t(a);me!==null&&ce(S,me.startTime-F),v=!1}return v}finally{f=null,d=g,p=!1}}var w=!1,N=null,L=-1,j=5,R=-1;function A(){return!(e.unstable_now()-RI||125Q?(I.sortIndex=g,n(a,I),t(s)===null&&I===t(a)&&(x?(h(L),L=-1):x=!0,ce(S,g-Q))):(I.sortIndex=b,n(s,I),k||p||(k=!0,pe(C))),I},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(I){var F=d;return function(){var g=d;d=F;try{return I.apply(this,arguments)}finally{d=g}}}})(Xc);Yc.exports=Xc;var wh=Yc.exports;/** + */(function(e){function n(I,j){var g=I.length;I.push(j);e:for(;0>>1,X=I[Q];if(0>>1;Qi(ln,g))nei(hn,ln)?(I[Q]=hn,I[ne]=g,Q=ne):(I[Q]=ln,I[me]=g,Q=me);else if(nei(hn,g))I[Q]=hn,I[ne]=g,Q=ne;else break e}}return j}function i(I,j){var g=I.sortIndex-j.sortIndex;return g!==0?g:I.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var s=[],a=[],c=1,f=null,d=3,p=!1,k=!1,w=!1,T=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(I){for(var j=t(a);j!==null;){if(j.callback===null)r(a);else if(j.startTime<=I)r(a),j.sortIndex=j.expirationTime,n(s,j);else break;j=t(a)}}function S(I){if(w=!1,y(I),!k)if(t(s)!==null)k=!0,pe(C);else{var j=t(a);j!==null&&ce(S,j.startTime-I)}}function C(I,j){k=!1,w&&(w=!1,h(L),L=-1),p=!0;var g=d;try{for(y(j),f=t(s);f!==null&&(!(f.expirationTime>j)||I&&!A());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,d=f.priorityLevel;var X=Q(f.expirationTime<=j);j=e.unstable_now(),typeof X=="function"?f.callback=X:f===t(s)&&r(s),y(j)}else r(s);f=t(s)}if(f!==null)var v=!0;else{var me=t(a);me!==null&&ce(S,me.startTime-j),v=!1}return v}finally{f=null,d=g,p=!1}}var x=!1,N=null,L=-1,F=5,R=-1;function A(){return!(e.unstable_now()-RI||125Q?(I.sortIndex=g,n(a,I),t(s)===null&&I===t(a)&&(w?(h(L),L=-1):w=!0,ce(S,g-Q))):(I.sortIndex=X,n(s,I),k||p||(k=!0,pe(C))),I},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(I){var j=d;return function(){var g=d;d=j;try{return I.apply(this,arguments)}finally{d=g}}}})(Yc);Kc.exports=Yc;var xh=Kc.exports;/** * @license React * react-dom.production.min.js * @@ -30,24 +30,59 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var bc=Se,qe=wh;function P(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yo=Object.prototype.hasOwnProperty,Sh=/^[: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]*$/,Ms={},Ds={};function Eh(e){return yo.call(Ds,e)?!0:yo.call(Ms,e)?!1:Sh.test(e)?Ds[e]=!0:(Ms[e]=!0,!1)}function Ch(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ph(e,n,t,r){if(n===null||typeof n>"u"||Ch(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function Oe(e,n,t,r,i,l,o){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=l,this.removeEmptyString=o}var Ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ce[e]=new Oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Ce[n]=new Oe(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ce[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ce[e]=new Oe(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){Ce[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ce[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ce[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ce[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ce[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Su=/[\-:]([a-z])/g;function Eu(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 n=e.replace(Su,Eu);Ce[n]=new Oe(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Su,Eu);Ce[n]=new Oe(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Su,Eu);Ce[n]=new Oe(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ce[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ce.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ce[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Cu(e,n,t,r){var i=Ce.hasOwnProperty(n)?Ce[n]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yo=Object.prototype.hasOwnProperty,Sh=/^[: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]*$/,Ms={},Ds={};function Eh(e){return yo.call(Ds,e)?!0:yo.call(Ms,e)?!1:Sh.test(e)?Ds[e]=!0:(Ms[e]=!0,!1)}function Ch(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ph(e,n,t,r){if(n===null||typeof n>"u"||Ch(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function Oe(e,n,t,r,i,l,o){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=l,this.removeEmptyString=o}var Ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ce[e]=new Oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Ce[n]=new Oe(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ce[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ce[e]=new Oe(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){Ce[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ce[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ce[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ce[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ce[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Su=/[\-:]([a-z])/g;function Eu(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 n=e.replace(Su,Eu);Ce[n]=new Oe(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Su,Eu);Ce[n]=new Oe(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Su,Eu);Ce[n]=new Oe(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ce[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ce.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ce[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Cu(e,n,t,r){var i=Ce.hasOwnProperty(n)?Ce[n]:null;(i!==null?i.type!==0:r||!(2u||i[o]!==l[u]){var s=` -`+i[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{Rl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?gr(e):""}function _h(e){switch(e.tag){case 5:return gr(e.type);case 16:return gr("Lazy");case 13:return gr("Suspense");case 19:return gr("SuspenseList");case 0:case 2:case 15:return e=Al(e.type,!1),e;case 11:return e=Al(e.type.render,!1),e;case 1:return e=Al(e.type,!0),e;default:return""}}function wo(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 Nt:return"Fragment";case _t:return"Portal";case vo:return"Profiler";case Pu:return"StrictMode";case ko:return"Suspense";case xo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jc:return(e.displayName||"Context")+".Consumer";case Zc:return(e._context.displayName||"Context")+".Provider";case _u:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nu:return n=e.displayName||null,n!==null?n:wo(e.type)||"Memo";case jn:n=e._payload,e=e._init;try{return wo(e(n))}catch{}}return null}function Nh(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wo(n);case 8:return n===Pu?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Zn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nf(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Th(e){var n=nf(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var i=t.get,l=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ri(e){e._valueTracker||(e._valueTracker=Th(e))}function tf(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=nf(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function Fi(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 So(e,n){var t=n.checked;return se({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function js(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=Zn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function rf(e,n){n=n.checked,n!=null&&Cu(e,"checked",n,!1)}function Eo(e,n){rf(e,n);var t=Zn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Co(e,n.type,t):n.hasOwnProperty("defaultValue")&&Co(e,n.type,Zn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Bs(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function Co(e,n,t){(n!=="number"||Fi(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var yr=Array.isArray;function jt(e,n,t,r){if(e=e.options,n){n={};for(var i=0;i"+n.valueOf().toString()+"",n=ii.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Or(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var xr={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},zh=["Webkit","ms","Moz","O"];Object.keys(xr).forEach(function(e){zh.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),xr[n]=xr[e]})});function sf(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||xr.hasOwnProperty(e)&&xr[e]?(""+n).trim():n+"px"}function af(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,i=sf(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,i):e[t]=i}}var Ih=se({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 No(e,n){if(n){if(Ih[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(P(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(P(61))}if(n.style!=null&&typeof n.style!="object")throw Error(P(62))}}function To(e,n){if(e.indexOf("-")===-1)return typeof n.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 zo=null;function Tu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Io=null,Bt=null,Ut=null;function $s(e){if(e=Gr(e)){if(typeof Io!="function")throw Error(P(280));var n=e.stateNode;n&&(n=gl(n),Io(e.stateNode,e.type,n))}}function cf(e){Bt?Ut?Ut.push(e):Ut=[e]:Bt=e}function ff(){if(Bt){var e=Bt,n=Ut;if(Ut=Bt=null,$s(e),n)for(e=0;e>>=0,e===0?32:31-(Hh(e)/$h|0)|0}var li=64,oi=4194304;function vr(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 Hi(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,o=t&268435455;if(o!==0){var u=o&~i;u!==0?r=vr(u):(l&=o,l!==0&&(r=vr(l)))}else o=t&~i,o!==0?r=vr(o):l!==0&&(r=vr(l));if(r===0)return 0;if(n!==0&&n!==r&&!(n&i)&&(i=r&-r,l=n&-n,i>=l||i===16&&(l&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function Xr(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-fn(n),e[n]=t}function Kh(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Sr),Gs=String.fromCharCode(32),Zs=!1;function Lf(e,n){switch(e){case"keyup":return xm.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Of(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tt=!1;function Sm(e,n){switch(e){case"compositionend":return Of(n);case"keypress":return n.which!==32?null:(Zs=!0,Gs);case"textInput":return e=n.data,e===Gs&&Zs?null:e;default:return null}}function Em(e,n){if(Tt)return e==="compositionend"||!Du&&Lf(e,n)?(e=zf(),_i=Ru=$n=null,Tt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=ta(t)}}function Df(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Df(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Ff(){for(var e=window,n=Fi();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=Fi(e.document)}return n}function Fu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Om(e){var n=Ff(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Df(t.ownerDocument.documentElement,t)){if(r!==null&&Fu(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var i=t.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=ra(t,l);var o=ra(t,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(n=n.createRange(),n.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(n),e.extend(o.node,o.offset)):(n.setEnd(o.node,o.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,zt=null,Do=null,Cr=null,Fo=!1;function ia(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Fo||zt==null||zt!==Fi(r)||(r=zt,"selectionStart"in r&&Fu(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}),Cr&&jr(Cr,r)||(Cr=r,r=Wi(Do,"onSelect"),0Ot||(e.current=Vo[Ot],Vo[Ot]=null,Ot--)}function J(e,n){Ot++,Vo[Ot]=e.current,e.current=n}var Jn={},Te=nt(Jn),Fe=nt(!1),ht=Jn;function qt(e,n){var t=e.type.contextTypes;if(!t)return Jn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in t)i[l]=n[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=i),i}function je(e){return e=e.childContextTypes,e!=null}function Ki(){re(Fe),re(Te)}function fa(e,n,t){if(Te.current!==Jn)throw Error(P(168));J(Te,n),J(Fe,t)}function Kf(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var i in r)if(!(i in n))throw Error(P(108,Nh(e)||"Unknown",i));return se({},t,r)}function qi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jn,ht=Te.current,J(Te,e),J(Fe,Fe.current),!0}function pa(e,n,t){var r=e.stateNode;if(!r)throw Error(P(169));t?(e=Kf(e,n,ht),r.__reactInternalMemoizedMergedChildContext=e,re(Fe),re(Te),J(Te,e)):re(Fe),J(Fe,t)}var _n=null,yl=!1,Yl=!1;function qf(e){_n===null?_n=[e]:_n.push(e)}function Wm(e){yl=!0,qf(e)}function tt(){if(!Yl&&_n!==null){Yl=!0;var e=0,n=X;try{var t=_n;for(X=1;e>=o,i-=o,Nn=1<<32-fn(n)+i|t<L?(j=N,N=null):j=N.sibling;var R=d(h,N,y[L],S);if(R===null){N===null&&(N=j);break}e&&N&&R.alternate===null&&n(h,N),m=l(R,m,L),w===null?C=R:w.sibling=R,w=R,N=j}if(L===y.length)return t(h,N),ie&&ot(h,L),C;if(N===null){for(;LL?(j=N,N=null):j=N.sibling;var A=d(h,N,R.value,S);if(A===null){N===null&&(N=j);break}e&&N&&A.alternate===null&&n(h,N),m=l(A,m,L),w===null?C=A:w.sibling=A,w=A,N=j}if(R.done)return t(h,N),ie&&ot(h,L),C;if(N===null){for(;!R.done;L++,R=y.next())R=f(h,R.value,S),R!==null&&(m=l(R,m,L),w===null?C=R:w.sibling=R,w=R);return ie&&ot(h,L),C}for(N=r(h,N);!R.done;L++,R=y.next())R=p(N,h,L,R.value,S),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?L:R.key),m=l(R,m,L),w===null?C=R:w.sibling=R,w=R);return e&&N.forEach(function(M){return n(h,M)}),ie&&ot(h,L),C}function T(h,m,y,S){if(typeof y=="object"&&y!==null&&y.type===Nt&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ti:e:{for(var C=y.key,w=m;w!==null;){if(w.key===C){if(C=y.type,C===Nt){if(w.tag===7){t(h,w.sibling),m=i(w,y.props.children),m.return=h,h=m;break e}}else if(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jn&&ka(C)===w.type){t(h,w.sibling),m=i(w,y.props),m.ref=fr(h,w,y),m.return=h,h=m;break e}t(h,w);break}else n(h,w);w=w.sibling}y.type===Nt?(m=dt(y.props.children,h.mode,S,y.key),m.return=h,h=m):(S=Ai(y.type,y.key,y.props,null,h.mode,S),S.ref=fr(h,m,y),S.return=h,h=S)}return o(h);case _t:e:{for(w=y.key;m!==null;){if(m.key===w)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){t(h,m.sibling),m=i(m,y.children||[]),m.return=h,h=m;break e}else{t(h,m);break}else n(h,m);m=m.sibling}m=to(y,h.mode,S),m.return=h,h=m}return o(h);case jn:return w=y._init,T(h,m,w(y._payload),S)}if(yr(y))return k(h,m,y,S);if(or(y))return x(h,m,y,S);di(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(t(h,m.sibling),m=i(m,y),m.return=h,h=m):(t(h,m),m=no(y,h.mode,S),m.return=h,h=m),o(h)):t(h,m)}return T}var Xt=np(!0),tp=np(!1),Zr={},wn=nt(Zr),$r=nt(Zr),Vr=nt(Zr);function ft(e){if(e===Zr)throw Error(P(174));return e}function Ku(e,n){switch(J(Vr,n),J($r,e),J(wn,Zr),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:_o(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=_o(n,e)}re(wn),J(wn,n)}function bt(){re(wn),re($r),re(Vr)}function rp(e){ft(Vr.current);var n=ft(wn.current),t=_o(n,e.type);n!==t&&(J($r,e),J(wn,t))}function qu(e){$r.current===e&&(re(wn),re($r))}var oe=nt(0);function Ji(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Xl=[];function Yu(){for(var e=0;et?t:4,e(!0);var r=bl.transition;bl.transition={};try{e(!1),n()}finally{X=t,bl.transition=r}}function kp(){return tn().memoizedState}function Ym(e,n,t){var r=bn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},xp(e))wp(n,t);else if(t=Gf(e,n,t,r),t!==null){var i=Ie();pn(t,e,r,i),Sp(t,n,r)}}function Xm(e,n,t){var r=bn(e),i={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(xp(e))wp(n,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=n.lastRenderedReducer,l!==null))try{var o=n.lastRenderedState,u=l(o,t);if(i.hasEagerState=!0,i.eagerState=u,dn(u,o)){var s=n.interleaved;s===null?(i.next=i,Wu(n)):(i.next=s.next,s.next=i),n.interleaved=i;return}}catch{}finally{}t=Gf(e,n,i,r),t!==null&&(i=Ie(),pn(t,e,r,i),Sp(t,n,r))}}function xp(e){var n=e.alternate;return e===ue||n!==null&&n===ue}function wp(e,n){Pr=el=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Sp(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Iu(e,t)}}var nl={readContext:nn,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useInsertionEffect:Pe,useLayoutEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useMutableSource:Pe,useSyncExternalStore:Pe,useId:Pe,unstable_isNewReconciler:!1},bm={readContext:nn,useCallback:function(e,n){return gn().memoizedState=[e,n===void 0?null:n],e},useContext:nn,useEffect:wa,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Ii(4194308,4,hp.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Ii(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ii(4,2,e,n)},useMemo:function(e,n){var t=gn();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=gn();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=Ym.bind(null,ue,e),[r.memoizedState,e]},useRef:function(e){var n=gn();return e={current:e},n.memoizedState=e},useState:xa,useDebugValue:Ju,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=xa(!1),n=e[0];return e=qm.bind(null,e[1]),gn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=ue,i=gn();if(ie){if(t===void 0)throw Error(P(407));t=t()}else{if(t=n(),xe===null)throw Error(P(349));gt&30||op(r,n,t)}i.memoizedState=t;var l={value:t,getSnapshot:n};return i.queue=l,wa(sp.bind(null,r,l,e),[e]),r.flags|=2048,Kr(9,up.bind(null,r,l,t,n),void 0,null),t},useId:function(){var e=gn(),n=xe.identifierPrefix;if(ie){var t=Tn,r=Nn;t=(r&~(1<<32-fn(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Wr++,0")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{Rl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?gr(e):""}function _h(e){switch(e.tag){case 5:return gr(e.type);case 16:return gr("Lazy");case 13:return gr("Suspense");case 19:return gr("SuspenseList");case 0:case 2:case 15:return e=Al(e.type,!1),e;case 11:return e=Al(e.type.render,!1),e;case 1:return e=Al(e.type,!0),e;default:return""}}function xo(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 Nt:return"Fragment";case _t:return"Portal";case vo:return"Profiler";case Pu:return"StrictMode";case ko:return"Suspense";case wo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jc:return(e.displayName||"Context")+".Consumer";case Zc:return(e._context.displayName||"Context")+".Provider";case _u:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nu:return n=e.displayName||null,n!==null?n:xo(e.type)||"Memo";case Fn:n=e._payload,e=e._init;try{return xo(e(n))}catch{}}return null}function Nh(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xo(n);case 8:return n===Pu?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Zn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nf(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Th(e){var n=nf(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var i=t.get,l=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ri(e){e._valueTracker||(e._valueTracker=Th(e))}function tf(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=nf(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function ji(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 So(e,n){var t=n.checked;return se({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function Fs(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=Zn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function rf(e,n){n=n.checked,n!=null&&Cu(e,"checked",n,!1)}function Eo(e,n){rf(e,n);var t=Zn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Co(e,n.type,t):n.hasOwnProperty("defaultValue")&&Co(e,n.type,Zn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Bs(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function Co(e,n,t){(n!=="number"||ji(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var yr=Array.isArray;function Ft(e,n,t,r){if(e=e.options,n){n={};for(var i=0;i"+n.valueOf().toString()+"",n=ii.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Or(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var wr={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},zh=["Webkit","ms","Moz","O"];Object.keys(wr).forEach(function(e){zh.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),wr[n]=wr[e]})});function sf(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||wr.hasOwnProperty(e)&&wr[e]?(""+n).trim():n+"px"}function af(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,i=sf(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,i):e[t]=i}}var Ih=se({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 No(e,n){if(n){if(Ih[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(P(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(P(61))}if(n.style!=null&&typeof n.style!="object")throw Error(P(62))}}function To(e,n){if(e.indexOf("-")===-1)return typeof n.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 zo=null;function Tu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Io=null,Bt=null,Ut=null;function $s(e){if(e=Gr(e)){if(typeof Io!="function")throw Error(P(280));var n=e.stateNode;n&&(n=gl(n),Io(e.stateNode,e.type,n))}}function cf(e){Bt?Ut?Ut.push(e):Ut=[e]:Bt=e}function ff(){if(Bt){var e=Bt,n=Ut;if(Ut=Bt=null,$s(e),n)for(e=0;e>>=0,e===0?32:31-(Hh(e)/$h|0)|0}var li=64,oi=4194304;function vr(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 Hi(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,o=t&268435455;if(o!==0){var u=o&~i;u!==0?r=vr(u):(l&=o,l!==0&&(r=vr(l)))}else o=t&~i,o!==0?r=vr(o):l!==0&&(r=vr(l));if(r===0)return 0;if(n!==0&&n!==r&&!(n&i)&&(i=r&-r,l=n&-n,i>=l||i===16&&(l&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function Yr(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-fn(n),e[n]=t}function bh(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Sr),Gs=String.fromCharCode(32),Zs=!1;function Lf(e,n){switch(e){case"keyup":return wm.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Of(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tt=!1;function Sm(e,n){switch(e){case"compositionend":return Of(n);case"keypress":return n.which!==32?null:(Zs=!0,Gs);case"textInput":return e=n.data,e===Gs&&Zs?null:e;default:return null}}function Em(e,n){if(Tt)return e==="compositionend"||!Du&&Lf(e,n)?(e=zf(),_i=Ru=$n=null,Tt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=ta(t)}}function Df(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Df(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function jf(){for(var e=window,n=ji();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=ji(e.document)}return n}function ju(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Om(e){var n=jf(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Df(t.ownerDocument.documentElement,t)){if(r!==null&&ju(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var i=t.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=ra(t,l);var o=ra(t,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(n=n.createRange(),n.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(n),e.extend(o.node,o.offset)):(n.setEnd(o.node,o.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,zt=null,Do=null,Cr=null,jo=!1;function ia(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;jo||zt==null||zt!==ji(r)||(r=zt,"selectionStart"in r&&ju(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}),Cr&&Fr(Cr,r)||(Cr=r,r=Wi(Do,"onSelect"),0Ot||(e.current=Vo[Ot],Vo[Ot]=null,Ot--)}function J(e,n){Ot++,Vo[Ot]=e.current,e.current=n}var Jn={},Te=nt(Jn),je=nt(!1),ht=Jn;function qt(e,n){var t=e.type.contextTypes;if(!t)return Jn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in t)i[l]=n[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=i),i}function Fe(e){return e=e.childContextTypes,e!=null}function bi(){re(je),re(Te)}function fa(e,n,t){if(Te.current!==Jn)throw Error(P(168));J(Te,n),J(je,t)}function bf(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var i in r)if(!(i in n))throw Error(P(108,Nh(e)||"Unknown",i));return se({},t,r)}function qi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jn,ht=Te.current,J(Te,e),J(je,je.current),!0}function pa(e,n,t){var r=e.stateNode;if(!r)throw Error(P(169));t?(e=bf(e,n,ht),r.__reactInternalMemoizedMergedChildContext=e,re(je),re(Te),J(Te,e)):re(je),J(je,t)}var _n=null,yl=!1,Kl=!1;function qf(e){_n===null?_n=[e]:_n.push(e)}function Wm(e){yl=!0,qf(e)}function tt(){if(!Kl&&_n!==null){Kl=!0;var e=0,n=Y;try{var t=_n;for(Y=1;e>=o,i-=o,Nn=1<<32-fn(n)+i|t<L?(F=N,N=null):F=N.sibling;var R=d(h,N,y[L],S);if(R===null){N===null&&(N=F);break}e&&N&&R.alternate===null&&n(h,N),m=l(R,m,L),x===null?C=R:x.sibling=R,x=R,N=F}if(L===y.length)return t(h,N),ie&&ot(h,L),C;if(N===null){for(;LL?(F=N,N=null):F=N.sibling;var A=d(h,N,R.value,S);if(A===null){N===null&&(N=F);break}e&&N&&A.alternate===null&&n(h,N),m=l(A,m,L),x===null?C=A:x.sibling=A,x=A,N=F}if(R.done)return t(h,N),ie&&ot(h,L),C;if(N===null){for(;!R.done;L++,R=y.next())R=f(h,R.value,S),R!==null&&(m=l(R,m,L),x===null?C=R:x.sibling=R,x=R);return ie&&ot(h,L),C}for(N=r(h,N);!R.done;L++,R=y.next())R=p(N,h,L,R.value,S),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?L:R.key),m=l(R,m,L),x===null?C=R:x.sibling=R,x=R);return e&&N.forEach(function(M){return n(h,M)}),ie&&ot(h,L),C}function T(h,m,y,S){if(typeof y=="object"&&y!==null&&y.type===Nt&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ti:e:{for(var C=y.key,x=m;x!==null;){if(x.key===C){if(C=y.type,C===Nt){if(x.tag===7){t(h,x.sibling),m=i(x,y.props.children),m.return=h,h=m;break e}}else if(x.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Fn&&ka(C)===x.type){t(h,x.sibling),m=i(x,y.props),m.ref=fr(h,x,y),m.return=h,h=m;break e}t(h,x);break}else n(h,x);x=x.sibling}y.type===Nt?(m=dt(y.props.children,h.mode,S,y.key),m.return=h,h=m):(S=Ai(y.type,y.key,y.props,null,h.mode,S),S.ref=fr(h,m,y),S.return=h,h=S)}return o(h);case _t:e:{for(x=y.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){t(h,m.sibling),m=i(m,y.children||[]),m.return=h,h=m;break e}else{t(h,m);break}else n(h,m);m=m.sibling}m=to(y,h.mode,S),m.return=h,h=m}return o(h);case Fn:return x=y._init,T(h,m,x(y._payload),S)}if(yr(y))return k(h,m,y,S);if(or(y))return w(h,m,y,S);di(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(t(h,m.sibling),m=i(m,y),m.return=h,h=m):(t(h,m),m=no(y,h.mode,S),m.return=h,h=m),o(h)):t(h,m)}return T}var Yt=np(!0),tp=np(!1),Zr={},xn=nt(Zr),$r=nt(Zr),Vr=nt(Zr);function ft(e){if(e===Zr)throw Error(P(174));return e}function bu(e,n){switch(J(Vr,n),J($r,e),J(xn,Zr),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:_o(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=_o(n,e)}re(xn),J(xn,n)}function Xt(){re(xn),re($r),re(Vr)}function rp(e){ft(Vr.current);var n=ft(xn.current),t=_o(n,e.type);n!==t&&(J($r,e),J(xn,t))}function qu(e){$r.current===e&&(re(xn),re($r))}var oe=nt(0);function Ji(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Yl=[];function Ku(){for(var e=0;et?t:4,e(!0);var r=Xl.transition;Xl.transition={};try{e(!1),n()}finally{Y=t,Xl.transition=r}}function kp(){return tn().memoizedState}function Km(e,n,t){var r=Xn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},wp(e))xp(n,t);else if(t=Gf(e,n,t,r),t!==null){var i=Ie();pn(t,e,r,i),Sp(t,n,r)}}function Ym(e,n,t){var r=Xn(e),i={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(wp(e))xp(n,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=n.lastRenderedReducer,l!==null))try{var o=n.lastRenderedState,u=l(o,t);if(i.hasEagerState=!0,i.eagerState=u,dn(u,o)){var s=n.interleaved;s===null?(i.next=i,Wu(n)):(i.next=s.next,s.next=i),n.interleaved=i;return}}catch{}finally{}t=Gf(e,n,i,r),t!==null&&(i=Ie(),pn(t,e,r,i),Sp(t,n,r))}}function wp(e){var n=e.alternate;return e===ue||n!==null&&n===ue}function xp(e,n){Pr=el=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Sp(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Iu(e,t)}}var nl={readContext:nn,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useInsertionEffect:Pe,useLayoutEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useMutableSource:Pe,useSyncExternalStore:Pe,useId:Pe,unstable_isNewReconciler:!1},Xm={readContext:nn,useCallback:function(e,n){return gn().memoizedState=[e,n===void 0?null:n],e},useContext:nn,useEffect:xa,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Ii(4194308,4,hp.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Ii(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ii(4,2,e,n)},useMemo:function(e,n){var t=gn();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=gn();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=Km.bind(null,ue,e),[r.memoizedState,e]},useRef:function(e){var n=gn();return e={current:e},n.memoizedState=e},useState:wa,useDebugValue:Ju,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=wa(!1),n=e[0];return e=qm.bind(null,e[1]),gn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=ue,i=gn();if(ie){if(t===void 0)throw Error(P(407));t=t()}else{if(t=n(),we===null)throw Error(P(349));gt&30||op(r,n,t)}i.memoizedState=t;var l={value:t,getSnapshot:n};return i.queue=l,xa(sp.bind(null,r,l,e),[e]),r.flags|=2048,br(9,up.bind(null,r,l,t,n),void 0,null),t},useId:function(){var e=gn(),n=we.identifierPrefix;if(ie){var t=Tn,r=Nn;t=(r&~(1<<32-fn(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Wr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(t,{is:r.is}):(e=o.createElement(t),t==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,t),e[vn]=n,e[Hr]=r,Lp(e,n,!1,!1),n.stateNode=e;e:{switch(o=To(t,r),t){case"dialog":te("cancel",e),te("close",e),i=r;break;case"iframe":case"object":case"embed":te("load",e),i=r;break;case"video":case"audio":for(i=0;iZt&&(n.flags|=128,r=!0,pr(l,!1),n.lanes=4194304)}else{if(!r)if(e=Ji(o),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),pr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!ie)return _e(n),null}else 2*fe()-l.renderingStartTime>Zt&&t!==1073741824&&(n.flags|=128,r=!0,pr(l,!1),n.lanes=4194304);l.isBackwards?(o.sibling=n.child,n.child=o):(t=l.last,t!==null?t.sibling=o:n.child=o,l.last=o)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=fe(),n.sibling=null,t=oe.current,J(oe,r?t&1|2:t&1),n):(_e(n),null);case 22:case 23:return ls(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?Ve&1073741824&&(_e(n),n.subtreeFlags&6&&(n.flags|=8192)):_e(n),null;case 24:return null;case 25:return null}throw Error(P(156,n.tag))}function ig(e,n){switch(Bu(n),n.tag){case 1:return je(n.type)&&Ki(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return bt(),re(Fe),re(Te),Yu(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return qu(n),null;case 13:if(re(oe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(P(340));Yt()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return re(oe),null;case 4:return bt(),null;case 10:return Vu(n.type._context),null;case 22:case 23:return ls(),null;case 24:return null;default:return null}}var mi=!1,Ne=!1,lg=typeof WeakSet=="function"?WeakSet:Set,O=null;function Dt(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){ae(e,n,r)}else t.current=null}function nu(e,n,t){try{t()}catch(r){ae(e,n,r)}}var Ia=!1;function og(e,n){if(jo=$i,e=Ff(),Fu(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{t.nodeType,l.nodeType}catch{t=null;break e}var o=0,u=-1,s=-1,a=0,c=0,f=e,d=null;n:for(;;){for(var p;f!==t||i!==0&&f.nodeType!==3||(u=o+i),f!==l||r!==0&&f.nodeType!==3||(s=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break n;if(d===t&&++a===i&&(u=o),d===l&&++c===r&&(s=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}t=u===-1||s===-1?null:{start:u,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(Bo={focusedElem:e,selectionRange:t},$i=!1,O=n;O!==null;)if(n=O,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,O=e;else for(;O!==null;){n=O;try{var k=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var x=k.memoizedProps,T=k.memoizedState,h=n.stateNode,m=h.getSnapshotBeforeUpdate(n.elementType===n.type?x:sn(n.type,x),T);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=n.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(S){ae(n,n.return,S)}if(e=n.sibling,e!==null){e.return=n.return,O=e;break}O=n.return}return k=Ia,Ia=!1,k}function _r(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&nu(n,t,l)}i=i.next}while(i!==r)}}function xl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function tu(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Ap(e){var n=e.alternate;n!==null&&(e.alternate=null,Ap(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[vn],delete n[Hr],delete n[$o],delete n[$m],delete n[Vm])),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 La(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 ru(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Qi));else if(r!==4&&(e=e.child,e!==null))for(ru(e,n,t),e=e.sibling;e!==null;)ru(e,n,t),e=e.sibling}function iu(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(iu(e,n,t),e=e.sibling;e!==null;)iu(e,n,t),e=e.sibling}var we=null,an=!1;function Dn(e,n,t){for(t=t.child;t!==null;)Dp(e,n,t),t=t.sibling}function Dp(e,n,t){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(pl,t)}catch{}switch(t.tag){case 5:Ne||Dt(t,n);case 6:var r=we,i=an;we=null,Dn(e,n,t),we=r,an=i,we!==null&&(an?(e=we,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):we.removeChild(t.stateNode));break;case 18:we!==null&&(an?(e=we,t=t.stateNode,e.nodeType===8?ql(e.parentNode,t):e.nodeType===1&&ql(e,t),Dr(e)):ql(we,t.stateNode));break;case 4:r=we,i=an,we=t.stateNode.containerInfo,an=!0,Dn(e,n,t),we=r,an=i;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&nu(t,n,o),i=i.next}while(i!==r)}Dn(e,n,t);break;case 1:if(!Ne&&(Dt(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(u){ae(t,n,u)}Dn(e,n,t);break;case 21:Dn(e,n,t);break;case 22:t.mode&1?(Ne=(r=Ne)||t.memoizedState!==null,Dn(e,n,t),Ne=r):Dn(e,n,t);break;default:Dn(e,n,t)}}function Oa(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new lg),n.forEach(function(r){var i=mg.bind(null,e,r);t.has(r)||(t.add(r),r.then(i,i))})}}function un(e,n){var t=n.deletions;if(t!==null)for(var r=0;ri&&(i=o),r&=~l}if(r=i,r=fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sg(r/1960))-r,10e?16:e,Vn===null)var r=!1;else{if(e=Vn,Vn=null,il=0,K&6)throw Error(P(331));var i=K;for(K|=4,O=e.current;O!==null;){var l=O,o=l.child;if(O.flags&16){var u=l.deletions;if(u!==null){for(var s=0;sfe()-rs?pt(e,0):ts|=t),Be(e,n)}function Wp(e,n){n===0&&(e.mode&1?(n=oi,oi<<=1,!(oi&130023424)&&(oi=4194304)):n=1);var t=Ie();e=On(e,n),e!==null&&(Xr(e,n,t),Be(e,t))}function hg(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Wp(e,t)}function mg(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(t=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(n),Wp(e,t)}var Qp;Qp=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||Fe.current)De=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return De=!1,tg(e,n,t);De=!!(e.flags&131072)}else De=!1,ie&&n.flags&1048576&&Yf(n,Xi,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;Li(e,n),e=n.pendingProps;var i=qt(n,Te.current);$t(n,t),i=bu(null,n,r,e,i,t);var l=Gu();return n.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,je(r)?(l=!0,qi(n)):l=!1,n.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Qu(n),i.updater=vl,n.stateNode=i,i._reactInternals=n,Yo(n,r,e,t),n=Go(null,n,r,!0,l,t)):(n.tag=0,ie&&l&&ju(n),ze(null,n,i,t),n=n.child),n;case 16:r=n.elementType;e:{switch(Li(e,n),e=n.pendingProps,i=r._init,r=i(r._payload),n.type=r,i=n.tag=yg(r),e=sn(r,e),i){case 0:n=bo(null,n,r,e,t);break e;case 1:n=Na(null,n,r,e,t);break e;case 11:n=Pa(null,n,r,e,t);break e;case 14:n=_a(null,n,r,sn(r.type,e),t);break e}throw Error(P(306,r,""))}return n;case 0:return r=n.type,i=n.pendingProps,i=n.elementType===r?i:sn(r,i),bo(e,n,r,i,t);case 1:return r=n.type,i=n.pendingProps,i=n.elementType===r?i:sn(r,i),Na(e,n,r,i,t);case 3:e:{if(Tp(n),e===null)throw Error(P(387));r=n.pendingProps,l=n.memoizedState,i=l.element,Zf(e,n),Zi(n,r,null,t);var o=n.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},n.updateQueue.baseState=l,n.memoizedState=l,n.flags&256){i=Gt(Error(P(423)),n),n=Ta(e,n,r,t,i);break e}else if(r!==i){i=Gt(Error(P(424)),n),n=Ta(e,n,r,t,i);break e}else for(We=qn(n.stateNode.containerInfo.firstChild),Ke=n,ie=!0,cn=null,t=tp(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Yt(),r===i){n=Rn(e,n,t);break e}ze(e,n,r,t)}n=n.child}return n;case 5:return rp(n),e===null&&Qo(n),r=n.type,i=n.pendingProps,l=e!==null?e.memoizedProps:null,o=i.children,Uo(r,i)?o=null:l!==null&&Uo(r,l)&&(n.flags|=32),Np(e,n),ze(e,n,o,t),n.child;case 6:return e===null&&Qo(n),null;case 13:return zp(e,n,t);case 4:return Ku(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=Xt(n,null,r,t):ze(e,n,r,t),n.child;case 11:return r=n.type,i=n.pendingProps,i=n.elementType===r?i:sn(r,i),Pa(e,n,r,i,t);case 7:return ze(e,n,n.pendingProps,t),n.child;case 8:return ze(e,n,n.pendingProps.children,t),n.child;case 12:return ze(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,i=n.pendingProps,l=n.memoizedProps,o=i.value,J(bi,r._currentValue),r._currentValue=o,l!==null)if(dn(l.value,o)){if(l.children===i.children&&!Fe.current){n=Rn(e,n,t);break e}}else for(l=n.child,l!==null&&(l.return=n);l!==null;){var u=l.dependencies;if(u!==null){o=l.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(l.tag===1){s=zn(-1,t&-t),s.tag=2;var a=l.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}}l.lanes|=t,s=l.alternate,s!==null&&(s.lanes|=t),Ko(l.return,t,n),u.lanes|=t;break}s=s.next}}else if(l.tag===10)o=l.type===n.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(P(341));o.lanes|=t,u=o.alternate,u!==null&&(u.lanes|=t),Ko(o,t,n),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===n){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}ze(e,n,i.children,t),n=n.child}return n;case 9:return i=n.type,r=n.pendingProps.children,$t(n,t),i=nn(i),r=r(i),n.flags|=1,ze(e,n,r,t),n.child;case 14:return r=n.type,i=sn(r,n.pendingProps),i=sn(r.type,i),_a(e,n,r,i,t);case 15:return Pp(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,i=n.pendingProps,i=n.elementType===r?i:sn(r,i),Li(e,n),n.tag=1,je(r)?(e=!0,qi(n)):e=!1,$t(n,t),ep(n,r,i),Yo(n,r,i,t),Go(null,n,r,!0,e,t);case 19:return Ip(e,n,t);case 22:return _p(e,n,t)}throw Error(P(156,n.tag))};function Kp(e,n){return vf(e,n)}function gg(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,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 Je(e,n,t,r){return new gg(e,n,t,r)}function us(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yg(e){if(typeof e=="function")return us(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_u)return 11;if(e===Nu)return 14}return 2}function Gn(e,n){var t=e.alternate;return t===null?(t=Je(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Ai(e,n,t,r,i,l){var o=2;if(r=e,typeof e=="function")us(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Nt:return dt(t.children,i,l,n);case Pu:o=8,i|=8;break;case vo:return e=Je(12,t,n,i|2),e.elementType=vo,e.lanes=l,e;case ko:return e=Je(13,t,n,i),e.elementType=ko,e.lanes=l,e;case xo:return e=Je(19,t,n,i),e.elementType=xo,e.lanes=l,e;case ef:return Sl(t,i,l,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zc:o=10;break e;case Jc:o=9;break e;case _u:o=11;break e;case Nu:o=14;break e;case jn:o=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return n=Je(o,t,n,i),n.elementType=e,n.type=r,n.lanes=l,n}function dt(e,n,t,r){return e=Je(7,e,r,n),e.lanes=t,e}function Sl(e,n,t,r){return e=Je(22,e,r,n),e.elementType=ef,e.lanes=t,e.stateNode={isHidden:!1},e}function no(e,n,t){return e=Je(6,e,null,n),e.lanes=t,e}function to(e,n,t){return n=Je(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function vg(e,n,t,r,i){this.tag=n,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=Dl(0),this.expirationTimes=Dl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ss(e,n,t,r,i,l,o,u,s){return e=new vg(e,n,t,u,s),n===1?(n=1,l===!0&&(n|=8)):n=0,l=Je(3,null,null,n),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qu(l),e}function kg(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bp)}catch(e){console.error(e)}}bp(),qc.exports=Ye;var ps=qc.exports,Ua=ps;go.createRoot=Ua.createRoot,go.hydrateRoot=Ua.hydrateRoot;const Cg="_canvas_1pk4t_1",Pg="_canvasWrapper_1pk4t_8",Ha={canvas:Cg,canvasWrapper:Pg},_g=(e,n)=>{const t=e.x,r=e.y,i=n.x,l=n.y;return Math.sqrt(Math.pow(t-i,2)+Math.pow(r-l,2))<=42},Ng=(e,n,t)=>e.x-n>=0&&e.y-n>=0&&e.x+n<=t.current.clientWidth&&e.y+n<=t.current.clientHeight,Tg=(e,n,t,r)=>n.some(o=>_g(o,e))?(r({show:!0,text:"New node is too close to an existing node."}),!1):Ng(e,20,t)?!0:(r({show:!0,text:"New node is out of bounds."}),!1),zg=(e,n,t)=>n.some(i=>i.firstNode.x===e.firstNode.x&&i.firstNode.y===e.firstNode.y&&i.secondNode.x===e.secondNode.x&&i.secondNode.y===e.secondNode.y||i.firstNode.x===e.secondNode.x&&i.firstNode.y===e.secondNode.y&&i.secondNode.x===e.firstNode.x&&i.secondNode.y===e.firstNode.y)?(t({show:!0,text:"An edge with the same coordinates already exists."}),!1):!0;var Gp={exports:{}},Ig="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lg=Ig,Og=Lg;function Zp(){}function Jp(){}Jp.resetWarningCache=Zp;var Rg=function(){function e(r,i,l,o,u,s){if(s!==Og){var a=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 a.name="Invariant Violation",a}}e.isRequired=e;function n(){return e}var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:Jp,resetWarningCache:Zp};return t.PropTypes=t,t};Gp.exports=Rg();var Ag=Gp.exports;const ye=cl(Ag),ds=Se.createContext(),Mg=()=>{const[e,n]=Se.useState([]),[t,r]=Se.useState([]);return{nodes:e,setNodes:n,edges:t,setEdges:r}},ed=({children:e})=>{const n=Mg();return D.jsx(ds.Provider,{value:n,children:e})};ed.propTypes={children:ye.node.isRequired};const Dg="_node_11j8y_1",Fg="_bump_11j8y_1",jg="_circle_11j8y_8",Bg="_text_11j8y_17",ro={node:Dg,bump:Fg,circle:jg,text:Bg},nd=({id:e,cx:n,cy:t,onNodeClick:r})=>D.jsxs("g",{className:ro.node,onClick:i=>r(i,{id:e,x:n,y:t}),children:[D.jsx("circle",{className:ro.circle,id:e,cx:n,cy:t,r:"20"}),D.jsx("text",{className:ro.text,x:n,y:t,textAnchor:"middle",dominantBaseline:"middle",children:e})]});nd.propTypes={onNodeClick:ye.func.isRequired,id:ye.number.isRequired,cx:ye.number.isRequired,cy:ye.number.isRequired};const td=({nodes:e,onNodeClick:n})=>D.jsx(D.Fragment,{children:e.map(t=>D.jsx(nd,{id:t.id,cx:t.x,cy:t.y,onNodeClick:n},t.id))});td.propTypes={nodes:ye.array.isRequired,onNodeClick:ye.func.isRequired};const Ug="_line_16v5c_1",Hg="_drawLine_16v5c_1",$g="_text_16v5c_15",$a={line:Ug,drawLine:Hg,text:$g},rd=({id:e,x1:n,y1:t,x2:r,y2:i,weight:l})=>D.jsxs("g",{children:[D.jsx("line",{className:$a.line,id:e,x1:n,y1:t,x2:r,y2:i}),D.jsx("text",{className:$a.text,x:(n+r)/2,y:(t+i)/2,fill:"white",children:l})]});rd.propTypes={id:ye.string.isRequired,x1:ye.number.isRequired,y1:ye.number.isRequired,x2:ye.number.isRequired,y2:ye.number.isRequired};const id=({edges:e})=>D.jsx(D.Fragment,{children:e.map(n=>D.jsx(Qc.Fragment,{children:D.jsx(rd,{id:n.id,x1:n.firstNode.x,y1:n.firstNode.y,x2:n.secondNode.x,y2:n.secondNode.y,weight:n.weight})},n.id))});id.propTypes={edges:ye.arrayOf(ye.shape({id:ye.string.isRequired,weight:ye.number.isRequired,firstNode:ye.object.isRequired,secondNode:ye.object.isRequired})).isRequired};const Vg="_overlay_14w4b_1",Wg="_ErrorModal_14w4b_11",Qg="_errorText_14w4b_28",Kg="_close_14w4b_31",qg="_img_14w4b_48",hr={overlay:Vg,ErrorModal:Wg,errorText:Qg,close:Kg,img:qg},Yg="/dijkstra-prim-visualization/assets/close-cef0fcd2.svg",Xg=({errorText:e,onClose:n})=>D.jsx("div",{className:hr.overlay,onClick:n,children:D.jsxs("div",{className:hr.ErrorModal,children:[D.jsx("p",{className:hr.errorText,children:e}),D.jsx("button",{className:hr.close,onClick:n,children:D.jsx("img",{className:hr.img,src:Yg})})]})}),hs=Se.createContext(),bg=()=>{const[e,n]=Se.useState(!1),[t,r]=Se.useState(!1);return{showErrorModal:e,setShowErrorModal:n,showPaperModal:t,setShowPaperModal:r}},ld=({children:e})=>{const n=bg();return D.jsx(hs.Provider,{value:n,children:e})};ld.propTypes={children:ye.node.isRequired};const Gg=100,Zg=()=>{const{nodes:e,setNodes:n,edges:t,setEdges:r}=Se.useContext(ds),{showErrorModal:i,setShowErrorModal:l}=Se.useContext(hs),o={isClicked:!1,node:null},[u,s]=Se.useState(o),a=Se.useRef(null),c=d=>{u.isClicked&&(document.getElementById(u.node.id).style.fill="#d69edd",s(o));const p=d.clientX,k=d.clientY,x=p-a.current.getBoundingClientRect().left,T=k-a.current.getBoundingClientRect().top,h={id:e.length,x,y:T};Tg(h,e,a,l)&&n(m=>[...m,h])},f=(d,p)=>{d.stopPropagation();const k=(x,T)=>{const h={id:`${x.id}-${T.id}`,weight:Math.floor(Math.random()*Gg)+1,firstNode:x,secondNode:T};zg(h,t,l)&&r(m=>[...m,h])};u.isClicked?u.node.x===p.x&&u.node.y===p.y?(l({show:!0,text:"same node clicked again, reset the first clicked node"}),s(o),document.getElementById(p.id).style.fill="#d69edd"):(k(u.node,p),s(o),document.getElementById(u.node.id).style.fill="#d69edd"):(s({isClicked:!0,node:p}),document.getElementById(p.id).style.fill="#3f2873")};return D.jsxs(D.Fragment,{children:[D.jsx("div",{className:Ha.canvasWrapper,children:D.jsxs("svg",{ref:a,className:Ha.canvas,onClick:c,children:[D.jsx(id,{edges:t}),D.jsx(td,{nodes:e,onNodeClick:f})]})}),i.show&&ps.createPortal(D.jsx(Xg,{errorText:i.text,onClose:()=>l({show:!1,text:null})}),document.body)]})},vi=e=>new Promise(n=>setTimeout(n,e)),Va=async e=>{const n=async i=>{for(const l of i){for(const u of l.edgeIds){const s=document.getElementById(u);s.style.stroke="yellow",await vi(500),t(u),await vi(500)}const o=document.getElementById(l.selectedEdgeId);o.style.stroke="#3fb950",o.style.strokeWidth="8",await vi(1e3)}for(const l of i){const o=document.getElementById(l.selectedEdgeId);o.style.stroke="#c709cb"}await vi(5e3)},t=i=>{const l=document.getElementById(i);l.style.stroke="#33b3ae",l.style.strokeWidth="2"},r=async i=>{i.forEach(l=>{t(l.selectedEdgeId),l.edgeIds.forEach(o=>t(o))})};await n(e.animations),await r(e.animations)},Wa=(e,n)=>({node:e,weight:n}),od=(e,n)=>{const t=new Array(e.length).fill(null);return n.map(r=>({from:r.firstNode.id,to:r.secondNode.id,weight:r.weight})).forEach(r=>{Array.isArray(t[r.from])||(t[r.from]=new Array),t[r.from].push(Wa(r.to,r.weight)),Array.isArray(t[r.to])||(t[r.to]=new Array),t[r.to].push(Wa(r.from,r.weight))}),t},ud=function(e){const n=(s,a)=>({key:s,value:a});let t=0;const r=new Array(e+1),i=new Array(e);r[0]=n(-1,-1/0);const l=(s,a)=>{[r[s],r[a]]=[r[a],r[s]]},o=s=>{let a=Math.floor(s/2),c=s;for(;c>0&&r[a].value>r[c].value;){const f=r[a],d=r[c];i[d.key]=a,i[f.key]=c,l(c,a),c=a,a=Math.floor(a/2)}},u=s=>{let a=s,c=2*s,f=2*s+1;if(cr[c].value&&(a=c),fr[f].value&&(a=f),a!=s){const d=r[a],p=r[s];i[d.key]=s,i[p.key]=a,l(s,a),u(a)}};this.isEmpty=()=>t==0,this.insert=(s,a)=>{t++,r[t]=n(s,a),i[s]=t,o(t)},this.extractMin=()=>{const s=r[1],a=r[t];return i[a.key]=1,r[1]=a,r[t]=null,u(1),t--,s},this.decreaseKey=(s,a)=>{const c=i[s],f=r[c];f.value=a,o(c)}},Jg=(e,n)=>{const t=e.length,r=new n(t),i=new Array(t),l=[],o=new Array(t),u=new Array(t);r.insert(0,0),i[0]=!0,o[0]=1/0;for(let a=1;a{i[f.node]&&(s.push({from:a.key,to:f.node,weight:f.weight}),o[f.node]>f.weight&&(r.decreaseKey(f.node,f.weight),u[f.node]=a,o[f.node]=f.weight))})}return l},ey=e=>{let n=0;for(let t=0;t{const t=od(e,n),r=Jg(t,ud);return ey(r)},ty=(e,n)=>{const t=e.length,r=0,i=t-1,l=new n(t),o=new Array(t),u=new Array(t);l.insert(0,0),o[0]=0;for(let c=1;c{const p=o[c.key]+d.weight;p({steps:e.steps.reverse().map(n=>(n.subSteps=[],n)),total:e.total}),iy=(e,n)=>{const t=od(e,n),r=ty(t,ud);return ry(r)},ly=(e,n)=>{const t=ny(e,n);return sd(t)},oy=(e,n)=>{const t=iy(e,n);return sd(t)},Qa=(e,n)=>document.getElementById(`${e}-${n}`)?`${e}-${n}`:`${n}-${e}`,sd=e=>({animations:e.steps.map(n=>({selectedEdgeId:Qa(n.from,n.to),edgeIds:n.subSteps.map(t=>Qa(t.from,t.to)),weight:n.weight})),total:e.total}),uy=(e,n)=>n.some(t=>t.firstNode.id===e.id||t.secondNode.id===e.id),Ka=(e,n)=>e.every(t=>uy(t,n)),sy="_Navbar_37c52_1",ay="_clearCanvas_37c52_1",qa={Navbar:sy,clearCanvas:ay},cy="_overlay_1mhav_1",fy="_PaperModal_1mhav_11",py="_close_1mhav_31",dy="_img_1mhav_47",ki={overlay:cy,PaperModal:fy,close:py,img:dy};function hy(e,n){const t=n||{};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const my=/[ \t\n\f\r]/g;function gy(e){return typeof e=="object"?e.type==="text"?Ya(e.value):!1:Ya(e)}function Ya(e){return e.replace(my,"")===""}class Jr{constructor(n,t,r){this.property=n,this.normal=t,r&&(this.space=r)}}Jr.prototype.property={};Jr.prototype.normal={};Jr.prototype.space=null;function ad(e,n){const t={},r={};let i=-1;for(;++i4&&t.slice(0,4)==="data"&&wy.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(ba,Py);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!ba.test(l)){let o=l.replace(Sy,Cy);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=ms}return new i(r,n)}function Cy(e){return"-"+e.toLowerCase()}function Py(e){return e.charAt(1).toUpperCase()}const _y={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ny=ad([pd,fd,md,gd,ky],"html"),yd=ad([pd,fd,md,gd,xy],"svg");function Ty(e){return e.join(" ").trim()}var gs={exports:{}},Ga=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zy=/\n/g,Iy=/^\s*/,Ly=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Oy=/^:\s*/,Ry=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ay=/^[;\s]*/,My=/^\s+|\s+$/g,Dy=` -`,Za="/",Ja="*",st="",Fy="comment",jy="declaration",By=function(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(k){var x=k.match(zy);x&&(t+=x.length);var T=k.lastIndexOf(Dy);r=~T?k.length-T:r+k.length}function l(){var k={line:t,column:r};return function(x){return x.position=new o(k),a(),x}}function o(k){this.start=k,this.end={line:t,column:r},this.source=n.source}o.prototype.content=e;function u(k){var x=new Error(n.source+":"+t+":"+r+": "+k);if(x.reason=k,x.filename=n.source,x.line=t,x.column=r,x.source=e,!n.silent)throw x}function s(k){var x=k.exec(e);if(x){var T=x[0];return i(T),e=e.slice(T.length),x}}function a(){s(Iy)}function c(k){var x;for(k=k||[];x=f();)x!==!1&&k.push(x);return k}function f(){var k=l();if(!(Za!=e.charAt(0)||Ja!=e.charAt(1))){for(var x=2;st!=e.charAt(x)&&(Ja!=e.charAt(x)||Za!=e.charAt(x+1));)++x;if(x+=2,st===e.charAt(x-1))return u("End of comment missing");var T=e.slice(2,x-2);return r+=2,i(T),e=e.slice(x),r+=2,k({type:Fy,comment:T})}}function d(){var k=l(),x=s(Ly);if(x){if(f(),!s(Oy))return u("property missing ':'");var T=s(Ry),h=k({type:jy,property:ec(x[0].replace(Ga,st)),value:T?ec(T[0].replace(Ga,st)):st});return s(Ay),h}}function p(){var k=[];c(k);for(var x;x=d();)x!==!1&&(k.push(x),c(k));return k}return a(),p()};function ec(e){return e?e.replace(My,st):st}var Uy=By;function vd(e,n){var t=null;if(!e||typeof e!="string")return t;for(var r,i=Uy(e),l=typeof n=="function",o,u,s=0,a=i.length;s0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Vy(e){const n=ys(e),t=kd(e);if(n&&t)return{start:n,end:t}}function zr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nc(e.position):"start"in e||"end"in e?nc(e):"line"in e||"column"in e?fu(e):""}function fu(e){return tc(e&&e.line)+":"+tc(e&&e.column)}function nc(e){return fu(e&&e.start)+"-"+fu(e&&e.end)}function tc(e){return e&&typeof e=="number"?e:1}class Re extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?l.ruleId=r:(l.source=r.slice(0,s),l.ruleId=r.slice(s+1))}if(!l.place&&l.ancestors&&l.ancestors){const s=l.ancestors[l.ancestors.length-1];s&&(l.place=s.position)}const u=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=u?u.line:void 0,this.name=zr(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual,this.expected,this.note,this.url}}Re.prototype.file="";Re.prototype.name="";Re.prototype.reason="";Re.prototype.message="";Re.prototype.stack="";Re.prototype.column=void 0;Re.prototype.line=void 0;Re.prototype.ancestors=void 0;Re.prototype.cause=void 0;Re.prototype.fatal=void 0;Re.prototype.place=void 0;Re.prototype.ruleId=void 0;Re.prototype.source=void 0;const vs={}.hasOwnProperty,Wy=new Map,Qy=/[A-Z]/g,Ky=/-([a-z])/g,qy=new Set(["table","tbody","thead","tfoot","tr"]),Yy=new Set(["td","th"]);function Xy(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Gy(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=by(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?yd:Ny,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=wd(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function wd(e,n,t){if(n.type==="element"||n.type==="root"){const r=e.schema;let i=r;n.type==="element"&&n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=yd,e.schema=i),e.ancestors.push(n);let l=Zy(e,n);const o=Jy(e,e.ancestors);let u=e.Fragment;if(e.ancestors.pop(),n.type==="element")if(l&&qy.has(n.tagName)&&(l=l.filter(function(s){return typeof s=="string"?!gy(s):!0})),vs.call(e.components,n.tagName)){const s=n.tagName;u=e.components[s],typeof u!="string"&&u!==e.Fragment&&e.passNode&&(o.node=n)}else u=n.tagName;if(l.length>0){const s=l.length>1?l:l[0];s&&(o.children=s)}return e.schema=r,e.create(n,u,o,t)}if(n.type==="text")return n.value}function by(e,n,t){return r;function r(i,l,o,u){const a=Array.isArray(o.children)?t:n;return u?a(l,o,u):a(l,o)}}function Gy(e,n){return t;function t(r,i,l,o){const u=Array.isArray(l.children),s=ys(r);return n(i,l,o,u,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Zy(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Wy;for(;++ri?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l0?(Sn(e,e.length,0,n),e):n}const lc={}.hasOwnProperty;function a1(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Qt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const p1=rt(/\p{P}/u),kn=rt(/[A-Za-z]/),Qe=rt(/[\dA-Za-z]/),d1=rt(/[#-'*+\--9=?A-Z^-~]/);function pu(e){return e!==null&&(e<32||e===127)}const du=rt(/\d/),h1=rt(/[\dA-Fa-f]/),Cd=rt(/[!-/:-@[-`{-~]/);function B(e){return e!==null&&e<-2}function Ue(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}function m1(e){return Cd(e)||p1(e)}const g1=rt(/\s/);function rt(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function rr(e){const n=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const u=e.charCodeAt(t+1);l<56320&&u>56319&&u<57344?(o=String.fromCharCode(l,u),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function ee(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(s){return q(s)?(e.enter(t),u(s)):n(s)}function u(s){return q(s)&&l++o))return;const N=n.events.length;let L=N,j,R;for(;L--;)if(n.events[L][0]==="exit"&&n.events[L][1].type==="chunkFlow"){if(j){R=n.events[L][1].end;break}j=!0}for(h(r),w=N;wy;){const C=t[S];n.containerState=C[1],C[0].exit.call(n,e)}t.length=y}function m(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function w1(e,n,t){return ee(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function uc(e){if(e===null||Ue(e)||g1(e))return 1;if(m1(e))return 2}function xs(e,n,t){const r=[];let i=-1;for(;++i1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[t][1].start);sc(f,-s),sc(d,s),o={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},u={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:d},l={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},i={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},o.start),e[t][1].start=Object.assign({},u.end),a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=Ze(a,[["enter",e[r][1],n],["exit",e[r][1],n]])),a=Ze(a,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),a=Ze(a,xs(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),a=Ze(a,[["exit",l,n],["enter",u,n],["exit",u,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(c=2,a=Ze(a,[["enter",e[t][1],n],["exit",e[t][1],n]])):c=0,Sn(e,r-1,t-r+3,a),t=r+a.length-c-2;break}}for(t=-1;++t0&&q(w)?ee(e,m,"linePrefix",l+1)(w):m(w)}function m(w){return w===null||B(w)?e.check(ac,x,S)(w):(e.enter("codeFlowValue"),y(w))}function y(w){return w===null||B(w)?(e.exit("codeFlowValue"),m(w)):(e.consume(w),y)}function S(w){return e.exit("codeFenced"),n(w)}function C(w,N,L){let j=0;return R;function R(V){return w.enter("lineEnding"),w.consume(V),w.exit("lineEnding"),A}function A(V){return w.enter("codeFencedFence"),q(V)?ee(w,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):M(V)}function M(V){return V===u?(w.enter("codeFencedFenceSequence"),Y(V)):L(V)}function Y(V){return V===u?(j++,w.consume(V),Y):j>=o?(w.exit("codeFencedFenceSequence"),q(V)?ee(w,le,"whitespace")(V):le(V)):L(V)}function le(V){return V===null||B(V)?(w.exit("codeFencedFence"),N(V)):L(V)}}}function R1(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const oo={name:"codeIndented",tokenize:M1},A1={tokenize:D1,partial:!0};function M1(e,n,t){const r=this;return i;function i(a){return e.enter("codeIndented"),ee(e,l,"linePrefix",4+1)(a)}function l(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(a):t(a)}function o(a){return a===null?s(a):B(a)?e.attempt(A1,o,s)(a):(e.enter("codeFlowValue"),u(a))}function u(a){return a===null||B(a)?(e.exit("codeFlowValue"),o(a)):(e.consume(a),u)}function s(a){return e.exit("codeIndented"),n(a)}}function D1(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):B(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ee(e,l,"linePrefix",4+1)(o)}function l(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(o):B(o)?i(o):t(o)}}const F1={name:"codeText",tokenize:U1,resolve:j1,previous:B1};function j1(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function zd(e,n,t,r,i,l,o,u,s){const a=s||Number.POSITIVE_INFINITY;let c=0;return f;function f(h){return h===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(h),e.exit(l),d):h===null||h===32||h===41||pu(h)?t(h):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(h))}function d(h){return h===62?(e.enter(l),e.consume(h),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===62?(e.exit("chunkString"),e.exit(u),d(h)):h===null||h===60||B(h)?t(h):(e.consume(h),h===92?k:p)}function k(h){return h===60||h===62||h===92?(e.consume(h),p):p(h)}function x(h){return!c&&(h===null||h===41||Ue(h))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),n(h)):c999||p===null||p===91||p===93&&!s||p===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):B(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||B(p)||u++>999?(e.exit("chunkString"),c(p)):(e.consume(p),s||(s=!q(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),u++,f):f(p)}}function Ld(e,n,t,r,i,l){let o;return u;function u(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,s):t(d)}function s(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),a(d))}function a(d){return d===o?(e.exit(l),s(o)):d===null?t(d):B(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ee(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||B(d)?(e.exit("chunkString"),a(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Ir(e,n){let t;return r;function r(i){return B(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):q(i)?ee(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const q1={name:"definition",tokenize:X1},Y1={tokenize:b1,partial:!0};function X1(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return Id.call(r,e,u,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=Qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):t(p)}function s(p){return Ue(p)?Ir(e,a)(p):a(p)}function a(p){return zd(e,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(Y1,f,f)(p)}function f(p){return q(p)?ee(e,d,"whitespace")(p):d(p)}function d(p){return p===null||B(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function b1(e,n,t){return r;function r(u){return Ue(u)?Ir(e,i)(u):t(u)}function i(u){return Ld(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return q(u)?ee(e,o,"whitespace")(u):o(u)}function o(u){return u===null||B(u)?n(u):t(u)}}const G1={name:"hardBreakEscape",tokenize:Z1};function Z1(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return B(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const J1={name:"headingAtx",tokenize:n0,resolve:e0};function e0(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Sn(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function n0(e,n,t){let r=0;return i;function i(c){return e.enter("atxHeading"),l(c)}function l(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||Ue(c)?(e.exit("atxHeadingSequence"),u(c)):t(c)}function u(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||B(c)?(e.exit("atxHeading"),n(c)):q(c)?ee(e,u,"whitespace")(c):(e.enter("atxHeadingText"),a(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),u(c))}function a(c){return c===null||c===35||Ue(c)?(e.exit("atxHeadingText"),u(c)):(e.consume(c),a)}}const t0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],fc=["pre","script","style","textarea"],r0={name:"htmlFlow",tokenize:u0,resolveTo:o0,concrete:!0},i0={tokenize:a0,partial:!0},l0={tokenize:s0,partial:!0};function o0(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function u0(e,n,t){const r=this;let i,l,o,u,s;return a;function a(v){return c(v)}function c(v){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(v),f}function f(v){return v===33?(e.consume(v),d):v===47?(e.consume(v),l=!0,x):v===63?(e.consume(v),i=3,r.interrupt?n:g):kn(v)?(e.consume(v),o=String.fromCharCode(v),T):t(v)}function d(v){return v===45?(e.consume(v),i=2,p):v===91?(e.consume(v),i=5,u=0,k):kn(v)?(e.consume(v),i=4,r.interrupt?n:g):t(v)}function p(v){return v===45?(e.consume(v),r.interrupt?n:g):t(v)}function k(v){const me="CDATA[";return v===me.charCodeAt(u++)?(e.consume(v),u===me.length?r.interrupt?n:M:k):t(v)}function x(v){return kn(v)?(e.consume(v),o=String.fromCharCode(v),T):t(v)}function T(v){if(v===null||v===47||v===62||Ue(v)){const me=v===47,ln=o.toLowerCase();return!me&&!l&&fc.includes(ln)?(i=1,r.interrupt?n(v):M(v)):t0.includes(o.toLowerCase())?(i=6,me?(e.consume(v),h):r.interrupt?n(v):M(v)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(v):l?m(v):y(v))}return v===45||Qe(v)?(e.consume(v),o+=String.fromCharCode(v),T):t(v)}function h(v){return v===62?(e.consume(v),r.interrupt?n:M):t(v)}function m(v){return q(v)?(e.consume(v),m):R(v)}function y(v){return v===47?(e.consume(v),R):v===58||v===95||kn(v)?(e.consume(v),S):q(v)?(e.consume(v),y):R(v)}function S(v){return v===45||v===46||v===58||v===95||Qe(v)?(e.consume(v),S):C(v)}function C(v){return v===61?(e.consume(v),w):q(v)?(e.consume(v),C):y(v)}function w(v){return v===null||v===60||v===61||v===62||v===96?t(v):v===34||v===39?(e.consume(v),s=v,N):q(v)?(e.consume(v),w):L(v)}function N(v){return v===s?(e.consume(v),s=null,j):v===null||B(v)?t(v):(e.consume(v),N)}function L(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||Ue(v)?C(v):(e.consume(v),L)}function j(v){return v===47||v===62||q(v)?y(v):t(v)}function R(v){return v===62?(e.consume(v),A):t(v)}function A(v){return v===null||B(v)?M(v):q(v)?(e.consume(v),A):t(v)}function M(v){return v===45&&i===2?(e.consume(v),pe):v===60&&i===1?(e.consume(v),ce):v===62&&i===4?(e.consume(v),Q):v===63&&i===3?(e.consume(v),g):v===93&&i===5?(e.consume(v),F):B(v)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(i0,b,Y)(v)):v===null||B(v)?(e.exit("htmlFlowData"),Y(v)):(e.consume(v),M)}function Y(v){return e.check(l0,le,b)(v)}function le(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),V}function V(v){return v===null||B(v)?Y(v):(e.enter("htmlFlowData"),M(v))}function pe(v){return v===45?(e.consume(v),g):M(v)}function ce(v){return v===47?(e.consume(v),o="",I):M(v)}function I(v){if(v===62){const me=o.toLowerCase();return fc.includes(me)?(e.consume(v),Q):M(v)}return kn(v)&&o.length<8?(e.consume(v),o+=String.fromCharCode(v),I):M(v)}function F(v){return v===93?(e.consume(v),g):M(v)}function g(v){return v===62?(e.consume(v),Q):v===45&&i===2?(e.consume(v),g):M(v)}function Q(v){return v===null||B(v)?(e.exit("htmlFlowData"),b(v)):(e.consume(v),Q)}function b(v){return e.exit("htmlFlow"),n(v)}}function s0(e,n,t){const r=this;return i;function i(o){return B(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function a0(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Nl,n,t)}}const c0={name:"htmlText",tokenize:f0};function f0(e,n,t){const r=this;let i,l,o;return u;function u(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),s}function s(g){return g===33?(e.consume(g),a):g===47?(e.consume(g),C):g===63?(e.consume(g),y):kn(g)?(e.consume(g),L):t(g)}function a(g){return g===45?(e.consume(g),c):g===91?(e.consume(g),l=0,k):kn(g)?(e.consume(g),m):t(g)}function c(g){return g===45?(e.consume(g),p):t(g)}function f(g){return g===null?t(g):g===45?(e.consume(g),d):B(g)?(o=f,ce(g)):(e.consume(g),f)}function d(g){return g===45?(e.consume(g),p):f(g)}function p(g){return g===62?pe(g):g===45?d(g):f(g)}function k(g){const Q="CDATA[";return g===Q.charCodeAt(l++)?(e.consume(g),l===Q.length?x:k):t(g)}function x(g){return g===null?t(g):g===93?(e.consume(g),T):B(g)?(o=x,ce(g)):(e.consume(g),x)}function T(g){return g===93?(e.consume(g),h):x(g)}function h(g){return g===62?pe(g):g===93?(e.consume(g),h):x(g)}function m(g){return g===null||g===62?pe(g):B(g)?(o=m,ce(g)):(e.consume(g),m)}function y(g){return g===null?t(g):g===63?(e.consume(g),S):B(g)?(o=y,ce(g)):(e.consume(g),y)}function S(g){return g===62?pe(g):y(g)}function C(g){return kn(g)?(e.consume(g),w):t(g)}function w(g){return g===45||Qe(g)?(e.consume(g),w):N(g)}function N(g){return B(g)?(o=N,ce(g)):q(g)?(e.consume(g),N):pe(g)}function L(g){return g===45||Qe(g)?(e.consume(g),L):g===47||g===62||Ue(g)?j(g):t(g)}function j(g){return g===47?(e.consume(g),pe):g===58||g===95||kn(g)?(e.consume(g),R):B(g)?(o=j,ce(g)):q(g)?(e.consume(g),j):pe(g)}function R(g){return g===45||g===46||g===58||g===95||Qe(g)?(e.consume(g),R):A(g)}function A(g){return g===61?(e.consume(g),M):B(g)?(o=A,ce(g)):q(g)?(e.consume(g),A):j(g)}function M(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,Y):B(g)?(o=M,ce(g)):q(g)?(e.consume(g),M):(e.consume(g),le)}function Y(g){return g===i?(e.consume(g),i=void 0,V):g===null?t(g):B(g)?(o=Y,ce(g)):(e.consume(g),Y)}function le(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||Ue(g)?j(g):(e.consume(g),le)}function V(g){return g===47||g===62||Ue(g)?j(g):t(g)}function pe(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function ce(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),I}function I(g){return q(g)?ee(e,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):F(g)}function F(g){return e.enter("htmlTextData"),o(g)}}const ws={name:"labelEnd",tokenize:y0,resolveTo:g0,resolveAll:m0},p0={tokenize:v0},d0={tokenize:k0},h0={tokenize:x0};function m0(e){let n=-1;for(;++n=3&&(a===null||B(a))?(e.exit("thematicBreak"),n(a)):t(a)}function s(a){return a===i?(e.consume(a),r++,s):(e.exit("thematicBreakSequence"),q(a)?ee(e,u,"whitespace")(a):u(a))}}const Ae={name:"list",tokenize:z0,continuation:{tokenize:I0},exit:O0},N0={tokenize:R0,partial:!0},T0={tokenize:L0,partial:!0};function z0(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return u;function u(p){const k=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:du(p)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Mi,t,a)(p):a(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return t(p)}function s(p){return du(p)&&++o<10?(e.consume(p),s):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),a(p)):t(p)}function a(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Nl,r.interrupt?t:c,e.attempt(N0,d,f))}function c(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return q(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function I0(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Nl,i,l);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ee(e,n,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!q(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(T0,n,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ee(e,e.attempt(Ae,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function L0(e,n,t){const r=this;return ee(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function O0(e){e.exit(this.containerState.type)}function R0(e,n,t){const r=this;return ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(l){const o=r.events[r.events.length-1];return!q(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const pc={name:"setextUnderline",tokenize:M0,resolveTo:A0};function A0(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[l][1].end)):e[r][1]=o,e.push(["exit",o,n]),e}function M0(e,n,t){const r=this;let i;return l;function l(a){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=a,o(a)):t(a)}function o(a){return e.enter("setextHeadingLineSequence"),u(a)}function u(a){return a===i?(e.consume(a),u):(e.exit("setextHeadingLineSequence"),q(a)?ee(e,s,"lineSuffix")(a):s(a))}function s(a){return a===null||B(a)?(e.exit("setextHeadingLine"),n(a)):t(a)}}const D0={tokenize:F0};function F0(e){const n=this,t=e.attempt(Nl,r,e.attempt(this.parser.constructs.flowInitial,i,ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt($1,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const j0={resolveAll:Rd()},B0=Od("string"),U0=Od("text");function Od(e){return{tokenize:n,resolveAll:Rd(e==="text"?H0:void 0)};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,u);return o;function o(c){return a(c)?l(c):u(c)}function u(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),s}function s(c){return a(c)?(t.exit("data"),l(c)):(t.consume(c),s)}function a(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function W0(e,n){let t=-1;const r=[];let i;for(;++t<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(t,{is:r.is}):(e=o.createElement(t),t==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,t),e[vn]=n,e[Hr]=r,Lp(e,n,!1,!1),n.stateNode=e;e:{switch(o=To(t,r),t){case"dialog":te("cancel",e),te("close",e),i=r;break;case"iframe":case"object":case"embed":te("load",e),i=r;break;case"video":case"audio":for(i=0;iZt&&(n.flags|=128,r=!0,pr(l,!1),n.lanes=4194304)}else{if(!r)if(e=Ji(o),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),pr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!ie)return _e(n),null}else 2*fe()-l.renderingStartTime>Zt&&t!==1073741824&&(n.flags|=128,r=!0,pr(l,!1),n.lanes=4194304);l.isBackwards?(o.sibling=n.child,n.child=o):(t=l.last,t!==null?t.sibling=o:n.child=o,l.last=o)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=fe(),n.sibling=null,t=oe.current,J(oe,r?t&1|2:t&1),n):(_e(n),null);case 22:case 23:return ls(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?Ve&1073741824&&(_e(n),n.subtreeFlags&6&&(n.flags|=8192)):_e(n),null;case 24:return null;case 25:return null}throw Error(P(156,n.tag))}function ig(e,n){switch(Bu(n),n.tag){case 1:return Fe(n.type)&&bi(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Xt(),re(je),re(Te),Ku(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return qu(n),null;case 13:if(re(oe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(P(340));Kt()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return re(oe),null;case 4:return Xt(),null;case 10:return Vu(n.type._context),null;case 22:case 23:return ls(),null;case 24:return null;default:return null}}var mi=!1,Ne=!1,lg=typeof WeakSet=="function"?WeakSet:Set,O=null;function Dt(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){ae(e,n,r)}else t.current=null}function nu(e,n,t){try{t()}catch(r){ae(e,n,r)}}var Ia=!1;function og(e,n){if(Fo=$i,e=jf(),ju(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{t.nodeType,l.nodeType}catch{t=null;break e}var o=0,u=-1,s=-1,a=0,c=0,f=e,d=null;n:for(;;){for(var p;f!==t||i!==0&&f.nodeType!==3||(u=o+i),f!==l||r!==0&&f.nodeType!==3||(s=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break n;if(d===t&&++a===i&&(u=o),d===l&&++c===r&&(s=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}t=u===-1||s===-1?null:{start:u,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(Bo={focusedElem:e,selectionRange:t},$i=!1,O=n;O!==null;)if(n=O,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,O=e;else for(;O!==null;){n=O;try{var k=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var w=k.memoizedProps,T=k.memoizedState,h=n.stateNode,m=h.getSnapshotBeforeUpdate(n.elementType===n.type?w:sn(n.type,w),T);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=n.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(S){ae(n,n.return,S)}if(e=n.sibling,e!==null){e.return=n.return,O=e;break}O=n.return}return k=Ia,Ia=!1,k}function _r(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&nu(n,t,l)}i=i.next}while(i!==r)}}function wl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function tu(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Ap(e){var n=e.alternate;n!==null&&(e.alternate=null,Ap(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[vn],delete n[Hr],delete n[$o],delete n[$m],delete n[Vm])),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 La(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 ru(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Qi));else if(r!==4&&(e=e.child,e!==null))for(ru(e,n,t),e=e.sibling;e!==null;)ru(e,n,t),e=e.sibling}function iu(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(iu(e,n,t),e=e.sibling;e!==null;)iu(e,n,t),e=e.sibling}var xe=null,an=!1;function Dn(e,n,t){for(t=t.child;t!==null;)Dp(e,n,t),t=t.sibling}function Dp(e,n,t){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(pl,t)}catch{}switch(t.tag){case 5:Ne||Dt(t,n);case 6:var r=xe,i=an;xe=null,Dn(e,n,t),xe=r,an=i,xe!==null&&(an?(e=xe,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):xe.removeChild(t.stateNode));break;case 18:xe!==null&&(an?(e=xe,t=t.stateNode,e.nodeType===8?ql(e.parentNode,t):e.nodeType===1&&ql(e,t),Dr(e)):ql(xe,t.stateNode));break;case 4:r=xe,i=an,xe=t.stateNode.containerInfo,an=!0,Dn(e,n,t),xe=r,an=i;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&nu(t,n,o),i=i.next}while(i!==r)}Dn(e,n,t);break;case 1:if(!Ne&&(Dt(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(u){ae(t,n,u)}Dn(e,n,t);break;case 21:Dn(e,n,t);break;case 22:t.mode&1?(Ne=(r=Ne)||t.memoizedState!==null,Dn(e,n,t),Ne=r):Dn(e,n,t);break;default:Dn(e,n,t)}}function Oa(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new lg),n.forEach(function(r){var i=mg.bind(null,e,r);t.has(r)||(t.add(r),r.then(i,i))})}}function un(e,n){var t=n.deletions;if(t!==null)for(var r=0;ri&&(i=o),r&=~l}if(r=i,r=fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sg(r/1960))-r,10e?16:e,Vn===null)var r=!1;else{if(e=Vn,Vn=null,il=0,b&6)throw Error(P(331));var i=b;for(b|=4,O=e.current;O!==null;){var l=O,o=l.child;if(O.flags&16){var u=l.deletions;if(u!==null){for(var s=0;sfe()-rs?pt(e,0):ts|=t),Be(e,n)}function Wp(e,n){n===0&&(e.mode&1?(n=oi,oi<<=1,!(oi&130023424)&&(oi=4194304)):n=1);var t=Ie();e=On(e,n),e!==null&&(Yr(e,n,t),Be(e,t))}function hg(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Wp(e,t)}function mg(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(t=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(n),Wp(e,t)}var Qp;Qp=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||je.current)De=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return De=!1,tg(e,n,t);De=!!(e.flags&131072)}else De=!1,ie&&n.flags&1048576&&Kf(n,Yi,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;Li(e,n),e=n.pendingProps;var i=qt(n,Te.current);$t(n,t),i=Xu(null,n,r,e,i,t);var l=Gu();return n.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,Fe(r)?(l=!0,qi(n)):l=!1,n.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Qu(n),i.updater=vl,n.stateNode=i,i._reactInternals=n,Ko(n,r,e,t),n=Go(null,n,r,!0,l,t)):(n.tag=0,ie&&l&&Fu(n),ze(null,n,i,t),n=n.child),n;case 16:r=n.elementType;e:{switch(Li(e,n),e=n.pendingProps,i=r._init,r=i(r._payload),n.type=r,i=n.tag=yg(r),e=sn(r,e),i){case 0:n=Xo(null,n,r,e,t);break e;case 1:n=Na(null,n,r,e,t);break e;case 11:n=Pa(null,n,r,e,t);break e;case 14:n=_a(null,n,r,sn(r.type,e),t);break e}throw Error(P(306,r,""))}return n;case 0:return r=n.type,i=n.pendingProps,i=n.elementType===r?i:sn(r,i),Xo(e,n,r,i,t);case 1:return r=n.type,i=n.pendingProps,i=n.elementType===r?i:sn(r,i),Na(e,n,r,i,t);case 3:e:{if(Tp(n),e===null)throw Error(P(387));r=n.pendingProps,l=n.memoizedState,i=l.element,Zf(e,n),Zi(n,r,null,t);var o=n.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},n.updateQueue.baseState=l,n.memoizedState=l,n.flags&256){i=Gt(Error(P(423)),n),n=Ta(e,n,r,t,i);break e}else if(r!==i){i=Gt(Error(P(424)),n),n=Ta(e,n,r,t,i);break e}else for(We=qn(n.stateNode.containerInfo.firstChild),be=n,ie=!0,cn=null,t=tp(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Kt(),r===i){n=Rn(e,n,t);break e}ze(e,n,r,t)}n=n.child}return n;case 5:return rp(n),e===null&&Qo(n),r=n.type,i=n.pendingProps,l=e!==null?e.memoizedProps:null,o=i.children,Uo(r,i)?o=null:l!==null&&Uo(r,l)&&(n.flags|=32),Np(e,n),ze(e,n,o,t),n.child;case 6:return e===null&&Qo(n),null;case 13:return zp(e,n,t);case 4:return bu(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=Yt(n,null,r,t):ze(e,n,r,t),n.child;case 11:return r=n.type,i=n.pendingProps,i=n.elementType===r?i:sn(r,i),Pa(e,n,r,i,t);case 7:return ze(e,n,n.pendingProps,t),n.child;case 8:return ze(e,n,n.pendingProps.children,t),n.child;case 12:return ze(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,i=n.pendingProps,l=n.memoizedProps,o=i.value,J(Xi,r._currentValue),r._currentValue=o,l!==null)if(dn(l.value,o)){if(l.children===i.children&&!je.current){n=Rn(e,n,t);break e}}else for(l=n.child,l!==null&&(l.return=n);l!==null;){var u=l.dependencies;if(u!==null){o=l.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(l.tag===1){s=zn(-1,t&-t),s.tag=2;var a=l.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}}l.lanes|=t,s=l.alternate,s!==null&&(s.lanes|=t),bo(l.return,t,n),u.lanes|=t;break}s=s.next}}else if(l.tag===10)o=l.type===n.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(P(341));o.lanes|=t,u=o.alternate,u!==null&&(u.lanes|=t),bo(o,t,n),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===n){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}ze(e,n,i.children,t),n=n.child}return n;case 9:return i=n.type,r=n.pendingProps.children,$t(n,t),i=nn(i),r=r(i),n.flags|=1,ze(e,n,r,t),n.child;case 14:return r=n.type,i=sn(r,n.pendingProps),i=sn(r.type,i),_a(e,n,r,i,t);case 15:return Pp(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,i=n.pendingProps,i=n.elementType===r?i:sn(r,i),Li(e,n),n.tag=1,Fe(r)?(e=!0,qi(n)):e=!1,$t(n,t),ep(n,r,i),Ko(n,r,i,t),Go(null,n,r,!0,e,t);case 19:return Ip(e,n,t);case 22:return _p(e,n,t)}throw Error(P(156,n.tag))};function bp(e,n){return vf(e,n)}function gg(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,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 Je(e,n,t,r){return new gg(e,n,t,r)}function us(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yg(e){if(typeof e=="function")return us(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_u)return 11;if(e===Nu)return 14}return 2}function Gn(e,n){var t=e.alternate;return t===null?(t=Je(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Ai(e,n,t,r,i,l){var o=2;if(r=e,typeof e=="function")us(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Nt:return dt(t.children,i,l,n);case Pu:o=8,i|=8;break;case vo:return e=Je(12,t,n,i|2),e.elementType=vo,e.lanes=l,e;case ko:return e=Je(13,t,n,i),e.elementType=ko,e.lanes=l,e;case wo:return e=Je(19,t,n,i),e.elementType=wo,e.lanes=l,e;case ef:return Sl(t,i,l,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zc:o=10;break e;case Jc:o=9;break e;case _u:o=11;break e;case Nu:o=14;break e;case Fn:o=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return n=Je(o,t,n,i),n.elementType=e,n.type=r,n.lanes=l,n}function dt(e,n,t,r){return e=Je(7,e,r,n),e.lanes=t,e}function Sl(e,n,t,r){return e=Je(22,e,r,n),e.elementType=ef,e.lanes=t,e.stateNode={isHidden:!1},e}function no(e,n,t){return e=Je(6,e,null,n),e.lanes=t,e}function to(e,n,t){return n=Je(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function vg(e,n,t,r,i){this.tag=n,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=Dl(0),this.expirationTimes=Dl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ss(e,n,t,r,i,l,o,u,s){return e=new vg(e,n,t,u,s),n===1?(n=1,l===!0&&(n|=8)):n=0,l=Je(3,null,null,n),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qu(l),e}function kg(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xp)}catch(e){console.error(e)}}Xp(),qc.exports=Ke;var ps=qc.exports,Ua=ps;go.createRoot=Ua.createRoot,go.hydrateRoot=Ua.hydrateRoot;const Cg="_canvas_1pk4t_1",Pg="_canvasWrapper_1pk4t_8",Ha={canvas:Cg,canvasWrapper:Pg},_g=(e,n)=>{const t=e.x,r=e.y,i=n.x,l=n.y;return Math.sqrt(Math.pow(t-i,2)+Math.pow(r-l,2))<=42},Ng=(e,n,t)=>e.x-n>=0&&e.y-n>=0&&e.x+n<=t.current.clientWidth&&e.y+n<=t.current.clientHeight,Tg=(e,n,t,r)=>n.some(o=>_g(o,e))?(r({show:!0,text:"New node is too close to an existing node."}),!1):Ng(e,20,t)?!0:(r({show:!0,text:"New node is out of bounds."}),!1),zg=(e,n,t)=>n.some(i=>i.firstNode.x===e.firstNode.x&&i.firstNode.y===e.firstNode.y&&i.secondNode.x===e.secondNode.x&&i.secondNode.y===e.secondNode.y||i.firstNode.x===e.secondNode.x&&i.firstNode.y===e.secondNode.y&&i.secondNode.x===e.firstNode.x&&i.secondNode.y===e.firstNode.y)?(t({show:!0,text:"An edge with the same coordinates already exists."}),!1):!0;var Gp={exports:{}},Ig="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lg=Ig,Og=Lg;function Zp(){}function Jp(){}Jp.resetWarningCache=Zp;var Rg=function(){function e(r,i,l,o,u,s){if(s!==Og){var a=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 a.name="Invariant Violation",a}}e.isRequired=e;function n(){return e}var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:Jp,resetWarningCache:Zp};return t.PropTypes=t,t};Gp.exports=Rg();var Ag=Gp.exports;const ye=cl(Ag),ds=Se.createContext(),Mg=()=>{const[e,n]=Se.useState([]),[t,r]=Se.useState([]);return{nodes:e,setNodes:n,edges:t,setEdges:r}},ed=({children:e})=>{const n=Mg();return D.jsx(ds.Provider,{value:n,children:e})};ed.propTypes={children:ye.node.isRequired};const Dg="_node_11j8y_1",jg="_bump_11j8y_1",Fg="_circle_11j8y_8",Bg="_text_11j8y_17",ro={node:Dg,bump:jg,circle:Fg,text:Bg},nd=({id:e,cx:n,cy:t,onNodeClick:r})=>D.jsxs("g",{className:ro.node,onClick:i=>r(i,{id:e,x:n,y:t}),children:[D.jsx("circle",{className:ro.circle,id:e,cx:n,cy:t,r:"20"}),D.jsx("text",{className:ro.text,x:n,y:t,textAnchor:"middle",dominantBaseline:"middle",children:e})]});nd.propTypes={onNodeClick:ye.func.isRequired,id:ye.number.isRequired,cx:ye.number.isRequired,cy:ye.number.isRequired};const td=({nodes:e,onNodeClick:n})=>D.jsx(D.Fragment,{children:e.map(t=>D.jsx(nd,{id:t.id,cx:t.x,cy:t.y,onNodeClick:n},t.id))});td.propTypes={nodes:ye.array.isRequired,onNodeClick:ye.func.isRequired};const Ug="_line_16v5c_1",Hg="_drawLine_16v5c_1",$g="_text_16v5c_15",$a={line:Ug,drawLine:Hg,text:$g},rd=({id:e,x1:n,y1:t,x2:r,y2:i,weight:l})=>D.jsxs("g",{children:[D.jsx("line",{className:$a.line,id:e,x1:n,y1:t,x2:r,y2:i}),D.jsx("text",{className:$a.text,x:(n+r)/2,y:(t+i)/2,fill:"white",children:l})]});rd.propTypes={id:ye.string.isRequired,x1:ye.number.isRequired,y1:ye.number.isRequired,x2:ye.number.isRequired,y2:ye.number.isRequired};const id=({edges:e})=>D.jsx(D.Fragment,{children:e.map(n=>D.jsx(Qc.Fragment,{children:D.jsx(rd,{id:n.id,x1:n.firstNode.x,y1:n.firstNode.y,x2:n.secondNode.x,y2:n.secondNode.y,weight:n.weight})},n.id))});id.propTypes={edges:ye.arrayOf(ye.shape({id:ye.string.isRequired,weight:ye.number.isRequired,firstNode:ye.object.isRequired,secondNode:ye.object.isRequired})).isRequired};const Vg="_overlay_14w4b_1",Wg="_ErrorModal_14w4b_11",Qg="_errorText_14w4b_28",bg="_close_14w4b_31",qg="_img_14w4b_48",hr={overlay:Vg,ErrorModal:Wg,errorText:Qg,close:bg,img:qg},Kg="/dijkstra-prim-visualization/assets/close-cef0fcd2.svg",Yg=({errorText:e,onClose:n})=>D.jsx("div",{className:hr.overlay,onClick:n,children:D.jsxs("div",{className:hr.ErrorModal,children:[D.jsx("p",{className:hr.errorText,children:e}),D.jsx("button",{className:hr.close,onClick:n,children:D.jsx("img",{className:hr.img,src:Kg})})]})}),hs=Se.createContext(),Xg=()=>{const[e,n]=Se.useState(!1),[t,r]=Se.useState(!1);return{showErrorModal:e,setShowErrorModal:n,showPaperModal:t,setShowPaperModal:r}},ld=({children:e})=>{const n=Xg();return D.jsx(hs.Provider,{value:n,children:e})};ld.propTypes={children:ye.node.isRequired};const Gg=100,Zg=()=>{const{nodes:e,setNodes:n,edges:t,setEdges:r}=Se.useContext(ds),{showErrorModal:i,setShowErrorModal:l}=Se.useContext(hs),o={isClicked:!1,node:null},[u,s]=Se.useState(o),a=Se.useRef(null),c=d=>{u.isClicked&&(document.getElementById(u.node.id).style.fill="#d69edd",s(o));const p=d.clientX,k=d.clientY,w=p-a.current.getBoundingClientRect().left,T=k-a.current.getBoundingClientRect().top,h={id:e.length,x:w,y:T};Tg(h,e,a,l)&&n(m=>[...m,h])},f=(d,p)=>{d.stopPropagation();const k=(w,T)=>{const h={id:`${w.id}-${T.id}`,weight:Math.floor(Math.random()*Gg)+1,firstNode:w,secondNode:T};zg(h,t,l)&&r(m=>[...m,h])};u.isClicked?u.node.x===p.x&&u.node.y===p.y?(l({show:!0,text:"same node clicked again, reset the first clicked node"}),s(o),document.getElementById(p.id).style.fill="#d69edd"):(k(u.node,p),s(o),document.getElementById(u.node.id).style.fill="#d69edd"):(s({isClicked:!0,node:p}),document.getElementById(p.id).style.fill="#3f2873")};return D.jsxs(D.Fragment,{children:[D.jsx("div",{className:Ha.canvasWrapper,children:D.jsxs("svg",{ref:a,className:Ha.canvas,onClick:c,children:[D.jsx(id,{edges:t}),D.jsx(td,{nodes:e,onNodeClick:f})]})}),i.show&&ps.createPortal(D.jsx(Yg,{errorText:i.text,onClose:()=>l({show:!1,text:null})}),document.body)]})},vi=e=>new Promise(n=>setTimeout(n,e)),Va=async e=>{const n=async i=>{for(const l of i){for(const u of l.edgeIds){const s=document.getElementById(u);s.style.stroke="yellow",await vi(500),t(u),await vi(500)}const o=document.getElementById(l.selectedEdgeId);o.style.stroke="#3fb950",o.style.strokeWidth="8",await vi(1e3)}for(const l of i){const o=document.getElementById(l.selectedEdgeId);o.style.stroke="#c709cb"}await vi(5e3)},t=i=>{const l=document.getElementById(i);l.style.stroke="#33b3ae",l.style.strokeWidth="2"},r=async i=>{i.forEach(l=>{t(l.selectedEdgeId),l.edgeIds.forEach(o=>t(o))})};await n(e.animations),await r(e.animations)},Wa=(e,n)=>({node:e,weight:n}),od=(e,n)=>{const t=new Array(e.length).fill(null);return n.map(r=>({from:r.firstNode.id,to:r.secondNode.id,weight:r.weight})).forEach(r=>{Array.isArray(t[r.from])||(t[r.from]=new Array),t[r.from].push(Wa(r.to,r.weight)),Array.isArray(t[r.to])||(t[r.to]=new Array),t[r.to].push(Wa(r.from,r.weight))}),t},ud=function(e){const n=(s,a)=>({key:s,value:a});let t=0;const r=new Array(e+1),i=new Array(e);r[0]=n(-1,-1/0);const l=(s,a)=>{[r[s],r[a]]=[r[a],r[s]]},o=s=>{let a=Math.floor(s/2),c=s;for(;c>0&&r[a].value>r[c].value;){const f=r[a],d=r[c];i[d.key]=a,i[f.key]=c,l(c,a),c=a,a=Math.floor(a/2)}},u=s=>{let a=s,c=2*s,f=2*s+1;if(cr[c].value&&(a=c),fr[f].value&&(a=f),a!=s){const d=r[a],p=r[s];i[d.key]=s,i[p.key]=a,l(s,a),u(a)}};this.isEmpty=()=>t==0,this.insert=(s,a)=>{t++,r[t]=n(s,a),i[s]=t,o(t)},this.extractMin=()=>{const s=r[1],a=r[t];return i[a.key]=1,r[1]=a,r[t]=null,u(1),t--,s},this.decreaseKey=(s,a)=>{const c=i[s],f=r[c];f.value=a,o(c)}},Jg=(e,n)=>{const t=e.length,r=new n(t),i=new Array(t),l=[],o=new Array(t),u=new Array(t);r.insert(0,0),i[0]=!0,o[0]=1/0;for(let a=1;a{i[f.node]&&(s.push({from:a.key,to:f.node,weight:f.weight}),o[f.node]>f.weight&&(r.decreaseKey(f.node,f.weight),u[f.node]=a,o[f.node]=f.weight))})}return l},ey=e=>{let n=0;for(let t=0;t{const t=od(e,n),r=Jg(t,ud);return ey(r)},ty=(e,n)=>{const t=e.length,r=0,i=t-1,l=new n(t),o=new Array(t),u=new Array(t);l.insert(0,0),o[0]=0;for(let c=1;c{const p=o[c.key]+d.weight;p({steps:e.steps.reverse().map(n=>(n.subSteps=[],n)),total:e.total}),iy=(e,n)=>{const t=od(e,n),r=ty(t,ud);return ry(r)},ly=(e,n)=>{const t=ny(e,n);return sd(t)},oy=(e,n)=>{const t=iy(e,n);return sd(t)},Qa=(e,n)=>document.getElementById(`${e}-${n}`)?`${e}-${n}`:`${n}-${e}`,sd=e=>({animations:e.steps.map(n=>({selectedEdgeId:Qa(n.from,n.to),edgeIds:n.subSteps.map(t=>Qa(t.from,t.to)),weight:n.weight})),total:e.total}),uy=(e,n)=>n.some(t=>t.firstNode.id===e.id||t.secondNode.id===e.id),ba=(e,n)=>e.every(t=>uy(t,n)),sy="_Navbar_37c52_1",ay="_clearCanvas_37c52_1",qa={Navbar:sy,clearCanvas:ay},cy="_overlay_1mhav_1",fy="_PaperModal_1mhav_11",py="_close_1mhav_31",dy="_img_1mhav_47",ki={overlay:cy,PaperModal:fy,close:py,img:dy};function hy(e,n){const t=n||{};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const my=/[ \t\n\f\r]/g;function gy(e){return typeof e=="object"?e.type==="text"?Ka(e.value):!1:Ka(e)}function Ka(e){return e.replace(my,"")===""}class Jr{constructor(n,t,r){this.property=n,this.normal=t,r&&(this.space=r)}}Jr.prototype.property={};Jr.prototype.normal={};Jr.prototype.space=null;function ad(e,n){const t={},r={};let i=-1;for(;++i4&&t.slice(0,4)==="data"&&xy.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Xa,Py);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Xa.test(l)){let o=l.replace(Sy,Cy);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=ms}return new i(r,n)}function Cy(e){return"-"+e.toLowerCase()}function Py(e){return e.charAt(1).toUpperCase()}const _y={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ny=ad([pd,fd,md,gd,ky],"html"),yd=ad([pd,fd,md,gd,wy],"svg");function Ty(e){return e.join(" ").trim()}var gs={exports:{}},Ga=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zy=/\n/g,Iy=/^\s*/,Ly=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Oy=/^:\s*/,Ry=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ay=/^[;\s]*/,My=/^\s+|\s+$/g,Dy=` +`,Za="/",Ja="*",st="",jy="comment",Fy="declaration",By=function(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(k){var w=k.match(zy);w&&(t+=w.length);var T=k.lastIndexOf(Dy);r=~T?k.length-T:r+k.length}function l(){var k={line:t,column:r};return function(w){return w.position=new o(k),a(),w}}function o(k){this.start=k,this.end={line:t,column:r},this.source=n.source}o.prototype.content=e;function u(k){var w=new Error(n.source+":"+t+":"+r+": "+k);if(w.reason=k,w.filename=n.source,w.line=t,w.column=r,w.source=e,!n.silent)throw w}function s(k){var w=k.exec(e);if(w){var T=w[0];return i(T),e=e.slice(T.length),w}}function a(){s(Iy)}function c(k){var w;for(k=k||[];w=f();)w!==!1&&k.push(w);return k}function f(){var k=l();if(!(Za!=e.charAt(0)||Ja!=e.charAt(1))){for(var w=2;st!=e.charAt(w)&&(Ja!=e.charAt(w)||Za!=e.charAt(w+1));)++w;if(w+=2,st===e.charAt(w-1))return u("End of comment missing");var T=e.slice(2,w-2);return r+=2,i(T),e=e.slice(w),r+=2,k({type:jy,comment:T})}}function d(){var k=l(),w=s(Ly);if(w){if(f(),!s(Oy))return u("property missing ':'");var T=s(Ry),h=k({type:Fy,property:ec(w[0].replace(Ga,st)),value:T?ec(T[0].replace(Ga,st)):st});return s(Ay),h}}function p(){var k=[];c(k);for(var w;w=d();)w!==!1&&(k.push(w),c(k));return k}return a(),p()};function ec(e){return e?e.replace(My,st):st}var Uy=By;function vd(e,n){var t=null;if(!e||typeof e!="string")return t;for(var r,i=Uy(e),l=typeof n=="function",o,u,s=0,a=i.length;s0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Vy(e){const n=ys(e),t=kd(e);if(n&&t)return{start:n,end:t}}function zr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nc(e.position):"start"in e||"end"in e?nc(e):"line"in e||"column"in e?fu(e):""}function fu(e){return tc(e&&e.line)+":"+tc(e&&e.column)}function nc(e){return fu(e&&e.start)+"-"+fu(e&&e.end)}function tc(e){return e&&typeof e=="number"?e:1}class Re extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?l.ruleId=r:(l.source=r.slice(0,s),l.ruleId=r.slice(s+1))}if(!l.place&&l.ancestors&&l.ancestors){const s=l.ancestors[l.ancestors.length-1];s&&(l.place=s.position)}const u=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=u?u.line:void 0,this.name=zr(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual,this.expected,this.note,this.url}}Re.prototype.file="";Re.prototype.name="";Re.prototype.reason="";Re.prototype.message="";Re.prototype.stack="";Re.prototype.column=void 0;Re.prototype.line=void 0;Re.prototype.ancestors=void 0;Re.prototype.cause=void 0;Re.prototype.fatal=void 0;Re.prototype.place=void 0;Re.prototype.ruleId=void 0;Re.prototype.source=void 0;const vs={}.hasOwnProperty,Wy=new Map,Qy=/[A-Z]/g,by=/-([a-z])/g,qy=new Set(["table","tbody","thead","tfoot","tr"]),Ky=new Set(["td","th"]);function Yy(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Gy(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Xy(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?yd:Ny,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=xd(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function xd(e,n,t){if(n.type==="element"||n.type==="root"){const r=e.schema;let i=r;n.type==="element"&&n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=yd,e.schema=i),e.ancestors.push(n);let l=Zy(e,n);const o=Jy(e,e.ancestors);let u=e.Fragment;if(e.ancestors.pop(),n.type==="element")if(l&&qy.has(n.tagName)&&(l=l.filter(function(s){return typeof s=="string"?!gy(s):!0})),vs.call(e.components,n.tagName)){const s=n.tagName;u=e.components[s],typeof u!="string"&&u!==e.Fragment&&e.passNode&&(o.node=n)}else u=n.tagName;if(l.length>0){const s=l.length>1?l:l[0];s&&(o.children=s)}return e.schema=r,e.create(n,u,o,t)}if(n.type==="text")return n.value}function Xy(e,n,t){return r;function r(i,l,o,u){const a=Array.isArray(o.children)?t:n;return u?a(l,o,u):a(l,o)}}function Gy(e,n){return t;function t(r,i,l,o){const u=Array.isArray(l.children),s=ys(r);return n(i,l,o,u,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Zy(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Wy;for(;++ri?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l0?(Sn(e,e.length,0,n),e):n}const lc={}.hasOwnProperty;function a1(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Qt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const p1=rt(/\p{P}/u),kn=rt(/[A-Za-z]/),Qe=rt(/[\dA-Za-z]/),d1=rt(/[#-'*+\--9=?A-Z^-~]/);function pu(e){return e!==null&&(e<32||e===127)}const du=rt(/\d/),h1=rt(/[\dA-Fa-f]/),Cd=rt(/[!-/:-@[-`{-~]/);function B(e){return e!==null&&e<-2}function Ue(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}function m1(e){return Cd(e)||p1(e)}const g1=rt(/\s/);function rt(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function rr(e){const n=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const u=e.charCodeAt(t+1);l<56320&&u>56319&&u<57344?(o=String.fromCharCode(l,u),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function ee(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(s){return q(s)?(e.enter(t),u(s)):n(s)}function u(s){return q(s)&&l++o))return;const N=n.events.length;let L=N,F,R;for(;L--;)if(n.events[L][0]==="exit"&&n.events[L][1].type==="chunkFlow"){if(F){R=n.events[L][1].end;break}F=!0}for(h(r),x=N;xy;){const C=t[S];n.containerState=C[1],C[0].exit.call(n,e)}t.length=y}function m(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function x1(e,n,t){return ee(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function uc(e){if(e===null||Ue(e)||g1(e))return 1;if(m1(e))return 2}function ws(e,n,t){const r=[];let i=-1;for(;++i1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[t][1].start);sc(f,-s),sc(d,s),o={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},u={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:d},l={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},i={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},o.start),e[t][1].start=Object.assign({},u.end),a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=Ze(a,[["enter",e[r][1],n],["exit",e[r][1],n]])),a=Ze(a,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),a=Ze(a,ws(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),a=Ze(a,[["exit",l,n],["enter",u,n],["exit",u,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(c=2,a=Ze(a,[["enter",e[t][1],n],["exit",e[t][1],n]])):c=0,Sn(e,r-1,t-r+3,a),t=r+a.length-c-2;break}}for(t=-1;++t0&&q(x)?ee(e,m,"linePrefix",l+1)(x):m(x)}function m(x){return x===null||B(x)?e.check(ac,w,S)(x):(e.enter("codeFlowValue"),y(x))}function y(x){return x===null||B(x)?(e.exit("codeFlowValue"),m(x)):(e.consume(x),y)}function S(x){return e.exit("codeFenced"),n(x)}function C(x,N,L){let F=0;return R;function R(V){return x.enter("lineEnding"),x.consume(V),x.exit("lineEnding"),A}function A(V){return x.enter("codeFencedFence"),q(V)?ee(x,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):M(V)}function M(V){return V===u?(x.enter("codeFencedFenceSequence"),K(V)):L(V)}function K(V){return V===u?(F++,x.consume(V),K):F>=o?(x.exit("codeFencedFenceSequence"),q(V)?ee(x,le,"whitespace")(V):le(V)):L(V)}function le(V){return V===null||B(V)?(x.exit("codeFencedFence"),N(V)):L(V)}}}function R1(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const oo={name:"codeIndented",tokenize:M1},A1={tokenize:D1,partial:!0};function M1(e,n,t){const r=this;return i;function i(a){return e.enter("codeIndented"),ee(e,l,"linePrefix",4+1)(a)}function l(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(a):t(a)}function o(a){return a===null?s(a):B(a)?e.attempt(A1,o,s)(a):(e.enter("codeFlowValue"),u(a))}function u(a){return a===null||B(a)?(e.exit("codeFlowValue"),o(a)):(e.consume(a),u)}function s(a){return e.exit("codeIndented"),n(a)}}function D1(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):B(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ee(e,l,"linePrefix",4+1)(o)}function l(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(o):B(o)?i(o):t(o)}}const j1={name:"codeText",tokenize:U1,resolve:F1,previous:B1};function F1(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function zd(e,n,t,r,i,l,o,u,s){const a=s||Number.POSITIVE_INFINITY;let c=0;return f;function f(h){return h===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(h),e.exit(l),d):h===null||h===32||h===41||pu(h)?t(h):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),w(h))}function d(h){return h===62?(e.enter(l),e.consume(h),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===62?(e.exit("chunkString"),e.exit(u),d(h)):h===null||h===60||B(h)?t(h):(e.consume(h),h===92?k:p)}function k(h){return h===60||h===62||h===92?(e.consume(h),p):p(h)}function w(h){return!c&&(h===null||h===41||Ue(h))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),n(h)):c999||p===null||p===91||p===93&&!s||p===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):B(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||B(p)||u++>999?(e.exit("chunkString"),c(p)):(e.consume(p),s||(s=!q(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),u++,f):f(p)}}function Ld(e,n,t,r,i,l){let o;return u;function u(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,s):t(d)}function s(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),a(d))}function a(d){return d===o?(e.exit(l),s(o)):d===null?t(d):B(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ee(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||B(d)?(e.exit("chunkString"),a(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Ir(e,n){let t;return r;function r(i){return B(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):q(i)?ee(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const q1={name:"definition",tokenize:Y1},K1={tokenize:X1,partial:!0};function Y1(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return Id.call(r,e,u,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=Qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):t(p)}function s(p){return Ue(p)?Ir(e,a)(p):a(p)}function a(p){return zd(e,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(K1,f,f)(p)}function f(p){return q(p)?ee(e,d,"whitespace")(p):d(p)}function d(p){return p===null||B(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function X1(e,n,t){return r;function r(u){return Ue(u)?Ir(e,i)(u):t(u)}function i(u){return Ld(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return q(u)?ee(e,o,"whitespace")(u):o(u)}function o(u){return u===null||B(u)?n(u):t(u)}}const G1={name:"hardBreakEscape",tokenize:Z1};function Z1(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return B(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const J1={name:"headingAtx",tokenize:n0,resolve:e0};function e0(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Sn(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function n0(e,n,t){let r=0;return i;function i(c){return e.enter("atxHeading"),l(c)}function l(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||Ue(c)?(e.exit("atxHeadingSequence"),u(c)):t(c)}function u(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||B(c)?(e.exit("atxHeading"),n(c)):q(c)?ee(e,u,"whitespace")(c):(e.enter("atxHeadingText"),a(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),u(c))}function a(c){return c===null||c===35||Ue(c)?(e.exit("atxHeadingText"),u(c)):(e.consume(c),a)}}const t0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],fc=["pre","script","style","textarea"],r0={name:"htmlFlow",tokenize:u0,resolveTo:o0,concrete:!0},i0={tokenize:a0,partial:!0},l0={tokenize:s0,partial:!0};function o0(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function u0(e,n,t){const r=this;let i,l,o,u,s;return a;function a(v){return c(v)}function c(v){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(v),f}function f(v){return v===33?(e.consume(v),d):v===47?(e.consume(v),l=!0,w):v===63?(e.consume(v),i=3,r.interrupt?n:g):kn(v)?(e.consume(v),o=String.fromCharCode(v),T):t(v)}function d(v){return v===45?(e.consume(v),i=2,p):v===91?(e.consume(v),i=5,u=0,k):kn(v)?(e.consume(v),i=4,r.interrupt?n:g):t(v)}function p(v){return v===45?(e.consume(v),r.interrupt?n:g):t(v)}function k(v){const me="CDATA[";return v===me.charCodeAt(u++)?(e.consume(v),u===me.length?r.interrupt?n:M:k):t(v)}function w(v){return kn(v)?(e.consume(v),o=String.fromCharCode(v),T):t(v)}function T(v){if(v===null||v===47||v===62||Ue(v)){const me=v===47,ln=o.toLowerCase();return!me&&!l&&fc.includes(ln)?(i=1,r.interrupt?n(v):M(v)):t0.includes(o.toLowerCase())?(i=6,me?(e.consume(v),h):r.interrupt?n(v):M(v)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(v):l?m(v):y(v))}return v===45||Qe(v)?(e.consume(v),o+=String.fromCharCode(v),T):t(v)}function h(v){return v===62?(e.consume(v),r.interrupt?n:M):t(v)}function m(v){return q(v)?(e.consume(v),m):R(v)}function y(v){return v===47?(e.consume(v),R):v===58||v===95||kn(v)?(e.consume(v),S):q(v)?(e.consume(v),y):R(v)}function S(v){return v===45||v===46||v===58||v===95||Qe(v)?(e.consume(v),S):C(v)}function C(v){return v===61?(e.consume(v),x):q(v)?(e.consume(v),C):y(v)}function x(v){return v===null||v===60||v===61||v===62||v===96?t(v):v===34||v===39?(e.consume(v),s=v,N):q(v)?(e.consume(v),x):L(v)}function N(v){return v===s?(e.consume(v),s=null,F):v===null||B(v)?t(v):(e.consume(v),N)}function L(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||Ue(v)?C(v):(e.consume(v),L)}function F(v){return v===47||v===62||q(v)?y(v):t(v)}function R(v){return v===62?(e.consume(v),A):t(v)}function A(v){return v===null||B(v)?M(v):q(v)?(e.consume(v),A):t(v)}function M(v){return v===45&&i===2?(e.consume(v),pe):v===60&&i===1?(e.consume(v),ce):v===62&&i===4?(e.consume(v),Q):v===63&&i===3?(e.consume(v),g):v===93&&i===5?(e.consume(v),j):B(v)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(i0,X,K)(v)):v===null||B(v)?(e.exit("htmlFlowData"),K(v)):(e.consume(v),M)}function K(v){return e.check(l0,le,X)(v)}function le(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),V}function V(v){return v===null||B(v)?K(v):(e.enter("htmlFlowData"),M(v))}function pe(v){return v===45?(e.consume(v),g):M(v)}function ce(v){return v===47?(e.consume(v),o="",I):M(v)}function I(v){if(v===62){const me=o.toLowerCase();return fc.includes(me)?(e.consume(v),Q):M(v)}return kn(v)&&o.length<8?(e.consume(v),o+=String.fromCharCode(v),I):M(v)}function j(v){return v===93?(e.consume(v),g):M(v)}function g(v){return v===62?(e.consume(v),Q):v===45&&i===2?(e.consume(v),g):M(v)}function Q(v){return v===null||B(v)?(e.exit("htmlFlowData"),X(v)):(e.consume(v),Q)}function X(v){return e.exit("htmlFlow"),n(v)}}function s0(e,n,t){const r=this;return i;function i(o){return B(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function a0(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Nl,n,t)}}const c0={name:"htmlText",tokenize:f0};function f0(e,n,t){const r=this;let i,l,o;return u;function u(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),s}function s(g){return g===33?(e.consume(g),a):g===47?(e.consume(g),C):g===63?(e.consume(g),y):kn(g)?(e.consume(g),L):t(g)}function a(g){return g===45?(e.consume(g),c):g===91?(e.consume(g),l=0,k):kn(g)?(e.consume(g),m):t(g)}function c(g){return g===45?(e.consume(g),p):t(g)}function f(g){return g===null?t(g):g===45?(e.consume(g),d):B(g)?(o=f,ce(g)):(e.consume(g),f)}function d(g){return g===45?(e.consume(g),p):f(g)}function p(g){return g===62?pe(g):g===45?d(g):f(g)}function k(g){const Q="CDATA[";return g===Q.charCodeAt(l++)?(e.consume(g),l===Q.length?w:k):t(g)}function w(g){return g===null?t(g):g===93?(e.consume(g),T):B(g)?(o=w,ce(g)):(e.consume(g),w)}function T(g){return g===93?(e.consume(g),h):w(g)}function h(g){return g===62?pe(g):g===93?(e.consume(g),h):w(g)}function m(g){return g===null||g===62?pe(g):B(g)?(o=m,ce(g)):(e.consume(g),m)}function y(g){return g===null?t(g):g===63?(e.consume(g),S):B(g)?(o=y,ce(g)):(e.consume(g),y)}function S(g){return g===62?pe(g):y(g)}function C(g){return kn(g)?(e.consume(g),x):t(g)}function x(g){return g===45||Qe(g)?(e.consume(g),x):N(g)}function N(g){return B(g)?(o=N,ce(g)):q(g)?(e.consume(g),N):pe(g)}function L(g){return g===45||Qe(g)?(e.consume(g),L):g===47||g===62||Ue(g)?F(g):t(g)}function F(g){return g===47?(e.consume(g),pe):g===58||g===95||kn(g)?(e.consume(g),R):B(g)?(o=F,ce(g)):q(g)?(e.consume(g),F):pe(g)}function R(g){return g===45||g===46||g===58||g===95||Qe(g)?(e.consume(g),R):A(g)}function A(g){return g===61?(e.consume(g),M):B(g)?(o=A,ce(g)):q(g)?(e.consume(g),A):F(g)}function M(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,K):B(g)?(o=M,ce(g)):q(g)?(e.consume(g),M):(e.consume(g),le)}function K(g){return g===i?(e.consume(g),i=void 0,V):g===null?t(g):B(g)?(o=K,ce(g)):(e.consume(g),K)}function le(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||Ue(g)?F(g):(e.consume(g),le)}function V(g){return g===47||g===62||Ue(g)?F(g):t(g)}function pe(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function ce(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),I}function I(g){return q(g)?ee(e,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):j(g)}function j(g){return e.enter("htmlTextData"),o(g)}}const xs={name:"labelEnd",tokenize:y0,resolveTo:g0,resolveAll:m0},p0={tokenize:v0},d0={tokenize:k0},h0={tokenize:w0};function m0(e){let n=-1;for(;++n=3&&(a===null||B(a))?(e.exit("thematicBreak"),n(a)):t(a)}function s(a){return a===i?(e.consume(a),r++,s):(e.exit("thematicBreakSequence"),q(a)?ee(e,u,"whitespace")(a):u(a))}}const Ae={name:"list",tokenize:z0,continuation:{tokenize:I0},exit:O0},N0={tokenize:R0,partial:!0},T0={tokenize:L0,partial:!0};function z0(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return u;function u(p){const k=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:du(p)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Mi,t,a)(p):a(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return t(p)}function s(p){return du(p)&&++o<10?(e.consume(p),s):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),a(p)):t(p)}function a(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Nl,r.interrupt?t:c,e.attempt(N0,d,f))}function c(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return q(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function I0(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Nl,i,l);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ee(e,n,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!q(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(T0,n,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ee(e,e.attempt(Ae,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function L0(e,n,t){const r=this;return ee(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function O0(e){e.exit(this.containerState.type)}function R0(e,n,t){const r=this;return ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(l){const o=r.events[r.events.length-1];return!q(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const pc={name:"setextUnderline",tokenize:M0,resolveTo:A0};function A0(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[l][1].end)):e[r][1]=o,e.push(["exit",o,n]),e}function M0(e,n,t){const r=this;let i;return l;function l(a){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=a,o(a)):t(a)}function o(a){return e.enter("setextHeadingLineSequence"),u(a)}function u(a){return a===i?(e.consume(a),u):(e.exit("setextHeadingLineSequence"),q(a)?ee(e,s,"lineSuffix")(a):s(a))}function s(a){return a===null||B(a)?(e.exit("setextHeadingLine"),n(a)):t(a)}}const D0={tokenize:j0};function j0(e){const n=this,t=e.attempt(Nl,r,e.attempt(this.parser.constructs.flowInitial,i,ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt($1,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const F0={resolveAll:Rd()},B0=Od("string"),U0=Od("text");function Od(e){return{tokenize:n,resolveAll:Rd(e==="text"?H0:void 0)};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,u);return o;function o(c){return a(c)?l(c):u(c)}function u(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),s}function s(c){return a(c)?(t.exit("data"),l(c)):(t.consume(c),s)}function a(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function W0(e,n){let t=-1;const r=[];let i;for(;++t0){const on=U.tokenStack[U.tokenStack.length-1];(on[1]||hc).call(U,void 0,on[0])}for(z.position={start:Fn(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:Fn(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},G=-1;++G0){const on=U.tokenStack[U.tokenStack.length-1];(on[1]||hc).call(U,void 0,on[0])}for(z.position={start:jn(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:jn(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},G=-1;++G1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,s);const a={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(n,a),e.applyData(n,a)}function yv(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function vv(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Dd(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function kv(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Dd(e,n);const i={src:rr(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function xv(e,n){const t={src:rr(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function wv(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Sv(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Dd(e,n);const i={href:rr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Ev(e,n){const t={href:rr(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Cv(e,n,t){const r=e.all(n),i=t?Pv(t):Fd(n),l={},o=[];if(typeof n.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,s);const a={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(n,a),e.applyData(n,a)}function yv(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function vv(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Dd(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function kv(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Dd(e,n);const i={src:rr(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function wv(e,n){const t={src:rr(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function xv(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Sv(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Dd(e,n);const i={href:rr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Ev(e,n){const t={href:rr(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Cv(e,n,t){const r=e.all(n),i=t?Pv(t):jd(n),l={},o=[];if(typeof n.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u1}function _v(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},u=ys(n.children[1]),s=kd(n.children[n.children.length-1]);u&&s&&(o.position={start:u,end:s}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function Lv(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,u=o?o.length:n.children.length;let s=-1;const a=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(yc(n.slice(i),i>0,!1)),l.join("")}function yc(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===mc||l===gc;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===mc||l===gc;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Av(e,n){const t={type:"text",value:Rv(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Mv(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Dv={blockquote:fv,break:pv,code:dv,delete:hv,emphasis:mv,footnoteReference:gv,heading:yv,html:vv,imageReference:kv,image:xv,inlineCode:wv,linkReference:Sv,link:Ev,listItem:Cv,list:_v,paragraph:Nv,root:Tv,strong:zv,table:Iv,tableCell:Ov,tableRow:Lv,text:Av,thematicBreak:Mv,toml:xi,yaml:xi,definition:xi,footnoteDefinition:xi};function xi(){}const jd=-1,Tl=0,ul=1,sl=2,Ss=3,Es=4,Cs=5,Ps=6,Bd=7,Ud=8,vc=typeof self=="object"?self:globalThis,Fv=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case Tl:case jd:return t(o,i);case ul:{const u=t([],i);for(const s of o)u.push(r(s));return u}case sl:{const u=t({},i);for(const[s,a]of o)u[r(s)]=r(a);return u}case Ss:return t(new Date(o),i);case Es:{const{source:u,flags:s}=o;return t(new RegExp(u,s),i)}case Cs:{const u=t(new Map,i);for(const[s,a]of o)u.set(r(s),r(a));return u}case Ps:{const u=t(new Set,i);for(const s of o)u.add(r(s));return u}case Bd:{const{name:u,message:s}=o;return t(new vc[u](s),i)}case Ud:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i)}return t(new vc[l](o),i)};return r},kc=e=>Fv(new Map,e)(0),Pt="",{toString:jv}={},{keys:Bv}=Object,mr=e=>{const n=typeof e;if(n!=="object"||!e)return[Tl,n];const t=jv.call(e).slice(8,-1);switch(t){case"Array":return[ul,Pt];case"Object":return[sl,Pt];case"Date":return[Ss,Pt];case"RegExp":return[Es,Pt];case"Map":return[Cs,Pt];case"Set":return[Ps,Pt]}return t.includes("Array")?[ul,t]:t.includes("Error")?[Bd,t]:[sl,t]},wi=([e,n])=>e===Tl&&(n==="function"||n==="symbol"),Uv=(e,n,t,r)=>{const i=(o,u)=>{const s=r.push(o)-1;return t.set(u,s),s},l=o=>{if(t.has(o))return t.get(o);let[u,s]=mr(o);switch(u){case Tl:{let c=o;switch(s){case"bigint":u=Ud,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);c=null;break;case"undefined":return i([jd],o)}return i([u,c],o)}case ul:{if(s)return i([s,[...o]],o);const c=[],f=i([u,c],o);for(const d of o)c.push(l(d));return f}case sl:{if(s)switch(s){case"BigInt":return i([s,o.toString()],o);case"Boolean":case"Number":case"String":return i([s,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const c=[],f=i([u,c],o);for(const d of Bv(o))(e||!wi(mr(o[d])))&&c.push([l(d),l(o[d])]);return f}case Ss:return i([u,o.toISOString()],o);case Es:{const{source:c,flags:f}=o;return i([u,{source:c,flags:f}],o)}case Cs:{const c=[],f=i([u,c],o);for(const[d,p]of o)(e||!(wi(mr(d))||wi(mr(p))))&&c.push([l(d),l(p)]);return f}case Ps:{const c=[],f=i([u,c],o);for(const d of o)(e||!wi(mr(d)))&&c.push(l(d));return f}}const{message:a}=o;return i([u,{name:s,message:a}],o)};return l},xc=(e,{json:n,lossy:t}={})=>{const r=[];return Uv(!(n||t),!!n,new Map,r)(e),r},al=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?kc(xc(e,n)):structuredClone(e):(e,n)=>kc(xc(e,n));function Hv(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function $v(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Vv(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Hv,r=e.options.footnoteBackLabel||$v,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let s=-1;for(;++s0&&k.push({type:"text",value:" "});let m=typeof t=="string"?t:t(s,p);typeof m=="string"&&(m={type:"text",value:m}),k.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const T=c[c.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const m=T.children[T.children.length-1];m&&m.type==="text"?m.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...k)}else c.push(...k);const h={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(c,!0)};e.patch(a,h),u.push(h)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...al(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`});const a={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,a),e.applyData(n,a)}function Pv(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r1}function _v(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},u=ys(n.children[1]),s=kd(n.children[n.children.length-1]);u&&s&&(o.position={start:u,end:s}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function Lv(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,u=o?o.length:n.children.length;let s=-1;const a=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(yc(n.slice(i),i>0,!1)),l.join("")}function yc(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===mc||l===gc;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===mc||l===gc;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Av(e,n){const t={type:"text",value:Rv(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Mv(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Dv={blockquote:fv,break:pv,code:dv,delete:hv,emphasis:mv,footnoteReference:gv,heading:yv,html:vv,imageReference:kv,image:wv,inlineCode:xv,linkReference:Sv,link:Ev,listItem:Cv,list:_v,paragraph:Nv,root:Tv,strong:zv,table:Iv,tableCell:Ov,tableRow:Lv,text:Av,thematicBreak:Mv,toml:wi,yaml:wi,definition:wi,footnoteDefinition:wi};function wi(){}const Fd=-1,Tl=0,ul=1,sl=2,Ss=3,Es=4,Cs=5,Ps=6,Bd=7,Ud=8,vc=typeof self=="object"?self:globalThis,jv=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case Tl:case Fd:return t(o,i);case ul:{const u=t([],i);for(const s of o)u.push(r(s));return u}case sl:{const u=t({},i);for(const[s,a]of o)u[r(s)]=r(a);return u}case Ss:return t(new Date(o),i);case Es:{const{source:u,flags:s}=o;return t(new RegExp(u,s),i)}case Cs:{const u=t(new Map,i);for(const[s,a]of o)u.set(r(s),r(a));return u}case Ps:{const u=t(new Set,i);for(const s of o)u.add(r(s));return u}case Bd:{const{name:u,message:s}=o;return t(new vc[u](s),i)}case Ud:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i)}return t(new vc[l](o),i)};return r},kc=e=>jv(new Map,e)(0),Pt="",{toString:Fv}={},{keys:Bv}=Object,mr=e=>{const n=typeof e;if(n!=="object"||!e)return[Tl,n];const t=Fv.call(e).slice(8,-1);switch(t){case"Array":return[ul,Pt];case"Object":return[sl,Pt];case"Date":return[Ss,Pt];case"RegExp":return[Es,Pt];case"Map":return[Cs,Pt];case"Set":return[Ps,Pt]}return t.includes("Array")?[ul,t]:t.includes("Error")?[Bd,t]:[sl,t]},xi=([e,n])=>e===Tl&&(n==="function"||n==="symbol"),Uv=(e,n,t,r)=>{const i=(o,u)=>{const s=r.push(o)-1;return t.set(u,s),s},l=o=>{if(t.has(o))return t.get(o);let[u,s]=mr(o);switch(u){case Tl:{let c=o;switch(s){case"bigint":u=Ud,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);c=null;break;case"undefined":return i([Fd],o)}return i([u,c],o)}case ul:{if(s)return i([s,[...o]],o);const c=[],f=i([u,c],o);for(const d of o)c.push(l(d));return f}case sl:{if(s)switch(s){case"BigInt":return i([s,o.toString()],o);case"Boolean":case"Number":case"String":return i([s,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const c=[],f=i([u,c],o);for(const d of Bv(o))(e||!xi(mr(o[d])))&&c.push([l(d),l(o[d])]);return f}case Ss:return i([u,o.toISOString()],o);case Es:{const{source:c,flags:f}=o;return i([u,{source:c,flags:f}],o)}case Cs:{const c=[],f=i([u,c],o);for(const[d,p]of o)(e||!(xi(mr(d))||xi(mr(p))))&&c.push([l(d),l(p)]);return f}case Ps:{const c=[],f=i([u,c],o);for(const d of o)(e||!xi(mr(d)))&&c.push(l(d));return f}}const{message:a}=o;return i([u,{name:s,message:a}],o)};return l},wc=(e,{json:n,lossy:t}={})=>{const r=[];return Uv(!(n||t),!!n,new Map,r)(e),r},al=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?kc(wc(e,n)):structuredClone(e):(e,n)=>kc(wc(e,n));function Hv(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function $v(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Vv(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Hv,r=e.options.footnoteBackLabel||$v,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let s=-1;for(;++s0&&k.push({type:"text",value:" "});let m=typeof t=="string"?t:t(s,p);typeof m=="string"&&(m={type:"text",value:m}),k.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const T=c[c.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const m=T.children[T.children.length-1];m&&m.type==="text"?m.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...k)}else c.push(...k);const h={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(c,!0)};e.patch(a,h),u.push(h)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...al(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:` -`}]}}const Hd=function(e){if(e==null)return qv;if(typeof e=="function")return zl(e);if(typeof e=="object")return Array.isArray(e)?Wv(e):Qv(e);if(typeof e=="string")return Kv(e);throw new Error("Expected function, string, or object as test")};function Wv(e){const n=[];let t=-1;for(;++t":""))+")"})}return d;function d(){let p=$d,k,x,T;if((!n||l(s,a,c[c.length-1]||void 0))&&(p=Zv(t(s,c)),p[0]===wc))return p;if("children"in s&&s.children){const h=s;if(h.children&&p[0]!==bv)for(x=(r?h.children.length:-1)+o,T=c.concat(h);x>-1&&x":""))+")"})}return d;function d(){let p=$d,k,w,T;if((!n||l(s,a,c[c.length-1]||void 0))&&(p=Zv(t(s,c)),p[0]===xc))return p;if("children"in s&&s.children){const h=s;if(h.children&&p[0]!==Xv)for(w=(r?h.children.length:-1)+o,T=c.concat(h);w>-1&&w0&&t.push({type:"text",value:` `}),t}function Sc(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Ec(e,n){const t=ek(e,n),r=t.one(e,void 0),i=Vv(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:` -`},i),l}function lk(e,n){return e&&"run"in e?async function(t,r){const i=Ec(t,n);await e.run(i,r)}:function(t){return Ec(t,n||e)}}function Cc(e){if(e)throw e}var Di=Object.prototype.hasOwnProperty,Wd=Object.prototype.toString,Pc=Object.defineProperty,_c=Object.getOwnPropertyDescriptor,Nc=function(n){return typeof Array.isArray=="function"?Array.isArray(n):Wd.call(n)==="[object Array]"},Tc=function(n){if(!n||Wd.call(n)!=="[object Object]")return!1;var t=Di.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&Di.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i>"u"||Di.call(n,i)},zc=function(n,t){Pc&&t.name==="__proto__"?Pc(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},Ic=function(n,t){if(t==="__proto__")if(Di.call(n,t)){if(_c)return _c(n,t).value}else return;return n[t]},ok=function e(){var n,t,r,i,l,o,u=arguments[0],s=1,a=arguments.length,c=!1;for(typeof u=="boolean"&&(c=u,u=arguments[1]||{},s=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});so.length;let s;u&&o.push(i);try{s=e.apply(this,o)}catch(a){const c=a;if(u&&t)throw c;return i(c)}u||(s instanceof Promise?s.then(l,i):s instanceof Error?i(s):l(s))}function i(o,...u){t||(t=!0,n(o,...u))}function l(o){i(null,o)}}const yn={basename:ak,dirname:ck,extname:fk,join:pk,sep:"/"};function ak(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ei(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,u=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),u>-1&&(e.codePointAt(i)===n.codePointAt(u--)?u<0&&(r=i):(u=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function ck(e){if(ei(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function fk(e){ei(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const u=e.codePointAt(n);if(u===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),u===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function pk(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function hk(e,n){let t="",r=0,i=-1,l=0,o=-1,u,s;for(;++o<=e.length;){if(o2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else u===46&&l>-1?l++:l=-1}return t}function ei(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mk={cwd:gk};function gk(){return"/"}function yu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function yk(e){if(typeof e=="string")e=new URL(e);else if(!yu(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return vk(e)}function vk(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[p,...k]=c;const x=r[d][1];gu(x)&&gu(p)&&(p=so(!0,x,p)),r[d]=[a,p,...k]}}}}const Sk=new _s().freeze();function po(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ho(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mo(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oc(e){if(!gu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Rc(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Si(e){return Ek(e)?e:new Qd(e)}function Ek(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ck(e){return typeof e=="string"||Pk(e)}function Pk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _k="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ac=[],Mc={allowDangerousHtml:!0},Nk=/^(https?|ircs?|mailto|xmpp)$/i,Tk=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zk(e){const n=e.allowedElements,t=e.allowElement,r=e.children||"",i=e.className,l=e.components,o=e.disallowedElements,u=e.rehypePlugins||Ac,s=e.remarkPlugins||Ac,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Mc}:Mc,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||Ik,p=Sk().use(cv).use(s).use(lk,a).use(u),k=new Qd;typeof r=="string"&&(k.value=r);for(const m of Tk)Object.hasOwn(e,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+_k+m.id,void 0);const x=p.parse(k);let T=p.runSync(x,k);return i&&(T={type:"element",tagName:"div",properties:{className:i},children:T.type==="root"?T.children:[T]}),Vd(T,h),Xy(T,{Fragment:D.Fragment,components:l,ignoreInvalidStyle:!0,jsx:D.jsx,jsxs:D.jsxs,passKeys:!0,passNode:!0});function h(m,y,S){if(m.type==="raw"&&S&&typeof y=="number")return c?S.children.splice(y,1):S.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let C;for(C in lo)if(Object.hasOwn(lo,C)&&Object.hasOwn(m.properties,C)){const w=m.properties[C],N=lo[C];(N===null||N.includes(m.tagName))&&(m.properties[C]=d(String(w||""),C,m))}}if(m.type==="element"){let C=n?!n.includes(m.tagName):o?o.includes(m.tagName):!1;if(!C&&t&&typeof y=="number"&&(C=!t(m,y,S)),C&&S&&typeof y=="number")return f&&m.children?S.children.splice(y,1,...m.children):S.children.splice(y,1),y}}}function Ik(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n<0||i>-1&&n>i||t>-1&&n>t||r>-1&&n>r||Nk.test(e.slice(0,n))?e:""}const Lk=({onClose:e})=>{const[n,t]=Se.useState("");return Se.useEffect(()=>{fetch("/src/assets/docs/paper.md").then(r=>r.text()).then(r=>t(r))},[]),D.jsx("div",{className:ki.overlay,onClick:e,children:D.jsxs("div",{className:ki.PaperModal,children:[D.jsx("button",{className:ki.close,onClick:e,children:"Close"}),D.jsx("div",{children:D.jsx(zk,{components:{img:({alt:r,src:i,title:l})=>D.jsx("img",{alt:r,src:i,title:l,style:{width:"100%"}}),p:({node:r,...i})=>D.jsx("p",{...i,style:{fontSize:"1.2rem"}})},children:n})}),D.jsx("button",{className:ki.close,onClick:e,children:"Close"})]})})},Ok=()=>{const{nodes:e,edges:n,setNodes:t,setEdges:r}=Se.useContext(ds),{setShowErrorModal:i,showPaperModal:l,setShowPaperModal:o}=Se.useContext(hs),u=()=>{if(Ka(e,n)){const c=ly(e,n);console.log(c),Va(c)}else i({show:!0,text:"All nodes must be connected."})},s=()=>{if(Ka(e,n)){const c=oy(e,n);console.log(c),Va(c)}else i({show:!0,text:"All nodes must be connected."})},a=()=>{t([]),r([])};return D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:qa.Navbar,children:[D.jsx("button",{onClick:u,children:"Run prim's algorithm"}),D.jsx("button",{onClick:s,children:"Run dijkstra's algorithm"}),D.jsx("button",{id:qa.clearCanvas,onClick:a,children:"Clear canvas"}),D.jsx("button",{onClick:()=>o(!0),children:"Paper"})]}),l&&ps.createPortal(D.jsx(Lk,{onClose:()=>o(!1)}),document.body)]})},Rk="_title_kzhz6_1",Ak={title:Rk},Mk=()=>D.jsx("div",{className:Ak.title}),Dk="_instructions_1xloc_1",Fk={instructions:Dk},jk=()=>D.jsx("div",{className:Fk.instructions});function Bk(){return D.jsx(ld,{children:D.jsxs(ed,{children:[D.jsx(Ok,{}),D.jsx(Zg,{}),D.jsx(Mk,{}),D.jsx(jk,{})]})})}go.createRoot(document.getElementById("root")).render(D.jsx(Qc.StrictMode,{children:D.jsx(Bk,{})})); +`},i),l}function lk(e,n){return e&&"run"in e?async function(t,r){const i=Ec(t,n);await e.run(i,r)}:function(t){return Ec(t,n||e)}}function Cc(e){if(e)throw e}var Di=Object.prototype.hasOwnProperty,Wd=Object.prototype.toString,Pc=Object.defineProperty,_c=Object.getOwnPropertyDescriptor,Nc=function(n){return typeof Array.isArray=="function"?Array.isArray(n):Wd.call(n)==="[object Array]"},Tc=function(n){if(!n||Wd.call(n)!=="[object Object]")return!1;var t=Di.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&Di.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i>"u"||Di.call(n,i)},zc=function(n,t){Pc&&t.name==="__proto__"?Pc(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},Ic=function(n,t){if(t==="__proto__")if(Di.call(n,t)){if(_c)return _c(n,t).value}else return;return n[t]},ok=function e(){var n,t,r,i,l,o,u=arguments[0],s=1,a=arguments.length,c=!1;for(typeof u=="boolean"&&(c=u,u=arguments[1]||{},s=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});so.length;let s;u&&o.push(i);try{s=e.apply(this,o)}catch(a){const c=a;if(u&&t)throw c;return i(c)}u||(s instanceof Promise?s.then(l,i):s instanceof Error?i(s):l(s))}function i(o,...u){t||(t=!0,n(o,...u))}function l(o){i(null,o)}}const yn={basename:ak,dirname:ck,extname:fk,join:pk,sep:"/"};function ak(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ei(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,u=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),u>-1&&(e.codePointAt(i)===n.codePointAt(u--)?u<0&&(r=i):(u=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function ck(e){if(ei(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function fk(e){ei(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const u=e.codePointAt(n);if(u===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),u===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function pk(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function hk(e,n){let t="",r=0,i=-1,l=0,o=-1,u,s;for(;++o<=e.length;){if(o2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else u===46&&l>-1?l++:l=-1}return t}function ei(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mk={cwd:gk};function gk(){return"/"}function yu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function yk(e){if(typeof e=="string")e=new URL(e);else if(!yu(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return vk(e)}function vk(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[p,...k]=c;const w=r[d][1];gu(w)&&gu(p)&&(p=so(!0,w,p)),r[d]=[a,p,...k]}}}}const Sk=new _s().freeze();function po(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ho(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mo(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oc(e){if(!gu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Rc(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Si(e){return Ek(e)?e:new Qd(e)}function Ek(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ck(e){return typeof e=="string"||Pk(e)}function Pk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _k="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ac=[],Mc={allowDangerousHtml:!0},Nk=/^(https?|ircs?|mailto|xmpp)$/i,Tk=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zk(e){const n=e.allowedElements,t=e.allowElement,r=e.children||"",i=e.className,l=e.components,o=e.disallowedElements,u=e.rehypePlugins||Ac,s=e.remarkPlugins||Ac,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Mc}:Mc,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||Ik,p=Sk().use(cv).use(s).use(lk,a).use(u),k=new Qd;typeof r=="string"&&(k.value=r);for(const m of Tk)Object.hasOwn(e,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+_k+m.id,void 0);const w=p.parse(k);let T=p.runSync(w,k);return i&&(T={type:"element",tagName:"div",properties:{className:i},children:T.type==="root"?T.children:[T]}),Vd(T,h),Yy(T,{Fragment:D.Fragment,components:l,ignoreInvalidStyle:!0,jsx:D.jsx,jsxs:D.jsxs,passKeys:!0,passNode:!0});function h(m,y,S){if(m.type==="raw"&&S&&typeof y=="number")return c?S.children.splice(y,1):S.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let C;for(C in lo)if(Object.hasOwn(lo,C)&&Object.hasOwn(m.properties,C)){const x=m.properties[C],N=lo[C];(N===null||N.includes(m.tagName))&&(m.properties[C]=d(String(x||""),C,m))}}if(m.type==="element"){let C=n?!n.includes(m.tagName):o?o.includes(m.tagName):!1;if(!C&&t&&typeof y=="number"&&(C=!t(m,y,S)),C&&S&&typeof y=="number")return f&&m.children?S.children.splice(y,1,...m.children):S.children.splice(y,1),y}}}function Ik(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n<0||i>-1&&n>i||t>-1&&n>t||r>-1&&n>r||Nk.test(e.slice(0,n))?e:""}const Lk=`# Shortest Paths and Minimum Spanning Trees + +Complex graph algorithms are fascinating, they allow us to solve difficult problems reasonably fast, but some of them can be quite tricky to understand. This page explains how Dijkstra's and Prim's algorithms work as well as provides an brief analysis of their time complexities. + +On our website, you can see exactly how these algorithms traverse a given graph, this visualization will help you to fully understand them. + +## Dijkstra's shortest path algorithm + +Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a weighted graph. Here is how we implemented it: firstly, we assign a distance of infinity to every node in the graph, this number represents how much does it cost to get from our starting node to this particular one, for now we do not have a path to any of the nodes, thus the distance to any of them is equal to infinity, meaning they are unreachable. But, we have to start somewhere, so our starting node is assigned a distance of 0, because we do not have to go anywhere to get to it. + +Now we repeat the following until we either get to our destination or run out of nodes to visit: get the node with the closest available, remove it from the fringe, and calculate a new distance for all of its adjacent nodes, being the distance to the current node plus the weight of the edge between them, if this new distance is smaller than what this adjacent node had before, we update it, since we want to have the smallest distance possible to every node in the graph. + +Once we get to the finish node, its distance is in fact the length of the shortest path we were looking for (if there is no path from the starting node to the destination, we stop the loop when our fringe is empty). Along the way we record the parent of every node, meaning the node we came to it from, in order to actually recreate the path our algorithm has taken to get to the destination. And this is how our Dijkstra's algorithm visualization works. + +## Prim's minimum spanning tree algorithm + +Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a weighted undirected graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized. Here is how we implemented it: firstly, we set a value of infinity to every node in the graph, this number represents the cheapest cost to connect this node to the tree, for now we have no such information, thus all of them have the cost of infinity. But our starting node is assigned a cost of 0, since it is already in the tree. + +Now we repeat the following until there are no more nodes to connect: get the cheapest node available, remove it from the fringe, and calculate a new cost for all of its neighbors, being the the weight of the edge between them, if this new cost is smaller than what it was before, we update it, since we want to find the cheapest way to connect all the nodes. + +Once our fringe is empty, we are sure that every node is present in the minimum spanning tree and the algorithm is done. Along the way we record the parent of every node, meaning the node we connected to it from, in order to actually recreate the minimum spanning tree our algorithm has built. And this is how our Prim's algorithm visualization works. + +## Time complexity analysis + +Conveniently enough, these two algorithms have the same time complexity, since they pretty much do the same thing: finding the cheapest edge connecting every node to the graph. The time complexity of this process depends on what data structure you choose to use as a fringe. + +An easy way would be to use a linked list, but this means that we have to go through all of the nodes every time we want to get the next cheapest node or to update the value of the neighbor. When implemented using a linked list both Dijkstra's and Prim's algorithms have O(E \\* V) complexity. + +But there is a better way, there is a perfect data structure to keep track of the smallest value in the collection of elements and it is called a min heap. Now we do not have to to scan the entire fringe to get the next cheapest node or to update some values, because we have it in the root of our heap, we still have to fix it after extracting or changing values but this has O(logN) time complexity which is still considerably faster than linked list. When implemented using a linked list both Dijkstra's and Prim's algorithms have O(E \\* logV) complexity. + +To demonstrate this difference we prepared to graphs that compare the running time of our algorithms implemented with linked list and min heap as a fringe: + +![dijkstra_graph](src/assets/img/dijkstra_graph.jpg) + +![prim_graph](src/assets/img/prim_graph.jpg) +`,Ok=({onClose:e})=>{const[n,t]=Se.useState("");return Se.useEffect(()=>t(Lk),[]),D.jsx("div",{className:ki.overlay,onClick:e,children:D.jsxs("div",{className:ki.PaperModal,children:[D.jsx("button",{className:ki.close,onClick:e,children:"Close"}),D.jsx("div",{children:D.jsx(zk,{components:{img:({alt:r,src:i,title:l})=>D.jsx("img",{alt:r,src:i,title:l,style:{width:"100%"}}),p:({node:r,...i})=>D.jsx("p",{...i,style:{fontSize:"1.2rem"}})},children:n})}),D.jsx("button",{className:ki.close,onClick:e,children:"Close"})]})})},Rk=()=>{const{nodes:e,edges:n,setNodes:t,setEdges:r}=Se.useContext(ds),{setShowErrorModal:i,showPaperModal:l,setShowPaperModal:o}=Se.useContext(hs),u=()=>{if(ba(e,n)){const c=ly(e,n);console.log(c),Va(c)}else i({show:!0,text:"All nodes must be connected."})},s=()=>{if(ba(e,n)){const c=oy(e,n);console.log(c),Va(c)}else i({show:!0,text:"All nodes must be connected."})},a=()=>{t([]),r([])};return D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:qa.Navbar,children:[D.jsx("button",{onClick:u,children:"Run prim's algorithm"}),D.jsx("button",{onClick:s,children:"Run dijkstra's algorithm"}),D.jsx("button",{id:qa.clearCanvas,onClick:a,children:"Clear canvas"}),D.jsx("button",{onClick:()=>o(!0),children:"Paper"})]}),l&&ps.createPortal(D.jsx(Ok,{onClose:()=>o(!1)}),document.body)]})},Ak="_title_kzhz6_1",Mk={title:Ak},Dk=()=>D.jsx("div",{className:Mk.title}),jk="_instructions_1xloc_1",Fk={instructions:jk},Bk=()=>D.jsx("div",{className:Fk.instructions});function Uk(){return D.jsx(ld,{children:D.jsxs(ed,{children:[D.jsx(Rk,{}),D.jsx(Zg,{}),D.jsx(Dk,{}),D.jsx(Bk,{})]})})}go.createRoot(document.getElementById("root")).render(D.jsx(Qc.StrictMode,{children:D.jsx(Uk,{})})); diff --git a/index.html b/index.html index a80706e..8bb268d 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Dijkstra Prim Visualizer - +