var gv=Object.defineProperty;var yv=(e,t,n)=>t in e?gv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tp=(e,t,n)=>yv(e,typeof t!="symbol"?t+"":t,n);import{r as P,R as U,h as wv}from"./react-syntax-highlighter-dtIKD8zM.js";import{g as Fi}from"./highlight.js-CzNGR08I.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var wg={exports:{}},Vs={};/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var xv=P,vv=Symbol.for("react.element"),kv=Symbol.for("react.fragment"),Sv=Object.prototype.hasOwnProperty,Ev=xv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Cv={key:!0,ref:!0,__self:!0,__source:!0};function xg(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Sv.call(t,r)&&!Cv.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:vv,type:e,key:o,ref:l,props:i,_owner:Ev.current}}Vs.Fragment=kv;Vs.jsx=xg;Vs.jsxs=xg;wg.exports=Vs;var D=wg.exports,ju={},vg={exports:{}},Dt={},kg={exports:{}},Sg={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(R,T){var x=R.length;R.push(T);e:for(;0<x;){var j=x-1>>>1,V=R[j];if(0<i(V,T))R[j]=T,R[x]=V,x=j;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var T=R[0],x=R.pop();if(x!==T){R[0]=x;e:for(var j=0,V=R.length,C=V>>>1;j<C;){var G=2*(j+1)-1,J=R[G],O=G+1,H=R[O];if(0>i(J,x))O<V&&0>i(H,J)?(R[j]=H,R[O]=x,j=O):(R[j]=J,R[G]=x,j=G);else if(O<V&&0>i(H,x))R[j]=H,R[O]=x,j=O;else break e}}return T}function i(R,T){var x=R.sortIndex-T.sortIndex;return x!==0?x:R.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var a=[],u=[],c=1,f=null,d=3,p=!1,m=!1,g=!1,k=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(R){for(var T=n(u);T!==null;){if(T.callback===null)r(u);else if(T.startTime<=R)r(u),T.sortIndex=T.expirationTime,t(a,T);else break;T=n(u)}}function v(R){if(g=!1,w(R),!m)if(n(a)!==null)m=!0,I(_);else{var T=n(u);T!==null&&$(v,T.startTime-R)}}function _(R,T){m=!1,g&&(g=!1,h(A),A=-1),p=!0;var x=d;try{for(w(T),f=n(a);f!==null&&(!(f.expirationTime>T)||R&&!M());){var j=f.callback;if(typeof j=="function"){f.callback=null,d=f.priorityLevel;var V=j(f.expirationTime<=T);T=e.unstable_now(),typeof V=="function"?f.callback=V:f===n(a)&&r(a),w(T)}else r(a);f=n(a)}if(f!==null)var C=!0;else{var G=n(u);G!==null&&$(v,G.startTime-T),C=!1}return C}finally{f=null,d=x,p=!1}}var S=!1,N=null,A=-1,L=5,b=-1;function M(){return!(e.unstable_now()-b<L)}function z(){if(N!==null){var R=e.unstable_now();b=R;var T=!0;try{T=N(!0,R)}finally{T?B():(S=!1,N=null)}}else S=!1}var B;if(typeof y=="function")B=function(){y(z)};else if(typeof MessageChannel<"u"){var E=new MessageChannel,F=E.port2;E.port1.onmessage=z,B=function(){F.postMessage(null)}}else B=function(){k(z,0)};function I(R){N=R,S||(S=!0,B())}function $(R,T){A=k(function(){R(e.unstable_now())},T)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,I(_))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(R){switch(d){case 1:case 2:case 3:var T=3;break;default:T=d}var x=d;d=T;try{return R()}finally{d=x}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,T){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var x=d;d=R;try{return T()}finally{d=x}},e.unstable_scheduleCallback=function(R,T,x){var j=e.unstable_now();switch(typeof x=="object"&&x!==null?(x=x.delay,x=typeof x=="number"&&0<x?j+x:j):x=j,R){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=x+V,R={id:c++,callback:T,priorityLevel:R,startTime:x,expirationTime:V,sortIndex:-1},x>j?(R.sortIndex=x,t(u,R),n(a)===null&&R===n(u)&&(g?(h(A),A=-1):g=!0,$(v,x-j))):(R.sortIndex=V,t(a,R),m||p||(m=!0,I(_))),R},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(R){var T=d;return function(){var x=d;d=T;try{return R.apply(this,arguments)}finally{d=x}}}})(Sg);kg.exports=Sg;var bv=kg.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Pv=P,Tt=bv;function Q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Eg=new Set,bo={};function Ur(e,t){Ci(e,t),Ci(e+"Capture",t)}function Ci(e,t){for(bo[e]=t,e=0;e<t.length;e++)Eg.add(t[e])}var Dn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bu=Object.prototype.hasOwnProperty,_v=/^[: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]*$/,np={},rp={};function Nv(e){return Bu.call(rp,e)?!0:Bu.call(np,e)?!1:_v.test(e)?rp[e]=!0:(np[e]=!0,!1)}function Tv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Av(e,t,n,r){if(t===null||typeof t>"u"||Tv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function pt(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new pt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new pt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new pt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new pt(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){et[e]=new pt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new pt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new pt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new pt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new pt(e,5,!1,e.toLowerCase(),null,!1,!1)});var wf=/[\-:]([a-z])/g;function xf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(wf,xf);et[t]=new pt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(wf,xf);et[t]=new pt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(wf,xf);et[t]=new pt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new pt(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new pt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new pt(e,1,!1,e.toLowerCase(),null,!0,!0)});function vf(e,t,n,r){var i=et.hasOwnProperty(t)?et[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Av(t,n,i,r)&&(n=null),r||i===null?Nv(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var On=Pv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fl=Symbol.for("react.element"),Jr=Symbol.for("react.portal"),ei=Symbol.for("react.fragment"),kf=Symbol.for("react.strict_mode"),Hu=Symbol.for("react.profiler"),Cg=Symbol.for("react.provider"),bg=Symbol.for("react.context"),Sf=Symbol.for("react.forward_ref"),Uu=Symbol.for("react.suspense"),Vu=Symbol.for("react.suspense_list"),Ef=Symbol.for("react.memo"),Kn=Symbol.for("react.lazy"),Pg=Symbol.for("react.offscreen"),ip=Symbol.iterator;function Wi(e){return e===null||typeof e!="object"?null:(e=ip&&e[ip]||e["@@iterator"],typeof e=="function"?e:null)}var Oe=Object.assign,Oa;function lo(e){if(Oa===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Oa=t&&t[1]||""}return`
`+Oa+e}var za=!1;function $a(e,t){if(!e||za)return"";za=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),l=i.length-1,s=o.length-1;1<=l&&0<=s&&i[l]!==o[s];)s--;for(;1<=l&&0<=s;l--,s--)if(i[l]!==o[s]){if(l!==1||s!==1)do if(l--,s--,0>s||i[l]!==o[s]){var a=`
`+i[l].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{za=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?lo(e):""}function Dv(e){switch(e.tag){case 5:return lo(e.type);case 16:return lo("Lazy");case 13:return lo("Suspense");case 19:return lo("SuspenseList");case 0:case 2:case 15:return e=$a(e.type,!1),e;case 11:return e=$a(e.type.render,!1),e;case 1:return e=$a(e.type,!0),e;default:return""}}function Wu(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 ei:return"Fragment";case Jr:return"Portal";case Hu:return"Profiler";case kf:return"StrictMode";case Uu:return"Suspense";case Vu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bg:return(e.displayName||"Context")+".Consumer";case Cg:return(e._context.displayName||"Context")+".Provider";case Sf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ef:return t=e.displayName||null,t!==null?t:Wu(e.type)||"Memo";case Kn:t=e._payload,e=e._init;try{return Wu(e(t))}catch{}}return null}function Lv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Wu(t);case 8:return t===kf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function dr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _g(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mv(e){var t=_g(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dl(e){e._valueTracker||(e._valueTracker=Mv(e))}function Ng(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_g(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function os(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 qu(e,t){var n=t.checked;return Oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function op(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=dr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Tg(e,t){t=t.checked,t!=null&&vf(e,"checked",t,!1)}function Ku(e,t){Tg(e,t);var n=dr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Xu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Xu(e,t.type,dr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function lp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Xu(e,t,n){(t!=="number"||os(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var so=Array.isArray;function pi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Yu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Oe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function sp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(so(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:dr(n)}}function Ag(e,t){var n=dr(t.value),r=dr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ap(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Dg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Gu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Dg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pl,Lg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(pl=pl||document.createElement("div"),pl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Po(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var po={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},Rv=["Webkit","ms","Moz","O"];Object.keys(po).forEach(function(e){Rv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),po[t]=po[e]})});function Mg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||po.hasOwnProperty(e)&&po[e]?(""+t).trim():t+"px"}function Rg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Mg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Iv=Oe({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 Qu(e,t){if(t){if(Iv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Zu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ju=null;function Cf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ec=null,hi=null,mi=null;function up(e){if(e=el(e)){if(typeof ec!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=Ys(t),ec(e.stateNode,e.type,t))}}function Ig(e){hi?mi?mi.push(e):mi=[e]:hi=e}function Fg(){if(hi){var e=hi,t=mi;if(mi=hi=null,up(e),t)for(e=0;e<t.length;e++)up(t[e])}}function Og(e,t){return e(t)}function zg(){}var ja=!1;function $g(e,t,n){if(ja)return e(t,n);ja=!0;try{return Og(e,t,n)}finally{ja=!1,(hi!==null||mi!==null)&&(zg(),Fg())}}function _o(e,t){var n=e.stateNode;if(n===null)return null;var r=Ys(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Q(231,t,typeof n));return n}var tc=!1;if(Dn)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){tc=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{tc=!1}function Fv(e,t,n,r,i,o,l,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ho=!1,ls=null,ss=!1,nc=null,Ov={onError:function(e){ho=!0,ls=e}};function zv(e,t,n,r,i,o,l,s,a){ho=!1,ls=null,Fv.apply(Ov,arguments)}function $v(e,t,n,r,i,o,l,s,a){if(zv.apply(this,arguments),ho){if(ho){var u=ls;ho=!1,ls=null}else throw Error(Q(198));ss||(ss=!0,nc=u)}}function Vr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function jg(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function cp(e){if(Vr(e)!==e)throw Error(Q(188))}function jv(e){var t=e.alternate;if(!t){if(t=Vr(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return cp(i),e;if(o===r)return cp(i),t;o=o.sibling}throw Error(Q(188))}if(n.return!==r.return)n=i,r=o;else{for(var l=!1,s=i.child;s;){if(s===n){l=!0,n=i,r=o;break}if(s===r){l=!0,r=i,n=o;break}s=s.sibling}if(!l){for(s=o.child;s;){if(s===n){l=!0,n=o,r=i;break}if(s===r){l=!0,r=o,n=i;break}s=s.sibling}if(!l)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function Bg(e){return e=jv(e),e!==null?Hg(e):null}function Hg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Hg(e);if(t!==null)return t;e=e.sibling}return null}var Ug=Tt.unstable_scheduleCallback,fp=Tt.unstable_cancelCallback,Bv=Tt.unstable_shouldYield,Hv=Tt.unstable_requestPaint,je=Tt.unstable_now,Uv=Tt.unstable_getCurrentPriorityLevel,bf=Tt.unstable_ImmediatePriority,Vg=Tt.unstable_UserBlockingPriority,as=Tt.unstable_NormalPriority,Vv=Tt.unstable_LowPriority,Wg=Tt.unstable_IdlePriority,Ws=null,pn=null;function Wv(e){if(pn&&typeof pn.onCommitFiberRoot=="function")try{pn.onCommitFiberRoot(Ws,e,void 0,(e.current.flags&128)===128)}catch{}}var en=Math.clz32?Math.clz32:Xv,qv=Math.log,Kv=Math.LN2;function Xv(e){return e>>>=0,e===0?32:31-(qv(e)/Kv|0)|0}var hl=64,ml=4194304;function ao(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 us(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=ao(s):(o&=l,o!==0&&(r=ao(o)))}else l=n&~i,l!==0?r=ao(l):o!==0&&(r=ao(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-en(t),i=1<<n,r|=e[n],t&=~i;return r}function Yv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Gv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var l=31-en(o),s=1<<l,a=i[l];a===-1?(!(s&n)||s&r)&&(i[l]=Yv(s,t)):a<=t&&(e.expiredLanes|=s),o&=~s}}function rc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function qg(){var e=hl;return hl<<=1,!(hl&4194240)&&(hl=64),e}function Ba(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-en(t),e[t]=n}function Qv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-en(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Pf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-en(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ee=0;function Kg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Xg,_f,Yg,Gg,Qg,ic=!1,gl=[],rr=null,ir=null,or=null,No=new Map,To=new Map,Qn=[],Zv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function dp(e,t){switch(e){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":ir=null;break;case"mouseover":case"mouseout":or=null;break;case"pointerover":case"pointerout":No.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":To.delete(t.pointerId)}}function Ki(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=el(t),t!==null&&_f(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Jv(e,t,n,r,i){switch(t){case"focusin":return rr=Ki(rr,e,t,n,r,i),!0;case"dragenter":return ir=Ki(ir,e,t,n,r,i),!0;case"mouseover":return or=Ki(or,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return No.set(o,Ki(No.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,To.set(o,Ki(To.get(o)||null,e,t,n,r,i)),!0}return!1}function Zg(e){var t=br(e.target);if(t!==null){var n=Vr(t);if(n!==null){if(t=n.tag,t===13){if(t=jg(n),t!==null){e.blockedOn=t,Qg(e.priority,function(){Yg(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=oc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ju=r,n.target.dispatchEvent(r),Ju=null}else return t=el(n),t!==null&&_f(t),e.blockedOn=n,!1;t.shift()}return!0}function pp(e,t,n){$l(e)&&n.delete(t)}function ek(){ic=!1,rr!==null&&$l(rr)&&(rr=null),ir!==null&&$l(ir)&&(ir=null),or!==null&&$l(or)&&(or=null),No.forEach(pp),To.forEach(pp)}function Xi(e,t){e.blockedOn===t&&(e.blockedOn=null,ic||(ic=!0,Tt.unstable_scheduleCallback(Tt.unstable_NormalPriority,ek)))}function Ao(e){function t(i){return Xi(i,e)}if(0<gl.length){Xi(gl[0],e);for(var n=1;n<gl.length;n++){var r=gl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rr!==null&&Xi(rr,e),ir!==null&&Xi(ir,e),or!==null&&Xi(or,e),No.forEach(t),To.forEach(t),n=0;n<Qn.length;n++)r=Qn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qn.length&&(n=Qn[0],n.blockedOn===null);)Zg(n),n.blockedOn===null&&Qn.shift()}var gi=On.ReactCurrentBatchConfig,cs=!0;function tk(e,t,n,r){var i=Ee,o=gi.transition;gi.transition=null;try{Ee=1,Nf(e,t,n,r)}finally{Ee=i,gi.transition=o}}function nk(e,t,n,r){var i=Ee,o=gi.transition;gi.transition=null;try{Ee=4,Nf(e,t,n,r)}finally{Ee=i,gi.transition=o}}function Nf(e,t,n,r){if(cs){var i=oc(e,t,n,r);if(i===null)Qa(e,t,r,fs,n),dp(e,r);else if(Jv(i,e,t,n,r))r.stopPropagation();else if(dp(e,r),t&4&&-1<Zv.indexOf(e)){for(;i!==null;){var o=el(i);if(o!==null&&Xg(o),o=oc(e,t,n,r),o===null&&Qa(e,t,r,fs,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Qa(e,t,r,null,n)}}var fs=null;function oc(e,t,n,r){if(fs=null,e=Cf(r),e=br(e),e!==null)if(t=Vr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=jg(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return fs=e,null}function Jg(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Uv()){case bf:return 1;case Vg:return 4;case as:case Vv:return 16;case Wg:return 536870912;default:return 16}default:return 16}}var er=null,Tf=null,jl=null;function ey(){if(jl)return jl;var e,t=Tf,n=t.length,r,i="value"in er?er.value:er.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[o-r];r++);return jl=i.slice(e,1<r?1-r:void 0)}function Bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yl(){return!0}function hp(){return!1}function Lt(e){function t(n,r,i,o,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?yl:hp,this.isPropagationStopped=hp,this}return Oe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yl)},persist:function(){},isPersistent:yl}),t}var Oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Af=Lt(Oi),Jo=Oe({},Oi,{view:0,detail:0}),rk=Lt(Jo),Ha,Ua,Yi,qs=Oe({},Jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Df,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yi&&(Yi&&e.type==="mousemove"?(Ha=e.screenX-Yi.screenX,Ua=e.screenY-Yi.screenY):Ua=Ha=0,Yi=e),Ha)},movementY:function(e){return"movementY"in e?e.movementY:Ua}}),mp=Lt(qs),ik=Oe({},qs,{dataTransfer:0}),ok=Lt(ik),lk=Oe({},Jo,{relatedTarget:0}),Va=Lt(lk),sk=Oe({},Oi,{animationName:0,elapsedTime:0,pseudoElement:0}),ak=Lt(sk),uk=Oe({},Oi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ck=Lt(uk),fk=Oe({},Oi,{data:0}),gp=Lt(fk),dk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hk[e])?!!t[e]:!1}function Df(){return mk}var gk=Oe({},Jo,{key:function(e){if(e.key){var t=dk[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Df,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yk=Lt(gk),wk=Oe({},qs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yp=Lt(wk),xk=Oe({},Jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Df}),vk=Lt(xk),kk=Oe({},Oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Sk=Lt(kk),Ek=Oe({},qs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ck=Lt(Ek),bk=[9,13,27,32],Lf=Dn&&"CompositionEvent"in window,mo=null;Dn&&"documentMode"in document&&(mo=document.documentMode);var Pk=Dn&&"TextEvent"in window&&!mo,ty=Dn&&(!Lf||mo&&8<mo&&11>=mo),wp=" ",xp=!1;function ny(e,t){switch(e){case"keyup":return bk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ry(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function _k(e,t){switch(e){case"compositionend":return ry(t);case"keypress":return t.which!==32?null:(xp=!0,wp);case"textInput":return e=t.data,e===wp&&xp?null:e;default:return null}}function Nk(e,t){if(ti)return e==="compositionend"||!Lf&&ny(e,t)?(e=ey(),jl=Tf=er=null,ti=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ty&&t.locale!=="ko"?null:t.data;default:return null}}var Tk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Tk[e.type]:t==="textarea"}function iy(e,t,n,r){Ig(r),t=ds(t,"onChange"),0<t.length&&(n=new Af("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var go=null,Do=null;function Ak(e){my(e,0)}function Ks(e){var t=ii(e);if(Ng(t))return e}function Dk(e,t){if(e==="change")return t}var oy=!1;if(Dn){var Wa;if(Dn){var qa="oninput"in document;if(!qa){var kp=document.createElement("div");kp.setAttribute("oninput","return;"),qa=typeof kp.oninput=="function"}Wa=qa}else Wa=!1;oy=Wa&&(!document.documentMode||9<document.documentMode)}function Sp(){go&&(go.detachEvent("onpropertychange",ly),Do=go=null)}function ly(e){if(e.propertyName==="value"&&Ks(Do)){var t=[];iy(t,Do,e,Cf(e)),$g(Ak,t)}}function Lk(e,t,n){e==="focusin"?(Sp(),go=t,Do=n,go.attachEvent("onpropertychange",ly)):e==="focusout"&&Sp()}function Mk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ks(Do)}function Rk(e,t){if(e==="click")return Ks(t)}function Ik(e,t){if(e==="input"||e==="change")return Ks(t)}function Fk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ln=typeof Object.is=="function"?Object.is:Fk;function Lo(e,t){if(ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Bu.call(t,i)||!ln(e[i],t[i]))return!1}return!0}function Ep(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cp(e,t){var n=Ep(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ep(n)}}function sy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ay(){for(var e=window,t=os();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=os(e.document)}return t}function Mf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ok(e){var t=ay(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&sy(n.ownerDocument.documentElement,n)){if(r!==null&&Mf(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Cp(n,o);var l=Cp(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zk=Dn&&"documentMode"in document&&11>=document.documentMode,ni=null,lc=null,yo=null,sc=!1;function bp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;sc||ni==null||ni!==os(r)||(r=ni,"selectionStart"in r&&Mf(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}),yo&&Lo(yo,r)||(yo=r,r=ds(lc,"onSelect"),0<r.length&&(t=new Af("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ni)))}function wl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ri={animationend:wl("Animation","AnimationEnd"),animationiteration:wl("Animation","AnimationIteration"),animationstart:wl("Animation","AnimationStart"),transitionend:wl("Transition","TransitionEnd")},Ka={},uy={};Dn&&(uy=document.createElement("div").style,"AnimationEvent"in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),"TransitionEvent"in window||delete ri.transitionend.transition);function Xs(e){if(Ka[e])return Ka[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in uy)return Ka[e]=t[n];return e}var cy=Xs("animationend"),fy=Xs("animationiteration"),dy=Xs("animationstart"),py=Xs("transitionend"),hy=new Map,Pp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mr(e,t){hy.set(e,t),Ur(t,[e])}for(var Xa=0;Xa<Pp.length;Xa++){var Ya=Pp[Xa],$k=Ya.toLowerCase(),jk=Ya[0].toUpperCase()+Ya.slice(1);mr($k,"on"+jk)}mr(cy,"onAnimationEnd");mr(fy,"onAnimationIteration");mr(dy,"onAnimationStart");mr("dblclick","onDoubleClick");mr("focusin","onFocus");mr("focusout","onBlur");mr(py,"onTransitionEnd");Ci("onMouseEnter",["mouseout","mouseover"]);Ci("onMouseLeave",["mouseout","mouseover"]);Ci("onPointerEnter",["pointerout","pointerover"]);Ci("onPointerLeave",["pointerout","pointerover"]);Ur("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ur("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ur("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ur("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ur("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ur("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Bk=new Set("cancel close invalid load scroll toggle".split(" ").concat(uo));function _p(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,$v(r,t,void 0,e),e.currentTarget=null}function my(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var l=r.length-1;0<=l;l--){var s=r[l],a=s.instance,u=s.currentTarget;if(s=s.listener,a!==o&&i.isPropagationStopped())break e;_p(i,s,u),o=a}else for(l=0;l<r.length;l++){if(s=r[l],a=s.instance,u=s.currentTarget,s=s.listener,a!==o&&i.isPropagationStopped())break e;_p(i,s,u),o=a}}}if(ss)throw e=nc,ss=!1,nc=null,e}function Ae(e,t){var n=t[dc];n===void 0&&(n=t[dc]=new Set);var r=e+"__bubble";n.has(r)||(gy(t,e,2,!1),n.add(r))}function Ga(e,t,n){var r=0;t&&(r|=4),gy(n,e,r,t)}var xl="_reactListening"+Math.random().toString(36).slice(2);function Mo(e){if(!e[xl]){e[xl]=!0,Eg.forEach(function(n){n!=="selectionchange"&&(Bk.has(n)||Ga(n,!1,e),Ga(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xl]||(t[xl]=!0,Ga("selectionchange",!1,t))}}function gy(e,t,n,r){switch(Jg(t)){case 1:var i=tk;break;case 4:i=nk;break;default:i=Nf}n=i.bind(null,t,n,e),i=void 0,!tc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Qa(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;l=l.return}for(;s!==null;){if(l=br(s),l===null)return;if(a=l.tag,a===5||a===6){r=o=l;continue e}s=s.parentNode}}r=r.return}$g(function(){var u=o,c=Cf(n),f=[];e:{var d=hy.get(e);if(d!==void 0){var p=Af,m=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":p=yk;break;case"focusin":m="focus",p=Va;break;case"focusout":m="blur",p=Va;break;case"beforeblur":case"afterblur":p=Va;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=mp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=ok;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=vk;break;case cy:case fy:case dy:p=ak;break;case py:p=Sk;break;case"scroll":p=rk;break;case"wheel":p=Ck;break;case"copy":case"cut":case"paste":p=ck;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=yp}var g=(t&4)!==0,k=!g&&e==="scroll",h=g?d!==null?d+"Capture":null:d;g=[];for(var y=u,w;y!==null;){w=y;var v=w.stateNode;if(w.tag===5&&v!==null&&(w=v,h!==null&&(v=_o(y,h),v!=null&&g.push(Ro(y,v,w)))),k)break;y=y.return}0<g.length&&(d=new p(d,m,null,n,c),f.push({event:d,listeners:g}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&n!==Ju&&(m=n.relatedTarget||n.fromElement)&&(br(m)||m[Ln]))break e;if((p||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?br(m):null,m!==null&&(k=Vr(m),m!==k||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=mp,v="onMouseLeave",h="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=yp,v="onPointerLeave",h="onPointerEnter",y="pointer"),k=p==null?d:ii(p),w=m==null?d:ii(m),d=new g(v,y+"leave",p,n,c),d.target=k,d.relatedTarget=w,v=null,br(c)===u&&(g=new g(h,y+"enter",m,n,c),g.target=w,g.relatedTarget=k,v=g),k=v,p&&m)t:{for(g=p,h=m,y=0,w=g;w;w=qr(w))y++;for(w=0,v=h;v;v=qr(v))w++;for(;0<y-w;)g=qr(g),y--;for(;0<w-y;)h=qr(h),w--;for(;y--;){if(g===h||h!==null&&g===h.alternate)break t;g=qr(g),h=qr(h)}g=null}else g=null;p!==null&&Np(f,d,p,g,!1),m!==null&&k!==null&&Np(f,k,m,g,!0)}}e:{if(d=u?ii(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var _=Dk;else if(vp(d))if(oy)_=Ik;else{_=Mk;var S=Lk}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(_=Rk);if(_&&(_=_(e,u))){iy(f,_,n,c);break e}S&&S(e,d,u),e==="focusout"&&(S=d._wrapperState)&&S.controlled&&d.type==="number"&&Xu(d,"number",d.value)}switch(S=u?ii(u):window,e){case"focusin":(vp(S)||S.contentEditable==="true")&&(ni=S,lc=u,yo=null);break;case"focusout":yo=lc=ni=null;break;case"mousedown":sc=!0;break;case"contextmenu":case"mouseup":case"dragend":sc=!1,bp(f,n,c);break;case"selectionchange":if(zk)break;case"keydown":case"keyup":bp(f,n,c)}var N;if(Lf)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else ti?ny(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(ty&&n.locale!=="ko"&&(ti||A!=="onCompositionStart"?A==="onCompositionEnd"&&ti&&(N=ey()):(er=c,Tf="value"in er?er.value:er.textContent,ti=!0)),S=ds(u,A),0<S.length&&(A=new gp(A,e,null,n,c),f.push({event:A,listeners:S}),N?A.data=N:(N=ry(n),N!==null&&(A.data=N)))),(N=Pk?_k(e,n):Nk(e,n))&&(u=ds(u,"onBeforeInput"),0<u.length&&(c=new gp("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=N))}my(f,t)})}function Ro(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ds(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=_o(e,n),o!=null&&r.unshift(Ro(e,o,i)),o=_o(e,t),o!=null&&r.push(Ro(e,o,i))),e=e.return}return r}function qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Np(e,t,n,r,i){for(var o=t._reactName,l=[];n!==null&&n!==r;){var s=n,a=s.alternate,u=s.stateNode;if(a!==null&&a===r)break;s.tag===5&&u!==null&&(s=u,i?(a=_o(n,o),a!=null&&l.unshift(Ro(n,a,s))):i||(a=_o(n,o),a!=null&&l.push(Ro(n,a,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Hk=/\r\n?/g,Uk=/\u0000|\uFFFD/g;function Tp(e){return(typeof e=="string"?e:""+e).replace(Hk,`
`).replace(Uk,"")}function vl(e,t,n){if(t=Tp(t),Tp(e)!==t&&n)throw Error(Q(425))}function ps(){}var ac=null,uc=null;function cc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fc=typeof setTimeout=="function"?setTimeout:void 0,Vk=typeof clearTimeout=="function"?clearTimeout:void 0,Ap=typeof Promise=="function"?Promise:void 0,Wk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ap<"u"?function(e){return Ap.resolve(null).then(e).catch(qk)}:fc;function qk(e){setTimeout(function(){throw e})}function Za(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Ao(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ao(t)}function lr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Dp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var zi=Math.random().toString(36).slice(2),dn="__reactFiber$"+zi,Io="__reactProps$"+zi,Ln="__reactContainer$"+zi,dc="__reactEvents$"+zi,Kk="__reactListeners$"+zi,Xk="__reactHandles$"+zi;function br(e){var t=e[dn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ln]||n[dn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Dp(e);e!==null;){if(n=e[dn])return n;e=Dp(e)}return t}e=n,n=e.parentNode}return null}function el(e){return e=e[dn]||e[Ln],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ii(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function Ys(e){return e[Io]||null}var pc=[],oi=-1;function gr(e){return{current:e}}function Le(e){0>oi||(e.current=pc[oi],pc[oi]=null,oi--)}function Te(e,t){oi++,pc[oi]=e.current,e.current=t}var pr={},st=gr(pr),wt=gr(!1),Rr=pr;function bi(e,t){var n=e.type.contextTypes;if(!n)return pr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function xt(e){return e=e.childContextTypes,e!=null}function hs(){Le(wt),Le(st)}function Lp(e,t,n){if(st.current!==pr)throw Error(Q(168));Te(st,t),Te(wt,n)}function yy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Q(108,Lv(e)||"Unknown",i));return Oe({},n,r)}function ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pr,Rr=st.current,Te(st,e),Te(wt,wt.current),!0}function Mp(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=yy(e,t,Rr),r.__reactInternalMemoizedMergedChildContext=e,Le(wt),Le(st),Te(st,e)):Le(wt),Te(wt,n)}var Cn=null,Gs=!1,Ja=!1;function wy(e){Cn===null?Cn=[e]:Cn.push(e)}function Yk(e){Gs=!0,wy(e)}function yr(){if(!Ja&&Cn!==null){Ja=!0;var e=0,t=Ee;try{var n=Cn;for(Ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Cn=null,Gs=!1}catch(i){throw Cn!==null&&(Cn=Cn.slice(e+1)),Ug(bf,yr),i}finally{Ee=t,Ja=!1}}return null}var li=[],si=0,gs=null,ys=0,Mt=[],Rt=0,Ir=null,bn=1,Pn="";function kr(e,t){li[si++]=ys,li[si++]=gs,gs=e,ys=t}function xy(e,t,n){Mt[Rt++]=bn,Mt[Rt++]=Pn,Mt[Rt++]=Ir,Ir=e;var r=bn;e=Pn;var i=32-en(r)-1;r&=~(1<<i),n+=1;var o=32-en(t)+i;if(30<o){var l=i-i%5;o=(r&(1<<l)-1).toString(32),r>>=l,i-=l,bn=1<<32-en(t)+i|n<<i|r,Pn=o+e}else bn=1<<o|n<<i|r,Pn=e}function Rf(e){e.return!==null&&(kr(e,1),xy(e,1,0))}function If(e){for(;e===gs;)gs=li[--si],li[si]=null,ys=li[--si],li[si]=null;for(;e===Ir;)Ir=Mt[--Rt],Mt[Rt]=null,Pn=Mt[--Rt],Mt[Rt]=null,bn=Mt[--Rt],Mt[Rt]=null}var _t=null,Pt=null,Me=!1,Zt=null;function vy(e,t){var n=Ot(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Rp(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_t=e,Pt=lr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_t=e,Pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ir!==null?{id:bn,overflow:Pn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ot(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_t=e,Pt=null,!0):!1;default:return!1}}function hc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function mc(e){if(Me){var t=Pt;if(t){var n=t;if(!Rp(e,t)){if(hc(e))throw Error(Q(418));t=lr(n.nextSibling);var r=_t;t&&Rp(e,t)?vy(r,n):(e.flags=e.flags&-4097|2,Me=!1,_t=e)}}else{if(hc(e))throw Error(Q(418));e.flags=e.flags&-4097|2,Me=!1,_t=e}}}function Ip(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_t=e}function kl(e){if(e!==_t)return!1;if(!Me)return Ip(e),Me=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!cc(e.type,e.memoizedProps)),t&&(t=Pt)){if(hc(e))throw ky(),Error(Q(418));for(;t;)vy(e,t),t=lr(t.nextSibling)}if(Ip(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Pt=lr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Pt=null}}else Pt=_t?lr(e.stateNode.nextSibling):null;return!0}function ky(){for(var e=Pt;e;)e=lr(e.nextSibling)}function Pi(){Pt=_t=null,Me=!1}function Ff(e){Zt===null?Zt=[e]:Zt.push(e)}var Gk=On.ReactCurrentBatchConfig;function Gi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(l){var s=i.refs;l===null?delete s[o]:s[o]=l},t._stringRef=o,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function Sl(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Fp(e){var t=e._init;return t(e._payload)}function Sy(e){function t(h,y){if(e){var w=h.deletions;w===null?(h.deletions=[y],h.flags|=16):w.push(y)}}function n(h,y){if(!e)return null;for(;y!==null;)t(h,y),y=y.sibling;return null}function r(h,y){for(h=new Map;y!==null;)y.key!==null?h.set(y.key,y):h.set(y.index,y),y=y.sibling;return h}function i(h,y){return h=cr(h,y),h.index=0,h.sibling=null,h}function o(h,y,w){return h.index=w,e?(w=h.alternate,w!==null?(w=w.index,w<y?(h.flags|=2,y):w):(h.flags|=2,y)):(h.flags|=1048576,y)}function l(h){return e&&h.alternate===null&&(h.flags|=2),h}function s(h,y,w,v){return y===null||y.tag!==6?(y=lu(w,h.mode,v),y.return=h,y):(y=i(y,w),y.return=h,y)}function a(h,y,w,v){var _=w.type;return _===ei?c(h,y,w.props.children,v,w.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Kn&&Fp(_)===y.type)?(v=i(y,w.props),v.ref=Gi(h,y,w),v.return=h,v):(v=Xl(w.type,w.key,w.props,null,h.mode,v),v.ref=Gi(h,y,w),v.return=h,v)}function u(h,y,w,v){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=su(w,h.mode,v),y.return=h,y):(y=i(y,w.children||[]),y.return=h,y)}function c(h,y,w,v,_){return y===null||y.tag!==7?(y=Ar(w,h.mode,v,_),y.return=h,y):(y=i(y,w),y.return=h,y)}function f(h,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=lu(""+y,h.mode,w),y.return=h,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case fl:return w=Xl(y.type,y.key,y.props,null,h.mode,w),w.ref=Gi(h,null,y),w.return=h,w;case Jr:return y=su(y,h.mode,w),y.return=h,y;case Kn:var v=y._init;return f(h,v(y._payload),w)}if(so(y)||Wi(y))return y=Ar(y,h.mode,w,null),y.return=h,y;Sl(h,y)}return null}function d(h,y,w,v){var _=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return _!==null?null:s(h,y,""+w,v);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case fl:return w.key===_?a(h,y,w,v):null;case Jr:return w.key===_?u(h,y,w,v):null;case Kn:return _=w._init,d(h,y,_(w._payload),v)}if(so(w)||Wi(w))return _!==null?null:c(h,y,w,v,null);Sl(h,w)}return null}function p(h,y,w,v,_){if(typeof v=="string"&&v!==""||typeof v=="number")return h=h.get(w)||null,s(y,h,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case fl:return h=h.get(v.key===null?w:v.key)||null,a(y,h,v,_);case Jr:return h=h.get(v.key===null?w:v.key)||null,u(y,h,v,_);case Kn:var S=v._init;return p(h,y,w,S(v._payload),_)}if(so(v)||Wi(v))return h=h.get(w)||null,c(y,h,v,_,null);Sl(y,v)}return null}function m(h,y,w,v){for(var _=null,S=null,N=y,A=y=0,L=null;N!==null&&A<w.length;A++){N.index>A?(L=N,N=null):L=N.sibling;var b=d(h,N,w[A],v);if(b===null){N===null&&(N=L);break}e&&N&&b.alternate===null&&t(h,N),y=o(b,y,A),S===null?_=b:S.sibling=b,S=b,N=L}if(A===w.length)return n(h,N),Me&&kr(h,A),_;if(N===null){for(;A<w.length;A++)N=f(h,w[A],v),N!==null&&(y=o(N,y,A),S===null?_=N:S.sibling=N,S=N);return Me&&kr(h,A),_}for(N=r(h,N);A<w.length;A++)L=p(N,h,A,w[A],v),L!==null&&(e&&L.alternate!==null&&N.delete(L.key===null?A:L.key),y=o(L,y,A),S===null?_=L:S.sibling=L,S=L);return e&&N.forEach(function(M){return t(h,M)}),Me&&kr(h,A),_}function g(h,y,w,v){var _=Wi(w);if(typeof _!="function")throw Error(Q(150));if(w=_.call(w),w==null)throw Error(Q(151));for(var S=_=null,N=y,A=y=0,L=null,b=w.next();N!==null&&!b.done;A++,b=w.next()){N.index>A?(L=N,N=null):L=N.sibling;var M=d(h,N,b.value,v);if(M===null){N===null&&(N=L);break}e&&N&&M.alternate===null&&t(h,N),y=o(M,y,A),S===null?_=M:S.sibling=M,S=M,N=L}if(b.done)return n(h,N),Me&&kr(h,A),_;if(N===null){for(;!b.done;A++,b=w.next())b=f(h,b.value,v),b!==null&&(y=o(b,y,A),S===null?_=b:S.sibling=b,S=b);return Me&&kr(h,A),_}for(N=r(h,N);!b.done;A++,b=w.next())b=p(N,h,A,b.value,v),b!==null&&(e&&b.alternate!==null&&N.delete(b.key===null?A:b.key),y=o(b,y,A),S===null?_=b:S.sibling=b,S=b);return e&&N.forEach(function(z){return t(h,z)}),Me&&kr(h,A),_}function k(h,y,w,v){if(typeof w=="object"&&w!==null&&w.type===ei&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case fl:e:{for(var _=w.key,S=y;S!==null;){if(S.key===_){if(_=w.type,_===ei){if(S.tag===7){n(h,S.sibling),y=i(S,w.props.children),y.return=h,h=y;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Kn&&Fp(_)===S.type){n(h,S.sibling),y=i(S,w.props),y.ref=Gi(h,S,w),y.return=h,h=y;break e}n(h,S);break}else t(h,S);S=S.sibling}w.type===ei?(y=Ar(w.props.children,h.mode,v,w.key),y.return=h,h=y):(v=Xl(w.type,w.key,w.props,null,h.mode,v),v.ref=Gi(h,y,w),v.return=h,h=v)}return l(h);case Jr:e:{for(S=w.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(h,y.sibling),y=i(y,w.children||[]),y.return=h,h=y;break e}else{n(h,y);break}else t(h,y);y=y.sibling}y=su(w,h.mode,v),y.return=h,h=y}return l(h);case Kn:return S=w._init,k(h,y,S(w._payload),v)}if(so(w))return m(h,y,w,v);if(Wi(w))return g(h,y,w,v);Sl(h,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(h,y.sibling),y=i(y,w),y.return=h,h=y):(n(h,y),y=lu(w,h.mode,v),y.return=h,h=y),l(h)):n(h,y)}return k}var _i=Sy(!0),Ey=Sy(!1),ws=gr(null),xs=null,ai=null,Of=null;function zf(){Of=ai=xs=null}function $f(e){var t=ws.current;Le(ws),e._currentValue=t}function gc(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function yi(e,t){xs=e,Of=ai=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gt=!0),e.firstContext=null)}function Bt(e){var t=e._currentValue;if(Of!==e)if(e={context:e,memoizedValue:t,next:null},ai===null){if(xs===null)throw Error(Q(308));ai=e,xs.dependencies={lanes:0,firstContext:e}}else ai=ai.next=e;return t}var Pr=null;function jf(e){Pr===null?Pr=[e]:Pr.push(e)}function Cy(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,jf(t)):(n.next=i.next,i.next=n),t.interleaved=n,Mn(e,r)}function Mn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xn=!1;function Bf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function by(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function sr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ke&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Mn(e,n)}return i=r.interleaved,i===null?(t.next=t,jf(r)):(t.next=i.next,i.next=t),r.interleaved=t,Mn(e,n)}function Hl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Pf(e,n)}}function Op(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vs(e,t,n,r){var i=e.updateQueue;Xn=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?o=u:l.next=u,l=a;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==l&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;l=0,c=u=a=null,s=o;do{var d=s.lane,p=s.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(d=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){f=m.call(p,f,d);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,d=typeof m=="function"?m.call(p,f,d):m,d==null)break e;f=Oe({},f,d);break e;case 2:Xn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else p={eventTime:p,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,a=f):c=c.next=p,l|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Or|=l,e.lanes=l,e.memoizedState=f}}function zp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Q(191,i));i.call(r)}}}var tl={},hn=gr(tl),Fo=gr(tl),Oo=gr(tl);function _r(e){if(e===tl)throw Error(Q(174));return e}function Hf(e,t){switch(Te(Oo,t),Te(Fo,e),Te(hn,tl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gu(t,e)}Le(hn),Te(hn,t)}function Ni(){Le(hn),Le(Fo),Le(Oo)}function Py(e){_r(Oo.current);var t=_r(hn.current),n=Gu(t,e.type);t!==n&&(Te(Fo,e),Te(hn,n))}function Uf(e){Fo.current===e&&(Le(hn),Le(Fo))}var Ie=gr(0);function ks(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var eu=[];function Vf(){for(var e=0;e<eu.length;e++)eu[e]._workInProgressVersionPrimary=null;eu.length=0}var Ul=On.ReactCurrentDispatcher,tu=On.ReactCurrentBatchConfig,Fr=0,Fe=null,We=null,Ke=null,Ss=!1,wo=!1,zo=0,Qk=0;function rt(){throw Error(Q(321))}function Wf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ln(e[n],t[n]))return!1;return!0}function qf(e,t,n,r,i,o){if(Fr=o,Fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ul.current=e===null||e.memoizedState===null?tS:nS,e=n(r,i),wo){o=0;do{if(wo=!1,zo=0,25<=o)throw Error(Q(301));o+=1,Ke=We=null,t.updateQueue=null,Ul.current=rS,e=n(r,i)}while(wo)}if(Ul.current=Es,t=We!==null&&We.next!==null,Fr=0,Ke=We=Fe=null,Ss=!1,t)throw Error(Q(300));return e}function Kf(){var e=zo!==0;return zo=0,e}function cn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Fe.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function Ht(){if(We===null){var e=Fe.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=Ke===null?Fe.memoizedState:Ke.next;if(t!==null)Ke=t,We=e;else{if(e===null)throw Error(Q(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Ke===null?Fe.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function $o(e,t){return typeof t=="function"?t(e):t}function nu(e){var t=Ht(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=We,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var l=i.next;i.next=o.next,o.next=l}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=l=null,a=null,u=o;do{var c=u.lane;if((Fr&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(s=a=f,l=r):a=a.next=f,Fe.lanes|=c,Or|=c}u=u.next}while(u!==null&&u!==o);a===null?l=r:a.next=s,ln(r,t.memoizedState)||(gt=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Fe.lanes|=o,Or|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ru(e){var t=Ht(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do o=e(o,l.action),l=l.next;while(l!==i);ln(o,t.memoizedState)||(gt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function _y(){}function Ny(e,t){var n=Fe,r=Ht(),i=t(),o=!ln(r.memoizedState,i);if(o&&(r.memoizedState=i,gt=!0),r=r.queue,Xf(Dy.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,jo(9,Ay.bind(null,n,r,i,t),void 0,null),Xe===null)throw Error(Q(349));Fr&30||Ty(n,t,i)}return i}function Ty(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Fe.updateQueue,t===null?(t={lastEffect:null,stores:null},Fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ay(e,t,n,r){t.value=n,t.getSnapshot=r,Ly(t)&&My(e)}function Dy(e,t,n){return n(function(){Ly(t)&&My(e)})}function Ly(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ln(e,n)}catch{return!0}}function My(e){var t=Mn(e,1);t!==null&&tn(t,e,1,-1)}function $p(e){var t=cn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:e},t.queue=e,e=e.dispatch=eS.bind(null,Fe,e),[t.memoizedState,e]}function jo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Fe.updateQueue,t===null?(t={lastEffect:null,stores:null},Fe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Ry(){return Ht().memoizedState}function Vl(e,t,n,r){var i=cn();Fe.flags|=e,i.memoizedState=jo(1|t,n,void 0,r===void 0?null:r)}function Qs(e,t,n,r){var i=Ht();r=r===void 0?null:r;var o=void 0;if(We!==null){var l=We.memoizedState;if(o=l.destroy,r!==null&&Wf(r,l.deps)){i.memoizedState=jo(t,n,o,r);return}}Fe.flags|=e,i.memoizedState=jo(1|t,n,o,r)}function jp(e,t){return Vl(8390656,8,e,t)}function Xf(e,t){return Qs(2048,8,e,t)}function Iy(e,t){return Qs(4,2,e,t)}function Fy(e,t){return Qs(4,4,e,t)}function Oy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zy(e,t,n){return n=n!=null?n.concat([e]):null,Qs(4,4,Oy.bind(null,t,e),n)}function Yf(){}function $y(e,t){var n=Ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function jy(e,t){var n=Ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function By(e,t,n){return Fr&21?(ln(n,t)||(n=qg(),Fe.lanes|=n,Or|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gt=!0),e.memoizedState=n)}function Zk(e,t){var n=Ee;Ee=n!==0&&4>n?n:4,e(!0);var r=tu.transition;tu.transition={};try{e(!1),t()}finally{Ee=n,tu.transition=r}}function Hy(){return Ht().memoizedState}function Jk(e,t,n){var r=ur(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Uy(e))Vy(t,n);else if(n=Cy(e,t,n,r),n!==null){var i=dt();tn(n,e,r,i),Wy(n,t,r)}}function eS(e,t,n){var r=ur(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Uy(e))Vy(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,ln(s,l)){var a=t.interleaved;a===null?(i.next=i,jf(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Cy(e,t,i,r),n!==null&&(i=dt(),tn(n,e,r,i),Wy(n,t,r))}}function Uy(e){var t=e.alternate;return e===Fe||t!==null&&t===Fe}function Vy(e,t){wo=Ss=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Pf(e,n)}}var Es={readContext:Bt,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useInsertionEffect:rt,useLayoutEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useMutableSource:rt,useSyncExternalStore:rt,useId:rt,unstable_isNewReconciler:!1},tS={readContext:Bt,useCallback:function(e,t){return cn().memoizedState=[e,t===void 0?null:t],e},useContext:Bt,useEffect:jp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vl(4194308,4,Oy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vl(4,2,e,t)},useMemo:function(e,t){var n=cn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=cn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jk.bind(null,Fe,e),[r.memoizedState,e]},useRef:function(e){var t=cn();return e={current:e},t.memoizedState=e},useState:$p,useDebugValue:Yf,useDeferredValue:function(e){return cn().memoizedState=e},useTransition:function(){var e=$p(!1),t=e[0];return e=Zk.bind(null,e[1]),cn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Fe,i=cn();if(Me){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),Xe===null)throw Error(Q(349));Fr&30||Ty(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,jp(Dy.bind(null,r,o,e),[e]),r.flags|=2048,jo(9,Ay.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=cn(),t=Xe.identifierPrefix;if(Me){var n=Pn,r=bn;n=(r&~(1<<32-en(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Qk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},nS={readContext:Bt,useCallback:$y,useContext:Bt,useEffect:Xf,useImperativeHandle:zy,useInsertionEffect:Iy,useLayoutEffect:Fy,useMemo:jy,useReducer:nu,useRef:Ry,useState:function(){return nu($o)},useDebugValue:Yf,useDeferredValue:function(e){var t=Ht();return By(t,We.memoizedState,e)},useTransition:function(){var e=nu($o)[0],t=Ht().memoizedState;return[e,t]},useMutableSource:_y,useSyncExternalStore:Ny,useId:Hy,unstable_isNewReconciler:!1},rS={readContext:Bt,useCallback:$y,useContext:Bt,useEffect:Xf,useImperativeHandle:zy,useInsertionEffect:Iy,useLayoutEffect:Fy,useMemo:jy,useReducer:ru,useRef:Ry,useState:function(){return ru($o)},useDebugValue:Yf,useDeferredValue:function(e){var t=Ht();return We===null?t.memoizedState=e:By(t,We.memoizedState,e)},useTransition:function(){var e=ru($o)[0],t=Ht().memoizedState;return[e,t]},useMutableSource:_y,useSyncExternalStore:Ny,useId:Hy,unstable_isNewReconciler:!1};function Yt(e,t){if(e&&e.defaultProps){t=Oe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function yc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zs={isMounted:function(e){return(e=e._reactInternals)?Vr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=dt(),i=ur(e),o=Tn(r,i);o.payload=t,n!=null&&(o.callback=n),t=sr(e,o,i),t!==null&&(tn(t,e,i,r),Hl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=dt(),i=ur(e),o=Tn(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=sr(e,o,i),t!==null&&(tn(t,e,i,r),Hl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=dt(),r=ur(e),i=Tn(n,r);i.tag=2,t!=null&&(i.callback=t),t=sr(e,i,r),t!==null&&(tn(t,e,r,n),Hl(t,e,r))}};function Bp(e,t,n,r,i,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,l):t.prototype&&t.prototype.isPureReactComponent?!Lo(n,r)||!Lo(i,o):!0}function qy(e,t,n){var r=!1,i=pr,o=t.contextType;return typeof o=="object"&&o!==null?o=Bt(o):(i=xt(t)?Rr:st.current,r=t.contextTypes,o=(r=r!=null)?bi(e,i):pr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Hp(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Zs.enqueueReplaceState(t,t.state,null)}function wc(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Bf(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Bt(o):(o=xt(t)?Rr:st.current,i.context=bi(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(yc(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Zs.enqueueReplaceState(i,i.state,null),vs(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ti(e,t){try{var n="",r=t;do n+=Dv(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function iu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function xc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var iS=typeof WeakMap=="function"?WeakMap:Map;function Ky(e,t,n){n=Tn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bs||(bs=!0,Tc=r),xc(e,t)},n}function Xy(e,t,n){n=Tn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){xc(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){xc(e,t),typeof r!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Up(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new iS;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=wS.bind(null,e,t,n),t.then(e,e))}function Vp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Wp(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Tn(-1,1),t.tag=2,sr(n,t,1))),n.lanes|=1),e)}var oS=On.ReactCurrentOwner,gt=!1;function ct(e,t,n,r){t.child=e===null?Ey(t,null,n,r):_i(t,e.child,n,r)}function qp(e,t,n,r,i){n=n.render;var o=t.ref;return yi(t,i),r=qf(e,t,n,r,o,i),n=Kf(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Rn(e,t,i)):(Me&&n&&Rf(t),t.flags|=1,ct(e,t,r,i),t.child)}function Kp(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!rd(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Yy(e,t,o,r,i)):(e=Xl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Lo,n(l,r)&&e.ref===t.ref)return Rn(e,t,i)}return t.flags|=1,e=cr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Yy(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Lo(o,r)&&e.ref===t.ref)if(gt=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(gt=!0);else return t.lanes=e.lanes,Rn(e,t,i)}return vc(e,t,n,r,i)}function Gy(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Te(ci,bt),bt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Te(ci,bt),bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Te(ci,bt),bt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Te(ci,bt),bt|=r;return ct(e,t,i,n),t.child}function Qy(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function vc(e,t,n,r,i){var o=xt(n)?Rr:st.current;return o=bi(t,o),yi(t,i),n=qf(e,t,n,r,o,i),r=Kf(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Rn(e,t,i)):(Me&&r&&Rf(t),t.flags|=1,ct(e,t,n,i),t.child)}function Xp(e,t,n,r,i){if(xt(n)){var o=!0;ms(t)}else o=!1;if(yi(t,i),t.stateNode===null)Wl(e,t),qy(t,n,r),wc(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var a=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=Bt(u):(u=xt(n)?Rr:st.current,u=bi(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||a!==u)&&Hp(t,l,r,u),Xn=!1;var d=t.memoizedState;l.state=d,vs(t,r,l,i),a=t.memoizedState,s!==r||d!==a||wt.current||Xn?(typeof c=="function"&&(yc(t,n,c,r),a=t.memoizedState),(s=Xn||Bp(t,n,s,r,d,a,u))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),l.props=r,l.state=a,l.context=u,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,by(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Yt(t.type,s),l.props=u,f=t.pendingProps,d=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=Bt(a):(a=xt(n)?Rr:st.current,a=bi(t,a));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==f||d!==a)&&Hp(t,l,r,a),Xn=!1,d=t.memoizedState,l.state=d,vs(t,r,l,i);var m=t.memoizedState;s!==f||d!==m||wt.current||Xn?(typeof p=="function"&&(yc(t,n,p,r),m=t.memoizedState),(u=Xn||Bp(t,n,u,r,d,m,a)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,m,a),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,m,a)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),l.props=r,l.state=m,l.context=a,r=u):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return kc(e,t,n,r,o,i)}function kc(e,t,n,r,i,o){Qy(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&Mp(t,n,!1),Rn(e,t,o);r=t.stateNode,oS.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=_i(t,e.child,null,o),t.child=_i(t,null,s,o)):ct(e,t,s,o),t.memoizedState=r.state,i&&Mp(t,n,!0),t.child}function Zy(e){var t=e.stateNode;t.pendingContext?Lp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Lp(e,t.context,!1),Hf(e,t.containerInfo)}function Yp(e,t,n,r,i){return Pi(),Ff(i),t.flags|=256,ct(e,t,n,r),t.child}var Sc={dehydrated:null,treeContext:null,retryLane:0};function Ec(e){return{baseLanes:e,cachePool:null,transitions:null}}function Jy(e,t,n){var r=t.pendingProps,i=Ie.current,o=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Te(Ie,i&1),e===null)return mc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=ta(l,r,0,null),e=Ar(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ec(n),t.memoizedState=Sc,e):Gf(t,l));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return lS(e,t,l,r,s,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,s=i.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=cr(i,a),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=cr(s,o):(o=Ar(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?Ec(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Sc,r}return o=e.child,e=o.sibling,r=cr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Gf(e,t){return t=ta({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function El(e,t,n,r){return r!==null&&Ff(r),_i(t,e.child,null,n),e=Gf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lS(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=iu(Error(Q(422))),El(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=ta({mode:"visible",children:r.children},i,0,null),o=Ar(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&_i(t,e.child,null,l),t.child.memoizedState=Ec(l),t.memoizedState=Sc,o);if(!(t.mode&1))return El(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Q(419)),r=iu(o,r,void 0),El(e,t,l,r)}if(s=(l&e.childLanes)!==0,gt||s){if(r=Xe,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Mn(e,i),tn(r,e,i,-1))}return nd(),r=iu(Error(Q(421))),El(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=xS.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Pt=lr(i.nextSibling),_t=t,Me=!0,Zt=null,e!==null&&(Mt[Rt++]=bn,Mt[Rt++]=Pn,Mt[Rt++]=Ir,bn=e.id,Pn=e.overflow,Ir=t),t=Gf(t,r.children),t.flags|=4096,t)}function Gp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),gc(e.return,t,n)}function ou(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function e0(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ct(e,t,r.children,n),r=Ie.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gp(e,n,t);else if(e.tag===19)Gp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Te(Ie,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ks(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ou(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ks(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ou(t,!0,n,null,o);break;case"together":ou(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Or|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=cr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=cr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sS(e,t,n){switch(t.tag){case 3:Zy(t),Pi();break;case 5:Py(t);break;case 1:xt(t.type)&&ms(t);break;case 4:Hf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Te(ws,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Te(Ie,Ie.current&1),t.flags|=128,null):n&t.child.childLanes?Jy(e,t,n):(Te(Ie,Ie.current&1),e=Rn(e,t,n),e!==null?e.sibling:null);Te(Ie,Ie.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return e0(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Te(Ie,Ie.current),r)break;return null;case 22:case 23:return t.lanes=0,Gy(e,t,n)}return Rn(e,t,n)}var t0,Cc,n0,r0;t0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Cc=function(){};n0=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_r(hn.current);var o=null;switch(n){case"input":i=qu(e,i),r=qu(e,r),o=[];break;case"select":i=Oe({},i,{value:void 0}),r=Oe({},r,{value:void 0}),o=[];break;case"textarea":i=Yu(e,i),r=Yu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ps)}Qu(n,r);var l;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(bo.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(s=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==s&&(a!=null||s!=null))if(u==="style")if(s){for(l in s)!s.hasOwnProperty(l)||a&&a.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in a)a.hasOwnProperty(l)&&s[l]!==a[l]&&(n||(n={}),n[l]=a[l])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(bo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ae("scroll",e),o||s===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};r0=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qi(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function aS(e,t,n){var r=t.pendingProps;switch(If(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return xt(t.type)&&hs(),it(t),null;case 3:return r=t.stateNode,Ni(),Le(wt),Le(st),Vf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(kl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zt!==null&&(Lc(Zt),Zt=null))),Cc(e,t),it(t),null;case 5:Uf(t);var i=_r(Oo.current);if(n=t.type,e!==null&&t.stateNode!=null)n0(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return it(t),null}if(e=_r(hn.current),kl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[dn]=t,r[Io]=o,e=(t.mode&1)!==0,n){case"dialog":Ae("cancel",r),Ae("close",r);break;case"iframe":case"object":case"embed":Ae("load",r);break;case"video":case"audio":for(i=0;i<uo.length;i++)Ae(uo[i],r);break;case"source":Ae("error",r);break;case"img":case"image":case"link":Ae("error",r),Ae("load",r);break;case"details":Ae("toggle",r);break;case"input":op(r,o),Ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ae("invalid",r);break;case"textarea":sp(r,o),Ae("invalid",r)}Qu(n,o),i=null;for(var l in o)if(o.hasOwnProperty(l)){var s=o[l];l==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&vl(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&vl(r.textContent,s,e),i=["children",""+s]):bo.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&Ae("scroll",r)}switch(n){case"input":dl(r),lp(r,o,!0);break;case"textarea":dl(r),ap(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=ps)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Dg(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[dn]=t,e[Io]=r,t0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Zu(n,r),n){case"dialog":Ae("cancel",e),Ae("close",e),i=r;break;case"iframe":case"object":case"embed":Ae("load",e),i=r;break;case"video":case"audio":for(i=0;i<uo.length;i++)Ae(uo[i],e);i=r;break;case"source":Ae("error",e),i=r;break;case"img":case"image":case"link":Ae("error",e),Ae("load",e),i=r;break;case"details":Ae("toggle",e),i=r;break;case"input":op(e,r),i=qu(e,r),Ae("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Oe({},r,{value:void 0}),Ae("invalid",e);break;case"textarea":sp(e,r),i=Yu(e,r),Ae("invalid",e);break;default:i=r}Qu(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="style"?Rg(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Lg(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Po(e,a):typeof a=="number"&&Po(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(bo.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Ae("scroll",e):a!=null&&vf(e,o,a,l))}switch(n){case"input":dl(e),lp(e,r,!1);break;case"textarea":dl(e),ap(e);break;case"option":r.value!=null&&e.setAttribute("value",""+dr(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?pi(e,!!r.multiple,o,!1):r.defaultValue!=null&&pi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ps)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return it(t),null;case 6:if(e&&t.stateNode!=null)r0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=_r(Oo.current),_r(hn.current),kl(t)){if(r=t.stateNode,n=t.memoizedProps,r[dn]=t,(o=r.nodeValue!==n)&&(e=_t,e!==null))switch(e.tag){case 3:vl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vl(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[dn]=t,t.stateNode=r}return it(t),null;case 13:if(Le(Ie),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Me&&Pt!==null&&t.mode&1&&!(t.flags&128))ky(),Pi(),t.flags|=98560,o=!1;else if(o=kl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Q(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Q(317));o[dn]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;it(t),o=!1}else Zt!==null&&(Lc(Zt),Zt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ie.current&1?qe===0&&(qe=3):nd())),t.updateQueue!==null&&(t.flags|=4),it(t),null);case 4:return Ni(),Cc(e,t),e===null&&Mo(t.stateNode.containerInfo),it(t),null;case 10:return $f(t.type._context),it(t),null;case 17:return xt(t.type)&&hs(),it(t),null;case 19:if(Le(Ie),o=t.memoizedState,o===null)return it(t),null;if(r=(t.flags&128)!==0,l=o.rendering,l===null)if(r)Qi(o,!1);else{if(qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=ks(e),l!==null){for(t.flags|=128,Qi(o,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,l=o.alternate,l===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Te(Ie,Ie.current&1|2),t.child}e=e.sibling}o.tail!==null&&je()>Ai&&(t.flags|=128,r=!0,Qi(o,!1),t.lanes=4194304)}else{if(!r)if(e=ks(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Me)return it(t),null}else 2*je()-o.renderingStartTime>Ai&&n!==1073741824&&(t.flags|=128,r=!0,Qi(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=je(),t.sibling=null,n=Ie.current,Te(Ie,r?n&1|2:n&1),t):(it(t),null);case 22:case 23:return td(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?bt&1073741824&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function uS(e,t){switch(If(t),t.tag){case 1:return xt(t.type)&&hs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ni(),Le(wt),Le(st),Vf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Uf(t),null;case 13:if(Le(Ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Le(Ie),null;case 4:return Ni(),null;case 10:return $f(t.type._context),null;case 22:case 23:return td(),null;case 24:return null;default:return null}}var Cl=!1,ot=!1,cS=typeof WeakSet=="function"?WeakSet:Set,ie=null;function ui(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ze(e,t,r)}else n.current=null}function bc(e,t,n){try{n()}catch(r){ze(e,t,r)}}var Qp=!1;function fS(e,t){if(ac=cs,e=ay(),Mf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=l+i),f!==o||r!==0&&f.nodeType!==3||(a=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++u===i&&(s=l),d===o&&++c===r&&(a=l),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(uc={focusedElem:e,selectionRange:n},cs=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,k=m.memoizedState,h=t.stateNode,y=h.getSnapshotBeforeUpdate(t.elementType===t.type?g:Yt(t.type,g),k);h.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(v){ze(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return m=Qp,Qp=!1,m}function xo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bc(t,n,o)}i=i.next}while(i!==r)}}function Js(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Pc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function i0(e){var t=e.alternate;t!==null&&(e.alternate=null,i0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[dn],delete t[Io],delete t[dc],delete t[Kk],delete t[Xk])),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 o0(e){return e.tag===5||e.tag===3||e.tag===4}function Zp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||o0(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 _c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ps));else if(r!==4&&(e=e.child,e!==null))for(_c(e,t,n),e=e.sibling;e!==null;)_c(e,t,n),e=e.sibling}function Nc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Nc(e,t,n),e=e.sibling;e!==null;)Nc(e,t,n),e=e.sibling}var Ze=null,Gt=!1;function Un(e,t,n){for(n=n.child;n!==null;)l0(e,t,n),n=n.sibling}function l0(e,t,n){if(pn&&typeof pn.onCommitFiberUnmount=="function")try{pn.onCommitFiberUnmount(Ws,n)}catch{}switch(n.tag){case 5:ot||ui(n,t);case 6:var r=Ze,i=Gt;Ze=null,Un(e,t,n),Ze=r,Gt=i,Ze!==null&&(Gt?(e=Ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ze.removeChild(n.stateNode));break;case 18:Ze!==null&&(Gt?(e=Ze,n=n.stateNode,e.nodeType===8?Za(e.parentNode,n):e.nodeType===1&&Za(e,n),Ao(e)):Za(Ze,n.stateNode));break;case 4:r=Ze,i=Gt,Ze=n.stateNode.containerInfo,Gt=!0,Un(e,t,n),Ze=r,Gt=i;break;case 0:case 11:case 14:case 15:if(!ot&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&bc(n,t,l),i=i.next}while(i!==r)}Un(e,t,n);break;case 1:if(!ot&&(ui(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){ze(n,t,s)}Un(e,t,n);break;case 21:Un(e,t,n);break;case 22:n.mode&1?(ot=(r=ot)||n.memoizedState!==null,Un(e,t,n),ot=r):Un(e,t,n);break;default:Un(e,t,n)}}function Jp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cS),t.forEach(function(r){var i=vS.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Kt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:Ze=s.stateNode,Gt=!1;break e;case 3:Ze=s.stateNode.containerInfo,Gt=!0;break e;case 4:Ze=s.stateNode.containerInfo,Gt=!0;break e}s=s.return}if(Ze===null)throw Error(Q(160));l0(o,l,i),Ze=null,Gt=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){ze(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)s0(t,e),t=t.sibling}function s0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Kt(t,e),un(e),r&4){try{xo(3,e,e.return),Js(3,e)}catch(g){ze(e,e.return,g)}try{xo(5,e,e.return)}catch(g){ze(e,e.return,g)}}break;case 1:Kt(t,e),un(e),r&512&&n!==null&&ui(n,n.return);break;case 5:if(Kt(t,e),un(e),r&512&&n!==null&&ui(n,n.return),e.flags&32){var i=e.stateNode;try{Po(i,"")}catch(g){ze(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,l=n!==null?n.memoizedProps:o,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&Tg(i,o),Zu(s,l);var u=Zu(s,o);for(l=0;l<a.length;l+=2){var c=a[l],f=a[l+1];c==="style"?Rg(i,f):c==="dangerouslySetInnerHTML"?Lg(i,f):c==="children"?Po(i,f):vf(i,c,f,u)}switch(s){case"input":Ku(i,o);break;case"textarea":Ag(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?pi(i,!!o.multiple,p,!1):d!==!!o.multiple&&(o.defaultValue!=null?pi(i,!!o.multiple,o.defaultValue,!0):pi(i,!!o.multiple,o.multiple?[]:"",!1))}i[Io]=o}catch(g){ze(e,e.return,g)}}break;case 6:if(Kt(t,e),un(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){ze(e,e.return,g)}}break;case 3:if(Kt(t,e),un(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ao(t.containerInfo)}catch(g){ze(e,e.return,g)}break;case 4:Kt(t,e),un(e);break;case 13:Kt(t,e),un(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Jf=je())),r&4&&Jp(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(ot=(u=ot)||c,Kt(t,e),ot=u):Kt(t,e),un(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(ie=e,c=e.child;c!==null;){for(f=ie=c;ie!==null;){switch(d=ie,p=d.child,d.tag){case 0:case 11:case 14:case 15:xo(4,d,d.return);break;case 1:ui(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){ze(r,n,g)}}break;case 5:ui(d,d.return);break;case 22:if(d.memoizedState!==null){th(f);continue}}p!==null?(p.return=d,ie=p):th(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=f.stateNode,a=f.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=Mg("display",l))}catch(g){ze(e,e.return,g)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){ze(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Kt(t,e),un(e),r&4&&Jp(e);break;case 21:break;default:Kt(t,e),un(e)}}function un(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(o0(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Po(i,""),r.flags&=-33);var o=Zp(e);Nc(e,o,i);break;case 3:case 4:var l=r.stateNode.containerInfo,s=Zp(e);_c(e,s,l);break;default:throw Error(Q(161))}}catch(a){ze(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dS(e,t,n){ie=e,a0(e)}function a0(e,t,n){for(var r=(e.mode&1)!==0;ie!==null;){var i=ie,o=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||Cl;if(!l){var s=i.alternate,a=s!==null&&s.memoizedState!==null||ot;s=Cl;var u=ot;if(Cl=l,(ot=a)&&!u)for(ie=i;ie!==null;)l=ie,a=l.child,l.tag===22&&l.memoizedState!==null?nh(i):a!==null?(a.return=l,ie=a):nh(i);for(;o!==null;)ie=o,a0(o),o=o.sibling;ie=i,Cl=s,ot=u}eh(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ie=o):eh(e)}}function eh(e){for(;ie!==null;){var t=ie;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ot||Js(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ot)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Yt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&zp(t,o,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}zp(t,l,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Ao(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}ot||t.flags&512&&Pc(t)}catch(d){ze(t,t.return,d)}}if(t===e){ie=null;break}if(n=t.sibling,n!==null){n.return=t.return,ie=n;break}ie=t.return}}function th(e){for(;ie!==null;){var t=ie;if(t===e){ie=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ie=n;break}ie=t.return}}function nh(e){for(;ie!==null;){var t=ie;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Js(4,t)}catch(a){ze(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){ze(t,i,a)}}var o=t.return;try{Pc(t)}catch(a){ze(t,o,a)}break;case 5:var l=t.return;try{Pc(t)}catch(a){ze(t,l,a)}}}catch(a){ze(t,t.return,a)}if(t===e){ie=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ie=s;break}ie=t.return}}var pS=Math.ceil,Cs=On.ReactCurrentDispatcher,Qf=On.ReactCurrentOwner,$t=On.ReactCurrentBatchConfig,ke=0,Xe=null,He=null,Je=0,bt=0,ci=gr(0),qe=0,Bo=null,Or=0,ea=0,Zf=0,vo=null,mt=null,Jf=0,Ai=1/0,En=null,bs=!1,Tc=null,ar=null,bl=!1,tr=null,Ps=0,ko=0,Ac=null,ql=-1,Kl=0;function dt(){return ke&6?je():ql!==-1?ql:ql=je()}function ur(e){return e.mode&1?ke&2&&Je!==0?Je&-Je:Gk.transition!==null?(Kl===0&&(Kl=qg()),Kl):(e=Ee,e!==0||(e=window.event,e=e===void 0?16:Jg(e.type)),e):1}function tn(e,t,n,r){if(50<ko)throw ko=0,Ac=null,Error(Q(185));Zo(e,n,r),(!(ke&2)||e!==Xe)&&(e===Xe&&(!(ke&2)&&(ea|=n),qe===4&&Zn(e,Je)),vt(e,r),n===1&&ke===0&&!(t.mode&1)&&(Ai=je()+500,Gs&&yr()))}function vt(e,t){var n=e.callbackNode;Gv(e,t);var r=us(e,e===Xe?Je:0);if(r===0)n!==null&&fp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&fp(n),t===1)e.tag===0?Yk(rh.bind(null,e)):wy(rh.bind(null,e)),Wk(function(){!(ke&6)&&yr()}),n=null;else{switch(Kg(r)){case 1:n=bf;break;case 4:n=Vg;break;case 16:n=as;break;case 536870912:n=Wg;break;default:n=as}n=g0(n,u0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function u0(e,t){if(ql=-1,Kl=0,ke&6)throw Error(Q(327));var n=e.callbackNode;if(wi()&&e.callbackNode!==n)return null;var r=us(e,e===Xe?Je:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=_s(e,r);else{t=r;var i=ke;ke|=2;var o=f0();(Xe!==e||Je!==t)&&(En=null,Ai=je()+500,Tr(e,t));do try{gS();break}catch(s){c0(e,s)}while(!0);zf(),Cs.current=o,ke=i,He!==null?t=0:(Xe=null,Je=0,t=qe)}if(t!==0){if(t===2&&(i=rc(e),i!==0&&(r=i,t=Dc(e,i))),t===1)throw n=Bo,Tr(e,0),Zn(e,r),vt(e,je()),n;if(t===6)Zn(e,r);else{if(i=e.current.alternate,!(r&30)&&!hS(i)&&(t=_s(e,r),t===2&&(o=rc(e),o!==0&&(r=o,t=Dc(e,o))),t===1))throw n=Bo,Tr(e,0),Zn(e,r),vt(e,je()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Sr(e,mt,En);break;case 3:if(Zn(e,r),(r&130023424)===r&&(t=Jf+500-je(),10<t)){if(us(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){dt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=fc(Sr.bind(null,e,mt,En),t);break}Sr(e,mt,En);break;case 4:if(Zn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-en(r);o=1<<l,l=t[l],l>i&&(i=l),r&=~o}if(r=i,r=je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*pS(r/1960))-r,10<r){e.timeoutHandle=fc(Sr.bind(null,e,mt,En),r);break}Sr(e,mt,En);break;case 5:Sr(e,mt,En);break;default:throw Error(Q(329))}}}return vt(e,je()),e.callbackNode===n?u0.bind(null,e):null}function Dc(e,t){var n=vo;return e.current.memoizedState.isDehydrated&&(Tr(e,t).flags|=256),e=_s(e,t),e!==2&&(t=mt,mt=n,t!==null&&Lc(t)),e}function Lc(e){mt===null?mt=e:mt.push.apply(mt,e)}function hS(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!ln(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zn(e,t){for(t&=~Zf,t&=~ea,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-en(t),r=1<<n;e[n]=-1,t&=~r}}function rh(e){if(ke&6)throw Error(Q(327));wi();var t=us(e,0);if(!(t&1))return vt(e,je()),null;var n=_s(e,t);if(e.tag!==0&&n===2){var r=rc(e);r!==0&&(t=r,n=Dc(e,r))}if(n===1)throw n=Bo,Tr(e,0),Zn(e,t),vt(e,je()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Sr(e,mt,En),vt(e,je()),null}function ed(e,t){var n=ke;ke|=1;try{return e(t)}finally{ke=n,ke===0&&(Ai=je()+500,Gs&&yr())}}function zr(e){tr!==null&&tr.tag===0&&!(ke&6)&&wi();var t=ke;ke|=1;var n=$t.transition,r=Ee;try{if($t.transition=null,Ee=1,e)return e()}finally{Ee=r,$t.transition=n,ke=t,!(ke&6)&&yr()}}function td(){bt=ci.current,Le(ci)}function Tr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Vk(n)),He!==null)for(n=He.return;n!==null;){var r=n;switch(If(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&hs();break;case 3:Ni(),Le(wt),Le(st),Vf();break;case 5:Uf(r);break;case 4:Ni();break;case 13:Le(Ie);break;case 19:Le(Ie);break;case 10:$f(r.type._context);break;case 22:case 23:td()}n=n.return}if(Xe=e,He=e=cr(e.current,null),Je=bt=t,qe=0,Bo=null,Zf=ea=Or=0,mt=vo=null,Pr!==null){for(t=0;t<Pr.length;t++)if(n=Pr[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var l=o.next;o.next=i,r.next=l}n.pending=r}Pr=null}return e}function c0(e,t){do{var n=He;try{if(zf(),Ul.current=Es,Ss){for(var r=Fe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ss=!1}if(Fr=0,Ke=We=Fe=null,wo=!1,zo=0,Qf.current=null,n===null||n.return===null){qe=1,Bo=t,He=null;break}e:{var o=e,l=n.return,s=n,a=t;if(t=Je,s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=s,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Vp(l);if(p!==null){p.flags&=-257,Wp(p,l,s,o,t),p.mode&1&&Up(o,u,t),t=p,a=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(a),t.updateQueue=g}else m.add(a);break e}else{if(!(t&1)){Up(o,u,t),nd();break e}a=Error(Q(426))}}else if(Me&&s.mode&1){var k=Vp(l);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Wp(k,l,s,o,t),Ff(Ti(a,s));break e}}o=a=Ti(a,s),qe!==4&&(qe=2),vo===null?vo=[o]:vo.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var h=Ky(o,a,t);Op(o,h);break e;case 1:s=a;var y=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ar===null||!ar.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=Xy(o,s,t);Op(o,v);break e}}o=o.return}while(o!==null)}p0(n)}catch(_){t=_,He===n&&n!==null&&(He=n=n.return);continue}break}while(!0)}function f0(){var e=Cs.current;return Cs.current=Es,e===null?Es:e}function nd(){(qe===0||qe===3||qe===2)&&(qe=4),Xe===null||!(Or&268435455)&&!(ea&268435455)||Zn(Xe,Je)}function _s(e,t){var n=ke;ke|=2;var r=f0();(Xe!==e||Je!==t)&&(En=null,Tr(e,t));do try{mS();break}catch(i){c0(e,i)}while(!0);if(zf(),ke=n,Cs.current=r,He!==null)throw Error(Q(261));return Xe=null,Je=0,qe}function mS(){for(;He!==null;)d0(He)}function gS(){for(;He!==null&&!Bv();)d0(He)}function d0(e){var t=m0(e.alternate,e,bt);e.memoizedProps=e.pendingProps,t===null?p0(e):He=t,Qf.current=null}function p0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=uS(n,t),n!==null){n.flags&=32767,He=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qe=6,He=null;return}}else if(n=aS(n,t,bt),n!==null){He=n;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);qe===0&&(qe=5)}function Sr(e,t,n){var r=Ee,i=$t.transition;try{$t.transition=null,Ee=1,yS(e,t,n,r)}finally{$t.transition=i,Ee=r}return null}function yS(e,t,n,r){do wi();while(tr!==null);if(ke&6)throw Error(Q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Qv(e,o),e===Xe&&(He=Xe=null,Je=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||bl||(bl=!0,g0(as,function(){return wi(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=$t.transition,$t.transition=null;var l=Ee;Ee=1;var s=ke;ke|=4,Qf.current=null,fS(e,n),s0(n,e),Ok(uc),cs=!!ac,uc=ac=null,e.current=n,dS(n),Hv(),ke=s,Ee=l,$t.transition=o}else e.current=n;if(bl&&(bl=!1,tr=e,Ps=i),o=e.pendingLanes,o===0&&(ar=null),Wv(n.stateNode),vt(e,je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(bs)throw bs=!1,e=Tc,Tc=null,e;return Ps&1&&e.tag!==0&&wi(),o=e.pendingLanes,o&1?e===Ac?ko++:(ko=0,Ac=e):ko=0,yr(),null}function wi(){if(tr!==null){var e=Kg(Ps),t=$t.transition,n=Ee;try{if($t.transition=null,Ee=16>e?16:e,tr===null)var r=!1;else{if(e=tr,tr=null,Ps=0,ke&6)throw Error(Q(331));var i=ke;for(ke|=4,ie=e.current;ie!==null;){var o=ie,l=o.child;if(ie.flags&16){var s=o.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(ie=u;ie!==null;){var c=ie;switch(c.tag){case 0:case 11:case 15:xo(8,c,o)}var f=c.child;if(f!==null)f.return=c,ie=f;else for(;ie!==null;){c=ie;var d=c.sibling,p=c.return;if(i0(c),c===u){ie=null;break}if(d!==null){d.return=p,ie=d;break}ie=p}}}var m=o.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var k=g.sibling;g.sibling=null,g=k}while(g!==null)}}ie=o}}if(o.subtreeFlags&2064&&l!==null)l.return=o,ie=l;else e:for(;ie!==null;){if(o=ie,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xo(9,o,o.return)}var h=o.sibling;if(h!==null){h.return=o.return,ie=h;break e}ie=o.return}}var y=e.current;for(ie=y;ie!==null;){l=ie;var w=l.child;if(l.subtreeFlags&2064&&w!==null)w.return=l,ie=w;else e:for(l=y;ie!==null;){if(s=ie,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Js(9,s)}}catch(_){ze(s,s.return,_)}if(s===l){ie=null;break e}var v=s.sibling;if(v!==null){v.return=s.return,ie=v;break e}ie=s.return}}if(ke=i,yr(),pn&&typeof pn.onPostCommitFiberRoot=="function")try{pn.onPostCommitFiberRoot(Ws,e)}catch{}r=!0}return r}finally{Ee=n,$t.transition=t}}return!1}function ih(e,t,n){t=Ti(n,t),t=Ky(e,t,1),e=sr(e,t,1),t=dt(),e!==null&&(Zo(e,1,t),vt(e,t))}function ze(e,t,n){if(e.tag===3)ih(e,e,n);else for(;t!==null;){if(t.tag===3){ih(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ar===null||!ar.has(r))){e=Ti(n,e),e=Xy(t,e,1),t=sr(t,e,1),e=dt(),t!==null&&(Zo(t,1,e),vt(t,e));break}}t=t.return}}function wS(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=dt(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(Je&n)===n&&(qe===4||qe===3&&(Je&130023424)===Je&&500>je()-Jf?Tr(e,0):Zf|=n),vt(e,t)}function h0(e,t){t===0&&(e.mode&1?(t=ml,ml<<=1,!(ml&130023424)&&(ml=4194304)):t=1);var n=dt();e=Mn(e,t),e!==null&&(Zo(e,t,n),vt(e,n))}function xS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),h0(e,n)}function vS(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),h0(e,n)}var m0;m0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wt.current)gt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gt=!1,sS(e,t,n);gt=!!(e.flags&131072)}else gt=!1,Me&&t.flags&1048576&&xy(t,ys,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wl(e,t),e=t.pendingProps;var i=bi(t,st.current);yi(t,n),i=qf(null,t,r,e,i,n);var o=Kf();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xt(r)?(o=!0,ms(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Bf(t),i.updater=Zs,t.stateNode=i,i._reactInternals=t,wc(t,r,e,n),t=kc(null,t,r,!0,o,n)):(t.tag=0,Me&&o&&Rf(t),ct(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=SS(r),e=Yt(r,e),i){case 0:t=vc(null,t,r,e,n);break e;case 1:t=Xp(null,t,r,e,n);break e;case 11:t=qp(null,t,r,e,n);break e;case 14:t=Kp(null,t,r,Yt(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yt(r,i),vc(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yt(r,i),Xp(e,t,r,i,n);case 3:e:{if(Zy(t),e===null)throw Error(Q(387));r=t.pendingProps,o=t.memoizedState,i=o.element,by(e,t),vs(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ti(Error(Q(423)),t),t=Yp(e,t,r,n,i);break e}else if(r!==i){i=Ti(Error(Q(424)),t),t=Yp(e,t,r,n,i);break e}else for(Pt=lr(t.stateNode.containerInfo.firstChild),_t=t,Me=!0,Zt=null,n=Ey(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Pi(),r===i){t=Rn(e,t,n);break e}ct(e,t,r,n)}t=t.child}return t;case 5:return Py(t),e===null&&mc(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,cc(r,i)?l=null:o!==null&&cc(r,o)&&(t.flags|=32),Qy(e,t),ct(e,t,l,n),t.child;case 6:return e===null&&mc(t),null;case 13:return Jy(e,t,n);case 4:return Hf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=_i(t,null,r,n):ct(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yt(r,i),qp(e,t,r,i,n);case 7:return ct(e,t,t.pendingProps,n),t.child;case 8:return ct(e,t,t.pendingProps.children,n),t.child;case 12:return ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Te(ws,r._currentValue),r._currentValue=l,o!==null)if(ln(o.value,l)){if(o.children===i.children&&!wt.current){t=Rn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Tn(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),gc(o.return,n,t),s.lanes|=n;break}a=a.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(Q(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),gc(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}ct(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,yi(t,n),i=Bt(i),r=r(i),t.flags|=1,ct(e,t,r,n),t.child;case 14:return r=t.type,i=Yt(r,t.pendingProps),i=Yt(r.type,i),Kp(e,t,r,i,n);case 15:return Yy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yt(r,i),Wl(e,t),t.tag=1,xt(r)?(e=!0,ms(t)):e=!1,yi(t,n),qy(t,r,i),wc(t,r,i,n),kc(null,t,r,!0,e,n);case 19:return e0(e,t,n);case 22:return Gy(e,t,n)}throw Error(Q(156,t.tag))};function g0(e,t){return Ug(e,t)}function kS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ot(e,t,n,r){return new kS(e,t,n,r)}function rd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function SS(e){if(typeof e=="function")return rd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Sf)return 11;if(e===Ef)return 14}return 2}function cr(e,t){var n=e.alternate;return n===null?(n=Ot(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xl(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")rd(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ei:return Ar(n.children,i,o,t);case kf:l=8,i|=8;break;case Hu:return e=Ot(12,n,t,i|2),e.elementType=Hu,e.lanes=o,e;case Uu:return e=Ot(13,n,t,i),e.elementType=Uu,e.lanes=o,e;case Vu:return e=Ot(19,n,t,i),e.elementType=Vu,e.lanes=o,e;case Pg:return ta(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Cg:l=10;break e;case bg:l=9;break e;case Sf:l=11;break e;case Ef:l=14;break e;case Kn:l=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=Ot(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ar(e,t,n,r){return e=Ot(7,e,r,t),e.lanes=n,e}function ta(e,t,n,r){return e=Ot(22,e,r,t),e.elementType=Pg,e.lanes=n,e.stateNode={isHidden:!1},e}function lu(e,t,n){return e=Ot(6,e,null,t),e.lanes=n,e}function su(e,t,n){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ES(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ba(0),this.expirationTimes=Ba(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ba(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function id(e,t,n,r,i,o,l,s,a){return e=new ES(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ot(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bf(o),e}function CS(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Jr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function y0(e){if(!e)return pr;e=e._reactInternals;e:{if(Vr(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(xt(n))return yy(e,n,t)}return t}function w0(e,t,n,r,i,o,l,s,a){return e=id(n,r,!0,e,i,o,l,s,a),e.context=y0(null),n=e.current,r=dt(),i=ur(n),o=Tn(r,i),o.callback=t??null,sr(n,o,i),e.current.lanes=i,Zo(e,i,r),vt(e,r),e}function na(e,t,n,r){var i=t.current,o=dt(),l=ur(i);return n=y0(n),t.context===null?t.context=n:t.pendingContext=n,t=Tn(o,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=sr(i,t,l),e!==null&&(tn(e,i,l,o),Hl(e,i,l)),l}function Ns(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function oh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function od(e,t){oh(e,t),(e=e.alternate)&&oh(e,t)}function bS(){return null}var x0=typeof reportError=="function"?reportError:function(e){console.error(e)};function ld(e){this._internalRoot=e}ra.prototype.render=ld.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));na(e,t,null,null)};ra.prototype.unmount=ld.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zr(function(){na(null,e,null,null)}),t[Ln]=null}};function ra(e){this._internalRoot=e}ra.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qn.length&&t!==0&&t<Qn[n].priority;n++);Qn.splice(n,0,e),n===0&&Zg(e)}};function sd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ia(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function lh(){}function PS(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=Ns(l);o.call(u)}}var l=w0(t,r,e,0,null,!1,!1,"",lh);return e._reactRootContainer=l,e[Ln]=l.current,Mo(e.nodeType===8?e.parentNode:e),zr(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=Ns(a);s.call(u)}}var a=id(e,0,!1,null,null,!1,!1,"",lh);return e._reactRootContainer=a,e[Ln]=a.current,Mo(e.nodeType===8?e.parentNode:e),zr(function(){na(t,a,n,r)}),a}function oa(e,t,n,r,i){var o=n._reactRootContainer;if(o){var l=o;if(typeof i=="function"){var s=i;i=function(){var a=Ns(l);s.call(a)}}na(t,l,e,i)}else l=PS(n,t,e,i,r);return Ns(l)}Xg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ao(t.pendingLanes);n!==0&&(Pf(t,n|1),vt(t,je()),!(ke&6)&&(Ai=je()+500,yr()))}break;case 13:zr(function(){var r=Mn(e,1);if(r!==null){var i=dt();tn(r,e,1,i)}}),od(e,1)}};_f=function(e){if(e.tag===13){var t=Mn(e,134217728);if(t!==null){var n=dt();tn(t,e,134217728,n)}od(e,134217728)}};Yg=function(e){if(e.tag===13){var t=ur(e),n=Mn(e,t);if(n!==null){var r=dt();tn(n,e,t,r)}od(e,t)}};Gg=function(){return Ee};Qg=function(e,t){var n=Ee;try{return Ee=e,t()}finally{Ee=n}};ec=function(e,t,n){switch(t){case"input":if(Ku(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ys(r);if(!i)throw Error(Q(90));Ng(r),Ku(r,i)}}}break;case"textarea":Ag(e,n);break;case"select":t=n.value,t!=null&&pi(e,!!n.multiple,t,!1)}};Og=ed;zg=zr;var _S={usingClientEntryPoint:!1,Events:[el,ii,Ys,Ig,Fg,ed]},Zi={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},NS={bundleType:Zi.bundleType,version:Zi.version,rendererPackageName:Zi.rendererPackageName,rendererConfig:Zi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:On.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Bg(e),e===null?null:e.stateNode},findFiberByHostInstance:Zi.findFiberByHostInstance||bS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pl.isDisabled&&Pl.supportsFiber)try{Ws=Pl.inject(NS),pn=Pl}catch{}}Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_S;Dt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sd(t))throw Error(Q(200));return CS(e,t,null,n)};Dt.createRoot=function(e,t){if(!sd(e))throw Error(Q(299));var n=!1,r="",i=x0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=id(e,1,!1,null,null,n,!1,r,i),e[Ln]=t.current,Mo(e.nodeType===8?e.parentNode:e),new ld(t)};Dt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=Bg(t),e=e===null?null:e.stateNode,e};Dt.flushSync=function(e){return zr(e)};Dt.hydrate=function(e,t,n){if(!ia(t))throw Error(Q(200));return oa(null,e,t,!0,n)};Dt.hydrateRoot=function(e,t,n){if(!sd(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",l=x0;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=w0(t,null,e,1,n??null,i,!1,o,l),e[Ln]=t.current,Mo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ra(t)};Dt.render=function(e,t,n){if(!ia(t))throw Error(Q(200));return oa(null,e,t,!1,n)};Dt.unmountComponentAtNode=function(e){if(!ia(e))throw Error(Q(40));return e._reactRootContainer?(zr(function(){oa(null,null,e,!1,function(){e._reactRootContainer=null,e[Ln]=null})}),!0):!1};Dt.unstable_batchedUpdates=ed;Dt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ia(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return oa(e,t,n,!1,r)};Dt.version="18.3.1-next-f1338f8080-20240426";function v0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(v0)}catch(e){console.error(e)}}v0(),vg.exports=Dt;var k0=vg.exports,sh=k0;ju.createRoot=sh.createRoot,ju.hydrateRoot=sh.hydrateRoot;const Kr=(e,t)=>{t(typeof e<"u"?e:[])};function TS(e){const{fileName:t,packages:n,setPackages:r}=e,i=P.useRef(null),o=u=>{if(t!==""){const c={systemList:e.systemList,connectionList:e.connectionList,sysPullsDict:e.sysPullsDict,inwardList:e.inwardList,outwardList:e.outwardList,designMethodList:e.designMethodList,offDesignUnknownList:e.offDesignUnknownList,offDesignEquationList:e.offDesignEquationList,eventList:e.eventList},f=`data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(c))}`,d=document.createElement("a");d.setAttribute("href",f),d.setAttribute("download",`${t}.json`),document.body.appendChild(d),d.click(),d.remove()}u.preventDefault()},l=u=>{const c=u.filter(({pack:d})=>!n.some(({name:p})=>p===d));return[...new Set(c.map(({pack:d})=>d))]},s=u=>{const c=n.findIndex(({name:f})=>f===u.name);c>0?e.setReplace({index:c,pack:u}):r([...n].concat(u))},a=u=>{const{files:c}=u.target;if(c){const f=c[0];new Response(f).json().then(d=>{if(typeof d.name>"u"){const p=d.systemList;if(p){const m=l(p);m.length===0?(e.setFileName(f.name.split(".",1)[0]),e.getConnErrors({newSystemList:p,newConnectionList:d.connectionList,newSysPullsDict:d.sysPullsDict}),Kr(d.inwardList,e.setInwardList),Kr(d.outwardList,e.setOutwardList),Kr(d.designMethodList,e.setDesignMethodList),Kr(d.offDesignUnknownList,e.setOffDesignUnknownList),Kr(d.offDesignEquationList,e.setOffDesignEquationList),Kr(d.eventList,e.setEventList)):e.setErrorMessage([`Please import ${m.join(", ")} and retry`])}}else s(d)},()=>{})}u.target.value=""};return D.jsxs("div",{className:"SaveImportMenu",children:[D.jsx("button",{type:"button","aria-label":"Import",onClick:()=>{var u;return(u=i.current)==null?void 0:u.click()},children:"Import Package/Assembly"}),D.jsx("input",{type:"file",ref:i,accept:".json",style:{display:"none"},onChange:a}),n.length>0?D.jsx("button",{type:"button",onClick:o,children:"Save Assembly"}):""]})}function AS(e){const{autocheck:t}=e,n="testCheckBox";return D.jsxs("div",{className:"connCheckMenu",children:[D.jsxs("label",{htmlFor:n,children:["Autocheck connections",D.jsx("input",{type:"checkbox",id:n,checked:t,onChange:()=>e.setAutocheck(!t)})]}),D.jsx("button",{type:"button",onClick:()=>e.getConnErrors({check:!0}),disabled:t,children:"Check"})]})}function tt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=tt(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var S0={exports:{}},E0={},C0={exports:{}},b0={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Di=P;function DS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var LS=typeof Object.is=="function"?Object.is:DS,MS=Di.useState,RS=Di.useEffect,IS=Di.useLayoutEffect,FS=Di.useDebugValue;function OS(e,t){var n=t(),r=MS({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return IS(function(){i.value=n,i.getSnapshot=t,au(i)&&o({inst:i})},[e,n,t]),RS(function(){return au(i)&&o({inst:i}),e(function(){au(i)&&o({inst:i})})},[e]),FS(n),n}function au(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!LS(e,n)}catch{return!0}}function zS(e,t){return t()}var $S=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zS:OS;b0.useSyncExternalStore=Di.useSyncExternalStore!==void 0?Di.useSyncExternalStore:$S;C0.exports=b0;var jS=C0.exports;/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var la=P,BS=jS;function HS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var US=typeof Object.is=="function"?Object.is:HS,VS=BS.useSyncExternalStore,WS=la.useRef,qS=la.useEffect,KS=la.useMemo,XS=la.useDebugValue;E0.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=WS(null);if(o.current===null){var l={hasValue:!1,value:null};o.current=l}else l=o.current;o=KS(function(){function a(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&l.hasValue){var m=l.value;if(i(m,p))return f=m}return f=p}if(m=f,US(c,p))return m;var g=r(p);return i!==void 0&&i(m,g)?m:(c=p,f=g)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return a(t())},d===null?void 0:function(){return a(d())}]},[t,n,r,i]);var s=VS(e,o[0],o[1]);return qS(function(){l.hasValue=!0,l.value=s},[s]),XS(s),s};S0.exports=E0;var YS=S0.exports;const GS=Fi(YS);var QS={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const ah=e=>{let t;const n=new Set,r=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,p))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(QS?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,a);return a},ZS=e=>e?ah(e):ah,{useDebugValue:JS}=U,{useSyncExternalStoreWithSelector:eE}=GS,tE=e=>e;function P0(e,t=tE,n){const r=eE(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return JS(r),r}const uh=(e,t)=>{const n=ZS(e),r=(i,o=t)=>P0(n,i,o);return Object.assign(r,n),r},nE=(e,t)=>e?uh(e,t):uh;function Ye(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var rE={value:()=>{}};function sa(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Yl(n)}function Yl(e){this._=e}function iE(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Yl.prototype=sa.prototype={constructor:Yl,on:function(e,t){var n=this._,r=iE(e+"",n),i,o=-1,l=r.length;if(arguments.length<2){for(;++o<l;)if((i=(e=r[o]).type)&&(i=oE(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<l;)if(i=(e=r[o]).type)n[i]=ch(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ch(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Yl(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function oE(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ch(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=rE,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Mc="http://www.w3.org/1999/xhtml";const fh={svg:"http://www.w3.org/2000/svg",xhtml:Mc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function aa(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),fh.hasOwnProperty(t)?{space:fh[t],local:e}:e}function lE(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Mc&&t.documentElement.namespaceURI===Mc?t.createElement(e):t.createElementNS(n,e)}}function sE(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function _0(e){var t=aa(e);return(t.local?sE:lE)(t)}function aE(){}function ad(e){return e==null?aE:function(){return this.querySelector(e)}}function uE(e){typeof e!="function"&&(e=ad(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],l=o.length,s=r[i]=new Array(l),a,u,c=0;c<l;++c)(a=o[c])&&(u=e.call(a,a.__data__,c,o))&&("__data__"in a&&(u.__data__=a.__data__),s[c]=u);return new At(r,this._parents)}function cE(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function fE(){return[]}function N0(e){return e==null?fE:function(){return this.querySelectorAll(e)}}function dE(e){return function(){return cE(e.apply(this,arguments))}}function pE(e){typeof e=="function"?e=dE(e):e=N0(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var l=t[o],s=l.length,a,u=0;u<s;++u)(a=l[u])&&(r.push(e.call(a,a.__data__,u,l)),i.push(a));return new At(r,i)}function T0(e){return function(){return this.matches(e)}}function A0(e){return function(t){return t.matches(e)}}var hE=Array.prototype.find;function mE(e){return function(){return hE.call(this.children,e)}}function gE(){return this.firstElementChild}function yE(e){return this.select(e==null?gE:mE(typeof e=="function"?e:A0(e)))}var wE=Array.prototype.filter;function xE(){return Array.from(this.children)}function vE(e){return function(){return wE.call(this.children,e)}}function kE(e){return this.selectAll(e==null?xE:vE(typeof e=="function"?e:A0(e)))}function SE(e){typeof e!="function"&&(e=T0(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],l=o.length,s=r[i]=[],a,u=0;u<l;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&s.push(a);return new At(r,this._parents)}function D0(e){return new Array(e.length)}function EE(){return new At(this._enter||this._groups.map(D0),this._parents)}function Ts(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ts.prototype={constructor:Ts,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function CE(e){return function(){return e}}function bE(e,t,n,r,i,o){for(var l=0,s,a=t.length,u=o.length;l<u;++l)(s=t[l])?(s.__data__=o[l],r[l]=s):n[l]=new Ts(e,o[l]);for(;l<a;++l)(s=t[l])&&(i[l]=s)}function PE(e,t,n,r,i,o,l){var s,a,u=new Map,c=t.length,f=o.length,d=new Array(c),p;for(s=0;s<c;++s)(a=t[s])&&(d[s]=p=l.call(a,a.__data__,s,t)+"",u.has(p)?i[s]=a:u.set(p,a));for(s=0;s<f;++s)p=l.call(e,o[s],s,o)+"",(a=u.get(p))?(r[s]=a,a.__data__=o[s],u.delete(p)):n[s]=new Ts(e,o[s]);for(s=0;s<c;++s)(a=t[s])&&u.get(d[s])===a&&(i[s]=a)}function _E(e){return e.__data__}function NE(e,t){if(!arguments.length)return Array.from(this,_E);var n=t?PE:bE,r=this._parents,i=this._groups;typeof e!="function"&&(e=CE(e));for(var o=i.length,l=new Array(o),s=new Array(o),a=new Array(o),u=0;u<o;++u){var c=r[u],f=i[u],d=f.length,p=TE(e.call(c,c&&c.__data__,u,r)),m=p.length,g=s[u]=new Array(m),k=l[u]=new Array(m),h=a[u]=new Array(d);n(c,f,g,k,h,p,t);for(var y=0,w=0,v,_;y<m;++y)if(v=g[y]){for(y>=w&&(w=y+1);!(_=k[w])&&++w<m;);v._next=_||null}}return l=new At(l,r),l._enter=s,l._exit=a,l}function TE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function AE(){return new At(this._exit||this._groups.map(D0),this._parents)}function DE(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function LE(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,l=Math.min(i,o),s=new Array(i),a=0;a<l;++a)for(var u=n[a],c=r[a],f=u.length,d=s[a]=new Array(f),p,m=0;m<f;++m)(p=u[m]||c[m])&&(d[m]=p);for(;a<i;++a)s[a]=n[a];return new At(s,this._parents)}function ME(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],l;--i>=0;)(l=r[i])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function RE(e){e||(e=IE);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var l=n[o],s=l.length,a=i[o]=new Array(s),u,c=0;c<s;++c)(u=l[c])&&(a[c]=u);a.sort(t)}return new At(i,this._parents).order()}function IE(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function FE(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function OE(){return Array.from(this)}function zE(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var l=r[i];if(l)return l}return null}function $E(){let e=0;for(const t of this)++e;return e}function jE(){return!this.node()}function BE(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,l=i.length,s;o<l;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function HE(e){return function(){this.removeAttribute(e)}}function UE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VE(e,t){return function(){this.setAttribute(e,t)}}function WE(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function qE(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function KE(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function XE(e,t){var n=aa(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?UE:HE:typeof t=="function"?n.local?KE:qE:n.local?WE:VE)(n,t))}function L0(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function YE(e){return function(){this.style.removeProperty(e)}}function GE(e,t,n){return function(){this.style.setProperty(e,t,n)}}function QE(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ZE(e,t,n){return arguments.length>1?this.each((t==null?YE:typeof t=="function"?QE:GE)(e,t,n??"")):Li(this.node(),e)}function Li(e,t){return e.style.getPropertyValue(t)||L0(e).getComputedStyle(e,null).getPropertyValue(t)}function JE(e){return function(){delete this[e]}}function eC(e,t){return function(){this[e]=t}}function tC(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function nC(e,t){return arguments.length>1?this.each((t==null?JE:typeof t=="function"?tC:eC)(e,t)):this.node()[e]}function M0(e){return e.trim().split(/^|\s+/)}function ud(e){return e.classList||new R0(e)}function R0(e){this._node=e,this._names=M0(e.getAttribute("class")||"")}R0.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function I0(e,t){for(var n=ud(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function F0(e,t){for(var n=ud(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function rC(e){return function(){I0(this,e)}}function iC(e){return function(){F0(this,e)}}function oC(e,t){return function(){(t.apply(this,arguments)?I0:F0)(this,e)}}function lC(e,t){var n=M0(e+"");if(arguments.length<2){for(var r=ud(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?oC:t?rC:iC)(n,t))}function sC(){this.textContent=""}function aC(e){return function(){this.textContent=e}}function uC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function cC(e){return arguments.length?this.each(e==null?sC:(typeof e=="function"?uC:aC)(e)):this.node().textContent}function fC(){this.innerHTML=""}function dC(e){return function(){this.innerHTML=e}}function pC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function hC(e){return arguments.length?this.each(e==null?fC:(typeof e=="function"?pC:dC)(e)):this.node().innerHTML}function mC(){this.nextSibling&&this.parentNode.appendChild(this)}function gC(){return this.each(mC)}function yC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wC(){return this.each(yC)}function xC(e){var t=typeof e=="function"?e:_0(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function vC(){return null}function kC(e,t){var n=typeof e=="function"?e:_0(e),r=t==null?vC:typeof t=="function"?t:ad(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function SC(){var e=this.parentNode;e&&e.removeChild(this)}function EC(){return this.each(SC)}function CC(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function bC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function PC(e){return this.select(e?bC:CC)}function _C(e){return arguments.length?this.property("__data__",e):this.node().__data__}function NC(e){return function(t){e.call(this,t,this.__data__)}}function TC(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function AC(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function DC(e,t,n){return function(){var r=this.__on,i,o=NC(t);if(r){for(var l=0,s=r.length;l<s;++l)if((i=r[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function LC(e,t,n){var r=TC(e+""),i,o=r.length,l;if(arguments.length<2){var s=this.node().__on;if(s){for(var a=0,u=s.length,c;a<u;++a)for(i=0,c=s[a];i<o;++i)if((l=r[i]).type===c.type&&l.name===c.name)return c.value}return}for(s=t?DC:AC,i=0;i<o;++i)this.each(s(r[i],t,n));return this}function O0(e,t,n){var r=L0(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function MC(e,t){return function(){return O0(this,e,t)}}function RC(e,t){return function(){return O0(this,e,t.apply(this,arguments))}}function IC(e,t){return this.each((typeof t=="function"?RC:MC)(e,t))}function*FC(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,l;i<o;++i)(l=r[i])&&(yield l)}var z0=[null];function At(e,t){this._groups=e,this._parents=t}function nl(){return new At([[document.documentElement]],z0)}function OC(){return this}At.prototype=nl.prototype={constructor:At,select:uE,selectAll:pE,selectChild:yE,selectChildren:kE,filter:SE,data:NE,enter:EE,exit:AE,join:DE,merge:LE,selection:OC,order:ME,sort:RE,call:FE,nodes:OE,node:zE,size:$E,empty:jE,each:BE,attr:XE,style:ZE,property:nC,classed:lC,text:cC,html:hC,raise:gC,lower:wC,append:xC,insert:kC,remove:EC,clone:PC,datum:_C,on:LC,dispatch:IC,[Symbol.iterator]:FC};function Ft(e){return typeof e=="string"?new At([[document.querySelector(e)]],[document.documentElement]):new At([[e]],z0)}function zC(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Qt(e,t){if(e=zC(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const $C={passive:!1},Ho={capture:!0,passive:!1};function uu(e){e.stopImmediatePropagation()}function xi(e){e.preventDefault(),e.stopImmediatePropagation()}function $0(e){var t=e.document.documentElement,n=Ft(e).on("dragstart.drag",xi,Ho);"onselectstart"in t?n.on("selectstart.drag",xi,Ho):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function j0(e,t){var n=e.document.documentElement,r=Ft(e).on("dragstart.drag",null);t&&(r.on("click.drag",xi,Ho),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const _l=e=>()=>e;function Rc(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:l,y:s,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Rc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function jC(e){return!e.ctrlKey&&!e.button}function BC(){return this.parentNode}function HC(e,t){return t??{x:e.x,y:e.y}}function UC(){return navigator.maxTouchPoints||"ontouchstart"in this}function VC(){var e=jC,t=BC,n=HC,r=UC,i={},o=sa("start","drag","end"),l=0,s,a,u,c,f=0;function d(v){v.on("mousedown.drag",p).filter(r).on("touchstart.drag",k).on("touchmove.drag",h,$C).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(v,_){if(!(c||!e.call(this,v,_))){var S=w(this,t.call(this,v,_),v,_,"mouse");S&&(Ft(v.view).on("mousemove.drag",m,Ho).on("mouseup.drag",g,Ho),$0(v.view),uu(v),u=!1,s=v.clientX,a=v.clientY,S("start",v))}}function m(v){if(xi(v),!u){var _=v.clientX-s,S=v.clientY-a;u=_*_+S*S>f}i.mouse("drag",v)}function g(v){Ft(v.view).on("mousemove.drag mouseup.drag",null),j0(v.view,u),xi(v),i.mouse("end",v)}function k(v,_){if(e.call(this,v,_)){var S=v.changedTouches,N=t.call(this,v,_),A=S.length,L,b;for(L=0;L<A;++L)(b=w(this,N,v,_,S[L].identifier,S[L]))&&(uu(v),b("start",v,S[L]))}}function h(v){var _=v.changedTouches,S=_.length,N,A;for(N=0;N<S;++N)(A=i[_[N].identifier])&&(xi(v),A("drag",v,_[N]))}function y(v){var _=v.changedTouches,S=_.length,N,A;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),N=0;N<S;++N)(A=i[_[N].identifier])&&(uu(v),A("end",v,_[N]))}function w(v,_,S,N,A,L){var b=o.copy(),M=Qt(L||S,_),z,B,E;if((E=n.call(v,new Rc("beforestart",{sourceEvent:S,target:d,identifier:A,active:l,x:M[0],y:M[1],dx:0,dy:0,dispatch:b}),N))!=null)return z=E.x-M[0]||0,B=E.y-M[1]||0,function F(I,$,R){var T=M,x;switch(I){case"start":i[A]=F,x=l++;break;case"end":delete i[A],--l;case"drag":M=Qt(R||$,_),x=l;break}b.call(I,v,new Rc(I,{sourceEvent:$,subject:E,target:d,identifier:A,active:x,x:M[0]+z,y:M[1]+B,dx:M[0]-T[0],dy:M[1]-T[1],dispatch:b}),N)}}return d.filter=function(v){return arguments.length?(e=typeof v=="function"?v:_l(!!v),d):e},d.container=function(v){return arguments.length?(t=typeof v=="function"?v:_l(v),d):t},d.subject=function(v){return arguments.length?(n=typeof v=="function"?v:_l(v),d):n},d.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:_l(!!v),d):r},d.on=function(){var v=o.on.apply(o,arguments);return v===o?d:v},d.clickDistance=function(v){return arguments.length?(f=(v=+v)*v,d):Math.sqrt(f)},d}function cd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function B0(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function rl(){}var Uo=.7,As=1/Uo,vi="\\s*([+-]?\\d+)\\s*",Vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",WC=/^#([0-9a-f]{3,8})$/,qC=new RegExp(`^rgb\\(${vi},${vi},${vi}\\)$`),KC=new RegExp(`^rgb\\(${mn},${mn},${mn}\\)$`),XC=new RegExp(`^rgba\\(${vi},${vi},${vi},${Vo}\\)$`),YC=new RegExp(`^rgba\\(${mn},${mn},${mn},${Vo}\\)$`),GC=new RegExp(`^hsl\\(${Vo},${mn},${mn}\\)$`),QC=new RegExp(`^hsla\\(${Vo},${mn},${mn},${Vo}\\)$`),dh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};cd(rl,Wo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ph,formatHex:ph,formatHex8:ZC,formatHsl:JC,formatRgb:hh,toString:hh});function ph(){return this.rgb().formatHex()}function ZC(){return this.rgb().formatHex8()}function JC(){return H0(this).formatHsl()}function hh(){return this.rgb().formatRgb()}function Wo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=WC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?mh(t):n===3?new yt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Nl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Nl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=qC.exec(e))?new yt(t[1],t[2],t[3],1):(t=KC.exec(e))?new yt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=XC.exec(e))?Nl(t[1],t[2],t[3],t[4]):(t=YC.exec(e))?Nl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=GC.exec(e))?wh(t[1],t[2]/100,t[3]/100,1):(t=QC.exec(e))?wh(t[1],t[2]/100,t[3]/100,t[4]):dh.hasOwnProperty(e)?mh(dh[e]):e==="transparent"?new yt(NaN,NaN,NaN,0):null}function mh(e){return new yt(e>>16&255,e>>8&255,e&255,1)}function Nl(e,t,n,r){return r<=0&&(e=t=n=NaN),new yt(e,t,n,r)}function eb(e){return e instanceof rl||(e=Wo(e)),e?(e=e.rgb(),new yt(e.r,e.g,e.b,e.opacity)):new yt}function Ic(e,t,n,r){return arguments.length===1?eb(e):new yt(e,t,n,r??1)}function yt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}cd(yt,Ic,B0(rl,{brighter(e){return e=e==null?As:Math.pow(As,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yt(Dr(this.r),Dr(this.g),Dr(this.b),Ds(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:gh,formatHex:gh,formatHex8:tb,formatRgb:yh,toString:yh}));function gh(){return`#${Nr(this.r)}${Nr(this.g)}${Nr(this.b)}`}function tb(){return`#${Nr(this.r)}${Nr(this.g)}${Nr(this.b)}${Nr((isNaN(this.opacity)?1:this.opacity)*255)}`}function yh(){const e=Ds(this.opacity);return`${e===1?"rgb(":"rgba("}${Dr(this.r)}, ${Dr(this.g)}, ${Dr(this.b)}${e===1?")":`, ${e})`}`}function Ds(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Nr(e){return e=Dr(e),(e<16?"0":"")+e.toString(16)}function wh(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Jt(e,t,n,r)}function H0(e){if(e instanceof Jt)return new Jt(e.h,e.s,e.l,e.opacity);if(e instanceof rl||(e=Wo(e)),!e)return new Jt;if(e instanceof Jt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,s=o-i,a=(o+i)/2;return s?(t===o?l=(n-r)/s+(n<r)*6:n===o?l=(r-t)/s+2:l=(t-n)/s+4,s/=a<.5?o+i:2-o-i,l*=60):s=a>0&&a<1?0:l,new Jt(l,s,a,e.opacity)}function nb(e,t,n,r){return arguments.length===1?H0(e):new Jt(e,t,n,r??1)}function Jt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}cd(Jt,nb,B0(rl,{brighter(e){return e=e==null?As:Math.pow(As,e),new Jt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new Jt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new yt(cu(e>=240?e-240:e+120,i,r),cu(e,i,r),cu(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Jt(xh(this.h),Tl(this.s),Tl(this.l),Ds(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ds(this.opacity);return`${e===1?"hsl(":"hsla("}${xh(this.h)}, ${Tl(this.s)*100}%, ${Tl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xh(e){return e=(e||0)%360,e<0?e+360:e}function Tl(e){return Math.max(0,Math.min(1,e||0))}function cu(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const U0=e=>()=>e;function rb(e,t){return function(n){return e+n*t}}function ib(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function ob(e){return(e=+e)==1?V0:function(t,n){return n-t?ib(t,n,e):U0(isNaN(t)?n:t)}}function V0(e,t){var n=t-e;return n?rb(e,n):U0(isNaN(e)?t:e)}const vh=function e(t){var n=ob(t);function r(i,o){var l=n((i=Ic(i)).r,(o=Ic(o)).r),s=n(i.g,o.g),a=n(i.b,o.b),u=V0(i.opacity,o.opacity);return function(c){return i.r=l(c),i.g=s(c),i.b=a(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function Yn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Fc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fu=new RegExp(Fc.source,"g");function lb(e){return function(){return e}}function sb(e){return function(t){return e(t)+""}}function ab(e,t){var n=Fc.lastIndex=fu.lastIndex=0,r,i,o,l=-1,s=[],a=[];for(e=e+"",t=t+"";(r=Fc.exec(e))&&(i=fu.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[l]?s[l]+=o:s[++l]=o),(r=r[0])===(i=i[0])?s[l]?s[l]+=i:s[++l]=i:(s[++l]=null,a.push({i:l,x:Yn(r,i)})),n=fu.lastIndex;return n<t.length&&(o=t.slice(n),s[l]?s[l]+=o:s[++l]=o),s.length<2?a[0]?sb(a[0].x):lb(t):(t=a.length,function(u){for(var c=0,f;c<t;++c)s[(f=a[c]).i]=f.x(u);return s.join("")})}var kh=180/Math.PI,Oc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function W0(e,t,n,r,i,o){var l,s,a;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,a/=s),e*r<t*n&&(e=-e,t=-t,a=-a,l=-l),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*kh,skewX:Math.atan(a)*kh,scaleX:l,scaleY:s}}var Al;function ub(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Oc:W0(t.a,t.b,t.c,t.d,t.e,t.f)}function cb(e){return e==null||(Al||(Al=document.createElementNS("http://www.w3.org/2000/svg","g")),Al.setAttribute("transform",e),!(e=Al.transform.baseVal.consolidate()))?Oc:(e=e.matrix,W0(e.a,e.b,e.c,e.d,e.e,e.f))}function q0(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,f,d,p,m){if(u!==f||c!==d){var g=p.push("translate(",null,t,null,n);m.push({i:g-4,x:Yn(u,f)},{i:g-2,x:Yn(c,d)})}else(f||d)&&p.push("translate("+f+t+d+n)}function l(u,c,f,d){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Yn(u,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(u,c,f,d){u!==c?d.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Yn(u,c)}):c&&f.push(i(f)+"skewX("+c+r)}function a(u,c,f,d,p,m){if(u!==f||c!==d){var g=p.push(i(p)+"scale(",null,",",null,")");m.push({i:g-4,x:Yn(u,f)},{i:g-2,x:Yn(c,d)})}else(f!==1||d!==1)&&p.push(i(p)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,f,d),l(u.rotate,c.rotate,f,d),s(u.skewX,c.skewX,f,d),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(p){for(var m=-1,g=d.length,k;++m<g;)f[(k=d[m]).i]=k.x(p);return f.join("")}}}var fb=q0(ub,"px, ","px)","deg)"),db=q0(cb,", ",")",")"),pb=1e-12;function Sh(e){return((e=Math.exp(e))+1/e)/2}function hb(e){return((e=Math.exp(e))-1/e)/2}function mb(e){return((e=Math.exp(2*e))-1)/(e+1)}const gb=function e(t,n,r){function i(o,l){var s=o[0],a=o[1],u=o[2],c=l[0],f=l[1],d=l[2],p=c-s,m=f-a,g=p*p+m*m,k,h;if(g<pb)h=Math.log(d/u)/t,k=function(N){return[s+N*p,a+N*m,u*Math.exp(t*N*h)]};else{var y=Math.sqrt(g),w=(d*d-u*u+r*g)/(2*u*n*y),v=(d*d-u*u-r*g)/(2*d*n*y),_=Math.log(Math.sqrt(w*w+1)-w),S=Math.log(Math.sqrt(v*v+1)-v);h=(S-_)/t,k=function(N){var A=N*h,L=Sh(_),b=u/(n*y)*(L*mb(t*A+_)-hb(_));return[s+b*p,a+b*m,u*L/Sh(t*A+_)]}}return k.duration=h*1e3*t/Math.SQRT2,k}return i.rho=function(o){var l=Math.max(.001,+o),s=l*l,a=s*s;return e(l,s,a)},i}(Math.SQRT2,2,4);var Mi=0,co=0,Ji=0,K0=1e3,Ls,fo,Ms=0,$r=0,ua=0,qo=typeof performance=="object"&&performance.now?performance:Date,X0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function fd(){return $r||(X0(yb),$r=qo.now()+ua)}function yb(){$r=0}function Rs(){this._call=this._time=this._next=null}Rs.prototype=Y0.prototype={constructor:Rs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?fd():+n)+(t==null?0:+t),!this._next&&fo!==this&&(fo?fo._next=this:Ls=this,fo=this),this._call=e,this._time=n,zc()},stop:function(){this._call&&(this._call=null,this._time=1/0,zc())}};function Y0(e,t,n){var r=new Rs;return r.restart(e,t,n),r}function wb(){fd(),++Mi;for(var e=Ls,t;e;)(t=$r-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Mi}function Eh(){$r=(Ms=qo.now())+ua,Mi=co=0;try{wb()}finally{Mi=0,vb(),$r=0}}function xb(){var e=qo.now(),t=e-Ms;t>K0&&(ua-=t,Ms=e)}function vb(){for(var e,t=Ls,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ls=n);fo=e,zc(r)}function zc(e){if(!Mi){co&&(co=clearTimeout(co));var t=e-$r;t>24?(e<1/0&&(co=setTimeout(Eh,e-qo.now()-ua)),Ji&&(Ji=clearInterval(Ji))):(Ji||(Ms=qo.now(),Ji=setInterval(xb,K0)),Mi=1,X0(Eh))}}function Ch(e,t,n){var r=new Rs;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var kb=sa("start","end","cancel","interrupt"),Sb=[],G0=0,bh=1,$c=2,Gl=3,Ph=4,jc=5,Ql=6;function ca(e,t,n,r,i,o){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;Eb(e,n,{name:t,index:r,group:i,on:kb,tween:Sb,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:G0})}function dd(e,t){var n=sn(e,t);if(n.state>G0)throw new Error("too late; already scheduled");return n}function yn(e,t){var n=sn(e,t);if(n.state>Gl)throw new Error("too late; already running");return n}function sn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Eb(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Y0(o,0,n.time);function o(u){n.state=bh,n.timer.restart(l,n.delay,n.time),n.delay<=u&&l(u-n.delay)}function l(u){var c,f,d,p;if(n.state!==bh)return a();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Gl)return Ch(l);p.state===Ph?(p.state=Ql,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[c]):+c<t&&(p.state=Ql,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[c])}if(Ch(function(){n.state===Gl&&(n.state=Ph,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=$c,n.on.call("start",e,e.__data__,n.index,n.group),n.state===$c){for(n.state=Gl,i=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=jc,1),f=-1,d=i.length;++f<d;)i[f].call(e,c);n.state===jc&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=Ql,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Zl(e,t){var n=e.__transition,r,i,o=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((r=n[l]).name!==t){o=!1;continue}i=r.state>$c&&r.state<jc,r.state=Ql,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[l]}o&&delete e.__transition}}function Cb(e){return this.each(function(){Zl(this,e)})}function bb(e,t){var n,r;return function(){var i=yn(this,e),o=i.tween;if(o!==n){r=n=o;for(var l=0,s=r.length;l<s;++l)if(r[l].name===t){r=r.slice(),r.splice(l,1);break}}i.tween=r}}function Pb(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=yn(this,e),l=o.tween;if(l!==r){i=(r=l).slice();for(var s={name:t,value:n},a=0,u=i.length;a<u;++a)if(i[a].name===t){i[a]=s;break}a===u&&i.push(s)}o.tween=i}}function _b(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=sn(this.node(),n).tween,i=0,o=r.length,l;i<o;++i)if((l=r[i]).name===e)return l.value;return null}return this.each((t==null?bb:Pb)(n,e,t))}function pd(e,t,n){var r=e._id;return e.each(function(){var i=yn(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return sn(i,r).value[t]}}function Q0(e,t){var n;return(typeof t=="number"?Yn:t instanceof Wo?vh:(n=Wo(t))?(t=n,vh):ab)(e,t)}function Nb(e){return function(){this.removeAttribute(e)}}function Tb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ab(e,t,n){var r,i=n+"",o;return function(){var l=this.getAttribute(e);return l===i?null:l===r?o:o=t(r=l,n)}}function Db(e,t,n){var r,i=n+"",o;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===r?o:o=t(r=l,n)}}function Lb(e,t,n){var r,i,o;return function(){var l,s=n(this),a;return s==null?void this.removeAttribute(e):(l=this.getAttribute(e),a=s+"",l===a?null:l===r&&a===i?o:(i=a,o=t(r=l,s)))}}function Mb(e,t,n){var r,i,o;return function(){var l,s=n(this),a;return s==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),a=s+"",l===a?null:l===r&&a===i?o:(i=a,o=t(r=l,s)))}}function Rb(e,t){var n=aa(e),r=n==="transform"?db:Q0;return this.attrTween(e,typeof t=="function"?(n.local?Mb:Lb)(n,r,pd(this,"attr."+e,t)):t==null?(n.local?Tb:Nb)(n):(n.local?Db:Ab)(n,r,t))}function Ib(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Fb(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Ob(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Fb(e,o)),n}return i._value=t,i}function zb(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Ib(e,o)),n}return i._value=t,i}function $b(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=aa(e);return this.tween(n,(r.local?Ob:zb)(r,t))}function jb(e,t){return function(){dd(this,e).delay=+t.apply(this,arguments)}}function Bb(e,t){return t=+t,function(){dd(this,e).delay=t}}function Hb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?jb:Bb)(t,e)):sn(this.node(),t).delay}function Ub(e,t){return function(){yn(this,e).duration=+t.apply(this,arguments)}}function Vb(e,t){return t=+t,function(){yn(this,e).duration=t}}function Wb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ub:Vb)(t,e)):sn(this.node(),t).duration}function qb(e,t){if(typeof t!="function")throw new Error;return function(){yn(this,e).ease=t}}function Kb(e){var t=this._id;return arguments.length?this.each(qb(t,e)):sn(this.node(),t).ease}function Xb(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;yn(this,e).ease=n}}function Yb(e){if(typeof e!="function")throw new Error;return this.each(Xb(this._id,e))}function Gb(e){typeof e!="function"&&(e=T0(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],l=o.length,s=r[i]=[],a,u=0;u<l;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&s.push(a);return new In(r,this._parents,this._name,this._id)}function Qb(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),l=new Array(r),s=0;s<o;++s)for(var a=t[s],u=n[s],c=a.length,f=l[s]=new Array(c),d,p=0;p<c;++p)(d=a[p]||u[p])&&(f[p]=d);for(;s<r;++s)l[s]=t[s];return new In(l,this._parents,this._name,this._id)}function Zb(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Jb(e,t,n){var r,i,o=Zb(t)?dd:yn;return function(){var l=o(this,e),s=l.on;s!==r&&(i=(r=s).copy()).on(t,n),l.on=i}}function e2(e,t){var n=this._id;return arguments.length<2?sn(this.node(),n).on.on(e):this.each(Jb(n,e,t))}function t2(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function n2(){return this.on("end.remove",t2(this._id))}function r2(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ad(e));for(var r=this._groups,i=r.length,o=new Array(i),l=0;l<i;++l)for(var s=r[l],a=s.length,u=o[l]=new Array(a),c,f,d=0;d<a;++d)(c=s[d])&&(f=e.call(c,c.__data__,d,s))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,ca(u[d],t,n,d,u,sn(c,n)));return new In(o,this._parents,t,n)}function i2(e){var t=this._name,n=this._id;typeof e!="function"&&(e=N0(e));for(var r=this._groups,i=r.length,o=[],l=[],s=0;s<i;++s)for(var a=r[s],u=a.length,c,f=0;f<u;++f)if(c=a[f]){for(var d=e.call(c,c.__data__,f,a),p,m=sn(c,n),g=0,k=d.length;g<k;++g)(p=d[g])&&ca(p,t,n,g,d,m);o.push(d),l.push(c)}return new In(o,l,t,n)}var o2=nl.prototype.constructor;function l2(){return new o2(this._groups,this._parents)}function s2(e,t){var n,r,i;return function(){var o=Li(this,e),l=(this.style.removeProperty(e),Li(this,e));return o===l?null:o===n&&l===r?i:i=t(n=o,r=l)}}function Z0(e){return function(){this.style.removeProperty(e)}}function a2(e,t,n){var r,i=n+"",o;return function(){var l=Li(this,e);return l===i?null:l===r?o:o=t(r=l,n)}}function u2(e,t,n){var r,i,o;return function(){var l=Li(this,e),s=n(this),a=s+"";return s==null&&(a=s=(this.style.removeProperty(e),Li(this,e))),l===a?null:l===r&&a===i?o:(i=a,o=t(r=l,s))}}function c2(e,t){var n,r,i,o="style."+t,l="end."+o,s;return function(){var a=yn(this,e),u=a.on,c=a.value[o]==null?s||(s=Z0(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(l,i=c),a.on=r}}function f2(e,t,n){var r=(e+="")=="transform"?fb:Q0;return t==null?this.styleTween(e,s2(e,r)).on("end.style."+e,Z0(e)):typeof t=="function"?this.styleTween(e,u2(e,r,pd(this,"style."+e,t))).each(c2(this._id,e)):this.styleTween(e,a2(e,r,t),n).on("end.style."+e,null)}function d2(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function p2(e,t,n){var r,i;function o(){var l=t.apply(this,arguments);return l!==i&&(r=(i=l)&&d2(e,l,n)),r}return o._value=t,o}function h2(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,p2(e,t,n??""))}function m2(e){return function(){this.textContent=e}}function g2(e){return function(){var t=e(this);this.textContent=t??""}}function y2(e){return this.tween("text",typeof e=="function"?g2(pd(this,"text",e)):m2(e==null?"":e+""))}function w2(e){return function(t){this.textContent=e.call(this,t)}}function x2(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&w2(i)),t}return r._value=e,r}function v2(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,x2(e))}function k2(){for(var e=this._name,t=this._id,n=J0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var l=r[o],s=l.length,a,u=0;u<s;++u)if(a=l[u]){var c=sn(a,t);ca(a,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new In(r,this._parents,e,n)}function S2(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,l){var s={value:l},a={value:function(){--i===0&&o()}};n.each(function(){var u=yn(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(a)),u.on=t}),i===0&&o()})}var E2=0;function In(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function J0(){return++E2}var kn=nl.prototype;In.prototype={constructor:In,select:r2,selectAll:i2,selectChild:kn.selectChild,selectChildren:kn.selectChildren,filter:Gb,merge:Qb,selection:l2,transition:k2,call:kn.call,nodes:kn.nodes,node:kn.node,size:kn.size,empty:kn.empty,each:kn.each,on:e2,attr:Rb,attrTween:$b,style:f2,styleTween:h2,text:y2,textTween:v2,remove:n2,tween:_b,delay:Hb,duration:Wb,ease:Kb,easeVarying:Yb,end:S2,[Symbol.iterator]:kn[Symbol.iterator]};function C2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var b2={time:null,delay:0,duration:250,ease:C2};function P2(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function _2(e){var t,n;e instanceof In?(t=e._id,e=e._name):(t=J0(),(n=b2).time=fd(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var l=r[o],s=l.length,a,u=0;u<s;++u)(a=l[u])&&ca(a,e,t,u,l,n||P2(a,t));return new In(r,this._parents,e,t)}nl.prototype.interrupt=Cb;nl.prototype.transition=_2;const Dl=e=>()=>e;function N2(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function _n(e,t,n){this.k=e,this.x=t,this.y=n}_n.prototype={constructor:_n,scale:function(e){return e===1?this:new _n(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new _n(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var An=new _n(1,0,0);_n.prototype;function du(e){e.stopImmediatePropagation()}function eo(e){e.preventDefault(),e.stopImmediatePropagation()}function T2(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function A2(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function _h(){return this.__zoom||An}function D2(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function L2(){return navigator.maxTouchPoints||"ontouchstart"in this}function M2(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),l>o?(o+l)/2:Math.min(0,o)||Math.max(0,l))}function e1(){var e=T2,t=A2,n=M2,r=D2,i=L2,o=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],s=250,a=gb,u=sa("start","zoom","end"),c,f,d,p=500,m=150,g=0,k=10;function h(E){E.property("__zoom",_h).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",b).filter(i).on("touchstart.zoom",M).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}h.transform=function(E,F,I,$){var R=E.selection?E.selection():E;R.property("__zoom",_h),E!==R?_(E,F,I,$):R.interrupt().each(function(){S(this,arguments).event($).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},h.scaleBy=function(E,F,I,$){h.scaleTo(E,function(){var R=this.__zoom.k,T=typeof F=="function"?F.apply(this,arguments):F;return R*T},I,$)},h.scaleTo=function(E,F,I,$){h.transform(E,function(){var R=t.apply(this,arguments),T=this.__zoom,x=I==null?v(R):typeof I=="function"?I.apply(this,arguments):I,j=T.invert(x),V=typeof F=="function"?F.apply(this,arguments):F;return n(w(y(T,V),x,j),R,l)},I,$)},h.translateBy=function(E,F,I,$){h.transform(E,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),l)},null,$)},h.translateTo=function(E,F,I,$,R){h.transform(E,function(){var T=t.apply(this,arguments),x=this.__zoom,j=$==null?v(T):typeof $=="function"?$.apply(this,arguments):$;return n(An.translate(j[0],j[1]).scale(x.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof I=="function"?-I.apply(this,arguments):-I),T,l)},$,R)};function y(E,F){return F=Math.max(o[0],Math.min(o[1],F)),F===E.k?E:new _n(F,E.x,E.y)}function w(E,F,I){var $=F[0]-I[0]*E.k,R=F[1]-I[1]*E.k;return $===E.x&&R===E.y?E:new _n(E.k,$,R)}function v(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function _(E,F,I,$){E.on("start.zoom",function(){S(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event($).end()}).tween("zoom",function(){var R=this,T=arguments,x=S(R,T).event($),j=t.apply(R,T),V=I==null?v(j):typeof I=="function"?I.apply(R,T):I,C=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),G=R.__zoom,J=typeof F=="function"?F.apply(R,T):F,O=a(G.invert(V).concat(C/G.k),J.invert(V).concat(C/J.k));return function(H){if(H===1)H=J;else{var K=O(H),X=C/K[2];H=new _n(X,V[0]-K[0]*X,V[1]-K[1]*X)}x.zoom(null,H)}})}function S(E,F,I){return!I&&E.__zooming||new N(E,F)}function N(E,F){this.that=E,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,F),this.taps=0}N.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,F){return this.mouse&&E!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var F=Ft(this.that).datum();u.call(E,this.that,new N2(E,{sourceEvent:this.sourceEvent,target:h,type:E,transform:this.that.__zoom,dispatch:u}),F)}};function A(E,...F){if(!e.apply(this,arguments))return;var I=S(this,F).event(E),$=this.__zoom,R=Math.max(o[0],Math.min(o[1],$.k*Math.pow(2,r.apply(this,arguments)))),T=Qt(E);if(I.wheel)(I.mouse[0][0]!==T[0]||I.mouse[0][1]!==T[1])&&(I.mouse[1]=$.invert(I.mouse[0]=T)),clearTimeout(I.wheel);else{if($.k===R)return;I.mouse=[T,$.invert(T)],Zl(this),I.start()}eo(E),I.wheel=setTimeout(x,m),I.zoom("mouse",n(w(y($,R),I.mouse[0],I.mouse[1]),I.extent,l));function x(){I.wheel=null,I.end()}}function L(E,...F){if(d||!e.apply(this,arguments))return;var I=E.currentTarget,$=S(this,F,!0).event(E),R=Ft(E.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",C,!0),T=Qt(E,I),x=E.clientX,j=E.clientY;$0(E.view),du(E),$.mouse=[T,this.__zoom.invert(T)],Zl(this),$.start();function V(G){if(eo(G),!$.moved){var J=G.clientX-x,O=G.clientY-j;$.moved=J*J+O*O>g}$.event(G).zoom("mouse",n(w($.that.__zoom,$.mouse[0]=Qt(G,I),$.mouse[1]),$.extent,l))}function C(G){R.on("mousemove.zoom mouseup.zoom",null),j0(G.view,$.moved),eo(G),$.event(G).end()}}function b(E,...F){if(e.apply(this,arguments)){var I=this.__zoom,$=Qt(E.changedTouches?E.changedTouches[0]:E,this),R=I.invert($),T=I.k*(E.shiftKey?.5:2),x=n(w(y(I,T),$,R),t.apply(this,F),l);eo(E),s>0?Ft(this).transition().duration(s).call(_,x,$,E):Ft(this).call(h.transform,x,$,E)}}function M(E,...F){if(e.apply(this,arguments)){var I=E.touches,$=I.length,R=S(this,F,E.changedTouches.length===$).event(E),T,x,j,V;for(du(E),x=0;x<$;++x)j=I[x],V=Qt(j,this),V=[V,this.__zoom.invert(V),j.identifier],R.touch0?!R.touch1&&R.touch0[2]!==V[2]&&(R.touch1=V,R.taps=0):(R.touch0=V,T=!0,R.taps=1+!!c);c&&(c=clearTimeout(c)),T&&(R.taps<2&&(f=V[0],c=setTimeout(function(){c=null},p)),Zl(this),R.start())}}function z(E,...F){if(this.__zooming){var I=S(this,F).event(E),$=E.changedTouches,R=$.length,T,x,j,V;for(eo(E),T=0;T<R;++T)x=$[T],j=Qt(x,this),I.touch0&&I.touch0[2]===x.identifier?I.touch0[0]=j:I.touch1&&I.touch1[2]===x.identifier&&(I.touch1[0]=j);if(x=I.that.__zoom,I.touch1){var C=I.touch0[0],G=I.touch0[1],J=I.touch1[0],O=I.touch1[1],H=(H=J[0]-C[0])*H+(H=J[1]-C[1])*H,K=(K=O[0]-G[0])*K+(K=O[1]-G[1])*K;x=y(x,Math.sqrt(H/K)),j=[(C[0]+J[0])/2,(C[1]+J[1])/2],V=[(G[0]+O[0])/2,(G[1]+O[1])/2]}else if(I.touch0)j=I.touch0[0],V=I.touch0[1];else return;I.zoom("touch",n(w(x,j,V),I.extent,l))}}function B(E,...F){if(this.__zooming){var I=S(this,F).event(E),$=E.changedTouches,R=$.length,T,x;for(du(E),d&&clearTimeout(d),d=setTimeout(function(){d=null},p),T=0;T<R;++T)x=$[T],I.touch0&&I.touch0[2]===x.identifier?delete I.touch0:I.touch1&&I.touch1[2]===x.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(x=Qt(x,this),Math.hypot(f[0]-x[0],f[1]-x[1])<k)){var j=Ft(this).on("dblclick.zoom");j&&j.apply(this,arguments)}}}return h.wheelDelta=function(E){return arguments.length?(r=typeof E=="function"?E:Dl(+E),h):r},h.filter=function(E){return arguments.length?(e=typeof E=="function"?E:Dl(!!E),h):e},h.touchable=function(E){return arguments.length?(i=typeof E=="function"?E:Dl(!!E),h):i},h.extent=function(E){return arguments.length?(t=typeof E=="function"?E:Dl([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),h):t},h.scaleExtent=function(E){return arguments.length?(o[0]=+E[0],o[1]=+E[1],h):[o[0],o[1]]},h.translateExtent=function(E){return arguments.length?(l[0][0]=+E[0][0],l[1][0]=+E[1][0],l[0][1]=+E[0][1],l[1][1]=+E[1][1],h):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},h.constrain=function(E){return arguments.length?(n=E,h):n},h.duration=function(E){return arguments.length?(s=+E,h):s},h.interpolate=function(E){return arguments.length?(a=E,h):a},h.on=function(){var E=u.on.apply(u,arguments);return E===u?h:E},h.clickDistance=function(E){return arguments.length?(g=(E=+E)*E,h):Math.sqrt(g)},h.tapDistance=function(E){return arguments.length?(k=+E,h):k},h}const fa=P.createContext(null),R2=fa.Provider,Fn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},t1=Fn.error001();function Pe(e,t){const n=P.useContext(fa);if(n===null)throw new Error(t1);return P0(n,e,t)}const Ve=()=>{const e=P.useContext(fa);if(e===null)throw new Error(t1);return P.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},I2=e=>e.userSelectionActive?"none":"all";function hd({position:e,children:t,className:n,style:r,...i}){const o=Pe(I2),l=`${e}`.split("-");return U.createElement("div",{className:tt(["react-flow__panel",n,...l]),style:{...r,pointerEvents:o},...i},t)}function F2({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:U.createElement(hd,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},U.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const O2=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:o={},labelBgPadding:l=[2,4],labelBgBorderRadius:s=2,children:a,className:u,...c})=>{const f=P.useRef(null),[d,p]=P.useState({x:0,y:0,width:0,height:0}),m=tt(["react-flow__edge-textwrapper",u]);return P.useEffect(()=>{if(f.current){const g=f.current.getBBox();p({x:g.x,y:g.y,width:g.width,height:g.height})}},[n]),typeof n>"u"||!n?null:U.createElement("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:m,visibility:d.width?"visible":"hidden",...c},i&&U.createElement("rect",{width:d.width+2*l[0],x:-l[0],y:-l[1],height:d.height+2*l[1],className:"react-flow__edge-textbg",style:o,rx:s,ry:s}),U.createElement("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:f,style:r},n),a)};var z2=P.memo(O2);const md=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ri=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),gd=(e={x:0,y:0},t)=>({x:Ri(e.x,t[0][0],t[1][0]),y:Ri(e.y,t[0][1],t[1][1])}),Nh=(e,t,n)=>e<t?Ri(Math.abs(e-t),1,50)/50:e>n?-Ri(Math.abs(e-n),1,50)/50:0,n1=(e,t)=>{const n=Nh(e.x,35,t.width-35)*20,r=Nh(e.y,35,t.height-35)*20;return[n,r]},r1=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},i1=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Ko=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),o1=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Th=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),$2=(e,t)=>o1(i1(Ko(e),Ko(t))),Bc=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},j2=e=>zt(e.width)&&zt(e.height)&&zt(e.x)&&zt(e.y),zt=e=>!isNaN(e)&&isFinite(e),$e=Symbol.for("internals"),l1=["Enter"," ","Escape"],B2=(e,t)=>{},H2=e=>"nativeEvent"in e;function Hc(e){var i,o;const t=H2(e)?e.nativeEvent:e,n=((o=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:o[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const s1=e=>"clientX"in e,fr=(e,t)=>{var o,l;const n=s1(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},Is=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},$i=({id:e,path:t,labelX:n,labelY:r,label:i,labelStyle:o,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,markerEnd:f,markerStart:d,interactionWidth:p=20})=>U.createElement(U.Fragment,null,U.createElement("path",{id:e,style:c,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:d}),p&&U.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),i&&zt(n)&&zt(r)?U.createElement(z2,{x:n,y:r,label:i,labelStyle:o,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u}):null);$i.displayName="BaseEdge";function to(e,t,n){return n===void 0?n:r=>{const i=t().edges.find(o=>o.id===e);i&&n(r,{...i})}}function a1({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,l=Math.abs(r-t)/2,s=r<t?r+l:r-l;return[o,s,i,l]}function u1({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:l,targetControlY:s}){const a=e*.125+i*.375+l*.375+n*.125,u=t*.125+o*.375+s*.375+r*.125,c=Math.abs(a-e),f=Math.abs(u-t);return[a,u,c,f]}var jr;(function(e){e.Strict="strict",e.Loose="loose"})(jr||(jr={}));var nr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(nr||(nr={}));var Xo;(function(e){e.Partial="partial",e.Full="full"})(Xo||(Xo={}));var Jn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Jn||(Jn={}));var Yo;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Yo||(Yo={}));var oe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(oe||(oe={}));function Ah({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===oe.Left||e===oe.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function c1({sourceX:e,sourceY:t,sourcePosition:n=oe.Bottom,targetX:r,targetY:i,targetPosition:o=oe.Top}){const[l,s]=Ah({pos:n,x1:e,y1:t,x2:r,y2:i}),[a,u]=Ah({pos:o,x1:r,y1:i,x2:e,y2:t}),[c,f,d,p]=u1({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:s,targetControlX:a,targetControlY:u});return[`M${e},${t} C${l},${s} ${a},${u} ${r},${i}`,c,f,d,p]}const yd=P.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=oe.Bottom,targetPosition:o=oe.Top,label:l,labelStyle:s,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:p,markerStart:m,interactionWidth:g})=>{const[k,h,y]=c1({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o});return U.createElement($i,{path:k,labelX:h,labelY:y,label:l,labelStyle:s,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:p,markerStart:m,interactionWidth:g})});yd.displayName="SimpleBezierEdge";const Dh={[oe.Left]:{x:-1,y:0},[oe.Right]:{x:1,y:0},[oe.Top]:{x:0,y:-1},[oe.Bottom]:{x:0,y:1}},U2=({source:e,sourcePosition:t=oe.Bottom,target:n})=>t===oe.Left||t===oe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Lh=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function V2({source:e,sourcePosition:t=oe.Bottom,target:n,targetPosition:r=oe.Top,center:i,offset:o}){const l=Dh[t],s=Dh[r],a={x:e.x+l.x*o,y:e.y+l.y*o},u={x:n.x+s.x*o,y:n.y+s.y*o},c=U2({source:a,sourcePosition:t,target:u}),f=c.x!==0?"x":"y",d=c[f];let p=[],m,g;const k={x:0,y:0},h={x:0,y:0},[y,w,v,_]=a1({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[f]*s[f]===-1){m=i.x??y,g=i.y??w;const N=[{x:m,y:a.y},{x:m,y:u.y}],A=[{x:a.x,y:g},{x:u.x,y:g}];l[f]===d?p=f==="x"?N:A:p=f==="x"?A:N}else{const N=[{x:a.x,y:u.y}],A=[{x:u.x,y:a.y}];if(f==="x"?p=l.x===d?A:N:p=l.y===d?N:A,t===r){const B=Math.abs(e[f]-n[f]);if(B<=o){const E=Math.min(o-1,o-B);l[f]===d?k[f]=(a[f]>e[f]?-1:1)*E:h[f]=(u[f]>n[f]?-1:1)*E}}if(t!==r){const B=f==="x"?"y":"x",E=l[f]===s[B],F=a[B]>u[B],I=a[B]<u[B];(l[f]===1&&(!E&&F||E&&I)||l[f]!==1&&(!E&&I||E&&F))&&(p=f==="x"?N:A)}const L={x:a.x+k.x,y:a.y+k.y},b={x:u.x+h.x,y:u.y+h.y},M=Math.max(Math.abs(L.x-p[0].x),Math.abs(b.x-p[0].x)),z=Math.max(Math.abs(L.y-p[0].y),Math.abs(b.y-p[0].y));M>=z?(m=(L.x+b.x)/2,g=p[0].y):(m=p[0].x,g=(L.y+b.y)/2)}return[[e,{x:a.x+k.x,y:a.y+k.y},...p,{x:u.x+h.x,y:u.y+h.y},n],m,g,v,_]}function W2(e,t,n,r){const i=Math.min(Lh(e,t)/2,Lh(t,n)/2,r),{x:o,y:l}=t;if(e.x===o&&o===n.x||e.y===l&&l===n.y)return`L${o} ${l}`;if(e.y===l){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${o+i*u},${l}Q ${o},${l} ${o},${l+i*c}`}const s=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${o},${l+i*a}Q ${o},${l} ${o+i*s},${l}`}function Uc({sourceX:e,sourceY:t,sourcePosition:n=oe.Bottom,targetX:r,targetY:i,targetPosition:o=oe.Top,borderRadius:l=5,centerX:s,centerY:a,offset:u=20}){const[c,f,d,p,m]=V2({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:s,y:a},offset:u});return[c.reduce((k,h,y)=>{let w="";return y>0&&y<c.length-1?w=W2(c[y-1],h,c[y+1],l):w=`${y===0?"M":"L"}${h.x} ${h.y}`,k+=w,k},""),f,d,p,m]}const da=P.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:o,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,sourcePosition:f=oe.Bottom,targetPosition:d=oe.Top,markerEnd:p,markerStart:m,pathOptions:g,interactionWidth:k})=>{const[h,y,w]=Uc({sourceX:e,sourceY:t,sourcePosition:f,targetX:n,targetY:r,targetPosition:d,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset});return U.createElement($i,{path:h,labelX:y,labelY:w,label:i,labelStyle:o,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,markerEnd:p,markerStart:m,interactionWidth:k})});da.displayName="SmoothStepEdge";const wd=P.memo(e=>{var t;return U.createElement(da,{...e,pathOptions:P.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});wd.displayName="StepEdge";function q2({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,l,s]=a1({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,l,s]}const xd=P.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:o,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,markerEnd:f,markerStart:d,interactionWidth:p})=>{const[m,g,k]=q2({sourceX:e,sourceY:t,targetX:n,targetY:r});return U.createElement($i,{path:m,labelX:g,labelY:k,label:i,labelStyle:o,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,markerEnd:f,markerStart:d,interactionWidth:p})});xd.displayName="StraightEdge";function Ll(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Mh({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case oe.Left:return[t-Ll(t-r,o),n];case oe.Right:return[t+Ll(r-t,o),n];case oe.Top:return[t,n-Ll(n-i,o)];case oe.Bottom:return[t,n+Ll(i-n,o)]}}function vd({sourceX:e,sourceY:t,sourcePosition:n=oe.Bottom,targetX:r,targetY:i,targetPosition:o=oe.Top,curvature:l=.25}){const[s,a]=Mh({pos:n,x1:e,y1:t,x2:r,y2:i,c:l}),[u,c]=Mh({pos:o,x1:r,y1:i,x2:e,y2:t,c:l}),[f,d,p,m]=u1({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${a} ${u},${c} ${r},${i}`,f,d,p,m]}const Fs=P.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=oe.Bottom,targetPosition:o=oe.Top,label:l,labelStyle:s,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:p,markerStart:m,pathOptions:g,interactionWidth:k})=>{const[h,y,w]=vd({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o,curvature:g==null?void 0:g.curvature});return U.createElement($i,{path:h,labelX:y,labelY:w,label:l,labelStyle:s,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:p,markerStart:m,interactionWidth:k})});Fs.displayName="BezierEdge";const kd=P.createContext(null),K2=kd.Provider;kd.Consumer;const X2=()=>P.useContext(kd),Y2=e=>"id"in e&&"source"in e&&"target"in e,G2=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,Vc=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,Q2=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),f1=(e,t)=>{if(!e.source||!e.target)return t;let n;return Y2(e)?n={...e}:n={...e,id:G2(e)},Q2(n,t)?t:t.concat(n)},Wc=({x:e,y:t},[n,r,i],o,[l,s])=>{const a={x:(e-n)/i,y:(t-r)/i};return o?{x:l*Math.round(a.x/l),y:s*Math.round(a.y/s)}:a},d1=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),Lr=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],i={x:e.position.x-n,y:e.position.y-r};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:i}},pa=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const{x:o,y:l}=Lr(i,t).positionAbsolute;return i1(r,Ko({x:o,y:l,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return o1(n)},p1=(e,t,[n,r,i]=[0,0,1],o=!1,l=!1,s=[0,0])=>{const a={x:(t.x-n)/i,y:(t.y-r)/i,width:t.width/i,height:t.height/i},u=[];return e.forEach(c=>{const{width:f,height:d,selectable:p=!0,hidden:m=!1}=c;if(l&&!p||m)return!1;const{positionAbsolute:g}=Lr(c,s),k={x:g.x,y:g.y,width:f||0,height:d||0},h=Bc(a,k),y=typeof f>"u"||typeof d>"u"||f===null||d===null,w=o&&h>0,v=(f||0)*(d||0);(y||w||h>=v||c.dragging)&&u.push(c)}),u},ha=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},h1=(e,t,n,r,i,o=.1)=>{const l=t/(e.width*(1+o)),s=n/(e.height*(1+o)),a=Math.min(l,s),u=Ri(a,r,i),c=e.x+e.width/2,f=e.y+e.height/2,d=t/2-c*u,p=n/2-f*u;return{x:d,y:p,zoom:u}},Er=(e,t=0)=>e.transition().duration(t);function Rh(e,t,n,r){return(t[n]||[]).reduce((i,o)=>{var l,s;return`${e.id}-${o.id}-${n}`!==r&&i.push({id:o.id||null,type:n,nodeId:e.id,x:(((l=e.positionAbsolute)==null?void 0:l.x)??0)+o.x+o.width/2,y:(((s=e.positionAbsolute)==null?void 0:s.y)??0)+o.y+o.height/2}),i},[])}function Z2(e,t,n,r,i,o){const{x:l,y:s}=fr(e),u=t.elementsFromPoint(l,s).find(m=>m.classList.contains("react-flow__handle"));if(u){const m=u.getAttribute("data-nodeid");if(m){const g=Sd(void 0,u),k=u.getAttribute("data-handleid"),h=o({nodeId:m,id:k,type:g});if(h){const y=i.find(w=>w.nodeId===m&&w.type===g&&w.id===k);return{handle:{id:k,type:g,nodeId:m,x:(y==null?void 0:y.x)||n.x,y:(y==null?void 0:y.y)||n.y},validHandleResult:h}}}}let c=[],f=1/0;if(i.forEach(m=>{const g=Math.sqrt((m.x-n.x)**2+(m.y-n.y)**2);if(g<=r){const k=o(m);g<=f&&(g<f?c=[{handle:m,validHandleResult:k}]:g===f&&c.push({handle:m,validHandleResult:k}),f=g)}}),!c.length)return{handle:null,validHandleResult:m1()};if(c.length===1)return c[0];const d=c.some(({validHandleResult:m})=>m.isValid),p=c.some(({handle:m})=>m.type==="target");return c.find(({handle:m,validHandleResult:g})=>p?m.type==="target":d?g.isValid:!0)||c[0]}const J2={source:null,target:null,sourceHandle:null,targetHandle:null},m1=()=>({handleDomNode:null,isValid:!1,connection:J2,endHandle:null});function g1(e,t,n,r,i,o,l){const s=i==="target",a=l.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),u={...m1(),handleDomNode:a};if(a){const c=Sd(void 0,a),f=a.getAttribute("data-nodeid"),d=a.getAttribute("data-handleid"),p=a.classList.contains("connectable"),m=a.classList.contains("connectableend"),g={source:s?f:n,sourceHandle:s?d:r,target:s?n:f,targetHandle:s?r:d};u.connection=g,p&&m&&(t===jr.Strict?s&&c==="source"||!s&&c==="target":f!==n||d!==r)&&(u.endHandle={nodeId:f,handleId:d,type:c},u.isValid=o(g))}return u}function eP({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((i,o)=>{if(o[$e]){const{handleBounds:l}=o[$e];let s=[],a=[];l&&(s=Rh(o,l,"source",`${t}-${n}-${r}`),a=Rh(o,l,"target",`${t}-${n}-${r}`)),i.push(...s,...a)}return i},[])}function Sd(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function pu(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function tP(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function y1({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:i,getState:o,setState:l,isValidConnection:s,edgeUpdaterType:a,onReconnectEnd:u}){const c=r1(e.target),{connectionMode:f,domNode:d,autoPanOnConnect:p,connectionRadius:m,onConnectStart:g,panBy:k,getNodes:h,cancelConnection:y}=o();let w=0,v;const{x:_,y:S}=fr(e),N=c==null?void 0:c.elementFromPoint(_,S),A=Sd(a,N),L=d==null?void 0:d.getBoundingClientRect();if(!L||!A)return;let b,M=fr(e,L),z=!1,B=null,E=!1,F=null;const I=eP({nodes:h(),nodeId:n,handleId:t,handleType:A}),$=()=>{if(!p)return;const[x,j]=n1(M,L);k({x,y:j}),w=requestAnimationFrame($)};l({connectionPosition:M,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:A,connectionStartHandle:{nodeId:n,handleId:t,type:A},connectionEndHandle:null}),g==null||g(e,{nodeId:n,handleId:t,handleType:A});function R(x){const{transform:j}=o();M=fr(x,L);const{handle:V,validHandleResult:C}=Z2(x,c,Wc(M,j,!1,[1,1]),m,I,G=>g1(G,f,n,t,i?"target":"source",s,c));if(v=V,z||($(),z=!0),F=C.handleDomNode,B=C.connection,E=C.isValid,l({connectionPosition:v&&E?d1({x:v.x,y:v.y},j):M,connectionStatus:tP(!!v,E),connectionEndHandle:C.endHandle}),!v&&!E&&!F)return pu(b);B.source!==B.target&&F&&(pu(b),b=F,F.classList.add("connecting","react-flow__handle-connecting"),F.classList.toggle("valid",E),F.classList.toggle("react-flow__handle-valid",E))}function T(x){var j,V;(v||F)&&B&&E&&(r==null||r(B)),(V=(j=o()).onConnectEnd)==null||V.call(j,x),a&&(u==null||u(x)),pu(b),y(),cancelAnimationFrame(w),z=!1,E=!1,B=null,F=null,c.removeEventListener("mousemove",R),c.removeEventListener("mouseup",T),c.removeEventListener("touchmove",R),c.removeEventListener("touchend",T)}c.addEventListener("mousemove",R),c.addEventListener("mouseup",T),c.addEventListener("touchmove",R),c.addEventListener("touchend",T)}const Ih=()=>!0,nP=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),rP=(e,t,n)=>r=>{const{connectionStartHandle:i,connectionEndHandle:o,connectionClickStartHandle:l}=r;return{connecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n||(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n,clickConnecting:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.handleId)===t&&(l==null?void 0:l.type)===n}},w1=P.forwardRef(({type:e="source",position:t=oe.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:l,onConnect:s,children:a,className:u,onMouseDown:c,onTouchStart:f,...d},p)=>{var L,b;const m=l||null,g=e==="target",k=Ve(),h=X2(),{connectOnClick:y,noPanClassName:w}=Pe(nP,Ye),{connecting:v,clickConnecting:_}=Pe(rP(h,m,e),Ye);h||(b=(L=k.getState()).onError)==null||b.call(L,"010",Fn.error010());const S=M=>{const{defaultEdgeOptions:z,onConnect:B,hasDefaultEdges:E}=k.getState(),F={...z,...M};if(E){const{edges:I,setEdges:$}=k.getState();$(f1(F,I))}B==null||B(F),s==null||s(F)},N=M=>{if(!h)return;const z=s1(M);i&&(z&&M.button===0||!z)&&y1({event:M,handleId:m,nodeId:h,onConnect:S,isTarget:g,getState:k.getState,setState:k.setState,isValidConnection:n||k.getState().isValidConnection||Ih}),z?c==null||c(M):f==null||f(M)},A=M=>{const{onClickConnectStart:z,onClickConnectEnd:B,connectionClickStartHandle:E,connectionMode:F,isValidConnection:I}=k.getState();if(!h||!E&&!i)return;if(!E){z==null||z(M,{nodeId:h,handleId:m,handleType:e}),k.setState({connectionClickStartHandle:{nodeId:h,type:e,handleId:m}});return}const $=r1(M.target),R=n||I||Ih,{connection:T,isValid:x}=g1({nodeId:h,id:m,type:e},F,E.nodeId,E.handleId||null,E.type,R,$);x&&S(T),B==null||B(M),k.setState({connectionClickStartHandle:null})};return U.createElement("div",{"data-handleid":m,"data-nodeid":h,"data-handlepos":t,"data-id":`${h}-${m}-${e}`,className:tt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,u,{source:!g,target:g,connectable:r,connectablestart:i,connectableend:o,connecting:_,connectionindicator:r&&(i&&!v||o&&v)}]),onMouseDown:N,onTouchStart:N,onClick:y?A:void 0,ref:p,...d},a)});w1.displayName="Handle";var Ii=P.memo(w1);const x1=({data:e,isConnectable:t,targetPosition:n=oe.Top,sourcePosition:r=oe.Bottom})=>U.createElement(U.Fragment,null,U.createElement(Ii,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,U.createElement(Ii,{type:"source",position:r,isConnectable:t}));x1.displayName="DefaultNode";var qc=P.memo(x1);const v1=({data:e,isConnectable:t,sourcePosition:n=oe.Bottom})=>U.createElement(U.Fragment,null,e==null?void 0:e.label,U.createElement(Ii,{type:"source",position:n,isConnectable:t}));v1.displayName="InputNode";var k1=P.memo(v1);const S1=({data:e,isConnectable:t,targetPosition:n=oe.Top})=>U.createElement(U.Fragment,null,U.createElement(Ii,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label);S1.displayName="OutputNode";var E1=P.memo(S1);const Ed=()=>null;Ed.displayName="GroupNode";const iP=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),Ml=e=>e.id;function oP(e,t){return Ye(e.selectedNodes.map(Ml),t.selectedNodes.map(Ml))&&Ye(e.selectedEdges.map(Ml),t.selectedEdges.map(Ml))}const C1=P.memo(({onSelectionChange:e})=>{const t=Ve(),{selectedNodes:n,selectedEdges:r}=Pe(iP,oP);return P.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChange.forEach(o=>o(i))},[n,r,e]),null});C1.displayName="SelectionListener";const lP=e=>!!e.onSelectionChange;function sP({onSelectionChange:e}){const t=Pe(lP);return e||t?U.createElement(C1,{onSelectionChange:e}):null}const aP=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Xr(e,t){P.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function ye(e,t,n){P.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const uP=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:i,onConnectStart:o,onConnectEnd:l,onClickConnectStart:s,onClickConnectEnd:a,nodesDraggable:u,nodesConnectable:c,nodesFocusable:f,edgesFocusable:d,edgesUpdatable:p,elevateNodesOnSelect:m,minZoom:g,maxZoom:k,nodeExtent:h,onNodesChange:y,onEdgesChange:w,elementsSelectable:v,connectionMode:_,snapGrid:S,snapToGrid:N,translateExtent:A,connectOnClick:L,defaultEdgeOptions:b,fitView:M,fitViewOptions:z,onNodesDelete:B,onEdgesDelete:E,onNodeDrag:F,onNodeDragStart:I,onNodeDragStop:$,onSelectionDrag:R,onSelectionDragStart:T,onSelectionDragStop:x,noPanClassName:j,nodeOrigin:V,rfId:C,autoPanOnConnect:G,autoPanOnNodeDrag:J,onError:O,connectionRadius:H,isValidConnection:K,nodeDragThreshold:X})=>{const{setNodes:Y,setEdges:ee,setDefaultNodesAndEdges:ne,setMinZoom:fe,setMaxZoom:de,setTranslateExtent:se,setNodeExtent:ce,reset:ae}=Pe(aP,Ye),re=Ve();return P.useEffect(()=>{const _e=r==null?void 0:r.map(at=>({...at,...b}));return ne(n,_e),()=>{ae()}},[]),ye("defaultEdgeOptions",b,re.setState),ye("connectionMode",_,re.setState),ye("onConnect",i,re.setState),ye("onConnectStart",o,re.setState),ye("onConnectEnd",l,re.setState),ye("onClickConnectStart",s,re.setState),ye("onClickConnectEnd",a,re.setState),ye("nodesDraggable",u,re.setState),ye("nodesConnectable",c,re.setState),ye("nodesFocusable",f,re.setState),ye("edgesFocusable",d,re.setState),ye("edgesUpdatable",p,re.setState),ye("elementsSelectable",v,re.setState),ye("elevateNodesOnSelect",m,re.setState),ye("snapToGrid",N,re.setState),ye("snapGrid",S,re.setState),ye("onNodesChange",y,re.setState),ye("onEdgesChange",w,re.setState),ye("connectOnClick",L,re.setState),ye("fitViewOnInit",M,re.setState),ye("fitViewOnInitOptions",z,re.setState),ye("onNodesDelete",B,re.setState),ye("onEdgesDelete",E,re.setState),ye("onNodeDrag",F,re.setState),ye("onNodeDragStart",I,re.setState),ye("onNodeDragStop",$,re.setState),ye("onSelectionDrag",R,re.setState),ye("onSelectionDragStart",T,re.setState),ye("onSelectionDragStop",x,re.setState),ye("noPanClassName",j,re.setState),ye("nodeOrigin",V,re.setState),ye("rfId",C,re.setState),ye("autoPanOnConnect",G,re.setState),ye("autoPanOnNodeDrag",J,re.setState),ye("onError",O,re.setState),ye("connectionRadius",H,re.setState),ye("isValidConnection",K,re.setState),ye("nodeDragThreshold",X,re.setState),Xr(e,Y),Xr(t,ee),Xr(g,fe),Xr(k,de),Xr(A,se),Xr(h,ce),null},Fh={display:"none"},cP={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},b1="react-flow__node-desc",P1="react-flow__edge-desc",fP="react-flow__aria-live",dP=e=>e.ariaLiveMessage;function pP({rfId:e}){const t=Pe(dP);return U.createElement("div",{id:`${fP}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:cP},t)}function hP({rfId:e,disableKeyboardA11y:t}){return U.createElement(U.Fragment,null,U.createElement("div",{id:`${b1}-${e}`,style:Fh},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),U.createElement("div",{id:`${P1}-${e}`,style:Fh},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&U.createElement(pP,{rfId:e}))}var Go=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=P.useState(!1),i=P.useRef(!1),o=P.useRef(new Set([])),[l,s]=P.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.split("+")),c=u.reduce((f,d)=>f.concat(...d),[]);return[u,c]}return[[],[]]},[e]);return P.useEffect(()=>{const a=typeof document<"u"?document:null,u=(t==null?void 0:t.target)||a;if(e!==null){const c=p=>{if(i.current=p.ctrlKey||p.metaKey||p.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&Hc(p))return!1;const g=zh(p.code,s);o.current.add(p[g]),Oh(l,o.current,!1)&&(p.preventDefault(),r(!0))},f=p=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&Hc(p))return!1;const g=zh(p.code,s);Oh(l,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(p[g]),p.key==="Meta"&&o.current.clear(),i.current=!1},d=()=>{o.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",c),u==null||u.addEventListener("keyup",f),window.addEventListener("blur",d),()=>{u==null||u.removeEventListener("keydown",c),u==null||u.removeEventListener("keyup",f),window.removeEventListener("blur",d)}}},[e,r]),n};function Oh(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function zh(e,t){return t.includes(e)?"code":"key"}function _1(e,t,n,r){var s,a;const i=e.parentNode||e.parentId;if(!i)return n;const o=t.get(i),l=Lr(o,r);return _1(o,t,{x:(n.x??0)+l.x,y:(n.y??0)+l.y,z:(((s=o[$e])==null?void 0:s.z)??0)>(n.z??0)?((a=o[$e])==null?void 0:a.z)??0:n.z??0},r)}function N1(e,t,n){e.forEach(r=>{var o;const i=r.parentNode||r.parentId;if(i&&!e.has(i))throw new Error(`Parent node ${i} not found`);if(i||n!=null&&n[r.id]){const{x:l,y:s,z:a}=_1(r,e,{...r.position,z:((o=r[$e])==null?void 0:o.z)??0},t);r.positionAbsolute={x:l,y:s},r[$e].z=a,n!=null&&n[r.id]&&(r[$e].isParent=!0)}})}function hu(e,t,n,r){const i=new Map,o={},l=r?1e3:0;return e.forEach(s=>{var p;const a=(zt(s.zIndex)?s.zIndex:0)+(s.selected?l:0),u=t.get(s.id),c={...s,positionAbsolute:{x:s.position.x,y:s.position.y}},f=s.parentNode||s.parentId;f&&(o[f]=!0);const d=(u==null?void 0:u.type)&&(u==null?void 0:u.type)!==s.type;Object.defineProperty(c,$e,{enumerable:!1,value:{handleBounds:d||(p=u==null?void 0:u[$e])==null?void 0:p.handleBounds,z:a}}),i.set(s.id,c)}),N1(i,n,o),i}function T1(e,t={}){const{getNodes:n,width:r,height:i,minZoom:o,maxZoom:l,d3Zoom:s,d3Selection:a,fitViewOnInitDone:u,fitViewOnInit:c,nodeOrigin:f}=e(),d=t.initial&&!u&&c;if(s&&a&&(d||!t.initial)){const m=n().filter(k=>{var y;const h=t.includeHiddenNodes?k.width&&k.height:!k.hidden;return(y=t.nodes)!=null&&y.length?h&&t.nodes.some(w=>w.id===k.id):h}),g=m.every(k=>k.width&&k.height);if(m.length>0&&g){const k=pa(m,f),{x:h,y,zoom:w}=h1(k,r,i,t.minZoom??o,t.maxZoom??l,t.padding??.1),v=An.translate(h,y).scale(w);return typeof t.duration=="number"&&t.duration>0?s.transform(Er(a,t.duration),v):s.transform(a,v),!0}}return!1}function mP(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[$e]:r[$e],selected:n.selected})}),new Map(t)}function gP(e,t){return t.map(n=>{const r=e.find(i=>i.id===n.id);return r&&(n.selected=r.selected),n})}function Rl({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:i,edges:o,onNodesChange:l,onEdgesChange:s,hasDefaultNodes:a,hasDefaultEdges:u}=n();e!=null&&e.length&&(a&&r({nodeInternals:mP(e,i)}),l==null||l(e)),t!=null&&t.length&&(u&&r({edges:gP(t,o)}),s==null||s(t))}const Yr=()=>{},yP={zoomIn:Yr,zoomOut:Yr,zoomTo:Yr,getZoom:()=>1,setViewport:Yr,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Yr,fitBounds:Yr,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},wP=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),xP=()=>{const e=Ve(),{d3Zoom:t,d3Selection:n}=Pe(wP,Ye);return P.useMemo(()=>n&&t?{zoomIn:i=>t.scaleBy(Er(n,i==null?void 0:i.duration),1.2),zoomOut:i=>t.scaleBy(Er(n,i==null?void 0:i.duration),1/1.2),zoomTo:(i,o)=>t.scaleTo(Er(n,o==null?void 0:o.duration),i),getZoom:()=>e.getState().transform[2],setViewport:(i,o)=>{const[l,s,a]=e.getState().transform,u=An.translate(i.x??l,i.y??s).scale(i.zoom??a);t.transform(Er(n,o==null?void 0:o.duration),u)},getViewport:()=>{const[i,o,l]=e.getState().transform;return{x:i,y:o,zoom:l}},fitView:i=>T1(e.getState,i),setCenter:(i,o,l)=>{const{width:s,height:a,maxZoom:u}=e.getState(),c=typeof(l==null?void 0:l.zoom)<"u"?l.zoom:u,f=s/2-i*c,d=a/2-o*c,p=An.translate(f,d).scale(c);t.transform(Er(n,l==null?void 0:l.duration),p)},fitBounds:(i,o)=>{const{width:l,height:s,minZoom:a,maxZoom:u}=e.getState(),{x:c,y:f,zoom:d}=h1(i,l,s,a,u,(o==null?void 0:o.padding)??.1),p=An.translate(c,f).scale(d);t.transform(Er(n,o==null?void 0:o.duration),p)},project:i=>{const{transform:o,snapToGrid:l,snapGrid:s}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Wc(i,o,l,s)},screenToFlowPosition:i=>{const{transform:o,snapToGrid:l,snapGrid:s,domNode:a}=e.getState();if(!a)return i;const{x:u,y:c}=a.getBoundingClientRect(),f={x:i.x-u,y:i.y-c};return Wc(f,o,l,s)},flowToScreenPosition:i=>{const{transform:o,domNode:l}=e.getState();if(!l)return i;const{x:s,y:a}=l.getBoundingClientRect(),u=d1(i,o);return{x:u.x+s,y:u.y+a}},viewportInitialized:!0}:yP,[t,n])};function Cd(){const e=xP(),t=Ve(),n=P.useCallback(()=>t.getState().getNodes().map(g=>({...g})),[]),r=P.useCallback(g=>t.getState().nodeInternals.get(g),[]),i=P.useCallback(()=>{const{edges:g=[]}=t.getState();return g.map(k=>({...k}))},[]),o=P.useCallback(g=>{const{edges:k=[]}=t.getState();return k.find(h=>h.id===g)},[]),l=P.useCallback(g=>{const{getNodes:k,setNodes:h,hasDefaultNodes:y,onNodesChange:w}=t.getState(),v=k(),_=typeof g=="function"?g(v):g;if(y)h(_);else if(w){const S=_.length===0?v.map(N=>({type:"remove",id:N.id})):_.map(N=>({item:N,type:"reset"}));w(S)}},[]),s=P.useCallback(g=>{const{edges:k=[],setEdges:h,hasDefaultEdges:y,onEdgesChange:w}=t.getState(),v=typeof g=="function"?g(k):g;if(y)h(v);else if(w){const _=v.length===0?k.map(S=>({type:"remove",id:S.id})):v.map(S=>({item:S,type:"reset"}));w(_)}},[]),a=P.useCallback(g=>{const k=Array.isArray(g)?g:[g],{getNodes:h,setNodes:y,hasDefaultNodes:w,onNodesChange:v}=t.getState();if(w){const S=[...h(),...k];y(S)}else if(v){const _=k.map(S=>({item:S,type:"add"}));v(_)}},[]),u=P.useCallback(g=>{const k=Array.isArray(g)?g:[g],{edges:h=[],setEdges:y,hasDefaultEdges:w,onEdgesChange:v}=t.getState();if(w)y([...h,...k]);else if(v){const _=k.map(S=>({item:S,type:"add"}));v(_)}},[]),c=P.useCallback(()=>{const{getNodes:g,edges:k=[],transform:h}=t.getState(),[y,w,v]=h;return{nodes:g().map(_=>({..._})),edges:k.map(_=>({..._})),viewport:{x:y,y:w,zoom:v}}},[]),f=P.useCallback(({nodes:g,edges:k})=>{const{nodeInternals:h,getNodes:y,edges:w,hasDefaultNodes:v,hasDefaultEdges:_,onNodesDelete:S,onEdgesDelete:N,onNodesChange:A,onEdgesChange:L}=t.getState(),b=(g||[]).map(F=>F.id),M=(k||[]).map(F=>F.id),z=y().reduce((F,I)=>{const $=I.parentNode||I.parentId,R=!b.includes(I.id)&&$&&F.find(x=>x.id===$);return(typeof I.deletable=="boolean"?I.deletable:!0)&&(b.includes(I.id)||R)&&F.push(I),F},[]),B=w.filter(F=>typeof F.deletable=="boolean"?F.deletable:!0),E=B.filter(F=>M.includes(F.id));if(z||E){const F=ha(z,B),I=[...E,...F],$=I.reduce((R,T)=>(R.includes(T.id)||R.push(T.id),R),[]);if((_||v)&&(_&&t.setState({edges:w.filter(R=>!$.includes(R.id))}),v&&(z.forEach(R=>{h.delete(R.id)}),t.setState({nodeInternals:new Map(h)}))),$.length>0&&(N==null||N(I),L&&L($.map(R=>({id:R,type:"remove"})))),z.length>0&&(S==null||S(z),A)){const R=z.map(T=>({id:T.id,type:"remove"}));A(R)}}},[]),d=P.useCallback(g=>{const k=j2(g),h=k?null:t.getState().nodeInternals.get(g.id);return!k&&!h?[null,null,k]:[k?g:Th(h),h,k]},[]),p=P.useCallback((g,k=!0,h)=>{const[y,w,v]=d(g);return y?(h||t.getState().getNodes()).filter(_=>{if(!v&&(_.id===w.id||!_.positionAbsolute))return!1;const S=Th(_),N=Bc(S,y);return k&&N>0||N>=y.width*y.height}):[]},[]),m=P.useCallback((g,k,h=!0)=>{const[y]=d(g);if(!y)return!1;const w=Bc(y,k);return h&&w>0||w>=y.width*y.height},[]);return P.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:i,getEdge:o,setNodes:l,setEdges:s,addNodes:a,addEdges:u,toObject:c,deleteElements:f,getIntersectingNodes:p,isNodeIntersecting:m}),[e,n,r,i,o,l,s,a,u,c,f,p,m])}const vP={actInsideInputWithModifier:!1};var kP=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=Ve(),{deleteElements:r}=Cd(),i=Go(e,vP),o=Go(t);P.useEffect(()=>{if(i){const{edges:l,getNodes:s}=n.getState(),a=s().filter(c=>c.selected),u=l.filter(c=>c.selected);r({nodes:a,edges:u}),n.setState({nodesSelectionActive:!1})}},[i]),P.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])};function SP(e){const t=Ve();P.useEffect(()=>{let n;const r=()=>{var o,l;if(!e.current)return;const i=md(e.current);(i.height===0||i.width===0)&&((l=(o=t.getState()).onError)==null||l.call(o,"004",Fn.error004())),t.setState({width:i.width||500,height:i.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const bd={position:"absolute",width:"100%",height:"100%",top:0,left:0},EP=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Il=e=>({x:e.x,y:e.y,zoom:e.k}),Gr=(e,t)=>e.target.closest(`.${t}`),$h=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),jh=e=>{const t=e.ctrlKey&&Is()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},CP=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),bP=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:i=!0,zoomOnPinch:o=!0,panOnScroll:l=!1,panOnScrollSpeed:s=.5,panOnScrollMode:a=nr.Free,zoomOnDoubleClick:u=!0,elementsSelectable:c,panOnDrag:f=!0,defaultViewport:d,translateExtent:p,minZoom:m,maxZoom:g,zoomActivationKeyCode:k,preventScrolling:h=!0,children:y,noWheelClassName:w,noPanClassName:v})=>{const _=P.useRef(),S=Ve(),N=P.useRef(!1),A=P.useRef(!1),L=P.useRef(null),b=P.useRef({x:0,y:0,zoom:0}),{d3Zoom:M,d3Selection:z,d3ZoomHandler:B,userSelectionActive:E}=Pe(CP,Ye),F=Go(k),I=P.useRef(0),$=P.useRef(!1),R=P.useRef();return SP(L),P.useEffect(()=>{if(L.current){const T=L.current.getBoundingClientRect(),x=e1().scaleExtent([m,g]).translateExtent(p),j=Ft(L.current).call(x),V=An.translate(d.x,d.y).scale(Ri(d.zoom,m,g)),C=[[0,0],[T.width,T.height]],G=x.constrain()(V,C,p);x.transform(j,G),x.wheelDelta(jh),S.setState({d3Zoom:x,d3Selection:j,d3ZoomHandler:j.on("wheel.zoom"),transform:[G.x,G.y,G.k],domNode:L.current.closest(".react-flow")})}},[]),P.useEffect(()=>{z&&M&&(l&&!F&&!E?z.on("wheel.zoom",T=>{if(Gr(T,w))return!1;T.preventDefault(),T.stopImmediatePropagation();const x=z.property("__zoom").k||1;if(T.ctrlKey&&o){const K=Qt(T),X=jh(T),Y=x*Math.pow(2,X);M.scaleTo(z,Y,K,T);return}const j=T.deltaMode===1?20:1;let V=a===nr.Vertical?0:T.deltaX*j,C=a===nr.Horizontal?0:T.deltaY*j;!Is()&&T.shiftKey&&a!==nr.Vertical&&(V=T.deltaY*j,C=0),M.translateBy(z,-(V/x)*s,-(C/x)*s,{internal:!0});const G=Il(z.property("__zoom")),{onViewportChangeStart:J,onViewportChange:O,onViewportChangeEnd:H}=S.getState();clearTimeout(R.current),$.current||($.current=!0,t==null||t(T,G),J==null||J(G)),$.current&&(e==null||e(T,G),O==null||O(G),R.current=setTimeout(()=>{n==null||n(T,G),H==null||H(G),$.current=!1},150))},{passive:!1}):typeof B<"u"&&z.on("wheel.zoom",function(T,x){if(!h&&T.type==="wheel"&&!T.ctrlKey||Gr(T,w))return null;T.preventDefault(),B.call(this,T,x)},{passive:!1}))},[E,l,a,z,M,B,F,o,h,w,t,e,n]),P.useEffect(()=>{M&&M.on("start",T=>{var V,C;if(!T.sourceEvent||T.sourceEvent.internal)return null;I.current=(V=T.sourceEvent)==null?void 0:V.button;const{onViewportChangeStart:x}=S.getState(),j=Il(T.transform);N.current=!0,b.current=j,((C=T.sourceEvent)==null?void 0:C.type)==="mousedown"&&S.setState({paneDragging:!0}),x==null||x(j),t==null||t(T.sourceEvent,j)})},[M,t]),P.useEffect(()=>{M&&(E&&!N.current?M.on("zoom",null):E||M.on("zoom",T=>{var j;const{onViewportChange:x}=S.getState();if(S.setState({transform:[T.transform.x,T.transform.y,T.transform.k]}),A.current=!!(r&&$h(f,I.current??0)),(e||x)&&!((j=T.sourceEvent)!=null&&j.internal)){const V=Il(T.transform);x==null||x(V),e==null||e(T.sourceEvent,V)}}))},[E,M,e,f,r]),P.useEffect(()=>{M&&M.on("end",T=>{if(!T.sourceEvent||T.sourceEvent.internal)return null;const{onViewportChangeEnd:x}=S.getState();if(N.current=!1,S.setState({paneDragging:!1}),r&&$h(f,I.current??0)&&!A.current&&r(T.sourceEvent),A.current=!1,(n||x)&&EP(b.current,T.transform)){const j=Il(T.transform);b.current=j,clearTimeout(_.current),_.current=setTimeout(()=>{x==null||x(j),n==null||n(T.sourceEvent,j)},l?150:0)}})},[M,l,f,n,r]),P.useEffect(()=>{M&&M.filter(T=>{const x=F||i,j=o&&T.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&T.button===1&&T.type==="mousedown"&&(Gr(T,"react-flow__node")||Gr(T,"react-flow__edge")))return!0;if(!f&&!x&&!l&&!u&&!o||E||!u&&T.type==="dblclick"||Gr(T,w)&&T.type==="wheel"||Gr(T,v)&&(T.type!=="wheel"||l&&T.type==="wheel"&&!F)||!o&&T.ctrlKey&&T.type==="wheel"||!x&&!l&&!j&&T.type==="wheel"||!f&&(T.type==="mousedown"||T.type==="touchstart")||Array.isArray(f)&&!f.includes(T.button)&&T.type==="mousedown")return!1;const V=Array.isArray(f)&&f.includes(T.button)||!T.button||T.button<=1;return(!T.ctrlKey||T.type==="wheel")&&V})},[E,M,i,o,l,u,f,c,F]),U.createElement("div",{className:"react-flow__renderer",ref:L,style:bd},y)},PP=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function _P(){const{userSelectionActive:e,userSelectionRect:t}=Pe(PP,Ye);return e&&t?U.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function Bh(e,t){const n=t.parentNode||t.parentId,r=e.find(i=>i.id===n);if(r){const i=t.position.x+t.width-r.width,o=t.position.y+t.height-r.height;if(i>0||o>0||t.position.x<0||t.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,i>0&&(r.style.width+=i),o>0&&(r.style.height+=o),t.position.x<0){const l=Math.abs(t.position.x);r.position.x=r.position.x-l,r.style.width+=l,t.position.x=0}if(t.position.y<0){const l=Math.abs(t.position.y);r.position.y=r.position.y-l,r.style.height+=l,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function A1(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,i)=>{const o=e.filter(s=>s.id===i.id);if(o.length===0)return r.push(i),r;const l={...i};for(const s of o)if(s)switch(s.type){case"select":{l.selected=s.selected;break}case"position":{typeof s.position<"u"&&(l.position=s.position),typeof s.positionAbsolute<"u"&&(l.positionAbsolute=s.positionAbsolute),typeof s.dragging<"u"&&(l.dragging=s.dragging),l.expandParent&&Bh(r,l);break}case"dimensions":{typeof s.dimensions<"u"&&(l.width=s.dimensions.width,l.height=s.dimensions.height),typeof s.updateStyle<"u"&&(l.style={...l.style||{},...s.dimensions}),typeof s.resizing=="boolean"&&(l.resizing=s.resizing),l.expandParent&&Bh(r,l);break}case"remove":return r}return r.push(l),r},n)}function D1(e,t){return A1(e,t)}function L1(e,t){return A1(e,t)}const Gn=(e,t)=>({id:e,type:"select",selected:t});function fi(e,t){return e.reduce((n,r)=>{const i=t.includes(r.id);return!r.selected&&i?(r.selected=!0,n.push(Gn(r.id,!0))):r.selected&&!i&&(r.selected=!1,n.push(Gn(r.id,!1))),n},[])}const mu=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},NP=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),M1=P.memo(({isSelecting:e,selectionMode:t=Xo.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:i,onPaneClick:o,onPaneContextMenu:l,onPaneScroll:s,onPaneMouseEnter:a,onPaneMouseMove:u,onPaneMouseLeave:c,children:f})=>{const d=P.useRef(null),p=Ve(),m=P.useRef(0),g=P.useRef(0),k=P.useRef(),{userSelectionActive:h,elementsSelectable:y,dragging:w}=Pe(NP,Ye),v=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),m.current=0,g.current=0},_=B=>{o==null||o(B),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},S=B=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){B.preventDefault();return}l==null||l(B)},N=s?B=>s(B):void 0,A=B=>{const{resetSelectedElements:E,domNode:F}=p.getState();if(k.current=F==null?void 0:F.getBoundingClientRect(),!y||!e||B.button!==0||B.target!==d.current||!k.current)return;const{x:I,y:$}=fr(B,k.current);E(),p.setState({userSelectionRect:{width:0,height:0,startX:I,startY:$,x:I,y:$}}),r==null||r(B)},L=B=>{const{userSelectionRect:E,nodeInternals:F,edges:I,transform:$,onNodesChange:R,onEdgesChange:T,nodeOrigin:x,getNodes:j}=p.getState();if(!e||!k.current||!E)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const V=fr(B,k.current),C=E.startX??0,G=E.startY??0,J={...E,x:V.x<C?V.x:C,y:V.y<G?V.y:G,width:Math.abs(V.x-C),height:Math.abs(V.y-G)},O=j(),H=p1(F,J,$,t===Xo.Partial,!0,x),K=ha(H,I).map(Y=>Y.id),X=H.map(Y=>Y.id);if(m.current!==X.length){m.current=X.length;const Y=fi(O,X);Y.length&&(R==null||R(Y))}if(g.current!==K.length){g.current=K.length;const Y=fi(I,K);Y.length&&(T==null||T(Y))}p.setState({userSelectionRect:J})},b=B=>{if(B.button!==0)return;const{userSelectionRect:E}=p.getState();!h&&E&&B.target===d.current&&(_==null||_(B)),p.setState({nodesSelectionActive:m.current>0}),v(),i==null||i(B)},M=B=>{h&&(p.setState({nodesSelectionActive:m.current>0}),i==null||i(B)),v()},z=y&&(e||h);return U.createElement("div",{className:tt(["react-flow__pane",{dragging:w,selection:e}]),onClick:z?void 0:mu(_,d),onContextMenu:mu(S,d),onWheel:mu(N,d),onMouseEnter:z?void 0:a,onMouseDown:z?A:void 0,onMouseMove:z?L:u,onMouseUp:z?b:void 0,onMouseLeave:z?M:c,ref:d,style:bd},f,U.createElement(_P,null))});M1.displayName="Pane";function R1(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return r?r.selected?!0:R1(r,t):!1}function Hh(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function TP(e,t,n,r){return Array.from(e.values()).filter(i=>(i.selected||i.id===r)&&(!i.parentNode||i.parentId||!R1(i,e))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>{var o,l;return{id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((o=i.positionAbsolute)==null?void 0:o.x)??0),y:n.y-(((l=i.positionAbsolute)==null?void 0:l.y)??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode||i.parentId,parentId:i.parentNode||i.parentId,width:i.width,height:i.height,expandParent:i.expandParent}})}function AP(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function I1(e,t,n,r,i=[0,0],o){const l=AP(e,e.extent||r);let s=l;const a=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(a&&e.width&&e.height){const f=n.get(a),{x:d,y:p}=Lr(f,i).positionAbsolute;s=f&&zt(d)&&zt(p)&&zt(f.width)&&zt(f.height)?[[d+e.width*i[0],p+e.height*i[1]],[d+f.width-e.width+e.width*i[0],p+f.height-e.height+e.height*i[1]]]:s}else o==null||o("005",Fn.error005()),s=l;else if(e.extent&&a&&e.extent!=="parent"){const f=n.get(a),{x:d,y:p}=Lr(f,i).positionAbsolute;s=[[e.extent[0][0]+d,e.extent[0][1]+p],[e.extent[1][0]+d,e.extent[1][1]+p]]}let u={x:0,y:0};if(a){const f=n.get(a);u=Lr(f,i).positionAbsolute}const c=s&&s!=="parent"?gd(t,s):t;return{position:{x:c.x-u.x,y:c.y-u.y},positionAbsolute:c}}function gu({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(i=>({...n.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[e?r.find(i=>i.id===e):r[0],r]}const Uh=(e,t,n,r)=>{const i=t.querySelectorAll(e);if(!i||!i.length)return null;const o=Array.from(i),l=t.getBoundingClientRect(),s={x:l.width*r[0],y:l.height*r[1]};return o.map(a=>{const u=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),position:a.getAttribute("data-handlepos"),x:(u.left-l.left-s.x)/n,y:(u.top-l.top-s.y)/n,...md(a)}})};function no(e,t,n){return n===void 0?n:r=>{const i=t().nodeInternals.get(e);i&&n(r,{...i})}}function Kc({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:l,nodeInternals:s,onError:a}=t.getState(),u=s.get(e);if(!u){a==null||a("012",Fn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(o({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):i([e])}function DP(){const e=Ve();return P.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:i,snapToGrid:o}=e.getState(),l=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,a={x:(l-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:o?i[0]*Math.round(a.x/i[0]):a.x,ySnapped:o?i[1]*Math.round(a.y/i[1]):a.y,...a}},[])}function yu(e){return(t,n,r)=>e==null?void 0:e(t,r)}function F1({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,selectNodesOnDrag:l}){const s=Ve(),[a,u]=P.useState(!1),c=P.useRef([]),f=P.useRef({x:null,y:null}),d=P.useRef(0),p=P.useRef(null),m=P.useRef({x:0,y:0}),g=P.useRef(null),k=P.useRef(!1),h=P.useRef(!1),y=P.useRef(!1),w=DP();return P.useEffect(()=>{if(e!=null&&e.current){const v=Ft(e.current),_=({x:A,y:L})=>{const{nodeInternals:b,onNodeDrag:M,onSelectionDrag:z,updateNodePositions:B,nodeExtent:E,snapGrid:F,snapToGrid:I,nodeOrigin:$,onError:R}=s.getState();f.current={x:A,y:L};let T=!1,x={x:0,y:0,x2:0,y2:0};if(c.current.length>1&&E){const V=pa(c.current,$);x=Ko(V)}if(c.current=c.current.map(V=>{const C={x:A-V.distance.x,y:L-V.distance.y};I&&(C.x=F[0]*Math.round(C.x/F[0]),C.y=F[1]*Math.round(C.y/F[1]));const G=[[E[0][0],E[0][1]],[E[1][0],E[1][1]]];c.current.length>1&&E&&!V.extent&&(G[0][0]=V.positionAbsolute.x-x.x+E[0][0],G[1][0]=V.positionAbsolute.x+(V.width??0)-x.x2+E[1][0],G[0][1]=V.positionAbsolute.y-x.y+E[0][1],G[1][1]=V.positionAbsolute.y+(V.height??0)-x.y2+E[1][1]);const J=I1(V,C,b,G,$,R);return T=T||V.position.x!==J.position.x||V.position.y!==J.position.y,V.position=J.position,V.positionAbsolute=J.positionAbsolute,V}),!T)return;B(c.current,!0,!0),u(!0);const j=i?M:yu(z);if(j&&g.current){const[V,C]=gu({nodeId:i,dragItems:c.current,nodeInternals:b});j(g.current,V,C)}},S=()=>{if(!p.current)return;const[A,L]=n1(m.current,p.current);if(A!==0||L!==0){const{transform:b,panBy:M}=s.getState();f.current.x=(f.current.x??0)-A/b[2],f.current.y=(f.current.y??0)-L/b[2],M({x:A,y:L})&&_(f.current)}d.current=requestAnimationFrame(S)},N=A=>{var $;const{nodeInternals:L,multiSelectionActive:b,nodesDraggable:M,unselectNodesAndEdges:z,onNodeDragStart:B,onSelectionDragStart:E}=s.getState();h.current=!0;const F=i?B:yu(E);(!l||!o)&&!b&&i&&(($=L.get(i))!=null&&$.selected||z()),i&&o&&l&&Kc({id:i,store:s,nodeRef:e});const I=w(A);if(f.current=I,c.current=TP(L,M,I,i),F&&c.current){const[R,T]=gu({nodeId:i,dragItems:c.current,nodeInternals:L});F(A.sourceEvent,R,T)}};if(t)v.on(".drag",null);else{const A=VC().on("start",L=>{const{domNode:b,nodeDragThreshold:M}=s.getState();M===0&&N(L),y.current=!1;const z=w(L);f.current=z,p.current=(b==null?void 0:b.getBoundingClientRect())||null,m.current=fr(L.sourceEvent,p.current)}).on("drag",L=>{var B,E;const b=w(L),{autoPanOnNodeDrag:M,nodeDragThreshold:z}=s.getState();if(L.sourceEvent.type==="touchmove"&&L.sourceEvent.touches.length>1&&(y.current=!0),!y.current){if(!k.current&&h.current&&M&&(k.current=!0,S()),!h.current){const F=b.xSnapped-(((B=f==null?void 0:f.current)==null?void 0:B.x)??0),I=b.ySnapped-(((E=f==null?void 0:f.current)==null?void 0:E.y)??0);Math.sqrt(F*F+I*I)>z&&N(L)}(f.current.x!==b.xSnapped||f.current.y!==b.ySnapped)&&c.current&&h.current&&(g.current=L.sourceEvent,m.current=fr(L.sourceEvent,p.current),_(b))}}).on("end",L=>{if(!(!h.current||y.current)&&(u(!1),k.current=!1,h.current=!1,cancelAnimationFrame(d.current),c.current)){const{updateNodePositions:b,nodeInternals:M,onNodeDragStop:z,onSelectionDragStop:B}=s.getState(),E=i?z:yu(B);if(b(c.current,!1,!1),E){const[F,I]=gu({nodeId:i,dragItems:c.current,nodeInternals:M});E(L.sourceEvent,F,I)}}}).filter(L=>{const b=L.target;return!L.button&&(!n||!Hh(b,`.${n}`,e))&&(!r||Hh(b,r,e))});return v.call(A),()=>{v.on(".drag",null)}}}},[e,t,n,r,o,s,i,l,w]),a}function O1(){const e=Ve();return P.useCallback(n=>{const{nodeInternals:r,nodeExtent:i,updateNodePositions:o,getNodes:l,snapToGrid:s,snapGrid:a,onError:u,nodesDraggable:c}=e.getState(),f=l().filter(y=>y.selected&&(y.draggable||c&&typeof y.draggable>"u")),d=s?a[0]:5,p=s?a[1]:5,m=n.isShiftPressed?4:1,g=n.x*d*m,k=n.y*p*m,h=f.map(y=>{if(y.positionAbsolute){const w={x:y.positionAbsolute.x+g,y:y.positionAbsolute.y+k};s&&(w.x=a[0]*Math.round(w.x/a[0]),w.y=a[1]*Math.round(w.y/a[1]));const{positionAbsolute:v,position:_}=I1(y,w,r,i,void 0,u);y.position=_,y.positionAbsolute=v}return y});o(h,!0,!1)},[])}const ki={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var ro=e=>{const t=({id:n,type:r,data:i,xPos:o,yPos:l,xPosOrigin:s,yPosOrigin:a,selected:u,onClick:c,onMouseEnter:f,onMouseMove:d,onMouseLeave:p,onContextMenu:m,onDoubleClick:g,style:k,className:h,isDraggable:y,isSelectable:w,isConnectable:v,isFocusable:_,selectNodesOnDrag:S,sourcePosition:N,targetPosition:A,hidden:L,resizeObserver:b,dragHandle:M,zIndex:z,isParent:B,noDragClassName:E,noPanClassName:F,initialized:I,disableKeyboardA11y:$,ariaLabel:R,rfId:T,hasHandleBounds:x})=>{const j=Ve(),V=P.useRef(null),C=P.useRef(null),G=P.useRef(N),J=P.useRef(A),O=P.useRef(r),H=w||y||c||f||d||p,K=O1(),X=no(n,j.getState,f),Y=no(n,j.getState,d),ee=no(n,j.getState,p),ne=no(n,j.getState,m),fe=no(n,j.getState,g),de=ae=>{const{nodeDragThreshold:re}=j.getState();if(w&&(!S||!y||re>0)&&Kc({id:n,store:j,nodeRef:V}),c){const _e=j.getState().nodeInternals.get(n);_e&&c(ae,{..._e})}},se=ae=>{if(!Hc(ae)&&!$)if(l1.includes(ae.key)&&w){const re=ae.key==="Escape";Kc({id:n,store:j,unselect:re,nodeRef:V})}else y&&u&&Object.prototype.hasOwnProperty.call(ki,ae.key)&&(j.setState({ariaLiveMessage:`Moved selected node ${ae.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~o}, y: ${~~l}`}),K({x:ki[ae.key].x,y:ki[ae.key].y,isShiftPressed:ae.shiftKey}))};P.useEffect(()=>()=>{C.current&&(b==null||b.unobserve(C.current),C.current=null)},[]),P.useEffect(()=>{if(V.current&&!L){const ae=V.current;(!I||!x||C.current!==ae)&&(C.current&&(b==null||b.unobserve(C.current)),b==null||b.observe(ae),C.current=ae)}},[L,I,x]),P.useEffect(()=>{const ae=O.current!==r,re=G.current!==N,_e=J.current!==A;V.current&&(ae||re||_e)&&(ae&&(O.current=r),re&&(G.current=N),_e&&(J.current=A),j.getState().updateNodeDimensions([{id:n,nodeElement:V.current,forceUpdate:!0}]))},[n,r,N,A]);const ce=F1({nodeRef:V,disabled:L||!y,noDragClassName:E,handleSelector:M,nodeId:n,isSelectable:w,selectNodesOnDrag:S});return L?null:U.createElement("div",{className:tt(["react-flow__node",`react-flow__node-${r}`,{[F]:y},h,{selected:u,selectable:w,parent:B,dragging:ce}]),ref:V,style:{zIndex:z,transform:`translate(${s}px,${a}px)`,pointerEvents:H?"all":"none",visibility:I?"visible":"hidden",...k},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:X,onMouseMove:Y,onMouseLeave:ee,onContextMenu:ne,onClick:de,onDoubleClick:fe,onKeyDown:_?se:void 0,tabIndex:_?0:void 0,role:_?"button":void 0,"aria-describedby":$?void 0:`${b1}-${T}`,"aria-label":R},U.createElement(K2,{value:n},U.createElement(e,{id:n,data:i,type:r,xPos:o,yPos:l,selected:u,isConnectable:v,sourcePosition:N,targetPosition:A,dragging:ce,dragHandle:M,zIndex:z})))};return t.displayName="NodeWrapper",P.memo(t)};const LP=e=>{const t=e.getNodes().filter(n=>n.selected);return{...pa(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function MP({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ve(),{width:i,height:o,x:l,y:s,transformString:a,userSelectionActive:u}=Pe(LP,Ye),c=O1(),f=P.useRef(null);if(P.useEffect(()=>{var m;n||(m=f.current)==null||m.focus({preventScroll:!0})},[n]),F1({nodeRef:f}),u||!i||!o)return null;const d=e?m=>{const g=r.getState().getNodes().filter(k=>k.selected);e(m,g)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(ki,m.key)&&c({x:ki[m.key].x,y:ki[m.key].y,isShiftPressed:m.shiftKey})};return U.createElement("div",{className:tt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:a}},U.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:i,height:o,top:s,left:l}}))}var RP=P.memo(MP);const IP=e=>e.nodesSelectionActive,z1=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:l,deleteKeyCode:s,onMove:a,onMoveStart:u,onMoveEnd:c,selectionKeyCode:f,selectionOnDrag:d,selectionMode:p,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:k,panActivationKeyCode:h,zoomActivationKeyCode:y,elementsSelectable:w,zoomOnScroll:v,zoomOnPinch:_,panOnScroll:S,panOnScrollSpeed:N,panOnScrollMode:A,zoomOnDoubleClick:L,panOnDrag:b,defaultViewport:M,translateExtent:z,minZoom:B,maxZoom:E,preventScrolling:F,onSelectionContextMenu:I,noWheelClassName:$,noPanClassName:R,disableKeyboardA11y:T})=>{const x=Pe(IP),j=Go(f),V=Go(h),C=V||b,G=V||S,J=j||d&&C!==!0;return kP({deleteKeyCode:s,multiSelectionKeyCode:k}),U.createElement(bP,{onMove:a,onMoveStart:u,onMoveEnd:c,onPaneContextMenu:o,elementsSelectable:w,zoomOnScroll:v,zoomOnPinch:_,panOnScroll:G,panOnScrollSpeed:N,panOnScrollMode:A,zoomOnDoubleClick:L,panOnDrag:!j&&C,defaultViewport:M,translateExtent:z,minZoom:B,maxZoom:E,zoomActivationKeyCode:y,preventScrolling:F,noWheelClassName:$,noPanClassName:R},U.createElement(M1,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:l,panOnDrag:C,isSelecting:!!J,selectionMode:p},e,x&&U.createElement(RP,{onSelectionContextMenu:I,noPanClassName:R,disableKeyboardA11y:T})))};z1.displayName="FlowRenderer";var FP=P.memo(z1);function OP(e){return Pe(P.useCallback(n=>e?p1(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function zP(e){const t={input:ro(e.input||k1),default:ro(e.default||qc),output:ro(e.output||E1),group:ro(e.group||Ed)},n={},r=Object.keys(e).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,o)=>(i[o]=ro(e[o]||qc),i),n);return{...t,...r}}const $P=({x:e,y:t,width:n,height:r,origin:i})=>!n||!r?{x:e,y:t}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-n*i[0],y:t-r*i[1]},jP=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),$1=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,updateNodeDimensions:o,onError:l}=Pe(jP,Ye),s=OP(e.onlyRenderVisibleElements),a=P.useRef(),u=P.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(f=>{const d=f.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));o(d)});return a.current=c,c},[]);return P.useEffect(()=>()=>{var c;(c=a==null?void 0:a.current)==null||c.disconnect()},[]),U.createElement("div",{className:"react-flow__nodes",style:bd},s.map(c=>{var _,S,N;let f=c.type||"default";e.nodeTypes[f]||(l==null||l("003",Fn.error003(f)),f="default");const d=e.nodeTypes[f]||e.nodeTypes.default,p=!!(c.draggable||t&&typeof c.draggable>"u"),m=!!(c.selectable||i&&typeof c.selectable>"u"),g=!!(c.connectable||n&&typeof c.connectable>"u"),k=!!(c.focusable||r&&typeof c.focusable>"u"),h=e.nodeExtent?gd(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,y=(h==null?void 0:h.x)??0,w=(h==null?void 0:h.y)??0,v=$P({x:y,y:w,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return U.createElement(d,{key:c.id,id:c.id,className:c.className,style:c.style,type:f,data:c.data,sourcePosition:c.sourcePosition||oe.Bottom,targetPosition:c.targetPosition||oe.Top,hidden:c.hidden,xPos:y,yPos:w,xPosOrigin:v.x,yPosOrigin:v.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!c.selected,isDraggable:p,isSelectable:m,isConnectable:g,isFocusable:k,resizeObserver:u,dragHandle:c.dragHandle,zIndex:((_=c[$e])==null?void 0:_.z)??0,isParent:!!((S=c[$e])!=null&&S.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel,hasHandleBounds:!!((N=c[$e])!=null&&N.handleBounds)})}))};$1.displayName="NodeRenderer";var BP=P.memo($1);const HP=(e,t,n)=>n===oe.Left?e-t:n===oe.Right?e+t:e,UP=(e,t,n)=>n===oe.Top?e-t:n===oe.Bottom?e+t:e,Vh="react-flow__edgeupdater",Wh=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:l,type:s})=>U.createElement("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:l,className:tt([Vh,`${Vh}-${s}`]),cx:HP(t,r,e),cy:UP(n,r,e),r,stroke:"transparent",fill:"transparent"}),VP=()=>!0;var Qr=e=>{const t=({id:n,className:r,type:i,data:o,onClick:l,onEdgeDoubleClick:s,selected:a,animated:u,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:k,source:h,target:y,sourceX:w,sourceY:v,targetX:_,targetY:S,sourcePosition:N,targetPosition:A,elementsSelectable:L,hidden:b,sourceHandleId:M,targetHandleId:z,onContextMenu:B,onMouseEnter:E,onMouseMove:F,onMouseLeave:I,reconnectRadius:$,onReconnect:R,onReconnectStart:T,onReconnectEnd:x,markerEnd:j,markerStart:V,rfId:C,ariaLabel:G,isFocusable:J,isReconnectable:O,pathOptions:H,interactionWidth:K,disableKeyboardA11y:X})=>{const Y=P.useRef(null),[ee,ne]=P.useState(!1),[fe,de]=P.useState(!1),se=Ve(),ce=P.useMemo(()=>`url('#${Vc(V,C)}')`,[V,C]),ae=P.useMemo(()=>`url('#${Vc(j,C)}')`,[j,C]);if(b)return null;const re=pe=>{var Se;const{edges:Re,addSelectedEdges:nt,unselectNodesAndEdges:Ge,multiSelectionActive:St}=se.getState(),ut=Re.find(vn=>vn.id===n);ut&&(L&&(se.setState({nodesSelectionActive:!1}),ut.selected&&St?(Ge({nodes:[],edges:[ut]}),(Se=Y.current)==null||Se.blur()):nt([n])),l&&l(pe,ut))},_e=to(n,se.getState,s),at=to(n,se.getState,B),$n=to(n,se.getState,E),jn=to(n,se.getState,F),Bn=to(n,se.getState,I),qt=(pe,Re)=>{if(pe.button!==0)return;const{edges:nt,isValidConnection:Ge}=se.getState(),St=Re?y:h,ut=(Re?z:M)||null,Se=Re?"target":"source",vn=Ge||VP,Et=Re,Vi=nt.find(xr=>xr.id===n);de(!0),T==null||T(pe,Vi,Se);const Ia=xr=>{de(!1),x==null||x(xr,Vi,Se)};y1({event:pe,handleId:ut,nodeId:St,onConnect:xr=>R==null?void 0:R(Vi,xr),isTarget:Et,getState:se.getState,setState:se.setState,isValidConnection:vn,edgeUpdaterType:Se,onReconnectEnd:Ia})},Hn=pe=>qt(pe,!0),xn=pe=>qt(pe,!1),q=()=>ne(!0),te=()=>ne(!1),le=!L&&!l,xe=pe=>{var Re;if(!X&&l1.includes(pe.key)&&L){const{unselectNodesAndEdges:nt,addSelectedEdges:Ge,edges:St}=se.getState();pe.key==="Escape"?((Re=Y.current)==null||Re.blur(),nt({edges:[St.find(Se=>Se.id===n)]})):Ge([n])}};return U.createElement("g",{className:tt(["react-flow__edge",`react-flow__edge-${i}`,r,{selected:a,animated:u,inactive:le,updating:ee}]),onClick:re,onDoubleClick:_e,onContextMenu:at,onMouseEnter:$n,onMouseMove:jn,onMouseLeave:Bn,onKeyDown:J?xe:void 0,tabIndex:J?0:void 0,role:J?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":G===null?void 0:G||`Edge from ${h} to ${y}`,"aria-describedby":J?`${P1}-${C}`:void 0,ref:Y},!fe&&U.createElement(e,{id:n,source:h,target:y,selected:a,animated:u,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,data:o,style:k,sourceX:w,sourceY:v,targetX:_,targetY:S,sourcePosition:N,targetPosition:A,sourceHandleId:M,targetHandleId:z,markerStart:ce,markerEnd:ae,pathOptions:H,interactionWidth:K}),O&&U.createElement(U.Fragment,null,(O==="source"||O===!0)&&U.createElement(Wh,{position:N,centerX:w,centerY:v,radius:$,onMouseDown:Hn,onMouseEnter:q,onMouseOut:te,type:"source"}),(O==="target"||O===!0)&&U.createElement(Wh,{position:A,centerX:_,centerY:S,radius:$,onMouseDown:xn,onMouseEnter:q,onMouseOut:te,type:"target"})))};return t.displayName="EdgeWrapper",P.memo(t)};function WP(e){const t={default:Qr(e.default||Fs),straight:Qr(e.bezier||xd),step:Qr(e.step||wd),smoothstep:Qr(e.step||da),simplebezier:Qr(e.simplebezier||yd)},n={},r=Object.keys(e).filter(i=>!["default","bezier"].includes(i)).reduce((i,o)=>(i[o]=Qr(e[o]||Fs),i),n);return{...t,...r}}function qh(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,i=((n==null?void 0:n.y)||0)+t.y,o=(n==null?void 0:n.width)||t.width,l=(n==null?void 0:n.height)||t.height;switch(e){case oe.Top:return{x:r+o/2,y:i};case oe.Right:return{x:r+o,y:i+l/2};case oe.Bottom:return{x:r+o/2,y:i+l};case oe.Left:return{x:r,y:i+l/2}}}function Kh(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const qP=(e,t,n,r,i,o)=>{const l=qh(n,e,t),s=qh(o,r,i);return{sourceX:l.x,sourceY:l.y,targetX:s.x,targetY:s.y}};function KP({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:o,width:l,height:s,transform:a}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+r,t.y+o)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=Ko({x:(0-a[0])/a[2],y:(0-a[1])/a[2],width:l/a[2],height:s/a[2]}),f=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),d=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(f*d)>0}function Xh(e){var r,i,o,l,s;const t=((r=e==null?void 0:e[$e])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.x)<"u"&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.y)<"u";return[{x:((l=e==null?void 0:e.positionAbsolute)==null?void 0:l.x)||0,y:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}const XP=[{level:0,isMaxLevel:!0,edges:[]}];function YP(e,t,n=!1){let r=-1;const i=e.reduce((l,s)=>{var c,f;const a=zt(s.zIndex);let u=a?s.zIndex:0;if(n){const d=t.get(s.target),p=t.get(s.source),m=s.selected||(d==null?void 0:d.selected)||(p==null?void 0:p.selected),g=Math.max(((c=p==null?void 0:p[$e])==null?void 0:c.z)||0,((f=d==null?void 0:d[$e])==null?void 0:f.z)||0,1e3);u=(a?s.zIndex:0)+(m?g:0)}return l[u]?l[u].push(s):l[u]=[s],r=u>r?u:r,l},{}),o=Object.entries(i).map(([l,s])=>{const a=+l;return{edges:s,level:a,isMaxLevel:a===r}});return o.length===0?XP:o}function GP(e,t,n){const r=Pe(P.useCallback(i=>e?i.edges.filter(o=>{const l=t.get(o.source),s=t.get(o.target);return(l==null?void 0:l.width)&&(l==null?void 0:l.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&KP({sourcePos:l.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:l.width,sourceHeight:l.height,targetWidth:s.width,targetHeight:s.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[e,t]));return YP(r,t,n)}const QP=({color:e="none",strokeWidth:t=1})=>U.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),ZP=({color:e="none",strokeWidth:t=1})=>U.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Yh={[Yo.Arrow]:QP,[Yo.ArrowClosed]:ZP};function JP(e){const t=Ve();return P.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(Yh,e)?Yh[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",Fn.error009(e)),null)},[e])}const e_=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:l,orient:s="auto-start-reverse"})=>{const a=JP(t);return a?U.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:s,refX:"0",refY:"0"},U.createElement(a,{color:n,strokeWidth:l})):null},t_=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((i,o)=>([o.markerStart,o.markerEnd].forEach(l=>{if(l&&typeof l=="object"){const s=Vc(l,t);r.includes(s)||(i.push({id:s,color:l.color||e,...l}),r.push(s))}}),i),[]).sort((i,o)=>i.id.localeCompare(o.id))},j1=({defaultColor:e,rfId:t})=>{const n=Pe(P.useCallback(t_({defaultColor:e,rfId:t}),[e,t]),(r,i)=>!(r.length!==i.length||r.some((o,l)=>o.id!==i[l].id)));return U.createElement("defs",null,n.map(r=>U.createElement(e_,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};j1.displayName="MarkerDefinitions";var n_=P.memo(j1);const r_=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),B1=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:i,noPanClassName:o,onEdgeContextMenu:l,onEdgeMouseEnter:s,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:c,onEdgeDoubleClick:f,onReconnect:d,onReconnectStart:p,onReconnectEnd:m,reconnectRadius:g,children:k,disableKeyboardA11y:h})=>{const{edgesFocusable:y,edgesUpdatable:w,elementsSelectable:v,width:_,height:S,connectionMode:N,nodeInternals:A,onError:L}=Pe(r_,Ye),b=GP(t,A,n);return _?U.createElement(U.Fragment,null,b.map(({level:M,edges:z,isMaxLevel:B})=>U.createElement("svg",{key:M,style:{zIndex:M},width:_,height:S,className:"react-flow__edges react-flow__container"},B&&U.createElement(n_,{defaultColor:e,rfId:r}),U.createElement("g",null,z.map(E=>{const[F,I,$]=Xh(A.get(E.source)),[R,T,x]=Xh(A.get(E.target));if(!$||!x)return null;let j=E.type||"default";i[j]||(L==null||L("011",Fn.error011(j)),j="default");const V=i[j]||i.default,C=N===jr.Strict?T.target:(T.target??[]).concat(T.source??[]),G=Kh(I.source,E.sourceHandle),J=Kh(C,E.targetHandle),O=(G==null?void 0:G.position)||oe.Bottom,H=(J==null?void 0:J.position)||oe.Top,K=!!(E.focusable||y&&typeof E.focusable>"u"),X=E.reconnectable||E.updatable,Y=typeof d<"u"&&(X||w&&typeof X>"u");if(!G||!J)return L==null||L("008",Fn.error008(G,E)),null;const{sourceX:ee,sourceY:ne,targetX:fe,targetY:de}=qP(F,G,O,R,J,H);return U.createElement(V,{key:E.id,id:E.id,className:tt([E.className,o]),type:j,data:E.data,selected:!!E.selected,animated:!!E.animated,hidden:!!E.hidden,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,style:E.style,source:E.source,target:E.target,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerEnd:E.markerEnd,markerStart:E.markerStart,sourceX:ee,sourceY:ne,targetX:fe,targetY:de,sourcePosition:O,targetPosition:H,elementsSelectable:v,onContextMenu:l,onMouseEnter:s,onMouseMove:a,onMouseLeave:u,onClick:c,onEdgeDoubleClick:f,onReconnect:d,onReconnectStart:p,onReconnectEnd:m,reconnectRadius:g,rfId:r,ariaLabel:E.ariaLabel,isFocusable:K,isReconnectable:Y,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth,disableKeyboardA11y:h})})))),k):null};B1.displayName="EdgeRenderer";var i_=P.memo(B1);const o_=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function l_({children:e}){const t=Pe(o_);return U.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function s_(e){const t=Cd(),n=P.useRef(!1);P.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const a_={[oe.Left]:oe.Right,[oe.Right]:oe.Left,[oe.Top]:oe.Bottom,[oe.Bottom]:oe.Top},H1=({nodeId:e,handleType:t,style:n,type:r=Jn.Bezier,CustomComponent:i,connectionStatus:o})=>{var S,N,A;const{fromNode:l,handleId:s,toX:a,toY:u,connectionMode:c}=Pe(P.useCallback(L=>({fromNode:L.nodeInternals.get(e),handleId:L.connectionHandleId,toX:(L.connectionPosition.x-L.transform[0])/L.transform[2],toY:(L.connectionPosition.y-L.transform[1])/L.transform[2],connectionMode:L.connectionMode}),[e]),Ye),f=(S=l==null?void 0:l[$e])==null?void 0:S.handleBounds;let d=f==null?void 0:f[t];if(c===jr.Loose&&(d=d||(f==null?void 0:f[t==="source"?"target":"source"])),!l||!d)return null;const p=s?d.find(L=>L.id===s):d[0],m=p?p.x+p.width/2:(l.width??0)/2,g=p?p.y+p.height/2:l.height??0,k=(((N=l.positionAbsolute)==null?void 0:N.x)??0)+m,h=(((A=l.positionAbsolute)==null?void 0:A.y)??0)+g,y=p==null?void 0:p.position,w=y?a_[y]:null;if(!y||!w)return null;if(i)return U.createElement(i,{connectionLineType:r,connectionLineStyle:n,fromNode:l,fromHandle:p,fromX:k,fromY:h,toX:a,toY:u,fromPosition:y,toPosition:w,connectionStatus:o});let v="";const _={sourceX:k,sourceY:h,sourcePosition:y,targetX:a,targetY:u,targetPosition:w};return r===Jn.Bezier?[v]=vd(_):r===Jn.Step?[v]=Uc({..._,borderRadius:0}):r===Jn.SmoothStep?[v]=Uc(_):r===Jn.SimpleBezier?[v]=c1(_):v=`M${k},${h} ${a},${u}`,U.createElement("path",{d:v,fill:"none",className:"react-flow__connection-path",style:n})};H1.displayName="ConnectionLine";const u_=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function c_({containerStyle:e,style:t,type:n,component:r}){const{nodeId:i,handleType:o,nodesConnectable:l,width:s,height:a,connectionStatus:u}=Pe(u_,Ye);return!(i&&o&&s&&l)?null:U.createElement("svg",{style:e,width:s,height:a,className:"react-flow__edges react-flow__connectionline react-flow__container"},U.createElement("g",{className:tt(["react-flow__connection",u])},U.createElement(H1,{nodeId:i,handleType:o,style:t,type:n,CustomComponent:r,connectionStatus:u})))}function Gh(e,t){return P.useRef(null),Ve(),P.useMemo(()=>t(e),[e])}const U1=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:i,onInit:o,onNodeClick:l,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:p,onSelectionContextMenu:m,onSelectionStart:g,onSelectionEnd:k,connectionLineType:h,connectionLineStyle:y,connectionLineComponent:w,connectionLineContainerStyle:v,selectionKeyCode:_,selectionOnDrag:S,selectionMode:N,multiSelectionKeyCode:A,panActivationKeyCode:L,zoomActivationKeyCode:b,deleteKeyCode:M,onlyRenderVisibleElements:z,elementsSelectable:B,selectNodesOnDrag:E,defaultViewport:F,translateExtent:I,minZoom:$,maxZoom:R,preventScrolling:T,defaultMarkerColor:x,zoomOnScroll:j,zoomOnPinch:V,panOnScroll:C,panOnScrollSpeed:G,panOnScrollMode:J,zoomOnDoubleClick:O,panOnDrag:H,onPaneClick:K,onPaneMouseEnter:X,onPaneMouseMove:Y,onPaneMouseLeave:ee,onPaneScroll:ne,onPaneContextMenu:fe,onEdgeContextMenu:de,onEdgeMouseEnter:se,onEdgeMouseMove:ce,onEdgeMouseLeave:ae,onReconnect:re,onReconnectStart:_e,onReconnectEnd:at,reconnectRadius:$n,noDragClassName:jn,noWheelClassName:Bn,noPanClassName:qt,elevateEdgesOnSelect:Hn,disableKeyboardA11y:xn,nodeOrigin:q,nodeExtent:te,rfId:le})=>{const xe=Gh(e,zP),pe=Gh(t,WP);return s_(o),U.createElement(FP,{onPaneClick:K,onPaneMouseEnter:X,onPaneMouseMove:Y,onPaneMouseLeave:ee,onPaneContextMenu:fe,onPaneScroll:ne,deleteKeyCode:M,selectionKeyCode:_,selectionOnDrag:S,selectionMode:N,onSelectionStart:g,onSelectionEnd:k,multiSelectionKeyCode:A,panActivationKeyCode:L,zoomActivationKeyCode:b,elementsSelectable:B,onMove:n,onMoveStart:r,onMoveEnd:i,zoomOnScroll:j,zoomOnPinch:V,zoomOnDoubleClick:O,panOnScroll:C,panOnScrollSpeed:G,panOnScrollMode:J,panOnDrag:H,defaultViewport:F,translateExtent:I,minZoom:$,maxZoom:R,onSelectionContextMenu:m,preventScrolling:T,noDragClassName:jn,noWheelClassName:Bn,noPanClassName:qt,disableKeyboardA11y:xn},U.createElement(l_,null,U.createElement(i_,{edgeTypes:pe,onEdgeClick:s,onEdgeDoubleClick:u,onlyRenderVisibleElements:z,onEdgeContextMenu:de,onEdgeMouseEnter:se,onEdgeMouseMove:ce,onEdgeMouseLeave:ae,onReconnect:re,onReconnectStart:_e,onReconnectEnd:at,reconnectRadius:$n,defaultMarkerColor:x,noPanClassName:qt,elevateEdgesOnSelect:!!Hn,disableKeyboardA11y:xn,rfId:le},U.createElement(c_,{style:y,type:h,component:w,containerStyle:v})),U.createElement("div",{className:"react-flow__edgelabel-renderer"}),U.createElement(BP,{nodeTypes:xe,onNodeClick:l,onNodeDoubleClick:a,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:p,selectNodesOnDrag:E,onlyRenderVisibleElements:z,noPanClassName:qt,noDragClassName:jn,disableKeyboardA11y:xn,nodeOrigin:q,nodeExtent:te,rfId:le})))};U1.displayName="GraphView";var f_=P.memo(U1);const Xc=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Vn={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Xc,nodeExtent:Xc,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:jr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:B2,isValidConnection:void 0},d_=()=>nE((e,t)=>({...Vn,setNodes:n=>{const{nodeInternals:r,nodeOrigin:i,elevateNodesOnSelect:o}=t();e({nodeInternals:hu(n,r,i,o)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(i=>({...r,...i}))})},setDefaultNodesAndEdges:(n,r)=>{const i=typeof n<"u",o=typeof r<"u",l=i?hu(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:l,edges:o?r:[],hasDefaultNodes:i,hasDefaultEdges:o})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:i,fitViewOnInit:o,fitViewOnInitDone:l,fitViewOnInitOptions:s,domNode:a,nodeOrigin:u}=t(),c=a==null?void 0:a.querySelector(".react-flow__viewport");if(!c)return;const f=window.getComputedStyle(c),{m22:d}=new window.DOMMatrixReadOnly(f.transform),p=n.reduce((g,k)=>{const h=i.get(k.id);if(h!=null&&h.hidden)i.set(h.id,{...h,[$e]:{...h[$e],handleBounds:void 0}});else if(h){const y=md(k.nodeElement);!!(y.width&&y.height&&(h.width!==y.width||h.height!==y.height||k.forceUpdate))&&(i.set(h.id,{...h,[$e]:{...h[$e],handleBounds:{source:Uh(".source",k.nodeElement,d,u),target:Uh(".target",k.nodeElement,d,u)}},...y}),g.push({id:h.id,type:"dimensions",dimensions:y}))}return g},[]);N1(i,u);const m=l||o&&!l&&T1(t,{initial:!0,...s});e({nodeInternals:new Map(i),fitViewOnInitDone:m}),(p==null?void 0:p.length)>0&&(r==null||r(p))},updateNodePositions:(n,r=!0,i=!1)=>{const{triggerNodeChanges:o}=t(),l=n.map(s=>{const a={id:s.id,type:"position",dragging:i};return r&&(a.positionAbsolute=s.positionAbsolute,a.position=s.position),a});o(l)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:i,hasDefaultNodes:o,nodeOrigin:l,getNodes:s,elevateNodesOnSelect:a}=t();if(n!=null&&n.length){if(o){const u=D1(n,s()),c=hu(u,i,l,a);e({nodeInternals:c})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let l,s=null;r?l=n.map(a=>Gn(a,!0)):(l=fi(o(),n),s=fi(i,[])),Rl({changedNodes:l,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let l,s=null;r?l=n.map(a=>Gn(a,!0)):(l=fi(i,n),s=fi(o(),[])),Rl({changedNodes:s,changedEdges:l,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:i,getNodes:o}=t(),l=n||o(),s=r||i,a=l.map(c=>(c.selected=!1,Gn(c.id,!1))),u=s.map(c=>Gn(c.id,!1));Rl({changedNodes:a,changedEdges:u,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:i}=t();r==null||r.scaleExtent([n,i]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:i}=t();r==null||r.scaleExtent([i,n]),e({maxZoom:n})},setTranslateExtent:n=>{var r;(r=t().d3Zoom)==null||r.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),o=r().filter(s=>s.selected).map(s=>Gn(s.id,!1)),l=n.filter(s=>s.selected).map(s=>Gn(s.id,!1));Rl({changedNodes:o,changedEdges:l,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(i=>{i.positionAbsolute=gd(i.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:i,height:o,d3Zoom:l,d3Selection:s,translateExtent:a}=t();if(!l||!s||!n.x&&!n.y)return!1;const u=An.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[i,o]],f=l==null?void 0:l.constrain()(u,c,a);return l.transform(s,f),r[0]!==f.x||r[1]!==f.y||r[2]!==f.k},cancelConnection:()=>e({connectionNodeId:Vn.connectionNodeId,connectionHandleId:Vn.connectionHandleId,connectionHandleType:Vn.connectionHandleType,connectionStatus:Vn.connectionStatus,connectionStartHandle:Vn.connectionStartHandle,connectionEndHandle:Vn.connectionEndHandle}),reset:()=>e({...Vn})}),Object.is),ma=({children:e})=>{const t=P.useRef(null);return t.current||(t.current=d_()),U.createElement(R2,{value:t.current},e)};ma.displayName="ReactFlowProvider";const V1=({children:e})=>P.useContext(fa)?U.createElement(U.Fragment,null,e):U.createElement(ma,null,e);V1.displayName="ReactFlowWrapper";const p_={input:k1,default:qc,output:E1,group:Ed},h_={default:Fs,straight:xd,step:wd,smoothstep:da,simplebezier:yd},m_=[0,0],g_=[15,15],y_={x:0,y:0,zoom:1},w_={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Pd=P.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o=p_,edgeTypes:l=h_,onNodeClick:s,onEdgeClick:a,onInit:u,onMove:c,onMoveStart:f,onMoveEnd:d,onConnect:p,onConnectStart:m,onConnectEnd:g,onClickConnectStart:k,onClickConnectEnd:h,onNodeMouseEnter:y,onNodeMouseMove:w,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:S,onNodeDragStart:N,onNodeDrag:A,onNodeDragStop:L,onNodesDelete:b,onEdgesDelete:M,onSelectionChange:z,onSelectionDragStart:B,onSelectionDrag:E,onSelectionDragStop:F,onSelectionContextMenu:I,onSelectionStart:$,onSelectionEnd:R,connectionMode:T=jr.Strict,connectionLineType:x=Jn.Bezier,connectionLineStyle:j,connectionLineComponent:V,connectionLineContainerStyle:C,deleteKeyCode:G="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:O=!1,selectionMode:H=Xo.Full,panActivationKeyCode:K="Space",multiSelectionKeyCode:X=Is()?"Meta":"Control",zoomActivationKeyCode:Y=Is()?"Meta":"Control",snapToGrid:ee=!1,snapGrid:ne=g_,onlyRenderVisibleElements:fe=!1,selectNodesOnDrag:de=!0,nodesDraggable:se,nodesConnectable:ce,nodesFocusable:ae,nodeOrigin:re=m_,edgesFocusable:_e,edgesUpdatable:at,elementsSelectable:$n,defaultViewport:jn=y_,minZoom:Bn=.5,maxZoom:qt=2,translateExtent:Hn=Xc,preventScrolling:xn=!0,nodeExtent:q,defaultMarkerColor:te="#b1b1b7",zoomOnScroll:le=!0,zoomOnPinch:xe=!0,panOnScroll:pe=!1,panOnScrollSpeed:Re=.5,panOnScrollMode:nt=nr.Free,zoomOnDoubleClick:Ge=!0,panOnDrag:St=!0,onPaneClick:ut,onPaneMouseEnter:Se,onPaneMouseMove:vn,onPaneMouseLeave:Et,onPaneScroll:Vi,onPaneContextMenu:Ia,children:Qd,onEdgeContextMenu:xr,onEdgeDoubleClick:Ox,onEdgeMouseEnter:zx,onEdgeMouseMove:$x,onEdgeMouseLeave:jx,onEdgeUpdate:Bx,onEdgeUpdateStart:Hx,onEdgeUpdateEnd:Ux,onReconnect:Vx,onReconnectStart:Wx,onReconnectEnd:qx,reconnectRadius:Kx=10,edgeUpdaterRadius:Xx=10,onNodesChange:Yx,onEdgesChange:Gx,noDragClassName:Qx="nodrag",noWheelClassName:Zx="nowheel",noPanClassName:Zd="nopan",fitView:Jx=!1,fitViewOptions:ev,connectOnClick:tv=!0,attributionPosition:nv,proOptions:rv,defaultEdgeOptions:iv,elevateNodesOnSelect:ov=!0,elevateEdgesOnSelect:lv=!1,disableKeyboardA11y:Jd=!1,autoPanOnConnect:sv=!0,autoPanOnNodeDrag:av=!0,connectionRadius:uv=20,isValidConnection:cv,onError:fv,style:dv,id:ep,nodeDragThreshold:pv,...hv},mv)=>{const Fa=ep||"1";return U.createElement("div",{...hv,style:{...dv,...w_},ref:mv,className:tt(["react-flow",i]),"data-testid":"rf__wrapper",id:ep},U.createElement(V1,null,U.createElement(f_,{onInit:u,onMove:c,onMoveStart:f,onMoveEnd:d,onNodeClick:s,onEdgeClick:a,onNodeMouseEnter:y,onNodeMouseMove:w,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:S,nodeTypes:o,edgeTypes:l,connectionLineType:x,connectionLineStyle:j,connectionLineComponent:V,connectionLineContainerStyle:C,selectionKeyCode:J,selectionOnDrag:O,selectionMode:H,deleteKeyCode:G,multiSelectionKeyCode:X,panActivationKeyCode:K,zoomActivationKeyCode:Y,onlyRenderVisibleElements:fe,selectNodesOnDrag:de,defaultViewport:jn,translateExtent:Hn,minZoom:Bn,maxZoom:qt,preventScrolling:xn,zoomOnScroll:le,zoomOnPinch:xe,zoomOnDoubleClick:Ge,panOnScroll:pe,panOnScrollSpeed:Re,panOnScrollMode:nt,panOnDrag:St,onPaneClick:ut,onPaneMouseEnter:Se,onPaneMouseMove:vn,onPaneMouseLeave:Et,onPaneScroll:Vi,onPaneContextMenu:Ia,onSelectionContextMenu:I,onSelectionStart:$,onSelectionEnd:R,onEdgeContextMenu:xr,onEdgeDoubleClick:Ox,onEdgeMouseEnter:zx,onEdgeMouseMove:$x,onEdgeMouseLeave:jx,onReconnect:Vx??Bx,onReconnectStart:Wx??Hx,onReconnectEnd:qx??Ux,reconnectRadius:Kx??Xx,defaultMarkerColor:te,noDragClassName:Qx,noWheelClassName:Zx,noPanClassName:Zd,elevateEdgesOnSelect:lv,rfId:Fa,disableKeyboardA11y:Jd,nodeOrigin:re,nodeExtent:q}),U.createElement(uP,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:g,onClickConnectStart:k,onClickConnectEnd:h,nodesDraggable:se,nodesConnectable:ce,nodesFocusable:ae,edgesFocusable:_e,edgesUpdatable:at,elementsSelectable:$n,elevateNodesOnSelect:ov,minZoom:Bn,maxZoom:qt,nodeExtent:q,onNodesChange:Yx,onEdgesChange:Gx,snapToGrid:ee,snapGrid:ne,connectionMode:T,translateExtent:Hn,connectOnClick:tv,defaultEdgeOptions:iv,fitView:Jx,fitViewOptions:ev,onNodesDelete:b,onEdgesDelete:M,onNodeDragStart:N,onNodeDrag:A,onNodeDragStop:L,onSelectionDrag:E,onSelectionDragStart:B,onSelectionDragStop:F,noPanClassName:Zd,nodeOrigin:re,rfId:Fa,autoPanOnConnect:sv,autoPanOnNodeDrag:av,onError:fv,connectionRadius:uv,isValidConnection:cv,nodeDragThreshold:pv}),U.createElement(sP,{onSelectionChange:z}),Qd,U.createElement(F2,{proOptions:rv,position:nv}),U.createElement(hP,{rfId:Fa,disableKeyboardA11y:Jd})))});Pd.displayName="ReactFlow";const x_=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function v_({children:e}){const t=Pe(x_);return t?k0.createPortal(e,t):null}function k_(){const e=Ve();return P.useCallback(t=>{const{domNode:n,updateNodeDimensions:r}=e.getState(),o=(Array.isArray(t)?t:[t]).reduce((l,s)=>{const a=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${s}"]`);return a&&l.push({id:s,nodeElement:a,forceUpdate:!0}),l},[]);requestAnimationFrame(()=>r(o))},[])}const W1=({id:e,x:t,y:n,width:r,height:i,style:o,color:l,strokeColor:s,strokeWidth:a,className:u,borderRadius:c,shapeRendering:f,onClick:d,selected:p})=>{const{background:m,backgroundColor:g}=o||{},k=l||m||g;return U.createElement("rect",{className:tt(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:c,ry:c,width:r,height:i,fill:k,stroke:s,strokeWidth:a,shapeRendering:f,onClick:d?h=>d(h,e):void 0})};W1.displayName="MiniMapNode";var S_=P.memo(W1);const E_=e=>e.nodeOrigin,C_=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),wu=e=>e instanceof Function?e:()=>e;function b_({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i=2,nodeComponent:o=S_,onClick:l}){const s=Pe(C_,Ye),a=Pe(E_),u=wu(t),c=wu(e),f=wu(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return U.createElement(U.Fragment,null,s.map(p=>{const{x:m,y:g}=Lr(p,a).positionAbsolute;return U.createElement(o,{key:p.id,x:m,y:g,width:p.width,height:p.height,style:p.style,selected:p.selected,className:f(p),color:u(p),borderRadius:r,strokeColor:c(p),strokeWidth:i,shapeRendering:d,onClick:l,id:p.id})}))}var P_=P.memo(b_);const __=200,N_=150,T_=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?$2(pa(t,e.nodeOrigin),n):n,rfId:e.rfId}},A_="react-flow__minimap-desc";function q1({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:i="",nodeBorderRadius:o=5,nodeStrokeWidth:l=2,nodeComponent:s,maskColor:a="rgb(240, 240, 240, 0.6)",maskStrokeColor:u="none",maskStrokeWidth:c=1,position:f="bottom-right",onClick:d,onNodeClick:p,pannable:m=!1,zoomable:g=!1,ariaLabel:k="React Flow mini map",inversePan:h=!1,zoomStep:y=10,offsetScale:w=5}){const v=Ve(),_=P.useRef(null),{boundingRect:S,viewBB:N,rfId:A}=Pe(T_,Ye),L=(e==null?void 0:e.width)??__,b=(e==null?void 0:e.height)??N_,M=S.width/L,z=S.height/b,B=Math.max(M,z),E=B*L,F=B*b,I=w*B,$=S.x-(E-S.width)/2-I,R=S.y-(F-S.height)/2-I,T=E+I*2,x=F+I*2,j=`${A_}-${A}`,V=P.useRef(0);V.current=B,P.useEffect(()=>{if(_.current){const J=Ft(_.current),O=X=>{const{transform:Y,d3Selection:ee,d3Zoom:ne}=v.getState();if(X.sourceEvent.type!=="wheel"||!ee||!ne)return;const fe=-X.sourceEvent.deltaY*(X.sourceEvent.deltaMode===1?.05:X.sourceEvent.deltaMode?1:.002)*y,de=Y[2]*Math.pow(2,fe);ne.scaleTo(ee,de)},H=X=>{const{transform:Y,d3Selection:ee,d3Zoom:ne,translateExtent:fe,width:de,height:se}=v.getState();if(X.sourceEvent.type!=="mousemove"||!ee||!ne)return;const ce=V.current*Math.max(1,Y[2])*(h?-1:1),ae={x:Y[0]-X.sourceEvent.movementX*ce,y:Y[1]-X.sourceEvent.movementY*ce},re=[[0,0],[de,se]],_e=An.translate(ae.x,ae.y).scale(Y[2]),at=ne.constrain()(_e,re,fe);ne.transform(ee,at)},K=e1().on("zoom",m?H:null).on("zoom.wheel",g?O:null);return J.call(K),()=>{J.on("zoom",null)}}},[m,g,h,y]);const C=d?J=>{const O=Qt(J);d(J,{x:O[0],y:O[1]})}:void 0,G=p?(J,O)=>{const H=v.getState().nodeInternals.get(O);p(J,H)}:void 0;return U.createElement(hd,{position:f,style:e,className:tt(["react-flow__minimap",t]),"data-testid":"rf__minimap"},U.createElement("svg",{width:L,height:b,viewBox:`${$} ${R} ${T} ${x}`,role:"img","aria-labelledby":j,ref:_,onClick:C},k&&U.createElement("title",{id:j},k),U.createElement(P_,{onClick:G,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:s}),U.createElement("path",{className:"react-flow__minimap-mask",d:`M${$-I},${R-I}h${T+I*2}v${x+I*2}h${-T-I*2}z
        M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fill:a,fillRule:"evenodd",stroke:u,strokeWidth:c,pointerEvents:"none"})))}q1.displayName="MiniMap";var D_=P.memo(q1);function L_(){return U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},U.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function M_(){return U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},U.createElement("path",{d:"M0 0h32v4.2H0z"}))}function R_(){return U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},U.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function I_(){return U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},U.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function F_(){return U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},U.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const di=({children:e,className:t,...n})=>U.createElement("button",{type:"button",className:tt(["react-flow__controls-button",t]),...n},e);di.displayName="ControlButton";const O_=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),K1=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:o,onZoomOut:l,onFitView:s,onInteractiveChange:a,className:u,children:c,position:f="bottom-left"})=>{const d=Ve(),[p,m]=P.useState(!1),{isInteractive:g,minZoomReached:k,maxZoomReached:h}=Pe(O_,Ye),{zoomIn:y,zoomOut:w,fitView:v}=Cd();if(P.useEffect(()=>{m(!0)},[]),!p)return null;const _=()=>{y(),o==null||o()},S=()=>{w(),l==null||l()},N=()=>{v(i),s==null||s()},A=()=>{d.setState({nodesDraggable:!g,nodesConnectable:!g,elementsSelectable:!g}),a==null||a(!g)};return U.createElement(hd,{className:tt(["react-flow__controls",u]),position:f,style:e,"data-testid":"rf__controls"},t&&U.createElement(U.Fragment,null,U.createElement(di,{onClick:_,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:h},U.createElement(L_,null)),U.createElement(di,{onClick:S,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:k},U.createElement(M_,null))),n&&U.createElement(di,{className:"react-flow__controls-fitview",onClick:N,title:"fit view","aria-label":"fit view"},U.createElement(R_,null)),r&&U.createElement(di,{className:"react-flow__controls-interactive",onClick:A,title:"toggle interactivity","aria-label":"toggle interactivity"},g?U.createElement(F_,null):U.createElement(I_,null)),c)};K1.displayName="Controls";var z_=P.memo(K1),nn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(nn||(nn={}));function $_({color:e,dimensions:t,lineWidth:n}){return U.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function j_({color:e,radius:t}){return U.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const B_={[nn.Dots]:"#91919a",[nn.Lines]:"#eee",[nn.Cross]:"#e2e2e2"},H_={[nn.Dots]:1,[nn.Lines]:1,[nn.Cross]:6},U_=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function X1({id:e,variant:t=nn.Dots,gap:n=20,size:r,lineWidth:i=1,offset:o=2,color:l,style:s,className:a}){const u=P.useRef(null),{transform:c,patternId:f}=Pe(U_,Ye),d=l||B_[t],p=r||H_[t],m=t===nn.Dots,g=t===nn.Cross,k=Array.isArray(n)?n:[n,n],h=[k[0]*c[2]||1,k[1]*c[2]||1],y=p*c[2],w=g?[y,y]:h,v=m?[y/o,y/o]:[w[0]/o,w[1]/o];return U.createElement("svg",{className:tt(["react-flow__background",a]),style:{...s,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:u,"data-testid":"rf__background"},U.createElement("pattern",{id:f+e,x:c[0]%h[0],y:c[1]%h[1],width:h[0],height:h[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${v[0]},-${v[1]})`},m?U.createElement(j_,{color:d,radius:y/o}):U.createElement($_,{dimensions:w,color:d,lineWidth:i})),U.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${f+e})`}))}X1.displayName="Background";var V_=P.memo(X1);const Qh=["http","https","mailto","tel"];function W_(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<Qh.length;){const o=Qh[i];if(r===o.length&&t.slice(0,o.length).toLowerCase()===o)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var q_=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};const Y1=Fi(q_);function So(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Zh(e.position):"start"in e||"end"in e?Zh(e):"line"in e||"column"in e?Yc(e):""}function Yc(e){return Jh(e&&e.line)+":"+Jh(e&&e.column)}function Zh(e){return Yc(e&&e.start)+"-"+Yc(e&&e.end)}function Jh(e){return e&&typeof e=="number"?e:1}class Ut extends Error{constructor(t,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const l=r.indexOf(":");l===-1?i[1]=r:(i[0]=r.slice(0,l),i[1]=r.slice(l+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=So(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}Ut.prototype.file="";Ut.prototype.name="";Ut.prototype.reason="";Ut.prototype.message="";Ut.prototype.stack="";Ut.prototype.fatal=null;Ut.prototype.column=null;Ut.prototype.line=null;Ut.prototype.source=null;Ut.prototype.ruleId=null;Ut.prototype.position=null;const fn={basename:K_,dirname:X_,extname:Y_,join:G_,sep:"/"};function K_(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');il(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),s>-1&&(e.charCodeAt(i)===t.charCodeAt(s--)?s<0&&(r=i):(s=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function X_(e){if(il(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function Y_(e){il(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const s=e.charCodeAt(t);if(s===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function G_(...e){let t=-1,n;for(;++t<e.length;)il(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Q_(n)}function Q_(e){il(e);const t=e.charCodeAt(0)===47;let n=Z_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Z_(e,t){let n="",r=0,i=-1,o=0,l=-1,s,a;for(;++l<=e.length;){if(l<e.length)s=e.charCodeAt(l);else{if(s===47)break;s=47}if(s===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else s===46&&o>-1?o++:o=-1}return n}function il(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const J_={cwd:eN};function eN(){return"/"}function Gc(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function tN(e){if(typeof e=="string")e=new URL(e);else if(!Gc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return nN(e)}function nN(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 t=e.pathname;let n=-1;for(;++n<t.length;)if(t.charCodeAt(n)===37&&t.charCodeAt(n+1)===50){const r=t.charCodeAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const xu=["history","path","basename","stem","extname","dirname"];class G1{constructor(t){let n;t?typeof t=="string"||rN(t)?n={value:t}:Gc(t)?n={path:t}:n=t:n={},this.data={},this.messages=[],this.history=[],this.cwd=J_.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<xu.length;){const o=xu[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)xu.includes(i)||(this[i]=n[i])}get path(){return this.history[this.history.length-1]}set path(t){Gc(t)&&(t=tN(t)),ku(t,"path"),this.path!==t&&this.history.push(t)}get dirname(){return typeof this.path=="string"?fn.dirname(this.path):void 0}set dirname(t){em(this.basename,"dirname"),this.path=fn.join(t||"",this.basename)}get basename(){return typeof this.path=="string"?fn.basename(this.path):void 0}set basename(t){ku(t,"basename"),vu(t,"basename"),this.path=fn.join(this.dirname||"",t)}get extname(){return typeof this.path=="string"?fn.extname(this.path):void 0}set extname(t){if(vu(t,"extname"),em(this.dirname,"extname"),t){if(t.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=fn.join(this.dirname,this.stem+(t||""))}get stem(){return typeof this.path=="string"?fn.basename(this.path,this.extname):void 0}set stem(t){ku(t,"stem"),vu(t,"stem"),this.path=fn.join(this.dirname||"",t+(this.extname||""))}toString(t){return(this.value||"").toString(t||void 0)}message(t,n,r){const i=new Ut(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=null,i}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}}function vu(e,t){if(e&&e.includes(fn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+fn.sep+"`")}function ku(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function em(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function rN(e){return Y1(e)}function tm(e){if(e)throw e}var Jl=Object.prototype.hasOwnProperty,Q1=Object.prototype.toString,nm=Object.defineProperty,rm=Object.getOwnPropertyDescriptor,im=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Q1.call(t)==="[object Array]"},om=function(t){if(!t||Q1.call(t)!=="[object Object]")return!1;var n=Jl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Jl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Jl.call(t,i)},lm=function(t,n){nm&&n.name==="__proto__"?nm(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},sm=function(t,n){if(n==="__proto__")if(Jl.call(t,n)){if(rm)return rm(t,n).value}else return;return t[n]},iN=function e(){var t,n,r,i,o,l,s=arguments[0],a=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},a=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)r=sm(s,n),i=sm(t,n),s!==i&&(c&&i&&(om(i)||(o=im(i)))?(o?(o=!1,l=r&&im(r)?r:[]):l=r&&om(r)?r:{},lm(s,{name:n,newValue:e(c,l,i)})):typeof i<"u"&&lm(s,{name:n,newValue:i}));return s};const am=Fi(iN);function Qc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function oN(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);s(null,...i);function s(a,...u){const c=e[++o];let f=-1;if(a){l(a);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?lN(c,s)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function lN(e,t){let n;return r;function r(...l){const s=e.length>l.length;let a;s&&l.push(i);try{a=e.apply(this,l)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(l,...s){n||(n=!0,t(l,...s))}function o(l){i(null,l)}}const sN=J1().freeze(),Z1={}.hasOwnProperty;function J1(){const e=oN(),t=[];let n={},r,i=-1;return o.data=l,o.Parser=void 0,o.Compiler=void 0,o.freeze=s,o.attachers=t,o.use=a,o.parse=u,o.stringify=c,o.run=f,o.runSync=d,o.process=p,o.processSync=m,o;function o(){const g=J1();let k=-1;for(;++k<t.length;)g.use(...t[k]);return g.data(am(!0,{},n)),g}function l(g,k){return typeof g=="string"?arguments.length===2?(Cu("data",r),n[g]=k,o):Z1.call(n,g)&&n[g]||null:g?(Cu("data",r),n=g,o):n}function s(){if(r)return o;for(;++i<t.length;){const[g,...k]=t[i];if(k[0]===!1)continue;k[0]===!0&&(k[0]=void 0);const h=g.call(o,...k);typeof h=="function"&&e.use(h)}return r=!0,i=Number.POSITIVE_INFINITY,o}function a(g,...k){let h;if(Cu("use",r),g!=null)if(typeof g=="function")_(g,...k);else if(typeof g=="object")Array.isArray(g)?v(g):w(g);else throw new TypeError("Expected usable value, not `"+g+"`");return h&&(n.settings=Object.assign(n.settings||{},h)),o;function y(S){if(typeof S=="function")_(S);else if(typeof S=="object")if(Array.isArray(S)){const[N,...A]=S;_(N,...A)}else w(S);else throw new TypeError("Expected usable value, not `"+S+"`")}function w(S){v(S.plugins),S.settings&&(h=Object.assign(h||{},S.settings))}function v(S){let N=-1;if(S!=null)if(Array.isArray(S))for(;++N<S.length;){const A=S[N];y(A)}else throw new TypeError("Expected a list of plugins, not `"+S+"`")}function _(S,N){let A=-1,L;for(;++A<t.length;)if(t[A][0]===S){L=t[A];break}L?(Qc(L[1])&&Qc(N)&&(N=am(!0,L[1],N)),L[1]=N):t.push([...arguments])}}function u(g){o.freeze();const k=io(g),h=o.Parser;return Su("parse",h),um(h,"parse")?new h(String(k),k).parse():h(String(k),k)}function c(g,k){o.freeze();const h=io(k),y=o.Compiler;return Eu("stringify",y),cm(g),um(y,"compile")?new y(g,h).compile():y(g,h)}function f(g,k,h){if(cm(g),o.freeze(),!h&&typeof k=="function"&&(h=k,k=void 0),!h)return new Promise(y);y(null,h);function y(w,v){e.run(g,io(k),_);function _(S,N,A){N=N||g,S?v(S):w?w(N):h(null,N,A)}}}function d(g,k){let h,y;return o.run(g,k,w),fm("runSync","run",y),h;function w(v,_){tm(v),h=_,y=!0}}function p(g,k){if(o.freeze(),Su("process",o.Parser),Eu("process",o.Compiler),!k)return new Promise(h);h(null,k);function h(y,w){const v=io(g);o.run(o.parse(v),v,(S,N,A)=>{if(S||!N||!A)_(S);else{const L=o.stringify(N,A);L==null||(cN(L)?A.value=L:A.result=L),_(S,A)}});function _(S,N){S||!N?w(S):y?y(N):k(null,N)}}}function m(g){let k;o.freeze(),Su("processSync",o.Parser),Eu("processSync",o.Compiler);const h=io(g);return o.process(h,y),fm("processSync","process",k),h;function y(w){k=!0,tm(w)}}}function um(e,t){return typeof e=="function"&&e.prototype&&(aN(e.prototype)||t in e.prototype)}function aN(e){let t;for(t in e)if(Z1.call(e,t))return!0;return!1}function Su(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function Eu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Cu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cm(e){if(!Qc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function io(e){return uN(e)?e:new G1(e)}function uN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cN(e){return typeof e=="string"||Y1(e)}const fN={};function dN(e,t){const n=fN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ew(e,r,i)}function ew(e,t,n){if(pN(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return dm(e.children,t,n)}return Array.isArray(e)?dm(e,t,n):""}function dm(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ew(e[i],t,n);return r.join("")}function pN(e){return!!(e&&typeof e=="object")}function Nt(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function It(e,t){return e.length>0?(Nt(e,e.length,0,t),e):t}const pm={}.hasOwnProperty;function tw(e){const t={};let n=-1;for(;++n<e.length;)hN(t,e[n]);return t}function hN(e,t){let n;for(n in t){const i=(pm.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){pm.call(i,l)||(i[l]=[]);const s=o[l];mN(i[l],Array.isArray(s)?s:s?[s]:[])}}}function mN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Nt(e,0,0,r)}const gN=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,ft=wr(/[A-Za-z]/),lt=wr(/[\dA-Za-z]/),yN=wr(/[#-'*+\--9=?A-Z^-~]/);function Os(e){return e!==null&&(e<32||e===127)}const Zc=wr(/\d/),wN=wr(/[\dA-Fa-f]/),xN=wr(/[!-/:-@[-`{-~]/);function ue(e){return e!==null&&e<-2}function be(e){return e!==null&&(e<0||e===32)}function we(e){return e===-2||e===-1||e===32}const ga=wr(gN),Br=wr(/\s/);function wr(e){return t;function t(n){return n!==null&&e.test(String.fromCharCode(n))}}function ve(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(a){return we(a)?(e.enter(n),s(a)):t(a)}function s(a){return we(a)&&o++<i?(e.consume(a),s):(e.exit(n),t(a))}}const vN={tokenize:kN};function kN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ve(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,l(s)}function l(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ue(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),l)}}const SN={tokenize:EN},hm={tokenize:CN};function EN(e){const t=this,n=[];let r=0,i,o,l;return s;function s(w){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,a,u)(w)}return u(w)}function a(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const v=t.events.length;let _=v,S;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){S=t.events[_][1].end;break}h(r);let N=v;for(;N<t.events.length;)t.events[N][1].end=Object.assign({},S),N++;return Nt(t.events,_+1,0,t.events.slice(v)),t.events.length=N,u(w)}return s(w)}function u(w){if(r===n.length){if(!i)return d(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(hm,c,f)(w)}function c(w){return i&&y(),h(r),d(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,m(w)}function d(w){return t.containerState={},e.attempt(hm,p,m)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),d(w)}function m(w){if(w===null){i&&y(),h(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),g(w)}function g(w){if(w===null){k(e.exit("chunkFlow"),!0),h(0),e.consume(w);return}return ue(w)?(e.consume(w),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),g)}function k(w,v){const _=t.sliceStream(w);if(v&&_.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(_),t.parser.lazy[w.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<l&&(!i.events[S][1].end||i.events[S][1].end.offset>l))return;const N=t.events.length;let A=N,L,b;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(L){b=t.events[A][1].end;break}L=!0}for(h(r),S=N;S<t.events.length;)t.events[S][1].end=Object.assign({},b),S++;Nt(t.events,A+1,0,t.events.slice(N)),t.events.length=S}}function h(w){let v=n.length;for(;v-- >w;){const _=n[v];t.containerState=_[1],_[0].exit.call(t,e)}n.length=w}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function CN(e,t,n){return ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zs(e){if(e===null||be(e)||Br(e))return 1;if(ga(e))return 2}function ya(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Jc={name:"attention",tokenize:PN,resolveAll:bN};function bN(e,t){let n=-1,r,i,o,l,s,a,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);mm(f,-a),mm(d,a),l={type:a>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},o={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:a>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},s.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=It(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=It(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=It(u,ya(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=It(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=It(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Nt(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function PN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=zs(r);let o;return l;function l(a){return o=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===o)return e.consume(a),s;const u=e.exit("attentionSequence"),c=zs(a),f=!c||c===2&&i||n.includes(a),d=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?f:f&&(i||!d)),u._close=!!(o===42?d:d&&(c||!f)),t(a)}}function mm(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _N={name:"autolink",tokenize:NN};function NN(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return ft(p)?(e.consume(p),l):u(p)}function l(p){return p===43||p===45||p===46||lt(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||lt(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Os(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),c):yN(p)?(e.consume(p),u):n(p)}function c(p){return lt(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||lt(p))&&r++<63){const m=p===45?d:f;return e.consume(p),m}return n(p)}}const ol={tokenize:TN,partial:!0};function TN(e,t,n){return r;function r(o){return we(o)?ve(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ue(o)?t(o):n(o)}}const nw={name:"blockQuote",tokenize:AN,continuation:{tokenize:DN},exit:LN};function AN(e,t,n){const r=this;return i;function i(l){if(l===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return we(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function DN(e,t,n){const r=this;return i;function i(l){return we(l)?ve(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(nw,t,n)(l)}}function LN(e){e.exit("blockQuote")}const rw={name:"characterEscape",tokenize:MN};function MN(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return xN(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const gm=document.createElement("i");function _d(e){const t="&"+e+";";gm.innerHTML=t;const n=gm.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const iw={name:"characterReference",tokenize:RN};function RN(e,t,n){const r=this;let i=0,o,l;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),a}function a(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=lt,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=wN,c):(e.enter("characterReferenceValue"),o=7,l=Zc,c(f))}function c(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return l===lt&&!_d(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(f)&&i++<o?(e.consume(f),c):n(f)}}const ym={tokenize:FN,partial:!0},wm={name:"codeFenced",tokenize:IN,concrete:!0};function IN(e,t,n){const r=this,i={tokenize:_,partial:!0};let o=0,l=0,s;return a;function a(S){return u(S)}function u(S){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===s?(l++,e.consume(S),c):l<3?n(S):(e.exit("codeFencedFenceSequence"),we(S)?ve(e,f,"whitespace")(S):f(S))}function f(S){return S===null||ue(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(ym,g,v)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(S))}function d(S){return S===null||ue(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(S)):we(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ve(e,p,"whitespace")(S)):S===96&&S===s?n(S):(e.consume(S),d)}function p(S){return S===null||ue(S)?f(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||ue(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(S)):S===96&&S===s?n(S):(e.consume(S),m)}function g(S){return e.attempt(i,v,k)(S)}function k(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),h}function h(S){return o>0&&we(S)?ve(e,y,"linePrefix",o+1)(S):y(S)}function y(S){return S===null||ue(S)?e.check(ym,g,v)(S):(e.enter("codeFlowValue"),w(S))}function w(S){return S===null||ue(S)?(e.exit("codeFlowValue"),y(S)):(e.consume(S),w)}function v(S){return e.exit("codeFenced"),t(S)}function _(S,N,A){let L=0;return b;function b(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),M}function M(F){return S.enter("codeFencedFence"),we(F)?ve(S,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):z(F)}function z(F){return F===s?(S.enter("codeFencedFenceSequence"),B(F)):A(F)}function B(F){return F===s?(L++,S.consume(F),B):L>=l?(S.exit("codeFencedFenceSequence"),we(F)?ve(S,E,"whitespace")(F):E(F)):A(F)}function E(F){return F===null||ue(F)?(S.exit("codeFencedFence"),N(F)):A(F)}}}function FN(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const bu={name:"codeIndented",tokenize:zN},ON={tokenize:$N,partial:!0};function zN(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ve(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?a(u):ue(u)?e.attempt(ON,l,a)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||ue(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),s)}function a(u){return e.exit("codeIndented"),t(u)}}function $N(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):ve(e,o,"linePrefix",5)(l)}function o(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):ue(l)?i(l):n(l)}}const jN={name:"codeText",tokenize:UN,resolve:BN,previous:HN};function BN(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function HN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UN(e,t,n){let r=0,i,o;return l;function l(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),a(f))}function a(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),a):f===96?(o=e.enter("codeTextSequence"),i=0,c(f)):ue(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||ue(f)?(e.exit("codeTextData"),a(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",u(f))}}function ow(e){const t={};let n=-1,r,i,o,l,s,a,u;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,VN(e,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(l=e[o],l[1].type==="lineEnding"||l[1].type==="lineEndingBlank");)l[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},e[i][1].start),s=e.slice(i,n),s.unshift(r),Nt(e,i,n-i+1,s))}}return!u}function VN(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const o=[],l=n._tokenizer||r.parser[n.contentType](n.start),s=l.events,a=[],u={};let c,f,d=-1,p=n,m=0,g=0;const k=[g];for(;p;){for(;e[++i][1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(g=d+1,k.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):k.pop(),d=k.length;d--;){const h=s.slice(k[d],k[d+1]),y=o.pop();a.unshift([y,y+h.length-1]),Nt(e,y,2,h)}for(d=-1;++d<a.length;)u[m+a[d][0]]=m+a[d][1],m+=a[d][1]-a[d][0]-1;return u}const WN={tokenize:XN,resolve:KN},qN={tokenize:YN,partial:!0};function KN(e){return ow(e),e}function XN(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):ue(s)?e.check(qN,l,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function l(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function YN(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ve(e,o,"linePrefix")}function o(l){if(l===null||ue(l))return n(l);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function lw(e,t,n,r,i,o,l,s,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return f;function f(h){return h===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(h),e.exit(o),d):h===null||h===32||h===41||Os(h)?n(h):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(h))}function d(h){return h===62?(e.enter(o),e.consume(h),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===62?(e.exit("chunkString"),e.exit(s),d(h)):h===null||h===60||ue(h)?n(h):(e.consume(h),h===92?m:p)}function m(h){return h===60||h===62||h===92?(e.consume(h),p):p(h)}function g(h){return!c&&(h===null||h===41||be(h))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),t(h)):c<u&&h===40?(e.consume(h),c++,g):h===41?(e.consume(h),c--,g):h===null||h===32||h===40||Os(h)?n(h):(e.consume(h),h===92?k:g)}function k(h){return h===40||h===41||h===92?(e.consume(h),g):g(h)}}function sw(e,t,n,r,i,o){const l=this;let s=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return s>999||p===null||p===91||p===93&&!a||p===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):ue(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||ue(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),a||(a=!we(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function aw(e,t,n,r,i,o){let l;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,a):n(d)}function a(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),u(d))}function u(d){return d===l?(e.exit(o),a(l)):d===null?n(d):ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ve(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===l||d===null||ue(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===l||d===92?(e.consume(d),c):c(d)}}function Eo(e,t){let n;return r;function r(i){return ue(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):we(i)?ve(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function rn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const GN={name:"definition",tokenize:ZN},QN={tokenize:JN,partial:!0};function ZN(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return sw.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=rn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return be(p)?Eo(e,u)(p):u(p)}function u(p){return lw(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(QN,f,f)(p)}function f(p){return we(p)?ve(e,d,"whitespace")(p):d(p)}function d(p){return p===null||ue(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function JN(e,t,n){return r;function r(s){return be(s)?Eo(e,i)(s):n(s)}function i(s){return aw(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return we(s)?ve(e,l,"whitespace")(s):l(s)}function l(s){return s===null||ue(s)?t(s):n(s)}}const eT={name:"hardBreakEscape",tokenize:tT};function tT(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ue(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const nT={name:"headingAtx",tokenize:iT,resolve:rT};function rT(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Nt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function iT(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&r++<6?(e.consume(c),l):c===null||be(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||ue(c)?(e.exit("atxHeading"),t(c)):we(c)?ve(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||be(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const oT=["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"],xm=["pre","script","style","textarea"],lT={name:"htmlFlow",tokenize:cT,resolveTo:uT,concrete:!0},sT={tokenize:dT,partial:!0},aT={tokenize:fT,partial:!0};function uT(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function cT(e,t,n){const r=this;let i,o,l,s,a;return u;function u(C){return c(C)}function c(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),f}function f(C){return C===33?(e.consume(C),d):C===47?(e.consume(C),o=!0,g):C===63?(e.consume(C),i=3,r.interrupt?t:x):ft(C)?(e.consume(C),l=String.fromCharCode(C),k):n(C)}function d(C){return C===45?(e.consume(C),i=2,p):C===91?(e.consume(C),i=5,s=0,m):ft(C)?(e.consume(C),i=4,r.interrupt?t:x):n(C)}function p(C){return C===45?(e.consume(C),r.interrupt?t:x):n(C)}function m(C){const G="CDATA[";return C===G.charCodeAt(s++)?(e.consume(C),s===G.length?r.interrupt?t:z:m):n(C)}function g(C){return ft(C)?(e.consume(C),l=String.fromCharCode(C),k):n(C)}function k(C){if(C===null||C===47||C===62||be(C)){const G=C===47,J=l.toLowerCase();return!G&&!o&&xm.includes(J)?(i=1,r.interrupt?t(C):z(C)):oT.includes(l.toLowerCase())?(i=6,G?(e.consume(C),h):r.interrupt?t(C):z(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):o?y(C):w(C))}return C===45||lt(C)?(e.consume(C),l+=String.fromCharCode(C),k):n(C)}function h(C){return C===62?(e.consume(C),r.interrupt?t:z):n(C)}function y(C){return we(C)?(e.consume(C),y):b(C)}function w(C){return C===47?(e.consume(C),b):C===58||C===95||ft(C)?(e.consume(C),v):we(C)?(e.consume(C),w):b(C)}function v(C){return C===45||C===46||C===58||C===95||lt(C)?(e.consume(C),v):_(C)}function _(C){return C===61?(e.consume(C),S):we(C)?(e.consume(C),_):w(C)}function S(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),a=C,N):we(C)?(e.consume(C),S):A(C)}function N(C){return C===a?(e.consume(C),a=null,L):C===null||ue(C)?n(C):(e.consume(C),N)}function A(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||be(C)?_(C):(e.consume(C),A)}function L(C){return C===47||C===62||we(C)?w(C):n(C)}function b(C){return C===62?(e.consume(C),M):n(C)}function M(C){return C===null||ue(C)?z(C):we(C)?(e.consume(C),M):n(C)}function z(C){return C===45&&i===2?(e.consume(C),I):C===60&&i===1?(e.consume(C),$):C===62&&i===4?(e.consume(C),j):C===63&&i===3?(e.consume(C),x):C===93&&i===5?(e.consume(C),T):ue(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(sT,V,B)(C)):C===null||ue(C)?(e.exit("htmlFlowData"),B(C)):(e.consume(C),z)}function B(C){return e.check(aT,E,V)(C)}function E(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),F}function F(C){return C===null||ue(C)?B(C):(e.enter("htmlFlowData"),z(C))}function I(C){return C===45?(e.consume(C),x):z(C)}function $(C){return C===47?(e.consume(C),l="",R):z(C)}function R(C){if(C===62){const G=l.toLowerCase();return xm.includes(G)?(e.consume(C),j):z(C)}return ft(C)&&l.length<8?(e.consume(C),l+=String.fromCharCode(C),R):z(C)}function T(C){return C===93?(e.consume(C),x):z(C)}function x(C){return C===62?(e.consume(C),j):C===45&&i===2?(e.consume(C),x):z(C)}function j(C){return C===null||ue(C)?(e.exit("htmlFlowData"),V(C)):(e.consume(C),j)}function V(C){return e.exit("htmlFlow"),t(C)}}function fT(e,t,n){const r=this;return i;function i(l){return ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function dT(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ol,t,n)}}const pT={name:"htmlText",tokenize:hT};function hT(e,t,n){const r=this;let i,o,l;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),a}function a(x){return x===33?(e.consume(x),u):x===47?(e.consume(x),_):x===63?(e.consume(x),w):ft(x)?(e.consume(x),A):n(x)}function u(x){return x===45?(e.consume(x),c):x===91?(e.consume(x),o=0,m):ft(x)?(e.consume(x),y):n(x)}function c(x){return x===45?(e.consume(x),p):n(x)}function f(x){return x===null?n(x):x===45?(e.consume(x),d):ue(x)?(l=f,$(x)):(e.consume(x),f)}function d(x){return x===45?(e.consume(x),p):f(x)}function p(x){return x===62?I(x):x===45?d(x):f(x)}function m(x){const j="CDATA[";return x===j.charCodeAt(o++)?(e.consume(x),o===j.length?g:m):n(x)}function g(x){return x===null?n(x):x===93?(e.consume(x),k):ue(x)?(l=g,$(x)):(e.consume(x),g)}function k(x){return x===93?(e.consume(x),h):g(x)}function h(x){return x===62?I(x):x===93?(e.consume(x),h):g(x)}function y(x){return x===null||x===62?I(x):ue(x)?(l=y,$(x)):(e.consume(x),y)}function w(x){return x===null?n(x):x===63?(e.consume(x),v):ue(x)?(l=w,$(x)):(e.consume(x),w)}function v(x){return x===62?I(x):w(x)}function _(x){return ft(x)?(e.consume(x),S):n(x)}function S(x){return x===45||lt(x)?(e.consume(x),S):N(x)}function N(x){return ue(x)?(l=N,$(x)):we(x)?(e.consume(x),N):I(x)}function A(x){return x===45||lt(x)?(e.consume(x),A):x===47||x===62||be(x)?L(x):n(x)}function L(x){return x===47?(e.consume(x),I):x===58||x===95||ft(x)?(e.consume(x),b):ue(x)?(l=L,$(x)):we(x)?(e.consume(x),L):I(x)}function b(x){return x===45||x===46||x===58||x===95||lt(x)?(e.consume(x),b):M(x)}function M(x){return x===61?(e.consume(x),z):ue(x)?(l=M,$(x)):we(x)?(e.consume(x),M):L(x)}function z(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,B):ue(x)?(l=z,$(x)):we(x)?(e.consume(x),z):(e.consume(x),E)}function B(x){return x===i?(e.consume(x),i=void 0,F):x===null?n(x):ue(x)?(l=B,$(x)):(e.consume(x),B)}function E(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||be(x)?L(x):(e.consume(x),E)}function F(x){return x===47||x===62||be(x)?L(x):n(x)}function I(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function $(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),R}function R(x){return we(x)?ve(e,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):T(x)}function T(x){return e.enter("htmlTextData"),l(x)}}const Nd={name:"labelEnd",tokenize:vT,resolveTo:xT,resolveAll:wT},mT={tokenize:kT},gT={tokenize:ST},yT={tokenize:ET};function wT(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function xT(e,t){let n=e.length,r=0,i,o,l,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const a={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[l][1].end)},c={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[l-2][1].start)};return s=[["enter",a,t],["enter",u,t]],s=It(s,e.slice(o+1,o+r+3)),s=It(s,[["enter",c,t]]),s=It(s,ya(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),s=It(s,[["exit",c,t],e[l-2],e[l-1],["exit",u,t]]),s=It(s,e.slice(l+1)),s=It(s,[["exit",a,t]]),Nt(e,o,e.length,s),e}function vT(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(d){return o?o._inactive?f(d):(l=r.parser.defined.includes(rn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),a):n(d)}function a(d){return d===40?e.attempt(mT,c,l?c:f)(d):d===91?e.attempt(gT,c,l?u:f)(d):l?c(d):f(d)}function u(d){return e.attempt(yT,c,f)(d)}function c(d){return t(d)}function f(d){return o._balanced=!0,n(d)}}function kT(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return be(f)?Eo(e,o)(f):o(f)}function o(f){return f===41?c(f):lw(e,l,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return be(f)?Eo(e,a)(f):c(f)}function s(f){return n(f)}function a(f){return f===34||f===39||f===40?aw(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return be(f)?Eo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function ST(e,t,n){const r=this;return i;function i(s){return sw.call(r,e,o,l,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(rn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function l(s){return n(s)}}function ET(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const CT={name:"labelStartImage",tokenize:bT,resolveAll:Nd.resolveAll};function bT(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),l):n(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const PT={name:"labelStartLink",tokenize:_T,resolveAll:Nd.resolveAll};function _T(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Pu={name:"lineEnding",tokenize:NT};function NT(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ve(e,t,"linePrefix")}}const es={name:"thematicBreak",tokenize:TT};function TT(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||ue(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),we(u)?ve(e,s,"whitespace")(u):s(u))}}const ht={name:"list",tokenize:LT,continuation:{tokenize:MT},exit:IT},AT={tokenize:FT,partial:!0},DT={tokenize:RT,partial:!0};function LT(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Zc(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(es,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return Zc(p)&&++l<10?(e.consume(p),a):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ol,r.interrupt?n:c,e.attempt(AT,d,f))}function c(p){return r.containerState.initialBlankLine=!0,o++,d(p)}function f(p){return we(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function MT(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ol,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ve(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!we(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(DT,t,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ve(e,e.attempt(ht,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function RT(e,t,n){const r=this;return ve(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function IT(e){e.exit(this.containerState.type)}function FT(e,t,n){const r=this;return ve(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!we(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const vm={name:"setextUnderline",tokenize:zT,resolveTo:OT};function OT(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=l,e.push(["exit",l,t]),e}function zT(e,t,n){const r=this;let i;return o;function o(u){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=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),we(u)?ve(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||ue(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const $T={tokenize:jT};function jT(e){const t=this,n=e.attempt(ol,r,e.attempt(this.parser.constructs.flowInitial,i,ve(e,e.attempt(this.parser.constructs.flow,i,e.attempt(WN,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const BT={resolveAll:cw()},HT=uw("string"),UT=uw("text");function uw(e){return{tokenize:t,resolveAll:cw(e==="text"?VT:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,s);return l;function l(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function cw(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function VT(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,s=0,a;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(u===-2)a=!0,s++;else if(u!==-1){o++;break}}if(s){const u={type:n===e.length||a||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?l:r.start._bufferIndex+l},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function WT(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let l=[],s=[];const a={consume:y,enter:w,exit:v,attempt:N(_),check:N(S),interrupt:N(S,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:m,defineSkip:g,write:f};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function f(M){return l=It(l,M),k(),l[l.length-1]!==null?[]:(A(t,0),u.events=ya(o,u.events,u),u.events)}function d(M,z){return KT(p(M),z)}function p(M){return qT(l,M)}function m(){const{line:M,column:z,offset:B,_index:E,_bufferIndex:F}=r;return{line:M,column:z,offset:B,_index:E,_bufferIndex:F}}function g(M){i[M.line]=M.column,b()}function k(){let M;for(;r._index<l.length;){const z=l[r._index];if(typeof z=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<z.length;)h(z.charCodeAt(r._bufferIndex));else h(z)}}function h(M){c=c(M)}function y(M){ue(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,b()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=M}function w(M,z){const B=z||{};return B.type=M,B.start=m(),u.events.push(["enter",B,u]),s.push(B),B}function v(M){const z=s.pop();return z.end=m(),u.events.push(["exit",z,u]),z}function _(M,z){A(M,z.from)}function S(M,z){z.restore()}function N(M,z){return B;function B(E,F,I){let $,R,T,x;return Array.isArray(E)?V(E):"tokenize"in E?V([E]):j(E);function j(O){return H;function H(K){const X=K!==null&&O[K],Y=K!==null&&O.null,ee=[...Array.isArray(X)?X:X?[X]:[],...Array.isArray(Y)?Y:Y?[Y]:[]];return V(ee)(K)}}function V(O){return $=O,R=0,O.length===0?I:C(O[R])}function C(O){return H;function H(K){return x=L(),T=O,O.partial||(u.currentConstruct=O),O.name&&u.parser.constructs.disable.null.includes(O.name)?J():O.tokenize.call(z?Object.assign(Object.create(u),z):u,a,G,J)(K)}}function G(O){return M(T,x),F}function J(O){return x.restore(),++R<$.length?C($[R]):I}}}function A(M,z){M.resolveAll&&!o.includes(M)&&o.push(M),M.resolve&&Nt(u.events,z,u.events.length-z,M.resolve(u.events.slice(z),u)),M.resolveTo&&(u.events=M.resolveTo(u.events,u))}function L(){const M=m(),z=u.previous,B=u.currentConstruct,E=u.events.length,F=Array.from(s);return{restore:I,from:E};function I(){r=M,u.previous=z,u.currentConstruct=B,u.events.length=E,s=F,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function qT(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const s=l[0];typeof s=="string"?l[0]=s.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function KT(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
`;break}case-3:{l=`\r
`;break}case-2:{l=t?" ":"	";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}const XT={42:ht,43:ht,45:ht,48:ht,49:ht,50:ht,51:ht,52:ht,53:ht,54:ht,55:ht,56:ht,57:ht,62:nw},YT={91:GN},GT={[-2]:bu,[-1]:bu,32:bu},QT={35:nT,42:es,45:[vm,es],60:lT,61:vm,95:es,96:wm,126:wm},ZT={38:iw,92:rw},JT={[-5]:Pu,[-4]:Pu,[-3]:Pu,33:CT,38:iw,42:Jc,60:[_N,pT],91:PT,92:[eT,rw],93:Nd,95:Jc,96:jN},eA={null:[Jc,BT]},tA={null:[42,95]},nA={null:[]},rA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:tA,contentInitial:YT,disable:nA,document:XT,flow:QT,flowInitial:GT,insideSpan:eA,string:ZT,text:JT},Symbol.toStringTag,{value:"Module"}));function iA(e){const n=tw([rA,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(vN),document:i(SN),flow:i($T),string:i(HT),text:i(UT)};return r;function i(o){return l;function l(s){return WT(r,o,s)}}}const km=/[\0\t\n\r]/g;function oA(){let e=1,t="",n=!0,r;return i;function i(o,l,s){const a=[];let u,c,f,d,p;for(o=t+o.toString(l),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(km.lastIndex=f,u=km.exec(o),d=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(d),!u){t=o.slice(f);break}if(p===10&&f===d&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),f<d&&(a.push(o.slice(f,d)),e+=d-f),p){case 0:{a.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,a.push(-2);e++<c;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}function lA(e){for(;!ow(e););return e}function fw(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const sA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dw(e){return e.replace(sA,aA)}function aA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return fw(n.slice(o?2:1),o?16:10)}return _d(n)||e}const pw={}.hasOwnProperty,uA=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),cA(n)(lA(iA(n).document().write(oA()(e,t,!0))))};function cA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(at),autolinkProtocol:M,autolinkEmail:M,atxHeading:s(ce),blockQuote:s(ee),characterEscape:M,characterReference:M,codeFenced:s(ne),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(ne,a),codeText:s(fe,a),codeTextData:M,data:M,codeFlowValue:M,definition:s(de),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(se),hardBreakEscape:s(ae),hardBreakTrailing:s(ae),htmlFlow:s(re,a),htmlFlowData:M,htmlText:s(re,a),htmlTextData:M,image:s(_e),label:a,link:s(at),listItem:s(jn),listItemValue:m,listOrdered:s($n,p),listUnordered:s($n),paragraph:s(Bn),reference:J,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(ce),strong:s(qt),thematicBreak:s(xn)},exit:{atxHeading:c(),atxHeadingSequence:N,autolink:c(),autolinkEmail:Y,autolinkProtocol:X,blockQuote:c(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:K,codeFenced:c(y),codeFencedFence:h,codeFencedFenceInfo:g,codeFencedFenceMeta:k,codeFlowValue:z,codeIndented:c(w),codeText:c($),codeTextData:z,data:z,definition:c(),definitionDestinationString:S,definitionLabelString:v,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(E),hardBreakTrailing:c(E),htmlFlow:c(F),htmlFlowData:z,htmlText:c(I),htmlTextData:z,image:c(T),label:j,labelText:x,lineEnding:B,link:c(R),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:O,resourceDestinationString:V,resourceTitleString:C,resource:G,setextHeading:c(b),setextHeadingLineSequence:L,setextHeadingText:A,strong:c(),thematicBreak:c()}};hw(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(q){let te={type:"root",children:[]};const le={stack:[te],tokenStack:[],config:t,enter:u,exit:f,buffer:a,resume:d,setData:o,getData:l},xe=[];let pe=-1;for(;++pe<q.length;)if(q[pe][1].type==="listOrdered"||q[pe][1].type==="listUnordered")if(q[pe][0]==="enter")xe.push(pe);else{const Re=xe.pop();pe=i(q,Re,pe)}for(pe=-1;++pe<q.length;){const Re=t[q[pe][0]];pw.call(Re,q[pe][1].type)&&Re[q[pe][1].type].call(Object.assign({sliceSerialize:q[pe][2].sliceSerialize},le),q[pe][1])}if(le.tokenStack.length>0){const Re=le.tokenStack[le.tokenStack.length-1];(Re[1]||Sm).call(le,void 0,Re[0])}for(te.position={start:Wn(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Wn(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)te=t.transforms[pe](te)||te;return te}function i(q,te,le){let xe=te-1,pe=-1,Re=!1,nt,Ge,St,ut;for(;++xe<=le;){const Se=q[xe];if(Se[1].type==="listUnordered"||Se[1].type==="listOrdered"||Se[1].type==="blockQuote"?(Se[0]==="enter"?pe++:pe--,ut=void 0):Se[1].type==="lineEndingBlank"?Se[0]==="enter"&&(nt&&!ut&&!pe&&!St&&(St=xe),ut=void 0):Se[1].type==="linePrefix"||Se[1].type==="listItemValue"||Se[1].type==="listItemMarker"||Se[1].type==="listItemPrefix"||Se[1].type==="listItemPrefixWhitespace"||(ut=void 0),!pe&&Se[0]==="enter"&&Se[1].type==="listItemPrefix"||pe===-1&&Se[0]==="exit"&&(Se[1].type==="listUnordered"||Se[1].type==="listOrdered")){if(nt){let vn=xe;for(Ge=void 0;vn--;){const Et=q[vn];if(Et[1].type==="lineEnding"||Et[1].type==="lineEndingBlank"){if(Et[0]==="exit")continue;Ge&&(q[Ge][1].type="lineEndingBlank",Re=!0),Et[1].type="lineEnding",Ge=vn}else if(!(Et[1].type==="linePrefix"||Et[1].type==="blockQuotePrefix"||Et[1].type==="blockQuotePrefixWhitespace"||Et[1].type==="blockQuoteMarker"||Et[1].type==="listItemIndent"))break}St&&(!Ge||St<Ge)&&(nt._spread=!0),nt.end=Object.assign({},Ge?q[Ge][1].start:Se[1].end),q.splice(Ge||xe,0,["exit",nt,Se[2]]),xe++,le++}Se[1].type==="listItemPrefix"&&(nt={type:"listItem",_spread:!1,start:Object.assign({},Se[1].start),end:void 0},q.splice(xe,0,["enter",nt,Se[2]]),xe++,le++,St=void 0,ut=!0)}}return q[te][1]._spread=Re,le}function o(q,te){n[q]=te}function l(q){return n[q]}function s(q,te){return le;function le(xe){u.call(this,q(xe),xe),te&&te.call(this,xe)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(q,te,le){return this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([te,le]),q.position={start:Wn(te.start)},q}function c(q){return te;function te(le){q&&q.call(this,le),f.call(this,le)}}function f(q,te){const le=this.stack.pop(),xe=this.tokenStack.pop();if(xe)xe[0].type!==q.type&&(te?te.call(this,q,xe[0]):(xe[1]||Sm).call(this,q,xe[0]));else throw new Error("Cannot close `"+q.type+"` ("+So({start:q.start,end:q.end})+"): it’s not open");return le.position.end=Wn(q.end),le}function d(){return dN(this.stack.pop())}function p(){o("expectingFirstListItemValue",!0)}function m(q){if(l("expectingFirstListItemValue")){const te=this.stack[this.stack.length-2];te.start=Number.parseInt(this.sliceSerialize(q),10),o("expectingFirstListItemValue")}}function g(){const q=this.resume(),te=this.stack[this.stack.length-1];te.lang=q}function k(){const q=this.resume(),te=this.stack[this.stack.length-1];te.meta=q}function h(){l("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function y(){const q=this.resume(),te=this.stack[this.stack.length-1];te.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function w(){const q=this.resume(),te=this.stack[this.stack.length-1];te.value=q.replace(/(\r?\n|\r)$/g,"")}function v(q){const te=this.resume(),le=this.stack[this.stack.length-1];le.label=te,le.identifier=rn(this.sliceSerialize(q)).toLowerCase()}function _(){const q=this.resume(),te=this.stack[this.stack.length-1];te.title=q}function S(){const q=this.resume(),te=this.stack[this.stack.length-1];te.url=q}function N(q){const te=this.stack[this.stack.length-1];if(!te.depth){const le=this.sliceSerialize(q).length;te.depth=le}}function A(){o("setextHeadingSlurpLineEnding",!0)}function L(q){const te=this.stack[this.stack.length-1];te.depth=this.sliceSerialize(q).charCodeAt(0)===61?1:2}function b(){o("setextHeadingSlurpLineEnding")}function M(q){const te=this.stack[this.stack.length-1];let le=te.children[te.children.length-1];(!le||le.type!=="text")&&(le=Hn(),le.position={start:Wn(q.start)},te.children.push(le)),this.stack.push(le)}function z(q){const te=this.stack.pop();te.value+=this.sliceSerialize(q),te.position.end=Wn(q.end)}function B(q){const te=this.stack[this.stack.length-1];if(l("atHardBreak")){const le=te.children[te.children.length-1];le.position.end=Wn(q.end),o("atHardBreak");return}!l("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(te.type)&&(M.call(this,q),z.call(this,q))}function E(){o("atHardBreak",!0)}function F(){const q=this.resume(),te=this.stack[this.stack.length-1];te.value=q}function I(){const q=this.resume(),te=this.stack[this.stack.length-1];te.value=q}function $(){const q=this.resume(),te=this.stack[this.stack.length-1];te.value=q}function R(){const q=this.stack[this.stack.length-1];if(l("inReference")){const te=l("referenceType")||"shortcut";q.type+="Reference",q.referenceType=te,delete q.url,delete q.title}else delete q.identifier,delete q.label;o("referenceType")}function T(){const q=this.stack[this.stack.length-1];if(l("inReference")){const te=l("referenceType")||"shortcut";q.type+="Reference",q.referenceType=te,delete q.url,delete q.title}else delete q.identifier,delete q.label;o("referenceType")}function x(q){const te=this.sliceSerialize(q),le=this.stack[this.stack.length-2];le.label=dw(te),le.identifier=rn(te).toLowerCase()}function j(){const q=this.stack[this.stack.length-1],te=this.resume(),le=this.stack[this.stack.length-1];if(o("inReference",!0),le.type==="link"){const xe=q.children;le.children=xe}else le.alt=te}function V(){const q=this.resume(),te=this.stack[this.stack.length-1];te.url=q}function C(){const q=this.resume(),te=this.stack[this.stack.length-1];te.title=q}function G(){o("inReference")}function J(){o("referenceType","collapsed")}function O(q){const te=this.resume(),le=this.stack[this.stack.length-1];le.label=te,le.identifier=rn(this.sliceSerialize(q)).toLowerCase(),o("referenceType","full")}function H(q){o("characterReferenceType",q.type)}function K(q){const te=this.sliceSerialize(q),le=l("characterReferenceType");let xe;le?(xe=fw(te,le==="characterReferenceMarkerNumeric"?10:16),o("characterReferenceType")):xe=_d(te);const pe=this.stack.pop();pe.value+=xe,pe.position.end=Wn(q.end)}function X(q){z.call(this,q);const te=this.stack[this.stack.length-1];te.url=this.sliceSerialize(q)}function Y(q){z.call(this,q);const te=this.stack[this.stack.length-1];te.url="mailto:"+this.sliceSerialize(q)}function ee(){return{type:"blockquote",children:[]}}function ne(){return{type:"code",lang:null,meta:null,value:""}}function fe(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function se(){return{type:"emphasis",children:[]}}function ce(){return{type:"heading",depth:void 0,children:[]}}function ae(){return{type:"break"}}function re(){return{type:"html",value:""}}function _e(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function $n(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function jn(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function Bn(){return{type:"paragraph",children:[]}}function qt(){return{type:"strong",children:[]}}function Hn(){return{type:"text",value:""}}function xn(){return{type:"thematicBreak"}}}function Wn(e){return{line:e.line,column:e.column,offset:e.offset}}function hw(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?hw(e,r):fA(e,r)}}function fA(e,t){let n;for(n in t)if(pw.call(t,n)){if(n==="canContainEols"){const r=t[n];r&&e[n].push(...r)}else if(n==="transforms"){const r=t[n];r&&e[n].push(...r)}else if(n==="enter"||n==="exit"){const r=t[n];r&&Object.assign(e[n],r)}}}function Sm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+So({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+So({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+So({start:t.start,end:t.end})+") is still open")}function dA(e){Object.assign(this,{Parser:n=>{const r=this.data("settings");return uA(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function pA(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function hA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
`}]}function mA(e,t){const n=t.value?t.value+`
`:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function gA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ji(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&lt(e.charCodeAt(n+1))&&lt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(l=String.fromCharCode(o,s),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function mw(e,t){const n=String(t.identifier).toUpperCase(),r=ji(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const l=e.footnoteCounts[n],s={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);const a={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,a),e.applyData(t,a)}function wA(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},mw(e,{type:"footnoteReference",identifier:i,position:t.position})}function xA(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vA(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function gw(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function kA(e,t){const n=e.definition(t.identifier);if(!n)return gw(e,t);const r={src:ji(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function SA(e,t){const n={src:ji(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function EA(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function CA(e,t){const n=e.definition(t.identifier);if(!n)return gw(e,t);const r={href:ji(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function bA(e,t){const n={href:ji(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function PA(e,t,n){const r=e.all(t),i=n?_A(n):yw(t),o={},l=[];if(typeof t.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:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
`}),c.type==="element"&&c.tagName==="p"&&!i?l.push(...c.children):l.push(c)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&l.push({type:"text",value:`
`});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function _A(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=yw(n[r])}return t}function yw(e){const t=e.spread;return t??e.children.length>1}function NA(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function TA(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AA(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function DA(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Td=ww("start"),Ad=ww("end");function LA(e){return{start:Td(e),end:Ad(e)}}function ww(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function MA(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Td(t.children[1]),a=Ad(t.children[t.children.length-1]);s.line&&a.line&&(l.position={start:s,end:a}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function RA(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,s=l?l.length:t.children.length;let a=-1;const u=[];for(;++a<s;){const f=t.children[a],d={},p=l?l[a]:void 0;p&&(d.align=p);let m={type:"element",tagName:o,properties:d,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(t,m)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function IA(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Em=9,Cm=32;function FA(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(bm(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(bm(t.slice(i),i>0,!1)),o.join("")}function bm(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Em||o===Cm;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Em||o===Cm;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function OA(e,t){const n={type:"text",value:FA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const $A={blockquote:pA,break:hA,code:mA,delete:gA,emphasis:yA,footnoteReference:mw,footnote:wA,heading:xA,html:vA,imageReference:kA,image:SA,inlineCode:EA,linkReference:CA,link:bA,listItem:PA,list:NA,paragraph:TA,root:AA,strong:DA,table:MA,tableCell:IA,tableRow:RA,text:OA,thematicBreak:zA,toml:Fl,yaml:Fl,definition:Fl,footnoteDefinition:Fl};function Fl(){return null}const Dd=function(e){if(e==null)return UA;if(typeof e=="string")return HA(e);if(typeof e=="object")return Array.isArray(e)?jA(e):BA(e);if(typeof e=="function")return wa(e);throw new Error("Expected function, string, or object as test")};function jA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dd(e[n]);return wa(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].call(this,...i))return!0;return!1}}function BA(e){return wa(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function HA(e){return wa(t);function t(n){return n&&n.type===e}}function wa(e){return t;function t(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&e.call(this,n,...r))}}function UA(){return!0}const VA=!0,Pm=!1,WA="skip",xw=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);const i=Dd(t),o=r?-1:1;l(e,void 0,[])();function l(s,a,u){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const d=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(s.type+(d?"<"+d+">":""))+")"})}return f;function f(){let d=[],p,m,g;if((!t||i(s,a,u[u.length-1]||null))&&(d=qA(n(s,u)),d[0]===Pm))return d;if(s.children&&d[0]!==WA)for(m=(r?s.children.length:-1)+o,g=u.concat(s);m>-1&&m<s.children.length;){if(p=l(s.children[m],m,g)(),p[0]===Pm)return p;m=typeof p[1]=="number"?p[1]:m+o}return d}}};function qA(e){return Array.isArray(e)?e:typeof e=="number"?[VA,e]:[e]}const Ld=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),xw(e,t,i,r);function i(o,l){const s=l[l.length-1];return n(o,s?s.children.indexOf(o):null,s)}};function KA(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const _m={}.hasOwnProperty;function XA(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Ld(e,"definition",r=>{const i=Nm(r.identifier);i&&!_m.call(t,i)&&(t[i]=r)}),n;function n(r){const i=Nm(r);return i&&_m.call(t,i)?t[i]:null}}function Nm(e){return String(e||"").toUpperCase()}const $s={}.hasOwnProperty;function YA(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return l.dangerous=r,l.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,l.footnoteLabel=n.footnoteLabel||"Footnotes",l.footnoteLabelTagName=n.footnoteLabelTagName||"h2",l.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},l.footnoteBackLabel=n.footnoteBackLabel||"Back to content",l.unknownHandler=n.unknownHandler,l.passThrough=n.passThrough,l.handlers={...$A,...n.handlers},l.definition=XA(e),l.footnoteById=i,l.footnoteOrder=[],l.footnoteCounts={},l.patch=GA,l.applyData=QA,l.one=s,l.all=a,l.wrap=JA,l.augment=o,Ld(e,"footnoteDefinition",u=>{const c=String(u.identifier).toUpperCase();$s.call(i,c)||(i[c]=u)}),l;function o(u,c){if(u&&"data"in u&&u.data){const f=u.data;f.hName&&(c.type!=="element"&&(c={type:"element",tagName:"",properties:{},children:[]}),c.tagName=f.hName),c.type==="element"&&f.hProperties&&(c.properties={...c.properties,...f.hProperties}),"children"in c&&c.children&&f.hChildren&&(c.children=f.hChildren)}if(u){const f="type"in u?u:{position:u};KA(f)||(c.position={start:Td(f),end:Ad(f)})}return c}function l(u,c,f,d){return Array.isArray(f)&&(d=f,f={}),o(u,{type:"element",tagName:c,properties:f||{},children:d||[]})}function s(u,c){return vw(l,u,c)}function a(u){return Md(l,u)}}function GA(e,t){e.position&&(t.position=LA(e))}function QA(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&o&&(n.properties={...n.properties,...o}),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function vw(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return $s.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:Md(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):ZA(e,t)}function Md(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i<r.length;){const o=vw(e,r[i],t);if(o){if(i&&r[i-1].type==="break"&&(!Array.isArray(o)&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&o.type==="element")){const l=o.children[0];l&&l.type==="text"&&(l.value=l.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function ZA(e,t){const n=t.data||{},r="value"in t&&!($s.call(n,"hProperties")||$s.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:Md(e,t)};return e.patch(t,r),e.applyData(t,r)}function JA(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function eD(e){const t=[];let n=-1;for(;++n<e.footnoteOrder.length;){const r=e.footnoteById[e.footnoteOrder[n]];if(!r)continue;const i=e.all(r),o=String(r.identifier).toUpperCase(),l=ji(o.toLowerCase());let s=0;const a=[];for(;++s<=e.footnoteCounts[o];){const f={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+l+(s>1?"-"+s:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};s>1&&f.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(s)}]}),a.length>0&&a.push({type:"text",value:" "}),a.push(f)}const u=i[i.length-1];if(u&&u.type==="element"&&u.tagName==="p"){const f=u.children[u.children.length-1];f&&f.type==="text"?f.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...a)}else i.push(...a);const c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+l},children:e.wrap(i,!0)};e.patch(r,c),t.push(c)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:`
`}]}}function kw(e,t){const n=YA(e,t),r=n.one(e,null),i=eD(n);return i&&r.children.push({type:"text",value:`
`},i),Array.isArray(r)?{type:"root",children:r}:r}const tD=function(e,t){return e&&"run"in e?nD(e,t):rD(e||t)};function nD(e,t){return(n,r,i)=>{e.run(kw(n,t),r,o=>{i(o)})}}function rD(e){return t=>kw(t,e)}var Sw={exports:{}},iD="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",oD=iD,lD=oD;function Ew(){}function Cw(){}Cw.resetWarningCache=Ew;var sD=function(){function e(r,i,o,l,s,a){if(a!==lD){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Cw,resetWarningCache:Ew};return n.PropTypes=n,n};Sw.exports=sD();var aD=Sw.exports;const he=Fi(aD);class ll{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ll.prototype.property={};ll.prototype.normal={};ll.prototype.space=null;function bw(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new ll(n,r,t)}function ef(e){return e.toLowerCase()}class Vt{constructor(t,n){this.property=t,this.attribute=n}}Vt.prototype.space=null;Vt.prototype.boolean=!1;Vt.prototype.booleanish=!1;Vt.prototype.overloadedBoolean=!1;Vt.prototype.number=!1;Vt.prototype.commaSeparated=!1;Vt.prototype.spaceSeparated=!1;Vt.prototype.commaOrSpaceSeparated=!1;Vt.prototype.mustUseProperty=!1;Vt.prototype.defined=!1;let uD=0;const me=Wr(),Be=Wr(),Pw=Wr(),Z=Wr(),Ne=Wr(),Si=Wr(),Ct=Wr();function Wr(){return 2**++uD}const tf=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:Be,commaOrSpaceSeparated:Ct,commaSeparated:Si,number:Z,overloadedBoolean:Pw,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),_u=Object.keys(tf);class Rd extends Vt{constructor(t,n,r,i){let o=-1;if(super(t,n),Tm(this,"space",i),typeof r=="number")for(;++o<_u.length;){const l=_u[o];Tm(this,_u[o],(r&tf[l])===tf[l])}}}Rd.prototype.defined=!0;function Tm(e,t,n){n&&(e[t]=n)}const cD={}.hasOwnProperty;function Bi(e){const t={},n={};let r;for(r in e.properties)if(cD.call(e.properties,r)){const i=e.properties[r],o=new Rd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ef(r)]=r,n[ef(o.attribute)]=r}return new ll(t,n,e.space)}const _w=Bi({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Nw=Bi({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Tw(e,t){return t in e?e[t]:t}function Aw(e,t){return Tw(e,t.toLowerCase())}const Dw=Bi({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Aw,properties:{xmlns:null,xmlnsXLink:null}}),Lw=Bi({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Be,ariaAutoComplete:null,ariaBusy:Be,ariaChecked:Be,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:Be,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:Be,ariaFlowTo:Ne,ariaGrabbed:Be,ariaHasPopup:null,ariaHidden:Be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:Z,ariaLive:null,ariaModal:Be,ariaMultiLine:Be,ariaMultiSelectable:Be,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:Be,ariaReadOnly:Be,ariaRelevant:null,ariaRequired:Be,ariaRoleDescription:Ne,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:Be,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null}}),fD=Bi({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Aw,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Si,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:Ne,autoFocus:me,autoPlay:me,blocking:Ne,capture:null,charSet:null,checked:me,cite:null,className:Ne,cols:Z,colSpan:null,content:null,contentEditable:Be,controls:me,controlsList:Ne,coords:Z|Si,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:Pw,draggable:Be,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:Ne,height:Z,hidden:me,high:Z,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:me,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:me,optimum:Z,pattern:null,ping:Ne,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:Ne,required:me,reversed:me,rows:Z,rowSpan:Z,sandbox:Ne,scope:null,scoped:me,seamless:me,selected:me,shadowRootClonable:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:Be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:Be,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:Be,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:me,disableRemotePlayback:me,prefix:null,property:null,results:Z,security:null,unselectable:null}}),dD=Bi({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Tw,properties:{about:Ct,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Ne,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Si,g2:Si,glyphName:Si,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:Ct,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ct,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ct,rev:Ct,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ct,requiredFeatures:Ct,requiredFonts:Ct,requiredFormats:Ct,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:Ct,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ct,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ct,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pD=/^data[-\w.:]+$/i,Am=/-[a-z]/g,hD=/[A-Z]/g;function mD(e,t){const n=ef(t);let r=t,i=Vt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pD.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Am,yD);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Am.test(o)){let l=o.replace(hD,gD);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Rd}return new i(r,t)}function gD(e){return"-"+e.toLowerCase()}function yD(e){return e.charAt(1).toUpperCase()}const Dm={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"},wD=bw([Nw,_w,Dw,Lw,fD],"html"),xD=bw([Nw,_w,Dw,Lw,dD],"svg");function vD(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{Ld(t,"element",(n,r,i)=>{const o=i;let l;if(e.allowedElements?l=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(l=e.disallowedElements.includes(n.tagName)),!l&&e.allowElement&&typeof r=="number"&&(l=!e.allowElement(n,r,o)),l&&typeof r=="number")return e.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}var Mw={exports:{}},Ce={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Id=Symbol.for("react.element"),Fd=Symbol.for("react.portal"),xa=Symbol.for("react.fragment"),va=Symbol.for("react.strict_mode"),ka=Symbol.for("react.profiler"),Sa=Symbol.for("react.provider"),Ea=Symbol.for("react.context"),kD=Symbol.for("react.server_context"),Ca=Symbol.for("react.forward_ref"),ba=Symbol.for("react.suspense"),Pa=Symbol.for("react.suspense_list"),_a=Symbol.for("react.memo"),Na=Symbol.for("react.lazy"),SD=Symbol.for("react.offscreen"),Rw;Rw=Symbol.for("react.module.reference");function Wt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Id:switch(e=e.type,e){case xa:case ka:case va:case ba:case Pa:return e;default:switch(e=e&&e.$$typeof,e){case kD:case Ea:case Ca:case Na:case _a:case Sa:return e;default:return t}}case Fd:return t}}}Ce.ContextConsumer=Ea;Ce.ContextProvider=Sa;Ce.Element=Id;Ce.ForwardRef=Ca;Ce.Fragment=xa;Ce.Lazy=Na;Ce.Memo=_a;Ce.Portal=Fd;Ce.Profiler=ka;Ce.StrictMode=va;Ce.Suspense=ba;Ce.SuspenseList=Pa;Ce.isAsyncMode=function(){return!1};Ce.isConcurrentMode=function(){return!1};Ce.isContextConsumer=function(e){return Wt(e)===Ea};Ce.isContextProvider=function(e){return Wt(e)===Sa};Ce.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Id};Ce.isForwardRef=function(e){return Wt(e)===Ca};Ce.isFragment=function(e){return Wt(e)===xa};Ce.isLazy=function(e){return Wt(e)===Na};Ce.isMemo=function(e){return Wt(e)===_a};Ce.isPortal=function(e){return Wt(e)===Fd};Ce.isProfiler=function(e){return Wt(e)===ka};Ce.isStrictMode=function(e){return Wt(e)===va};Ce.isSuspense=function(e){return Wt(e)===ba};Ce.isSuspenseList=function(e){return Wt(e)===Pa};Ce.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xa||e===ka||e===va||e===ba||e===Pa||e===SD||typeof e=="object"&&e!==null&&(e.$$typeof===Na||e.$$typeof===_a||e.$$typeof===Sa||e.$$typeof===Ea||e.$$typeof===Ca||e.$$typeof===Rw||e.getModuleId!==void 0)};Ce.typeOf=Wt;Mw.exports=Ce;var ED=Mw.exports;const CD=Fi(ED);function bD(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function PD(e){return e.join(" ").trim()}function _D(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Od={exports:{}},Lm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ND=/\n/g,TD=/^\s*/,AD=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,DD=/^:\s*/,LD=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,MD=/^[;\s]*/,RD=/^\s+|\s+$/g,ID=`
`,Mm="/",Rm="*",Cr="",FD="comment",OD="declaration",zD=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var g=m.match(ND);g&&(n+=g.length);var k=m.lastIndexOf(ID);r=~k?m.length-k:r+m.length}function o(){var m={line:n,column:r};return function(g){return g.position=new l(m),u(),g}}function l(m){this.start=m,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function s(m){var g=new Error(t.source+":"+n+":"+r+": "+m);if(g.reason=m,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function a(m){var g=m.exec(e);if(g){var k=g[0];return i(k),e=e.slice(k.length),g}}function u(){a(TD)}function c(m){var g;for(m=m||[];g=f();)g!==!1&&m.push(g);return m}function f(){var m=o();if(!(Mm!=e.charAt(0)||Rm!=e.charAt(1))){for(var g=2;Cr!=e.charAt(g)&&(Rm!=e.charAt(g)||Mm!=e.charAt(g+1));)++g;if(g+=2,Cr===e.charAt(g-1))return s("End of comment missing");var k=e.slice(2,g-2);return r+=2,i(k),e=e.slice(g),r+=2,m({type:FD,comment:k})}}function d(){var m=o(),g=a(AD);if(g){if(f(),!a(DD))return s("property missing ':'");var k=a(LD),h=m({type:OD,property:Im(g[0].replace(Lm,Cr)),value:k?Im(k[0].replace(Lm,Cr)):Cr});return a(MD),h}}function p(){var m=[];c(m);for(var g;g=d();)g!==!1&&(m.push(g),c(m));return m}return u(),p()};function Im(e){return e?e.replace(RD,Cr):Cr}var $D=zD;function Iw(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=$D(e),o=typeof t=="function",l,s,a=0,u=i.length;a<u;a++)r=i[a],l=r.property,s=r.value,o?t(l,s,r):s&&(n||(n={}),n[l]=s);return n}Od.exports=Iw;Od.exports.default=Iw;var jD=Od.exports;const BD=Fi(jD),nf={}.hasOwnProperty,HD=new Set(["table","thead","tbody","tfoot","tr"]);function Fw(e,t){const n=[];let r=-1,i;for(;++r<t.children.length;)i=t.children[r],i.type==="element"?n.push(UD(e,i,r,t)):i.type==="text"?(t.type!=="element"||!HD.has(t.tagName)||!bD(i))&&n.push(i.value):i.type==="raw"&&!e.options.skipHtml&&n.push(i.value);return n}function UD(e,t,n,r){const i=e.options,o=i.transformLinkUri===void 0?W_:i.transformLinkUri,l=e.schema,s=t.tagName,a={};let u=l,c;if(l.space==="html"&&s==="svg"&&(u=xD,e.schema=u),t.properties)for(c in t.properties)nf.call(t.properties,c)&&WD(a,c,t.properties[c],e);(s==="ol"||s==="ul")&&e.listDepth++;const f=Fw(e,t);(s==="ol"||s==="ul")&&e.listDepth--,e.schema=l;const d=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=i.components&&nf.call(i.components,s)?i.components[s]:s,m=typeof p=="string"||p===U.Fragment;if(!CD.isValidElementType(p))throw new TypeError(`Component for name \`${s}\` not defined or is not renderable`);if(a.key=n,s==="a"&&i.linkTarget&&(a.target=typeof i.linkTarget=="function"?i.linkTarget(String(a.href||""),t.children,typeof a.title=="string"?a.title:null):i.linkTarget),s==="a"&&o&&(a.href=o(String(a.href||""),t.children,typeof a.title=="string"?a.title:null)),!m&&s==="code"&&r.type==="element"&&r.tagName!=="pre"&&(a.inline=!0),!m&&(s==="h1"||s==="h2"||s==="h3"||s==="h4"||s==="h5"||s==="h6")&&(a.level=Number.parseInt(s.charAt(1),10)),s==="img"&&i.transformImageUri&&(a.src=i.transformImageUri(String(a.src||""),String(a.alt||""),typeof a.title=="string"?a.title:null)),!m&&s==="li"&&r.type==="element"){const g=VD(t);a.checked=g&&g.properties?!!g.properties.checked:null,a.index=Nu(r,t),a.ordered=r.tagName==="ol"}return!m&&(s==="ol"||s==="ul")&&(a.ordered=s==="ol",a.depth=e.listDepth),(s==="td"||s==="th")&&(a.align&&(a.style||(a.style={}),a.style.textAlign=a.align,delete a.align),m||(a.isHeader=s==="th")),!m&&s==="tr"&&r.type==="element"&&(a.isHeader=r.tagName==="thead"),i.sourcePos&&(a["data-sourcepos"]=XD(d)),!m&&i.rawSourcePos&&(a.sourcePosition=t.position),!m&&i.includeElementIndex&&(a.index=Nu(r,t),a.siblingCount=Nu(r)),m||(a.node=t),f.length>0?U.createElement(p,a,f):U.createElement(p,a)}function VD(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n.type==="element"&&n.tagName==="input")return n}return null}function Nu(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)e.children[n].type==="element"&&r++;return r}function WD(e,t,n,r){const i=mD(r.schema,t);let o=n;o==null||o!==o||(Array.isArray(o)&&(o=i.commaSeparated?_D(o):PD(o)),i.property==="style"&&typeof o=="string"&&(o=qD(o)),i.space&&i.property?e[nf.call(Dm,i.property)?Dm[i.property]:i.property]=o:i.attribute&&(e[i.attribute]=o))}function qD(e){const t={};try{BD(e,n)}catch{}return t;function n(r,i){const o=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;t[o.replace(/-([a-z])/g,KD)]=i}}function KD(e,t){return t.toUpperCase()}function XD(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}const Fm={}.hasOwnProperty,YD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ol={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function hr(e){for(const o in Ol)if(Fm.call(Ol,o)&&Fm.call(e,o)){const l=Ol[o];console.warn(`[react-markdown] Warning: please ${l.to?`use \`${l.to}\` instead of`:"remove"} \`${o}\` (see <${YD}#${l.id}> for more info)`),delete Ol[o]}const t=sN().use(dA).use(e.remarkPlugins||[]).use(tD,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(vD,e),n=new G1;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=U.createElement(U.Fragment,{},Fw({options:e,schema:wD,listDepth:0},r));return e.className&&(i=U.createElement("div",{className:e.className},i)),i}hr.propTypes={children:he.string,className:he.string,allowElement:he.func,allowedElements:he.arrayOf(he.string),disallowedElements:he.arrayOf(he.string),unwrapDisallowed:he.bool,remarkPlugins:he.arrayOf(he.oneOfType([he.object,he.func,he.arrayOf(he.oneOfType([he.bool,he.string,he.object,he.func,he.arrayOf(he.any)]))])),rehypePlugins:he.arrayOf(he.oneOfType([he.object,he.func,he.arrayOf(he.oneOfType([he.bool,he.string,he.object,he.func,he.arrayOf(he.any)]))])),sourcePos:he.bool,rawSourcePos:he.bool,skipHtml:he.bool,includeElementIndex:he.bool,transformLinkUri:he.oneOfType([he.func,he.bool]),linkTarget:he.oneOfType([he.func,he.string]),transformImageUri:he.func,components:he.object};const zd={pattern:"^[A-Za-z][\\w]*$",title:"Name must start with a letter, and contain only alphanumerics and '_'"},Ow="widget",$d="systemFlow";function Nn(e){return e==="ExtensiblePort"||e==="ModeVarPort"}function sl(e,t,n){const r=t.find(({name:i})=>i===e);if(!r)throw new Error(`${n} ${e} not found.`);return r}const Co=(e,t)=>sl(e,t,"System"),GD=(e,t)=>sl(e,t,"Port"),zw=(e,t)=>sl(e,t,"System");function gn(e,t,n){const{systems:r}=zw(t,n);return sl(e,r,"System class")}function $w(e,t,n){const{ports:r}=zw(t,n);return sl(e,r,"Port class")}function ts(e,{inputs:t,outputs:n}){const r=s=>{const a=s.find(({name:u})=>u===e);return a&&{name:a.type,pack:a.pack}},i=r(t||[]),o=r(n||[]);if(i&&o)throw new Error(`Port ${e} in both inputs and outputs.`);const l=i||o;if(!l)throw new Error(`Port ${e} not found.`);return l}function jw(e,{inputs:t,outputs:n}){const r=(t||[]).some(({name:o})=>o===e),i=(n||[]).some(({name:o})=>o===e);if(r===i)throw new Error(`Port ${e} in both inputs and outputs.`);return r}function QD(e,t,n,r){const{port:i}=t,{type:o,pack:l}=Co(e,n),s=gn(o,l,r),a=jw(i,s),u=a?"pullingsIn":e,c=a?e:"pullingsOut",f=t.portMapping||i;return{id:`${e}.${i}.${a?u:c}.${f}`,type:"PullingEdge",source:u,sourceHandle:a?f:i,target:c,targetHandle:a?i:f}}function rf(e,t,n){let r;if(Nn(e.type)){const{inputs:i,outputs:o}=gn(t.type,t.pack,n),l=[...i||[],...o||[]];r=GD(e.name,l).variables||[]}else({variables:r}=$w(e.type,e.pack,n));return r}function of(e){const t=e;return Object.entries(e).forEach(([n,r])=>{const i=document.getElementById(Ow);if(!i)throw new Error("Widget not found.");n==="top"||n==="left"?t[n]=r-i.getBoundingClientRect()[n]:(n==="right"||n==="bottom")&&(t[n]=i.getBoundingClientRect()[n]-r)}),t}function Bw({clientX:e,clientY:t}){const{top:n,left:r}=of({left:e,top:t});if(!n||!r)throw new Error("Can't find position.");return{top:n,left:r}}function lf({clientX:e,clientY:t},n,r){let i={x:0,y:0};if(n!==null){const o=n.getBoundingClientRect();r&&(i=r.project({x:e-o.left,y:t-o.top}))}return i}function jd(e,t,n,r){let i;const o=n[t];if(o){const s=[...o],a=s.findIndex(({port:u})=>u===e.port);a>-1?s[a]=e:s.push(e),i=s}else i=[e];const l={...n};l[t]=i,r({newSysPullsDict:l})}function Om(e,t){const n=l=>t.some(({name:s})=>s===l),r=e.charAt(0).toLowerCase()+e.slice(1);let i=n(r),o=-1;for(;i;)o+=1,i=n(r+o);return o===-1?r:r+o}function zm(e,t){return e.map(n=>({...n,pullings:t[n.name]}))}function Hw({type:e,name:t},{type:n,name:r}){return e==="ExtensiblePort"?-1:n==="ExtensiblePort"?1:e==="ModeVarPort"?-1:n==="ModeVarPort"?1:e===n?t>r?1:-1:e>n?1:-1}function ZD({sysType:e}){const[t,n]=P.useState(!1),[r,i]=P.useState(0),[o,l]=P.useState(0),s=d=>{d.dataTransfer.setData("application/reactflow",JSON.stringify(e)),d.dataTransfer.effectAllowed="move",n(!1)},a=()=>{const d=document.getElementById(e.name);if(!d)throw new Error(`${e.name} not found.`);const p=d.getBoundingClientRect();l(of({right:p.right}).right||0),n(!0)},u=d=>{t||n(!0),i((of({top:d.clientY}).top||0)+50)},{kwargs:c={}}=e,f=Object.entries(c).map(([d,p])=>`\`${d}\` \`=\` \`${p}\``).join(`

`);return D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"hiddenOverflow dragNode",id:e.name,onDragStart:s,draggable:!0,onMouseEnter:a,onMouseMove:u,onMouseLeave:()=>n(!1),children:[D.jsx("div",{className:"flowNode"}),e.name]}),t?D.jsxs("div",{className:"hover nodeHover",style:{top:r,right:o,minWidth:"150px"},children:[D.jsx(hr,{className:"center",children:`${e.name}${e.name!==e.className?` (\`${e.className}\`)`:""}`}),e.desc?D.jsx(hr,{children:`

${e.desc}

${f}`}):""]}):""]})}function JD(e){const{folders:t,systemList:n}=e.treeData,[r,i]=P.useState(!0),o=r?"var(--sidebarFolderBorder)":"",l=r?D.jsx(D.Fragment,{children:"▽"}):D.jsx(D.Fragment,{children:"▷"}),s=r?"block":"none",a=n.sort((u,c)=>u.name>c.name?1:-1).map(u=>D.jsx(ZD,{sysType:u},u.name));return D.jsxs("div",{className:"folderContainer",children:[D.jsxs("button",{type:"button",className:"hiddenOverflow",onClick:()=>i(!r),style:{borderBottom:o},children:[D.jsx("div",{className:"symbol",children:l}),e.name]}),D.jsxs("div",{className:"folder",style:{display:s},children:[D.jsx(Uw,{tree:t}),a]})]})}function Uw({tree:e}){return D.jsx(D.Fragment,{children:Object.entries(e).sort(([t],[n])=>t>n?1:-1).map(([t,n])=>D.jsx(JD,{name:t,treeData:n},t))})}const eL=(e,t)=>{const n=t.folders;let r=n[e];return r||(n[e]={folders:{},systemList:[]},r=n[e]),r};function Vw(e){let t;const n=Object.values(e);if(n.length===1){const{folders:r,systemList:i}=n[0];t=i.length===0?Vw(r):e}return t||e}function tL(e){const t={folders:{},systemList:[]};e.systems.forEach(i=>{let o=t;i.mod.split(".").forEach(l=>{o=eL(l,o)}),o.systemList.push(i)});const n=Vw({mock:t}),r=Object.keys(n);return r.length===1&&r[0]===e.name?n:{[e.name]:{folders:n,systemList:[]}}}function nL(e){return D.jsx("aside",{className:"hiddenOverflow sidebar dragDropSidebar",children:D.jsxs("div",{className:"ltr",children:[D.jsx("div",{className:"title",children:"Packages"}),D.jsx("div",{className:"tree",children:e.packages.map(t=>D.jsx(Uw,{tree:tL(t)},t.name))})]})})}function rL(e){const{index:t,name:n,dragFrom:r,setDragFrom:i,dragTo:o,setDragTo:l,systemList:s}=e,a=P.useRef(null),[u,c]=P.useState(!1),[f,d]=P.useState(!1),[p,m]=P.useState({top:0,left:0}),g=()=>{i(-1),l(-1)},k=_=>{i(t),_.dataTransfer.setData("text/html","")},h=()=>{if(r!==-1&&o!==-1){const _=s[r];let S=[...s];S.splice(r,1),S=[...S.slice(0,o),_,...S.slice(o)],e.setSystemList(S),g()}},y=_=>{if(_.preventDefault(),r!==-1){const S=t;S!==o&&l(S)}},w=()=>{let _="hiddenOverflow flowNode system";return t===r?_+=" selectedSys":t===o&&(_+=" dropArea"),_};P.useEffect(()=>{if(!a.current)throw new Error("Element does not exists.");const{scrollWidth:_,offsetWidth:S}=a.current;c(S-_<6)},[]);const v=_=>{f||d(!0);const{top:S,left:N}=Bw(_);m({top:S+50,left:N+8})};return D.jsxs("div",{children:[D.jsx("div",{ref:a,draggable:!0,onDragStart:k,onDrop:h,onDragOver:y,onDragLeave:()=>l(-1),className:w(),onMouseEnter:()=>d(!0),onMouseMove:v,onMouseLeave:()=>d(!1),children:n}),u&&f?D.jsx("div",{className:"hover",style:p,children:D.jsx(hr,{children:`\`${n}\``})}):""]})}function iL(e){return D.jsxs("div",{className:"checkMenu",children:[D.jsx("div",{className:"title",children:"Checks"}),D.jsx("button",{type:"button",onClick:()=>e.checkLoops(),children:"Check loops"}),D.jsx("button",{type:"button",onClick:()=>e.checkLoops(!0),children:"Mathematical problem"})]})}function oL(e){const{systemList:t}=e,[n,r]=P.useState(-1),[i,o]=P.useState(-1);return D.jsxs("div",{className:"sidebar execOrderSidebar",children:[D.jsx("div",{className:"title",children:"Execution order"}),D.jsx("div",{className:"orderList",children:e.systemList.length>0?e.systemList.map(l=>D.jsx(rL,{name:l.name,index:t.indexOf(l),dragFrom:n,setDragFrom:r,dragTo:i,setDragTo:o,systemList:t,setSystemList:e.setSystemList},l.name)):D.jsx("div",{style:{textAlign:"justify"},children:"Empty"})}),D.jsx(iL,{checkLoops:e.checkLoops})]})}const Ww=e=>`${e.system}.${e.port}.${e.var}`,lL=e=>`
- ${Ww(e)}`;function sL(e){const{label:t,desc:n,isSource:r,connections:i,setMousePos:o,setHoverTxt:l}=e.data,s=f=>{(i||n)&&o(f)},a=f=>{s(f);const d=n?`${n}

`:"";if(i){const p=`-------
Already connected to `,m=i.length>1?`: 
${i.map(lL).join("")}`:i.map(Ww);l(d+p+m)}else n&&l(d)},u=()=>{l("")},c=()=>{const f=i!==void 0;return`flowNode ${f?"connNode":""} ${f&&!r?"forbiddenNode":""}`};return D.jsx(D.Fragment,{children:D.jsxs("div",{className:c(),onMouseEnter:a,onMouseMove:s,onMouseLeave:u,children:[t,i&&!r?"":D.jsx(Ii,{type:r?"source":"target",position:r?oe.Right:oe.Left})]})})}function aL(e,{clientX:t,clientY:n}){const r=e.getBoundingClientRect();return r.left<t&&t<r.right&&r.top<n&&n<r.bottom}function qw(e){const t=P.useRef(null),{elementId:n}=e,r=n?document.getElementById(n):document,i=P.useCallback(o=>{if(o instanceof MouseEvent){const{current:l}=t;l&&!aL(l,o)&&e.closePopUp()}else throw new Error(`This event is not a ${MouseEvent.name}`)},[]);return r&&r.addEventListener("mouseup",i),P.useEffect(()=>r?()=>r.removeEventListener("mouseup",i):()=>"",[]),D.jsx("div",{ref:t,className:`popUp ${e.className||""}`,style:e.style,children:e.children})}function al(e){return D.jsx(D.Fragment,{children:D.jsx("div",{className:"popUpBackground",style:{zIndex:4},children:D.jsx(qw,{elementId:$d,...e,className:`centerPopUp ${e.className}`})})})}function uL(e){return D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"popUpBackground"}),D.jsx(qw,{...e})]})}function Bd(e){const[t,n]=P.useState(void 0),{mousePos:r}=e;return P.useEffect(()=>{n(Bw(r))},[r]),D.jsx(uL,{...e,style:t})}function Hd({closePopUp:e}){return D.jsxs("div",{className:"controls",children:[D.jsx("button",{type:"button",onClick:e,children:"🗙"}),D.jsx("button",{type:"submit",children:"Ok"})]})}function Ud({closePopUp:e,handleOk:t}){const n=r=>{t(),r.preventDefault()};return D.jsx("form",{onSubmit:n,className:"formPopUp",children:D.jsx(Hd,{closePopUp:e})})}const cL={VariableNode:sL},ns=(e,t)=>`${e}.${t}`,Tu=(e,t)=>{const n=ns(e.system,e.varName),r=ns(t.system,t.varName);return{id:ns(n,r),source:n,target:r}},Au=(e,t,n)=>{const r=n[e];r?r.push(t):n[e]=[t]};function fL(e){const{connectionList:t,sysPullsDict:n,index:r}=e,{from:i,to:o}=e.ports,{from:l,to:s}=e.systems,[a,u]=P.useState(!1),[c,f]=P.useState([]),[d,p]=P.useState([]),m=P.useRef(null),[g,k]=P.useState(),[h,y]=P.useState({clientX:0,clientY:0}),[w,v]=P.useState(""),[_,S]=P.useState({left:0,top:0}),[N]=P.useState({x:200,y:36});P.useEffect(()=>{if(w!==""){const $=lf(h,m.current,g),R={left:$.x+N.x,top:$.y+N.y};S(R)}},[h]);const A=l.name,L=s.name,b=rf(i,l,e.packages),M=rf(o,s,e.packages);P.useEffect(()=>{if(!a){u(!0);const $={},R={};t.forEach(({systems:G,ports:J,variables:O},H)=>{if(H!==r){const K=O||[];G.from===A&&J.from===i.name?K.forEach(X=>Au(X.from,{system:G.to,port:J.to,var:X.to},$)):G.to===L&&J.to===o.name&&K.forEach(X=>Au(X.to,{system:G.from,port:J.from,var:X.from},R))}});const T=(G,J,O)=>{const H=n[G];if(H){const K=H.find(({port:Y})=>Y===J),X=K==null?void 0:K.variables;K&&X&&X.forEach(({name:Y,mapping:ee})=>Au(Y,{system:"ParentSystem",port:K.port,var:ee||Y},O))}};T(A,i.name,$),T(L,o.name,R);const x=(G,J,O,H)=>G.map(({name:K,desc:X},Y)=>({id:ns(J,K),position:{x:H?0:275,y:Y*50+10},data:{label:K,isSource:H,desc:X,connections:O[K],setHoverTxt:v,setMousePos:y},type:"VariableNode"})),j=x(b,A,$,!0),V=x(M,L,R,!1);f([...j,...V]);let C;if(r!==-1){const{variables:G}=t[r];G?C=G.map(({from:J,to:O})=>Tu({system:A,varName:J},{system:L,varName:O})):i.type===o.type?C=b.map(({name:J})=>Tu({system:A,varName:J},{system:L,varName:J})):C=[]}else C=b.filter(({name:G})=>{const J=R[G],O=M.some(H=>H.name===G);return!J&&O}).map(({name:G})=>Tu({system:A,varName:G},{system:L,varName:G}));p(C)}});const z=P.useCallback($=>p(R=>{const T=c.filter(({id:x})=>x===$.target);return ha(T,R).length<1?f1($,R):R}),[c]),B=P.useCallback($=>p(R=>L1($,R)),[]),E=()=>{const $=[...t];if(r>-1&&$.splice(r,1),d.length>0){const R=d.flatMap(({source:T,target:x})=>{var C,G;const j=(C=c.find(({id:J})=>J===T))==null?void 0:C.data,V=(G=c.find(({id:J})=>J===x))==null?void 0:G.data;return j&&V?{from:j.label,to:V.label}:[]});$.push({systems:{from:A,to:L},ports:{from:i.name,to:o.name},variables:R})}e.getConnErrors({newConnectionList:$})},F=()=>{e.setIndex(-1),e.setShow(!1)};P.useEffect(()=>{a&&F()},[e.connectionList]);let I=0;return b&&M&&(I=b.length>M.length?b.length:M.length),D.jsx(D.Fragment,{children:D.jsxs(al,{className:"connPopUp",closePopUp:F,children:[D.jsxs("div",{className:"title",children:[D.jsx("div",{children:`${A}: ${i.name}`}),D.jsx("div",{children:`${L}: ${o.name}`})]}),D.jsx(ma,{children:D.jsx("div",{className:"connFlowContainer",ref:m,style:{height:`min(${I*50}px, calc(var(--flowMinHeight) - 5px))`},children:D.jsx(Pd,{nodes:c,edges:d,onConnect:z,onEdgesChange:B,nodeTypes:cL,fitView:!0,onInit:$=>k($),panOnDrag:!1,panOnScroll:!0,panOnScrollMode:nr.Vertical,autoPanOnConnect:!1,zoomOnScroll:!1,zoomOnPinch:!1,zoomOnDoubleClick:!1,selectionKeyCode:null,deleteKeyCode:"Delete"})})}),w!==""?D.jsx("div",{className:"hover",style:_,children:D.jsx(hr,{children:w})}):"",D.jsx(Ud,{handleOk:E,closePopUp:F})]})})}function dL(e){return D.jsx(D.Fragment,{children:e.formState.map(t=>{const{id:n,isChecked:r,mapping:i}=t;return D.jsxs("div",{className:"field",children:[D.jsx("div",{className:"hiddenOverflow label",children:D.jsx("label",{htmlFor:n,children:`${n}: `})}),D.jsxs("div",{className:"inputs",children:[D.jsx("input",{type:"checkbox",id:n,value:n,checked:r,onChange:o=>e.onCheckboxChange(o,t)}),D.jsx("input",{type:"text",className:"defaultTextInput",id:n,value:i,onChange:o=>e.onInputChange(o,t),placeholder:"Name mapping",...zd})]})]},n)})})}function pL(e){const{portName:t,sysPullsDict:n,getConnErrors:r}=e,[i,o]=P.useState(!1),l=()=>e.setShow(!1),a=(n[e.systemName]||[]).find(({port:h,variables:y})=>y&&h===t),u=(a==null?void 0:a.variables)||[],c=u.length===0,f=e.portVar.map(({name:h})=>{const y=u.find(_=>_.name===h),w=y?!0:c,v=y?y.mapping:void 0;return{id:h,mapping:v||w?h:"",isChecked:w}}),[d,p]=P.useState(f),m=(h,y)=>{const w=d.map(v=>v.id===y.id?{...v,isChecked:h.target.checked,mapping:h.target.checked?v.mapping:""}:v);p(w)},g=(h,y)=>{const w=d.map(v=>v.id===y.id?{...v,mapping:h.target.value,isChecked:h.target.value!==""}:v);p(w)},k=h=>{const y=d.filter(({isChecked:w,mapping:v})=>w||v!=="").map(({id:w,mapping:v})=>({name:w,mapping:v||w}));if(y.length>0)jd({port:t,variables:y},e.systemName,n,r);else{const w={};Object.entries(n).forEach(([v,_])=>{v!==e.systemName&&(w[v]=_)}),r({newSysPullsDict:w})}h.preventDefault()};return P.useEffect(()=>{o(!0)},[]),P.useEffect(()=>{i&&e.setShow(!1)},[n]),D.jsx(Bd,{closePopUp:l,mousePos:e.mousePos,elementId:$d,children:D.jsxs("form",{onSubmit:k,action:"demo",className:"formPopUp",children:[D.jsx(dL,{formState:d,onCheckboxChange:m,onInputChange:g}),D.jsx(Hd,{closePopUp:l})]})})}function hL(e){const{infos:t,setShow:n}=e,{portName:r}=t,[i,o]=P.useState(t.mapping||r),l=P.useRef(null);P.useEffect(()=>{var a;return(a=l.current)==null?void 0:a.select()},[]);const s=a=>{if(a.key==="Enter"){const u=l.current;u&&u.reportValidity()&&(jd({port:r,portMapping:i!==""?i:r},t.systemName,e.sysPullsDict,e.getConnErrors),n(!1))}a.preventDefault()};return D.jsx(Bd,{className:"fullPullPopUp",mousePos:e.mousePos,closePopUp:()=>n(!1),children:D.jsx("input",{ref:l,type:"text",className:"defaultTextInput portName",value:i,placeholder:"Name mapping",...zd,required:!0,onChange:a=>o(a.target.value),onKeyUp:s})})}const mL={tokenize:kL,partial:!0},Kw={tokenize:SL,partial:!0},Xw={tokenize:EL,partial:!0},Yw={tokenize:CL,partial:!0},gL={tokenize:bL,partial:!0},Gw={tokenize:xL,previous:Zw},Qw={tokenize:vL,previous:Jw},zn={tokenize:wL,previous:ex},wn={},yL={text:wn};let vr=48;for(;vr<123;)wn[vr]=zn,vr++,vr===58?vr=65:vr===91&&(vr=97);wn[43]=zn;wn[45]=zn;wn[46]=zn;wn[95]=zn;wn[72]=[zn,Qw];wn[104]=[zn,Qw];wn[87]=[zn,Gw];wn[119]=[zn,Gw];function wL(e,t,n){const r=this;let i,o;return l;function l(f){return!sf(f)||!ex.call(r,r.previous)||Vd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return sf(f)?(e.consume(f),s):f===64?(e.consume(f),a):n(f)}function a(f){return f===46?e.check(gL,c,u)(f):f===45||f===95||lt(f)?(o=!0,e.consume(f),a):c(f)}function u(f){return e.consume(f),i=!0,a}function c(f){return o&&i&&ft(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function xL(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Zw.call(r,r.previous)||Vd(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mL,e.attempt(Kw,e.attempt(Xw,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function vL(e,t,n){const r=this;let i="",o=!1;return l;function l(f){return(f===72||f===104)&&Jw.call(r,r.previous)&&!Vd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(ft(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),a}return n(f)}function a(f){return f===47?(e.consume(f),o?u:(o=!0,a)):n(f)}function u(f){return f===null||Os(f)||be(f)||Br(f)||ga(f)?n(f):e.attempt(Kw,e.attempt(Xw,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function kL(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function SL(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(Yw,a,s)(u):u===null||be(u)||Br(u)||u!==45&&ga(u)?a(u):(o=!0,e.consume(u),l)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function a(u){return i||r||!o?n(u):t(u)}}function EL(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Yw,t,o)(l):l===null||be(l)||Br(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function CL(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||be(s)||Br(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||be(s)||Br(s)?t(s):r(s)}function o(s){return ft(s)?l(s):n(s)}function l(s){return s===59?(e.consume(s),r):ft(s)?(e.consume(s),l):n(s)}}function bL(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return lt(o)?n(o):t(o)}}function Zw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||be(e)}function Jw(e){return!ft(e)}function ex(e){return!(e===47||sf(e))}function sf(e){return e===43||e===45||e===46||e===95||lt(e)}function Vd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const PL={tokenize:RL,partial:!0};function _L(){return{document:{91:{tokenize:DL,continuation:{tokenize:LL},exit:ML}},text:{91:{tokenize:AL},93:{add:"after",tokenize:NL,resolveTo:TL}}}}function NL(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){l=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!l||!l._balanced)return n(a);const u=rn(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function TL(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function AL(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!l||f===null||f===91||be(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(rn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return be(f)||(l=!0),o++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,u):u(f)}}function DL(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,s;return a;function a(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(l>999||m===93&&!s||m===null||m===91||be(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return o=rn(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return be(m)||(s=!0),l++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),l++,c):c(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),ve(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function LL(e,t,n){return e.check(ol,t,e.attempt(PL,t,n))}function ML(e){e.exit("gfmFootnoteDefinition")}function RL(e,t,n){const r=this;return ve(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function IL(e){let n=(e||{}).singleTilde;const r={tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,s){let a=-1;for(;++a<l.length;)if(l[a][0]==="enter"&&l[a][1].type==="strikethroughSequenceTemporary"&&l[a][1]._close){let u=a;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[a][1].end.offset-l[a][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[a][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[a][1].end)},f={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[a][1].start)},d=[["enter",c,s],["enter",l[u][1],s],["exit",l[u][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&Nt(d,d.length,0,ya(p,l.slice(u+1,a),s)),Nt(d,d.length,0,[["exit",f,s],["enter",l[a][1],s],["exit",l[a][1],s],["exit",c,s]]),Nt(l,u-1,a-u+3,d),a=u+d.length-2;break}}for(a=-1;++a<l.length;)l[a][1].type==="strikethroughSequenceTemporary"&&(l[a][1].type="data");return l}function o(l,s,a){const u=this.previous,c=this.events;let f=0;return d;function d(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(m):(l.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const g=zs(u);if(m===126)return f>1?a(m):(l.consume(m),f++,p);if(f<2&&!n)return a(m);const k=l.exit("strikethroughSequenceTemporary"),h=zs(m);return k._open=!h||h===2&&!!g,k._close=!g||g===2&&!!h,s(m)}}}class FL{constructor(){this.map=[]}add(t,n,r){OL(this,t,n,r)}consume(t){if(this.map.sort((o,l)=>o[0]-l[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function OL(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function zL(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}const $L={flow:{null:{tokenize:jL,resolveAll:BL}}};function jL(e,t,n){const r=this;let i=0,o=0,l;return s;function s(b){let M=r.events.length-1;for(;M>-1;){const E=r.events[M][1].type;if(E==="lineEnding"||E==="linePrefix")M--;else break}const z=M>-1?r.events[M][1].type:null,B=z==="tableHead"||z==="tableRow"?S:a;return B===S&&r.parser.lazy[r.now().line]?n(b):B(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(l=!0,o+=1),c(b)}function c(b){return b===null?n(b):ue(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):we(b)?ve(e,c,"whitespace")(b):(o+=1,l&&(l=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),l=!0,c):(e.enter("data"),f(b)))}function f(b){return b===null||b===124||be(b)?(e.exit("data"),c(b)):(e.consume(b),b===92?d:f)}function d(b){return b===92||b===124?(e.consume(b),f):f(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),l=!1,we(b)?ve(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):m(b))}function m(b){return b===45||b===58?k(b):b===124?(l=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),g):_(b)}function g(b){return we(b)?ve(e,k,"whitespace")(b):k(b)}function k(b){return b===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),h):b===45?(o+=1,h(b)):b===null||ue(b)?v(b):_(b)}function h(b){return b===45?(e.enter("tableDelimiterFiller"),y(b)):_(b)}function y(b){return b===45?(e.consume(b),y):b===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(b))}function w(b){return we(b)?ve(e,v,"whitespace")(b):v(b)}function v(b){return b===124?m(b):b===null||ue(b)?!l||i!==o?_(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):_(b)}function _(b){return n(b)}function S(b){return e.enter("tableRow"),N(b)}function N(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),N):b===null||ue(b)?(e.exit("tableRow"),t(b)):we(b)?ve(e,N,"whitespace")(b):(e.enter("data"),A(b))}function A(b){return b===null||b===124||be(b)?(e.exit("data"),N(b)):(e.consume(b),b===92?L:A)}function L(b){return b===92||b===124?(e.consume(b),A):A(b)}}function BL(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],s=!1,a=0,u,c,f;const d=new FL;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,a!==0&&($m(d,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],l=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],f=zl(d,t,o,i,void 0,f),o=[0,0,0,0]),l[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],f=zl(d,t,o,i,void 0,f)),o=l,l=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,a=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(a=n,o[1]!==0?(l[0]=l[1],f=zl(d,t,o,i,n,f)):l[1]!==0&&(f=zl(d,t,l,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=n)}for(a!==0&&$m(d,t,a,u,c),d.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=zL(t.events,n))}return e}function zl(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Zr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=Zr(t.events,n[1]);if(o={type:l,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Zr(t.events,n[2]),c=Zr(t.events,n[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const d=t.events[n[2]],p=t.events[n[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,g=n[3]-n[2]-1;e.add(m,g,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},Zr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function $m(e,t,n,r,i){const o=[],l=Zr(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Zr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const HL={tokenize:VL},UL={text:{91:HL}};function VL(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return be(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),l):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),l):n(a)}function l(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return ue(a)?t(a):we(a)?e.check({tokenize:WL},t,n)(a):n(a)}}function WL(e,t,n){return ve(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function qL(e){return tw([yL,_L(),IL(e),$L,UL])}function jm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function KL(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const XL={}.hasOwnProperty,YL=function(e,t,n,r){let i,o;typeof t=="string"||t instanceof RegExp?(o=[[t,n]],i=r):(o=t,i=n),i||(i={});const l=Dd(i.ignore||[]),s=GL(o);let a=-1;for(;++a<s.length;)xw(e,"text",u);return e;function u(f,d){let p=-1,m;for(;++p<d.length;){const g=d[p];if(l(g,m?m.children.indexOf(g):void 0,m))return;m=g}if(m)return c(f,d)}function c(f,d){const p=d[d.length-1],m=s[a][0],g=s[a][1];let k=0;const h=p.children.indexOf(f);let y=!1,w=[];m.lastIndex=0;let v=m.exec(f.value);for(;v;){const _=v.index,S={index:v.index,input:v.input,stack:[...d,f]};let N=g(...v,S);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N!==!1&&(k!==_&&w.push({type:"text",value:f.value.slice(k,_)}),Array.isArray(N)?w.push(...N):N&&w.push(N),k=_+v[0].length,y=!0),!m.global)break;v=m.exec(f.value)}return y?(k<f.value.length&&w.push({type:"text",value:f.value.slice(k)}),p.children.splice(h,1,...w)):w=[f],h+w.length}};function GL(e){const t=[];if(typeof e!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let n=-1;for(;++n<e.length;)t.push([Bm(e[n][0]),Hm(e[n][1])])}else{let n;for(n in e)XL.call(e,n)&&t.push([Bm(n),Hm(e[n])])}return t}function Bm(e){return typeof e=="string"?new RegExp(KL(e),"g"):e}function Hm(e){return typeof e=="function"?e:()=>e}const Du="phrasing",Lu=["autolink","link","image","label"],QL={transforms:[i4],enter:{literalAutolink:JL,literalAutolinkEmail:Mu,literalAutolinkHttp:Mu,literalAutolinkWww:Mu},exit:{literalAutolink:r4,literalAutolinkEmail:n4,literalAutolinkHttp:e4,literalAutolinkWww:t4}},ZL={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Du,notInConstruct:Lu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Du,notInConstruct:Lu},{character:":",before:"[ps]",after:"\\/",inConstruct:Du,notInConstruct:Lu}]};function JL(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Mu(e){this.config.enter.autolinkProtocol.call(this,e)}function e4(e){this.config.exit.autolinkProtocol.call(this,e)}function t4(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function n4(e){this.config.exit.autolinkEmail.call(this,e)}function r4(e){this.exit(e)}function i4(e){YL(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,o4],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,l4]],{ignore:["link","linkReference"]})}function o4(e,t,n,r,i){let o="";if(!tx(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!s4(n)))return!1;const l=a4(n+r);if(!l[0])return!1;const s={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function l4(e,t,n,r){return!tx(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function s4(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function a4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=jm(e,"(");let o=jm(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function tx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Br(n)||ga(n))&&(!t||n!==47)}function nx(e){return e.label||!e.identifier?e.label||"":dw(e.identifier)}function u4(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),l=[];let s=-1;for(r.push(-1);++s<i.length;){const a=i[s];r[r.length-1]=s,l.push(o.move(t.handle(a,e,t,{before:`
`,after:`
`,...o.current()}))),a.type!=="list"&&(t.bulletLastUsed=void 0),s<i.length-1&&l.push(o.move(c4(a,i[s+1],e,t)))}return r.pop(),l.join("")}function c4(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
`.repeat(1+o);if(o===!1)return`

<!---->

`}return`

`}const f4=/\r?\n|\r/g;function d4(e,t){const n=[];let r=0,i=0,o;for(;o=f4.exec(e);)l(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return l(e.slice(r)),n.join("");function l(s){n.push(t(s,i,!s))}}function rx(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function p4(e,t){return Um(e,t.inConstruct,!0)&&!Um(e,t.notInConstruct,!1)}function Um(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ix(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],l={};let s=-1;for(;++s<e.unsafe.length;){const c=e.unsafe[s];if(!p4(e.stack,c))continue;const f=rx(c);let d;for(;d=f.exec(r);){const p="before"in c||!!c.atBreak,m="after"in c,g=d.index+(p?d[1].length:0);i.includes(g)?(l[g].before&&!p&&(l[g].before=!1),l[g].after&&!m&&(l[g].after=!1)):(i.push(g),l[g]={before:p,after:m})}}i.sort(h4);let a=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){const c=i[s];c<a||c>=u||c+1<u&&i[s+1]===c+1&&l[c].after&&!l[c+1].before&&!l[c+1].after||i[s-1]===c-1&&l[c].before&&!l[c-1].before&&!l[c-1].after||(a!==c&&o.push(Vm(r.slice(a,c),"\\")),a=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push("&#x"+r.charCodeAt(c).toString(16).toUpperCase()+";"),a++))}return o.push(Vm(r.slice(a,u),n.after)),o.join("")}function h4(e,t){return e-t}function Vm(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let l=-1,s=0,a;for(;a=n.exec(o);)r.push(a.index);for(;++l<r.length;)s!==r[l]&&i.push(e.slice(s,r[l])),i.push("\\"),s=r[l];return i.push(e.slice(s)),i.join("")}function Ta(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:a,current:l,shift:s};function l(){return{now:{line:i,column:o},lineShift:r}}function s(u){r+=u}function a(u){const c=u||"",f=c.split(/\r?\n|\r/g),d=f[f.length-1];return i+=f.length-1,o=f.length===1?o+d.length:1+d.length+r,c}}ox.peek=b4;function m4(){return{enter:{gfmFootnoteDefinition:y4,gfmFootnoteDefinitionLabelString:w4,gfmFootnoteCall:k4,gfmFootnoteCallString:S4},exit:{gfmFootnoteDefinition:v4,gfmFootnoteDefinitionLabelString:x4,gfmFootnoteCall:C4,gfmFootnoteCallString:E4}}}function g4(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:P4,footnoteReference:ox}}}function y4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function w4(){this.buffer()}function x4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rn(this.sliceSerialize(e)).toLowerCase()}function v4(e){this.exit(e)}function k4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function S4(){this.buffer()}function E4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rn(this.sliceSerialize(e)).toLowerCase()}function C4(e){this.exit(e)}function ox(e,t,n,r){const i=Ta(r);let o=i.move("[^");const l=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(ix(n,nx(e),{...i.current(),before:o,after:"]"})),s(),l(),o+=i.move("]"),o}function b4(){return"["}function P4(e,t,n,r){const i=Ta(r);let o=i.move("[^");const l=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(ix(n,nx(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(d4(u4(e,n,i.current()),_4)),l(),o}function _4(e,t,n){return t===0?e:(n?"":"    ")+e}function lx(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let l=-1,s=n.before;r.push(-1);let a=t.createTracker(n);for(;++l<i.length;){const u=i[l];let c;if(r[r.length-1]=l,l+1<i.length){let f=t.handle.handlers[i[l+1].type];f&&f.peek&&(f=f.peek),c=f?f(i[l+1],e,t,{before:"",after:"",...a.current()}).charAt(0):""}else c=n.after;o.length>0&&(s==="\r"||s===`
`)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",a=t.createTracker(n),a.move(o.join(""))),o.push(a.move(t.handle(u,e,t,{...a.current(),before:s,after:c}))),s=o[o.length-1].slice(-1)}return r.pop(),o.join("")}const N4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];sx.peek=M4;const T4={canContainEols:["delete"],enter:{strikethrough:D4},exit:{strikethrough:L4}},A4={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:N4}],handlers:{delete:sx}};function D4(e){this.enter({type:"delete",children:[]},e)}function L4(e){this.exit(e)}function sx(e,t,n,r){const i=Ta(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=lx(e,n,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function M4(){return"~"}ax.peek=R4;function ax(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],s=rx(l);let a;if(l.atBreak)for(;a=s.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function R4(){return"`"}function I4(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||O4,i=[],o=[],l=[],s=[];let a=0,u=-1;for(;++u<e.length;){const m=[],g=[];let k=-1;for(e[u].length>a&&(a=e[u].length);++k<e[u].length;){const h=F4(e[u][k]);if(t.alignDelimiters!==!1){const y=r(h);g[k]=y,(s[k]===void 0||y>s[k])&&(s[k]=y)}m.push(h)}o[u]=m,l[u]=g}let c=-1;if(typeof n=="object"&&"length"in n)for(;++c<a;)i[c]=Wm(n[c]);else{const m=Wm(n);for(;++c<a;)i[c]=m}c=-1;const f=[],d=[];for(;++c<a;){const m=i[c];let g="",k="";m===99?(g=":",k=":"):m===108?g=":":m===114&&(k=":");let h=t.alignDelimiters===!1?1:Math.max(1,s[c]-g.length-k.length);const y=g+"-".repeat(h)+k;t.alignDelimiters!==!1&&(h=g.length+h+k.length,h>s[c]&&(s[c]=h),d[c]=h),f[c]=y}o.splice(1,0,f),l.splice(1,0,d),u=-1;const p=[];for(;++u<o.length;){const m=o[u],g=l[u];c=-1;const k=[];for(;++c<a;){const h=m[c]||"";let y="",w="";if(t.alignDelimiters!==!1){const v=s[c]-(g[c]||0),_=i[c];_===114?y=" ".repeat(v):_===99?v%2?(y=" ".repeat(v/2+.5),w=" ".repeat(v/2-.5)):(y=" ".repeat(v/2),w=y):w=" ".repeat(v)}t.delimiterStart!==!1&&!c&&k.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&h==="")&&(t.delimiterStart!==!1||c)&&k.push(" "),t.alignDelimiters!==!1&&k.push(y),k.push(h),t.alignDelimiters!==!1&&k.push(w),t.padding!==!1&&k.push(" "),(t.delimiterEnd!==!1||c!==a-1)&&k.push("|")}p.push(t.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return p.join(`
`)}function F4(e){return e==null?"":String(e)}function O4(e){return e.length}function Wm(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const z4={enter:{table:$4,tableData:qm,tableHeader:qm,tableRow:B4},exit:{codeText:H4,table:j4,tableData:Ru,tableHeader:Ru,tableRow:Ru}};function $4(e){const t=e._align;this.enter({type:"table",align:t.map(n=>n==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function j4(e){this.exit(e),this.setData("inTable")}function B4(e){this.enter({type:"tableRow",children:[]},e)}function Ru(e){this.exit(e)}function qm(e){this.enter({type:"tableCell",children:[]},e)}function H4(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,U4));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function U4(e,t){return t==="|"?t:e}function V4(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:l,tableRow:s,tableCell:a,inlineCode:d}};function l(p,m,g,k){return u(c(p,g,k),p.align)}function s(p,m,g,k){const h=f(p,g,k),y=u([h]);return y.slice(0,y.indexOf(`
`))}function a(p,m,g,k){const h=g.enter("tableCell"),y=g.enter("phrasing"),w=lx(p,g,{...k,before:o,after:o});return y(),h(),w}function u(p,m){return I4(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(p,m,g){const k=p.children;let h=-1;const y=[],w=m.enter("table");for(;++h<k.length;)y[h]=f(k[h],m,g);return w(),y}function f(p,m,g){const k=p.children;let h=-1;const y=[],w=m.enter("tableRow");for(;++h<k.length;)y[h]=a(k[h],p,m,g);return w(),y}function d(p,m,g){let k=ax(p,m,g);return g.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function W4(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function q4(e){const t=e.options.listItemIndent||"tab";if(t===1||t==="1")return"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function K4(e,t,n,r){const i=q4(n);let o=n.bulletCurrent||W4(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(l-o.length)),s.shift(l);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),c);return a(),u;function c(f,d,p){return d?(p?"":" ".repeat(l))+f:(p?o:o+" ".repeat(l-o.length))+f}}const X4={exit:{taskListCheckValueChecked:Km,taskListCheckValueUnchecked:Km,paragraph:G4}},Y4={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Q4}};function Km(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function G4(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){l=s;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Q4(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=Ta(r);o&&s.move(l);let a=K4(e,t,n,{...r,...s.current()});return o&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(c){return c+l}}function Z4(){return[QL,m4(),T4,z4,X4]}function J4(e){return{extensions:[ZL,g4(),A4,V4(e),Y4]}}function af(e={}){const t=this.data();n("micromarkExtensions",qL(e)),n("fromMarkdownExtensions",Z4()),n("toMarkdownExtensions",J4(e));function n(r,i){(t[r]?t[r]:t[r]=[]).push(i)}}function ux(e){const{port:t}=e,{name:n,type:r,desc:i}=t||{},[o,l]=P.useState(!1),[s,a]=P.useState(!1),u=`calc((var(--nodeWidth) + 6px) * ${e.counter} / ${e.nbTotal+1})`,c=`calc((var(--nodeWidth) + 6px) * ${e.counter} / ${e.nbTotal+1} + 5px)`;let f,d;r?(d="white",Nn(r)?f=r==="ExtensiblePort"?"gold":"red":f="navy"):(d="black",f="white");const p=()=>{l(!1),a(!1)},m=g=>{const k=document.createElement("textarea");return k.innerHTML=g,k.value};return D.jsxs(D.Fragment,{children:[D.jsx("div",{onMouseEnter:()=>{l(!0)},onMouseLeave:p,children:D.jsx(Ii,{id:n||"newPulling",type:e.handleType,position:e.position,style:{left:u,backgroundColor:f,borderRadius:e.direction?"50px":"0px",borderColor:d},onClick:()=>a(!0)})}),o||s&&i?D.jsxs("div",{className:"hover graphHover",style:{...e.yPosHover,left:c},children:[t?D.jsx(hr,{className:"reactMarkdown",remarkPlugins:[af],children:`\`${n}\`

`}):"",D.jsx(hr,{className:"reactMarkdownVariables",remarkPlugins:[af],children:s&&i?m(i):e.hoverText})]}):""]})}function e3(e){const t=e?"source":"target",n=e?oe.Bottom:oe.Top;return{handleType:t,position:n}}function Xm(e){const{port:t}=e,{handleType:n,position:r}=e3(e.direction),i=26,o=e.direction?{top:i}:{bottom:i};let l;if(t){const{vars:s,type:a}=t;l=s?`- \`${[...s].join("`\n- `")}\``:a}else l="Drag a port here to add a new pulling";return D.jsx(ux,{handleType:n,position:r,yPosHover:o,hoverText:l,...e})}function t3(e){const{boolInOut:t,sysPullsDict:n,systemList:r,packages:i}=e.data,o=t?"Inputs":"Outputs",[l,s]=P.useState([]);return P.useEffect(()=>{const u={};let c=0;Object.entries(n).forEach(([d,p])=>{try{const m=Co(d,r),{type:g,pack:k}=m,h=gn(g,k,i);p.forEach(({port:y,portMapping:w,variables:v})=>{const _=ts(y,h).name,S=w||y,N=u[S];if((!N||Nn(_))&&jw(y,h)===t){let A;if(Nn(_)){const L=(v||[]).map(b=>b.mapping||b.name);if(A=new Set(L),N){const b=N.port.vars||new Set;N.port.vars=new Set([...A,...b])}}N||(c+=1,u[S]={port:{name:S,type:_,vars:A},counter:0,nbTotal:0,direction:t})}})}catch{}}),c+=1;const f=Object.values(u).sort(({port:d},{port:p})=>Hw(d,p)).map((d,p)=>P.createElement(Xm,{...d,counter:p+1,key:d.port.name,nbTotal:c}));f.push(D.jsx(Xm,{direction:t,counter:c,nbTotal:c},"newPulling")),s(f)},[n]),k_()(e.id),D.jsxs("div",{className:"pullingNode",children:[o,l]})}function cx(e){const[t,n]=P.useState(e.parentState),r=P.useRef(null);P.useEffect(()=>{var l;return(l=r.current)==null?void 0:l.select()},[]);const i=()=>{const{current:l}=r;l&&l.reportValidity()&&(e.setParentState(t),e.setShow(!1))},o=l=>{l.key==="Enter"&&i(),l.preventDefault()};return D.jsx("input",{ref:r,type:"text",className:"nodrag defaultTextInput center",placeholder:e.placeholder,...zd,required:!0,value:t,onChange:l=>n(l.target.value),onKeyUp:o,onBlur:i})}function n3(e){const{name:t,type:n,variables:r}=e.port;let i,o,l;const s=44;e.direction?(i="target",o=oe.Top,l={bottom:s}):(i="source",o=oe.Bottom,l={top:s});let a,u;if(Nn(n)){const f=(r||[]).map(({name:d})=>d).join("`\n- `");({desc:u}=e.port),a=`- \`${f}\``}else({desc:u}=$w(n,e.pack,e.packages)),a=`\`${n}\``;return D.jsx(ux,{port:{name:t,type:n,desc:u},handleType:i,position:o,yPosHover:l,hoverText:a,direction:e.direction,counter:e.counter,nbTotal:e.nbTotal})}function fx({mathPb:e}){const t=({content:l,context:s})=>`	${s!==""?`${s}.`:""}${l}
`,n=({content:l,context:s})=>`	${s!==""?`${s}: `:""}${l}
`,r=(l,s)=>s&&s.length>0?s.map(l).join(""):D.jsx(D.Fragment,{children:`	None
`}),i=e.nUnknowns===void 0?0:e.nUnknowns,o=e.nEquations===void 0?0:e.nEquations;return D.jsxs(D.Fragment,{children:[D.jsx("div",{children:`${i}x${o} problem`}),D.jsx("br",{}),D.jsxs("div",{className:"mathPb",children:[D.jsx("div",{children:"Unknowns :"}),r(t,e.unknowns),D.jsx("br",{}),D.jsx("div",{children:"Equations :"}),r(n,e.equations)]})]})}function r3(e){const{type:t,pack:n,packages:r,setRenameSys:i}=e.data,[o]=P.useState(gn(t,n,r)),[l]=P.useState(o.mathProblem),[s,a]=P.useState(!1),[u,c]=P.useState(e.id),f=(g,k=!0)=>g.sort(Hw).map((h,y)=>D.jsx(n3,{packages:r,pack:n,direction:k,port:h,counter:y+1,nbTotal:g.length},h.name)),d=()=>a(!0);P.useEffect(()=>{u!==e.id&&u!==""&&i({oldName:e.id,newName:u})},[u]);const{inputs:p=[],outputs:m=[]}=o;return D.jsxs("div",{className:"flowNode",onDoubleClick:d,style:e.selected?{borderColor:"darkgreen"}:{},children:[f(p),s?D.jsx("div",{className:"nodeInput",children:D.jsx(cx,{placeholder:"SystemName",parentState:u,setParentState:c,setShow:a})}):D.jsx("div",{className:"hiddenOverflow",children:e.id}),D.jsx("div",{className:"hiddenOverflow",children:t}),l?D.jsx(i3,{mathPb:l}):"",f(m,!1)]})}function i3({mathPb:e}){const[t,n]=P.useState(!1);return D.jsxs(D.Fragment,{children:[D.jsx("div",{onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),className:"nodeMathPb",children:"Σ"}),t?D.jsx("div",{className:"hover graphHover mathPbHover",children:D.jsx(fx,{mathPb:e})}):""]})}const uf="→",cf=(e,t)=>t!==void 0&&e!==t,Ym=({from:e,to:t})=>cf(e,t)?e+uf+t:e,Wd=e=>{const{data:t}=e;if(!t)throw new Error(`Missing data in ${e.id}`);return t},Gm=(e,t,n)=>e==="pullingsIn"?`${cf(t,n)?n+uf:""}${t}`:`${t}${cf(t,n)?uf+n:""}`;function dx(e){const[t]=vd(e),n=Wd(e),{customLabel:r,showLabel:i,labelPosition:o}=n,{left:l,top:s}=o||{left:0,top:0};return D.jsxs(D.Fragment,{children:[D.jsx($i,{...e,path:t}),i?D.jsx(D.Fragment,{children:D.jsx(v_,{children:D.jsx("div",{className:"connectionEdgeLabel",style:{position:"absolute",left:l,top:s},children:r})})}):""]})}function o3(e){const[t,n]=P.useState(""),r=Wd(e),{connection:i,showLabel:o,labelPosition:l}=r;return P.useEffect(()=>{const{ports:s,variables:a}=i,u=a?`[${a.map(c=>Ym(c)).join(", ")}]`:Ym(s);n(u)},[i]),D.jsx(dx,{...e,data:{showLabel:o,labelPosition:l,customLabel:t}})}function l3(e){const[t,n]=P.useState(""),{source:r}=e,i=Wd(e),{pulling:o,showLabel:l,labelPosition:s}=i;return P.useEffect(()=>{const{port:a,portMapping:u,variables:c}=o;if(c){const f=c.map(({name:d,mapping:p})=>Gm(r,d,p));n(`[${f.join(", ")}]`)}else n(Gm(r,a,u))},[o]),D.jsx(dx,{...e,data:{showLabel:l,labelPosition:s,customLabel:t}})}function s3(e){return D.jsx(z_,{children:D.jsx(di,{onClick:()=>e.setShowResetPopUp(!0),children:"↻"})})}const a3={SystemNode:r3,PullingNode:t3},u3=e=>{switch(e.type){case"SystemNode":return"var(--nodeBackgroundColor)";case"PullingNode":return"var(--pullingBackgroundColor)";default:return"black"}},Qm={type:Yo.ArrowClosed,width:20,height:20},js=({source:e,target:t})=>e==="pullingsIn"||t==="pullingsOut",c3=e=>!js(e),f3=e=>(e instanceof Array?e:[e]).every(c3),d3=e=>(e instanceof Array?e:[e]).every(js);function p3(e){return e.type==="SystemNode"}const h3={ConnectionEdge:o3,PullingEdge:l3};function m3(e){return e.type==="PullingEdge"}const g3=e=>{const t=[],n=[];return e.forEach(r=>{p3(r)?n.push(r):t.push(r)}),{pullingNodes:t,systemNodes:n}},Iu=e=>{const t=[],n=[];return e.forEach(r=>{m3(r)?n.push(r):t.push(r)}),{connEdges:t,pullEdges:n}},Zm=e=>`${e.systems.from}.${e.ports.from}-${e.systems.to}.${e.ports.to}`,Bs=(e,t)=>{e.style={...e.style,stroke:t}},Jm=e=>{const t=[...e];return t.forEach(n=>{Bs(n)}),t},eg=e=>{const t=e instanceof Array?e:[e];return t.forEach(n=>{Bs(n,"red")}),t};function y3(e){const{packages:t,systemList:n,setSystemList:r,connectionList:i,sysPullsDict:o,getConnErrors:l,setIndexConn:s,setPosition:a,flowInstance:u,reactFlowWrapper:c,wrongConns:f,wrongPulls:d}=e,p=[{id:"pullingsIn",type:"PullingNode",position:{x:400,y:10},deletable:!1,data:{boolInOut:!0,systemList:n,sysPullsDict:o,packages:t}},{id:"pullingsOut",type:"PullingNode",position:{x:400,y:500},deletable:!1,data:{boolInOut:!1,systemList:n,sysPullsDict:o,packages:t}}],m=[],[g,k]=P.useState(p),[h,y]=P.useState(m),[w,v]=P.useState({oldName:"",newName:""});P.useEffect(()=>{const{oldName:O,newName:H}=w;if(O!==""&&H!==""){const K=Om(H,n),X=n.map(ce=>({...ce,name:ce.name===O?K:ce.name}));let Y=!0;const ee=i.map(ce=>{const ae={...ce.systems};return ae.from===O&&(ae.from=K,Y=!1),ae.to===O&&(ae.to=K,Y=!1),{...ce,systems:ae}}),ne=Y?i:ee,fe={};let de=!0;Object.entries(o).forEach(([ce,ae])=>{ce!==O?fe[ce]=ae:(fe[K]=ae,de=!1)}),l({newSystemList:X,newConnectionList:ne,newSysPullsDict:de?o:fe})}},[w]);const _=P.useCallback(O=>{let H,K,X,Y;const{source:ee,target:ne,sourceHandle:fe,targetHandle:de}=O;if(ee&&ne&&fe&&de){const se=Co(ee,n);H=gn(se.type,se.pack,t),X=ts(fe,H);const ce=Co(ne,n);K=gn(ce.type,ce.pack,t),Y=ts(de,K),e.setSysConn({from:{name:ee,type:H.name,pack:H.pack},to:{name:ne,type:K.name,pack:K.pack}}),e.setPortsConn({from:{name:fe,type:X.name,pack:X.pack},to:{name:de,type:Y.name,pack:Y.pack}})}return{src:X,tgt:Y}},[n,t]),S=P.useCallback(O=>{const H=i.findIndex(({systems:K,ports:X})=>K.from===O.source&&K.to===O.target&&X.from===O.sourceHandle&&X.to===O.targetHandle);s(H),e.setShowConnPopUp(!0)},[i]),N=P.useCallback(O=>{const{source:H,target:K,sourceHandle:X,targetHandle:Y}=O,ee=K==="pullingsOut",ne=(ee?H:K)||"",fe=(ee?X:Y)||"",de=(ee?Y:X)==="newPulling",se=ee?Y:X,ce=!de&&se?se:void 0,ae=Co(ne,n),re=gn(ae.type,ae.pack,t),_e=ts(fe,re);return{system:{name:ne,type:re.name,pack:re.pack},port:{name:fe,type:_e.name,pack:_e.pack,nameMapping:ce}}},[n,t]),A=P.useCallback((O,H)=>{const K=rf(O,H,t);e.setPortPullName(O.name),e.setSysNamePull(H.name),e.setPortVarPull(K),e.setShowPullingVariablePopUp(!0)},[t]),L=P.useCallback(()=>{k(g.map(O=>({...O,selected:!1}))),y(h.map(O=>({...O,selected:!1})))},[g,h]),b=P.useCallback(O=>{const H=i.filter(X=>{const{from:Y,to:ee}=X.systems;return O.filter(({name:fe})=>fe===Y||fe===ee).length===2}),K={};O.forEach(({name:X})=>{const Y=o[X];Y&&(K[X]=Y)}),l({newSystemList:O,newConnectionList:H,newSysPullsDict:K})},[i,o,l]);P.useEffect(()=>{const{pullingNodes:O,systemNodes:H}=g3(g),K=O.map(Y=>({...Y,data:{...Y.data,systemList:n}})),X=n.map(({name:Y,position:ee,kwargs:ne,type:fe,pack:de})=>{const se=H.find(ce=>ce.id===Y);return se&&(se.position!==ee&&(se.position=ee),se.data.kwargs!==ne&&(se.data.kwargs=ne)),se||{id:Y,type:"SystemNode",position:ee,data:{type:fe,pack:de,kwargs:ne,packages:t,setRenameSys:v}}});k([...K,...X])},[n]),P.useEffect(()=>{const{pullEdges:O,connEdges:H}=Iu(h),K=i.map(X=>{const Y=Zm(X),ee=H.find(({id:ne})=>ne===Y);return ee&&ee.data&&ee.data.connection!==X&&(ee.data.connection=X,Bs(ee)),ee||{id:Y,source:X.systems.from,sourceHandle:X.ports.from,target:X.systems.to,targetHandle:X.ports.to,type:"ConnectionEdge",markerEnd:Qm,data:{connection:X}}});y([...K,...O])},[i]),P.useEffect(()=>{const O=[...g];for(let Y=0;Y<2;Y+=1)O[Y].data={...g[Y].data,sysPullsDict:o};k(O);const{connEdges:H,pullEdges:K}=Iu(h),X=Object.entries(o).map(([Y,ee])=>ee.map(ne=>{const fe=QD(Y,ne,n,t),de=fe.id,se=K.find(({id:ce})=>ce===de);if(se){const{data:ce}=se;ce&&ce.pulling!==ne&&(ce.pulling=ne,Bs(se))}return se||{...fe,markerEnd:Qm,data:{pulling:ne}}})).reduce((Y,ee)=>Y.concat(ee),[]);y([...H,...X])},[o]),P.useEffect(()=>{const{connEdges:O,pullEdges:H}=Iu(h),K=Jm(O),X=K.filter(({id:ne})=>f.some(de=>Zm(de)===ne));eg(X);const Y=Jm(H),ee=Y.filter(ne=>{const{variables:fe,port:de,portMapping:se}=ne.data.pulling;return(fe||[{name:de,mapping:se}]).some(({mapping:ae,name:re})=>d.includes(ae||re))});eg(ee),y([...K,...Y])},[f,d]),P.useEffect(()=>{const O=K=>({...K,data:{...K.data,packages:t}}),H=g.map(O);k(H)},[t]);const M=P.useCallback(O=>k(H=>D1(O,H)),[]),z=P.useCallback((O,H)=>{const K=n.map(X=>({...X,position:H.id===X.name?H.position:X.position}));r(K)},[n]),B=P.useCallback(O=>{const H=n.filter(({name:K})=>!O.some(({id:Y})=>Y===K));b(H)},[n,l]),E=P.useCallback((O,H)=>{e.setKwargsProps({name:H.id,mousePos:O,kwargs:H.data.kwargs}),e.setShowKwargs(!0)},[]),F=P.useCallback(O=>y(H=>L1(O,H)),[]),I=P.useCallback(O=>{if(f3(O)){const H=i.filter(({ports:K,systems:X})=>{const Y=({source:ee,target:ne,sourceHandle:fe,targetHandle:de})=>ee===X.from&&fe===K.from&&ne===X.to&&de===K.to;return!O.some(Y)});l({newConnectionList:H})}else if(d3(O)){const H={};Object.entries(o).forEach(([K,X])=>{const Y=O.filter(({source:ee,target:ne})=>ee===K||ne===K);if(Y.length>0){const ee=Y.map(({sourceHandle:de,targetHandle:se})=>de==="pullingsIn"?se:de),ne=({port:de,portMapping:se})=>!ee.includes(se||de),fe=X.filter(ne);fe.length>0&&(H[K]=fe)}else H[K]=X}),l({newSysPullsDict:H})}},[i,o,t,l]),$=P.useCallback(({id:O},H)=>{const K=h.map(X=>{const Y={...X};return Y.id===O&&(Y.data&&(Y.data.showLabel=H),Y.animated=H),Y});y(K)},[h]),R=P.useCallback((O,H)=>{$(H,!0)},[h]),T=P.useCallback((O,H)=>{$(H,!1)},[h]),x=P.useCallback((O,H)=>{const{x:K,y:X}=lf(O,c.current,u),Y=ne=>{var fe;return{...ne,data:ne.data?{...ne.data,labelPosition:ne.id===H.id?{left:K+3,top:X-8}:(fe=ne.data)==null?void 0:fe.labelPosition}:void 0}};y(ne=>ne.map(Y))},[h]),j=P.useCallback((O,H)=>{if(L(),js(H)){const{port:K,system:X}=N(H);X.type&&X.pack&&K.type&&K.pack&&(a(O),Nn(K.type)?A(K,X):(e.setPortPullnfos({portName:K.name,systemName:X.name,mapping:K.nameMapping}),e.setShowPullingPortPopUp(!0)))}else _(H),S(H)},[g,h,i]),V=P.useCallback(O=>{var H,K,X,Y;if(O.source&&O.sourceHandle&&O.target&&O.targetHandle&&O.source!==O.target)if(js(O)){const{system:ee,port:ne}=N(O);ee.type&&ee.pack&&ne.type&&ne.pack&&(Nn(ne.type)?A(ne,ee):(o[ee.name]||[]).some(se=>se.port===ne.name)||jd({port:ne.name,portMapping:ne.nameMapping||ne.name},ee.name,o,l))}else{const ee=_(O),ne=((H=ee.src)==null?void 0:H.name)!==((K=ee.tgt)==null?void 0:K.name)||((X=ee.src)==null?void 0:X.pack)!==((Y=ee.tgt)==null?void 0:Y.pack)||ee.src&&Nn(ee.src.name)||ee.tgt&&Nn(ee.tgt.name),fe=g.filter(({id:ce})=>ce===O.source||O.target),se=ha(fe,h).filter(({target:ce,source:ae,sourceHandle:re,targetHandle:_e})=>ce===O.source&&_e===O.sourceHandle||ce===O.target&&_e===O.targetHandle||ae===O.source&&re===O.sourceHandle||ae===O.target&&re===O.targetHandle);if(ne||se.length>0)S(O);else{const ce={systems:{from:O.source,to:O.target},ports:{from:O.sourceHandle,to:O.targetHandle}},ae=[...i];ae.some(({systems:_e,ports:at})=>_e.from===ce.systems.from&&_e.to===ce.systems.to&&at.from===ce.ports.from&&at.to===ce.ports.to)||(ae.push(ce),l({newConnectionList:ae}))}}},[i,o,n,l,h]),C=P.useCallback(O=>{O instanceof MouseEvent&&a(O)},[]),G=P.useCallback(O=>{O.preventDefault(),O.dataTransfer.dropEffect="move"},[]),J=P.useCallback(O=>{O.preventDefault();const H=JSON.parse(O.dataTransfer.getData("application/reactflow"));if(typeof H>"u"||!H)return;const K=H.name,X={...H,type:K,typeClass:H.className,name:Om(H.className,n),position:lf(O,c.current,u)};r(n.concat(X))},[u,n]);return D.jsxs(Pd,{nodes:g,onNodesChange:M,onNodeDragStop:z,onNodesDelete:B,onNodeContextMenu:E,edges:h,onEdgesChange:F,onEdgesDelete:I,onEdgeMouseEnter:R,onEdgeMouseMove:x,onEdgeMouseLeave:T,onEdgeDoubleClick:j,onConnectStart:L,onConnect:V,onConnectEnd:C,nodeTypes:a3,edgeTypes:h3,onInit:O=>e.setFlowInstance(O),onDrop:J,onDragOver:G,onContextMenu:L,fitView:!0,style:{zIndex:1},selectionKeyCode:null,deleteKeyCode:"Delete",children:[D.jsx(D_,{nodeColor:u3,zoomable:!0,pannable:!0}),D.jsx(V_,{}),D.jsx(s3,{setShowResetPopUp:e.setShowResetPopUp})]})}function w3(e){const t=()=>e.setErrorMessage([]);return D.jsxs(al,{className:"errorPopUp",closePopUp:t,children:[D.jsx("ul",{children:e.errorMessage.map(n=>D.jsx("li",{children:n},n))}),D.jsx("button",{type:"button",onClick:t,children:"ok"})]})}function x3(e){const{formState:t}=e;return D.jsx(D.Fragment,{children:Object.entries(t).map(([n,r])=>D.jsxs("div",{className:"field",children:[D.jsx("div",{className:"label",children:D.jsx("label",{htmlFor:n,children:`${n}: `})}),D.jsx("input",{id:n,value:r,onChange:i=>e.handleInputChange(i,n),placeholder:"Value",className:"defaultTextInput"})]},n))})}function v3(e){const{name:t,kwargs:n,mousePos:r}=e.kwargsProps,i=()=>e.setShow(!1),[o,l]=P.useState(n),s=(u,c)=>{const f={...o};f[c]=u.target.value,l(f)},a=u=>{u.preventDefault();const c=e.systemList.map(f=>({...f,kwargs:f.name===t?{...o}:f.kwargs}));e.setSystemList(c),i()};return D.jsxs(Bd,{closePopUp:i,mousePos:r,children:[D.jsxs("div",{className:"center",children:[D.jsx("div",{children:"Kwargs:"}),D.jsx("div",{style:{color:"orange"},children:"⚠ Structure kwarg modification not supported"})]}),D.jsxs("form",{onSubmit:a,action:"demo",className:"formPopUp",children:[D.jsx(x3,{formState:o,handleInputChange:s}),D.jsx(Hd,{closePopUp:i})]})]})}function k3(e){const t=()=>e.setShowResetPopUp(!1),n=()=>{e.getConnErrors({newSystemList:[],newConnectionList:[],newSysPullsDict:{}}),t()};return D.jsxs(al,{closePopUp:t,children:["Do you really want to reset the systems and connections of your assembly?",D.jsx(Ud,{handleOk:n,closePopUp:t})]})}function S3(e){const{pack:t,index:n}=e.replace,r=()=>{e.setReplace({})},i=()=>{if(t&&n){const o=[...e.packages];o[n]=t,e.setPackages(o)}r()};return D.jsxs(al,{closePopUp:r,children:[`Do you want to replace ${t==null?void 0:t.name}?`,D.jsx(Ud,{handleOk:i,closePopUp:r})]})}function E3(e){const[t,n]=P.useState({nUnknowns:0,nEquations:0,unknowns:[],equations:[]}),{mathProblems:r}=e;P.useEffect(()=>{if(r){let o=0,l=0,s=[],a=[];r.forEach(({nUnknowns:u,nEquations:c,unknowns:f,equations:d})=>{o+=u||0,l+=c||0,f&&(s=s.concat(f)),d&&(a=a.concat(d))}),n({nUnknowns:o,nEquations:l,unknowns:s,equations:a})}},[r]);const i=()=>e.setMathProblems(void 0);return D.jsxs(al,{className:"mathPbPopUp",closePopUp:i,children:[D.jsx(fx,{mathPb:t}),D.jsx("br",{}),D.jsx("button",{type:"button",onClick:i,children:"ok"})]})}const C3=e=>{e.stopPropagation(),e.preventDefault()},tg={from:{name:"",type:"",pack:""},to:{name:"",type:"",pack:""}},b3={systemName:"",portName:"",mapping:void 0},px={clientX:0,clientY:0},P3={name:"",kwargs:{},mousePos:px};function _3(e){const{packages:t,systemList:n,setSystemList:r,connectionList:i,sysPullsDict:o,getConnErrors:l,errorMessage:s,setErrorMessage:a,mathProblems:u}=e,[c,f]=P.useState(!1),[d,p]=P.useState(tg),[m,g]=P.useState(tg),[k,h]=P.useState(-1),[y,w]=P.useState(!1),[v,_]=P.useState(""),[S,N]=P.useState(""),[A,L]=P.useState([]),[b,M]=P.useState(!1),[z,B]=P.useState(b3),[E,F]=P.useState(px),[I,$]=P.useState(!1),[R,T]=P.useState(P3),[x,j]=P.useState(!1),V=P.useRef(null),[C,G]=P.useState();return D.jsxs("div",{className:"container flowProvider",id:$d,onContextMenu:C3,children:[c?D.jsx(fL,{setShow:f,ports:d,systems:m,index:k,setIndex:h,packages:t,connectionList:i,sysPullsDict:o,getConnErrors:l}):"",y?D.jsx(pL,{setShow:w,portName:v,systemName:S,portVar:A,mousePos:E,sysPullsDict:o,getConnErrors:l}):"",b?D.jsx(hL,{setShow:M,infos:z,mousePos:E,sysPullsDict:o,getConnErrors:l}):"",I&&R.kwargs?D.jsx(v3,{kwargsProps:R,setShow:$,systemList:n,setSystemList:r}):"",s.length>0?D.jsx(w3,{errorMessage:s,setErrorMessage:a}):"",u?D.jsx(E3,{mathProblems:u,setMathProblems:e.setMathProblems}):"",x?D.jsx(k3,{setShowResetPopUp:j,getConnErrors:l}):"",e.replace.index&&e.replace.index>-1&&e.replace.pack?D.jsx(S3,{packages:t,setPackages:e.setPackages,replace:e.replace,setReplace:e.setReplace}):"",D.jsx(oL,{systemList:n,setSystemList:r,checkLoops:e.checkLoops}),D.jsxs(ma,{children:[D.jsx("div",{className:"flowContainer",ref:V,id:"flowContainer",children:D.jsx(y3,{...e,setShowConnPopUp:f,setSysConn:g,setPortsConn:p,setIndexConn:h,setShowPullingVariablePopUp:w,setPortPullName:_,setSysNamePull:N,setPortVarPull:L,setShowPullingPortPopUp:M,setPortPullnfos:B,setPosition:F,setShowKwargs:$,setKwargsProps:T,reactFlowWrapper:V,flowInstance:C,setFlowInstance:G,setShowResetPopUp:j})}),D.jsx(nL,{packages:t})]})]})}const Ei="    ",Xt=Ei+Ei,Qe=`
`,Sn=e=>e!==""?e+Qe+Qe:e,De=e=>{if(typeof e=="string")return`'${e}'`;if(typeof e=="boolean")return e?"True":"False";if(Array.isArray(e)){const t=e.map(n=>De(n)).join(", ");return e.length===1?t:`[${t}]`}return String(e)},N3=(e,t)=>`${De(e)}${t?`: ${De(t)}`:""}`,T3=({variables:e,port:t,portMapping:n})=>(e||[{name:t,mapping:n}]).map(({name:r,mapping:i})=>N3(r,i)).join(", "),ng=e=>e.map(t=>T3(t)).join(", "),A3=e=>{let t;return e[0].portMapping||e[0].variables&&e[0].variables[0].mapping?t=`{${ng(e)}}`:e.length===1&&!e[0].variables?t=De(e[0].port):e.length===1&&e[0].variables&&e[0].variables.length===1?t=De(e[0].variables[0].name):t=`[${ng(e)}]`,t?`, pulling=${t}`:""},rg=e=>e.map(({unknown:t,max_abs_step:n,max_rel_step:r,lower_bound:i,upper_bound:o})=>{const l=[De(t)];return n&&l.push(`max_abs_step=${n}`),r&&l.push(`max_rel_step=${r}`),i&&l.push(`lower_bound=${i}`),o&&l.push(`upper_bound=${o}`),`.add_unknown(${l.join(", ")})`}).join(""),ig=e=>e.map(({equation:t,name:n,reference:r})=>{const i=[De(t)];return n&&i.push(`name=${De(n)}`),r&&i.push(`reference=${De(r)}`),`.add_equation(${i.join(", ")})`}).join(""),D3=()=>`${Ei}def compute(self):${Qe}${Xt}pass`;function L3(e){const{systemList:t,connectionList:n,sysPullsDict:r,inwardList:i,outwardList:o,designMethodList:l,offDesignUnknownList:s,offDesignEquationList:a,eventList:u,packages:c}=e,f=()=>{const A=`from cosapp.base import System${Qe}`,b=[...i,...o].some(B=>B.scope)?`from cosapp.ports.enum import Scope${Qe}`:"",M=t.map(({pack:B,type:E})=>gn(E,B,c).mod),z=[...new Set(M)].map(B=>`import ${B}`).join(Qe);return Sn(A+b+z)},d=()=>`class ${e.assemblyName}(System):${Qe}${Ei}def setup(self):${Qe}`,p=()=>{const A=t.map(L=>{const b=gn(L.type,L.pack,c),M=b?b.mod:"",{kwargs:z={}}=L,B=[De(L.name)].concat(Object.entries(z).map(([$,R])=>`${$}=${R}`)),E=`${M}.${L.typeClass}(${B.join(", ")})`,F=r[L.name],I=F?A3(F):"";return`${Xt}self.add_child(${E}${I})`});return Sn(A.join(Qe))},m=A=>{const b=(A==="inward"?i:o).map(({name:M,value:z,unit:B,dtype:E,limits:F,desc:I,scope:$,valid_range:R,invalid_comment:T,out_of_limits_comment:x})=>{const j=[M];return z!==void 0&&j.push(De(z)),B&&j.push(`unit=${De(B)}`),E&&j.push(`dtype=${E}`),R&&j.push(`valid_range=${De(R)}`),T&&j.push(`invalid_comment=${De(T)}`),F&&j.push(`limits=${De(F)}`),x&&j.push(`out_of_limits_comment=${De(x)}`),I&&j.push(`desc=${De(I)}`),$&&j.push(`scope=Scope.${De(T)}`),`${Xt}self.add_${A}(${j.join(", ")})`});return Sn(b.join(Qe))},g=()=>{const A=n.map(({systems:L,ports:b,variables:M})=>{const z=[`self.${L.from}.${b.from}, self.${L.to}.${b.to}`];return M&&M.length>0&&z.push(`{${M.map(B=>`${De(B.from)}: ${De(B.to)}`)}}`),`${Xt}self.connect(${z.join(", ")})`});return Sn(A.join(Qe))},k=()=>{const A=l.map(({name:L,unknowns:b,equations:M})=>{const z=[];return b&&z.push(rg(b)),M&&z.push(ig(M)),`${Xt}self.add_design_method(${De(L)})${z.join("")}`});return Sn(A.join(Qe))},h=()=>s.length>0?Sn(`${Xt}self${rg(s)}`):"",y=()=>a.length>0?Sn(`${Xt}self${ig(a)}`):"",w=()=>{let A="";if(u.length>0){const L=[`${Ei}def transition(self):`],b=u.map(({name:M,desc:z,trigger:B,final:E})=>{L.push(`${Xt}if self.${M}.present:${Qe+Xt+Ei}pass${Qe}`);const F=[De(M)];return z&&F.push(`desc=${De(z)}`),B&&F.push(`trigger=${De(B)}`),E&&F.push(`final=${De(E)}`),`${Xt}self.add_event(${F.join(", ")})`}).join(Qe);A=Sn(b+Qe+L.join(Qe))}return A},v=()=>{const A=p()+m("inward")+m("outward")+g()+k()+h()+y()+w(),L=A===""?Sn(`${Xt}pass`):A;return f()+d()+L+D3()},[_,S]=P.useState(!1),N=()=>{navigator.clipboard.writeText(v())};return D.jsxs(D.Fragment,{children:[D.jsxs("div",{children:[D.jsx("button",{type:"button",className:"codeButton",onClick:()=>S(!0),children:"Generate Code"}),_?D.jsxs(D.Fragment,{children:[D.jsx("button",{type:"button",className:"codeButton",onClick:()=>S(!1),children:"Hide Code"}),D.jsx("button",{type:"button",className:"codeButton",onClick:N,children:"Copy Code"})]}):""]}),_?D.jsx(D.Fragment,{children:D.jsx("div",{id:"codeFrame",className:"container codeFrame",children:D.jsx("div",{className:"codeOutput",children:v()})})}):""]})}const M3={hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#1E1E1E",color:"#DCDCDC"},"hljs-keyword":{color:"#569CD6"},"hljs-literal":{color:"#569CD6"},"hljs-symbol":{color:"#569CD6"},"hljs-name":{color:"#569CD6"},"hljs-link":{color:"#569CD6",textDecoration:"underline"},"hljs-built_in":{color:"#4EC9B0"},"hljs-type":{color:"#4EC9B0"},"hljs-number":{color:"#B8D7A3"},"hljs-class":{color:"#B8D7A3"},"hljs-string":{color:"#D69D85"},"hljs-meta-string":{color:"#D69D85"},"hljs-regexp":{color:"#9A5334"},"hljs-template-tag":{color:"#9A5334"},"hljs-subst":{color:"#DCDCDC"},"hljs-function":{color:"#DCDCDC"},"hljs-title":{color:"#DCDCDC"},"hljs-params":{color:"#DCDCDC"},"hljs-formula":{color:"#DCDCDC"},"hljs-comment":{color:"#57A64A",fontStyle:"italic"},"hljs-quote":{color:"#57A64A",fontStyle:"italic"},"hljs-doctag":{color:"#608B4E"},"hljs-meta":{color:"#9B9B9B"},"hljs-meta-keyword":{color:"#9B9B9B"},"hljs-tag":{color:"#9B9B9B"},"hljs-variable":{color:"#BD63C5"},"hljs-template-variable":{color:"#BD63C5"},"hljs-attr":{color:"#9CDCFE"},"hljs-attribute":{color:"#9CDCFE"},"hljs-builtin-name":{color:"#9CDCFE"},"hljs-section":{color:"gold"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"},"hljs-bullet":{color:"#D7BA7D"},"hljs-selector-tag":{color:"#D7BA7D"},"hljs-selector-id":{color:"#D7BA7D"},"hljs-selector-class":{color:"#D7BA7D"},"hljs-selector-attr":{color:"#D7BA7D"},"hljs-selector-pseudo":{color:"#D7BA7D"},"hljs-addition":{backgroundColor:"#144212",display:"inline-block",width:"100%"},"hljs-deletion":{backgroundColor:"#600",display:"inline-block",width:"100%"}},R3=`# Parse Python module

A CoSApp module can be parsed using CoSApp, creating a JSON file.
To parse a module named \`exampleModule\` :

\`\`\`Python
import exampleModule
from cosapp.tools import parse_module

parse_module(exampleModule)
\`\`\`

This JSON file can then be imported in CoSApp Creator.

## Classes with kwargs

In case \`exampleModule\` contains systems that need kwargs to instanciate,
these systems will not be parsed.
In order to parse them, \`parse_module\` has a \`ctor_config\` optional argument.
This argument is a dictionary, with the keys being the name of the class.
The values can either be a dictonary, or a list of dictionaries, which have to contain the kwargs and their value.

If the value is a dictionary, the class will only be parsed once.
If it is a list of dictionary, the class will be parsed once for each dictionary.

\`\`\`Python
import exampleModule
from cosapp.tools import parse_module

ctor_config =  = dict(
    SystemClass = dict(x = 0.5), # parse SystemClass with x = 0.5
    OtherClass = [
        dict(y = 0.5), # parse OtherClass with y=0.5. It will be named "OtherClass (y = 0.5)" in CoSApp Creator
        dict(y = 1, __alias__ = "OtherClassAlias") # parse OtherClass with y = 1. It will be named "OtherClassAlias" in CoSApp Creator
    ],
)

parse_module(exampleModule, ctor_config= ctor_config)
\`\`\`

## Exclusion and inclusion

By default, all system classes are parsed, unless their kwargs are missing.
It is possible to filter which class to parse using exclusion and inclusion patterns.

\`\`\`Python
import exampleModule
from cosapp.tools import parse_module

includes = 'T*' # Only include classes whose name starts with 'T'
excluses = [
    'Ta?',  # Exclude all classes whose name starts with 'Ta' and has 3 letters
    'To?*' # Exclude all classes whose name starts with 'To' and have at least 3 letters
]

parse_module(exampleModule, includes= includes, excludes= excludes)
\`\`\`

## Other options

\`\`\`Python
import exampleModule
from cosapp.tools import parse_module

path= '/folder' # path to save JSON file to
customName = 'customExampleModule' # custom name for the module

parse_module(exampleModule, path= path, package_name= customName)
\`\`\`
`;function I3(){const[e,t]=P.useState(!1);return D.jsxs(D.Fragment,{children:[D.jsx("button",{type:"button",onClick:()=>t(!e),children:e?"Hide help":"Help"}),e?D.jsx(hr,{className:"readMe",remarkPlugins:[af],components:{code({children:n,...r}){return n.some(i=>i==null?void 0:i.toString().includes(`
`))?D.jsx(wv,{language:"python",style:M3,children:String(n).replace(/\n$/,""),...r}):D.jsx("code",{className:"singleCodeLine",children:n})}},children:R3}):""]})}const F3="ccube (demoPackage)",O3=[{name:"ConePressureLoss",className:"ConePressureLoss",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:`Model of pressure loss coefficient in a conical duct
`,inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"rho",desc:"Fluid mass density",unit:"kg / m**3"},{name:"mu",desc:"Fluid dynamic viscosity",unit:"Pa * s"}],desc:`|  |  |
---|---
  **rho** &#128274;&#128274; : 1.25 kg / m**3 | Fluid mass density
  **mu** &#128274;&#128274; : 2e-05 Pa * s | Fluid dynamic viscosity`},{name:"fluid_in",type:"FluidPort",pack:"ccube (demoPackage)"},{name:"geom_in",type:"GeometryPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"K",desc:"Geometry-corrected pressure loss coefficient of conical duct",unit:"kg * m"}],desc:`|  |  |
---|---
  **K**: 1 kg * m | Geometry-corrected pressure loss coefficient of conical duct`}]},{name:"TubeMech",className:"TubeMech",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:`
Computes the deformation of a infinite elastic cylindrical tube under pressure
`,inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"p_inner",desc:"Absolute inner pressure",unit:"Pa"},{name:"p_outer",desc:"Absolute outer pressure",unit:"Pa"},{name:"E",desc:"Young's modulus",unit:"Pa"},{name:"nu",desc:"Poisson ratio"}],desc:`|  |  |
---|---
  **p_inner** &#128274;&#128274; : 1.5e+05 Pa;  &#10647; 0 &#10205;  value  | Absolute inner pressure
  **p_outer** &#128274;&#128274; : 1e+05 Pa;  &#10647; 0 &#10205;  value  | Absolute outer pressure
  **E** &#128274;&#128274; : 1e+09 Pa | Young's modulus
  **nu** &#128274;&#128274; : 0.5 | Poisson ratio`},{name:"geom_ref",type:"GeometryPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"sigma_r",desc:"Radial stress at inner and outer surfaces",unit:"Pa"},{name:"sigma_a",desc:"Azimuthal stress at inner and outer surfaces",unit:"Pa"},{name:"ur",desc:"Radial displacements of inner and outer surfaces",unit:"m"}],desc:`|  |  |
---|---
  **sigma_r**: [0. 0.] Pa | Radial stress at inner and outer surfaces
  **sigma_a**: [0. 0.] Pa | Azimuthal stress at inner and outer surfaces
  **ur**: [0. 0.] m | Radial displacements of inner and outer surfaces`},{name:"geom_out",type:"GeometryPort",pack:"ccube (demoPackage)"}],kwargs:{xi:.5}},{name:"MidSectionInfo",className:"MidSectionInfo",pack:"ccube (demoPackage)",mod:"ccube.systems",inputs:[{name:"geom",type:"GeometryPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"area_inner",desc:"Mid-section inner area",unit:"m**2"}],desc:`|  |  |
---|---
  **area_inner**: 0 m**2 | Mid-section inner area`}]},{name:"TubePressureLoss",className:"TubePressureLoss",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:`
Module computing the pressure loss coefficient of a cylindrical duct
`,inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"rho",desc:"Fluid mass density",unit:"kg / m**3"},{name:"mu",desc:"Fluid dynamic viscosity",unit:"Pa * s"}],desc:`|  |  |
---|---
  **rho** &#128274;&#128274; : 1.25 kg / m**3 | Fluid mass density
  **mu** &#128274;&#128274; : 2e-05 Pa * s | Fluid dynamic viscosity`},{name:"geom_in",type:"GeometryPort",pack:"ccube (demoPackage)"},{name:"fluid_in",type:"FluidPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"K",desc:"Pressure loss coefficient, based on mass flowrate",unit:"kg * m"}],desc:`|  |  |
---|---
  **K**: 1 kg * m | Pressure loss coefficient, based on mass flowrate`}]},{name:"ConicalTube",className:"ConicalTube",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:`Multi-physics model of flow in a conical tube.
Modules implemented:

- Geometry (cold/reference and hot/deformed)
- Aerodynamics
- Mechanics
`,inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"D",desc:"Cone inlet diameter",unit:"m"},{name:"L",desc:"Cone length",unit:"m"},{name:"angle",desc:"Cone angle",unit:"deg"},{name:"thickness",desc:"Conical shell thickness",unit:"m"}],desc:`|  |  |
---|---
  **D** &#128274;&#128274; : 0.1 m | Cone inlet diameter
  **L** &#128274;&#128274; : 1 m | Cone length
  **angle** &#128274;&#128274; : 5 deg | Cone angle
  **thickness** &#128274;&#128274; : 0.002 m | Conical shell thickness`},{name:"fluid_in",type:"FluidPort",pack:"ccube (demoPackage)"}],outputs:[{name:"fluid_out",type:"FluidPort",pack:"ccube (demoPackage)"}],mathProblem:{nUnknowns:4,nEquations:4,unknowns:[{context:"",content:"geom_hot.D"},{context:"",content:"geom_hot.L"},{context:"",content:"geom_hot.angle"},{context:"",content:"geom_hot.thickness"}],equations:[{context:"",content:"geom_hot.D == mech.D (loop)"},{context:"",content:"geom_hot.L == mech.L (loop)"},{context:"",content:"geom_hot.angle == mech.angle (loop)"},{context:"",content:"geom_hot.thickness == mech.thickness (loop)"}]}},{name:"TubeAero",className:"TubeAero",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:"Applies a total pressure drop to incoming flow port `fluid_in`,\nusing pressure drop coefficient `K`. Total temperature is preserved.\n",inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"K",desc:"Pressure loss coefficient, based on mass flowrate",unit:"kg * m"}],desc:`|  |  |
---|---
  **K** &#128274;&#128274; : 10000 kg * m | Pressure loss coefficient, based on mass flowrate`},{name:"fluid_in",type:"FluidPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"dPt",desc:"Total pressure drop",unit:"Pa"}],desc:`|  |  |
---|---
  **dPt**: 0 Pa | Total pressure drop`},{name:"fluid_out",type:"FluidPort",pack:"ccube (demoPackage)"}]},{name:"TubePressureLossGeom",className:"TubePressureLossGeom",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:"\nGeometry interpreter extracting features for `TubePressureLossCoef`\n",inputs:[{name:"geom_in",type:"GeometryPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"area",desc:"Cross-section area",unit:"m**2"},{name:"length",desc:"Tube length",unit:"m"},{name:"rugosity",desc:"Tube rugosity, given as a characteristic grain size",unit:"m"}],desc:`|  |  |
---|---
  **area**: 0 m**2 | Cross-section area
  **length**: 0 m | Tube length
  **rugosity**: 0 m | Tube rugosity, given as a characteristic grain size`}],kwargs:{xi:.5}},{name:"FluidSection",className:"FluidSection",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:`
Geometry interpreter extracting cross-section area of a cone
at relative axial length \`xi\` between 0 (inlet) and 1 (outlet).
`,inputs:[{name:"geom_in",type:"GeometryPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"area",desc:"Cross-section area",unit:"m**2"}],desc:`|  |  |
---|---
  **area**: 0 m**2 | Cross-section area`}],kwargs:{xi:.5}},{name:"ConicalTubeAero",className:"ConicalTubeAero",pack:"ccube (demoPackage)",mod:"ccube.systems",inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"rho",desc:"Fluid mass density",unit:"kg / m**3"},{name:"mu",desc:"Fluid dynamic viscosity",unit:"Pa * s"}],desc:`|  |  |
---|---
  **rho** &#128274;&#128274; : 1.25 kg / m**3 | Fluid mass density
  **mu** &#128274;&#128274; : 2e-05 Pa * s | Fluid dynamic viscosity`},{name:"geom_in",type:"GeometryPort",pack:"ccube (demoPackage)"},{name:"fluid_in",type:"FluidPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"dPt",desc:"Total pressure drop",unit:"Pa"},{name:"p_inlet",desc:"Static pressure",unit:"Pa"},{name:"p_outlet",desc:"Static pressure",unit:"Pa"}],desc:`|  |  |
---|---
  **dPt**: 0 Pa | Total pressure drop
  **p_inlet**: 1e+05 Pa;  &#10647; 0 &#10205;  value  | Static pressure
  **p_outlet**: 1e+05 Pa;  &#10647; 0 &#10205;  value  | Static pressure`},{name:"fluid_out",type:"FluidPort",pack:"ccube (demoPackage)"}]},{name:"ConeMech",className:"ConeMech",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:`
Computes the deformation of a cone end-sections under pressure,
assuming the cone is sufficiently slender that each section
behaves locally as an infinite elastic cylindrical tube.
`,inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"p_inlet",desc:"Absolute inner pressure",unit:"Pa"},{name:"E",desc:"Young's modulus",unit:"Pa"},{name:"nu",desc:"Poisson ratio"},{name:"p_outlet",desc:"Absolute inner pressure",unit:"Pa"}],desc:`|  |  |
---|---
  **p_inlet** &#128274;&#128274; : 1.5e+05 Pa;  &#10647; 0 &#10205;  value  | Absolute inner pressure
  **E** &#128274;&#128274; : 1e+09 Pa | Young's modulus
  **nu** &#128274;&#128274; : 0.5 | Poisson ratio
  **p_outlet** &#128274;&#128274; : 1.5e+05 Pa;  &#10647; 0 &#10205;  value  | Absolute inner pressure`},{name:"geom_ref",type:"GeometryPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"D",desc:"Deformed inlet diameter",unit:"m"},{name:"L",desc:"Deformed tube length",unit:"m"},{name:"angle",desc:"Deformed cone angle",unit:"deg"},{name:"thickness",desc:"Deformed wall thickness",unit:"m"}],desc:`|  |  |
---|---
  **D**: 0.1 m | Deformed inlet diameter
  **L**: 1 m | Deformed tube length
  **angle**: 5 deg | Deformed cone angle
  **thickness**: 0.002 m | Deformed wall thickness`}]},{name:"ConePressureLossCorr",className:"ConePressureLossCorr",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:`Module computing a pressure loss coefficient in a
conical duct, from the loss coefficient of a cylinder
with the same diameter D as the cone inlet.

The modified coefficient is based on a resistor series model,
assuming that K ~ 1 / D^4 in a cylindrical tube.
`,inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"Kcyl",desc:"Pressure loss coefficient of cylindrical duct, based on mass flowrate",unit:"kg * m"}],desc:`|  |  |
---|---
  **Kcyl** &#128274;&#128274; : 10000 kg * m | Pressure loss coefficient of cylindrical duct, based on mass flowrate`},{name:"geom_in",type:"GeometryPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"K",desc:"Geometry-corrected pressure loss coefficient of conical duct",unit:"kg * m"}],desc:`|  |  |
---|---
  **K**: 1 kg * m | Geometry-corrected pressure loss coefficient of conical duct`}]},{name:"StaticPressure",className:"StaticPressure",pack:"ccube (demoPackage)",mod:"ccube.systems",inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"area",desc:"Cross-section area",unit:"m**2"},{name:"rho",desc:"Fluid density",unit:"kg / m**3"},{name:"Vt",desc:"Tangential velocity, with normal direction given by flowrate",unit:"m/s"}],desc:`|  |  |
---|---
  **area** &#128274;&#128274; : 0.01 m**2 | Cross-section area
  **rho** &#128274;&#128274; : 1.25 kg / m**3 | Fluid density
  **Vt** &#128274;&#128274; : 0 m/s | Tangential velocity, with normal direction given by flowrate`},{name:"fluid",type:"FluidPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"Ps",desc:"Static pressure",unit:"Pa"},{name:"Pd",desc:"Dynamic pressure",unit:"Pa"}],desc:`|  |  |
---|---
  **Ps**: 1e+05 Pa;  &#10647; 0 &#10205;  value  | Static pressure
  **Pd**: 0 Pa;  &#10647; 0 &#10205;  value  | Dynamic pressure`}]},{name:"TubePressureLossCoef",className:"TubePressureLossCoef",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:`Module computing the pressure loss coefficient of a cylindrical duct
`,inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"area",desc:"Tube cross-sectional area",unit:"m**2"},{name:"length",desc:"Tube length",unit:"m"},{name:"rugosity",desc:"Tube rugosity, given as a characteristic grain size",unit:"m"},{name:"rho",desc:"Fluid mass density",unit:"kg / m**3"},{name:"mu",desc:"Fluid dynamic viscosity",unit:"Pa * s"}],desc:`|  |  |
---|---
  **area** &#128274;&#128274; : 0.01 m**2 | Tube cross-sectional area
  **length** &#128274;&#128274; : 1 m | Tube length
  **rugosity** &#128274;&#128274; : 0 m | Tube rugosity, given as a characteristic grain size
  **rho** &#128274;&#128274; : 1.25 kg / m**3 | Fluid mass density
  **mu** &#128274;&#128274; : 2e-05 Pa * s | Fluid dynamic viscosity`},{name:"fluid_in",type:"FluidPort",pack:"ccube (demoPackage)"}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"De",desc:"Equivalent diameter, assuming section is circular",unit:"m"},{name:"Re",desc:"Reynolds number"},{name:"fd",desc:"Pipe friction coefficient"},{name:"kv",desc:"Pressure loss coefficient, based on stress scale rho * V**2 / 2"},{name:"K",desc:"Pressure loss coefficient, based on mass flowrate",unit:"kg * m"}],desc:`|  |  |
---|---
  **De**: 1 m | Equivalent diameter, assuming section is circular
  **Re**: 1 | Reynolds number
  **fd**: 1 | Pipe friction coefficient
  **kv**: 1 | Pressure loss coefficient, based on stress scale rho * V**2 / 2
  **K**: 1 kg * m | Pressure loss coefficient, based on mass flowrate`}]},{name:"ConeGeom",className:"ConeGeom",pack:"ccube (demoPackage)",mod:"ccube.systems",desc:"Conical tube geometrical description",inputs:[{name:"inwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"D",desc:"Cone inlet diameter",unit:"m"},{name:"L",desc:"Cone length",unit:"m"},{name:"angle",desc:"Cone angle",unit:"deg"},{name:"thickness",desc:"Conical shell thickness",unit:"m"}],desc:`|  |  |
---|---
  **D** &#128274;&#128274; : 0.1 m | Cone inlet diameter
  **L** &#128274;&#128274; : 1 m | Cone length
  **angle** &#128274;&#128274; : 5 deg | Cone angle
  **thickness** &#128274;&#128274; : 0.002 m | Conical shell thickness`}],outputs:[{name:"outwards",type:"ExtensiblePort",pack:"ccube (demoPackage)",variables:[{name:"D_out",desc:"Cone outlet diameter",unit:"m"}],desc:`|  |  |
---|---
  **D_out**: 0.1 m | Cone outlet diameter`},{name:"out",type:"GeometryPort",pack:"ccube (demoPackage)"}]}],z3=[{name:"GeometryPort",pack:"ccube (demoPackage)",variables:[{name:"topology",desc:"Topological description of the geometry"}],desc:`|  |  |
---|---
  **topology**: {} | Topological description of the geometry`},{name:"FluidPort",pack:"ccube (demoPackage)",variables:[{name:"W",desc:"Mass flowrate",unit:"kg/s"},{name:"Pt",desc:"Total pressure",unit:"Pa"},{name:"Tt",desc:"Total temperature",unit:"K"}],desc:`|  |  |
---|---
  **W**: 10 kg/s | Mass flowrate
  **Pt**: 1e+05 Pa | Total pressure
  **Tt**: 273.15 K | Total temperature`},{name:"ConeGeomPort",pack:"ccube (demoPackage)",variables:[{name:"area",unit:"m**2"},{name:"length",unit:"m"},{name:"angle",unit:"deg"}],desc:`|  |  |
---|---
  **area**: 0.01 m**2 |
  **length**: 1 m |
  **angle**: 5 deg |`}],$3="0.2.0",j3={name:F3,systems:O3,ports:z3,version:$3},B3=e=>new Promise(t=>setTimeout(t,e));function H3(e){const[t,n]=P.useState("AssemblyName"),[r,i]=P.useState([]),[o,l]=P.useState(void 0),[s,a]=P.useState(!0),[u,c]=P.useState([]),[f,d]=P.useState([]),[p,m]=P.useState({}),[g,k]=P.useState([]),[h,y]=P.useState([]),[w,v]=P.useState([]),[_,S]=P.useState([]),[N,A]=P.useState([]),[L,b]=P.useState([]),[M,z]=P.useState([]),[B,E]=P.useState({}),[F,I]=P.useState(!1),$=(H,K)=>(K||[]).map(({content:X,context:Y})=>({context:Y===""?H:`${H}.${Y}`,content:X})),R=()=>u.flatMap(({name:H,type:K,pack:X})=>{const{mathProblem:Y}=gn(K,X,M);if(Y){const{unknowns:ee,equations:ne}=Y;return{...Y,unknowns:$(H,ee),equations:$(H,ne)}}return[]}),{apiClient:T}=e,[x,j]=P.useState([]),[V,C]=P.useState([]),G=H=>{const K=[],X=[],Y=[];H.forEach(ee=>{switch(K.push(ee.message),ee.kind){case"pull":Y.push(ee.mapping);break;case"conn":X.push(ee.connection);break}}),i(K),j(X),C(Y)},J=async({newSystemList:H=u,newConnectionList:K=f,newSysPullsDict:X=p,check:Y=s})=>{let ee;if(Y&&(K.length>0||Object.keys(X).length>0))try{ee=(await T.update({url:"detectConnectionError",headers:{Accept:"application/json"},data:{systemList:zm(H,X),connectionList:K,packages:M}})).data}catch(ne){console.error(ne)}else await B3(1);!ee||ee.length===0?(H!==u&&c(H),d(K),m(X)):G(ee)},O=async H=>{try{const K=await T.update({url:"getLoops",headers:{Accept:"application/json"},data:{systemList:zm(u,p),connectionList:f,packages:M}}),{loops:X,errors:Y}=K.data;if(Y.length===0){const ee=H?[X,...R()]:[X];l(ee)}else G(Y)}catch(K){console.error(K)}};return P.useEffect(()=>i([]),[M]),D.jsxs("div",{id:Ow,className:"cosapp_creator",children:[D.jsx(TS,{fileName:t,setFileName:n,packages:M,setPackages:z,setReplace:E,setErrorMessage:i,systemList:u,connectionList:f,sysPullsDict:p,getConnErrors:J,inwardList:g,setInwardList:k,outwardList:h,setOutwardList:y,designMethodList:w,setDesignMethodList:v,offDesignUnknownList:_,setOffDesignUnknownList:S,offDesignEquationList:N,setOffDesignEquationList:A,eventList:L,setEventList:b}),M.length>0?D.jsxs(D.Fragment,{children:[D.jsx(AS,{autocheck:s,setAutocheck:a,getConnErrors:J}),D.jsx("div",{className:"assemblyNameContainer",children:F?D.jsx(cx,{placeholder:"AssemblyName",parentState:t,setParentState:n,setShow:I}):D.jsx("div",{onDoubleClick:()=>I(!0),children:t})}),D.jsx(_3,{packages:M,setPackages:z,replace:B,setReplace:E,systemList:u,setSystemList:c,connectionList:f,sysPullsDict:p,getConnErrors:J,checkLoops:O,mathProblems:o,setMathProblems:l,errorMessage:r,setErrorMessage:i,wrongConns:x,wrongPulls:V}),D.jsx(L3,{assemblyName:t,systemList:u,connectionList:f,sysPullsDict:p,inwardList:g,outwardList:h,designMethodList:w,offDesignUnknownList:_,offDesignEquationList:N,eventList:L,packages:M})]}):D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"defaultText",children:r.length===0?"Please import a package":r.join(`
`)}),D.jsxs("div",{className:"demoDiv",children:[D.jsx("button",{type:"button",className:"demoButton",onClick:()=>z([j3]),children:"Use demo package"}),D.jsx(I3,{})]})]})]})}function hx(e,t){return function(){return e.apply(t,arguments)}}const{toString:U3}=Object.prototype,{getPrototypeOf:qd}=Object,Aa=(e=>t=>{const n=U3.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),an=e=>(e=e.toLowerCase(),t=>Aa(t)===e),Da=e=>t=>typeof t===e,{isArray:Hi}=Array,Qo=Da("undefined");function V3(e){return e!==null&&!Qo(e)&&e.constructor!==null&&!Qo(e.constructor)&&jt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mx=an("ArrayBuffer");function W3(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mx(e.buffer),t}const q3=Da("string"),jt=Da("function"),gx=Da("number"),La=e=>e!==null&&typeof e=="object",K3=e=>e===!0||e===!1,rs=e=>{if(Aa(e)!=="object")return!1;const t=qd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},X3=an("Date"),Y3=an("File"),G3=an("Blob"),Q3=an("FileList"),Z3=e=>La(e)&&jt(e.pipe),J3=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||jt(e.append)&&((t=Aa(e))==="formdata"||t==="object"&&jt(e.toString)&&e.toString()==="[object FormData]"))},eM=an("URLSearchParams"),[tM,nM,rM,iM]=["ReadableStream","Request","Response","Headers"].map(an),oM=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ul(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Hi(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),l=o.length;let s;for(r=0;r<l;r++)s=o[r],t.call(null,e[s],s,e)}}function yx(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const wx=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,xx=e=>!Qo(e)&&e!==wx;function ff(){const{caseless:e}=xx(this)&&this||{},t={},n=(r,i)=>{const o=e&&yx(t,i)||i;rs(t[o])&&rs(r)?t[o]=ff(t[o],r):rs(r)?t[o]=ff({},r):Hi(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&ul(arguments[r],n);return t}const lM=(e,t,n,{allOwnKeys:r}={})=>(ul(t,(i,o)=>{n&&jt(i)?e[o]=hx(i,n):e[o]=i},{allOwnKeys:r}),e),sM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),aM=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},uM=(e,t,n,r)=>{let i,o,l;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)l=i[o],(!r||r(l,e,t))&&!s[l]&&(t[l]=e[l],s[l]=!0);e=n!==!1&&qd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},cM=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},fM=e=>{if(!e)return null;if(Hi(e))return e;let t=e.length;if(!gx(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dM=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qd(Uint8Array)),pM=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},hM=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},mM=an("HTMLFormElement"),gM=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),og=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),yM=an("RegExp"),vx=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ul(n,(i,o)=>{let l;(l=t(i,o,e))!==!1&&(r[o]=l||i)}),Object.defineProperties(e,r)},wM=e=>{vx(e,(t,n)=>{if(jt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(jt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},xM=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Hi(e)?r(e):r(String(e).split(t)),n},vM=()=>{},kM=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Fu="abcdefghijklmnopqrstuvwxyz",lg="0123456789",kx={DIGIT:lg,ALPHA:Fu,ALPHA_DIGIT:Fu+Fu.toUpperCase()+lg},SM=(e=16,t=kx.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function EM(e){return!!(e&&jt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const CM=e=>{const t=new Array(10),n=(r,i)=>{if(La(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Hi(r)?[]:{};return ul(r,(l,s)=>{const a=n(l,i+1);!Qo(a)&&(o[s]=a)}),t[i]=void 0,o}}return r};return n(e,0)},bM=an("AsyncFunction"),PM=e=>e&&(La(e)||jt(e))&&jt(e.then)&&jt(e.catch),W={isArray:Hi,isArrayBuffer:mx,isBuffer:V3,isFormData:J3,isArrayBufferView:W3,isString:q3,isNumber:gx,isBoolean:K3,isObject:La,isPlainObject:rs,isReadableStream:tM,isRequest:nM,isResponse:rM,isHeaders:iM,isUndefined:Qo,isDate:X3,isFile:Y3,isBlob:G3,isRegExp:yM,isFunction:jt,isStream:Z3,isURLSearchParams:eM,isTypedArray:dM,isFileList:Q3,forEach:ul,merge:ff,extend:lM,trim:oM,stripBOM:sM,inherits:aM,toFlatObject:uM,kindOf:Aa,kindOfTest:an,endsWith:cM,toArray:fM,forEachEntry:pM,matchAll:hM,isHTMLForm:mM,hasOwnProperty:og,hasOwnProp:og,reduceDescriptors:vx,freezeMethods:wM,toObjectSet:xM,toCamelCase:gM,noop:vM,toFiniteNumber:kM,findKey:yx,global:wx,isContextDefined:xx,ALPHABET:kx,generateString:SM,isSpecCompliantForm:EM,toJSONObject:CM,isAsyncFn:bM,isThenable:PM};function ge(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}W.inherits(ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Sx=ge.prototype,Ex={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ex[e]={value:e}});Object.defineProperties(ge,Ex);Object.defineProperty(Sx,"isAxiosError",{value:!0});ge.from=(e,t,n,r,i,o)=>{const l=Object.create(Sx);return W.toFlatObject(e,l,function(a){return a!==Error.prototype},s=>s!=="isAxiosError"),ge.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};const _M=null;function df(e){return W.isPlainObject(e)||W.isArray(e)}function Cx(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function sg(e,t,n){return e?e.concat(t).map(function(i,o){return i=Cx(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function NM(e){return W.isArray(e)&&!e.some(df)}const TM=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Ma(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,k){return!W.isUndefined(k[g])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,l=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(W.isDate(m))return m.toISOString();if(!a&&W.isBlob(m))throw new ge("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(m)||W.isTypedArray(m)?a&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,g,k){let h=m;if(m&&!k&&typeof m=="object"){if(W.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(W.isArray(m)&&NM(m)||(W.isFileList(m)||W.endsWith(g,"[]"))&&(h=W.toArray(m)))return g=Cx(g),h.forEach(function(w,v){!(W.isUndefined(w)||w===null)&&t.append(l===!0?sg([g],v,o):l===null?g:g+"[]",u(w))}),!1}return df(m)?!0:(t.append(sg(k,g,o),u(m)),!1)}const f=[],d=Object.assign(TM,{defaultVisitor:c,convertValue:u,isVisitable:df});function p(m,g){if(!W.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(m),W.forEach(m,function(h,y){(!(W.isUndefined(h)||h===null)&&i.call(t,h,W.isString(y)?y.trim():y,g,d))===!0&&p(h,g?g.concat(y):[y])}),f.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return p(e),t}function ag(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Kd(e,t){this._pairs=[],e&&Ma(e,this,t)}const bx=Kd.prototype;bx.append=function(t,n){this._pairs.push([t,n])};bx.toString=function(t){const n=t?function(r){return t.call(this,r,ag)}:ag;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function AM(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Px(e,t,n){if(!t)return e;const r=n&&n.encode||AM,i=n&&n.serialize;let o;if(i?o=i(t,n):o=W.isURLSearchParams(t)?t.toString():new Kd(t,n).toString(r),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class ug{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(r){r!==null&&t(r)})}}const _x={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},DM=typeof URLSearchParams<"u"?URLSearchParams:Kd,LM=typeof FormData<"u"?FormData:null,MM=typeof Blob<"u"?Blob:null,RM={isBrowser:!0,classes:{URLSearchParams:DM,FormData:LM,Blob:MM},protocols:["http","https","file","blob","url","data"]},Xd=typeof window<"u"&&typeof document<"u",IM=(e=>Xd&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),FM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",OM=Xd&&window.location.href||"http://localhost",zM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xd,hasStandardBrowserEnv:IM,hasStandardBrowserWebWorkerEnv:FM,origin:OM},Symbol.toStringTag,{value:"Module"})),on={...zM,...RM};function $M(e,t){return Ma(e,new on.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return on.isNode&&W.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function jM(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function BM(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function Nx(e){function t(n,r,i,o){let l=n[o++];if(l==="__proto__")return!0;const s=Number.isFinite(+l),a=o>=n.length;return l=!l&&W.isArray(i)?i.length:l,a?(W.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!W.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],o)&&W.isArray(i[l])&&(i[l]=BM(i[l])),!s)}if(W.isFormData(e)&&W.isFunction(e.entries)){const n={};return W.forEachEntry(e,(r,i)=>{t(jM(r),i,n,0)}),n}return null}function HM(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const cl={transitional:_x,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=W.isObject(t);if(o&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return i?JSON.stringify(Nx(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return $M(t,this.formSerializer).toString();if((s=W.isFileList(t))||r.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return Ma(s?{"files[]":t}:t,a&&new a,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),HM(t)):t}],transformResponse:[function(t){const n=this.transitional||cl.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(r&&!this.responseType||i)){const l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(l)throw s.name==="SyntaxError"?ge.from(s,ge.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:on.classes.FormData,Blob:on.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{cl.headers[e]={}});const UM=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),VM=e=>{const t={};let n,r,i;return e&&e.split(`
`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&UM[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},cg=Symbol("internals");function oo(e){return e&&String(e).trim().toLowerCase()}function is(e){return e===!1||e==null?e:W.isArray(e)?e.map(is):String(e)}function WM(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const qM=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ou(e,t,n,r,i){if(W.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!W.isString(t)){if(W.isString(r))return t.indexOf(r)!==-1;if(W.isRegExp(r))return r.test(t)}}function KM(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function XM(e,t){const n=W.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,l){return this[r].call(this,t,i,o,l)},configurable:!0})})}class kt{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,a,u){const c=oo(a);if(!c)throw new Error("header name must be a non-empty string");const f=W.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||a]=is(s))}const l=(s,a)=>W.forEach(s,(u,c)=>o(u,c,a));if(W.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(W.isString(t)&&(t=t.trim())&&!qM(t))l(VM(t),n);else if(W.isHeaders(t))for(const[s,a]of t.entries())o(a,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=oo(t),t){const r=W.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return WM(i);if(W.isFunction(n))return n.call(this,i,r);if(W.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=oo(t),t){const r=W.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ou(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(l){if(l=oo(l),l){const s=W.findKey(r,l);s&&(!n||Ou(r,r[s],s,n))&&(delete r[s],i=!0)}}return W.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Ou(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return W.forEach(this,(i,o)=>{const l=W.findKey(r,o);if(l){n[l]=is(i),delete n[o];return}const s=t?KM(o):String(o).trim();s!==o&&delete n[o],n[s]=is(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return W.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&W.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[cg]=this[cg]={accessors:{}}).accessors,i=this.prototype;function o(l){const s=oo(l);r[s]||(XM(i,l),r[s]=!0)}return W.isArray(t)?t.forEach(o):o(t),this}}kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(kt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});W.freezeMethods(kt);function zu(e,t){const n=this||cl,r=t||n,i=kt.from(r.headers);let o=r.data;return W.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Tx(e){return!!(e&&e.__CANCEL__)}function Ui(e,t,n){ge.call(this,e??"canceled",ge.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(Ui,ge,{__CANCEL__:!0});function Ax(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function YM(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function GM(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,l;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),c=r[o];l||(l=u),n[i]=a,r[i]=u;let f=o,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-l<t)return;const p=c&&u-c;return p?Math.round(d*1e3/p):void 0}}function QM(e,t){let n=0;const r=1e3/t;let i=null;return function(){const l=this===!0,s=Date.now();if(l||s-n>r)return i&&(clearTimeout(i),i=null),n=s,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(s-n)))}}const Hs=(e,t,n=3)=>{let r=0;const i=GM(50,250);return QM(o=>{const l=o.loaded,s=o.lengthComputable?o.total:void 0,a=l-r,u=i(a),c=l<=s;r=l;const f={loaded:l,total:s,progress:s?l/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&c?(s-l)/u:void 0,event:o,lengthComputable:s!=null};f[t?"download":"upload"]=!0,e(f)},n)},ZM=on.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let l=o;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(l){const s=W.isString(l)?i(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),JM=on.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const l=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),W.isString(r)&&l.push("path="+r),W.isString(i)&&l.push("domain="+i),o===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function eR(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function tR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Dx(e,t){return e&&!eR(t)?tR(e,t):t}const fg=e=>e instanceof kt?{...e}:e;function Hr(e,t){t=t||{};const n={};function r(u,c,f){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:f},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function i(u,c,f){if(W.isUndefined(c)){if(!W.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function o(u,c){if(!W.isUndefined(c))return r(void 0,c)}function l(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const a={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(u,c)=>i(fg(u),fg(c),!0)};return W.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=a[c]||i,d=f(e[c],t[c],c);W.isUndefined(d)&&f!==s||(n[c]=d)}),n}const Lx=e=>{const t=Hr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:l,auth:s}=t;t.headers=l=kt.from(l),t.url=Px(Dx(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let a;if(W.isFormData(n)){if(on.hasStandardBrowserEnv||on.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((a=l.getContentType())!==!1){const[u,...c]=a?a.split(";").map(f=>f.trim()).filter(Boolean):[];l.setContentType([u||"multipart/form-data",...c].join("; "))}}if(on.hasStandardBrowserEnv&&(r&&W.isFunction(r)&&(r=r(t)),r||r!==!1&&ZM(t.url))){const u=i&&o&&JM.read(o);u&&l.set(i,u)}return t},nR=typeof XMLHttpRequest<"u",rR=nR&&function(e){return new Promise(function(n,r){const i=Lx(e);let o=i.data;const l=kt.from(i.headers).normalize();let{responseType:s}=i,a;function u(){i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}let c=new XMLHttpRequest;c.open(i.method.toUpperCase(),i.url,!0),c.timeout=i.timeout;function f(){if(!c)return;const p=kt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!s||s==="text"||s==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:p,config:e,request:c};Ax(function(h){n(h),u()},function(h){r(h),u()},g),c=null}"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(r(new ge("Request aborted",ge.ECONNABORTED,i,c)),c=null)},c.onerror=function(){r(new ge("Network Error",ge.ERR_NETWORK,i,c)),c=null},c.ontimeout=function(){let m=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const g=i.transitional||_x;i.timeoutErrorMessage&&(m=i.timeoutErrorMessage),r(new ge(m,g.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,i,c)),c=null},o===void 0&&l.setContentType(null),"setRequestHeader"in c&&W.forEach(l.toJSON(),function(m,g){c.setRequestHeader(g,m)}),W.isUndefined(i.withCredentials)||(c.withCredentials=!!i.withCredentials),s&&s!=="json"&&(c.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&c.addEventListener("progress",Hs(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Hs(i.onUploadProgress)),(i.cancelToken||i.signal)&&(a=p=>{c&&(r(!p||p.type?new Ui(null,e,c):p),c.abort(),c=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const d=YM(i.url);if(d&&on.protocols.indexOf(d)===-1){r(new ge("Unsupported protocol "+d+":",ge.ERR_BAD_REQUEST,e));return}c.send(o||null)})},iR=(e,t)=>{let n=new AbortController,r;const i=function(a){if(!r){r=!0,l();const u=a instanceof Error?a:this.reason;n.abort(u instanceof ge?u:new Ui(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{i(new ge(`timeout ${t} of ms exceeded`,ge.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(a=>{a&&(a.removeEventListener?a.removeEventListener("abort",i):a.unsubscribe(i))}),e=null)};e.forEach(a=>a&&a.addEventListener&&a.addEventListener("abort",i));const{signal:s}=n;return s.unsubscribe=l,[s,()=>{o&&clearTimeout(o),o=null}]},oR=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},lR=async function*(e,t,n){for await(const r of e)yield*oR(ArrayBuffer.isView(r)?r:await n(String(r)),t)},dg=(e,t,n,r,i)=>{const o=lR(e,t,i);let l=0;return new ReadableStream({type:"bytes",async pull(s){const{done:a,value:u}=await o.next();if(a){s.close(),r();return}let c=u.byteLength;n&&n(l+=c),s.enqueue(new Uint8Array(u))},cancel(s){return r(s),o.return()}},{highWaterMark:2})},pg=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},Ra=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Mx=Ra&&typeof ReadableStream=="function",pf=Ra&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),sR=Mx&&(()=>{let e=!1;const t=new Request(on.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),hg=64*1024,hf=Mx&&!!(()=>{try{return W.isReadableStream(new Response("").body)}catch{}})(),Us={stream:hf&&(e=>e.body)};Ra&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Us[t]&&(Us[t]=W.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ge(`Response type '${t}' is not supported`,ge.ERR_NOT_SUPPORT,r)})})})(new Response);const aR=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(W.isArrayBufferView(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await pf(e)).byteLength},uR=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??aR(t)},cR=Ra&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:l,onDownloadProgress:s,onUploadProgress:a,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:d}=Lx(e);u=u?(u+"").toLowerCase():"text";let[p,m]=i||o||l?iR([i,o],l):[],g,k;const h=()=>{!g&&setTimeout(()=>{p&&p.unsubscribe()}),g=!0};let y;try{if(a&&sR&&n!=="get"&&n!=="head"&&(y=await uR(c,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),N;W.isFormData(r)&&(N=S.headers.get("content-type"))&&c.setContentType(N),S.body&&(r=dg(S.body,hg,pg(y,Hs(a)),null,pf))}W.isString(f)||(f=f?"cors":"omit"),k=new Request(t,{...d,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",withCredentials:f});let w=await fetch(k);const v=hf&&(u==="stream"||u==="response");if(hf&&(s||v)){const S={};["status","statusText","headers"].forEach(A=>{S[A]=w[A]});const N=W.toFiniteNumber(w.headers.get("content-length"));w=new Response(dg(w.body,hg,s&&pg(N,Hs(s,!0)),v&&h,pf),S)}u=u||"text";let _=await Us[W.findKey(Us,u)||"text"](w,e);return!v&&h(),m&&m(),await new Promise((S,N)=>{Ax(S,N,{data:_,headers:kt.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:k})})}catch(w){throw h(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new ge("Network Error",ge.ERR_NETWORK,e,k),{cause:w.cause||w}):ge.from(w,w&&w.code,e,k)}}),mf={http:_M,xhr:rR,fetch:cR};W.forEach(mf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mg=e=>`- ${e}`,fR=e=>W.isFunction(e)||e===null||e===!1,Rx={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){n=e[o];let l;if(r=n,!fR(n)&&(r=mf[(l=String(n)).toLowerCase()],r===void 0))throw new ge(`Unknown adapter '${l}'`);if(r)break;i[l||"#"+o]=r}if(!r){const o=Object.entries(i).map(([s,a])=>`adapter ${s} `+(a===!1?"is not supported by the environment":"is not available in the build"));let l=t?o.length>1?`since :
`+o.map(mg).join(`
`):" "+mg(o[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:mf};function $u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ui(null,e)}function gg(e){return $u(e),e.headers=kt.from(e.headers),e.data=zu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Rx.getAdapter(e.adapter||cl.adapter)(e).then(function(r){return $u(e),r.data=zu.call(e,e.transformResponse,r),r.headers=kt.from(r.headers),r},function(r){return Tx(r)||($u(e),r&&r.response&&(r.response.data=zu.call(e,e.transformResponse,r.response),r.response.headers=kt.from(r.response.headers))),Promise.reject(r)})}const Ix="1.7.2",Yd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const yg={};Yd.transitional=function(t,n,r){function i(o,l){return"[Axios v"+Ix+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,s)=>{if(t===!1)throw new ge(i(l," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!yg[l]&&(yg[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,s):!0}};function dR(e,t,n){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],l=t[o];if(l){const s=e[o],a=s===void 0||l(s,o,e);if(a!==!0)throw new ge("option "+o+" must be "+a,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+o,ge.ERR_BAD_OPTION)}}const gf={assertOptions:dR,validators:Yd},qn=gf.validators;class Mr{constructor(t){this.defaults=t,this.interceptors={request:new ug,response:new ug}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&gf.assertOptions(r,{silentJSONParsing:qn.transitional(qn.boolean),forcedJSONParsing:qn.transitional(qn.boolean),clarifyTimeoutError:qn.transitional(qn.boolean)},!1),i!=null&&(W.isFunction(i)?n.paramsSerializer={serialize:i}:gf.assertOptions(i,{encode:qn.function,serialize:qn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&W.merge(o.common,o[n.method]);o&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=kt.concat(l,o);const s=[];let a=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(a=a&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,f=0,d;if(!a){const m=[gg.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,u),d=m.length,c=Promise.resolve(n);f<d;)c=c.then(m[f++],m[f++]);return c}d=s.length;let p=n;for(f=0;f<d;){const m=s[f++],g=s[f++];try{p=m(p)}catch(k){g.call(this,k);break}}try{c=gg.call(this,p)}catch(m){return Promise.reject(m)}for(f=0,d=u.length;f<d;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=Hr(this.defaults,t);const n=Dx(t.baseURL,t.url);return Px(n,t.params,t.paramsSerializer)}}W.forEach(["delete","get","head","options"],function(t){Mr.prototype[t]=function(n,r){return this.request(Hr(r||{},{method:t,url:n,data:(r||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(r){return function(o,l,s){return this.request(Hr(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:l}))}}Mr.prototype[t]=n(),Mr.prototype[t+"Form"]=n(!0)});class Gd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const l=new Promise(s=>{r.subscribe(s),o=s}).then(i);return l.cancel=function(){r.unsubscribe(o)},l},t(function(o,l,s){r.reason||(r.reason=new Ui(o,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Gd(function(i){t=i}),cancel:t}}}function pR(e){return function(n){return e.apply(null,n)}}function hR(e){return W.isObject(e)&&e.isAxiosError===!0}const yf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yf).forEach(([e,t])=>{yf[t]=e});function Fx(e){const t=new Mr(e),n=hx(Mr.prototype.request,t);return W.extend(n,Mr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Fx(Hr(e,i))},n}const Ue=Fx(cl);Ue.Axios=Mr;Ue.CanceledError=Ui;Ue.CancelToken=Gd;Ue.isCancel=Tx;Ue.VERSION=Ix;Ue.toFormData=Ma;Ue.AxiosError=ge;Ue.Cancel=Ue.CanceledError;Ue.all=function(t){return Promise.all(t)};Ue.spread=pR;Ue.isAxiosError=hR;Ue.mergeConfig=Hr;Ue.AxiosHeaders=kt;Ue.formToJSON=e=>Nx(W.isHTMLForm(e)?new FormData(e):e);Ue.getAdapter=Rx.getAdapter;Ue.HttpStatusCode=yf;Ue.default=Ue;class mR{constructor({baseURL:t}){tp(this,"_client");this._client=Ue.create({baseURL:t})}async sendRequest(t){const{method:n,url:r,params:i,data:o,config:l,headers:s}=t;if(r.length===0)throw new Error("Missing url");const a={Accept:"application/json",...s??{}};return this._client.request({method:n,url:r,params:i,data:o,headers:a,...l??{}})}update(t){return this.sendRequest({method:"put",...t})}}function gR(e){const t=P.useMemo(()=>{const n=e.baseUrl??"http://127.0.0.1:8000",r=new mR({baseURL:n});return console.log(`Using cosapp_creator_api at ${n}`),r},[e.baseUrl]);return D.jsx(H3,{apiClient:t})}function yR(){var n;const e=document.getElementById("root"),t=(n=e==null?void 0:e.dataset)==null?void 0:n.cosappUrl;return D.jsx(gR,{baseUrl:t})}ju.createRoot(document.getElementById("root")).render(D.jsx(U.StrictMode,{children:D.jsx(yR,{})}));
