@brainbase-labs/chat-widget 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,4 +8,4 @@ var BrainbaseChat=function(e){"use strict";var t=Object.defineProperty,n=(e,n,r)
8
8
  *
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
- */function S(){if(h)return b;h=1;var e=s(),t=w();function n(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 r=new Set,l={};function o(e,t){a(e,t),a(e+"Capture",t)}function a(e,t){for(l[e]=t,e=0;e<t.length;e++)r.add(t[e])}var i=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,c=/^[: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]*$/,f={},d={};function p(e,t,n,r,l,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){m[e]=new p(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];m[t]=new p(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){m[e]=new p(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){m[e]=new p(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){m[e]=new p(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){m[e]=new p(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){m[e]=new p(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){m[e]=new p(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){m[e]=new p(e,5,!1,e.toLowerCase(),null,!1,!1)});var g=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function v(e,t,n,r){var l=m.hasOwnProperty(t)?m[t]:null;(null!==l?0!==l.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,l,r)&&(n=null),r||null===l?function(e){return!!u.call(d,e)||!u.call(f,e)&&(c.test(e)?d[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=null===n?3!==l.type&&"":n:(t=l.attributeName,r=l.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(l=l.type)||4===l&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(g,y);m[t]=new p(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(g,y);m[t]=new p(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(g,y);m[t]=new p(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){m[e]=new p(e,1,!1,e.toLowerCase(),null,!1,!1)}),m.xlinkHref=new p("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){m[e]=new p(e,1,!1,e.toLowerCase(),null,!0,!0)});var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),P=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),j=Symbol.iterator;function O(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var F,R=Object.assign;function A(e){if(void 0===F)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||""}return"\n"+F+e}var B=!1;function U(e,t){if(!e||B)return"";B=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"==typeof s.stack){for(var l=s.stack.split("\n"),o=r.stack.split("\n"),a=l.length-1,i=o.length-1;1<=a&&0<=i&&l[a]!==o[i];)i--;for(;1<=a&&0<=i;a--,i--)if(l[a]!==o[i]){if(1!==a||1!==i)do{if(a--,0>--i||l[a]!==o[i]){var u="\n"+l[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=a&&0<=i);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?A(e):""}function H(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=U(e.type,!1);case 11:return e=U(e.type.render,!1);case 1:return e=U(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case E:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case N:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case z:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case M:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function $(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=(e=t.render).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 V(t);case 8:return t===C?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function X(e,t){var n=t.checked;return R({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Z(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function G(e,t){J(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?te(e,t.type,n):t.hasOwnProperty("defaultValue")&&te(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ee(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function te(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ne=Array.isArray;function re(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,l=0;l<e.length;l++){if(e[l].value===n)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==t||e[l].disabled||(t=e[l])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return R({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(ne(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:W(r)}}function ae(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ue(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 se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ue(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,fe,de=(fe=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return fe(e,t)})}:fe);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={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},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ye(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),l=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}Object.keys(he).forEach(function(e){me.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var ve=R({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 be(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function ke(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 xe=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,_e=null,Ce=null;function Ee(e){if(e=kl(e)){if("function"!=typeof Se)throw Error(n(280));var t=e.stateNode;t&&(t=wl(t),Se(e.stateNode,e.type,t))}}function Ne(e){_e?Ce?Ce.push(e):Ce=[e]:_e=e}function Pe(){if(_e){var e=_e,t=Ce;if(Ce=_e=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Ie(e,t){return e(t)}function Te(){}var Le=!1;function ze(e,t,n){if(Le)return e(t,n);Le=!0;try{return Ie(e,t,n)}finally{Le=!1,(null!==_e||null!==Ce)&&(Te(),Pe())}}function Me(e,t){var r=e.stateNode;if(null===r)return null;var l=wl(r);if(null===l)return null;r=l[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":(l=!l.disabled)||(l=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!l;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var De=!1;if(i)try{var je={};Object.defineProperty(je,"passive",{get:function(){De=!0}}),window.addEventListener("test",je,je),window.removeEventListener("test",je,je)}catch(fe){De=!1}function Oe(e,t,n,r,l,o,a,i,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(c){this.onError(c)}}var Fe=!1,Re=null,Ae=!1,Be=null,Ue={onError:function(e){Fe=!0,Re=e}};function He(e,t,n,r,l,o,a,i,u){Fe=!1,Re=null,Oe.apply(Ue,arguments)}function Ve(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function $e(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function We(e){if(Ve(e)!==e)throw Error(n(188))}function qe(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,l=t;;){var o=r.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(l=o.return)){r=l;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return We(o),e;if(a===l)return We(o),t;a=a.sibling}throw Error(n(188))}if(r.return!==l.return)r=o,l=a;else{for(var i=!1,u=o.child;u;){if(u===r){i=!0,r=o,l=a;break}if(u===l){i=!0,l=o,r=a;break}u=u.sibling}if(!i){for(u=a.child;u;){if(u===r){i=!0,r=a,l=o;break}if(u===l){i=!0,l=a,r=o;break}u=u.sibling}if(!i)throw Error(n(189))}}if(r.alternate!==l)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e))?Qe(e):null}function Qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Qe(e);if(null!==t)return t;e=e.sibling}return null}var Ke=t.unstable_scheduleCallback,Ye=t.unstable_cancelCallback,Xe=t.unstable_shouldYield,Ze=t.unstable_requestPaint,Je=t.unstable_now,Ge=t.unstable_getCurrentPriorityLevel,et=t.unstable_ImmediatePriority,tt=t.unstable_UserBlockingPriority,nt=t.unstable_NormalPriority,rt=t.unstable_LowPriority,lt=t.unstable_IdlePriority,ot=null,at=null;var it=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(ut(e)/st|0)|0},ut=Math.log,st=Math.LN2;var ct=64,ft=4194304;function dt(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var i=a&~l;0!==i?r=dt(i):0!==(o&=a)&&(r=dt(o))}else 0!==(a=n&~l)?r=dt(a):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&l)&&((l=r&-r)>=(o=t&-t)||16===l&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)l=1<<(n=31-it(t)),r|=e[n],t&=~l;return r}function ht(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;default:return-1}}function mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function yt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var kt=0;function xt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var wt,St,_t,Ct,Et,Nt=!1,Pt=[],It=null,Tt=null,Lt=null,zt=new Map,Mt=new Map,Dt=[],jt="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 Ot(e,t){switch(e){case"focusin":case"focusout":It=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Lt=null;break;case"pointerover":case"pointerout":zt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mt.delete(t.pointerId)}}function Ft(e,t,n,r,l,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[l]},null!==t&&(null!==(t=kl(t))&&St(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==l&&-1===t.indexOf(l)&&t.push(l),e)}function Rt(e){var t=bl(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=$e(n)))return e.blockedOn=t,void Et(e.priority,function(){_t(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function At(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=kl(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);xe=r,n.target.dispatchEvent(r),xe=null,t.shift()}return!0}function Bt(e,t,n){At(e)&&n.delete(t)}function Ut(){Nt=!1,null!==It&&At(It)&&(It=null),null!==Tt&&At(Tt)&&(Tt=null),null!==Lt&&At(Lt)&&(Lt=null),zt.forEach(Bt),Mt.forEach(Bt)}function Ht(e,n){e.blockedOn===n&&(e.blockedOn=null,Nt||(Nt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ut)))}function Vt(e){function t(t){return Ht(t,e)}if(0<Pt.length){Ht(Pt[0],e);for(var n=1;n<Pt.length;n++){var r=Pt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&Ht(It,e),null!==Tt&&Ht(Tt,e),null!==Lt&&Ht(Lt,e),zt.forEach(t),Mt.forEach(t),n=0;n<Dt.length;n++)(r=Dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)Rt(n),null===n.blockedOn&&Dt.shift()}var $t=k.ReactCurrentBatchConfig,Wt=!0;function qt(e,t,n,r){var l=kt,o=$t.transition;$t.transition=null;try{kt=1,Kt(e,t,n,r)}finally{kt=l,$t.transition=o}}function Qt(e,t,n,r){var l=kt,o=$t.transition;$t.transition=null;try{kt=4,Kt(e,t,n,r)}finally{kt=l,$t.transition=o}}function Kt(e,t,n,r){if(Wt){var l=Xt(e,t,n,r);if(null===l)Wr(e,t,r,Yt,n),Ot(e,r);else if(function(e,t,n,r,l){switch(t){case"focusin":return It=Ft(It,e,t,n,r,l),!0;case"dragenter":return Tt=Ft(Tt,e,t,n,r,l),!0;case"mouseover":return Lt=Ft(Lt,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return zt.set(o,Ft(zt.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,Mt.set(o,Ft(Mt.get(o)||null,e,t,n,r,l)),!0}return!1}(l,e,t,n,r))r.stopPropagation();else if(Ot(e,r),4&t&&-1<jt.indexOf(e)){for(;null!==l;){var o=kl(l);if(null!==o&&wt(o),null===(o=Xt(e,t,n,r))&&Wr(e,t,r,Yt,n),o===l)break;l=o}null!==l&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Yt=null;function Xt(e,t,n,r){if(Yt=null,null!==(e=bl(e=we(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=$e(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Zt(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(Ge()){case et:return 1;case tt:return 4;case nt:case rt:return 16;case lt:return 536870912;default:return 16}default:return 16}}var Jt=null,Gt=null,en=null;function tn(){if(en)return en;var e,t,n=Gt,r=n.length,l="value"in Jt?Jt.value:Jt.textContent,o=l.length;for(e=0;e<r&&n[e]===l[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===l[o-t];t++);return en=l.slice(e,1<t?1-t:void 0)}function nn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rn(){return!0}function ln(){return!1}function on(e){function t(t,n,r,l,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=l,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(l):l[a]);return this.isDefaultPrevented=(null!=l.defaultPrevented?l.defaultPrevented:!1===l.returnValue)?rn:ln,this.isPropagationStopped=ln,this}return R(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var an,un,sn,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=on(cn),dn=R({},cn,{view:0,detail:0}),pn=on(dn),hn=R({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sn&&(sn&&"mousemove"===e.type?(an=e.screenX-sn.screenX,un=e.screenY-sn.screenY):un=an=0,sn=e),an)},movementY:function(e){return"movementY"in e?e.movementY:un}}),mn=on(hn),gn=on(R({},hn,{dataTransfer:0})),yn=on(R({},dn,{relatedTarget:0})),vn=on(R({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=R({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=on(bn),xn=on(R({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={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"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function En(){return Cn}var Nn=R({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pn=on(Nn),In=on(R({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=on(R({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Ln=on(R({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),zn=R({},hn,{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}),Mn=on(zn),Dn=[9,13,27,32],jn=i&&"CompositionEvent"in window,On=null;i&&"documentMode"in document&&(On=document.documentMode);var Fn=i&&"TextEvent"in window&&!On,Rn=i&&(!jn||On&&8<On&&11>=On),An=String.fromCharCode(32),Bn=!1;function Un(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var $n={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 Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!$n[e.type]:"textarea"===t}function qn(e,t,n,r){Ne(r),0<(t=Qr(t,"onChange")).length&&(n=new fn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qn=null,Kn=null;function Yn(e){Ar(e,0)}function Xn(e){if(K(xl(e)))return e}function Zn(e,t){if("change"===e)return t}var Jn=!1;if(i){var Gn;if(i){var er="oninput"in document;if(!er){var tr=document.createElement("div");tr.setAttribute("oninput","return;"),er="function"==typeof tr.oninput}Gn=er}else Gn=!1;Jn=Gn&&(!document.documentMode||9<document.documentMode)}function nr(){Qn&&(Qn.detachEvent("onpropertychange",rr),Kn=Qn=null)}function rr(e){if("value"===e.propertyName&&Xn(Kn)){var t=[];qn(t,Kn,e,we(e)),ze(Yn,t)}}function lr(e,t,n){"focusin"===e?(nr(),Kn=n,(Qn=t).attachEvent("onpropertychange",rr)):"focusout"===e&&nr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Kn)}function ar(e,t){if("click"===e)return Xn(t)}function ir(e,t){if("input"===e||"change"===e)return Xn(t)}var ur="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function sr(e,t){if(ur(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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 l=n[r];if(!u.call(t,l)||!ur(e[l],t[l]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=void 0===r.end?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=fr(n,o);var a=fr(n,r);l&&a&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=i&&"documentMode"in document&&11>=document.documentMode,yr=null,vr=null,br=null,kr=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==yr||yr!==Y(r)||("selectionStart"in(r=yr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&sr(br,r)||(br=r,0<(r=Qr(vr,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},_r={},Cr={};function Er(e){if(_r[e])return _r[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return _r[e]=n[t];return e}i&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var Nr=Er("animationend"),Pr=Er("animationiteration"),Ir=Er("animationstart"),Tr=Er("transitionend"),Lr=new Map,zr="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){Lr.set(e,t),o(t,[e])}for(var Dr=0;Dr<zr.length;Dr++){var jr=zr[Dr];Mr(jr.toLowerCase(),"on"+(jr[0].toUpperCase()+jr.slice(1)))}Mr(Nr,"onAnimationEnd"),Mr(Pr,"onAnimationIteration"),Mr(Ir,"onAnimationStart"),Mr("dblclick","onDoubleClick"),Mr("focusin","onFocus"),Mr("focusout","onBlur"),Mr(Tr,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="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(" "),Fr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Rr(e,t,r){var l=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,l,o,a,i,u,s){if(He.apply(this,arguments),Fe){if(!Fe)throw Error(n(198));var c=Re;Fe=!1,Re=null,Ae||(Ae=!0,Be=c)}}(l,t,void 0,e),e.currentTarget=null}function Ar(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var i=r[a],u=i.instance,s=i.currentTarget;if(i=i.listener,u!==o&&l.isPropagationStopped())break e;Rr(l,i,s),o=u}else for(a=0;a<r.length;a++){if(u=(i=r[a]).instance,s=i.currentTarget,i=i.listener,u!==o&&l.isPropagationStopped())break e;Rr(l,i,s),o=u}}}if(Ae)throw e=Be,Ae=!1,Be=null,e}function Br(e,t){var n=t[gl];void 0===n&&(n=t[gl]=new Set);var r=e+"__bubble";n.has(r)||($r(t,e,2,!1),n.add(r))}function Ur(e,t,n){var r=0;t&&(r|=4),$r(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Vr(e){if(!e[Hr]){e[Hr]=!0,r.forEach(function(t){"selectionchange"!==t&&(Fr.has(t)||Ur(t,!1,e),Ur(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,Ur("selectionchange",!1,t))}}function $r(e,t,n,r){switch(Zt(t)){case 1:var l=qt;break;case 4:l=Qt;break;default:l=Kt}n=l.bind(null,t,n,e),l=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(l=!0),r?void 0!==l?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):void 0!==l?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Wr(e,t,n,r,l){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var i=r.stateNode.containerInfo;if(i===l||8===i.nodeType&&i.parentNode===l)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===l||8===u.nodeType&&u.parentNode===l))return;a=a.return}for(;null!==i;){if(null===(a=bl(i)))return;if(5===(u=a.tag)||6===u){r=o=a;continue e}i=i.parentNode}}r=r.return}ze(function(){var r=o,l=we(n),a=[];e:{var i=Lr.get(e);if(void 0!==i){var u=fn,s=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":u=Pn;break;case"focusin":s="focus",u=yn;break;case"focusout":s="blur",u=yn;break;case"beforeblur":case"afterblur":u=yn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Tn;break;case Nr:case Pr:case Ir:u=vn;break;case Tr:u=Ln;break;case"scroll":u=pn;break;case"wheel":u=Mn;break;case"copy":case"cut":case"paste":u=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=In}var c=!!(4&t),f=!c&&"scroll"===e,d=c?null!==i?i+"Capture":null:i;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==d&&(null!=(m=Me(h,d))&&c.push(qr(h,m,p)))),f)break;h=h.return}0<c.length&&(i=new u(i,s,null,n,l),a.push({event:i,listeners:c}))}}if(!(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(i="mouseover"===e||"pointerover"===e)||n===xe||!(s=n.relatedTarget||n.fromElement)||!bl(s)&&!s[ml])&&(u||i)&&(i=l.window===l?l:(i=l.ownerDocument)?i.defaultView||i.parentWindow:window,u?(u=r,null!==(s=(s=n.relatedTarget||n.toElement)?bl(s):null)&&(s!==(f=Ve(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(u=null,s=r),u!==s)){if(c=mn,m="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=In,m="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==u?i:xl(u),p=null==s?i:xl(s),(i=new c(m,h+"leave",u,n,l)).target=f,i.relatedTarget=p,m=null,bl(l)===r&&((c=new c(d,h+"enter",s,n,l)).target=p,c.relatedTarget=f,m=c),f=m,u&&s)e:{for(d=s,h=0,p=c=u;p;p=Kr(p))h++;for(p=0,m=d;m;m=Kr(m))p++;for(;0<h-p;)c=Kr(c),h--;for(;0<p-h;)d=Kr(d),p--;for(;h--;){if(c===d||null!==d&&c===d.alternate)break e;c=Kr(c),d=Kr(d)}c=null}else c=null;null!==u&&Yr(a,i,u,c,!1),null!==s&&null!==f&&Yr(a,f,s,c,!0)}if("select"===(u=(i=r?xl(r):window).nodeName&&i.nodeName.toLowerCase())||"input"===u&&"file"===i.type)var g=Zn;else if(Wn(i))if(Jn)g=ir;else{g=or;var y=lr}else(u=i.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(g=ar);switch(g&&(g=g(e,r))?qn(a,g,n,l):(y&&y(e,i,r),"focusout"===e&&(y=i._wrapperState)&&y.controlled&&"number"===i.type&&te(i,"number",i.value)),y=r?xl(r):window,e){case"focusin":(Wn(y)||"true"===y.contentEditable)&&(yr=y,vr=r,br=null);break;case"focusout":br=vr=yr=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,xr(a,n,l);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":xr(a,n,l)}var v;if(jn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Vn?Un(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Rn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Vn&&(v=tn()):(Gt="value"in(Jt=l)?Jt.value:Jt.textContent,Vn=!0)),0<(y=Qr(r,b)).length&&(b=new xn(b,e,null,n,l),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Hn(n))&&(b.data=v))),(v=Fn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Bn=!0,An);case"textInput":return(e=t.data)===An&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!jn&&Un(e,t)?(e=tn(),en=Gt=Jt=null,Vn=!1,e):null;switch(e){case"paste":default: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 Rn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Qr(r,"onBeforeInput")).length&&(l=new xn("onBeforeInput","beforeinput",null,n,l),a.push({event:l,listeners:r}),l.data=v))}Ar(a,t)})}function qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var l=e,o=l.stateNode;5===l.tag&&null!==o&&(l=o,null!=(o=Me(e,n))&&r.unshift(qr(e,o,l)),null!=(o=Me(e,t))&&r.push(qr(e,o,l))),e=e.return}return r}function Kr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,l){for(var o=t._reactName,a=[];null!==n&&n!==r;){var i=n,u=i.alternate,s=i.stateNode;if(null!==u&&u===r)break;5===i.tag&&null!==s&&(i=s,l?null!=(u=Me(n,o))&&a.unshift(qr(n,u,i)):l||null!=(u=Me(n,o))&&a.push(qr(n,u,i))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Xr=/\r\n?/g,Zr=/\u0000|\uFFFD/g;function Jr(e){return("string"==typeof e?e:""+e).replace(Xr,"\n").replace(Zr,"")}function Gr(e,t,r){if(t=Jr(t),Jr(e)!==t&&r)throw Error(n(425))}function el(){}var tl=null,nl=null;function rl(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ll="function"==typeof setTimeout?setTimeout:void 0,ol="function"==typeof clearTimeout?clearTimeout:void 0,al="function"==typeof Promise?Promise:void 0,il="function"==typeof queueMicrotask?queueMicrotask:void 0!==al?function(e){return al.resolve(null).then(e).catch(ul)}:ll;function ul(e){setTimeout(function(){throw e})}function sl(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&8===l.nodeType)if("/$"===(n=l.data)){if(0===r)return e.removeChild(l),void Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=l}while(n);Vt(t)}function cl(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function fl(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var dl=Math.random().toString(36).slice(2),pl="__reactFiber$"+dl,hl="__reactProps$"+dl,ml="__reactContainer$"+dl,gl="__reactEvents$"+dl,yl="__reactListeners$"+dl,vl="__reactHandles$"+dl;function bl(e){var t=e[pl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ml]||n[pl]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=fl(e);null!==e;){if(n=e[pl])return n;e=fl(e)}return t}n=(e=n).parentNode}return null}function kl(e){return!(e=e[pl]||e[ml])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function xl(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function wl(e){return e[hl]||null}var Sl=[],_l=-1;function Cl(e){return{current:e}}function El(e){0>_l||(e.current=Sl[_l],Sl[_l]=null,_l--)}function Nl(e,t){_l++,Sl[_l]=e.current,e.current=t}var Pl={},Il=Cl(Pl),Tl=Cl(!1),Ll=Pl;function zl(e,t){var n=e.type.contextTypes;if(!n)return Pl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l,o={};for(l in n)o[l]=t[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ml(e){return null!=(e=e.childContextTypes)}function Dl(){El(Tl),El(Il)}function jl(e,t,r){if(Il.current!==Pl)throw Error(n(168));Nl(Il,t),Nl(Tl,r)}function Ol(e,t,r){var l=e.stateNode;if(t=t.childContextTypes,"function"!=typeof l.getChildContext)return r;for(var o in l=l.getChildContext())if(!(o in t))throw Error(n(108,$(e)||"Unknown",o));return R({},r,l)}function Fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Pl,Ll=Il.current,Nl(Il,e),Nl(Tl,Tl.current),!0}function Rl(e,t,r){var l=e.stateNode;if(!l)throw Error(n(169));r?(e=Ol(e,t,Ll),l.__reactInternalMemoizedMergedChildContext=e,El(Tl),El(Il),Nl(Il,e)):El(Tl),Nl(Tl,r)}var Al=null,Bl=!1,Ul=!1;function Hl(e){null===Al?Al=[e]:Al.push(e)}function Vl(){if(!Ul&&null!==Al){Ul=!0;var e=0,t=kt;try{var n=Al;for(kt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Al=null,Bl=!1}catch(l){throw null!==Al&&(Al=Al.slice(e+1)),Ke(et,Vl),l}finally{kt=t,Ul=!1}}return null}var $l=[],Wl=0,ql=null,Ql=0,Kl=[],Yl=0,Xl=null,Zl=1,Jl="";function Gl(e,t){$l[Wl++]=Ql,$l[Wl++]=ql,ql=e,Ql=t}function eo(e,t,n){Kl[Yl++]=Zl,Kl[Yl++]=Jl,Kl[Yl++]=Xl,Xl=e;var r=Zl;e=Jl;var l=32-it(r)-1;r&=~(1<<l),n+=1;var o=32-it(t)+l;if(30<o){var a=l-l%5;o=(r&(1<<a)-1).toString(32),r>>=a,l-=a,Zl=1<<32-it(t)+l|n<<l|r,Jl=o+e}else Zl=1<<o|n<<l|r,Jl=e}function to(e){null!==e.return&&(Gl(e,1),eo(e,1,0))}function no(e){for(;e===ql;)ql=$l[--Wl],$l[Wl]=null,Ql=$l[--Wl],$l[Wl]=null;for(;e===Xl;)Xl=Kl[--Yl],Kl[Yl]=null,Jl=Kl[--Yl],Kl[Yl]=null,Zl=Kl[--Yl],Kl[Yl]=null}var ro=null,lo=null,oo=!1,ao=null;function io(e,t){var n=zs(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function uo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ro=e,lo=cl(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ro=e,lo=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Xl?{id:Zl,overflow:Jl}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=zs(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ro=e,lo=null,!0);default:return!1}}function so(e){return!(!(1&e.mode)||128&e.flags)}function co(e){if(oo){var t=lo;if(t){var r=t;if(!uo(e,t)){if(so(e))throw Error(n(418));t=cl(r.nextSibling);var l=ro;t&&uo(e,t)?io(l,r):(e.flags=-4097&e.flags|2,oo=!1,ro=e)}}else{if(so(e))throw Error(n(418));e.flags=-4097&e.flags|2,oo=!1,ro=e}}}function fo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ro=e}function po(e){if(e!==ro)return!1;if(!oo)return fo(e),oo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!rl(e.type,e.memoizedProps)),t&&(t=lo)){if(so(e))throw ho(),Error(n(418));for(;t;)io(e,t),t=cl(t.nextSibling)}if(fo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){lo=cl(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}lo=null}}else lo=ro?cl(e.stateNode.nextSibling):null;return!0}function ho(){for(var e=lo;e;)e=cl(e.nextSibling)}function mo(){lo=ro=null,oo=!1}function go(e){null===ao?ao=[e]:ao.push(e)}var yo=k.ReactCurrentBatchConfig;function vo(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var l=r.stateNode}if(!l)throw Error(n(147,e));var o=l,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function bo(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ko(e){return(0,e._init)(e._payload)}function xo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function l(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ds(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Rs(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function s(e,t,n,r){var l=n.type;return l===_?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===M&&ko(l)===t.type)?((r=o(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=js(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=As(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,l){return null===t||7!==t.tag?((t=Os(n,e.mode,r,l)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Rs(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=js(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case S:return(t=As(t,e.mode,n)).return=e,t;case M:return d(e,(0,t._init)(t._payload),n)}if(ne(t)||O(t))return(t=Os(t,e.mode,n,null)).return=e,t;bo(e,t)}return null}function p(e,t,n,r){var l=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==l?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===l?s(e,t,n,r):null;case S:return n.key===l?c(e,t,n,r):null;case M:return p(e,t,(l=n._init)(n._payload),r)}if(ne(n)||O(n))return null!==l?null:f(e,t,n,r,null);bo(e,n)}return null}function h(e,t,n,r,l){if("string"==typeof r&&""!==r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case x:return s(t,e=e.get(null===r.key?n:r.key)||null,r,l);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,l);case M:return h(e,t,n,(0,r._init)(r._payload),l)}if(ne(r)||O(r))return f(t,e=e.get(n)||null,r,l,null);bo(t,r)}return null}return function u(s,c,f,m){if("object"==typeof f&&null!==f&&f.type===_&&null===f.key&&(f=f.props.children),"object"==typeof f&&null!==f){switch(f.$$typeof){case x:e:{for(var g=f.key,y=c;null!==y;){if(y.key===g){if((g=f.type)===_){if(7===y.tag){r(s,y.sibling),(c=o(y,f.props.children)).return=s,s=c;break e}}else if(y.elementType===g||"object"==typeof g&&null!==g&&g.$$typeof===M&&ko(g)===y.type){r(s,y.sibling),(c=o(y,f.props)).ref=vo(s,y,f),c.return=s,s=c;break e}r(s,y);break}t(s,y),y=y.sibling}f.type===_?((c=Os(f.props.children,s.mode,m,f.key)).return=s,s=c):((m=js(f.type,f.key,f.props,null,s.mode,m)).ref=vo(s,c,f),m.return=s,s=m)}return i(s);case S:e:{for(y=f.key;null!==c;){if(c.key===y){if(4===c.tag&&c.stateNode.containerInfo===f.containerInfo&&c.stateNode.implementation===f.implementation){r(s,c.sibling),(c=o(c,f.children||[])).return=s,s=c;break e}r(s,c);break}t(s,c),c=c.sibling}(c=As(f,s.mode,m)).return=s,s=c}return i(s);case M:return u(s,c,(y=f._init)(f._payload),m)}if(ne(f))return function(n,o,i,u){for(var s=null,c=null,f=o,m=o=0,g=null;null!==f&&m<i.length;m++){f.index>m?(g=f,f=null):g=f.sibling;var y=p(n,f,i[m],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(n,f),o=a(y,o,m),null===c?s=y:c.sibling=y,c=y,f=g}if(m===i.length)return r(n,f),oo&&Gl(n,m),s;if(null===f){for(;m<i.length;m++)null!==(f=d(n,i[m],u))&&(o=a(f,o,m),null===c?s=f:c.sibling=f,c=f);return oo&&Gl(n,m),s}for(f=l(n,f);m<i.length;m++)null!==(g=h(f,n,m,i[m],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?m:g.key),o=a(g,o,m),null===c?s=g:c.sibling=g,c=g);return e&&f.forEach(function(e){return t(n,e)}),oo&&Gl(n,m),s}(s,c,f,m);if(O(f))return function(o,i,u,s){var c=O(u);if("function"!=typeof c)throw Error(n(150));if(null==(u=c.call(u)))throw Error(n(151));for(var f=c=null,m=i,g=i=0,y=null,v=u.next();null!==m&&!v.done;g++,v=u.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=p(o,m,v.value,s);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(o,m),i=a(b,i,g),null===f?c=b:f.sibling=b,f=b,m=y}if(v.done)return r(o,m),oo&&Gl(o,g),c;if(null===m){for(;!v.done;g++,v=u.next())null!==(v=d(o,v.value,s))&&(i=a(v,i,g),null===f?c=v:f.sibling=v,f=v);return oo&&Gl(o,g),c}for(m=l(o,m);!v.done;g++,v=u.next())null!==(v=h(m,o,g,v.value,s))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),i=a(v,i,g),null===f?c=v:f.sibling=v,f=v);return e&&m.forEach(function(e){return t(o,e)}),oo&&Gl(o,g),c}(s,c,f,m);bo(s,f)}return"string"==typeof f&&""!==f||"number"==typeof f?(f=""+f,null!==c&&6===c.tag?(r(s,c.sibling),(c=o(c,f)).return=s,s=c):(r(s,c),(c=Rs(f,s.mode,m)).return=s,s=c),i(s)):r(s,c)}}var wo=xo(!0),So=xo(!1),_o=Cl(null),Co=null,Eo=null,No=null;function Po(){No=Eo=Co=null}function Io(e){var t=_o.current;El(_o),e._currentValue=t}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Lo(e,t){Co=e,No=Eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ki=!0),e.firstContext=null)}function zo(e){var t=e._currentValue;if(No!==e)if(e={context:e,memoizedValue:t,next:null},null===Eo){if(null===Co)throw Error(n(308));Eo=e,Co.dependencies={lanes:0,firstContext:e}}else Eo=Eo.next=e;return t}var Mo=null;function Do(e){null===Mo?Mo=[e]:Mo.push(e)}function jo(e,t,n,r){var l=t.interleaved;return null===l?(n.next=n,Do(t)):(n.next=l.next,l.next=n),t.interleaved=n,Oo(e,r)}function Oo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Fo=!1;function Ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ao(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 Bo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Uo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Iu){var l=r.pending;return null===l?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Oo(e,n)}return null===(l=r.interleaved)?(t.next=t,Do(r)):(t.next=l.next,l.next=t),r.interleaved=t,Oo(e,n)}function Ho(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Vo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var l=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?l=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?l=o=t:o=o.next=t}else l=o=t;return n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $o(e,t,n,r){var l=e.updateQueue;Fo=!1;var o=l.firstBaseUpdate,a=l.lastBaseUpdate,i=l.shared.pending;if(null!==i){l.shared.pending=null;var u=i,s=u.next;u.next=null,null===a?o=s:a.next=s,a=u;var c=e.alternate;null!==c&&((i=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===i?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=u))}if(null!==o){var f=l.baseState;for(a=0,c=s=u=null,i=o;;){var d=i.lane,p=i.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:p,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,m=i;switch(d=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){f=h.call(p,f,d);break e}f=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(d="function"==typeof(h=m.payload)?h.call(p,f,d):h))break e;f=R({},f,d);break e;case 2:Fo=!0}}null!==i.callback&&0!==i.lane&&(e.flags|=64,null===(d=l.effects)?l.effects=[i]:d.push(i))}else p={eventTime:p,lane:d,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===c?(s=c=p,u=f):c=c.next=p,a|=d;if(null===(i=i.next)){if(null===(i=l.shared.pending))break;i=(d=i).next,d.next=null,l.lastBaseUpdate=d,l.shared.pending=null}}if(null===c&&(u=f),l.baseState=u,l.firstBaseUpdate=s,l.lastBaseUpdate=c,null!==(t=l.shared.interleaved)){l=t;do{a|=l.lane,l=l.next}while(l!==t)}else null===o&&(l.shared.lanes=0);Fu|=a,e.lanes=a,e.memoizedState=f}}function Wo(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var l=e[t],o=l.callback;if(null!==o){if(l.callback=null,l=r,"function"!=typeof o)throw Error(n(191,o));o.call(l)}}}var qo={},Qo=Cl(qo),Ko=Cl(qo),Yo=Cl(qo);function Xo(e){if(e===qo)throw Error(n(174));return e}function Zo(e,t){switch(Nl(Yo,t),Nl(Ko,e),Nl(Qo,qo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}El(Qo),Nl(Qo,t)}function Jo(){El(Qo),El(Ko),El(Yo)}function Go(e){Xo(Yo.current);var t=Xo(Qo.current),n=se(t,e.type);t!==n&&(Nl(Ko,e),Nl(Qo,n))}function ea(e){Ko.current===e&&(El(Qo),El(Ko))}var ta=Cl(0);function na(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ra=[];function la(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var oa=k.ReactCurrentDispatcher,aa=k.ReactCurrentBatchConfig,ia=0,ua=null,sa=null,ca=null,fa=!1,da=!1,pa=0,ha=0;function ma(){throw Error(n(321))}function ga(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function ya(e,t,r,l,o,a){if(ia=a,ua=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oa.current=null===e||null===e.memoizedState?ei:ti,e=r(l,o),da){a=0;do{if(da=!1,pa=0,25<=a)throw Error(n(301));a+=1,ca=sa=null,t.updateQueue=null,oa.current=ni,e=r(l,o)}while(da)}if(oa.current=Ga,t=null!==sa&&null!==sa.next,ia=0,ca=sa=ua=null,fa=!1,t)throw Error(n(300));return e}function va(){var e=0!==pa;return pa=0,e}function ba(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?ua.memoizedState=ca=e:ca=ca.next=e,ca}function ka(){if(null===sa){var e=ua.alternate;e=null!==e?e.memoizedState:null}else e=sa.next;var t=null===ca?ua.memoizedState:ca.next;if(null!==t)ca=t,sa=e;else{if(null===e)throw Error(n(310));e={memoizedState:(sa=e).memoizedState,baseState:sa.baseState,baseQueue:sa.baseQueue,queue:sa.queue,next:null},null===ca?ua.memoizedState=ca=e:ca=ca.next=e}return ca}function xa(e,t){return"function"==typeof t?t(e):t}function wa(e){var t=ka(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var l=sa,o=l.baseQueue,a=r.pending;if(null!==a){if(null!==o){var i=o.next;o.next=a.next,a.next=i}l.baseQueue=o=a,r.pending=null}if(null!==o){a=o.next,l=l.baseState;var u=i=null,s=null,c=a;do{var f=c.lane;if((ia&f)===f)null!==s&&(s=s.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),l=c.hasEagerState?c.eagerState:e(l,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===s?(u=s=d,i=l):s=s.next=d,ua.lanes|=f,Fu|=f}c=c.next}while(null!==c&&c!==a);null===s?i=l:s.next=u,ur(l,t.memoizedState)||(ki=!0),t.memoizedState=l,t.baseState=i,t.baseQueue=s,r.lastRenderedState=l}if(null!==(e=r.interleaved)){o=e;do{a=o.lane,ua.lanes|=a,Fu|=a,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Sa(e){var t=ka(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var l=r.dispatch,o=r.pending,a=t.memoizedState;if(null!==o){r.pending=null;var i=o=o.next;do{a=e(a,i.action),i=i.next}while(i!==o);ur(a,t.memoizedState)||(ki=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,l]}function _a(){}function Ca(e,t){var r=ua,l=ka(),o=t(),a=!ur(l.memoizedState,o);if(a&&(l.memoizedState=o,ki=!0),l=l.queue,Fa(Pa.bind(null,r,l,e),[e]),l.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(r.flags|=2048,za(9,Na.bind(null,r,l,o,t),void 0,null),null===Tu)throw Error(n(349));30&ia||Ea(r,t,o)}return o}function Ea(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ua.updateQueue)?(t={lastEffect:null,stores:null},ua.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Na(e,t,n,r){t.value=n,t.getSnapshot=r,Ia(t)&&Ta(e)}function Pa(e,t,n){return n(function(){Ia(t)&&Ta(e)})}function Ia(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ur(e,n)}catch(r){return!0}}function Ta(e){var t=Oo(e,1);null!==t&&rs(t,e,1,-1)}function La(e){var t=ba();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,ua,e),[t.memoizedState,e]}function za(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ua.updateQueue)?(t={lastEffect:null,stores:null},ua.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ma(){return ka().memoizedState}function Da(e,t,n,r){var l=ba();ua.flags|=e,l.memoizedState=za(1|t,n,void 0,void 0===r?null:r)}function ja(e,t,n,r){var l=ka();r=void 0===r?null:r;var o=void 0;if(null!==sa){var a=sa.memoizedState;if(o=a.destroy,null!==r&&ga(r,a.deps))return void(l.memoizedState=za(t,n,o,r))}ua.flags|=e,l.memoizedState=za(1|t,n,o,r)}function Oa(e,t){return Da(8390656,8,e,t)}function Fa(e,t){return ja(2048,8,e,t)}function Ra(e,t){return ja(4,2,e,t)}function Aa(e,t){return ja(4,4,e,t)}function Ba(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ua(e,t,n){return n=null!=n?n.concat([e]):null,ja(4,4,Ba.bind(null,t,e),n)}function Ha(){}function Va(e,t){var n=ka();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $a(e,t){var n=ka();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wa(e,t,n){return 21&ia?(ur(n,t)||(n=gt(),ua.lanes|=n,Fu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ki=!0),e.memoizedState=n)}function qa(e,t){var n=kt;kt=0!==n&&4>n?n:4,e(!0);var r=aa.transition;aa.transition={};try{e(!1),t()}finally{kt=n,aa.transition=r}}function Qa(){return ka().memoizedState}function Ka(e,t,n){var r=ns(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xa(e))Za(t,n);else if(null!==(n=jo(e,t,n,r))){rs(n,e,r,ts()),Ja(n,t,r)}}function Ya(e,t,n){var r=ns(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xa(e))Za(t,l);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,i=o(a,n);if(l.hasEagerState=!0,l.eagerState=i,ur(i,a)){var u=t.interleaved;return null===u?(l.next=l,Do(t)):(l.next=u.next,u.next=l),void(t.interleaved=l)}}catch(s){}null!==(n=jo(e,t,l,r))&&(rs(n,e,r,l=ts()),Ja(n,t,r))}}function Xa(e){var t=e.alternate;return e===ua||null!==t&&t===ua}function Za(e,t){da=fa=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ja(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Ga={readContext:zo,useCallback:ma,useContext:ma,useEffect:ma,useImperativeHandle:ma,useInsertionEffect:ma,useLayoutEffect:ma,useMemo:ma,useReducer:ma,useRef:ma,useState:ma,useDebugValue:ma,useDeferredValue:ma,useTransition:ma,useMutableSource:ma,useSyncExternalStore:ma,useId:ma,unstable_isNewReconciler:!1},ei={readContext:zo,useCallback:function(e,t){return ba().memoizedState=[e,void 0===t?null:t],e},useContext:zo,useEffect:Oa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Da(4194308,4,Ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Da(4194308,4,e,t)},useInsertionEffect:function(e,t){return Da(4,2,e,t)},useMemo:function(e,t){var n=ba();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ba();return t=void 0!==n?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=Ka.bind(null,ua,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ba().memoizedState=e},useState:La,useDebugValue:Ha,useDeferredValue:function(e){return ba().memoizedState=e},useTransition:function(){var e=La(!1),t=e[0];return e=qa.bind(null,e[1]),ba().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var l=ua,o=ba();if(oo){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Tu)throw Error(n(349));30&ia||Ea(l,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,Oa(Pa.bind(null,l,a,e),[e]),l.flags|=2048,za(9,Na.bind(null,l,a,r,t),void 0,null),r},useId:function(){var e=ba(),t=Tu.identifierPrefix;if(oo){var n=Jl;t=":"+t+"R"+(n=(Zl&~(1<<32-it(Zl)-1)).toString(32)+n),0<(n=pa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ha++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ti={readContext:zo,useCallback:Va,useContext:zo,useEffect:Fa,useImperativeHandle:Ua,useInsertionEffect:Ra,useLayoutEffect:Aa,useMemo:$a,useReducer:wa,useRef:Ma,useState:function(){return wa(xa)},useDebugValue:Ha,useDeferredValue:function(e){return Wa(ka(),sa.memoizedState,e)},useTransition:function(){return[wa(xa)[0],ka().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:Qa,unstable_isNewReconciler:!1},ni={readContext:zo,useCallback:Va,useContext:zo,useEffect:Fa,useImperativeHandle:Ua,useInsertionEffect:Ra,useLayoutEffect:Aa,useMemo:$a,useReducer:Sa,useRef:Ma,useState:function(){return Sa(xa)},useDebugValue:Ha,useDeferredValue:function(e){var t=ka();return null===sa?t.memoizedState=e:Wa(t,sa.memoizedState,e)},useTransition:function(){return[Sa(xa)[0],ka().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:Qa,unstable_isNewReconciler:!1};function ri(e,t){if(e&&e.defaultProps){for(var n in t=R({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function li(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:R({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var oi={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ts(),l=ns(e),o=Bo(r,l);o.payload=t,null!=n&&(o.callback=n),null!==(t=Uo(e,o,l))&&(rs(t,e,l,r),Ho(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ts(),l=ns(e),o=Bo(r,l);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Uo(e,o,l))&&(rs(t,e,l,r),Ho(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ts(),r=ns(e),l=Bo(n,r);l.tag=2,null!=t&&(l.callback=t),null!==(t=Uo(e,l,r))&&(rs(t,e,r,n),Ho(t,e,r))}};function ai(e,t,n,r,l,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!sr(n,r)||!sr(l,o))}function ii(e,t,n){var r=!1,l=Pl,o=t.contextType;return"object"==typeof o&&null!==o?o=zo(o):(l=Ml(t)?Ll:Il.current,o=(r=null!=(r=t.contextTypes))?zl(e,l):Pl),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=oi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function ui(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&oi.enqueueReplaceState(t,t.state,null)}function si(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Ro(e);var o=t.contextType;"object"==typeof o&&null!==o?l.context=zo(o):(o=Ml(t)?Ll:Il.current,l.context=zl(e,o)),l.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(li(e,t,o,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),t!==l.state&&oi.enqueueReplaceState(l,l.state,null),$o(e,n,l,r),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.flags|=4194308)}function ci(e,t){try{var n="",r=t;do{n+=H(r),r=r.return}while(r);var l=n}catch(o){l="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:l,digest:null}}function fi(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function di(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var pi="function"==typeof WeakMap?WeakMap:Map;function hi(e,t,n){(n=Bo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wu||(Wu=!0,qu=r),di(0,t)},n}function mi(e,t,n){(n=Bo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){di(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){di(0,t),"function"!=typeof r&&(null===Qu?Qu=new Set([this]):Qu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gi(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pi;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Es.bind(null,e,t,n),t.then(e,e))}function yi(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vi(e,t,n,r,l){return 1&e.mode?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bo(-1,1)).tag=2,Uo(n,t,1))),n.lanes|=1),e)}var bi=k.ReactCurrentOwner,ki=!1;function xi(e,t,n,r){t.child=null===e?So(t,null,n,r):wo(t,e.child,n,r)}function wi(e,t,n,r,l){n=n.render;var o=t.ref;return Lo(t,l),r=ya(e,t,n,r,o,l),n=va(),null===e||ki?(oo&&n&&to(t),t.flags|=1,xi(e,t,r,l),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Wi(e,t,l))}function Si(e,t,n,r,l){if(null===e){var o=n.type;return"function"!=typeof o||Ms(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=js(n.type,null,r,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,_i(e,t,o,r,l))}if(o=e.child,0===(e.lanes&l)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(a,r)&&e.ref===t.ref)return Wi(e,t,l)}return t.flags|=1,(e=Ds(o,r)).ref=t.ref,e.return=t,t.child=e}function _i(e,t,n,r,l){if(null!==e){var o=e.memoizedProps;if(sr(o,r)&&e.ref===t.ref){if(ki=!1,t.pendingProps=r=o,0===(e.lanes&l))return t.lanes=e.lanes,Wi(e,t,l);131072&e.flags&&(ki=!0)}}return Ni(e,t,n,r,l)}function Ci(e,t,n){var r=t.pendingProps,l=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Nl(Du,Mu),Mu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Nl(Du,Mu),Mu|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Nl(Du,Mu),Mu|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Nl(Du,Mu),Mu|=r;return xi(e,t,l,n),t.child}function Ei(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ni(e,t,n,r,l){var o=Ml(n)?Ll:Il.current;return o=zl(t,o),Lo(t,l),n=ya(e,t,n,r,o,l),r=va(),null===e||ki?(oo&&r&&to(t),t.flags|=1,xi(e,t,n,l),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Wi(e,t,l))}function Pi(e,t,n,r,l){if(Ml(n)){var o=!0;Fl(t)}else o=!1;if(Lo(t,l),null===t.stateNode)$i(e,t),ii(t,n,r),si(t,n,r,l),r=!0;else if(null===e){var a=t.stateNode,i=t.memoizedProps;a.props=i;var u=a.context,s=n.contextType;"object"==typeof s&&null!==s?s=zo(s):s=zl(t,s=Ml(n)?Ll:Il.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(i!==r||u!==s)&&ui(t,a,r,s),Fo=!1;var d=t.memoizedState;a.state=d,$o(t,r,a,l),u=t.memoizedState,i!==r||d!==u||Tl.current||Fo?("function"==typeof c&&(li(t,n,c,r),u=t.memoizedState),(i=Fo||ai(t,n,i,r,d,u,s))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=s,r=i):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ao(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:ri(t.type,i),a.props=s,f=t.pendingProps,d=a.context,"object"==typeof(u=n.contextType)&&null!==u?u=zo(u):u=zl(t,u=Ml(n)?Ll:Il.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(i!==f||d!==u)&&ui(t,a,r,u),Fo=!1,d=t.memoizedState,a.state=d,$o(t,r,a,l);var h=t.memoizedState;i!==f||d!==h||Tl.current||Fo?("function"==typeof p&&(li(t,n,p,r),h=t.memoizedState),(s=Fo||ai(t,n,s,r,d,h,u)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,u)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=u,r=s):("function"!=typeof a.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Ii(e,t,n,r,o,l)}function Ii(e,t,n,r,l,o){Ei(e,t);var a=!!(128&t.flags);if(!r&&!a)return l&&Rl(t,n,!1),Wi(e,t,o);r=t.stateNode,bi.current=t;var i=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=wo(t,e.child,null,o),t.child=wo(t,null,i,o)):xi(e,t,i,o),t.memoizedState=r.state,l&&Rl(t,n,!0),t.child}function Ti(e){var t=e.stateNode;t.pendingContext?jl(0,t.pendingContext,t.pendingContext!==t.context):t.context&&jl(0,t.context,!1),Zo(e,t.containerInfo)}function Li(e,t,n,r,l){return mo(),go(l),t.flags|=256,xi(e,t,n,r),t.child}var zi,Mi,Di,ji,Oi={dehydrated:null,treeContext:null,retryLane:0};function Fi(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ri(e,t,r){var l,o=t.pendingProps,a=ta.current,i=!1,u=!!(128&t.flags);if((l=u)||(l=(null===e||null!==e.memoizedState)&&!!(2&a)),l?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Nl(ta,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(u=o.children,e=o.fallback,i?(o=t.mode,i=t.child,u={mode:"hidden",children:u},1&o||null===i?i=Fs(u,o,0,null):(i.childLanes=0,i.pendingProps=u),e=Os(e,o,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Fi(r),t.memoizedState=Oi,e):Ai(t,u));if(null!==(a=e.memoizedState)&&null!==(l=a.dehydrated))return function(e,t,r,l,o,a,i){if(r)return 256&t.flags?(t.flags&=-257,Bi(e,t,i,l=fi(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=l.fallback,o=t.mode,l=Fs({mode:"visible",children:l.children},o,0,null),(a=Os(a,o,i,null)).flags|=2,l.return=t,a.return=t,l.sibling=a,t.child=l,1&t.mode&&wo(t,e.child,null,i),t.child.memoizedState=Fi(i),t.memoizedState=Oi,a);if(!(1&t.mode))return Bi(e,t,i,null);if("$!"===o.data){if(l=o.nextSibling&&o.nextSibling.dataset)var u=l.dgst;return l=u,Bi(e,t,i,l=fi(a=Error(n(419)),l,void 0))}if(u=0!==(i&e.childLanes),ki||u){if(null!==(l=Tu)){switch(i&-i){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(l.suspendedLanes|i))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Oo(e,o),rs(l,e,o,-1))}return gs(),Bi(e,t,i,l=fi(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Ps.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,lo=cl(o.nextSibling),ro=t,oo=!0,ao=null,null!==e&&(Kl[Yl++]=Zl,Kl[Yl++]=Jl,Kl[Yl++]=Xl,Zl=e.id,Jl=e.overflow,Xl=t),t=Ai(t,l.children),t.flags|=4096,t)}(e,t,u,o,l,a,r);if(i){i=o.fallback,u=t.mode,l=(a=e.child).sibling;var s={mode:"hidden",children:o.children};return 1&u||t.child===a?(o=Ds(a,s)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=s,t.deletions=null),null!==l?i=Ds(l,i):(i=Os(i,u,r,null)).flags|=2,i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,u=null===(u=e.child.memoizedState)?Fi(r):{baseLanes:u.baseLanes|r,cachePool:null,transitions:u.transitions},i.memoizedState=u,i.childLanes=e.childLanes&~r,t.memoizedState=Oi,o}return e=(i=e.child).sibling,o=Ds(i,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Ai(e,t){return(t=Fs({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bi(e,t,n,r){return null!==r&&go(r),wo(t,e.child,null,n),(e=Ai(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ui(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function Hi(e,t,n,r,l){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function Vi(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(xi(e,t,r.children,n),2&(r=ta.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ui(e,n,t);else if(19===e.tag)Ui(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Nl(ta,r),1&t.mode)switch(l){case"forwards":for(n=t.child,l=null;null!==n;)null!==(e=n.alternate)&&null===na(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Hi(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===na(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Hi(t,!0,n,null,o);break;case"together":Hi(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function $i(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wi(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Fu|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=Ds(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Ds(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function qi(e,t){if(!oo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qi(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=14680064&l.subtreeFlags,r|=14680064&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ki(e,t,r){var o=t.pendingProps;switch(no(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qi(t),null;case 1:case 17:return Ml(t.type)&&Dl(),Qi(t),null;case 3:return o=t.stateNode,Jo(),El(Tl),El(Il),la(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(po(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ao&&(is(ao),ao=null))),Mi(e,t),Qi(t),null;case 5:ea(t);var a=Xo(Yo.current);if(r=t.type,null!==e&&null!=t.stateNode)Di(e,t,r,o,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Qi(t),null}if(e=Xo(Qo.current),po(t)){o=t.stateNode,r=t.type;var i=t.memoizedProps;switch(o[pl]=t,o[hl]=i,e=!!(1&t.mode),r){case"dialog":Br("cancel",o),Br("close",o);break;case"iframe":case"object":case"embed":Br("load",o);break;case"video":case"audio":for(a=0;a<Or.length;a++)Br(Or[a],o);break;case"source":Br("error",o);break;case"img":case"image":case"link":Br("error",o),Br("load",o);break;case"details":Br("toggle",o);break;case"input":Z(o,i),Br("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!i.multiple},Br("invalid",o);break;case"textarea":oe(o,i),Br("invalid",o)}for(var u in be(r,i),a=null,i)if(i.hasOwnProperty(u)){var s=i[u];"children"===u?"string"==typeof s?o.textContent!==s&&(!0!==i.suppressHydrationWarning&&Gr(o.textContent,s,e),a=["children",s]):"number"==typeof s&&o.textContent!==""+s&&(!0!==i.suppressHydrationWarning&&Gr(o.textContent,s,e),a=["children",""+s]):l.hasOwnProperty(u)&&null!=s&&"onScroll"===u&&Br("scroll",o)}switch(r){case"input":Q(o),ee(o,i,!0);break;case"textarea":Q(o),ie(o);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(o.onclick=el)}o=a,t.updateQueue=o,null!==o&&(t.flags|=4)}else{u=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ue(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=u.createElement(r,{is:o.is}):(e=u.createElement(r),"select"===r&&(u=e,o.multiple?u.multiple=!0:o.size&&(u.size=o.size))):e=u.createElementNS(e,r),e[pl]=t,e[hl]=o,zi(e,t,!1,!1),t.stateNode=e;e:{switch(u=ke(r,o),r){case"dialog":Br("cancel",e),Br("close",e),a=o;break;case"iframe":case"object":case"embed":Br("load",e),a=o;break;case"video":case"audio":for(a=0;a<Or.length;a++)Br(Or[a],e);a=o;break;case"source":Br("error",e),a=o;break;case"img":case"image":case"link":Br("error",e),Br("load",e),a=o;break;case"details":Br("toggle",e),a=o;break;case"input":Z(e,o),a=X(e,o),Br("invalid",e);break;case"option":default:a=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},a=R({},o,{value:void 0}),Br("invalid",e);break;case"textarea":oe(e,o),a=le(e,o),Br("invalid",e)}for(i in be(r,a),s=a)if(s.hasOwnProperty(i)){var c=s[i];"style"===i?ye(e,c):"dangerouslySetInnerHTML"===i?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===i?"string"==typeof c?("textarea"!==r||""!==c)&&pe(e,c):"number"==typeof c&&pe(e,""+c):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(l.hasOwnProperty(i)?null!=c&&"onScroll"===i&&Br("scroll",e):null!=c&&v(e,i,c,u))}switch(r){case"input":Q(e),ee(e,o,!1);break;case"textarea":Q(e),ie(e);break;case"option":null!=o.value&&e.setAttribute("value",""+W(o.value));break;case"select":e.multiple=!!o.multiple,null!=(i=o.value)?re(e,!!o.multiple,i,!1):null!=o.defaultValue&&re(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=el)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Qi(t),null;case 6:if(e&&null!=t.stateNode)ji(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=Xo(Yo.current),Xo(Qo.current),po(t)){if(o=t.stateNode,r=t.memoizedProps,o[pl]=t,(i=o.nodeValue!==r)&&null!==(e=ro))switch(e.tag){case 3:Gr(o.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Gr(o.nodeValue,r,!!(1&e.mode))}i&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[pl]=t,t.stateNode=o}return Qi(t),null;case 13:if(El(ta),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(oo&&null!==lo&&1&t.mode&&!(128&t.flags))ho(),mo(),t.flags|=98560,i=!1;else if(i=po(t),null!==o&&null!==o.dehydrated){if(null===e){if(!i)throw Error(n(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(n(317));i[pl]=t}else mo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Qi(t),i=!1}else null!==ao&&(is(ao),ao=null),i=!0;if(!i)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((o=null!==o)!==(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ta.current?0===ju&&(ju=3):gs())),null!==t.updateQueue&&(t.flags|=4),Qi(t),null);case 4:return Jo(),Mi(e,t),null===e&&Vr(t.stateNode.containerInfo),Qi(t),null;case 10:return Io(t.type._context),Qi(t),null;case 19:if(El(ta),null===(i=t.memoizedState))return Qi(t),null;if(o=!!(128&t.flags),null===(u=i.rendering))if(o)qi(i,!1);else{if(0!==ju||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(u=na(e))){for(t.flags|=128,qi(i,!1),null!==(o=u.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(i=r).flags&=14680066,null===(u=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,e=u.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Nl(ta,1&ta.current|2),t.child}e=e.sibling}null!==i.tail&&Je()>Vu&&(t.flags|=128,o=!0,qi(i,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=na(u))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),qi(i,!0),null===i.tail&&"hidden"===i.tailMode&&!u.alternate&&!oo)return Qi(t),null}else 2*Je()-i.renderingStartTime>Vu&&1073741824!==r&&(t.flags|=128,o=!0,qi(i,!1),t.lanes=4194304);i.isBackwards?(u.sibling=t.child,t.child=u):(null!==(r=i.last)?r.sibling=u:t.child=u,i.last=u)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Je(),t.sibling=null,r=ta.current,Nl(ta,o?1&r|2:1&r),t):(Qi(t),null);case 22:case 23:return ds(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&1&t.mode?!!(1073741824&Mu)&&(Qi(t),6&t.subtreeFlags&&(t.flags|=8192)):Qi(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Yi(e,t){switch(no(t),t.tag){case 1:return Ml(t.type)&&Dl(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),El(Tl),El(Il),la(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ea(t),null;case 13:if(El(ta),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));mo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return El(ta),null;case 4:return Jo(),null;case 10:return Io(t.type._context),null;case 22:case 23:return ds(),null;default:return null}}zi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Mi=function(){},Di=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Xo(Qo.current);var a,i=null;switch(n){case"input":o=X(e,o),r=X(e,r),i=[];break;case"select":o=R({},o,{value:void 0}),r=R({},r,{value:void 0}),i=[];break;case"textarea":o=le(e,o),r=le(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=el)}for(c in be(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var u=o[c];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(l.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var s=r[c];if(u=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&s!==u&&(null!=s||null!=u))if("style"===c)if(u){for(a in u)!u.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&u[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(c,n)),n=s;else"dangerouslySetInnerHTML"===c?(s=s?s.__html:void 0,u=u?u.__html:void 0,null!=s&&u!==s&&(i=i||[]).push(c,s)):"children"===c?"string"!=typeof s&&"number"!=typeof s||(i=i||[]).push(c,""+s):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(l.hasOwnProperty(c)?(null!=s&&"onScroll"===c&&Br("scroll",e),i||u===s||(i=[])):(i=i||[]).push(c,s))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}},ji=function(e,t,n,r){n!==r&&(t.flags|=4)};var Xi=!1,Zi=!1,Ji="function"==typeof WeakSet?WeakSet:Set,Gi=null;function eu(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Cs(e,t,r)}else n.current=null}function tu(e,t,n){try{n()}catch(r){Cs(e,t,r)}}var nu=!1;function ru(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,void 0!==o&&tu(t,n,o)}l=l.next}while(l!==r)}}function lu(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 ou(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function au(e){var t=e.alternate;null!==t&&(e.alternate=null,au(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[pl],delete t[hl],delete t[gl],delete t[yl],delete t[vl])),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 iu(e){return 5===e.tag||3===e.tag||4===e.tag}function uu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||iu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function su(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=el));else if(4!==r&&null!==(e=e.child))for(su(e,t,n),e=e.sibling;null!==e;)su(e,t,n),e=e.sibling}function cu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cu(e,t,n),e=e.sibling;null!==e;)cu(e,t,n),e=e.sibling}var fu=null,du=!1;function pu(e,t,n){for(n=n.child;null!==n;)hu(e,t,n),n=n.sibling}function hu(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(ot,n)}catch(i){}switch(n.tag){case 5:Zi||eu(n,t);case 6:var r=fu,l=du;fu=null,pu(e,t,n),du=l,null!==(fu=r)&&(du?(e=fu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):fu.removeChild(n.stateNode));break;case 18:null!==fu&&(du?(e=fu,n=n.stateNode,8===e.nodeType?sl(e.parentNode,n):1===e.nodeType&&sl(e,n),Vt(e)):sl(fu,n.stateNode));break;case 4:r=fu,l=du,fu=n.stateNode.containerInfo,du=!0,pu(e,t,n),fu=r,du=l;break;case 0:case 11:case 14:case 15:if(!Zi&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){l=r=r.next;do{var o=l,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&tu(n,t,a),l=l.next}while(l!==r)}pu(e,t,n);break;case 1:if(!Zi&&(eu(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(i){Cs(n,t,i)}pu(e,t,n);break;case 21:pu(e,t,n);break;case 22:1&n.mode?(Zi=(r=Zi)||null!==n.memoizedState,pu(e,t,n),Zi=r):pu(e,t,n);break;default:pu(e,t,n)}}function mu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ji),t.forEach(function(t){var r=Is.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function gu(e,t){var r=t.deletions;if(null!==r)for(var l=0;l<r.length;l++){var o=r[l];try{var a=e,i=t,u=i;e:for(;null!==u;){switch(u.tag){case 5:fu=u.stateNode,du=!1;break e;case 3:case 4:fu=u.stateNode.containerInfo,du=!0;break e}u=u.return}if(null===fu)throw Error(n(160));hu(a,i,o),fu=null,du=!1;var s=o.alternate;null!==s&&(s.return=null),o.return=null}catch(c){Cs(o,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)yu(t,e),t=t.sibling}function yu(e,t){var r=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gu(t,e),vu(e),4&l){try{ru(3,e,e.return),lu(3,e)}catch(g){Cs(e,e.return,g)}try{ru(5,e,e.return)}catch(g){Cs(e,e.return,g)}}break;case 1:gu(t,e),vu(e),512&l&&null!==r&&eu(r,r.return);break;case 5:if(gu(t,e),vu(e),512&l&&null!==r&&eu(r,r.return),32&e.flags){var o=e.stateNode;try{pe(o,"")}catch(g){Cs(e,e.return,g)}}if(4&l&&null!=(o=e.stateNode)){var a=e.memoizedProps,i=null!==r?r.memoizedProps:a,u=e.type,s=e.updateQueue;if(e.updateQueue=null,null!==s)try{"input"===u&&"radio"===a.type&&null!=a.name&&J(o,a),ke(u,i);var c=ke(u,a);for(i=0;i<s.length;i+=2){var f=s[i],d=s[i+1];"style"===f?ye(o,d):"dangerouslySetInnerHTML"===f?de(o,d):"children"===f?pe(o,d):v(o,f,d,c)}switch(u){case"input":G(o,a);break;case"textarea":ae(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var h=a.value;null!=h?re(o,!!a.multiple,h,!1):p!==!!a.multiple&&(null!=a.defaultValue?re(o,!!a.multiple,a.defaultValue,!0):re(o,!!a.multiple,a.multiple?[]:"",!1))}o[hl]=a}catch(g){Cs(e,e.return,g)}}break;case 6:if(gu(t,e),vu(e),4&l){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(g){Cs(e,e.return,g)}}break;case 3:if(gu(t,e),vu(e),4&l&&null!==r&&r.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(g){Cs(e,e.return,g)}break;case 4:default:gu(t,e),vu(e);break;case 13:gu(t,e),vu(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Hu=Je())),4&l&&mu(e);break;case 22:if(f=null!==r&&null!==r.memoizedState,1&e.mode?(Zi=(c=Zi)||f,gu(t,e),Zi=c):gu(t,e),vu(e),8192&l){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!f&&1&e.mode)for(Gi=e,f=e.child;null!==f;){for(d=Gi=f;null!==Gi;){switch(h=(p=Gi).child,p.tag){case 0:case 11:case 14:case 15:ru(4,p,p.return);break;case 1:eu(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){l=p,r=p.return;try{t=l,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Cs(l,r,g)}}break;case 5:eu(p,p.return);break;case 22:if(null!==p.memoizedState){wu(d);continue}}null!==h?(h.return=p,Gi=h):wu(d)}f=f.sibling}e:for(f=null,d=e;;){if(5===d.tag){if(null===f){f=d;try{o=d.stateNode,c?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(u=d.stateNode,i=null!=(s=d.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null,u.style.display=ge("display",i))}catch(g){Cs(e,e.return,g)}}}else if(6===d.tag){if(null===f)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Cs(e,e.return,g)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gu(t,e),vu(e),4&l&&mu(e);case 21:}}function vu(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(iu(r)){var l=r;break e}r=r.return}throw Error(n(160))}switch(l.tag){case 5:var o=l.stateNode;32&l.flags&&(pe(o,""),l.flags&=-33),cu(e,uu(e),o);break;case 3:case 4:var a=l.stateNode.containerInfo;su(e,uu(e),a);break;default:throw Error(n(161))}}catch(i){Cs(e,e.return,i)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bu(e,t,n){Gi=e,ku(e)}function ku(e,t,n){for(var r=!!(1&e.mode);null!==Gi;){var l=Gi,o=l.child;if(22===l.tag&&r){var a=null!==l.memoizedState||Xi;if(!a){var i=l.alternate,u=null!==i&&null!==i.memoizedState||Zi;i=Xi;var s=Zi;if(Xi=a,(Zi=u)&&!s)for(Gi=l;null!==Gi;)u=(a=Gi).child,22===a.tag&&null!==a.memoizedState?Su(l):null!==u?(u.return=a,Gi=u):Su(l);for(;null!==o;)Gi=o,ku(o),o=o.sibling;Gi=l,Xi=i,Zi=s}xu(e)}else 8772&l.subtreeFlags&&null!==o?(o.return=l,Gi=o):xu(e)}}function xu(e){for(;null!==Gi;){var t=Gi;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Zi||lu(5,t);break;case 1:var l=t.stateNode;if(4&t.flags&&!Zi)if(null===r)l.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:ri(t.type,r.memoizedProps);l.componentDidUpdate(o,r.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Wo(t,a,l);break;case 3:var i=t.updateQueue;if(null!==i){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Wo(t,i,r)}break;case 5:var u=t.stateNode;if(null===r&&4&t.flags){r=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break;case"img":s.src&&(r.src=s.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var d=f.dehydrated;null!==d&&Vt(d)}}}break;default:throw Error(n(163))}Zi||512&t.flags&&ou(t)}catch(p){Cs(t,t.return,p)}}if(t===e){Gi=null;break}if(null!==(r=t.sibling)){r.return=t.return,Gi=r;break}Gi=t.return}}function wu(e){for(;null!==Gi;){var t=Gi;if(t===e){Gi=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Gi=n;break}Gi=t.return}}function Su(e){for(;null!==Gi;){var t=Gi;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{lu(4,t)}catch(u){Cs(t,n,u)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var l=t.return;try{r.componentDidMount()}catch(u){Cs(t,l,u)}}var o=t.return;try{ou(t)}catch(u){Cs(t,o,u)}break;case 5:var a=t.return;try{ou(t)}catch(u){Cs(t,a,u)}}}catch(u){Cs(t,t.return,u)}if(t===e){Gi=null;break}var i=t.sibling;if(null!==i){i.return=t.return,Gi=i;break}Gi=t.return}}var _u,Cu=Math.ceil,Eu=k.ReactCurrentDispatcher,Nu=k.ReactCurrentOwner,Pu=k.ReactCurrentBatchConfig,Iu=0,Tu=null,Lu=null,zu=0,Mu=0,Du=Cl(0),ju=0,Ou=null,Fu=0,Ru=0,Au=0,Bu=null,Uu=null,Hu=0,Vu=1/0,$u=null,Wu=!1,qu=null,Qu=null,Ku=!1,Yu=null,Xu=0,Zu=0,Ju=null,Gu=-1,es=0;function ts(){return 6&Iu?Je():-1!==Gu?Gu:Gu=Je()}function ns(e){return 1&e.mode?2&Iu&&0!==zu?zu&-zu:null!==yo.transition?(0===es&&(es=gt()),es):0!==(e=kt)?e:e=void 0===(e=window.event)?16:Zt(e.type):1}function rs(e,t,r,l){if(50<Zu)throw Zu=0,Ju=null,Error(n(185));vt(e,r,l),2&Iu&&e===Tu||(e===Tu&&(!(2&Iu)&&(Ru|=r),4===ju&&us(e,zu)),ls(e,l),1===r&&0===Iu&&!(1&t.mode)&&(Vu=Je()+500,Bl&&Vl()))}function ls(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-it(o),i=1<<a,u=l[a];-1===u?0!==(i&n)&&0===(i&r)||(l[a]=ht(i,t)):u<=t&&(e.expiredLanes|=i),o&=~i}}(e,t);var r=pt(e,e===Tu?zu:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Bl=!0,Hl(e)}(ss.bind(null,e)):Hl(ss.bind(null,e)),il(function(){!(6&Iu)&&Vl()}),n=null;else{switch(xt(r)){case 1:n=et;break;case 4:n=tt;break;case 16:default:n=nt;break;case 536870912:n=lt}n=Ts(n,os.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function os(e,t){if(Gu=-1,es=0,6&Iu)throw Error(n(327));var r=e.callbackNode;if(Ss()&&e.callbackNode!==r)return null;var l=pt(e,e===Tu?zu:0);if(0===l)return null;if(30&l||0!==(l&e.expiredLanes)||t)t=ys(e,l);else{t=l;var o=Iu;Iu|=2;var a=ms();for(Tu===e&&zu===t||($u=null,Vu=Je()+500,ps(e,t));;)try{bs();break}catch(u){hs(e,u)}Po(),Eu.current=a,Iu=o,null!==Lu?t=0:(Tu=null,zu=0,t=ju)}if(0!==t){if(2===t&&(0!==(o=mt(e))&&(l=o,t=as(e,o))),1===t)throw r=Ou,ps(e,0),us(e,l),ls(e,Je()),r;if(6===t)us(e,l);else{if(o=e.current.alternate,!(30&l||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var l=n[r],o=l.getSnapshot;l=l.value;try{if(!ur(o(),l))return!1}catch(i){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=ys(e,l),2===t&&(a=mt(e),0!==a&&(l=a,t=as(e,a))),1!==t)))throw r=Ou,ps(e,0),us(e,l),ls(e,Je()),r;switch(e.finishedWork=o,e.finishedLanes=l,t){case 0:case 1:throw Error(n(345));case 2:case 5:ws(e,Uu,$u);break;case 3:if(us(e,l),(130023424&l)===l&&10<(t=Hu+500-Je())){if(0!==pt(e,0))break;if(((o=e.suspendedLanes)&l)!==l){ts(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ll(ws.bind(null,e,Uu,$u),t);break}ws(e,Uu,$u);break;case 4:if(us(e,l),(4194240&l)===l)break;for(t=e.eventTimes,o=-1;0<l;){var i=31-it(l);a=1<<i,(i=t[i])>o&&(o=i),l&=~a}if(l=o,10<(l=(120>(l=Je()-l)?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Cu(l/1960))-l)){e.timeoutHandle=ll(ws.bind(null,e,Uu,$u),l);break}ws(e,Uu,$u);break;default:throw Error(n(329))}}}return ls(e,Je()),e.callbackNode===r?os.bind(null,e):null}function as(e,t){var n=Bu;return e.current.memoizedState.isDehydrated&&(ps(e,t).flags|=256),2!==(e=ys(e,t))&&(t=Uu,Uu=n,null!==t&&is(t)),e}function is(e){null===Uu?Uu=e:Uu.push.apply(Uu,e)}function us(e,t){for(t&=~Au,t&=~Ru,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function ss(e){if(6&Iu)throw Error(n(327));Ss();var t=pt(e,0);if(!(1&t))return ls(e,Je()),null;var r=ys(e,t);if(0!==e.tag&&2===r){var l=mt(e);0!==l&&(t=l,r=as(e,l))}if(1===r)throw r=Ou,ps(e,0),us(e,t),ls(e,Je()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ws(e,Uu,$u),ls(e,Je()),null}function cs(e,t){var n=Iu;Iu|=1;try{return e(t)}finally{0===(Iu=n)&&(Vu=Je()+500,Bl&&Vl())}}function fs(e){null!==Yu&&0===Yu.tag&&!(6&Iu)&&Ss();var t=Iu;Iu|=1;var n=Pu.transition,r=kt;try{if(Pu.transition=null,kt=1,e)return e()}finally{kt=r,Pu.transition=n,!(6&(Iu=t))&&Vl()}}function ds(){Mu=Du.current,El(Du)}function ps(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ol(n)),null!==Lu)for(n=Lu.return;null!==n;){var r=n;switch(no(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Dl();break;case 3:Jo(),El(Tl),El(Il),la();break;case 5:ea(r);break;case 4:Jo();break;case 13:case 19:El(ta);break;case 10:Io(r.type._context);break;case 22:case 23:ds()}n=n.return}if(Tu=e,Lu=e=Ds(e.current,null),zu=Mu=t,ju=0,Ou=null,Au=Ru=Fu=0,Uu=Bu=null,null!==Mo){for(t=0;t<Mo.length;t++)if(null!==(r=(n=Mo[t]).interleaved)){n.interleaved=null;var l=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=l,r.next=a}n.pending=r}Mo=null}return e}function hs(e,t){for(;;){var r=Lu;try{if(Po(),oa.current=Ga,fa){for(var l=ua.memoizedState;null!==l;){var o=l.queue;null!==o&&(o.pending=null),l=l.next}fa=!1}if(ia=0,ca=sa=ua=null,da=!1,pa=0,Nu.current=null,null===r||null===r.return){ju=1,Ou=t,Lu=null;break}e:{var a=e,i=r.return,u=r,s=t;if(t=zu,u.flags|=32768,null!==s&&"object"==typeof s&&"function"==typeof s.then){var c=s,f=u,d=f.tag;if(!(1&f.mode||0!==d&&11!==d&&15!==d)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=yi(i);if(null!==h){h.flags&=-257,vi(h,i,u,0,t),1&h.mode&&gi(a,c,t),s=c;var m=(t=h).updateQueue;if(null===m){var g=new Set;g.add(s),t.updateQueue=g}else m.add(s);break e}if(!(1&t)){gi(a,c,t),gs();break e}s=Error(n(426))}else if(oo&&1&u.mode){var y=yi(i);if(null!==y){!(65536&y.flags)&&(y.flags|=256),vi(y,i,u,0,t),go(ci(s,u));break e}}a=s=ci(s,u),4!==ju&&(ju=2),null===Bu?Bu=[a]:Bu.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Vo(a,hi(0,s,t));break e;case 1:u=s;var v=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Qu&&Qu.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Vo(a,mi(a,u,t));break e}}a=a.return}while(null!==a)}xs(r)}catch(k){t=k,Lu===r&&null!==r&&(Lu=r=r.return);continue}break}}function ms(){var e=Eu.current;return Eu.current=Ga,null===e?Ga:e}function gs(){0!==ju&&3!==ju&&2!==ju||(ju=4),null===Tu||!(268435455&Fu)&&!(268435455&Ru)||us(Tu,zu)}function ys(e,t){var r=Iu;Iu|=2;var l=ms();for(Tu===e&&zu===t||($u=null,ps(e,t));;)try{vs();break}catch(o){hs(e,o)}if(Po(),Iu=r,Eu.current=l,null!==Lu)throw Error(n(261));return Tu=null,zu=0,ju}function vs(){for(;null!==Lu;)ks(Lu)}function bs(){for(;null!==Lu&&!Xe();)ks(Lu)}function ks(e){var t=_u(e.alternate,e,Mu);e.memoizedProps=e.pendingProps,null===t?xs(e):Lu=t,Nu.current=null}function xs(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Yi(n,t)))return n.flags&=32767,void(Lu=n);if(null===e)return ju=6,void(Lu=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ki(n,t,Mu)))return void(Lu=n);if(null!==(t=t.sibling))return void(Lu=t);Lu=t=e}while(null!==t);0===ju&&(ju=5)}function ws(e,t,r){var l=kt,o=Pu.transition;try{Pu.transition=null,kt=1,function(e,t,r,l){do{Ss()}while(null!==Yu);if(6&Iu)throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(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 l=31-it(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}(e,a),e===Tu&&(Lu=Tu=null,zu=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Ku||(Ku=!0,Ts(nt,function(){return Ss(),null})),a=!!(15990&r.flags),!!(15990&r.subtreeFlags)||a){a=Pu.transition,Pu.transition=null;var i=kt;kt=1;var u=Iu;Iu|=4,Nu.current=null,function(e,t){if(tl=Wt,hr(e=pr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var l=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(l&&0!==l.rangeCount){r=l.anchorNode;var o=l.anchorOffset,a=l.focusNode;l=l.focusOffset;try{r.nodeType,a.nodeType}catch(x){r=null;break e}var i=0,u=-1,s=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var h;d!==r||0!==o&&3!==d.nodeType||(u=i+o),d!==a||0!==l&&3!==d.nodeType||(s=i+l),3===d.nodeType&&(i+=d.nodeValue.length),null!==(h=d.firstChild);)p=d,d=h;for(;;){if(d===e)break t;if(p===r&&++c===o&&(u=i),p===a&&++f===l&&(s=i),null!==(h=d.nextSibling))break;p=(d=p).parentNode}d=h}r=-1===u||-1===s?null:{start:u,end:s}}else r=null}r=r||{start:0,end:0}}else r=null;for(nl={focusedElem:e,selectionRange:r},Wt=!1,Gi=t;null!==Gi;)if(e=(t=Gi).child,1028&t.subtreeFlags&&null!==e)e.return=t,Gi=e;else for(;null!==Gi;){t=Gi;try{var m=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,y=m.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:ri(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var k=t.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(n(163))}}catch(x){Cs(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Gi=e;break}Gi=t.return}m=nu,nu=!1}(e,r),yu(r,e),mr(nl),Wt=!!tl,nl=tl=null,e.current=r,bu(r),Ze(),Iu=u,kt=i,Pu.transition=a}else e.current=r;if(Ku&&(Ku=!1,Yu=e,Xu=o),a=e.pendingLanes,0===a&&(Qu=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(ot,e,void 0,!(128&~e.current.flags))}catch(t){}}(r.stateNode),ls(e,Je()),null!==t)for(l=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],l(o.value,{componentStack:o.stack,digest:o.digest});if(Wu)throw Wu=!1,e=qu,qu=null,e;!!(1&Xu)&&0!==e.tag&&Ss(),a=e.pendingLanes,1&a?e===Ju?Zu++:(Zu=0,Ju=e):Zu=0,Vl()}(e,t,r,l)}finally{Pu.transition=o,kt=l}return null}function Ss(){if(null!==Yu){var e=xt(Xu),t=Pu.transition,r=kt;try{if(Pu.transition=null,kt=16>e?16:e,null===Yu)var l=!1;else{if(e=Yu,Yu=null,Xu=0,6&Iu)throw Error(n(331));var o=Iu;for(Iu|=4,Gi=e.current;null!==Gi;){var a=Gi,i=a.child;if(16&Gi.flags){var u=a.deletions;if(null!==u){for(var s=0;s<u.length;s++){var c=u[s];for(Gi=c;null!==Gi;){var f=Gi;switch(f.tag){case 0:case 11:case 15:ru(8,f,a)}var d=f.child;if(null!==d)d.return=f,Gi=d;else for(;null!==Gi;){var p=(f=Gi).sibling,h=f.return;if(au(f),f===c){Gi=null;break}if(null!==p){p.return=h,Gi=p;break}Gi=h}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Gi=a}}if(2064&a.subtreeFlags&&null!==i)i.return=a,Gi=i;else e:for(;null!==Gi;){if(2048&(a=Gi).flags)switch(a.tag){case 0:case 11:case 15:ru(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,Gi=v;break e}Gi=a.return}}var b=e.current;for(Gi=b;null!==Gi;){var k=(i=Gi).child;if(2064&i.subtreeFlags&&null!==k)k.return=i,Gi=k;else e:for(i=b;null!==Gi;){if(2048&(u=Gi).flags)try{switch(u.tag){case 0:case 11:case 15:lu(9,u)}}catch(w){Cs(u,u.return,w)}if(u===i){Gi=null;break e}var x=u.sibling;if(null!==x){x.return=u.return,Gi=x;break e}Gi=u.return}}if(Iu=o,Vl(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(ot,e)}catch(w){}l=!0}return l}finally{kt=r,Pu.transition=t}}return!1}function _s(e,t,n){e=Uo(e,t=hi(0,t=ci(n,t),1),1),t=ts(),null!==e&&(vt(e,1,t),ls(e,t))}function Cs(e,t,n){if(3===e.tag)_s(e,e,n);else for(;null!==t;){if(3===t.tag){_s(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Qu||!Qu.has(r))){t=Uo(t,e=mi(t,e=ci(n,e),1),1),e=ts(),null!==t&&(vt(t,1,e),ls(t,e));break}}t=t.return}}function Es(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ts(),e.pingedLanes|=e.suspendedLanes&n,Tu===e&&(zu&n)===n&&(4===ju||3===ju&&(130023424&zu)===zu&&500>Je()-Hu?ps(e,0):Au|=n),ls(e,t)}function Ns(e,t){0===t&&(1&e.mode?(t=ft,!(130023424&(ft<<=1))&&(ft=4194304)):t=1);var n=ts();null!==(e=Oo(e,t))&&(vt(e,t,n),ls(e,n))}function Ps(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ns(e,n)}function Is(e,t){var r=0;switch(e.tag){case 13:var l=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(n(314))}null!==l&&l.delete(t),Ns(e,r)}function Ts(e,t){return Ke(e,t)}function Ls(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 zs(e,t,n,r){return new Ls(e,t,n,r)}function Ms(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ds(e,t){var n=e.alternate;return null===n?((n=zs(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function js(e,t,r,l,o,a){var i=2;if(l=e,"function"==typeof e)Ms(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case _:return Os(r.children,o,a,t);case C:i=8,o|=8;break;case E:return(e=zs(12,r,t,2|o)).elementType=E,e.lanes=a,e;case T:return(e=zs(13,r,t,o)).elementType=T,e.lanes=a,e;case L:return(e=zs(19,r,t,o)).elementType=L,e.lanes=a,e;case D:return Fs(r,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case N:i=10;break e;case P:i=9;break e;case I:i=11;break e;case z:i=14;break e;case M:i=16,l=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=zs(i,r,t,o)).elementType=e,t.type=l,t.lanes=a,t}function Os(e,t,n,r){return(e=zs(7,e,r,t)).lanes=n,e}function Fs(e,t,n,r){return(e=zs(22,e,r,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Rs(e,t,n){return(e=zs(6,e,null,t)).lanes=n,e}function As(e,t,n){return(t=zs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bs(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yt(0),this.expirationTimes=yt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yt(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Us(e,t,n,r,l,o,a,i,u){return e=new Bs(e,t,n,i,u),1===t?(t=1,!0===o&&(t|=8)):t=0,o=zs(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ro(o),e}function Hs(e){if(!e)return Pl;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ml(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Ml(r))return Ol(e,r,t)}return t}function Vs(e,t,n,r,l,o,a,i,u){return(e=Us(n,r,!0,e,0,o,0,i,u)).context=Hs(null),n=e.current,(o=Bo(r=ts(),l=ns(n))).callback=null!=t?t:null,Uo(n,o,l),e.current.lanes=l,vt(e,l,r),ls(e,r),e}function $s(e,t,n,r){var l=t.current,o=ts(),a=ns(l);return n=Hs(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Uo(l,t,a))&&(rs(e,l,a,o),Ho(e,l,a)),a}function Ws(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qs(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Qs(e,t){qs(e,t),(e=e.alternate)&&qs(e,t)}_u=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Tl.current)ki=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return ki=!1,function(e,t,n){switch(t.tag){case 3:Ti(t),mo();break;case 5:Go(t);break;case 1:Ml(t.type)&&Fl(t);break;case 4:Zo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;Nl(_o,r._currentValue),r._currentValue=l;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Nl(ta,1&ta.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ri(e,t,n):(Nl(ta,1&ta.current),null!==(e=Wi(e,t,n))?e.sibling:null);Nl(ta,1&ta.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Vi(e,t,n);t.flags|=128}if(null!==(l=t.memoizedState)&&(l.rendering=null,l.tail=null,l.lastEffect=null),Nl(ta,ta.current),r)break;return null;case 22:case 23:return t.lanes=0,Ci(e,t,n)}return Wi(e,t,n)}(e,t,r);ki=!!(131072&e.flags)}else ki=!1,oo&&1048576&t.flags&&eo(t,Ql,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;$i(e,t),e=t.pendingProps;var o=zl(t,Il.current);Lo(t,r),o=ya(null,t,l,e,o,r);var a=va();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ml(l)?(a=!0,Fl(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ro(t),o.updater=oi,t.stateNode=o,o._reactInternals=t,si(t,l,e,r),t=Ii(null,t,l,!0,a,r)):(t.tag=0,oo&&a&&to(t),xi(null,t,o,r),t=t.child),t;case 16:l=t.elementType;e:{switch($i(e,t),e=t.pendingProps,l=(o=l._init)(l._payload),t.type=l,o=t.tag=function(e){if("function"==typeof e)return Ms(e)?1:0;if(null!=e){if((e=e.$$typeof)===I)return 11;if(e===z)return 14}return 2}(l),e=ri(l,e),o){case 0:t=Ni(null,t,l,e,r);break e;case 1:t=Pi(null,t,l,e,r);break e;case 11:t=wi(null,t,l,e,r);break e;case 14:t=Si(null,t,l,ri(l.type,e),r);break e}throw Error(n(306,l,""))}return t;case 0:return l=t.type,o=t.pendingProps,Ni(e,t,l,o=t.elementType===l?o:ri(l,o),r);case 1:return l=t.type,o=t.pendingProps,Pi(e,t,l,o=t.elementType===l?o:ri(l,o),r);case 3:e:{if(Ti(t),null===e)throw Error(n(387));l=t.pendingProps,o=(a=t.memoizedState).element,Ao(e,t),$o(t,l,null,r);var i=t.memoizedState;if(l=i.element,a.isDehydrated){if(a={element:l,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Li(e,t,l,r,o=ci(Error(n(423)),t));break e}if(l!==o){t=Li(e,t,l,r,o=ci(Error(n(424)),t));break e}for(lo=cl(t.stateNode.containerInfo.firstChild),ro=t,oo=!0,ao=null,r=So(t,null,l,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(mo(),l===o){t=Wi(e,t,r);break e}xi(e,t,l,r)}t=t.child}return t;case 5:return Go(t),null===e&&co(t),l=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,i=o.children,rl(l,o)?i=null:null!==a&&rl(l,a)&&(t.flags|=32),Ei(e,t),xi(e,t,i,r),t.child;case 6:return null===e&&co(t),null;case 13:return Ri(e,t,r);case 4:return Zo(t,t.stateNode.containerInfo),l=t.pendingProps,null===e?t.child=wo(t,null,l,r):xi(e,t,l,r),t.child;case 11:return l=t.type,o=t.pendingProps,wi(e,t,l,o=t.elementType===l?o:ri(l,o),r);case 7:return xi(e,t,t.pendingProps,r),t.child;case 8:case 12:return xi(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(l=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Nl(_o,l._currentValue),l._currentValue=i,null!==a)if(ur(a.value,i)){if(a.children===o.children&&!Tl.current){t=Wi(e,t,r);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var u=a.dependencies;if(null!==u){i=a.child;for(var s=u.firstContext;null!==s;){if(s.context===l){if(1===a.tag){(s=Bo(-1,r&-r)).tag=2;var c=a.updateQueue;if(null!==c){var f=(c=c.shared).pending;null===f?s.next=s:(s.next=f.next,f.next=s),c.pending=s}}a.lanes|=r,null!==(s=a.alternate)&&(s.lanes|=r),To(a.return,r,t),u.lanes|=r;break}s=s.next}}else if(10===a.tag)i=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(i=a.return))throw Error(n(341));i.lanes|=r,null!==(u=i.alternate)&&(u.lanes|=r),To(i,r,t),i=a.sibling}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===t){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}xi(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,l=t.pendingProps.children,Lo(t,r),l=l(o=zo(o)),t.flags|=1,xi(e,t,l,r),t.child;case 14:return o=ri(l=t.type,t.pendingProps),Si(e,t,l,o=ri(l.type,o),r);case 15:return _i(e,t,t.type,t.pendingProps,r);case 17:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:ri(l,o),$i(e,t),t.tag=1,Ml(l)?(e=!0,Fl(t)):e=!1,Lo(t,r),ii(t,l,o),si(t,l,o,r),Ii(null,t,l,!0,e,r);case 19:return Vi(e,t,r);case 22:return Ci(e,t,r)}throw Error(n(156,t.tag))};var Ks="function"==typeof reportError?reportError:function(e){console.error(e)};function Ys(e){this._internalRoot=e}function Xs(e){this._internalRoot=e}function Zs(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Js(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Gs(){}function ec(e,t,n,r,l){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof l){var i=l;l=function(){var e=Ws(a);i.call(e)}}$s(t,a,e,l)}else a=function(e,t,n,r,l){if(l){if("function"==typeof r){var o=r;r=function(){var e=Ws(a);o.call(e)}}var a=Vs(t,r,e,0,null,!1,0,"",Gs);return e._reactRootContainer=a,e[ml]=a.current,Vr(8===e.nodeType?e.parentNode:e),fs(),a}for(;l=e.lastChild;)e.removeChild(l);if("function"==typeof r){var i=r;r=function(){var e=Ws(u);i.call(e)}}var u=Us(e,0,!1,null,0,!1,0,"",Gs);return e._reactRootContainer=u,e[ml]=u.current,Vr(8===e.nodeType?e.parentNode:e),fs(function(){$s(t,u,n,r)}),u}(n,t,e,l,r);return Ws(a)}Xs.prototype.render=Ys.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));$s(e,t,null,null)},Xs.prototype.unmount=Ys.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;fs(function(){$s(null,e,null,null)}),t[ml]=null}},Xs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&Rt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(bt(t,1|n),ls(t,Je()),!(6&Iu)&&(Vu=Je()+500,Vl()))}break;case 13:fs(function(){var t=Oo(e,1);if(null!==t){var n=ts();rs(t,e,1,n)}}),Qs(e,1)}},St=function(e){if(13===e.tag){var t=Oo(e,134217728);if(null!==t)rs(t,e,134217728,ts());Qs(e,134217728)}},_t=function(e){if(13===e.tag){var t=ns(e),n=Oo(e,t);if(null!==n)rs(n,e,t,ts());Qs(e,t)}},Ct=function(){return kt},Et=function(e,t){var n=kt;try{return kt=e,t()}finally{kt=n}},Se=function(e,t,r){switch(t){case"input":if(G(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var l=r[t];if(l!==e&&l.form===e.form){var o=wl(l);if(!o)throw Error(n(90));K(l),G(l,o)}}}break;case"textarea":ae(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Ie=cs,Te=fs;var tc={usingClientEntryPoint:!1,Events:[kl,xl,wl,Ne,Pe,cs]},nc={findFiberByHostInstance:bl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var lc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lc.isDisabled&&lc.supportsFiber)try{ot=lc.inject(rc),at=lc}catch(fe){}}return b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,b.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zs(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},b.createRoot=function(e,t){if(!Zs(e))throw Error(n(299));var r=!1,l="",o=Ks;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(l=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Us(e,1,!1,null,0,r,0,l,o),e[ml]=t.current,Vr(8===e.nodeType?e.parentNode:e),new Ys(t)},b.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return e=null===(e=qe(t))?null:e.stateNode},b.flushSync=function(e){return fs(e)},b.hydrate=function(e,t,r){if(!Js(t))throw Error(n(200));return ec(null,e,t,!0,r)},b.hydrateRoot=function(e,t,r){if(!Zs(e))throw Error(n(405));var l=null!=r&&r.hydratedSources||null,o=!1,a="",i=Ks;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(i=r.onRecoverableError)),t=Vs(t,null,e,1,null!=r?r:null,o,0,a,i),e[ml]=t.current,Vr(e),l)for(e=0;e<l.length;e++)o=(o=(r=l[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Xs(t)},b.render=function(e,t,r){if(!Js(t))throw Error(n(200));return ec(null,e,t,!1,r)},b.unmountComponentAtNode=function(e){if(!Js(e))throw Error(n(40));return!!e._reactRootContainer&&(fs(function(){ec(null,null,e,!1,function(){e._reactRootContainer=null,e[ml]=null})}),!0)},b.unstable_batchedUpdates=cs,b.unstable_renderSubtreeIntoContainer=function(e,t,r,l){if(!Js(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return ec(e,t,r,!1,l)},b.version="18.3.1-next-f1338f8080-20240426",b}var _,C,E=function(){if(g)return y;g=1;var e=(m||(m=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),v.exports=S()),v.exports);return y.createRoot=e.createRoot,y.hydrateRoot=e.hydrateRoot,y}(),N={exports:{}},P={};var I=(C||(C=1,N.exports=function(){if(_)return P;_=1;var e=s(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var i,u={},s=null,c=null;for(i in void 0!==a&&(s=""+a),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,i)&&!o.hasOwnProperty(i)&&(u[i]=n[i]);if(e&&e.defaultProps)for(i in n=e.defaultProps)void 0===u[i]&&(u[i]=n[i]);return{$$typeof:t,type:e,key:s,ref:c,props:u,_owner:l.current}}return P.Fragment=n,P.jsx=a,P.jsxs=a,P}()),N.exports);const T="bb-chat-";function L(e,t){try{sessionStorage.setItem(`${T}${e}`,JSON.stringify(t))}catch{}}function z(e){try{sessionStorage.removeItem(`${T}${e}`)}catch{}}function M(e){const{config:t,apiClient:n,mockMode:r,onSessionStart:l,onSessionEnd:o,onMessage:a,onError:i}=e,[u,s]=c.useState([]),[f,d]=c.useState([]),[p,h]=c.useState(!1),[m,g]=c.useState(null),[y,v]=c.useState(null),b=c.useRef(0),k=c.useRef(!1);c.useEffect(()=>{if(k.current)return;k.current=!0;const e=function(e){try{const t=sessionStorage.getItem(`${T}${e}`);return t?JSON.parse(t):null}catch{return null}}(t.embedId);e&&"active"===e.status&&(v(e.sessionId),s(e.messages),d(e.toolCalls),b.current=e.startTime)},[t.embedId]),c.useEffect(()=>{y&&u.length>0&&L(t.embedId,{sessionId:y,deploymentId:t.deploymentId,workerId:t.workerId,flowId:t.flowId,startTime:b.current,messages:u,toolCalls:f,status:"active"})},[y,u,f,t]);const x=c.useCallback(async()=>(b.current=Date.now(),v(null),s([]),d([]),z(t.embedId),""),[t.embedId]),w=c.useCallback((e,n,r)=>{switch(e.type){case"session":{const t=e.data;t.session_id&&(r(t.session_id),t.is_new&&(b.current=Date.now(),null==l||l(t.session_id)));break}case"message":{const t=e.data;t.content&&s(e=>e.map(e=>e.id===n?{...e,content:t.content,status:"streaming"}:e));break}case"tool_call":{const t=e.data;d(e=>{const n=e.findIndex(e=>e.name===t.function&&"pending"===e.status);return-1!==n&&void 0!==t.result?e.map((e,r)=>r===n?{...e,result:t.result,status:"completed"}:e):-1===n?[...e,{id:`tc-${Date.now()}-${Math.random().toString(36).slice(2)}`,name:t.function,arguments:t.args??{},status:"pending",timestamp:Date.now()}]:e}),t.content&&s(e=>e.map(e=>e.id===n?{...e,content:t.content,status:"streaming"}:e));break}case"waiting":break;case"done":s(e=>e.map(e=>e.id===n?{...e,status:"sent"}:e));break;case"completed":s(e=>e.map(e=>e.id===n?{...e,status:"sent"}:e)),y&&L(t.embedId,{sessionId:y,deploymentId:t.deploymentId,workerId:t.workerId,flowId:t.flowId,startTime:b.current,messages:u,toolCalls:f,status:"completed"});break;case"error":{const t=e.data;s(e=>e.map(e=>e.id===n?{...e,status:"error",content:t.error??"An error occurred"}:e));break}}},[t,y,u,f,l]),S=c.useCallback(async(e,t,n)=>{const r=e.getReader(),l=new TextDecoder;let o="";try{for(;;){const{done:e,value:a}=await r.read();if(e)break;for(o+=l.decode(a,{stream:!0});o.includes("\n\n");){const[e,r]=o.split("\n\n",2);o=r;for(const l of e.split("\n"))if(l.startsWith("data: "))try{const e=JSON.parse(l.slice(6));w(e,t,n)}catch{}}}}finally{r.releaseLock()}},[w]),_=c.useCallback(async e=>{if(!e.trim())return;const l={id:`user-${Date.now()}`,role:"user",content:e,timestamp:Date.now(),status:"sent"};s(e=>[...e,l]),null==a||a(l);const o=`assistant-${Date.now()}`,u={id:o,role:"assistant",content:"",timestamp:Date.now(),status:"streaming"};s(e=>[...e,u]),h(!0),g(null);const c=e=>{v(e)};try{if(r){const t=n.sendMessage(e);for await(const e of t)w(e,o,c)}else{const r=await n.sendMessage({embedId:t.embedId,message:e,sessionId:y??void 0});await S(r,o,c)}s(e=>e.map(e=>e.id===o&&"streaming"===e.status?{...e,status:"sent"}:e))}catch(f){const e=f instanceof Error?f:new Error("Failed to send message");g(e),null==i||i(e),s(e=>e.map(e=>e.id===o?{...e,status:"error",content:"Failed to get response"}:e))}finally{h(!1)}},[y,n,r,t.embedId,w,S,a,i]),C=c.useCallback(async()=>{if(!y)return;const e={sessionId:y,deploymentId:t.deploymentId,workerId:t.workerId,flowId:t.flowId,startTime:b.current,messages:u,toolCalls:f,status:"completed"};null==o||o(e),z(t.embedId),v(null),s([]),d([])},[y,t,u,f,o]),E=c.useCallback(()=>{s([]),d([])},[]);return{messages:u,toolCalls:f,isLoading:p,error:m,sessionId:y,sendMessage:_,endSession:C,clearMessages:E,startNewSession:x}}const D="https://chat-embed-deployment.onrender.com";const j={embedId:"mock-embed-id",deploymentId:"mock-deployment-id",workerId:"mock-worker-id",flowId:"mock-flow-id",agentName:"AI Assistant",agentLogoUrl:void 0,primaryColor:"#1a1a2e",styling:{}},O=[{trigger:/hello|hi|hey/i,response:"Hello! I'm a demo AI assistant. How can I help you today?",delay:500},{trigger:/weather/i,response:"I'd check the weather for you, but I'm in mock mode! In production, I could use a weather API.",delay:800,toolCalls:[{name:"get_weather",arguments:{location:"San Francisco"},result:{temperature:72,condition:"sunny"}}]},{trigger:/help|support/i,response:"I'm here to help! You can ask me questions, and I'll do my best to assist you. In production, I'd be connected to your agent with full capabilities.",delay:600},{trigger:/pricing|cost|price/i,response:"For pricing information, I'd typically check our database or connect you with the sales team. This is a mock response demonstrating how I'd handle pricing questions.",delay:700,toolCalls:[{name:"lookup_pricing",arguments:{plan:"all"},result:{plans:[{name:"Starter",price:"$29/mo"},{name:"Pro",price:"$99/mo"}]}}]},{trigger:/.*/,response:"I'm running in mock mode. This is a simulated response to demonstrate the chat UI. In production, I'd be connected to your agent!",delay:1e3}];function F(e){return new Promise(t=>setTimeout(t,e))}const R=({className:e,color:t="currentColor",cutoutColor:n="var(--bb-primary-color)"})=>I.jsxs("svg",{className:e,viewBox:"0 0 800 800",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I.jsx("path",{d:"M400 412C400 405.373 405.373 400 412 400H788C794.627 400 800 405.373 800 412V740C800 773.137 773.137 800 740 800H412C405.373 800 400 794.627 400 788V412Z",fill:t}),I.jsx("circle",{cx:"400",cy:"400",r:"400",fill:t}),I.jsx("path",{d:"M0 60C0 26.8629 26.8629 0 60 0H397.614C398.932 0 400 1.06811 400 2.38569V2.38569C400 221.982 221.982 400 2.38569 400V400C1.06811 400 0 398.932 0 397.614V60Z",fill:t}),I.jsx("path",{d:"M400 412C400 405.373 405.373 400 412 400H738C744.627 400 750 405.373 750 412V725C750 738.807 738.807 750 725 750H412C405.373 750 400 744.627 400 738V412Z",fill:t}),I.jsx("circle",{cx:"400",cy:"400",r:"350",fill:t}),I.jsx("path",{d:"M50 75C50 61.1929 61.1929 50 75 50H388C394.627 50 400 55.3726 400 62V388C400 394.627 394.627 400 388 400H62C55.3726 400 50 394.627 50 388V75Z",fill:t}),I.jsx("rect",{x:"399.919",y:"209",width:"270",height:"270",rx:"12",transform:"rotate(45 399.919 209)",fill:n})]}),A="_header_1p6z5_1",B="_compact_1p6z5_9",U="_headerBackground_1p6z5_20",H="_headerContent_1p6z5_59",V="_topRow_1p6z5_64",$="_agentInfo_1p6z5_79",W="_agentLogo_1p6z5_85",q="_agentLogoPlaceholder_1p6z5_102",Q="_brainbaseLogo_1p6z5_123",K="_agentName_1p6z5_137",Y="_actions_1p6z5_144",X="_actionButton_1p6z5_149",Z="_welcomeText_1p6z5_183",J="_title_1p6z5_202",G="_subtitle_1p6z5_210",ee=({agentName:e="AI Assistant",agentLogoUrl:t,welcomeTitle:n,welcomeSubtitle:r,onClose:l,onNewChatRequest:o,showNewChatButton:a=!1,compact:i=!1})=>{const u=n||"Hello there.",s=void 0!==r?r:n?void 0:"How can we help?";return I.jsxs("div",{className:`${A} ${i?B:""}`,children:[I.jsx("div",{className:U}),I.jsxs("div",{className:H,children:[I.jsxs("div",{className:V,children:[I.jsxs("div",{className:$,children:[t?I.jsx("img",{src:t,alt:e,className:W}):I.jsx("div",{className:q,children:I.jsx(R,{className:Q,color:"white",cutoutColor:"var(--bb-primary-color)"})}),I.jsx("span",{className:K,children:e})]}),I.jsxs("div",{className:Y,children:[a&&o&&I.jsx("button",{className:X,onClick:o,"aria-label":"Start new chat",type:"button",children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),l&&I.jsx("button",{className:X,onClick:l,"aria-label":"Close chat",type:"button",children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),!i&&I.jsxs("div",{className:Z,children:[I.jsx("h1",{className:J,children:u}),s&&I.jsx("p",{className:G,children:s})]})]})]})};function te(){}function ne(){}const re=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,le=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oe={};function ae(e,t){return(oe.jsx?le:re).test(e)}const ie=/[ \t\n\f\r]/g;function ue(e){return""===e.replace(ie,"")}class se{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function ce(e,t){const n={},r={};for(const l of e)Object.assign(n,l.property),Object.assign(r,l.normal);return new se(n,r,t)}function fe(e){return e.toLowerCase()}se.prototype.normal={},se.prototype.property={},se.prototype.space=void 0;class de{constructor(e,t){this.attribute=t,this.property=e}}de.prototype.attribute="",de.prototype.booleanish=!1,de.prototype.boolean=!1,de.prototype.commaOrSpaceSeparated=!1,de.prototype.commaSeparated=!1,de.prototype.defined=!1,de.prototype.mustUseProperty=!1,de.prototype.number=!1,de.prototype.overloadedBoolean=!1,de.prototype.property="",de.prototype.spaceSeparated=!1,de.prototype.space=void 0;let pe=0;const he=xe(),me=xe(),ge=xe(),ye=xe(),ve=xe(),be=xe(),ke=xe();function xe(){return 2**++pe}const we=Object.freeze(Object.defineProperty({__proto__:null,boolean:he,booleanish:me,commaOrSpaceSeparated:ke,commaSeparated:be,number:ye,overloadedBoolean:ge,spaceSeparated:ve},Symbol.toStringTag,{value:"Module"})),Se=Object.keys(we);class _e extends de{constructor(e,t,n,r){let l=-1;if(super(e,t),Ce(this,"space",r),"number"==typeof n)for(;++l<Se.length;){const e=Se[l];Ce(this,Se[l],(n&we[e])===we[e])}}}function Ce(e,t,n){n&&(e[t]=n)}function Ee(e){const t={},n={};for(const[r,l]of Object.entries(e.properties)){const o=new _e(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[fe(r)]=r,n[fe(o.attribute)]=r}return new se(t,n,e.space)}_e.prototype.defined=!0;const Ne=Ee({properties:{ariaActiveDescendant:null,ariaAtomic:me,ariaAutoComplete:null,ariaBusy:me,ariaChecked:me,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:ve,ariaCurrent:null,ariaDescribedBy:ve,ariaDetails:null,ariaDisabled:me,ariaDropEffect:ve,ariaErrorMessage:null,ariaExpanded:me,ariaFlowTo:ve,ariaGrabbed:me,ariaHasPopup:null,ariaHidden:me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ve,ariaLevel:ye,ariaLive:null,ariaModal:me,ariaMultiLine:me,ariaMultiSelectable:me,ariaOrientation:null,ariaOwns:ve,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:me,ariaReadOnly:me,ariaRelevant:null,ariaRequired:me,ariaRoleDescription:ve,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:me,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Pe(e,t){return t in e?e[t]:t}function Ie(e,t){return Pe(e,t.toLowerCase())}const Te=Ee({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:be,acceptCharset:ve,accessKey:ve,action:null,allow:null,allowFullScreen:he,allowPaymentRequest:he,allowUserMedia:he,alt:null,as:null,async:he,autoCapitalize:null,autoComplete:ve,autoFocus:he,autoPlay:he,blocking:ve,capture:null,charSet:null,checked:he,cite:null,className:ve,cols:ye,colSpan:null,content:null,contentEditable:me,controls:he,controlsList:ve,coords:ye|be,crossOrigin:null,data:null,dateTime:null,decoding:null,default:he,defer:he,dir:null,dirName:null,disabled:he,download:ge,draggable:me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:he,formTarget:null,headers:ve,height:ye,hidden:ge,high:ye,href:null,hrefLang:null,htmlFor:ve,httpEquiv:ve,id:null,imageSizes:null,imageSrcSet:null,inert:he,inputMode:null,integrity:null,is:null,isMap:he,itemId:null,itemProp:ve,itemRef:ve,itemScope:he,itemType:ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:he,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:he,muted:he,name:null,nonce:null,noModule:he,noValidate:he,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:he,optimum:ye,pattern:null,ping:ve,placeholder:null,playsInline:he,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:he,referrerPolicy:null,rel:ve,required:he,reversed:he,rows:ye,rowSpan:ye,sandbox:ve,scope:null,scoped:he,seamless:he,selected:he,shadowRootClonable:he,shadowRootDelegatesFocus:he,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:he,useMap:null,value:me,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ve,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:he,declare:he,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:he,noHref:he,noShade:he,noWrap:he,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:me,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:he,disableRemotePlayback:he,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:Ie}),Le=Ee({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"},properties:{about:ke,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:ve,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:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:he,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:be,g2:be,glyphName:be,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:ke,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,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:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ke,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ke,rev:ke,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ke,requiredFeatures:ke,requiredFonts:ke,requiredFormats:ke,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:ke,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ke,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ke,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pe}),ze=Ee({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Me=Ee({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ie}),De=Ee({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),je={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"},Oe=/[A-Z]/g,Fe=/-[a-z]/g,Re=/^data[-\w.:]+$/i;function Ae(e){return"-"+e.toLowerCase()}function Be(e){return e.charAt(1).toUpperCase()}const Ue=ce([Ne,Te,ze,Me,De],"html"),He=ce([Ne,Le,ze,Me,De],"svg");var Ve,$e,We,qe={};function Qe(){if(We)return qe;We=1;var e=qe&&qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qe,"__esModule",{value:!0}),qe.default=function(e,n){let r=null;if(!e||"string"!=typeof e)return r;const l=(0,t.default)(e),o="function"==typeof n;return l.forEach(e=>{if("declaration"!==e.type)return;const{property:t,value:l}=e;o?n(t,l,e):l&&(r=r||{},r[t]=l)}),r};const t=e(function(){if($e)return Ve;$e=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,u="";function s(e){return e?e.replace(i,u):u}return Ve=function(i,c){if("string"!=typeof i)throw new TypeError("First argument must be a string");if(!i)return[];c=c||{};var f=1,d=1;function p(e){var n=e.match(t);n&&(f+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function h(){var e={line:f,column:d};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:f,column:d},this.source=c.source}function g(e){var t=new Error(c.source+":"+f+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=f,t.column=d,t.source=i,!c.silent)throw t}function y(e){var t=e.exec(i);if(t){var n=t[0];return p(n),i=i.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=k();)!1!==t&&e.push(t);return e}function k(){var e=h();if("/"==i.charAt(0)&&"*"==i.charAt(1)){for(var t=2;u!=i.charAt(t)&&("*"!=i.charAt(t)||"/"!=i.charAt(t+1));)++t;if(t+=2,u===i.charAt(t-1))return g("End of comment missing");var n=i.slice(2,t-2);return d+=2,p(n),i=i.slice(t),d+=2,e({type:"comment",comment:n})}}function x(){var t=h(),n=y(r);if(n){if(k(),!y(l))return g("property missing ':'");var i=y(o),c=t({type:"declaration",property:s(n[0].replace(e,u)),value:i?s(i[0].replace(e,u)):u});return y(a),c}}return m.prototype.content=i,v(),function(){var e,t=[];for(b(t);e=x();)!1!==e&&(t.push(e),b(t));return t}()}}());return qe}var Ke,Ye,Xe,Ze={};function Je(){if(Ke)return Ze;Ke=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};return Ze.camelCase=function(i,u){return void 0===u&&(u={}),function(t){return!t||n.test(t)||e.test(t)}(i)?i:(i=i.toLowerCase(),(i=u.reactCompat?i.replace(l,a):i.replace(r,a)).replace(t,o))},Ze}const Ge=r(function(){if(Xe)return Ye;Xe=1;var e=(Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Qe()),t=Je();function n(n,r){var l={};return n&&"string"==typeof n?((0,e.default)(n,function(e,n){e&&n&&(l[(0,t.camelCase)(e,r)]=n)}),l):l}return n.default=n,Ye=n}()),et=nt("end"),tt=nt("start");function nt(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function rt(e){return e&&"object"==typeof e?"position"in e||"type"in e?ot(e.position):"start"in e||"end"in e?ot(e):"line"in e||"column"in e?lt(e):"":""}function lt(e){return at(e&&e.line)+":"+at(e&&e.column)}function ot(e){return lt(e&&e.start)+"-"+lt(e&&e.end)}function at(e){return e&&"number"==typeof e?e:1}class it extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",l={},o=!1;if(t&&(l="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!l.cause&&e&&(o=!0,r=e.message,l.cause=e),!l.ruleId&&!l.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?l.ruleId=n:(l.source=n.slice(0,e),l.ruleId=n.slice(e+1))}if(!l.place&&l.ancestors&&l.ancestors){const e=l.ancestors[l.ancestors.length-1];e&&(l.place=e.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=rt(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&"string"==typeof l.cause.stack?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}it.prototype.file="",it.prototype.name="",it.prototype.reason="",it.prototype.message="",it.prototype.stack="",it.prototype.column=void 0,it.prototype.line=void 0,it.prototype.ancestors=void 0,it.prototype.cause=void 0,it.prototype.fatal=void 0,it.prototype.place=void 0,it.prototype.ruleId=void 0,it.prototype.source=void 0;const ut={}.hasOwnProperty,st=new Map,ct=/[A-Z]/g,ft=new Set(["table","tbody","thead","tfoot","tr"]),dt=new Set(["td","th"]),pt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ht(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,l,o){const a=Array.isArray(l.children),i=tt(n);return t(r,l,o,a,{columnNumber:i?i.column-1:void 0,fileName:e,lineNumber:i?i.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,l,o){const a=Array.isArray(l.children)?n:t;return o?a(r,l,o):a(r,l)}}(0,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?He:Ue,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=mt(l,e,void 0);return o&&"string"!=typeof o?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function mt(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let l=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(l=He,e.schema=l);e.ancestors.push(t);const o=kt(e,t.tagName,!1),a=function(e,t){const n={};let r,l;for(l in t.properties)if("children"!==l&&ut.call(t.properties,l)){const o=bt(e,l,t.properties[l]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&"align"===l&&"string"==typeof a&&dt.has(t.tagName)?r=a:n[l]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let i=vt(e,t);ft.has(t.tagName)&&(i=i.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&ue(t.value):ue(t));var t}));return gt(e,a,o,t),yt(a,i),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}xt(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let l=r;"svg"===t.name&&"html"===r.space&&(l=He,e.schema=l);e.ancestors.push(t);const o=null===t.name?e.Fragment:kt(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];te(t.type);const l=t.expression;te(l.type);const o=l.properties[0];te(o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else xt(e,t.position);else{const l=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];te(t.type),o=e.evaluater.evaluateExpression(t.expression)}else xt(e,t.position);else o=null===r.value||r.value;n[l]=o}return n}(e,t),i=vt(e,t);return gt(e,a,o,t),yt(a,i),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xt(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return yt(r,vt(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function gt(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function yt(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vt(e,t){const n=[];let r=-1;const l=e.passKeys?new Map:st;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=l.get(e)||0;a=e+"-"+t,l.set(e,t+1)}}const i=mt(e,o,a);void 0!==i&&n.push(i)}return n}function bt(e,t,n){const r=function(e,t){const n=fe(t);let r=t,l=de;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Re.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Fe,Be);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Fe.test(e)){let n=e.replace(Oe,Ae);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}l=_e}return new l(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Ge(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new it("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=pt+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)ut.call(e,n)&&(t[wt(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?je[r.property]||r.property:r.attribute,n]}}function kt(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,l=-1;for(;++l<e.length;){const t=ae(e[l])?{type:"Identifier",name:e[l]}:{type:"Literal",value:e[l]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(l&&"Literal"===t.type),optional:!1}:t}r=n}else r=ae(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return ut.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);xt(e)}function xt(e,t){const n=new it("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=pt+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wt(e){let t=e.replace(ct,St);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function St(e){return"-"+e.toLowerCase()}const _t={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ct={};function Et(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nt(e.children,t,n)}return Array.isArray(e)?Nt(e,t,n):""}function Nt(e,t,n){const r=[];let l=-1;for(;++l<e.length;)r[l]=Et(e[l],t,n);return r.join("")}const Pt=document.createElement("i");function It(e){const t="&"+e+";";Pt.innerHTML=t;const n=Pt.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Tt(e,t,n,r){const l=e.length;let o,a=0;if(t=t<0?-t>l?0:l+t:t>l?l:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Lt(e,t){return e.length>0?(Tt(e,e.length,0,t),e):t}const zt={}.hasOwnProperty;function Mt(e,t){let n;for(n in t){const r=(zt.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){zt.call(r,o)||(r[o]=[]);const e=l[o];Dt(r[o],Array.isArray(e)?e:e?[e]:[])}}}function Dt(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Tt(e,0,0,r)}function jt(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function Ot(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ft=Yt(/[A-Za-z]/),Rt=Yt(/[\dA-Za-z]/),At=Yt(/[#-'*+\--9=?A-Z^-~]/);function Bt(e){return null!==e&&(e<32||127===e)}const Ut=Yt(/\d/),Ht=Yt(/[\dA-Fa-f]/),Vt=Yt(/[!-/:-@[-`{-~]/);function $t(e){return null!==e&&e<-2}function Wt(e){return null!==e&&(e<0||32===e)}function qt(e){return-2===e||-1===e||32===e}const Qt=Yt(new RegExp("\\p{P}|\\p{S}","u")),Kt=Yt(/\s/);function Yt(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Xt(e){const t=[];let n=-1,r=0,l=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(37===o&&Rt(e.charCodeAt(n+1))&&Rt(e.charCodeAt(n+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),l=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+l+1,a=""),l&&(n+=l,l=0)}return t.join("")+e.slice(r)}function Zt(e,t,n,r){const l=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(qt(r))return e.enter(n),a(r);return t(r)};function a(r){return qt(r)&&o++<l?(e.consume(r),a):(e.exit(n),t(r))}}const Jt={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Zt(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,l(t)}function l(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):$t(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),l)}}};const Gt={tokenize:function(e){const t=this,n=[];let r,l,o,a=0;return i;function i(r){if(a<n.length){const l=n[a];return t.containerState=l[1],e.attempt(l[0].continuation,u,s)(r)}return s(r)}function u(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let l,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){l=t.events[o][1].end;break}y(a);let i=n;for(;i<t.events.length;)t.events[i][1].end={...l},i++;return Tt(t.events,o+1,0,t.events.slice(n)),t.events.length=i,s(e)}return i(e)}function s(l){if(a===n.length){if(!r)return d(l);if(r.currentConstruct&&r.currentConstruct.concrete)return h(l);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(en,c,f)(l)}function c(e){return r&&v(),y(a),d(e)}function f(e){return t.parser.lazy[t.now().line]=a!==n.length,o=t.now().offset,h(e)}function d(n){return t.containerState={},e.attempt(en,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),d(e)}function h(n){return null===n?(r&&v(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:l}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):$t(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,i):(e.consume(n),m)}function g(e,n){const i=t.sliceStream(e);if(n&&i.push(null),e.previous=l,l&&(l.next=e),l=e,r.defineSkip(e.start),r.write(i),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let l,i,u=n;for(;u--;)if("exit"===t.events[u][0]&&"chunkFlow"===t.events[u][1].type){if(l){i=t.events[u][1].end;break}l=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...i},e++;Tt(t.events,u+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let l=n.length;for(;l-- >r;){const r=n[l];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),l=void 0,r=void 0,t.containerState._closeFlow=void 0}}},en={tokenize:function(e,t,n){return Zt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function tn(e){return null===e||Wt(e)||Kt(e)?1:Qt(e)?2:void 0}function nn(e,t,n){const r=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const rn={name:"attention",resolveAll:function(e,t){let n,r,l,o,a,i,u,s,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;i=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const f={...e[n][1].end},d={...e[c][1].start};ln(f,-i),ln(d,i),o={type:i>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},a={type:i>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},l={type:i>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:i>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[n][1].end={...o.start},e[c][1].start={...a.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=Lt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=Lt(u,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",l,t]]),u=Lt(u,nn(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),u=Lt(u,[["exit",l,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(s=2,u=Lt(u,[["enter",e[c][1],t],["exit",e[c][1],t]])):s=0,Tt(e,n-1,c-n+3,u),c=n+u.length-s-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,l=tn(r);let o;return function(t){return o=t,e.enter("attentionSequence"),a(t)};function a(i){if(i===o)return e.consume(i),a;const u=e.exit("attentionSequence"),s=tn(i),c=!s||2===s&&l||n.includes(i),f=!l||2===l&&s||n.includes(r);return u._open=Boolean(42===o?c:c&&(l||!f)),u._close=Boolean(42===o?f:f&&(s||!c)),t(i)}}};function ln(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const on={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return Ft(t)?(e.consume(t),o):64===t?n(t):u(t)}function o(e){return 43===e||45===e||46===e||Rt(e)?(r=1,a(e)):u(e)}function a(t){return 58===t?(e.consume(t),r=0,i):(43===t||45===t||46===t||Rt(t))&&r++<32?(e.consume(t),a):(r=0,u(t))}function i(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Bt(r)?n(r):(e.consume(r),i)}function u(t){return 64===t?(e.consume(t),s):At(t)?(e.consume(t),u):n(t)}function s(e){return Rt(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,s):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):f(n)}function f(t){if((45===t||Rt(t))&&r++<63){const n=45===t?f:c;return e.consume(t),n}return n(t)}}};const an={partial:!0,tokenize:function(e,t,n){return function(t){return qt(t)?Zt(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||$t(e)?t(e):n(e)}}};const un={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(qt(t))return Zt(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return l(t)};function l(r){return e.attempt(un,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),l}return n(t)};function l(n){return qt(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const sn={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Vt(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const cn={name:"characterReference",tokenize:function(e,t,n){const r=this;let l,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),i};function i(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=Rt,s(t))}function u(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Ht,s):(e.enter("characterReferenceValue"),l=7,o=Ut,s(t))}function s(i){if(59===i&&a){const l=e.exit("characterReferenceValue");return o!==Rt||It(r.sliceSerialize(l))?(e.enter("characterReferenceMarker"),e.consume(i),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(i)}return o(i)&&a++<l?(e.consume(i),s):n(i)}}};const fn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l};function l(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},dn={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,l={partial:!0,tokenize:function(e,t,n){let l=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u}function u(t){return e.enter("codeFencedFence"),qt(t)?Zt(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(l++,e.consume(t),c):l>=i?(e.exit("codeFencedFenceSequence"),qt(t)?Zt(e,f,"whitespace")(t):f(t)):n(t)}function f(r){return null===r||$t(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,a=0,i=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(t)}(t)};function u(t){return t===o?(i++,e.consume(t),u):i<3?n(t):(e.exit("codeFencedFenceSequence"),qt(t)?Zt(e,s,"whitespace")(t):s(t))}function s(n){return null===n||$t(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(fn,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||$t(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(t)):qt(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Zt(e,f,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),c)}function f(t){return null===t||$t(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||$t(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(t)):96===t&&t===o?n(t):(e.consume(t),d)}function p(t){return e.attempt(l,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&qt(t)?Zt(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||$t(t)?e.check(fn,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||$t(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const pn={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Zt(e,l,"linePrefix",5)(t)};function l(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?i(t):$t(t)?e.attempt(hn,o,i)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||$t(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function i(n){return e.exit("codeIndented"),t(n)}}},hn={partial:!0,tokenize:function(e,t,n){const r=this;return l;function l(t){return r.parser.lazy[r.now().line]?n(t):$t(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):Zt(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):$t(e)?l(e):n(e)}}};const mn={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,l=3;if(!("lineEnding"!==e[l][1].type&&"space"!==e[l][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=l;++t<r;)if("codeTextData"===e[t][1].type){e[l][1].type="codeTextPadding",e[r][1].type="codeTextPadding",l+=2,r-=2;break}t=l-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,l,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),i(t))}function i(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),i):96===t?(l=e.enter("codeTextSequence"),r=0,s(t)):$t(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):(e.enter("codeTextData"),u(t))}function u(t){return null===t||32===t||96===t||$t(t)?(e.exit("codeTextData"),i(t)):(e.consume(t),u)}function s(n){return 96===n?(e.consume(n),r++,s):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(l.type="codeTextData",u(n))}}};class gn{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const l=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&yn(this.left,n),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),yn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),yn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);yn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);yn(this.left,t.reverse())}}}function yn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function vn(e){const t={};let n,r,l,o,a,i,u,s=-1;const c=new gn(e);for(;++s<c.length;){for(;s in t;)s=t[s];if(n=c.get(s),s&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(s-1)[1].type&&(i=n[1]._tokenizer.events,l=0,l<i.length&&"lineEndingBlank"===i[l][1].type&&(l+=2),l<i.length&&"content"===i[l][1].type))for(;++l<i.length&&"content"!==i[l][1].type;)"chunkText"===i[l][1].type&&(i[l][1]._isInFirstContentOfListItem=!0,l++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,bn(c,s)),s=t[s],u=!0);else if(n[1]._container){for(l=s,r=void 0;l--;)if(o=c.get(l),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=l);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...c.get(r)[1].start},a=c.slice(r,s),a.unshift(n),c.splice(r,s-r+1,a))}}return Tt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function bn(e,t){const n=e.get(t)[1],r=e.get(t)[2];let l=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const i=a.events,u=[],s={};let c,f,d=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++l)[1]!==p;);o.push(l),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<i.length;)"exit"===i[d][0]&&"enter"===i[d-1][0]&&i[d][1].type===i[d-1][1].type&&i[d][1].start.line!==i[d][1].end.line&&(m=d+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){const t=i.slice(g[d],g[d+1]),n=o.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),d=-1;++d<u.length;)s[h+u[d][0]]=h+u[d][1],h+=u[d][1]-u[d][0]-1;return s}const kn={resolve:function(e){return vn(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?l(t):$t(t)?e.check(xn,o,l)(t):(e.consume(t),r)}function l(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},xn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Zt(e,l,"linePrefix")};function l(l){if(null===l||$t(l))return n(l);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}};function wn(e,t,n,r,l,o,a,i,u){const s=u||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(l),e.enter(o),e.consume(t),e.exit(o),f;if(null===t||32===t||41===t||Bt(t))return n(t);return e.enter(r),e.enter(a),e.enter(i),e.enter("chunkString",{contentType:"string"}),h(t)};function f(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(l),e.exit(r),t):(e.enter(i),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(i),f(t)):null===t||60===t||$t(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function h(l){return c||null!==l&&41!==l&&!Wt(l)?c<s&&40===l?(e.consume(l),c++,h):41===l?(e.consume(l),c--,h):null===l||32===l||40===l||Bt(l)?n(l):(e.consume(l),92===l?m:h):(e.exit("chunkString"),e.exit(i),e.exit(a),e.exit(r),t(l))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Sn(e,t,n,r,l,o){const a=this;let i,u=0;return function(t){return e.enter(r),e.enter(l),e.consume(t),e.exit(l),e.enter(o),s};function s(f){return u>999||null===f||91===f||93===f&&!i||94===f&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):93===f?(e.exit(o),e.enter(l),e.consume(f),e.exit(l),e.exit(r),t):$t(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(t){return null===t||91===t||93===t||$t(t)||u++>999?(e.exit("chunkString"),s(t)):(e.consume(t),i||(i=!qt(t)),92===t?f:c)}function f(t){return 91===t||92===t||93===t?(e.consume(t),u++,c):c(t)}}function _n(e,t,n,r,l,o){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(l),e.consume(t),e.exit(l),a=40===t?41:t,i;return n(t)};function i(n){return n===a?(e.enter(l),e.consume(n),e.exit(l),e.exit(r),t):(e.enter(o),u(n))}function u(t){return t===a?(e.exit(o),i(a)):null===t?n(t):$t(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Zt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(t))}function s(t){return t===a||null===t||$t(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?c:s)}function c(t){return t===a||92===t?(e.consume(t),s):s(t)}}function Cn(e,t){let n;return function r(l){if($t(l))return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,r;if(qt(l))return Zt(e,r,n?"linePrefix":"lineSuffix")(l);return t(l)}}const En={name:"definition",tokenize:function(e,t,n){const r=this;let l;return function(t){return e.enter("definition"),function(t){return Sn.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return l=Ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return Wt(t)?Cn(e,i)(t):i(t)}function i(t){return wn(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function u(t){return e.attempt(Nn,s,s)(t)}function s(t){return qt(t)?Zt(e,c,"whitespace")(t):c(t)}function c(o){return null===o||$t(o)?(e.exit("definition"),r.parser.defined.push(l),t(o)):n(o)}}},Nn={partial:!0,tokenize:function(e,t,n){return function(t){return Wt(t)?Cn(e,r)(t):n(t)};function r(t){return _n(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function l(t){return qt(t)?Zt(e,o,"whitespace")(t):o(t)}function o(e){return null===e||$t(e)?t(e):n(e)}}};const Pn={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return $t(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const In={name:"headingAtx",resolve:function(e,t){let n,r,l=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);l-2>o&&"whitespace"===e[l][1].type&&(l-=2);"atxHeadingSequence"===e[l][1].type&&(o===l-1||l-4>o&&"whitespace"===e[l-2][1].type)&&(l-=o+1===l?2:4);l>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[l][1].end},r={type:"chunkText",start:e[o][1].start,end:e[l][1].end,contentType:"text"},Tt(e,o,l-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),l(t)}(t)};function l(t){return 35===t&&r++<6?(e.consume(t),l):null===t||Wt(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||$t(n)?(e.exit("atxHeading"),t(n)):qt(n)?Zt(e,o,"whitespace")(n):(e.enter("atxHeadingText"),i(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function i(t){return null===t||35===t||Wt(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),i)}}};const Tn=["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"],Ln=["pre","script","style","textarea"],zn={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let l,o,a,i,u;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),s}(t)};function s(i){return 33===i?(e.consume(i),c):47===i?(e.consume(i),o=!0,p):63===i?(e.consume(i),l=3,r.interrupt?t:D):Ft(i)?(e.consume(i),a=String.fromCharCode(i),h):n(i)}function c(o){return 45===o?(e.consume(o),l=2,f):91===o?(e.consume(o),l=5,i=0,d):Ft(o)?(e.consume(o),l=4,r.interrupt?t:D):n(o)}function f(l){return 45===l?(e.consume(l),r.interrupt?t:D):n(l)}function d(l){const o="CDATA[";return l===o.charCodeAt(i++)?(e.consume(l),6===i?r.interrupt?t:E:d):n(l)}function p(t){return Ft(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(i){if(null===i||47===i||62===i||Wt(i)){const u=47===i,s=a.toLowerCase();return u||o||!Ln.includes(s)?Tn.includes(a.toLowerCase())?(l=6,u?(e.consume(i),m):r.interrupt?t(i):E(i)):(l=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(i):o?g(i):y(i)):(l=1,r.interrupt?t(i):E(i))}return 45===i||Rt(i)?(e.consume(i),a+=String.fromCharCode(i),h):n(i)}function m(l){return 62===l?(e.consume(l),r.interrupt?t:E):n(l)}function g(t){return qt(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||Ft(t)?(e.consume(t),v):qt(t)?(e.consume(t),y):_(t)}function v(t){return 45===t||46===t||58===t||95===t||Rt(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),k):qt(t)?(e.consume(t),b):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),u=t,x):qt(t)?(e.consume(t),k):w(t)}function x(t){return t===u?(e.consume(t),u=null,S):null===t||$t(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Wt(t)?b(t):(e.consume(t),w)}function S(e){return 47===e||62===e||qt(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||$t(t)?E(t):qt(t)?(e.consume(t),C):n(t)}function E(t){return 45===t&&2===l?(e.consume(t),T):60===t&&1===l?(e.consume(t),L):62===t&&4===l?(e.consume(t),j):63===t&&3===l?(e.consume(t),D):93===t&&5===l?(e.consume(t),M):!$t(t)||6!==l&&7!==l?null===t||$t(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),E):(e.exit("htmlFlowData"),e.check(Mn,O,N)(t))}function N(t){return e.check(Dn,P,O)(t)}function P(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||$t(t)?N(t):(e.enter("htmlFlowData"),E(t))}function T(t){return 45===t?(e.consume(t),D):E(t)}function L(t){return 47===t?(e.consume(t),a="",z):E(t)}function z(t){if(62===t){const n=a.toLowerCase();return Ln.includes(n)?(e.consume(t),j):E(t)}return Ft(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),z):E(t)}function M(t){return 93===t?(e.consume(t),D):E(t)}function D(t){return 62===t?(e.consume(t),j):45===t&&2===l?(e.consume(t),D):E(t)}function j(t){return null===t||$t(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),j)}function O(n){return e.exit("htmlFlow"),t(n)}}},Mn={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(an,t,n)}}},Dn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if($t(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l;return n(t)};function l(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const jn={name:"htmlText",tokenize:function(e,t,n){const r=this;let l,o,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),i};function i(t){return 33===t?(e.consume(t),u):47===t?(e.consume(t),k):63===t?(e.consume(t),v):Ft(t)?(e.consume(t),S):n(t)}function u(t){return 45===t?(e.consume(t),s):91===t?(e.consume(t),o=0,p):Ft(t)?(e.consume(t),y):n(t)}function s(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),f):$t(t)?(a=c,z(t)):(e.consume(t),c)}function f(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?L(e):45===e?f(e):c(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):$t(t)?(a=h,z(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?L(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?L(t):$t(t)?(a=y,z(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):$t(t)?(a=v,z(t)):(e.consume(t),v)}function b(e){return 62===e?L(e):v(e)}function k(t){return Ft(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||Rt(t)?(e.consume(t),x):w(t)}function w(t){return $t(t)?(a=w,z(t)):qt(t)?(e.consume(t),w):L(t)}function S(t){return 45===t||Rt(t)?(e.consume(t),S):47===t||62===t||Wt(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),L):58===t||95===t||Ft(t)?(e.consume(t),C):$t(t)?(a=_,z(t)):qt(t)?(e.consume(t),_):L(t)}function C(t){return 45===t||46===t||58===t||95===t||Rt(t)?(e.consume(t),C):E(t)}function E(t){return 61===t?(e.consume(t),N):$t(t)?(a=E,z(t)):qt(t)?(e.consume(t),E):_(t)}function N(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,P):$t(t)?(a=N,z(t)):qt(t)?(e.consume(t),N):(e.consume(t),I)}function P(t){return t===l?(e.consume(t),l=void 0,T):null===t?n(t):$t(t)?(a=P,z(t)):(e.consume(t),P)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Wt(t)?_(t):(e.consume(t),I)}function T(e){return 47===e||62===e||Wt(e)?_(e):n(e)}function L(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function z(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return qt(t)?Zt(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),a(t)}}};const On={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Tt(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,l,o,a=e.length,i=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(l){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){i=2;break}}else"labelEnd"===n.type&&(l=a);const u={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[r][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[r+i+2][1].end},end:{...e[l-2][1].start}};return o=[["enter",u,t],["enter",s,t]],o=Lt(o,e.slice(r+1,r+i+3)),o=Lt(o,[["enter",c,t]]),o=Lt(o,nn(t.parser.constructs.insideSpan.null,e.slice(r+i+4,l-3),t)),o=Lt(o,[["exit",c,t],e[l-2],e[l-1],["exit",s,t]]),o=Lt(o,e.slice(l+1)),o=Lt(o,[["exit",u,t]]),Tt(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let l,o,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){l=r.events[a][1];break}return function(t){if(!l)return n(t);if(l._inactive)return c(t);return o=r.parser.defined.includes(Ot(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),i};function i(t){return 40===t?e.attempt(Fn,s,o?s:c)(t):91===t?e.attempt(Rn,s,o?u:c)(t):o?s(t):c(t)}function u(t){return e.attempt(An,s,c)(t)}function s(e){return t(e)}function c(e){return l._balanced=!0,n(e)}}},Fn={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Wt(t)?Cn(e,l)(t):l(t)}function l(t){return 41===t?s(t):wn(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Wt(t)?Cn(e,i)(t):s(t)}function a(e){return n(e)}function i(t){return 34===t||39===t||40===t?_n(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function u(t){return Wt(t)?Cn(e,s)(t):s(t)}function s(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Rn={tokenize:function(e,t,n){const r=this;return function(t){return Sn.call(r,e,l,o,"reference","referenceMarker","referenceString")(t)};function l(e){return r.parser.defined.includes(Ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},An={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const Bn={name:"labelStartImage",resolveAll:On.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),l};function l(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Un={name:"labelStartLink",resolveAll:On.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),l};function l(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Hn={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Zt(e,t,"linePrefix")}}};const Vn={name:"thematicBreak",tokenize:function(e,t,n){let r,l=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),a(o)):l>=3&&(null===o||$t(o))?(e.exit("thematicBreak"),t(o)):n(o)}function a(t){return t===r?(e.consume(t),l++,a):(e.exit("thematicBreakSequence"),qt(t)?Zt(e,o,"whitespace")(t):o(t))}}};const $n={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(an,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Zt(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!qt(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(qn,t,l)(n)});function l(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Zt(e,e.attempt($n,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,l=r.events[r.events.length-1];let o=l&&"linePrefix"===l[1].type?l[2].sliceSerialize(l[1],!0).length:0,a=0;return function(t){const l=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===l?!r.containerState.marker||t===r.containerState.marker:Ut(t)){if(r.containerState.type||(r.containerState.type=l,e.enter(l,{_container:!0})),"listUnordered"===l)return e.enter("listItemPrefix"),42===t||45===t?e.check(Vn,n,u)(t):u(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),i(t)}return n(t)};function i(t){return Ut(t)&&++a<10?(e.consume(t),i):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),u(t)):n(t)}function u(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(an,r.interrupt?n:s,e.attempt(Wn,f,c))}function s(e){return r.containerState.initialBlankLine=!0,o++,f(e)}function c(t){return qt(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):n(t)}function f(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Wn={partial:!0,tokenize:function(e,t,n){const r=this;return Zt(e,function(e){const l=r.events[r.events.length-1];return!qt(e)&&l&&"listItemPrefixWhitespace"===l[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},qn={partial:!0,tokenize:function(e,t,n){const r=this;return Zt(e,function(e){const l=r.events[r.events.length-1];return l&&"listItemIndent"===l[1].type&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Qn={name:"setextUnderline",resolveTo:function(e,t){let n,r,l,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),l||"definition"!==e[o][1].type||(l=o);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",l?(e.splice(r,0,["enter",a,t]),e.splice(l+1,0,["exit",e[n][1],t]),e[n][1].end={...e[l][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let l;return function(t){let a,i=r.events.length;for(;i--;)if("lineEnding"!==r.events[i][1].type&&"linePrefix"!==r.events[i][1].type&&"content"!==r.events[i][1].type){a="paragraph"===r.events[i][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),l=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===l?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),qt(t)?Zt(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||$t(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Kn={tokenize:function(e){const t=this,n=e.attempt(an,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,Zt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(kn,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Yn={resolveAll:Gn()},Xn=Jn("string"),Zn=Jn("text");function Jn(e){return{resolveAll:Gn("text"===e?er:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],l=t.attempt(r,o,a);return o;function o(e){return u(e)?l(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),i;t.consume(e)}function i(e){return u(e)?(t.exit("data"),l(e)):(t.consume(e),i)}function u(e){if(null===e)return!0;const t=r[e];let l=-1;if(t)for(;++l<t.length;){const e=t[l];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Gn(e){return function(t,n){let r,l=-1;for(;++l<=t.length;)void 0===r?t[l]&&"data"===t[l][1].type&&(r=l,l++):t[l]&&"data"===t[l][1].type||(l!==r+2&&(t[r][1].end=t[l-1][1].end,t.splice(r+2,l-r-2),l=r+2),r=void 0);return e?e(t,n):t}}function er(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],l=t.sliceStream(r);let o,a=l.length,i=-1,u=0;for(;a--;){const e=l[a];if("string"==typeof e){for(i=e.length;32===e.charCodeAt(i-1);)u++,i--;if(i)break;i=-1}else if(-2===e)o=!0,u++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const l={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?i:r.start._bufferIndex+i,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const tr={42:$n,43:$n,45:$n,48:$n,49:$n,50:$n,51:$n,52:$n,53:$n,54:$n,55:$n,56:$n,57:$n,62:un},nr={91:En},rr={[-2]:pn,[-1]:pn,32:pn},lr={35:In,42:Vn,45:[Qn,Vn],60:zn,61:Qn,95:Vn,96:dn,126:dn},or={38:cn,92:sn},ar={[-5]:Hn,[-4]:Hn,[-3]:Hn,33:Bn,38:cn,42:rn,60:[on,jn],91:Un,92:[Pn,sn],93:On,95:rn,96:mn},ir={null:[rn,Yn]},ur=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:nr,disable:{null:[]},document:tr,flow:lr,flowInitial:rr,insideSpan:ir,string:or,text:ar},Symbol.toStringTag,{value:"Module"}));function sr(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const l={},o=[];let a=[],i=[];const u={attempt:g(function(e,t){y(e,t.from)}),check:g(m),consume:function(e){$t(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));s.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),s.events.push(["enter",n,s]),i.push(n),n},exit:function(e){const t=i.pop();return t.end=d(),s.events.push(["exit",t,s]),t},interrupt:g(m,{interrupt:!0})},s={code:null,containerState:{},defineSkip:function(e){l[e.line]=e.column,v()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let l;for(;++n<e.length;){const o=e[n];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&l)continue;a=" ";break;default:a=String.fromCharCode(o)}l=-2===o,r.push(a)}return r.join("")}(f(e),t)},sliceStream:f,write:function(e){if(a=Lt(a,e),p(),null!==a[a.length-1])return[];return y(t,0),s.events=nn(o,s.events,s),s.events}};let c=t.tokenize.call(s,u);return t.resolveAll&&o.push(t),s;function f(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let a;if(n===l)a=[e[n].slice(r,o)];else{if(a=e.slice(n,l),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}o>0&&a.push(e[l].slice(0,o))}return a}(a,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:l,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:l,offset:o}}function p(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){c=c(e)}function m(e,t){t.restore()}function g(e,t){return function(n,l,o){let a,c,f,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,c=0,0===e.length?o:m(e[c])}function m(e){return function(n){p=function(){const e=d(),t=s.previous,n=s.currentConstruct,l=s.events.length,o=Array.from(i);return{from:l,restore:a};function a(){r=e,s.previous=t,s.currentConstruct=n,s.events.length=l,i=o,v()}}(),f=e,e.partial||(s.currentConstruct=e);if(e.name&&s.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(s),t):s,u,g,y)(n)}}function g(t){return e(f,p),l}function y(e){return p.restore(),++c<a.length?m(a[c]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&Tt(s.events,t,s.events.length-t,e.resolve(s.events.slice(t),s)),e.resolveTo&&(s.events=e.resolveTo(s.events,s))}function v(){r.line in l&&r.column<2&&(r.column=l[r.line],r.offset+=l[r.line]-1)}}function cr(e){const t={constructs:function(e){const t={};let n=-1;for(;++n<e.length;)Mt(t,e[n]);return t}([ur,...(e||{}).extensions||[]]),content:n(Jt),defined:[],document:n(Gt),flow:n(Kn),lazy:{},string:n(Xn),text:n(Zn)};return t;function n(e){return function(n){return sr(t,e,n)}}}const fr=/[\0\t\n\r]/g;const dr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function pr(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return jt(n.slice(t?2:1),t?16:10)}return It(n)||e}const hr={}.hasOwnProperty;function mr(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:C,autolinkEmail:C,atxHeading:o(Z),blockQuote:o(q),characterEscape:C,characterReference:C,codeFenced:o(Q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Q,a),codeText:o(K,a),codeTextData:C,data:C,codeFlowValue:C,definition:o(Y),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(X),hardBreakEscape:o(J),hardBreakTrailing:o(J),htmlFlow:o(G,a),htmlFlowData:C,htmlText:o(G,a),htmlTextData:C,image:o(ee),label:a,link:o(te),listItem:o(re),listItemValue:d,listOrdered:o(ne,f),listUnordered:o(ne),paragraph:o(le),reference:A,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Z),strong:o(oe),thematicBreak:o(ie)},exit:{atxHeading:u(),atxHeadingSequence:x,autolink:u(),autolinkEmail:W,autolinkProtocol:$,blockQuote:u(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:H,characterReference:V,codeFenced:u(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:E,codeIndented:u(y),codeText:u(L),codeTextData:E,data:E,definition:u(),definitionDestinationString:k,definitionLabelString:v,definitionTitleString:b,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(I),htmlFlowData:E,htmlText:u(T),htmlTextData:E,image:u(M),label:j,labelText:D,lineEnding:N,link:u(z),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:B,resourceDestinationString:O,resourceTitleString:F,resource:R,setextHeading:u(_),setextHeadingLineSequence:S,setextHeadingText:w,strong:u(),thematicBreak:u()}};yr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:i,exit:s,buffer:a,resume:c,data:n},u=[];let f=-1;for(;++f<e.length;)if("listOrdered"===e[f][1].type||"listUnordered"===e[f][1].type)if("enter"===e[f][0])u.push(f);else{f=l(e,u.pop(),f)}for(f=-1;++f<e.length;){const n=t[e[f][0]];hr.call(n,e[f][1].type)&&n[e[f][1].type].call(Object.assign({sliceSerialize:e[f][2].sliceSerialize},o),e[f][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||br).call(o,void 0,e[0])}for(r.position={start:gr(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:gr(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},f=-1;++f<t.transforms.length;)r=t.transforms[f](r)||r;return r}function l(e,t,n){let r,l,o,a,i=t-1,u=-1,s=!1;for(;++i<=n;){const t=e[i];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?u++:u--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||u||o||(o=i),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!u&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===u&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=i;for(l=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;l&&(e[l][1].type="lineEndingBlank",s=!0),t[1].type="lineEnding",l=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!l||o<l)&&(r._spread=!0),r.end=Object.assign({},l?e[l][1].start:t[1].end),e.splice(l||i,0,["exit",r,t[2]]),i++,n++}if("listItemPrefix"===t[1].type){const l={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=l,e.splice(i,0,["enter",l,t[2]]),i++,n++,o=void 0,a=!0}}}return e[t][1]._spread=s,n}function o(e,t){return n;function n(n){i.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function i(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:gr(t.start),end:void 0}}function u(e){return t;function t(t){e&&e.call(this,t),s.call(this,t)}}function s(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+rt({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||br).call(this,e,r[0])}n.position.end=gr(e.end)}function c(){return function(e){return Et(e,"boolean"!=typeof Ct.includeImageAlt||Ct.includeImageAlt,"boolean"!=typeof Ct.includeHtml||Ct.includeHtml)}(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ot(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function C(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:gr(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=gr(e.end)}function N(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=gr(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(C.call(this,e),E.call(this,e))}function P(){this.data.atHardBreak=!0}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function z(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(dr,pr)}(t),n.identifier=Ot(t).toLowerCase()}function j(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function O(){const e=this.resume();this.stack[this.stack.length-1].url=e}function F(){const e=this.resume();this.stack[this.stack.length-1].title=e}function R(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ot(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function U(e){this.data.characterReferenceType=e.type}function H(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=jt(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=It(t)}this.stack[this.stack.length-1].value+=r}function V(e){this.stack.pop().position.end=gr(e.end)}function $(e){E.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){E.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function Z(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function G(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function le(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function ie(){return{type:"thematicBreak"}}}(n)(function(e){for(;!vn(e););return e}(cr(n).document().write(function(){let e,t=1,n="",r=!0;return function(l,o,a){const i=[];let u,s,c,f,d;for(l=n+("string"==typeof l?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,n="",r&&(65279===l.charCodeAt(0)&&c++,r=void 0);c<l.length;){if(fr.lastIndex=c,u=fr.exec(l),f=u&&void 0!==u.index?u.index:l.length,d=l.charCodeAt(f),!u){n=l.slice(c);break}if(10===d&&c===f&&e)i.push(-3),e=void 0;else switch(e&&(i.push(-5),e=void 0),c<f&&(i.push(l.slice(c,f)),t+=f-c),d){case 0:i.push(65533),t++;break;case 9:for(s=4*Math.ceil(t/4),i.push(-2);t++<s;)i.push(-1);break;case 10:i.push(-4),t=1;break;default:e=!0,t=1}c=f+1}return a&&(e&&i.push(-5),n&&i.push(n),i.push(null)),i}}()(e,t,!0))))}function gr(e){return{line:e.line,column:e.column,offset:e.offset}}function yr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?yr(e,r):vr(e,r)}}function vr(e,t){let n;for(n in t)if(hr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function br(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+rt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+rt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+rt({start:t.start,end:t.end})+") is still open")}function kr(e){const t=this;t.parser=function(n){return mr(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xr(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const l=e.all(t),o=l[0];o&&"text"===o.type?o.value="["+o.value:l.unshift({type:"text",value:"["});const a=l[l.length-1];return a&&"text"===a.type?a.value+=r:l.push({type:"text",value:r}),l}function wr(e){const t=e.spread;return null==t?e.children.length>1:t}function Sr(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),l=0;const o=[];for(;r;)o.push(_r(t.slice(l,r.index),l>0,!0),r[0]),l=r.index+r[0].length,r=n.exec(t);return o.push(_r(t.slice(l),l>0,!1)),o.join("")}function _r(e,t,n){let r=0,l=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(l-1);for(;9===t||32===t;)l--,t=e.codePointAt(l-1)}return l>r?e.slice(r,l):""}const Cr={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(r.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:r,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},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),l=Xt(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,i=e.footnoteCounts.get(r);void 0===i?(i=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,i+=1,e.footnoteCounts.set(r,i);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+l,id:n+"fnref-"+l+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,s),e.applyData(t,s)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xr(e,t);const l={src:Xt(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(l.title=r.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:Xt(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xr(e,t);const l={href:Xt(r.url||"")};null!==r.title&&void 0!==r.title&&(l.title=r.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:Xt(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),l=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=wr(n[r])}return t}(n):wr(t),o={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let i=-1;for(;++i<r.length;){const e=r[i];(l||0!==i||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||l?a.push(e):a.push(...e.children)}const u=r[r.length-1];u&&(l||"element"!==u.type||"p"!==u.tagName)&&a.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,s),e.applyData(t,s)},list:function(e,t){const n={},r=e.all(t);let l=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++l<r.length;){const e=r[l];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.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)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),l=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),l.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=tt(t.children[1]),a=et(t.children[t.children.length-1]);o&&a&&(r.position={start:o,end:a}),l.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,l=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length;let i=-1;const u=[];for(;++i<a;){const n=t.children[i],r={},a=o?o[i]:void 0;a&&(r.align=a);let s={type:"element",tagName:l,properties:r,children:[]};n&&(s.children=e.all(n),e.patch(n,s),s=e.applyData(n,s)),u.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,s),e.applyData(t,s)},text:function(e,t){const n={type:"text",value:Sr(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Er,yaml:Er,definition:Er,footnoteDefinition:Er};function Er(){}const Nr="object"==typeof self?self:globalThis,Pr=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=l=>{if(e.has(l))return e.get(l);const[o,a]=t[l];switch(o){case 0:case-1:return n(a,l);case 1:{const e=n([],l);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},l);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),l);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),l)}case 5:{const e=n(new Map,l);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,l);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new Nr[e](t),l)}case 8:return n(BigInt(a),l);case"BigInt":return n(Object(BigInt(a)),l);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new Nr[o](a),l)};return r})(new Map,e)(0),Ir="",{toString:Tr}={},{keys:Lr}=Object,zr=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Tr.call(e).slice(8,-1);switch(n){case"Array":return[1,Ir];case"Object":return[2,Ir];case"Date":return[3,Ir];case"RegExp":return[4,Ir];case"Map":return[5,Ir];case"Set":return[6,Ir];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Mr=([e,t])=>0===e&&("function"===t||"symbol"===t),Dr=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const l=(e,t)=>{const l=r.push(e)-1;return n.set(t,l),l},o=r=>{if(n.has(r))return n.get(r);let[a,i]=zr(r);switch(a){case 0:{let t=r;switch(i){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+i);t=null;break;case"undefined":return l([-1],r)}return l([a,t],r)}case 1:{if(i){let e=r;return"DataView"===i?e=new Uint8Array(r.buffer):"ArrayBuffer"===i&&(e=new Uint8Array(r)),l([i,[...e]],r)}const e=[],t=l([a,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(i)switch(i){case"BigInt":return l([i,r.toString()],r);case"Boolean":case"Number":case"String":return l([i,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],u=l([a,n],r);for(const t of Lr(r))!e&&Mr(zr(r[t]))||n.push([o(t),o(r[t])]);return u}case 3:return l([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return l([a,{source:e,flags:t}],r)}case 5:{const t=[],n=l([a,t],r);for(const[l,a]of r)(e||!Mr(zr(l))&&!Mr(zr(a)))&&t.push([o(l),o(a)]);return n}case 6:{const t=[],n=l([a,t],r);for(const l of r)!e&&Mr(zr(l))||t.push(o(l));return n}}const{message:u}=r;return l([a,{name:i,message:u}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},jr="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Pr(Dr(e,t)):structuredClone(e):(e,t)=>Pr(Dr(e,t));function Or(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Fr(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Rr=function(e){if(null==e)return Br;if("function"==typeof e)return Ar(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Rr(e[n]);return Ar(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return Ar(n);function n(n){const r=n;let l;for(l in e)if(r[l]!==t[l])return!1;return!0}}(e);if("string"==typeof e)return function(e){return Ar(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Ar(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Br(){return!0}const Ur=[],Hr=!0,Vr=!1;function $r(e,t,n,r){let l;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):l=t;const o=Rr(l),a=r?-1:1;!function e(l,i,u){const s=l&&"object"==typeof l?l:{};if("string"==typeof s.type){const e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(c,"name",{value:"node ("+l.type+(e?"<"+e+">":"")+")"})}return c;function c(){let s,c,f,d=Ur;if((!t||o(l,i,u[u.length-1]||void 0))&&(d=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Hr,e];return null==e?Ur:[e]}(n(l,u)),d[0]===Vr))return d;if("children"in l&&l.children){const t=l;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+a,f=u.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(s=e(n,c,f)(),s[0]===Vr)return s;c="number"==typeof s[1]?s[1]:c+a}}return d}}(e,void 0,[])()}function Wr(e,t,n,r){let l,o,a;"function"==typeof t&&"function"!=typeof n?(o=void 0,a=t,l=n):(o=t,a=n,l=r),$r(e,o,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},l)}const qr={}.hasOwnProperty,Qr={};function Kr(e,t){e.position&&(t.position=function(e){const t=tt(e),n=et(e);if(t&&n)return{start:t,end:n}}(e))}function Yr(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,l=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&l&&Object.assign(n.properties,jr(l)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Xr(e,t){const n=t.data||{},r=!("value"in t)||qr.call(n,"hProperties")||qr.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Zr(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Jr(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Gr(e,t){const n=function(e,t){const n=t||Qr,r=new Map,l=new Map,o=new Map,a={...Cr,...n.handlers},i={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const l=i.one(n[r],e);if(l){if(r&&"break"===n[r-1].type&&(Array.isArray(l)||"text"!==l.type||(l.value=Jr(l.value)),!Array.isArray(l)&&"element"===l.type)){const e=l.children[0];e&&"text"===e.type&&(e.value=Jr(e.value))}Array.isArray(l)?t.push(...l):t.push(l)}}}return t},applyData:Yr,definitionById:r,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=i.handlers[n];if(qr.call(i.handlers,n)&&r)return r(i,e,t);if(i.options.passThrough&&i.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=jr(n);return r.children=i.all(e),r}return jr(e)}return(i.options.unknownHandler||Xr)(i,e,t)},options:n,patch:Kr,wrap:Zr};return Wr(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:l,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),i}(e,t),r=n.one(e,void 0),l=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Or,r=e.options.footnoteBackLabel||Fr,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const o=e.all(l),a=String(l.identifier).toUpperCase(),s=Xt(a.toLowerCase());let c=0;const f=[],d=e.footnoteCounts.get(a);for(;void 0!==d&&++c<=d;){f.length>0&&f.push({type:"text",value:" "});let e="string"==typeof n?n:n(u,c);"string"==typeof e&&(e={type:"text",value:e}),f.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(u,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=o[o.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...f)}else o.push(...f);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+s},children:e.wrap(o,!0)};e.patch(l,h),i.push(h)}if(0!==i.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...jr(a),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(i,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return l&&o.children.push({type:"text",value:"\n"},l),o}function el(e,t){return e&&"run"in e?async function(n,r){const l=Gr(n,{file:r,...t});await e.run(l,r)}:function(n,r){return Gr(n,{file:r,...e||t})}}function tl(e){if(e)throw e}var nl,rl;var ll=function(){if(rl)return nl;rl=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,l=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!l&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},i=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return nl=function e(){var t,n,r,u,s,c,f=arguments[0],d=1,p=arguments.length,h=!1;for("boolean"==typeof f&&(h=f,f=arguments[1]||{},d=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=i(f,n),f!==(u=i(t,n))&&(h&&u&&(o(u)||(s=l(u)))?(s?(s=!1,c=r&&l(r)?r:[]):c=r&&o(r)?r:{},a(f,{name:n,newValue:e(h,c,u)})):void 0!==u&&a(f,{name:n,newValue:u}));return f},nl}();const ol=r(ll);function al(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function il(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function l(o,...a){const i=e[++n];let u=-1;if(o)r(o);else{for(;++u<t.length;)null!==a[u]&&void 0!==a[u]||(a[u]=t[u]);t=a,i?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(l);try{i=e.apply(this,t)}catch(o){if(r&&n)throw o;return l(o)}r||(i&&i.then&&"function"==typeof i.then?i.then(a,l):i instanceof Error?l(i):a(i))}function l(e,...r){n||(n=!0,t(e,...r))}function a(e){l(null,e)}}(i,l)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const ul={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');sl(e);let n,r=0,l=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else l<0&&(n=!0,l=o+1);return l<0?"":e.slice(r,l)}if(t===e)return"";let a=-1,i=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),i>-1&&(e.codePointAt(o)===t.codePointAt(i--)?i<0&&(l=o):(i=-1,l=a));r===l?l=a:l<0&&(l=e.length);return e.slice(r,l)},dirname:function(e){if(sl(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){sl(e);let t,n=e.length,r=-1,l=0,o=-1,a=0;for(;n--;){const i=e.codePointAt(n);if(47!==i)r<0&&(t=!0,r=n+1),46===i?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1);else if(t){l=n+1;break}}if(o<0||r<0||0===a||1===a&&o===r-1&&o===l+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)sl(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){sl(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,l="",o=0,a=-1,i=0,u=-1;for(;++u<=e.length;){if(u<e.length)n=e.codePointAt(u);else{if(47===n)break;n=47}if(47===n){if(a===u-1||1===i);else if(a!==u-1&&2===i){if(l.length<2||2!==o||46!==l.codePointAt(l.length-1)||46!==l.codePointAt(l.length-2))if(l.length>2){if(r=l.lastIndexOf("/"),r!==l.length-1){r<0?(l="",o=0):(l=l.slice(0,r),o=l.length-1-l.lastIndexOf("/")),a=u,i=0;continue}}else if(l.length>0){l="",o=0,a=u,i=0;continue}t&&(l=l.length>0?l+"/..":"..",o=2)}else l.length>0?l+="/"+e.slice(a+1,u):l=e.slice(a+1,u),o=u-a-1;a=u,i=0}else 46===n&&i>-1?i++:i=-1}return l}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function sl(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cl={cwd:function(){return"/"}};function fl(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function dl(e){if("string"==typeof e)e=new URL(e);else if(!fl(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const pl=["history","path","basename","stem","extname","dirname"];class hl{constructor(e){let t;t=e?fl(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":cl.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<pl.length;){const e=pl[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)pl.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?ul.basename(this.path):void 0}set basename(e){gl(e,"basename"),ml(e,"basename"),this.path=ul.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ul.dirname(this.path):void 0}set dirname(e){yl(this.basename,"dirname"),this.path=ul.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ul.extname(this.path):void 0}set extname(e){if(ml(e,"extname"),yl(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ul.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){fl(e)&&(e=dl(e)),gl(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ul.basename(this.path,this.extname):void 0}set stem(e){gl(e,"stem"),ml(e,"stem"),this.path=ul.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new it(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function ml(e,t){if(e&&e.includes(ul.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ul.sep+"`")}function gl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yl(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const vl=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},bl={}.hasOwnProperty;class kl extends vl{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=il()}copy(){const e=new kl;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(ol(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(_l("data",this.frozen),this.namespace[e]=t,this):bl.call(this.namespace,e)&&this.namespace[e]||void 0:e?(_l("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Nl(e),n=this.parser||this.Parser;return wl("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),wl("process",this.parser||this.Parser),Sl("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,l){const o=Nl(e),a=n.parse(o);function i(e,n){e||!n?l(e):r?r(n):t(void 0,n)}n.run(a,o,function(e,t,r){if(e||!t||!r)return i(e);const l=t,o=n.stringify(l,r);var a;"string"==typeof(a=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=o:r.result=o,i(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),wl("processSync",this.parser||this.Parser),Sl("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,tl(e),t=r}),El("processSync","process",n),t}run(e,t,n){Cl(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?l(void 0,n):new Promise(l);function l(l,o){const a=Nl(t);r.run(e,a,function(t,r,a){const i=r||e;t?o(t):l?l(i):n(void 0,i,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){tl(e),n=t,r=!0}),El("runSync","run",r),n}stringify(e,t){this.freeze();const n=Nl(t),r=this.compiler||this.Compiler;return Sl("stringify",r),Cl(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(_l("use",this.frozen),null==e);else if("function"==typeof e)i(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):o(e)}return this;function l(e){if("function"==typeof e)i(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;i(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=ol(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){l(e[t])}}}function i(e,t){let r=-1,l=-1;for(;++r<n.length;)if(n[r][0]===e){l=r;break}if(-1===l)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const a=n[l][1];al(a)&&al(r)&&(r=ol(!0,a,r)),n[l]=[e,r,...o]}}}}const xl=(new kl).freeze();function wl(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Sl(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function _l(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 Cl(e){if(!al(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function El(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Nl(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new hl(e)}const Pl=[],Il={allowDangerousHtml:!0},Tl=/^(https?|ircs?|mailto|xmpp)$/i,Ll=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zl(e){const t=function(e){const t=e.rehypePlugins||Pl,n=e.remarkPlugins||Pl,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Il}:Il,l=xl().use(kr).use(n).use(el,r).use(t);return l}(e),n=function(e){const t=e.children||"",n=new hl;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,l=t.components,o=t.disallowedElements,a=t.skipHtml,i=t.unwrapDisallowed,u=t.urlTransform||Ml;for(const c of Ll)Object.hasOwn(t,c.from)&&ne((c.from,c.to&&c.to,c.id));return Wr(e,s),ht(e,{Fragment:I.Fragment,components:l,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function s(e,t,l){if("raw"===e.type&&l&&"number"==typeof t)return a?l.children.splice(t,1):l.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in _t)if(Object.hasOwn(_t,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=_t[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=u(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!o&&o.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,l)),a&&l&&"number"==typeof t)return i&&e.children?l.children.splice(t,1,...e.children):l.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function Ml(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),l=e.indexOf("/");return-1===t||-1!==l&&t>l||-1!==n&&t>n||-1!==r&&t>r||Tl.test(e.slice(0,t))?e:""}const Dl="_messageWrapper_1thak_1",jl="_user_1thak_19",Ol="_assistant_1thak_24",Fl="_avatar_1thak_28",Rl="_avatarPlaceholder_1thak_43",Al="_brainbaseLogo_1thak_53",Bl="_messageBubble_1thak_58",Ul="_error_1thak_76",Hl="_content_1thak_81",Vl="_markdown_1thak_92",$l="_cursor_1thak_183",Wl="_errorIndicator_1thak_202",ql=({message:e,agentName:t,agentLogoUrl:n})=>{const r="user"===e.role,l="streaming"===e.status,o="error"===e.status;return I.jsxs("div",{className:`${Dl} ${r?jl:Ol}`,children:[!r&&I.jsx("div",{className:Fl,children:n?I.jsx("img",{src:n,alt:t||"AI"}):I.jsx("div",{className:Rl,children:I.jsx(R,{className:Al,color:"white",cutoutColor:"var(--bb-primary-color)"})})}),I.jsxs("div",{className:`${Bl} ${o?Ul:""}`,role:"article","aria-label":""+(r?"Your message":`${t||"AI"} says`),children:[I.jsxs("div",{className:`${Hl} ${r?"":Vl}`,children:[r?e.content:I.jsx(zl,{components:{a:({href:e,children:t})=>e?I.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t}):I.jsx(I.Fragment,{children:t})},children:e.content}),l&&I.jsx("span",{className:$l})]}),o&&I.jsxs("div",{className:Wl,children:[I.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[I.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),I.jsx("path",{d:"M12 8V12M12 16H12.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),I.jsx("span",{children:"Failed to send"})]})]})]})},Ql="_toolCall_1wby1_1",Kl="_iconWrapper_1wby1_24",Yl="_spinner_1wby1_33",Xl="_checkIcon_1wby1_48",Zl="_errorIcon_1wby1_54",Jl="_content_1wby1_60",Gl="_label_1wby1_66",eo="_name_1wby1_73",to="_pending_1wby1_78",no="_completed_1wby1_82",ro="_error_1wby1_54",lo=({toolCall:e})=>{const t="pending"===e.status||"executing"===e.status,n="completed"===e.status,r="error"===e.status;return I.jsxs("div",{className:`${Ql} ${t?to:""} ${n?no:""} ${r?ro:""}`,children:[I.jsx("div",{className:Kl,children:t?I.jsx("div",{className:Yl}):n?I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:Xl,children:I.jsx("path",{d:"M20 6L9 17L4 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:Zl,children:I.jsx("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),I.jsxs("div",{className:Jl,children:[I.jsx("span",{className:Gl,children:t?"Running":n?"Completed":"Failed"}),I.jsx("span",{className:eo,children:(l=e.name,l.replace(/_/g," ").replace(/([A-Z])/g," $1").trim().toLowerCase().replace(/^./,e=>e.toUpperCase()))})]})]});var l},oo="_wrapper_10rss_2",ao="_avatar_10rss_22",io="_avatarPlaceholder_10rss_37",uo="_brainbaseLogo_10rss_47",so="_bubble_10rss_52",co="_dot_10rss_63",fo=({agentName:e="AI",agentLogoUrl:t})=>I.jsxs("div",{className:oo,role:"status","aria-label":`${e} is typing`,children:[I.jsx("div",{className:ao,children:t?I.jsx("img",{src:t,alt:e}):I.jsx("div",{className:io,children:I.jsx(R,{className:uo,color:"white",cutoutColor:"var(--bb-primary-color)"})})}),I.jsxs("div",{className:so,children:[I.jsx("span",{className:co}),I.jsx("span",{className:co}),I.jsx("span",{className:co})]})]}),po="_messageList_241kk_1",ho="_emptyState_241kk_29",mo="_emptyIcon_241kk_40",go="_emptyText_241kk_52",yo=({messages:e,toolCalls:t=[],isLoading:n,agentName:r,agentLogoUrl:l})=>{var o;const a=c.useRef(null),i=c.useRef(null);c.useEffect(()=>{var e;null==(e=i.current)||e.scrollIntoView({behavior:"smooth"})},[e,t,n]);const u=t.filter(e=>"pending"===e.status||"executing"===e.status);return I.jsxs("div",{className:po,ref:a,role:"log","aria-live":"polite",children:[0===e.length&&!n&&I.jsxs("div",{className:ho,children:[I.jsx("div",{className:mo,children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M8 12H8.01M12 12H12.01M16 12H16.01M21 12C21 16.4183 16.9706 20 12 20C10.4607 20 9.01172 19.6565 7.74467 19.0511L3 20L4.39499 16.28C3.51156 15.0423 3 13.5743 3 12C3 7.58172 7.02944 4 12 4C16.9706 4 21 7.58172 21 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),I.jsx("p",{className:go,children:"Start a conversation"})]}),e.map(e=>I.jsx(ql,{message:e,agentName:r,agentLogoUrl:l},e.id)),u.map(e=>I.jsx(lo,{toolCall:e},e.id)),n&&"user"===(null==(o=e[e.length-1])?void 0:o.role)&&I.jsx(fo,{agentName:r,agentLogoUrl:l}),I.jsx("div",{ref:i})]})},vo="_inputWrapper_5lgg7_1",bo="_inputContainer_5lgg7_7",ko="_textarea_5lgg7_23",xo="_sendButton_5lgg7_50",wo="_hint_5lgg7_89",So=({onSend:e,disabled:t=!1,placeholder:n="Send a message..."})=>{const[r,l]=c.useState(""),o=c.useRef(null),a=c.useCallback(()=>{const e=o.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,150)}px`)},[]);c.useEffect(()=>{a()},[r,a]);const i=c.useCallback(n=>{null==n||n.preventDefault();const a=r.trim();a&&!t&&(e(a),l(""),o.current&&(o.current.style.height="auto"))},[r,t,e]),u=c.useCallback(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),i())},[i]);return I.jsxs("form",{className:vo,onSubmit:i,children:[I.jsxs("div",{className:bo,children:[I.jsx("textarea",{ref:o,className:ko,value:r,onChange:e=>l(e.target.value),onKeyDown:u,placeholder:n,disabled:t,rows:1,"aria-label":"Message input"}),I.jsx("button",{type:"submit",className:xo,disabled:t||!r.trim(),"aria-label":"Send message",children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M22 2L11 13M22 2L15 22L11 13M22 2L2 9L11 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),I.jsxs("div",{className:wo,children:["Press ",I.jsx("kbd",{children:"Enter"})," to send, ",I.jsx("kbd",{children:"Shift + Enter"})," for new line"]})]})},_o="_poweredBy_9jh5q_1",Co="_logo_9jh5q_20",Eo="_poweredText_9jh5q_24",No="_text_9jh5q_36",Po=({className:e})=>I.jsxs("svg",{className:e,viewBox:"0 0 800 800",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I.jsx("path",{d:"M400 412C400 405.373 405.373 400 412 400H788C794.627 400 800 405.373 800 412V740C800 773.137 773.137 800 740 800H412C405.373 800 400 794.627 400 788V412Z",fill:"currentColor"}),I.jsx("circle",{cx:"400",cy:"400",r:"400",fill:"currentColor"}),I.jsx("path",{d:"M0 60C0 26.8629 26.8629 0 60 0H397.614C398.932 0 400 1.06811 400 2.38569V2.38569C400 221.982 221.982 400 2.38569 400V400C1.06811 400 0 398.932 0 397.614V60Z",fill:"currentColor"}),I.jsx("path",{d:"M400 412C400 405.373 405.373 400 412 400H738C744.627 400 750 405.373 750 412V725C750 738.807 738.807 750 725 750H412C405.373 750 400 744.627 400 738V412Z",fill:"currentColor"}),I.jsx("circle",{cx:"400",cy:"400",r:"350",fill:"currentColor"}),I.jsx("path",{d:"M50 75C50 61.1929 61.1929 50 75 50H388C394.627 50 400 55.3726 400 62V388C400 394.627 394.627 400 388 400H62C55.3726 400 50 394.627 50 388V75Z",fill:"currentColor"}),I.jsx("rect",{x:"399.919",y:"209",width:"270",height:"270",rx:"12",transform:"rotate(45 399.919 209)",fill:"var(--bb-surface-bg, #ffffff)"})]}),Io=({showBranding:e=!0})=>e?I.jsxs("a",{href:"https://brainbaselabs.com/",target:"_blank",rel:"noopener noreferrer",className:_o,"aria-label":"Powered by Brainbase Labs",children:[I.jsx("span",{className:Eo,children:"Powered by"}),I.jsx(Po,{className:Co}),I.jsx("span",{className:No,children:"Brainbase Labs"})]}):null,To="_container_m2o9l_1",Lo="_body_m2o9l_26",zo="_confirmationOverlay_m2o9l_35",Mo="_confirmationDialog_m2o9l_56",Do="_confirmationText_m2o9l_78",jo="_confirmationButtons_m2o9l_86",Oo="_cancelButton_m2o9l_91",Fo="_confirmButton_m2o9l_92",Ro=({config:e,messages:t,toolCalls:n=[],isLoading:r,onSendMessage:l,onClose:o,onNewChat:a})=>{var i;const[u,s]=c.useState(!1),f=t.length>0;return I.jsxs("div",{className:To,role:"dialog","aria-label":"Chat window",children:[I.jsx(ee,{agentName:e.agentName,agentLogoUrl:e.agentLogoUrl,welcomeTitle:e.welcomeMessage||"Hello there.",welcomeSubtitle:e.welcomeMessage?void 0:"How can we help?",onClose:o,onNewChatRequest:()=>{s(!0)},showNewChatButton:f,compact:f}),I.jsxs("div",{className:Lo,children:[I.jsx(yo,{messages:t,toolCalls:n,isLoading:r,agentName:e.agentName,agentLogoUrl:e.agentLogoUrl}),I.jsx(So,{onSend:l,disabled:r,placeholder:"Ask a question..."})]}),I.jsx(Io,{showBranding:(null==(i=e.styling)?void 0:i.showBranding)??!0}),u&&I.jsx("div",{className:zo,children:I.jsxs("div",{className:Mo,children:[I.jsx("p",{className:Do,children:"End current chat and start a new conversation?"}),I.jsxs("div",{className:jo,children:[I.jsx("button",{className:Oo,onClick:()=>{s(!1)},type:"button",children:"Cancel"}),I.jsx("button",{className:Fo,onClick:()=>{s(!1),null==a||a()},type:"button",children:"End Chat"})]})]})})]})},Ao="_toggleButton_11dqz_1",Bo="_icon_11dqz_31",Uo="_agentLogo_11dqz_36",Ho="_unreadBadge_11dqz_43",Vo=({onClick:e,agentLogoUrl:t,unreadCount:n=0})=>I.jsxs("button",{className:Ao,onClick:e,"aria-label":"Open chat",type:"button",children:[t?I.jsx("img",{src:t,alt:"",className:Uo}):I.jsx("svg",{className:Bo,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I.jsx("path",{d:"M8 12H8.01M12 12H12.01M16 12H16.01M21 12C21 16.4183 16.9706 20 12 20C10.4607 20 9.01172 19.6565 7.74467 19.0511L3 20L4.39499 16.28C3.51156 15.0423 3 13.5743 3 12C3 7.58172 7.02944 4 12 4C16.9706 4 21 7.58172 21 12Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),n>0&&I.jsx("span",{className:Ho,children:n>9?"9+":n})]}),$o="_container_kgfgt_1",Wo="_header_kgfgt_25",qo="_logoWrapper_kgfgt_38",Qo="_logo_kgfgt_38",Ko="_closeButton_kgfgt_51",Yo="_content_kgfgt_74",Xo="_iconWrapper_kgfgt_84",Zo="_errorIcon_kgfgt_95",Jo="_title_kgfgt_101",Go="_description_kgfgt_109",ea="_retryButton_kgfgt_117",ta="_footer_kgfgt_139",na="_poweredBy_kgfgt_146",ra="_footerLogo_kgfgt_160",la=({errorType:e,message:t,onRetry:n,onClose:r})=>{const{title:l,description:o,icon:a}=(()=>{switch(e){case"not_found":return{title:"Chat Not Found",description:t||"This chat widget is not configured correctly. Please check the embed ID.",icon:I.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:Zo,children:[I.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5"}),I.jsx("path",{d:"M12 7V13M12 16V16.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})};case"network":return{title:"Connection Error",description:t||"Unable to connect to the chat service. Please check your internet connection.",icon:I.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:Zo,children:[I.jsx("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"currentColor",strokeWidth:"1.5"}),I.jsx("path",{d:"M8 15L16 9M8 9L16 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})};default:return{title:"Something Went Wrong",description:t||"An unexpected error occurred. Please try again later.",icon:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:Zo,children:I.jsx("path",{d:"M12 9V13M12 17H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}}})();return I.jsxs("div",{className:$o,children:[I.jsxs("div",{className:Wo,children:[I.jsx("div",{className:qo,children:I.jsx(R,{className:Qo,color:"white",cutoutColor:"var(--bb-primary-color)"})}),r&&I.jsx("button",{className:Ko,onClick:r,"aria-label":"Close",type:"button",children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),I.jsxs("div",{className:Yo,children:[I.jsx("div",{className:Xo,children:a}),I.jsx("h2",{className:Jo,children:l}),I.jsx("p",{className:Go,children:o}),n&&I.jsx("button",{className:ea,onClick:n,type:"button",children:"Try Again"})]}),I.jsx("div",{className:ta,children:I.jsxs("a",{href:"https://brainbaselabs.com",target:"_blank",rel:"noopener noreferrer",className:na,children:["Powered by"," ",I.jsx(R,{className:ra,color:"var(--bb-text-tertiary)",cutoutColor:"var(--bb-surface-bg)"}),I.jsx("span",{children:"Brainbase Labs"})]})})]})},oa={widget:"_widget_1ehud_1","bottom-right":"_bottom-right_1ehud_10","bottom-left":"_bottom-left_1ehud_17",inline:"_inline_1ehud_25"},aa=({embedId:e,apiBaseUrl:t=D,mockMode:n=!1,mockResponses:r,position:l="bottom-right",defaultOpen:o=!1,primaryColor:a,agentName:i,welcomeMessage:u,showBranding:s,className:f,onSessionStart:d,onSessionEnd:p,onMessage:h,onError:m})=>{const[g,y]=c.useState(o),[v,b]=c.useState(null),[k,x]=c.useState(!0),[w,S]=c.useState(null),[_,C]=c.useState(),E=c.useMemo(()=>n?function(e,t){const n={...j,...e},r=t??O,l=`mock-session-${Date.now()}`;return{getDeploymentConfig:async e=>(await F(300),n),async*sendMessage(e){yield{type:"session",data:{session_id:l,is_new:!0},timestamp:Date.now()};const t=r.find(t=>"string"==typeof t.trigger?e.toLowerCase().includes(t.trigger.toLowerCase()):t.trigger.test(e))??r[r.length-1];if(await F(t.delay??500),t.toolCalls)for(const r of t.toolCalls)yield{type:"tool_call",data:{function:r.name,args:r.arguments},timestamp:Date.now()},await F(300),yield{type:"tool_call",data:{function:r.name,result:r.result},timestamp:Date.now()},await F(200);const n=t.response.split(" ");let o="";for(const r of n)o+=(o?" ":"")+r,yield{type:"message",data:{content:o,role:"assistant"},timestamp:Date.now()},await F(30+40*Math.random());yield{type:"done",data:{session_id:l},timestamp:Date.now()}}}}({primaryColor:a,agentName:i,welcomeMessage:u},r):function(e=D){return{async getDeploymentConfig(t){const n=await fetch(`${e}/chat/config/${t}`);if(!n.ok)throw new Error(`Failed to fetch deployment config: ${n.status}`);const r=await n.json();return{embedId:r.embedId,deploymentId:"",workerId:"",flowId:"",welcomeMessage:r.welcomeMessage,agentName:r.agentName,agentLogoUrl:r.agentLogoUrl,primaryColor:r.primaryColor,styling:r.styling}},async sendMessage(t){const n=await fetch(`${e}/chat/message`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({embed_id:t.embedId,message:t.message,session_id:t.sessionId||void 0,metadata:t.metadata})});if(!n.ok){const e=await n.text();throw new Error(`Failed to send message: ${n.status} - ${e}`)}if(!n.body)throw new Error("No response stream available");return n.body}}}(t),[n,a,i,u,r,t]),N=c.useCallback(async()=>{x(!0),S(null),C(void 0);try{const t=await E.getDeploymentConfig(e);b({...t,primaryColor:a??t.primaryColor,agentName:i??t.agentName,welcomeMessage:u??t.welcomeMessage,styling:{...t.styling??{},...void 0!==s?{showBranding:s}:{}}})}catch(t){const r=t instanceof Error?t:new Error("Failed to load config");r.message.includes("404")?(S("not_found"),C("The chat widget with this embed ID was not found.")):r.message.includes("Failed to fetch")||r.message.includes("network")?S("network"):S("unknown"),n&&(b({embedId:e,deploymentId:"mock-deployment",workerId:"mock-worker",flowId:"mock-flow",primaryColor:a??"#1a1a2e",agentName:i??"AI Assistant",styling:void 0!==s?{showBranding:s}:void 0}),S(null)),null==m||m(r)}finally{x(!1)}},[e,n,E,a,i,u,m]);c.useEffect(()=>{N()},[N]);const P=c.useMemo(()=>v||{embedId:e,deploymentId:"",workerId:"",flowId:"",primaryColor:a,agentName:i,welcomeMessage:u,styling:void 0!==s?{showBranding:s}:void 0},[v,e,a,i,u,s]),T=M({config:P,apiClient:E,mockMode:n,onSessionStart:d,onSessionEnd:p,onMessage:h,onError:m}),L=c.useMemo(()=>({"--bb-primary-color":(null==v?void 0:v.primaryColor)??a??"#1a1a2e"}),[null==v?void 0:v.primaryColor,a]),z=()=>{y(!1)},R=()=>{N()},A="inline"===l;return k?null:w&&!n?A||g?I.jsx("div",{className:`${oa.widget} ${oa[l]} ${f??""}`,style:L,children:I.jsx(la,{errorType:w,message:_,onRetry:R,onClose:A?void 0:z})}):I.jsx("div",{className:`${oa.widget} ${oa[l]} ${f??""}`,style:L,children:I.jsx(Vo,{onClick:()=>y(!0),agentName:i})}):I.jsx("div",{className:`${oa.widget} ${oa[l]} ${f??""}`,style:L,children:g||A?I.jsx(Ro,{config:P,messages:T.messages,isLoading:T.isLoading,onSendMessage:T.sendMessage,onClose:A?void 0:z,onNewChat:()=>{T.endSession(),T.startNewSession()}}):I.jsx(Vo,{onClick:()=>y(!0),agentName:null==v?void 0:v.agentName,agentLogoUrl:null==v?void 0:v.agentLogoUrl})})};class ia extends HTMLElement{constructor(){super(...arguments),n(this,"root",null),n(this,"container",null)}static get observedAttributes(){return["embed-id","position","primary-color","agent-name","welcome-message","api-base-url","default-open"]}connectedCallback(){this.container=document.createElement("div"),this.container.className="brainbase-chat-container",this.appendChild(this.container),this.root=E.createRoot(this.container),this.render()}disconnectedCallback(){this.root&&(this.root.unmount(),this.root=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null)}attributeChangedCallback(e,t,n){t!==n&&this.root&&this.render()}render(){if(!this.root)return;const e=this.getProps();e.embedId?this.root.render(f.createElement(aa,e)):console.warn("[Brainbase Chat] embed-id attribute is required")}getProps(){return{embedId:this.getAttribute("embed-id")||"",position:this.getPositionAttribute(),primaryColor:this.getAttribute("primary-color")||void 0,agentName:this.getAttribute("agent-name")||void 0,welcomeMessage:this.getAttribute("welcome-message")||void 0,apiBaseUrl:this.getAttribute("api-base-url")||void 0,defaultOpen:"true"===this.getAttribute("default-open")}}getPositionAttribute(){const e=this.getAttribute("position");return"bottom-left"===e||"inline"===e?e:"bottom-right"}}return"undefined"==typeof customElements||customElements.get("brainbase-chat")||customElements.define("brainbase-chat",ia),"undefined"!=typeof window&&console.log("[Brainbase Chat] Widget loaded and ready"),e.ChatWidgetElement=ia,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});
11
+ */function S(){if(h)return b;h=1;var e=s(),t=w();function n(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 r=new Set,l={};function o(e,t){a(e,t),a(e+"Capture",t)}function a(e,t){for(l[e]=t,e=0;e<t.length;e++)r.add(t[e])}var i=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,c=/^[: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]*$/,f={},d={};function p(e,t,n,r,l,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){m[e]=new p(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];m[t]=new p(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){m[e]=new p(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){m[e]=new p(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){m[e]=new p(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){m[e]=new p(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){m[e]=new p(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){m[e]=new p(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){m[e]=new p(e,5,!1,e.toLowerCase(),null,!1,!1)});var g=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function v(e,t,n,r){var l=m.hasOwnProperty(t)?m[t]:null;(null!==l?0!==l.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,l,r)&&(n=null),r||null===l?function(e){return!!u.call(d,e)||!u.call(f,e)&&(c.test(e)?d[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=null===n?3!==l.type&&"":n:(t=l.attributeName,r=l.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(l=l.type)||4===l&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(g,y);m[t]=new p(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(g,y);m[t]=new p(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(g,y);m[t]=new p(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){m[e]=new p(e,1,!1,e.toLowerCase(),null,!1,!1)}),m.xlinkHref=new p("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){m[e]=new p(e,1,!1,e.toLowerCase(),null,!0,!0)});var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),P=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),j=Symbol.iterator;function O(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var R,F=Object.assign;function A(e){if(void 0===R)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||""}return"\n"+R+e}var B=!1;function U(e,t){if(!e||B)return"";B=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"==typeof s.stack){for(var l=s.stack.split("\n"),o=r.stack.split("\n"),a=l.length-1,i=o.length-1;1<=a&&0<=i&&l[a]!==o[i];)i--;for(;1<=a&&0<=i;a--,i--)if(l[a]!==o[i]){if(1!==a||1!==i)do{if(a--,0>--i||l[a]!==o[i]){var u="\n"+l[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=a&&0<=i);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?A(e):""}function H(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=U(e.type,!1);case 11:return e=U(e.type.render,!1);case 1:return e=U(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case E:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case N:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case z:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case M:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function $(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=(e=t.render).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 V(t);case 8:return t===C?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function X(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Z(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function G(e,t){J(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?te(e,t.type,n):t.hasOwnProperty("defaultValue")&&te(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ee(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function te(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ne=Array.isArray;function re(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,l=0;l<e.length;l++){if(e[l].value===n)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==t||e[l].disabled||(t=e[l])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return F({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(ne(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:W(r)}}function ae(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ue(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 se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ue(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,fe,de=(fe=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return fe(e,t)})}:fe);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={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},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ye(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),l=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}Object.keys(he).forEach(function(e){me.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var ve=F({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 be(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function ke(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 xe=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,_e=null,Ce=null;function Ee(e){if(e=kl(e)){if("function"!=typeof Se)throw Error(n(280));var t=e.stateNode;t&&(t=wl(t),Se(e.stateNode,e.type,t))}}function Ne(e){_e?Ce?Ce.push(e):Ce=[e]:_e=e}function Pe(){if(_e){var e=_e,t=Ce;if(Ce=_e=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Ie(e,t){return e(t)}function Te(){}var Le=!1;function ze(e,t,n){if(Le)return e(t,n);Le=!0;try{return Ie(e,t,n)}finally{Le=!1,(null!==_e||null!==Ce)&&(Te(),Pe())}}function Me(e,t){var r=e.stateNode;if(null===r)return null;var l=wl(r);if(null===l)return null;r=l[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":(l=!l.disabled)||(l=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!l;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var De=!1;if(i)try{var je={};Object.defineProperty(je,"passive",{get:function(){De=!0}}),window.addEventListener("test",je,je),window.removeEventListener("test",je,je)}catch(fe){De=!1}function Oe(e,t,n,r,l,o,a,i,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(c){this.onError(c)}}var Re=!1,Fe=null,Ae=!1,Be=null,Ue={onError:function(e){Re=!0,Fe=e}};function He(e,t,n,r,l,o,a,i,u){Re=!1,Fe=null,Oe.apply(Ue,arguments)}function Ve(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function $e(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function We(e){if(Ve(e)!==e)throw Error(n(188))}function qe(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,l=t;;){var o=r.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(l=o.return)){r=l;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return We(o),e;if(a===l)return We(o),t;a=a.sibling}throw Error(n(188))}if(r.return!==l.return)r=o,l=a;else{for(var i=!1,u=o.child;u;){if(u===r){i=!0,r=o,l=a;break}if(u===l){i=!0,l=o,r=a;break}u=u.sibling}if(!i){for(u=a.child;u;){if(u===r){i=!0,r=a,l=o;break}if(u===l){i=!0,l=a,r=o;break}u=u.sibling}if(!i)throw Error(n(189))}}if(r.alternate!==l)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e))?Qe(e):null}function Qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Qe(e);if(null!==t)return t;e=e.sibling}return null}var Ke=t.unstable_scheduleCallback,Ye=t.unstable_cancelCallback,Xe=t.unstable_shouldYield,Ze=t.unstable_requestPaint,Je=t.unstable_now,Ge=t.unstable_getCurrentPriorityLevel,et=t.unstable_ImmediatePriority,tt=t.unstable_UserBlockingPriority,nt=t.unstable_NormalPriority,rt=t.unstable_LowPriority,lt=t.unstable_IdlePriority,ot=null,at=null;var it=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(ut(e)/st|0)|0},ut=Math.log,st=Math.LN2;var ct=64,ft=4194304;function dt(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var i=a&~l;0!==i?r=dt(i):0!==(o&=a)&&(r=dt(o))}else 0!==(a=n&~l)?r=dt(a):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&l)&&((l=r&-r)>=(o=t&-t)||16===l&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)l=1<<(n=31-it(t)),r|=e[n],t&=~l;return r}function ht(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;default:return-1}}function mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function yt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var kt=0;function xt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var wt,St,_t,Ct,Et,Nt=!1,Pt=[],It=null,Tt=null,Lt=null,zt=new Map,Mt=new Map,Dt=[],jt="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 Ot(e,t){switch(e){case"focusin":case"focusout":It=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Lt=null;break;case"pointerover":case"pointerout":zt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mt.delete(t.pointerId)}}function Rt(e,t,n,r,l,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[l]},null!==t&&(null!==(t=kl(t))&&St(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==l&&-1===t.indexOf(l)&&t.push(l),e)}function Ft(e){var t=bl(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=$e(n)))return e.blockedOn=t,void Et(e.priority,function(){_t(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function At(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=kl(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);xe=r,n.target.dispatchEvent(r),xe=null,t.shift()}return!0}function Bt(e,t,n){At(e)&&n.delete(t)}function Ut(){Nt=!1,null!==It&&At(It)&&(It=null),null!==Tt&&At(Tt)&&(Tt=null),null!==Lt&&At(Lt)&&(Lt=null),zt.forEach(Bt),Mt.forEach(Bt)}function Ht(e,n){e.blockedOn===n&&(e.blockedOn=null,Nt||(Nt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ut)))}function Vt(e){function t(t){return Ht(t,e)}if(0<Pt.length){Ht(Pt[0],e);for(var n=1;n<Pt.length;n++){var r=Pt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&Ht(It,e),null!==Tt&&Ht(Tt,e),null!==Lt&&Ht(Lt,e),zt.forEach(t),Mt.forEach(t),n=0;n<Dt.length;n++)(r=Dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)Ft(n),null===n.blockedOn&&Dt.shift()}var $t=k.ReactCurrentBatchConfig,Wt=!0;function qt(e,t,n,r){var l=kt,o=$t.transition;$t.transition=null;try{kt=1,Kt(e,t,n,r)}finally{kt=l,$t.transition=o}}function Qt(e,t,n,r){var l=kt,o=$t.transition;$t.transition=null;try{kt=4,Kt(e,t,n,r)}finally{kt=l,$t.transition=o}}function Kt(e,t,n,r){if(Wt){var l=Xt(e,t,n,r);if(null===l)Wr(e,t,r,Yt,n),Ot(e,r);else if(function(e,t,n,r,l){switch(t){case"focusin":return It=Rt(It,e,t,n,r,l),!0;case"dragenter":return Tt=Rt(Tt,e,t,n,r,l),!0;case"mouseover":return Lt=Rt(Lt,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return zt.set(o,Rt(zt.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,Mt.set(o,Rt(Mt.get(o)||null,e,t,n,r,l)),!0}return!1}(l,e,t,n,r))r.stopPropagation();else if(Ot(e,r),4&t&&-1<jt.indexOf(e)){for(;null!==l;){var o=kl(l);if(null!==o&&wt(o),null===(o=Xt(e,t,n,r))&&Wr(e,t,r,Yt,n),o===l)break;l=o}null!==l&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Yt=null;function Xt(e,t,n,r){if(Yt=null,null!==(e=bl(e=we(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=$e(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Zt(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(Ge()){case et:return 1;case tt:return 4;case nt:case rt:return 16;case lt:return 536870912;default:return 16}default:return 16}}var Jt=null,Gt=null,en=null;function tn(){if(en)return en;var e,t,n=Gt,r=n.length,l="value"in Jt?Jt.value:Jt.textContent,o=l.length;for(e=0;e<r&&n[e]===l[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===l[o-t];t++);return en=l.slice(e,1<t?1-t:void 0)}function nn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rn(){return!0}function ln(){return!1}function on(e){function t(t,n,r,l,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=l,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(l):l[a]);return this.isDefaultPrevented=(null!=l.defaultPrevented?l.defaultPrevented:!1===l.returnValue)?rn:ln,this.isPropagationStopped=ln,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var an,un,sn,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=on(cn),dn=F({},cn,{view:0,detail:0}),pn=on(dn),hn=F({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sn&&(sn&&"mousemove"===e.type?(an=e.screenX-sn.screenX,un=e.screenY-sn.screenY):un=an=0,sn=e),an)},movementY:function(e){return"movementY"in e?e.movementY:un}}),mn=on(hn),gn=on(F({},hn,{dataTransfer:0})),yn=on(F({},dn,{relatedTarget:0})),vn=on(F({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=F({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=on(bn),xn=on(F({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={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"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function En(){return Cn}var Nn=F({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pn=on(Nn),In=on(F({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=on(F({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Ln=on(F({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),zn=F({},hn,{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}),Mn=on(zn),Dn=[9,13,27,32],jn=i&&"CompositionEvent"in window,On=null;i&&"documentMode"in document&&(On=document.documentMode);var Rn=i&&"TextEvent"in window&&!On,Fn=i&&(!jn||On&&8<On&&11>=On),An=String.fromCharCode(32),Bn=!1;function Un(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var $n={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 Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!$n[e.type]:"textarea"===t}function qn(e,t,n,r){Ne(r),0<(t=Qr(t,"onChange")).length&&(n=new fn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qn=null,Kn=null;function Yn(e){Ar(e,0)}function Xn(e){if(K(xl(e)))return e}function Zn(e,t){if("change"===e)return t}var Jn=!1;if(i){var Gn;if(i){var er="oninput"in document;if(!er){var tr=document.createElement("div");tr.setAttribute("oninput","return;"),er="function"==typeof tr.oninput}Gn=er}else Gn=!1;Jn=Gn&&(!document.documentMode||9<document.documentMode)}function nr(){Qn&&(Qn.detachEvent("onpropertychange",rr),Kn=Qn=null)}function rr(e){if("value"===e.propertyName&&Xn(Kn)){var t=[];qn(t,Kn,e,we(e)),ze(Yn,t)}}function lr(e,t,n){"focusin"===e?(nr(),Kn=n,(Qn=t).attachEvent("onpropertychange",rr)):"focusout"===e&&nr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Kn)}function ar(e,t){if("click"===e)return Xn(t)}function ir(e,t){if("input"===e||"change"===e)return Xn(t)}var ur="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function sr(e,t){if(ur(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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 l=n[r];if(!u.call(t,l)||!ur(e[l],t[l]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=void 0===r.end?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=fr(n,o);var a=fr(n,r);l&&a&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=i&&"documentMode"in document&&11>=document.documentMode,yr=null,vr=null,br=null,kr=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==yr||yr!==Y(r)||("selectionStart"in(r=yr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&sr(br,r)||(br=r,0<(r=Qr(vr,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},_r={},Cr={};function Er(e){if(_r[e])return _r[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return _r[e]=n[t];return e}i&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var Nr=Er("animationend"),Pr=Er("animationiteration"),Ir=Er("animationstart"),Tr=Er("transitionend"),Lr=new Map,zr="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){Lr.set(e,t),o(t,[e])}for(var Dr=0;Dr<zr.length;Dr++){var jr=zr[Dr];Mr(jr.toLowerCase(),"on"+(jr[0].toUpperCase()+jr.slice(1)))}Mr(Nr,"onAnimationEnd"),Mr(Pr,"onAnimationIteration"),Mr(Ir,"onAnimationStart"),Mr("dblclick","onDoubleClick"),Mr("focusin","onFocus"),Mr("focusout","onBlur"),Mr(Tr,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="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(" "),Rr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Fr(e,t,r){var l=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,l,o,a,i,u,s){if(He.apply(this,arguments),Re){if(!Re)throw Error(n(198));var c=Fe;Re=!1,Fe=null,Ae||(Ae=!0,Be=c)}}(l,t,void 0,e),e.currentTarget=null}function Ar(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var i=r[a],u=i.instance,s=i.currentTarget;if(i=i.listener,u!==o&&l.isPropagationStopped())break e;Fr(l,i,s),o=u}else for(a=0;a<r.length;a++){if(u=(i=r[a]).instance,s=i.currentTarget,i=i.listener,u!==o&&l.isPropagationStopped())break e;Fr(l,i,s),o=u}}}if(Ae)throw e=Be,Ae=!1,Be=null,e}function Br(e,t){var n=t[gl];void 0===n&&(n=t[gl]=new Set);var r=e+"__bubble";n.has(r)||($r(t,e,2,!1),n.add(r))}function Ur(e,t,n){var r=0;t&&(r|=4),$r(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Vr(e){if(!e[Hr]){e[Hr]=!0,r.forEach(function(t){"selectionchange"!==t&&(Rr.has(t)||Ur(t,!1,e),Ur(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,Ur("selectionchange",!1,t))}}function $r(e,t,n,r){switch(Zt(t)){case 1:var l=qt;break;case 4:l=Qt;break;default:l=Kt}n=l.bind(null,t,n,e),l=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(l=!0),r?void 0!==l?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):void 0!==l?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Wr(e,t,n,r,l){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var i=r.stateNode.containerInfo;if(i===l||8===i.nodeType&&i.parentNode===l)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===l||8===u.nodeType&&u.parentNode===l))return;a=a.return}for(;null!==i;){if(null===(a=bl(i)))return;if(5===(u=a.tag)||6===u){r=o=a;continue e}i=i.parentNode}}r=r.return}ze(function(){var r=o,l=we(n),a=[];e:{var i=Lr.get(e);if(void 0!==i){var u=fn,s=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":u=Pn;break;case"focusin":s="focus",u=yn;break;case"focusout":s="blur",u=yn;break;case"beforeblur":case"afterblur":u=yn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Tn;break;case Nr:case Pr:case Ir:u=vn;break;case Tr:u=Ln;break;case"scroll":u=pn;break;case"wheel":u=Mn;break;case"copy":case"cut":case"paste":u=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=In}var c=!!(4&t),f=!c&&"scroll"===e,d=c?null!==i?i+"Capture":null:i;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==d&&(null!=(m=Me(h,d))&&c.push(qr(h,m,p)))),f)break;h=h.return}0<c.length&&(i=new u(i,s,null,n,l),a.push({event:i,listeners:c}))}}if(!(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(i="mouseover"===e||"pointerover"===e)||n===xe||!(s=n.relatedTarget||n.fromElement)||!bl(s)&&!s[ml])&&(u||i)&&(i=l.window===l?l:(i=l.ownerDocument)?i.defaultView||i.parentWindow:window,u?(u=r,null!==(s=(s=n.relatedTarget||n.toElement)?bl(s):null)&&(s!==(f=Ve(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(u=null,s=r),u!==s)){if(c=mn,m="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=In,m="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==u?i:xl(u),p=null==s?i:xl(s),(i=new c(m,h+"leave",u,n,l)).target=f,i.relatedTarget=p,m=null,bl(l)===r&&((c=new c(d,h+"enter",s,n,l)).target=p,c.relatedTarget=f,m=c),f=m,u&&s)e:{for(d=s,h=0,p=c=u;p;p=Kr(p))h++;for(p=0,m=d;m;m=Kr(m))p++;for(;0<h-p;)c=Kr(c),h--;for(;0<p-h;)d=Kr(d),p--;for(;h--;){if(c===d||null!==d&&c===d.alternate)break e;c=Kr(c),d=Kr(d)}c=null}else c=null;null!==u&&Yr(a,i,u,c,!1),null!==s&&null!==f&&Yr(a,f,s,c,!0)}if("select"===(u=(i=r?xl(r):window).nodeName&&i.nodeName.toLowerCase())||"input"===u&&"file"===i.type)var g=Zn;else if(Wn(i))if(Jn)g=ir;else{g=or;var y=lr}else(u=i.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(g=ar);switch(g&&(g=g(e,r))?qn(a,g,n,l):(y&&y(e,i,r),"focusout"===e&&(y=i._wrapperState)&&y.controlled&&"number"===i.type&&te(i,"number",i.value)),y=r?xl(r):window,e){case"focusin":(Wn(y)||"true"===y.contentEditable)&&(yr=y,vr=r,br=null);break;case"focusout":br=vr=yr=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,xr(a,n,l);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":xr(a,n,l)}var v;if(jn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Vn?Un(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Fn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Vn&&(v=tn()):(Gt="value"in(Jt=l)?Jt.value:Jt.textContent,Vn=!0)),0<(y=Qr(r,b)).length&&(b=new xn(b,e,null,n,l),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Hn(n))&&(b.data=v))),(v=Rn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Bn=!0,An);case"textInput":return(e=t.data)===An&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!jn&&Un(e,t)?(e=tn(),en=Gt=Jt=null,Vn=!1,e):null;switch(e){case"paste":default: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 Fn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Qr(r,"onBeforeInput")).length&&(l=new xn("onBeforeInput","beforeinput",null,n,l),a.push({event:l,listeners:r}),l.data=v))}Ar(a,t)})}function qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var l=e,o=l.stateNode;5===l.tag&&null!==o&&(l=o,null!=(o=Me(e,n))&&r.unshift(qr(e,o,l)),null!=(o=Me(e,t))&&r.push(qr(e,o,l))),e=e.return}return r}function Kr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,l){for(var o=t._reactName,a=[];null!==n&&n!==r;){var i=n,u=i.alternate,s=i.stateNode;if(null!==u&&u===r)break;5===i.tag&&null!==s&&(i=s,l?null!=(u=Me(n,o))&&a.unshift(qr(n,u,i)):l||null!=(u=Me(n,o))&&a.push(qr(n,u,i))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Xr=/\r\n?/g,Zr=/\u0000|\uFFFD/g;function Jr(e){return("string"==typeof e?e:""+e).replace(Xr,"\n").replace(Zr,"")}function Gr(e,t,r){if(t=Jr(t),Jr(e)!==t&&r)throw Error(n(425))}function el(){}var tl=null,nl=null;function rl(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ll="function"==typeof setTimeout?setTimeout:void 0,ol="function"==typeof clearTimeout?clearTimeout:void 0,al="function"==typeof Promise?Promise:void 0,il="function"==typeof queueMicrotask?queueMicrotask:void 0!==al?function(e){return al.resolve(null).then(e).catch(ul)}:ll;function ul(e){setTimeout(function(){throw e})}function sl(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&8===l.nodeType)if("/$"===(n=l.data)){if(0===r)return e.removeChild(l),void Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=l}while(n);Vt(t)}function cl(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function fl(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var dl=Math.random().toString(36).slice(2),pl="__reactFiber$"+dl,hl="__reactProps$"+dl,ml="__reactContainer$"+dl,gl="__reactEvents$"+dl,yl="__reactListeners$"+dl,vl="__reactHandles$"+dl;function bl(e){var t=e[pl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ml]||n[pl]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=fl(e);null!==e;){if(n=e[pl])return n;e=fl(e)}return t}n=(e=n).parentNode}return null}function kl(e){return!(e=e[pl]||e[ml])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function xl(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function wl(e){return e[hl]||null}var Sl=[],_l=-1;function Cl(e){return{current:e}}function El(e){0>_l||(e.current=Sl[_l],Sl[_l]=null,_l--)}function Nl(e,t){_l++,Sl[_l]=e.current,e.current=t}var Pl={},Il=Cl(Pl),Tl=Cl(!1),Ll=Pl;function zl(e,t){var n=e.type.contextTypes;if(!n)return Pl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l,o={};for(l in n)o[l]=t[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ml(e){return null!=(e=e.childContextTypes)}function Dl(){El(Tl),El(Il)}function jl(e,t,r){if(Il.current!==Pl)throw Error(n(168));Nl(Il,t),Nl(Tl,r)}function Ol(e,t,r){var l=e.stateNode;if(t=t.childContextTypes,"function"!=typeof l.getChildContext)return r;for(var o in l=l.getChildContext())if(!(o in t))throw Error(n(108,$(e)||"Unknown",o));return F({},r,l)}function Rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Pl,Ll=Il.current,Nl(Il,e),Nl(Tl,Tl.current),!0}function Fl(e,t,r){var l=e.stateNode;if(!l)throw Error(n(169));r?(e=Ol(e,t,Ll),l.__reactInternalMemoizedMergedChildContext=e,El(Tl),El(Il),Nl(Il,e)):El(Tl),Nl(Tl,r)}var Al=null,Bl=!1,Ul=!1;function Hl(e){null===Al?Al=[e]:Al.push(e)}function Vl(){if(!Ul&&null!==Al){Ul=!0;var e=0,t=kt;try{var n=Al;for(kt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Al=null,Bl=!1}catch(l){throw null!==Al&&(Al=Al.slice(e+1)),Ke(et,Vl),l}finally{kt=t,Ul=!1}}return null}var $l=[],Wl=0,ql=null,Ql=0,Kl=[],Yl=0,Xl=null,Zl=1,Jl="";function Gl(e,t){$l[Wl++]=Ql,$l[Wl++]=ql,ql=e,Ql=t}function eo(e,t,n){Kl[Yl++]=Zl,Kl[Yl++]=Jl,Kl[Yl++]=Xl,Xl=e;var r=Zl;e=Jl;var l=32-it(r)-1;r&=~(1<<l),n+=1;var o=32-it(t)+l;if(30<o){var a=l-l%5;o=(r&(1<<a)-1).toString(32),r>>=a,l-=a,Zl=1<<32-it(t)+l|n<<l|r,Jl=o+e}else Zl=1<<o|n<<l|r,Jl=e}function to(e){null!==e.return&&(Gl(e,1),eo(e,1,0))}function no(e){for(;e===ql;)ql=$l[--Wl],$l[Wl]=null,Ql=$l[--Wl],$l[Wl]=null;for(;e===Xl;)Xl=Kl[--Yl],Kl[Yl]=null,Jl=Kl[--Yl],Kl[Yl]=null,Zl=Kl[--Yl],Kl[Yl]=null}var ro=null,lo=null,oo=!1,ao=null;function io(e,t){var n=zs(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function uo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ro=e,lo=cl(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ro=e,lo=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Xl?{id:Zl,overflow:Jl}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=zs(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ro=e,lo=null,!0);default:return!1}}function so(e){return!(!(1&e.mode)||128&e.flags)}function co(e){if(oo){var t=lo;if(t){var r=t;if(!uo(e,t)){if(so(e))throw Error(n(418));t=cl(r.nextSibling);var l=ro;t&&uo(e,t)?io(l,r):(e.flags=-4097&e.flags|2,oo=!1,ro=e)}}else{if(so(e))throw Error(n(418));e.flags=-4097&e.flags|2,oo=!1,ro=e}}}function fo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ro=e}function po(e){if(e!==ro)return!1;if(!oo)return fo(e),oo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!rl(e.type,e.memoizedProps)),t&&(t=lo)){if(so(e))throw ho(),Error(n(418));for(;t;)io(e,t),t=cl(t.nextSibling)}if(fo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){lo=cl(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}lo=null}}else lo=ro?cl(e.stateNode.nextSibling):null;return!0}function ho(){for(var e=lo;e;)e=cl(e.nextSibling)}function mo(){lo=ro=null,oo=!1}function go(e){null===ao?ao=[e]:ao.push(e)}var yo=k.ReactCurrentBatchConfig;function vo(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var l=r.stateNode}if(!l)throw Error(n(147,e));var o=l,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function bo(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ko(e){return(0,e._init)(e._payload)}function xo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function l(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ds(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Fs(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function s(e,t,n,r){var l=n.type;return l===_?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===M&&ko(l)===t.type)?((r=o(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=js(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=As(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,l){return null===t||7!==t.tag?((t=Os(n,e.mode,r,l)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Fs(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=js(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case S:return(t=As(t,e.mode,n)).return=e,t;case M:return d(e,(0,t._init)(t._payload),n)}if(ne(t)||O(t))return(t=Os(t,e.mode,n,null)).return=e,t;bo(e,t)}return null}function p(e,t,n,r){var l=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==l?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===l?s(e,t,n,r):null;case S:return n.key===l?c(e,t,n,r):null;case M:return p(e,t,(l=n._init)(n._payload),r)}if(ne(n)||O(n))return null!==l?null:f(e,t,n,r,null);bo(e,n)}return null}function h(e,t,n,r,l){if("string"==typeof r&&""!==r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case x:return s(t,e=e.get(null===r.key?n:r.key)||null,r,l);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,l);case M:return h(e,t,n,(0,r._init)(r._payload),l)}if(ne(r)||O(r))return f(t,e=e.get(n)||null,r,l,null);bo(t,r)}return null}return function u(s,c,f,m){if("object"==typeof f&&null!==f&&f.type===_&&null===f.key&&(f=f.props.children),"object"==typeof f&&null!==f){switch(f.$$typeof){case x:e:{for(var g=f.key,y=c;null!==y;){if(y.key===g){if((g=f.type)===_){if(7===y.tag){r(s,y.sibling),(c=o(y,f.props.children)).return=s,s=c;break e}}else if(y.elementType===g||"object"==typeof g&&null!==g&&g.$$typeof===M&&ko(g)===y.type){r(s,y.sibling),(c=o(y,f.props)).ref=vo(s,y,f),c.return=s,s=c;break e}r(s,y);break}t(s,y),y=y.sibling}f.type===_?((c=Os(f.props.children,s.mode,m,f.key)).return=s,s=c):((m=js(f.type,f.key,f.props,null,s.mode,m)).ref=vo(s,c,f),m.return=s,s=m)}return i(s);case S:e:{for(y=f.key;null!==c;){if(c.key===y){if(4===c.tag&&c.stateNode.containerInfo===f.containerInfo&&c.stateNode.implementation===f.implementation){r(s,c.sibling),(c=o(c,f.children||[])).return=s,s=c;break e}r(s,c);break}t(s,c),c=c.sibling}(c=As(f,s.mode,m)).return=s,s=c}return i(s);case M:return u(s,c,(y=f._init)(f._payload),m)}if(ne(f))return function(n,o,i,u){for(var s=null,c=null,f=o,m=o=0,g=null;null!==f&&m<i.length;m++){f.index>m?(g=f,f=null):g=f.sibling;var y=p(n,f,i[m],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(n,f),o=a(y,o,m),null===c?s=y:c.sibling=y,c=y,f=g}if(m===i.length)return r(n,f),oo&&Gl(n,m),s;if(null===f){for(;m<i.length;m++)null!==(f=d(n,i[m],u))&&(o=a(f,o,m),null===c?s=f:c.sibling=f,c=f);return oo&&Gl(n,m),s}for(f=l(n,f);m<i.length;m++)null!==(g=h(f,n,m,i[m],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?m:g.key),o=a(g,o,m),null===c?s=g:c.sibling=g,c=g);return e&&f.forEach(function(e){return t(n,e)}),oo&&Gl(n,m),s}(s,c,f,m);if(O(f))return function(o,i,u,s){var c=O(u);if("function"!=typeof c)throw Error(n(150));if(null==(u=c.call(u)))throw Error(n(151));for(var f=c=null,m=i,g=i=0,y=null,v=u.next();null!==m&&!v.done;g++,v=u.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=p(o,m,v.value,s);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(o,m),i=a(b,i,g),null===f?c=b:f.sibling=b,f=b,m=y}if(v.done)return r(o,m),oo&&Gl(o,g),c;if(null===m){for(;!v.done;g++,v=u.next())null!==(v=d(o,v.value,s))&&(i=a(v,i,g),null===f?c=v:f.sibling=v,f=v);return oo&&Gl(o,g),c}for(m=l(o,m);!v.done;g++,v=u.next())null!==(v=h(m,o,g,v.value,s))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),i=a(v,i,g),null===f?c=v:f.sibling=v,f=v);return e&&m.forEach(function(e){return t(o,e)}),oo&&Gl(o,g),c}(s,c,f,m);bo(s,f)}return"string"==typeof f&&""!==f||"number"==typeof f?(f=""+f,null!==c&&6===c.tag?(r(s,c.sibling),(c=o(c,f)).return=s,s=c):(r(s,c),(c=Fs(f,s.mode,m)).return=s,s=c),i(s)):r(s,c)}}var wo=xo(!0),So=xo(!1),_o=Cl(null),Co=null,Eo=null,No=null;function Po(){No=Eo=Co=null}function Io(e){var t=_o.current;El(_o),e._currentValue=t}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Lo(e,t){Co=e,No=Eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ki=!0),e.firstContext=null)}function zo(e){var t=e._currentValue;if(No!==e)if(e={context:e,memoizedValue:t,next:null},null===Eo){if(null===Co)throw Error(n(308));Eo=e,Co.dependencies={lanes:0,firstContext:e}}else Eo=Eo.next=e;return t}var Mo=null;function Do(e){null===Mo?Mo=[e]:Mo.push(e)}function jo(e,t,n,r){var l=t.interleaved;return null===l?(n.next=n,Do(t)):(n.next=l.next,l.next=n),t.interleaved=n,Oo(e,r)}function Oo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ro=!1;function Fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ao(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 Bo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Uo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Iu){var l=r.pending;return null===l?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Oo(e,n)}return null===(l=r.interleaved)?(t.next=t,Do(r)):(t.next=l.next,l.next=t),r.interleaved=t,Oo(e,n)}function Ho(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Vo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var l=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?l=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?l=o=t:o=o.next=t}else l=o=t;return n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $o(e,t,n,r){var l=e.updateQueue;Ro=!1;var o=l.firstBaseUpdate,a=l.lastBaseUpdate,i=l.shared.pending;if(null!==i){l.shared.pending=null;var u=i,s=u.next;u.next=null,null===a?o=s:a.next=s,a=u;var c=e.alternate;null!==c&&((i=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===i?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=u))}if(null!==o){var f=l.baseState;for(a=0,c=s=u=null,i=o;;){var d=i.lane,p=i.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:p,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,m=i;switch(d=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){f=h.call(p,f,d);break e}f=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(d="function"==typeof(h=m.payload)?h.call(p,f,d):h))break e;f=F({},f,d);break e;case 2:Ro=!0}}null!==i.callback&&0!==i.lane&&(e.flags|=64,null===(d=l.effects)?l.effects=[i]:d.push(i))}else p={eventTime:p,lane:d,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===c?(s=c=p,u=f):c=c.next=p,a|=d;if(null===(i=i.next)){if(null===(i=l.shared.pending))break;i=(d=i).next,d.next=null,l.lastBaseUpdate=d,l.shared.pending=null}}if(null===c&&(u=f),l.baseState=u,l.firstBaseUpdate=s,l.lastBaseUpdate=c,null!==(t=l.shared.interleaved)){l=t;do{a|=l.lane,l=l.next}while(l!==t)}else null===o&&(l.shared.lanes=0);Ru|=a,e.lanes=a,e.memoizedState=f}}function Wo(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var l=e[t],o=l.callback;if(null!==o){if(l.callback=null,l=r,"function"!=typeof o)throw Error(n(191,o));o.call(l)}}}var qo={},Qo=Cl(qo),Ko=Cl(qo),Yo=Cl(qo);function Xo(e){if(e===qo)throw Error(n(174));return e}function Zo(e,t){switch(Nl(Yo,t),Nl(Ko,e),Nl(Qo,qo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}El(Qo),Nl(Qo,t)}function Jo(){El(Qo),El(Ko),El(Yo)}function Go(e){Xo(Yo.current);var t=Xo(Qo.current),n=se(t,e.type);t!==n&&(Nl(Ko,e),Nl(Qo,n))}function ea(e){Ko.current===e&&(El(Qo),El(Ko))}var ta=Cl(0);function na(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ra=[];function la(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var oa=k.ReactCurrentDispatcher,aa=k.ReactCurrentBatchConfig,ia=0,ua=null,sa=null,ca=null,fa=!1,da=!1,pa=0,ha=0;function ma(){throw Error(n(321))}function ga(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function ya(e,t,r,l,o,a){if(ia=a,ua=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oa.current=null===e||null===e.memoizedState?ei:ti,e=r(l,o),da){a=0;do{if(da=!1,pa=0,25<=a)throw Error(n(301));a+=1,ca=sa=null,t.updateQueue=null,oa.current=ni,e=r(l,o)}while(da)}if(oa.current=Ga,t=null!==sa&&null!==sa.next,ia=0,ca=sa=ua=null,fa=!1,t)throw Error(n(300));return e}function va(){var e=0!==pa;return pa=0,e}function ba(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?ua.memoizedState=ca=e:ca=ca.next=e,ca}function ka(){if(null===sa){var e=ua.alternate;e=null!==e?e.memoizedState:null}else e=sa.next;var t=null===ca?ua.memoizedState:ca.next;if(null!==t)ca=t,sa=e;else{if(null===e)throw Error(n(310));e={memoizedState:(sa=e).memoizedState,baseState:sa.baseState,baseQueue:sa.baseQueue,queue:sa.queue,next:null},null===ca?ua.memoizedState=ca=e:ca=ca.next=e}return ca}function xa(e,t){return"function"==typeof t?t(e):t}function wa(e){var t=ka(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var l=sa,o=l.baseQueue,a=r.pending;if(null!==a){if(null!==o){var i=o.next;o.next=a.next,a.next=i}l.baseQueue=o=a,r.pending=null}if(null!==o){a=o.next,l=l.baseState;var u=i=null,s=null,c=a;do{var f=c.lane;if((ia&f)===f)null!==s&&(s=s.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),l=c.hasEagerState?c.eagerState:e(l,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===s?(u=s=d,i=l):s=s.next=d,ua.lanes|=f,Ru|=f}c=c.next}while(null!==c&&c!==a);null===s?i=l:s.next=u,ur(l,t.memoizedState)||(ki=!0),t.memoizedState=l,t.baseState=i,t.baseQueue=s,r.lastRenderedState=l}if(null!==(e=r.interleaved)){o=e;do{a=o.lane,ua.lanes|=a,Ru|=a,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Sa(e){var t=ka(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var l=r.dispatch,o=r.pending,a=t.memoizedState;if(null!==o){r.pending=null;var i=o=o.next;do{a=e(a,i.action),i=i.next}while(i!==o);ur(a,t.memoizedState)||(ki=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,l]}function _a(){}function Ca(e,t){var r=ua,l=ka(),o=t(),a=!ur(l.memoizedState,o);if(a&&(l.memoizedState=o,ki=!0),l=l.queue,Ra(Pa.bind(null,r,l,e),[e]),l.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(r.flags|=2048,za(9,Na.bind(null,r,l,o,t),void 0,null),null===Tu)throw Error(n(349));30&ia||Ea(r,t,o)}return o}function Ea(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ua.updateQueue)?(t={lastEffect:null,stores:null},ua.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Na(e,t,n,r){t.value=n,t.getSnapshot=r,Ia(t)&&Ta(e)}function Pa(e,t,n){return n(function(){Ia(t)&&Ta(e)})}function Ia(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ur(e,n)}catch(r){return!0}}function Ta(e){var t=Oo(e,1);null!==t&&rs(t,e,1,-1)}function La(e){var t=ba();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,ua,e),[t.memoizedState,e]}function za(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ua.updateQueue)?(t={lastEffect:null,stores:null},ua.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ma(){return ka().memoizedState}function Da(e,t,n,r){var l=ba();ua.flags|=e,l.memoizedState=za(1|t,n,void 0,void 0===r?null:r)}function ja(e,t,n,r){var l=ka();r=void 0===r?null:r;var o=void 0;if(null!==sa){var a=sa.memoizedState;if(o=a.destroy,null!==r&&ga(r,a.deps))return void(l.memoizedState=za(t,n,o,r))}ua.flags|=e,l.memoizedState=za(1|t,n,o,r)}function Oa(e,t){return Da(8390656,8,e,t)}function Ra(e,t){return ja(2048,8,e,t)}function Fa(e,t){return ja(4,2,e,t)}function Aa(e,t){return ja(4,4,e,t)}function Ba(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ua(e,t,n){return n=null!=n?n.concat([e]):null,ja(4,4,Ba.bind(null,t,e),n)}function Ha(){}function Va(e,t){var n=ka();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $a(e,t){var n=ka();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wa(e,t,n){return 21&ia?(ur(n,t)||(n=gt(),ua.lanes|=n,Ru|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ki=!0),e.memoizedState=n)}function qa(e,t){var n=kt;kt=0!==n&&4>n?n:4,e(!0);var r=aa.transition;aa.transition={};try{e(!1),t()}finally{kt=n,aa.transition=r}}function Qa(){return ka().memoizedState}function Ka(e,t,n){var r=ns(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xa(e))Za(t,n);else if(null!==(n=jo(e,t,n,r))){rs(n,e,r,ts()),Ja(n,t,r)}}function Ya(e,t,n){var r=ns(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xa(e))Za(t,l);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,i=o(a,n);if(l.hasEagerState=!0,l.eagerState=i,ur(i,a)){var u=t.interleaved;return null===u?(l.next=l,Do(t)):(l.next=u.next,u.next=l),void(t.interleaved=l)}}catch(s){}null!==(n=jo(e,t,l,r))&&(rs(n,e,r,l=ts()),Ja(n,t,r))}}function Xa(e){var t=e.alternate;return e===ua||null!==t&&t===ua}function Za(e,t){da=fa=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ja(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Ga={readContext:zo,useCallback:ma,useContext:ma,useEffect:ma,useImperativeHandle:ma,useInsertionEffect:ma,useLayoutEffect:ma,useMemo:ma,useReducer:ma,useRef:ma,useState:ma,useDebugValue:ma,useDeferredValue:ma,useTransition:ma,useMutableSource:ma,useSyncExternalStore:ma,useId:ma,unstable_isNewReconciler:!1},ei={readContext:zo,useCallback:function(e,t){return ba().memoizedState=[e,void 0===t?null:t],e},useContext:zo,useEffect:Oa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Da(4194308,4,Ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Da(4194308,4,e,t)},useInsertionEffect:function(e,t){return Da(4,2,e,t)},useMemo:function(e,t){var n=ba();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ba();return t=void 0!==n?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=Ka.bind(null,ua,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ba().memoizedState=e},useState:La,useDebugValue:Ha,useDeferredValue:function(e){return ba().memoizedState=e},useTransition:function(){var e=La(!1),t=e[0];return e=qa.bind(null,e[1]),ba().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var l=ua,o=ba();if(oo){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Tu)throw Error(n(349));30&ia||Ea(l,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,Oa(Pa.bind(null,l,a,e),[e]),l.flags|=2048,za(9,Na.bind(null,l,a,r,t),void 0,null),r},useId:function(){var e=ba(),t=Tu.identifierPrefix;if(oo){var n=Jl;t=":"+t+"R"+(n=(Zl&~(1<<32-it(Zl)-1)).toString(32)+n),0<(n=pa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ha++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ti={readContext:zo,useCallback:Va,useContext:zo,useEffect:Ra,useImperativeHandle:Ua,useInsertionEffect:Fa,useLayoutEffect:Aa,useMemo:$a,useReducer:wa,useRef:Ma,useState:function(){return wa(xa)},useDebugValue:Ha,useDeferredValue:function(e){return Wa(ka(),sa.memoizedState,e)},useTransition:function(){return[wa(xa)[0],ka().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:Qa,unstable_isNewReconciler:!1},ni={readContext:zo,useCallback:Va,useContext:zo,useEffect:Ra,useImperativeHandle:Ua,useInsertionEffect:Fa,useLayoutEffect:Aa,useMemo:$a,useReducer:Sa,useRef:Ma,useState:function(){return Sa(xa)},useDebugValue:Ha,useDeferredValue:function(e){var t=ka();return null===sa?t.memoizedState=e:Wa(t,sa.memoizedState,e)},useTransition:function(){return[Sa(xa)[0],ka().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:Qa,unstable_isNewReconciler:!1};function ri(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function li(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var oi={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ts(),l=ns(e),o=Bo(r,l);o.payload=t,null!=n&&(o.callback=n),null!==(t=Uo(e,o,l))&&(rs(t,e,l,r),Ho(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ts(),l=ns(e),o=Bo(r,l);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Uo(e,o,l))&&(rs(t,e,l,r),Ho(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ts(),r=ns(e),l=Bo(n,r);l.tag=2,null!=t&&(l.callback=t),null!==(t=Uo(e,l,r))&&(rs(t,e,r,n),Ho(t,e,r))}};function ai(e,t,n,r,l,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!sr(n,r)||!sr(l,o))}function ii(e,t,n){var r=!1,l=Pl,o=t.contextType;return"object"==typeof o&&null!==o?o=zo(o):(l=Ml(t)?Ll:Il.current,o=(r=null!=(r=t.contextTypes))?zl(e,l):Pl),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=oi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function ui(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&oi.enqueueReplaceState(t,t.state,null)}function si(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Fo(e);var o=t.contextType;"object"==typeof o&&null!==o?l.context=zo(o):(o=Ml(t)?Ll:Il.current,l.context=zl(e,o)),l.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(li(e,t,o,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),t!==l.state&&oi.enqueueReplaceState(l,l.state,null),$o(e,n,l,r),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.flags|=4194308)}function ci(e,t){try{var n="",r=t;do{n+=H(r),r=r.return}while(r);var l=n}catch(o){l="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:l,digest:null}}function fi(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function di(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var pi="function"==typeof WeakMap?WeakMap:Map;function hi(e,t,n){(n=Bo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wu||(Wu=!0,qu=r),di(0,t)},n}function mi(e,t,n){(n=Bo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){di(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){di(0,t),"function"!=typeof r&&(null===Qu?Qu=new Set([this]):Qu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gi(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pi;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Es.bind(null,e,t,n),t.then(e,e))}function yi(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vi(e,t,n,r,l){return 1&e.mode?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bo(-1,1)).tag=2,Uo(n,t,1))),n.lanes|=1),e)}var bi=k.ReactCurrentOwner,ki=!1;function xi(e,t,n,r){t.child=null===e?So(t,null,n,r):wo(t,e.child,n,r)}function wi(e,t,n,r,l){n=n.render;var o=t.ref;return Lo(t,l),r=ya(e,t,n,r,o,l),n=va(),null===e||ki?(oo&&n&&to(t),t.flags|=1,xi(e,t,r,l),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Wi(e,t,l))}function Si(e,t,n,r,l){if(null===e){var o=n.type;return"function"!=typeof o||Ms(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=js(n.type,null,r,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,_i(e,t,o,r,l))}if(o=e.child,0===(e.lanes&l)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(a,r)&&e.ref===t.ref)return Wi(e,t,l)}return t.flags|=1,(e=Ds(o,r)).ref=t.ref,e.return=t,t.child=e}function _i(e,t,n,r,l){if(null!==e){var o=e.memoizedProps;if(sr(o,r)&&e.ref===t.ref){if(ki=!1,t.pendingProps=r=o,0===(e.lanes&l))return t.lanes=e.lanes,Wi(e,t,l);131072&e.flags&&(ki=!0)}}return Ni(e,t,n,r,l)}function Ci(e,t,n){var r=t.pendingProps,l=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Nl(Du,Mu),Mu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Nl(Du,Mu),Mu|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Nl(Du,Mu),Mu|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Nl(Du,Mu),Mu|=r;return xi(e,t,l,n),t.child}function Ei(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ni(e,t,n,r,l){var o=Ml(n)?Ll:Il.current;return o=zl(t,o),Lo(t,l),n=ya(e,t,n,r,o,l),r=va(),null===e||ki?(oo&&r&&to(t),t.flags|=1,xi(e,t,n,l),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Wi(e,t,l))}function Pi(e,t,n,r,l){if(Ml(n)){var o=!0;Rl(t)}else o=!1;if(Lo(t,l),null===t.stateNode)$i(e,t),ii(t,n,r),si(t,n,r,l),r=!0;else if(null===e){var a=t.stateNode,i=t.memoizedProps;a.props=i;var u=a.context,s=n.contextType;"object"==typeof s&&null!==s?s=zo(s):s=zl(t,s=Ml(n)?Ll:Il.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(i!==r||u!==s)&&ui(t,a,r,s),Ro=!1;var d=t.memoizedState;a.state=d,$o(t,r,a,l),u=t.memoizedState,i!==r||d!==u||Tl.current||Ro?("function"==typeof c&&(li(t,n,c,r),u=t.memoizedState),(i=Ro||ai(t,n,i,r,d,u,s))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=s,r=i):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ao(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:ri(t.type,i),a.props=s,f=t.pendingProps,d=a.context,"object"==typeof(u=n.contextType)&&null!==u?u=zo(u):u=zl(t,u=Ml(n)?Ll:Il.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(i!==f||d!==u)&&ui(t,a,r,u),Ro=!1,d=t.memoizedState,a.state=d,$o(t,r,a,l);var h=t.memoizedState;i!==f||d!==h||Tl.current||Ro?("function"==typeof p&&(li(t,n,p,r),h=t.memoizedState),(s=Ro||ai(t,n,s,r,d,h,u)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,u)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=u,r=s):("function"!=typeof a.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Ii(e,t,n,r,o,l)}function Ii(e,t,n,r,l,o){Ei(e,t);var a=!!(128&t.flags);if(!r&&!a)return l&&Fl(t,n,!1),Wi(e,t,o);r=t.stateNode,bi.current=t;var i=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=wo(t,e.child,null,o),t.child=wo(t,null,i,o)):xi(e,t,i,o),t.memoizedState=r.state,l&&Fl(t,n,!0),t.child}function Ti(e){var t=e.stateNode;t.pendingContext?jl(0,t.pendingContext,t.pendingContext!==t.context):t.context&&jl(0,t.context,!1),Zo(e,t.containerInfo)}function Li(e,t,n,r,l){return mo(),go(l),t.flags|=256,xi(e,t,n,r),t.child}var zi,Mi,Di,ji,Oi={dehydrated:null,treeContext:null,retryLane:0};function Ri(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fi(e,t,r){var l,o=t.pendingProps,a=ta.current,i=!1,u=!!(128&t.flags);if((l=u)||(l=(null===e||null!==e.memoizedState)&&!!(2&a)),l?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Nl(ta,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(u=o.children,e=o.fallback,i?(o=t.mode,i=t.child,u={mode:"hidden",children:u},1&o||null===i?i=Rs(u,o,0,null):(i.childLanes=0,i.pendingProps=u),e=Os(e,o,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ri(r),t.memoizedState=Oi,e):Ai(t,u));if(null!==(a=e.memoizedState)&&null!==(l=a.dehydrated))return function(e,t,r,l,o,a,i){if(r)return 256&t.flags?(t.flags&=-257,Bi(e,t,i,l=fi(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=l.fallback,o=t.mode,l=Rs({mode:"visible",children:l.children},o,0,null),(a=Os(a,o,i,null)).flags|=2,l.return=t,a.return=t,l.sibling=a,t.child=l,1&t.mode&&wo(t,e.child,null,i),t.child.memoizedState=Ri(i),t.memoizedState=Oi,a);if(!(1&t.mode))return Bi(e,t,i,null);if("$!"===o.data){if(l=o.nextSibling&&o.nextSibling.dataset)var u=l.dgst;return l=u,Bi(e,t,i,l=fi(a=Error(n(419)),l,void 0))}if(u=0!==(i&e.childLanes),ki||u){if(null!==(l=Tu)){switch(i&-i){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(l.suspendedLanes|i))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Oo(e,o),rs(l,e,o,-1))}return gs(),Bi(e,t,i,l=fi(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Ps.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,lo=cl(o.nextSibling),ro=t,oo=!0,ao=null,null!==e&&(Kl[Yl++]=Zl,Kl[Yl++]=Jl,Kl[Yl++]=Xl,Zl=e.id,Jl=e.overflow,Xl=t),t=Ai(t,l.children),t.flags|=4096,t)}(e,t,u,o,l,a,r);if(i){i=o.fallback,u=t.mode,l=(a=e.child).sibling;var s={mode:"hidden",children:o.children};return 1&u||t.child===a?(o=Ds(a,s)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=s,t.deletions=null),null!==l?i=Ds(l,i):(i=Os(i,u,r,null)).flags|=2,i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,u=null===(u=e.child.memoizedState)?Ri(r):{baseLanes:u.baseLanes|r,cachePool:null,transitions:u.transitions},i.memoizedState=u,i.childLanes=e.childLanes&~r,t.memoizedState=Oi,o}return e=(i=e.child).sibling,o=Ds(i,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Ai(e,t){return(t=Rs({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bi(e,t,n,r){return null!==r&&go(r),wo(t,e.child,null,n),(e=Ai(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ui(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function Hi(e,t,n,r,l){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function Vi(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(xi(e,t,r.children,n),2&(r=ta.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ui(e,n,t);else if(19===e.tag)Ui(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Nl(ta,r),1&t.mode)switch(l){case"forwards":for(n=t.child,l=null;null!==n;)null!==(e=n.alternate)&&null===na(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Hi(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===na(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Hi(t,!0,n,null,o);break;case"together":Hi(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function $i(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wi(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Ru|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=Ds(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Ds(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function qi(e,t){if(!oo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qi(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=14680064&l.subtreeFlags,r|=14680064&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ki(e,t,r){var o=t.pendingProps;switch(no(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qi(t),null;case 1:case 17:return Ml(t.type)&&Dl(),Qi(t),null;case 3:return o=t.stateNode,Jo(),El(Tl),El(Il),la(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(po(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ao&&(is(ao),ao=null))),Mi(e,t),Qi(t),null;case 5:ea(t);var a=Xo(Yo.current);if(r=t.type,null!==e&&null!=t.stateNode)Di(e,t,r,o,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Qi(t),null}if(e=Xo(Qo.current),po(t)){o=t.stateNode,r=t.type;var i=t.memoizedProps;switch(o[pl]=t,o[hl]=i,e=!!(1&t.mode),r){case"dialog":Br("cancel",o),Br("close",o);break;case"iframe":case"object":case"embed":Br("load",o);break;case"video":case"audio":for(a=0;a<Or.length;a++)Br(Or[a],o);break;case"source":Br("error",o);break;case"img":case"image":case"link":Br("error",o),Br("load",o);break;case"details":Br("toggle",o);break;case"input":Z(o,i),Br("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!i.multiple},Br("invalid",o);break;case"textarea":oe(o,i),Br("invalid",o)}for(var u in be(r,i),a=null,i)if(i.hasOwnProperty(u)){var s=i[u];"children"===u?"string"==typeof s?o.textContent!==s&&(!0!==i.suppressHydrationWarning&&Gr(o.textContent,s,e),a=["children",s]):"number"==typeof s&&o.textContent!==""+s&&(!0!==i.suppressHydrationWarning&&Gr(o.textContent,s,e),a=["children",""+s]):l.hasOwnProperty(u)&&null!=s&&"onScroll"===u&&Br("scroll",o)}switch(r){case"input":Q(o),ee(o,i,!0);break;case"textarea":Q(o),ie(o);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(o.onclick=el)}o=a,t.updateQueue=o,null!==o&&(t.flags|=4)}else{u=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ue(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=u.createElement(r,{is:o.is}):(e=u.createElement(r),"select"===r&&(u=e,o.multiple?u.multiple=!0:o.size&&(u.size=o.size))):e=u.createElementNS(e,r),e[pl]=t,e[hl]=o,zi(e,t,!1,!1),t.stateNode=e;e:{switch(u=ke(r,o),r){case"dialog":Br("cancel",e),Br("close",e),a=o;break;case"iframe":case"object":case"embed":Br("load",e),a=o;break;case"video":case"audio":for(a=0;a<Or.length;a++)Br(Or[a],e);a=o;break;case"source":Br("error",e),a=o;break;case"img":case"image":case"link":Br("error",e),Br("load",e),a=o;break;case"details":Br("toggle",e),a=o;break;case"input":Z(e,o),a=X(e,o),Br("invalid",e);break;case"option":default:a=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},a=F({},o,{value:void 0}),Br("invalid",e);break;case"textarea":oe(e,o),a=le(e,o),Br("invalid",e)}for(i in be(r,a),s=a)if(s.hasOwnProperty(i)){var c=s[i];"style"===i?ye(e,c):"dangerouslySetInnerHTML"===i?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===i?"string"==typeof c?("textarea"!==r||""!==c)&&pe(e,c):"number"==typeof c&&pe(e,""+c):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(l.hasOwnProperty(i)?null!=c&&"onScroll"===i&&Br("scroll",e):null!=c&&v(e,i,c,u))}switch(r){case"input":Q(e),ee(e,o,!1);break;case"textarea":Q(e),ie(e);break;case"option":null!=o.value&&e.setAttribute("value",""+W(o.value));break;case"select":e.multiple=!!o.multiple,null!=(i=o.value)?re(e,!!o.multiple,i,!1):null!=o.defaultValue&&re(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=el)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Qi(t),null;case 6:if(e&&null!=t.stateNode)ji(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=Xo(Yo.current),Xo(Qo.current),po(t)){if(o=t.stateNode,r=t.memoizedProps,o[pl]=t,(i=o.nodeValue!==r)&&null!==(e=ro))switch(e.tag){case 3:Gr(o.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Gr(o.nodeValue,r,!!(1&e.mode))}i&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[pl]=t,t.stateNode=o}return Qi(t),null;case 13:if(El(ta),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(oo&&null!==lo&&1&t.mode&&!(128&t.flags))ho(),mo(),t.flags|=98560,i=!1;else if(i=po(t),null!==o&&null!==o.dehydrated){if(null===e){if(!i)throw Error(n(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(n(317));i[pl]=t}else mo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Qi(t),i=!1}else null!==ao&&(is(ao),ao=null),i=!0;if(!i)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((o=null!==o)!==(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ta.current?0===ju&&(ju=3):gs())),null!==t.updateQueue&&(t.flags|=4),Qi(t),null);case 4:return Jo(),Mi(e,t),null===e&&Vr(t.stateNode.containerInfo),Qi(t),null;case 10:return Io(t.type._context),Qi(t),null;case 19:if(El(ta),null===(i=t.memoizedState))return Qi(t),null;if(o=!!(128&t.flags),null===(u=i.rendering))if(o)qi(i,!1);else{if(0!==ju||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(u=na(e))){for(t.flags|=128,qi(i,!1),null!==(o=u.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(i=r).flags&=14680066,null===(u=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,e=u.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Nl(ta,1&ta.current|2),t.child}e=e.sibling}null!==i.tail&&Je()>Vu&&(t.flags|=128,o=!0,qi(i,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=na(u))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),qi(i,!0),null===i.tail&&"hidden"===i.tailMode&&!u.alternate&&!oo)return Qi(t),null}else 2*Je()-i.renderingStartTime>Vu&&1073741824!==r&&(t.flags|=128,o=!0,qi(i,!1),t.lanes=4194304);i.isBackwards?(u.sibling=t.child,t.child=u):(null!==(r=i.last)?r.sibling=u:t.child=u,i.last=u)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Je(),t.sibling=null,r=ta.current,Nl(ta,o?1&r|2:1&r),t):(Qi(t),null);case 22:case 23:return ds(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&1&t.mode?!!(1073741824&Mu)&&(Qi(t),6&t.subtreeFlags&&(t.flags|=8192)):Qi(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Yi(e,t){switch(no(t),t.tag){case 1:return Ml(t.type)&&Dl(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),El(Tl),El(Il),la(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ea(t),null;case 13:if(El(ta),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));mo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return El(ta),null;case 4:return Jo(),null;case 10:return Io(t.type._context),null;case 22:case 23:return ds(),null;default:return null}}zi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Mi=function(){},Di=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Xo(Qo.current);var a,i=null;switch(n){case"input":o=X(e,o),r=X(e,r),i=[];break;case"select":o=F({},o,{value:void 0}),r=F({},r,{value:void 0}),i=[];break;case"textarea":o=le(e,o),r=le(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=el)}for(c in be(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var u=o[c];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(l.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var s=r[c];if(u=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&s!==u&&(null!=s||null!=u))if("style"===c)if(u){for(a in u)!u.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&u[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(c,n)),n=s;else"dangerouslySetInnerHTML"===c?(s=s?s.__html:void 0,u=u?u.__html:void 0,null!=s&&u!==s&&(i=i||[]).push(c,s)):"children"===c?"string"!=typeof s&&"number"!=typeof s||(i=i||[]).push(c,""+s):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(l.hasOwnProperty(c)?(null!=s&&"onScroll"===c&&Br("scroll",e),i||u===s||(i=[])):(i=i||[]).push(c,s))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}},ji=function(e,t,n,r){n!==r&&(t.flags|=4)};var Xi=!1,Zi=!1,Ji="function"==typeof WeakSet?WeakSet:Set,Gi=null;function eu(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Cs(e,t,r)}else n.current=null}function tu(e,t,n){try{n()}catch(r){Cs(e,t,r)}}var nu=!1;function ru(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,void 0!==o&&tu(t,n,o)}l=l.next}while(l!==r)}}function lu(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 ou(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function au(e){var t=e.alternate;null!==t&&(e.alternate=null,au(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[pl],delete t[hl],delete t[gl],delete t[yl],delete t[vl])),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 iu(e){return 5===e.tag||3===e.tag||4===e.tag}function uu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||iu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function su(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=el));else if(4!==r&&null!==(e=e.child))for(su(e,t,n),e=e.sibling;null!==e;)su(e,t,n),e=e.sibling}function cu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cu(e,t,n),e=e.sibling;null!==e;)cu(e,t,n),e=e.sibling}var fu=null,du=!1;function pu(e,t,n){for(n=n.child;null!==n;)hu(e,t,n),n=n.sibling}function hu(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(ot,n)}catch(i){}switch(n.tag){case 5:Zi||eu(n,t);case 6:var r=fu,l=du;fu=null,pu(e,t,n),du=l,null!==(fu=r)&&(du?(e=fu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):fu.removeChild(n.stateNode));break;case 18:null!==fu&&(du?(e=fu,n=n.stateNode,8===e.nodeType?sl(e.parentNode,n):1===e.nodeType&&sl(e,n),Vt(e)):sl(fu,n.stateNode));break;case 4:r=fu,l=du,fu=n.stateNode.containerInfo,du=!0,pu(e,t,n),fu=r,du=l;break;case 0:case 11:case 14:case 15:if(!Zi&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){l=r=r.next;do{var o=l,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&tu(n,t,a),l=l.next}while(l!==r)}pu(e,t,n);break;case 1:if(!Zi&&(eu(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(i){Cs(n,t,i)}pu(e,t,n);break;case 21:pu(e,t,n);break;case 22:1&n.mode?(Zi=(r=Zi)||null!==n.memoizedState,pu(e,t,n),Zi=r):pu(e,t,n);break;default:pu(e,t,n)}}function mu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ji),t.forEach(function(t){var r=Is.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function gu(e,t){var r=t.deletions;if(null!==r)for(var l=0;l<r.length;l++){var o=r[l];try{var a=e,i=t,u=i;e:for(;null!==u;){switch(u.tag){case 5:fu=u.stateNode,du=!1;break e;case 3:case 4:fu=u.stateNode.containerInfo,du=!0;break e}u=u.return}if(null===fu)throw Error(n(160));hu(a,i,o),fu=null,du=!1;var s=o.alternate;null!==s&&(s.return=null),o.return=null}catch(c){Cs(o,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)yu(t,e),t=t.sibling}function yu(e,t){var r=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gu(t,e),vu(e),4&l){try{ru(3,e,e.return),lu(3,e)}catch(g){Cs(e,e.return,g)}try{ru(5,e,e.return)}catch(g){Cs(e,e.return,g)}}break;case 1:gu(t,e),vu(e),512&l&&null!==r&&eu(r,r.return);break;case 5:if(gu(t,e),vu(e),512&l&&null!==r&&eu(r,r.return),32&e.flags){var o=e.stateNode;try{pe(o,"")}catch(g){Cs(e,e.return,g)}}if(4&l&&null!=(o=e.stateNode)){var a=e.memoizedProps,i=null!==r?r.memoizedProps:a,u=e.type,s=e.updateQueue;if(e.updateQueue=null,null!==s)try{"input"===u&&"radio"===a.type&&null!=a.name&&J(o,a),ke(u,i);var c=ke(u,a);for(i=0;i<s.length;i+=2){var f=s[i],d=s[i+1];"style"===f?ye(o,d):"dangerouslySetInnerHTML"===f?de(o,d):"children"===f?pe(o,d):v(o,f,d,c)}switch(u){case"input":G(o,a);break;case"textarea":ae(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var h=a.value;null!=h?re(o,!!a.multiple,h,!1):p!==!!a.multiple&&(null!=a.defaultValue?re(o,!!a.multiple,a.defaultValue,!0):re(o,!!a.multiple,a.multiple?[]:"",!1))}o[hl]=a}catch(g){Cs(e,e.return,g)}}break;case 6:if(gu(t,e),vu(e),4&l){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(g){Cs(e,e.return,g)}}break;case 3:if(gu(t,e),vu(e),4&l&&null!==r&&r.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(g){Cs(e,e.return,g)}break;case 4:default:gu(t,e),vu(e);break;case 13:gu(t,e),vu(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Hu=Je())),4&l&&mu(e);break;case 22:if(f=null!==r&&null!==r.memoizedState,1&e.mode?(Zi=(c=Zi)||f,gu(t,e),Zi=c):gu(t,e),vu(e),8192&l){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!f&&1&e.mode)for(Gi=e,f=e.child;null!==f;){for(d=Gi=f;null!==Gi;){switch(h=(p=Gi).child,p.tag){case 0:case 11:case 14:case 15:ru(4,p,p.return);break;case 1:eu(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){l=p,r=p.return;try{t=l,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Cs(l,r,g)}}break;case 5:eu(p,p.return);break;case 22:if(null!==p.memoizedState){wu(d);continue}}null!==h?(h.return=p,Gi=h):wu(d)}f=f.sibling}e:for(f=null,d=e;;){if(5===d.tag){if(null===f){f=d;try{o=d.stateNode,c?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(u=d.stateNode,i=null!=(s=d.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null,u.style.display=ge("display",i))}catch(g){Cs(e,e.return,g)}}}else if(6===d.tag){if(null===f)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Cs(e,e.return,g)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gu(t,e),vu(e),4&l&&mu(e);case 21:}}function vu(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(iu(r)){var l=r;break e}r=r.return}throw Error(n(160))}switch(l.tag){case 5:var o=l.stateNode;32&l.flags&&(pe(o,""),l.flags&=-33),cu(e,uu(e),o);break;case 3:case 4:var a=l.stateNode.containerInfo;su(e,uu(e),a);break;default:throw Error(n(161))}}catch(i){Cs(e,e.return,i)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bu(e,t,n){Gi=e,ku(e)}function ku(e,t,n){for(var r=!!(1&e.mode);null!==Gi;){var l=Gi,o=l.child;if(22===l.tag&&r){var a=null!==l.memoizedState||Xi;if(!a){var i=l.alternate,u=null!==i&&null!==i.memoizedState||Zi;i=Xi;var s=Zi;if(Xi=a,(Zi=u)&&!s)for(Gi=l;null!==Gi;)u=(a=Gi).child,22===a.tag&&null!==a.memoizedState?Su(l):null!==u?(u.return=a,Gi=u):Su(l);for(;null!==o;)Gi=o,ku(o),o=o.sibling;Gi=l,Xi=i,Zi=s}xu(e)}else 8772&l.subtreeFlags&&null!==o?(o.return=l,Gi=o):xu(e)}}function xu(e){for(;null!==Gi;){var t=Gi;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Zi||lu(5,t);break;case 1:var l=t.stateNode;if(4&t.flags&&!Zi)if(null===r)l.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:ri(t.type,r.memoizedProps);l.componentDidUpdate(o,r.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Wo(t,a,l);break;case 3:var i=t.updateQueue;if(null!==i){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Wo(t,i,r)}break;case 5:var u=t.stateNode;if(null===r&&4&t.flags){r=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break;case"img":s.src&&(r.src=s.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var d=f.dehydrated;null!==d&&Vt(d)}}}break;default:throw Error(n(163))}Zi||512&t.flags&&ou(t)}catch(p){Cs(t,t.return,p)}}if(t===e){Gi=null;break}if(null!==(r=t.sibling)){r.return=t.return,Gi=r;break}Gi=t.return}}function wu(e){for(;null!==Gi;){var t=Gi;if(t===e){Gi=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Gi=n;break}Gi=t.return}}function Su(e){for(;null!==Gi;){var t=Gi;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{lu(4,t)}catch(u){Cs(t,n,u)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var l=t.return;try{r.componentDidMount()}catch(u){Cs(t,l,u)}}var o=t.return;try{ou(t)}catch(u){Cs(t,o,u)}break;case 5:var a=t.return;try{ou(t)}catch(u){Cs(t,a,u)}}}catch(u){Cs(t,t.return,u)}if(t===e){Gi=null;break}var i=t.sibling;if(null!==i){i.return=t.return,Gi=i;break}Gi=t.return}}var _u,Cu=Math.ceil,Eu=k.ReactCurrentDispatcher,Nu=k.ReactCurrentOwner,Pu=k.ReactCurrentBatchConfig,Iu=0,Tu=null,Lu=null,zu=0,Mu=0,Du=Cl(0),ju=0,Ou=null,Ru=0,Fu=0,Au=0,Bu=null,Uu=null,Hu=0,Vu=1/0,$u=null,Wu=!1,qu=null,Qu=null,Ku=!1,Yu=null,Xu=0,Zu=0,Ju=null,Gu=-1,es=0;function ts(){return 6&Iu?Je():-1!==Gu?Gu:Gu=Je()}function ns(e){return 1&e.mode?2&Iu&&0!==zu?zu&-zu:null!==yo.transition?(0===es&&(es=gt()),es):0!==(e=kt)?e:e=void 0===(e=window.event)?16:Zt(e.type):1}function rs(e,t,r,l){if(50<Zu)throw Zu=0,Ju=null,Error(n(185));vt(e,r,l),2&Iu&&e===Tu||(e===Tu&&(!(2&Iu)&&(Fu|=r),4===ju&&us(e,zu)),ls(e,l),1===r&&0===Iu&&!(1&t.mode)&&(Vu=Je()+500,Bl&&Vl()))}function ls(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-it(o),i=1<<a,u=l[a];-1===u?0!==(i&n)&&0===(i&r)||(l[a]=ht(i,t)):u<=t&&(e.expiredLanes|=i),o&=~i}}(e,t);var r=pt(e,e===Tu?zu:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Bl=!0,Hl(e)}(ss.bind(null,e)):Hl(ss.bind(null,e)),il(function(){!(6&Iu)&&Vl()}),n=null;else{switch(xt(r)){case 1:n=et;break;case 4:n=tt;break;case 16:default:n=nt;break;case 536870912:n=lt}n=Ts(n,os.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function os(e,t){if(Gu=-1,es=0,6&Iu)throw Error(n(327));var r=e.callbackNode;if(Ss()&&e.callbackNode!==r)return null;var l=pt(e,e===Tu?zu:0);if(0===l)return null;if(30&l||0!==(l&e.expiredLanes)||t)t=ys(e,l);else{t=l;var o=Iu;Iu|=2;var a=ms();for(Tu===e&&zu===t||($u=null,Vu=Je()+500,ps(e,t));;)try{bs();break}catch(u){hs(e,u)}Po(),Eu.current=a,Iu=o,null!==Lu?t=0:(Tu=null,zu=0,t=ju)}if(0!==t){if(2===t&&(0!==(o=mt(e))&&(l=o,t=as(e,o))),1===t)throw r=Ou,ps(e,0),us(e,l),ls(e,Je()),r;if(6===t)us(e,l);else{if(o=e.current.alternate,!(30&l||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var l=n[r],o=l.getSnapshot;l=l.value;try{if(!ur(o(),l))return!1}catch(i){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=ys(e,l),2===t&&(a=mt(e),0!==a&&(l=a,t=as(e,a))),1!==t)))throw r=Ou,ps(e,0),us(e,l),ls(e,Je()),r;switch(e.finishedWork=o,e.finishedLanes=l,t){case 0:case 1:throw Error(n(345));case 2:case 5:ws(e,Uu,$u);break;case 3:if(us(e,l),(130023424&l)===l&&10<(t=Hu+500-Je())){if(0!==pt(e,0))break;if(((o=e.suspendedLanes)&l)!==l){ts(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ll(ws.bind(null,e,Uu,$u),t);break}ws(e,Uu,$u);break;case 4:if(us(e,l),(4194240&l)===l)break;for(t=e.eventTimes,o=-1;0<l;){var i=31-it(l);a=1<<i,(i=t[i])>o&&(o=i),l&=~a}if(l=o,10<(l=(120>(l=Je()-l)?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Cu(l/1960))-l)){e.timeoutHandle=ll(ws.bind(null,e,Uu,$u),l);break}ws(e,Uu,$u);break;default:throw Error(n(329))}}}return ls(e,Je()),e.callbackNode===r?os.bind(null,e):null}function as(e,t){var n=Bu;return e.current.memoizedState.isDehydrated&&(ps(e,t).flags|=256),2!==(e=ys(e,t))&&(t=Uu,Uu=n,null!==t&&is(t)),e}function is(e){null===Uu?Uu=e:Uu.push.apply(Uu,e)}function us(e,t){for(t&=~Au,t&=~Fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function ss(e){if(6&Iu)throw Error(n(327));Ss();var t=pt(e,0);if(!(1&t))return ls(e,Je()),null;var r=ys(e,t);if(0!==e.tag&&2===r){var l=mt(e);0!==l&&(t=l,r=as(e,l))}if(1===r)throw r=Ou,ps(e,0),us(e,t),ls(e,Je()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ws(e,Uu,$u),ls(e,Je()),null}function cs(e,t){var n=Iu;Iu|=1;try{return e(t)}finally{0===(Iu=n)&&(Vu=Je()+500,Bl&&Vl())}}function fs(e){null!==Yu&&0===Yu.tag&&!(6&Iu)&&Ss();var t=Iu;Iu|=1;var n=Pu.transition,r=kt;try{if(Pu.transition=null,kt=1,e)return e()}finally{kt=r,Pu.transition=n,!(6&(Iu=t))&&Vl()}}function ds(){Mu=Du.current,El(Du)}function ps(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ol(n)),null!==Lu)for(n=Lu.return;null!==n;){var r=n;switch(no(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Dl();break;case 3:Jo(),El(Tl),El(Il),la();break;case 5:ea(r);break;case 4:Jo();break;case 13:case 19:El(ta);break;case 10:Io(r.type._context);break;case 22:case 23:ds()}n=n.return}if(Tu=e,Lu=e=Ds(e.current,null),zu=Mu=t,ju=0,Ou=null,Au=Fu=Ru=0,Uu=Bu=null,null!==Mo){for(t=0;t<Mo.length;t++)if(null!==(r=(n=Mo[t]).interleaved)){n.interleaved=null;var l=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=l,r.next=a}n.pending=r}Mo=null}return e}function hs(e,t){for(;;){var r=Lu;try{if(Po(),oa.current=Ga,fa){for(var l=ua.memoizedState;null!==l;){var o=l.queue;null!==o&&(o.pending=null),l=l.next}fa=!1}if(ia=0,ca=sa=ua=null,da=!1,pa=0,Nu.current=null,null===r||null===r.return){ju=1,Ou=t,Lu=null;break}e:{var a=e,i=r.return,u=r,s=t;if(t=zu,u.flags|=32768,null!==s&&"object"==typeof s&&"function"==typeof s.then){var c=s,f=u,d=f.tag;if(!(1&f.mode||0!==d&&11!==d&&15!==d)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=yi(i);if(null!==h){h.flags&=-257,vi(h,i,u,0,t),1&h.mode&&gi(a,c,t),s=c;var m=(t=h).updateQueue;if(null===m){var g=new Set;g.add(s),t.updateQueue=g}else m.add(s);break e}if(!(1&t)){gi(a,c,t),gs();break e}s=Error(n(426))}else if(oo&&1&u.mode){var y=yi(i);if(null!==y){!(65536&y.flags)&&(y.flags|=256),vi(y,i,u,0,t),go(ci(s,u));break e}}a=s=ci(s,u),4!==ju&&(ju=2),null===Bu?Bu=[a]:Bu.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Vo(a,hi(0,s,t));break e;case 1:u=s;var v=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Qu&&Qu.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Vo(a,mi(a,u,t));break e}}a=a.return}while(null!==a)}xs(r)}catch(k){t=k,Lu===r&&null!==r&&(Lu=r=r.return);continue}break}}function ms(){var e=Eu.current;return Eu.current=Ga,null===e?Ga:e}function gs(){0!==ju&&3!==ju&&2!==ju||(ju=4),null===Tu||!(268435455&Ru)&&!(268435455&Fu)||us(Tu,zu)}function ys(e,t){var r=Iu;Iu|=2;var l=ms();for(Tu===e&&zu===t||($u=null,ps(e,t));;)try{vs();break}catch(o){hs(e,o)}if(Po(),Iu=r,Eu.current=l,null!==Lu)throw Error(n(261));return Tu=null,zu=0,ju}function vs(){for(;null!==Lu;)ks(Lu)}function bs(){for(;null!==Lu&&!Xe();)ks(Lu)}function ks(e){var t=_u(e.alternate,e,Mu);e.memoizedProps=e.pendingProps,null===t?xs(e):Lu=t,Nu.current=null}function xs(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Yi(n,t)))return n.flags&=32767,void(Lu=n);if(null===e)return ju=6,void(Lu=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ki(n,t,Mu)))return void(Lu=n);if(null!==(t=t.sibling))return void(Lu=t);Lu=t=e}while(null!==t);0===ju&&(ju=5)}function ws(e,t,r){var l=kt,o=Pu.transition;try{Pu.transition=null,kt=1,function(e,t,r,l){do{Ss()}while(null!==Yu);if(6&Iu)throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(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 l=31-it(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}(e,a),e===Tu&&(Lu=Tu=null,zu=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Ku||(Ku=!0,Ts(nt,function(){return Ss(),null})),a=!!(15990&r.flags),!!(15990&r.subtreeFlags)||a){a=Pu.transition,Pu.transition=null;var i=kt;kt=1;var u=Iu;Iu|=4,Nu.current=null,function(e,t){if(tl=Wt,hr(e=pr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var l=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(l&&0!==l.rangeCount){r=l.anchorNode;var o=l.anchorOffset,a=l.focusNode;l=l.focusOffset;try{r.nodeType,a.nodeType}catch(x){r=null;break e}var i=0,u=-1,s=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var h;d!==r||0!==o&&3!==d.nodeType||(u=i+o),d!==a||0!==l&&3!==d.nodeType||(s=i+l),3===d.nodeType&&(i+=d.nodeValue.length),null!==(h=d.firstChild);)p=d,d=h;for(;;){if(d===e)break t;if(p===r&&++c===o&&(u=i),p===a&&++f===l&&(s=i),null!==(h=d.nextSibling))break;p=(d=p).parentNode}d=h}r=-1===u||-1===s?null:{start:u,end:s}}else r=null}r=r||{start:0,end:0}}else r=null;for(nl={focusedElem:e,selectionRange:r},Wt=!1,Gi=t;null!==Gi;)if(e=(t=Gi).child,1028&t.subtreeFlags&&null!==e)e.return=t,Gi=e;else for(;null!==Gi;){t=Gi;try{var m=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,y=m.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:ri(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var k=t.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(n(163))}}catch(x){Cs(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Gi=e;break}Gi=t.return}m=nu,nu=!1}(e,r),yu(r,e),mr(nl),Wt=!!tl,nl=tl=null,e.current=r,bu(r),Ze(),Iu=u,kt=i,Pu.transition=a}else e.current=r;if(Ku&&(Ku=!1,Yu=e,Xu=o),a=e.pendingLanes,0===a&&(Qu=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(ot,e,void 0,!(128&~e.current.flags))}catch(t){}}(r.stateNode),ls(e,Je()),null!==t)for(l=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],l(o.value,{componentStack:o.stack,digest:o.digest});if(Wu)throw Wu=!1,e=qu,qu=null,e;!!(1&Xu)&&0!==e.tag&&Ss(),a=e.pendingLanes,1&a?e===Ju?Zu++:(Zu=0,Ju=e):Zu=0,Vl()}(e,t,r,l)}finally{Pu.transition=o,kt=l}return null}function Ss(){if(null!==Yu){var e=xt(Xu),t=Pu.transition,r=kt;try{if(Pu.transition=null,kt=16>e?16:e,null===Yu)var l=!1;else{if(e=Yu,Yu=null,Xu=0,6&Iu)throw Error(n(331));var o=Iu;for(Iu|=4,Gi=e.current;null!==Gi;){var a=Gi,i=a.child;if(16&Gi.flags){var u=a.deletions;if(null!==u){for(var s=0;s<u.length;s++){var c=u[s];for(Gi=c;null!==Gi;){var f=Gi;switch(f.tag){case 0:case 11:case 15:ru(8,f,a)}var d=f.child;if(null!==d)d.return=f,Gi=d;else for(;null!==Gi;){var p=(f=Gi).sibling,h=f.return;if(au(f),f===c){Gi=null;break}if(null!==p){p.return=h,Gi=p;break}Gi=h}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Gi=a}}if(2064&a.subtreeFlags&&null!==i)i.return=a,Gi=i;else e:for(;null!==Gi;){if(2048&(a=Gi).flags)switch(a.tag){case 0:case 11:case 15:ru(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,Gi=v;break e}Gi=a.return}}var b=e.current;for(Gi=b;null!==Gi;){var k=(i=Gi).child;if(2064&i.subtreeFlags&&null!==k)k.return=i,Gi=k;else e:for(i=b;null!==Gi;){if(2048&(u=Gi).flags)try{switch(u.tag){case 0:case 11:case 15:lu(9,u)}}catch(w){Cs(u,u.return,w)}if(u===i){Gi=null;break e}var x=u.sibling;if(null!==x){x.return=u.return,Gi=x;break e}Gi=u.return}}if(Iu=o,Vl(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(ot,e)}catch(w){}l=!0}return l}finally{kt=r,Pu.transition=t}}return!1}function _s(e,t,n){e=Uo(e,t=hi(0,t=ci(n,t),1),1),t=ts(),null!==e&&(vt(e,1,t),ls(e,t))}function Cs(e,t,n){if(3===e.tag)_s(e,e,n);else for(;null!==t;){if(3===t.tag){_s(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Qu||!Qu.has(r))){t=Uo(t,e=mi(t,e=ci(n,e),1),1),e=ts(),null!==t&&(vt(t,1,e),ls(t,e));break}}t=t.return}}function Es(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ts(),e.pingedLanes|=e.suspendedLanes&n,Tu===e&&(zu&n)===n&&(4===ju||3===ju&&(130023424&zu)===zu&&500>Je()-Hu?ps(e,0):Au|=n),ls(e,t)}function Ns(e,t){0===t&&(1&e.mode?(t=ft,!(130023424&(ft<<=1))&&(ft=4194304)):t=1);var n=ts();null!==(e=Oo(e,t))&&(vt(e,t,n),ls(e,n))}function Ps(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ns(e,n)}function Is(e,t){var r=0;switch(e.tag){case 13:var l=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(n(314))}null!==l&&l.delete(t),Ns(e,r)}function Ts(e,t){return Ke(e,t)}function Ls(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 zs(e,t,n,r){return new Ls(e,t,n,r)}function Ms(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ds(e,t){var n=e.alternate;return null===n?((n=zs(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function js(e,t,r,l,o,a){var i=2;if(l=e,"function"==typeof e)Ms(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case _:return Os(r.children,o,a,t);case C:i=8,o|=8;break;case E:return(e=zs(12,r,t,2|o)).elementType=E,e.lanes=a,e;case T:return(e=zs(13,r,t,o)).elementType=T,e.lanes=a,e;case L:return(e=zs(19,r,t,o)).elementType=L,e.lanes=a,e;case D:return Rs(r,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case N:i=10;break e;case P:i=9;break e;case I:i=11;break e;case z:i=14;break e;case M:i=16,l=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=zs(i,r,t,o)).elementType=e,t.type=l,t.lanes=a,t}function Os(e,t,n,r){return(e=zs(7,e,r,t)).lanes=n,e}function Rs(e,t,n,r){return(e=zs(22,e,r,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Fs(e,t,n){return(e=zs(6,e,null,t)).lanes=n,e}function As(e,t,n){return(t=zs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bs(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yt(0),this.expirationTimes=yt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yt(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Us(e,t,n,r,l,o,a,i,u){return e=new Bs(e,t,n,i,u),1===t?(t=1,!0===o&&(t|=8)):t=0,o=zs(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fo(o),e}function Hs(e){if(!e)return Pl;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ml(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Ml(r))return Ol(e,r,t)}return t}function Vs(e,t,n,r,l,o,a,i,u){return(e=Us(n,r,!0,e,0,o,0,i,u)).context=Hs(null),n=e.current,(o=Bo(r=ts(),l=ns(n))).callback=null!=t?t:null,Uo(n,o,l),e.current.lanes=l,vt(e,l,r),ls(e,r),e}function $s(e,t,n,r){var l=t.current,o=ts(),a=ns(l);return n=Hs(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Uo(l,t,a))&&(rs(e,l,a,o),Ho(e,l,a)),a}function Ws(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qs(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Qs(e,t){qs(e,t),(e=e.alternate)&&qs(e,t)}_u=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Tl.current)ki=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return ki=!1,function(e,t,n){switch(t.tag){case 3:Ti(t),mo();break;case 5:Go(t);break;case 1:Ml(t.type)&&Rl(t);break;case 4:Zo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;Nl(_o,r._currentValue),r._currentValue=l;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Nl(ta,1&ta.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Fi(e,t,n):(Nl(ta,1&ta.current),null!==(e=Wi(e,t,n))?e.sibling:null);Nl(ta,1&ta.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Vi(e,t,n);t.flags|=128}if(null!==(l=t.memoizedState)&&(l.rendering=null,l.tail=null,l.lastEffect=null),Nl(ta,ta.current),r)break;return null;case 22:case 23:return t.lanes=0,Ci(e,t,n)}return Wi(e,t,n)}(e,t,r);ki=!!(131072&e.flags)}else ki=!1,oo&&1048576&t.flags&&eo(t,Ql,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;$i(e,t),e=t.pendingProps;var o=zl(t,Il.current);Lo(t,r),o=ya(null,t,l,e,o,r);var a=va();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ml(l)?(a=!0,Rl(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Fo(t),o.updater=oi,t.stateNode=o,o._reactInternals=t,si(t,l,e,r),t=Ii(null,t,l,!0,a,r)):(t.tag=0,oo&&a&&to(t),xi(null,t,o,r),t=t.child),t;case 16:l=t.elementType;e:{switch($i(e,t),e=t.pendingProps,l=(o=l._init)(l._payload),t.type=l,o=t.tag=function(e){if("function"==typeof e)return Ms(e)?1:0;if(null!=e){if((e=e.$$typeof)===I)return 11;if(e===z)return 14}return 2}(l),e=ri(l,e),o){case 0:t=Ni(null,t,l,e,r);break e;case 1:t=Pi(null,t,l,e,r);break e;case 11:t=wi(null,t,l,e,r);break e;case 14:t=Si(null,t,l,ri(l.type,e),r);break e}throw Error(n(306,l,""))}return t;case 0:return l=t.type,o=t.pendingProps,Ni(e,t,l,o=t.elementType===l?o:ri(l,o),r);case 1:return l=t.type,o=t.pendingProps,Pi(e,t,l,o=t.elementType===l?o:ri(l,o),r);case 3:e:{if(Ti(t),null===e)throw Error(n(387));l=t.pendingProps,o=(a=t.memoizedState).element,Ao(e,t),$o(t,l,null,r);var i=t.memoizedState;if(l=i.element,a.isDehydrated){if(a={element:l,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Li(e,t,l,r,o=ci(Error(n(423)),t));break e}if(l!==o){t=Li(e,t,l,r,o=ci(Error(n(424)),t));break e}for(lo=cl(t.stateNode.containerInfo.firstChild),ro=t,oo=!0,ao=null,r=So(t,null,l,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(mo(),l===o){t=Wi(e,t,r);break e}xi(e,t,l,r)}t=t.child}return t;case 5:return Go(t),null===e&&co(t),l=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,i=o.children,rl(l,o)?i=null:null!==a&&rl(l,a)&&(t.flags|=32),Ei(e,t),xi(e,t,i,r),t.child;case 6:return null===e&&co(t),null;case 13:return Fi(e,t,r);case 4:return Zo(t,t.stateNode.containerInfo),l=t.pendingProps,null===e?t.child=wo(t,null,l,r):xi(e,t,l,r),t.child;case 11:return l=t.type,o=t.pendingProps,wi(e,t,l,o=t.elementType===l?o:ri(l,o),r);case 7:return xi(e,t,t.pendingProps,r),t.child;case 8:case 12:return xi(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(l=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Nl(_o,l._currentValue),l._currentValue=i,null!==a)if(ur(a.value,i)){if(a.children===o.children&&!Tl.current){t=Wi(e,t,r);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var u=a.dependencies;if(null!==u){i=a.child;for(var s=u.firstContext;null!==s;){if(s.context===l){if(1===a.tag){(s=Bo(-1,r&-r)).tag=2;var c=a.updateQueue;if(null!==c){var f=(c=c.shared).pending;null===f?s.next=s:(s.next=f.next,f.next=s),c.pending=s}}a.lanes|=r,null!==(s=a.alternate)&&(s.lanes|=r),To(a.return,r,t),u.lanes|=r;break}s=s.next}}else if(10===a.tag)i=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(i=a.return))throw Error(n(341));i.lanes|=r,null!==(u=i.alternate)&&(u.lanes|=r),To(i,r,t),i=a.sibling}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===t){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}xi(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,l=t.pendingProps.children,Lo(t,r),l=l(o=zo(o)),t.flags|=1,xi(e,t,l,r),t.child;case 14:return o=ri(l=t.type,t.pendingProps),Si(e,t,l,o=ri(l.type,o),r);case 15:return _i(e,t,t.type,t.pendingProps,r);case 17:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:ri(l,o),$i(e,t),t.tag=1,Ml(l)?(e=!0,Rl(t)):e=!1,Lo(t,r),ii(t,l,o),si(t,l,o,r),Ii(null,t,l,!0,e,r);case 19:return Vi(e,t,r);case 22:return Ci(e,t,r)}throw Error(n(156,t.tag))};var Ks="function"==typeof reportError?reportError:function(e){console.error(e)};function Ys(e){this._internalRoot=e}function Xs(e){this._internalRoot=e}function Zs(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Js(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Gs(){}function ec(e,t,n,r,l){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof l){var i=l;l=function(){var e=Ws(a);i.call(e)}}$s(t,a,e,l)}else a=function(e,t,n,r,l){if(l){if("function"==typeof r){var o=r;r=function(){var e=Ws(a);o.call(e)}}var a=Vs(t,r,e,0,null,!1,0,"",Gs);return e._reactRootContainer=a,e[ml]=a.current,Vr(8===e.nodeType?e.parentNode:e),fs(),a}for(;l=e.lastChild;)e.removeChild(l);if("function"==typeof r){var i=r;r=function(){var e=Ws(u);i.call(e)}}var u=Us(e,0,!1,null,0,!1,0,"",Gs);return e._reactRootContainer=u,e[ml]=u.current,Vr(8===e.nodeType?e.parentNode:e),fs(function(){$s(t,u,n,r)}),u}(n,t,e,l,r);return Ws(a)}Xs.prototype.render=Ys.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));$s(e,t,null,null)},Xs.prototype.unmount=Ys.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;fs(function(){$s(null,e,null,null)}),t[ml]=null}},Xs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&Ft(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(bt(t,1|n),ls(t,Je()),!(6&Iu)&&(Vu=Je()+500,Vl()))}break;case 13:fs(function(){var t=Oo(e,1);if(null!==t){var n=ts();rs(t,e,1,n)}}),Qs(e,1)}},St=function(e){if(13===e.tag){var t=Oo(e,134217728);if(null!==t)rs(t,e,134217728,ts());Qs(e,134217728)}},_t=function(e){if(13===e.tag){var t=ns(e),n=Oo(e,t);if(null!==n)rs(n,e,t,ts());Qs(e,t)}},Ct=function(){return kt},Et=function(e,t){var n=kt;try{return kt=e,t()}finally{kt=n}},Se=function(e,t,r){switch(t){case"input":if(G(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var l=r[t];if(l!==e&&l.form===e.form){var o=wl(l);if(!o)throw Error(n(90));K(l),G(l,o)}}}break;case"textarea":ae(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Ie=cs,Te=fs;var tc={usingClientEntryPoint:!1,Events:[kl,xl,wl,Ne,Pe,cs]},nc={findFiberByHostInstance:bl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var lc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lc.isDisabled&&lc.supportsFiber)try{ot=lc.inject(rc),at=lc}catch(fe){}}return b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,b.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zs(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},b.createRoot=function(e,t){if(!Zs(e))throw Error(n(299));var r=!1,l="",o=Ks;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(l=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Us(e,1,!1,null,0,r,0,l,o),e[ml]=t.current,Vr(8===e.nodeType?e.parentNode:e),new Ys(t)},b.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return e=null===(e=qe(t))?null:e.stateNode},b.flushSync=function(e){return fs(e)},b.hydrate=function(e,t,r){if(!Js(t))throw Error(n(200));return ec(null,e,t,!0,r)},b.hydrateRoot=function(e,t,r){if(!Zs(e))throw Error(n(405));var l=null!=r&&r.hydratedSources||null,o=!1,a="",i=Ks;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(i=r.onRecoverableError)),t=Vs(t,null,e,1,null!=r?r:null,o,0,a,i),e[ml]=t.current,Vr(e),l)for(e=0;e<l.length;e++)o=(o=(r=l[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Xs(t)},b.render=function(e,t,r){if(!Js(t))throw Error(n(200));return ec(null,e,t,!1,r)},b.unmountComponentAtNode=function(e){if(!Js(e))throw Error(n(40));return!!e._reactRootContainer&&(fs(function(){ec(null,null,e,!1,function(){e._reactRootContainer=null,e[ml]=null})}),!0)},b.unstable_batchedUpdates=cs,b.unstable_renderSubtreeIntoContainer=function(e,t,r,l){if(!Js(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return ec(e,t,r,!1,l)},b.version="18.3.1-next-f1338f8080-20240426",b}var _,C,E=function(){if(g)return y;g=1;var e=(m||(m=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),v.exports=S()),v.exports);return y.createRoot=e.createRoot,y.hydrateRoot=e.hydrateRoot,y}(),N={exports:{}},P={};var I=(C||(C=1,N.exports=function(){if(_)return P;_=1;var e=s(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var i,u={},s=null,c=null;for(i in void 0!==a&&(s=""+a),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,i)&&!o.hasOwnProperty(i)&&(u[i]=n[i]);if(e&&e.defaultProps)for(i in n=e.defaultProps)void 0===u[i]&&(u[i]=n[i]);return{$$typeof:t,type:e,key:s,ref:c,props:u,_owner:l.current}}return P.Fragment=n,P.jsx=a,P.jsxs=a,P}()),N.exports);const T="bb-chat-";function L(e,t){try{sessionStorage.setItem(`${T}${e}`,JSON.stringify(t))}catch{}}function z(e){try{sessionStorage.removeItem(`${T}${e}`)}catch{}}function M(e){const{config:t,apiClient:n,mockMode:r,onSessionStart:l,onSessionEnd:o,onMessage:a,onError:i}=e,[u,s]=c.useState([]),[f,d]=c.useState([]),[p,h]=c.useState(!1),[m,g]=c.useState(null),[y,v]=c.useState(null),b=c.useRef(0),k=c.useRef(!1),x=c.useRef({});c.useEffect(()=>{if(k.current)return;k.current=!0;const e=function(e){try{const t=sessionStorage.getItem(`${T}${e}`);return t?JSON.parse(t):null}catch{return null}}(t.embedId);e&&"active"===e.status&&(v(e.sessionId),s(e.messages),d(e.toolCalls),b.current=e.startTime)},[t.embedId]),c.useEffect(()=>{y&&u.length>0&&L(t.embedId,{sessionId:y,deploymentId:t.deploymentId,workerId:t.workerId,flowId:t.flowId,startTime:b.current,messages:u,toolCalls:f,status:"active"})},[y,u,f,t]);const w=c.useCallback(async()=>(b.current=Date.now(),v(null),s([]),d([]),z(t.embedId),""),[t.embedId]),S=c.useCallback((e,t)=>{s(n=>{let r=!1;const l=n.map(n=>n.id===e?(r=!0,{...n,content:t,status:"streaming"}):n);return r||l.push({id:e,role:"assistant",content:t,timestamp:Date.now(),status:"streaming"}),l})},[]),_=c.useCallback((e,n,r)=>{switch(e.type){case"session":{const t=e.data;t.session_id&&(r(t.session_id),t.is_new&&(b.current=Date.now(),null==l||l(t.session_id)));break}case"message":{const t=e.data;t.content&&(x.current[n]=t.content,S(n,t.content));break}case"chunk":{const t=e.data;if(t.content){const e=(x.current[n]??"")+t.content;x.current[n]=e,S(n,e)}break}case"tool_call":{const t=e.data;if(d(e=>{const n=e.findIndex(e=>e.name===t.function&&"pending"===e.status);return-1!==n&&void 0!==t.result?e.map((e,r)=>r===n?{...e,result:t.result,status:"completed"}:e):-1===n?[...e,{id:`tc-${Date.now()}-${Math.random().toString(36).slice(2)}`,name:t.function,arguments:t.args??{},status:"pending",timestamp:Date.now()}]:e}),t.content){const e=t.content;x.current[n]=e,S(n,e)}break}case"waiting":break;case"done":s(e=>e.map(e=>e.id===n?{...e,status:"sent"}:e)),delete x.current[n];break;case"completed":s(e=>{const r=e.map(e=>e.id===n?{...e,status:"sent"}:e);return y&&L(t.embedId,{sessionId:y,deploymentId:t.deploymentId,workerId:t.workerId,flowId:t.flowId,startTime:b.current,messages:r,toolCalls:[],status:"completed"}),r}),delete x.current[n];break;case"error":{const t=e.data;s(e=>e.map(e=>e.id===n?{...e,status:"error",content:t.error??"An error occurred"}:e));break}}},[t,y,l,S]),C=c.useCallback(async(e,t,n)=>{const r=e.getReader(),l=new TextDecoder;let o="";try{for(;;){const{done:e,value:a}=await r.read();if(e)break;let i;for(o+=l.decode(a,{stream:!0});-1!==(i=o.indexOf("\n\n"));){const e=o.slice(0,i);o=o.slice(i+2);for(const r of e.split("\n"))if(r.startsWith("data: "))try{const e=JSON.parse(r.slice(6));_(e,t,n)}catch{}}}}finally{r.releaseLock()}},[_]),E=c.useCallback(async e=>{if(!e.trim())return;const l={id:`user-${Date.now()}`,role:"user",content:e,timestamp:Date.now(),status:"sent"};s(e=>[...e,l]),null==a||a(l);const o=`assistant-${Date.now()}`,u={id:o,role:"assistant",content:"",timestamp:Date.now(),status:"streaming"};s(e=>[...e,u]),h(!0),g(null);const c=e=>{v(e)};try{if(r){const t=n.sendMessage(e);for await(const e of t)_(e,o,c)}else{const r=await n.sendMessage({embedId:t.embedId,message:e,sessionId:y??void 0});await C(r,o,c)}s(e=>e.map(e=>e.id===o&&"streaming"===e.status?{...e,status:"sent"}:e))}catch(f){const e=f instanceof Error?f:new Error("Failed to send message");g(e),null==i||i(e),s(e=>e.map(e=>e.id===o?{...e,status:"error",content:"Failed to get response"}:e))}finally{h(!1)}},[y,n,r,t.embedId,_,C,a,i]),N=c.useCallback(async()=>{if(!y)return;const e={sessionId:y,deploymentId:t.deploymentId,workerId:t.workerId,flowId:t.flowId,startTime:b.current,messages:u,toolCalls:f,status:"completed"};null==o||o(e),z(t.embedId),v(null),s([]),d([])},[y,t,u,f,o]),P=c.useCallback(()=>{s([]),d([])},[]);return{messages:u,toolCalls:f,isLoading:p,error:m,sessionId:y,sendMessage:E,endSession:N,clearMessages:P,startNewSession:w}}const D="http://localhost:8003";const j={embedId:"mock-embed-id",deploymentId:"mock-deployment-id",workerId:"mock-worker-id",flowId:"mock-flow-id",agentName:"AI Assistant",agentLogoUrl:void 0,primaryColor:"#1a1a2e",styling:{}},O=[{trigger:/hello|hi|hey/i,response:"Hello! I'm a demo AI assistant. How can I help you today?",delay:500},{trigger:/weather/i,response:"I'd check the weather for you, but I'm in mock mode! In production, I could use a weather API.",delay:800,toolCalls:[{name:"get_weather",arguments:{location:"San Francisco"},result:{temperature:72,condition:"sunny"}}]},{trigger:/help|support/i,response:"I'm here to help! You can ask me questions, and I'll do my best to assist you. In production, I'd be connected to your agent with full capabilities.",delay:600},{trigger:/pricing|cost|price/i,response:"For pricing information, I'd typically check our database or connect you with the sales team. This is a mock response demonstrating how I'd handle pricing questions.",delay:700,toolCalls:[{name:"lookup_pricing",arguments:{plan:"all"},result:{plans:[{name:"Starter",price:"$29/mo"},{name:"Pro",price:"$99/mo"}]}}]},{trigger:/.*/,response:"I'm running in mock mode. This is a simulated response to demonstrate the chat UI. In production, I'd be connected to your agent!",delay:1e3}];function R(e){return new Promise(t=>setTimeout(t,e))}const F=({className:e,color:t="currentColor",cutoutColor:n="var(--bb-primary-color)"})=>I.jsxs("svg",{className:e,viewBox:"0 0 800 800",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I.jsx("path",{d:"M400 412C400 405.373 405.373 400 412 400H788C794.627 400 800 405.373 800 412V740C800 773.137 773.137 800 740 800H412C405.373 800 400 794.627 400 788V412Z",fill:t}),I.jsx("circle",{cx:"400",cy:"400",r:"400",fill:t}),I.jsx("path",{d:"M0 60C0 26.8629 26.8629 0 60 0H397.614C398.932 0 400 1.06811 400 2.38569V2.38569C400 221.982 221.982 400 2.38569 400V400C1.06811 400 0 398.932 0 397.614V60Z",fill:t}),I.jsx("path",{d:"M400 412C400 405.373 405.373 400 412 400H738C744.627 400 750 405.373 750 412V725C750 738.807 738.807 750 725 750H412C405.373 750 400 744.627 400 738V412Z",fill:t}),I.jsx("circle",{cx:"400",cy:"400",r:"350",fill:t}),I.jsx("path",{d:"M50 75C50 61.1929 61.1929 50 75 50H388C394.627 50 400 55.3726 400 62V388C400 394.627 394.627 400 388 400H62C55.3726 400 50 394.627 50 388V75Z",fill:t}),I.jsx("rect",{x:"399.919",y:"209",width:"270",height:"270",rx:"12",transform:"rotate(45 399.919 209)",fill:n})]}),A="_header_1p6z5_1",B="_compact_1p6z5_9",U="_headerBackground_1p6z5_20",H="_headerContent_1p6z5_59",V="_topRow_1p6z5_64",$="_agentInfo_1p6z5_79",W="_agentLogo_1p6z5_85",q="_agentLogoPlaceholder_1p6z5_102",Q="_brainbaseLogo_1p6z5_123",K="_agentName_1p6z5_137",Y="_actions_1p6z5_144",X="_actionButton_1p6z5_149",Z="_welcomeText_1p6z5_183",J="_title_1p6z5_202",G="_subtitle_1p6z5_210",ee=({agentName:e="AI Assistant",agentLogoUrl:t,welcomeTitle:n,welcomeSubtitle:r,onClose:l,onNewChatRequest:o,showNewChatButton:a=!1,compact:i=!1})=>{const u=n||"Hello there.",s=void 0!==r?r:n?void 0:"How can we help?";return I.jsxs("div",{className:`${A} ${i?B:""}`,children:[I.jsx("div",{className:U}),I.jsxs("div",{className:H,children:[I.jsxs("div",{className:V,children:[I.jsxs("div",{className:$,children:[t?I.jsx("img",{src:t,alt:e,className:W}):I.jsx("div",{className:q,children:I.jsx(F,{className:Q,color:"white",cutoutColor:"var(--bb-primary-color)"})}),I.jsx("span",{className:K,children:e})]}),I.jsxs("div",{className:Y,children:[a&&o&&I.jsx("button",{className:X,onClick:o,"aria-label":"Start new chat",type:"button",children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),l&&I.jsx("button",{className:X,onClick:l,"aria-label":"Close chat",type:"button",children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),!i&&I.jsxs("div",{className:Z,children:[I.jsx("h1",{className:J,children:u}),s&&I.jsx("p",{className:G,children:s})]})]})]})};function te(){}function ne(){}const re=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,le=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oe={};function ae(e,t){return(oe.jsx?le:re).test(e)}const ie=/[ \t\n\f\r]/g;function ue(e){return""===e.replace(ie,"")}class se{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function ce(e,t){const n={},r={};for(const l of e)Object.assign(n,l.property),Object.assign(r,l.normal);return new se(n,r,t)}function fe(e){return e.toLowerCase()}se.prototype.normal={},se.prototype.property={},se.prototype.space=void 0;class de{constructor(e,t){this.attribute=t,this.property=e}}de.prototype.attribute="",de.prototype.booleanish=!1,de.prototype.boolean=!1,de.prototype.commaOrSpaceSeparated=!1,de.prototype.commaSeparated=!1,de.prototype.defined=!1,de.prototype.mustUseProperty=!1,de.prototype.number=!1,de.prototype.overloadedBoolean=!1,de.prototype.property="",de.prototype.spaceSeparated=!1,de.prototype.space=void 0;let pe=0;const he=xe(),me=xe(),ge=xe(),ye=xe(),ve=xe(),be=xe(),ke=xe();function xe(){return 2**++pe}const we=Object.freeze(Object.defineProperty({__proto__:null,boolean:he,booleanish:me,commaOrSpaceSeparated:ke,commaSeparated:be,number:ye,overloadedBoolean:ge,spaceSeparated:ve},Symbol.toStringTag,{value:"Module"})),Se=Object.keys(we);class _e extends de{constructor(e,t,n,r){let l=-1;if(super(e,t),Ce(this,"space",r),"number"==typeof n)for(;++l<Se.length;){const e=Se[l];Ce(this,Se[l],(n&we[e])===we[e])}}}function Ce(e,t,n){n&&(e[t]=n)}function Ee(e){const t={},n={};for(const[r,l]of Object.entries(e.properties)){const o=new _e(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[fe(r)]=r,n[fe(o.attribute)]=r}return new se(t,n,e.space)}_e.prototype.defined=!0;const Ne=Ee({properties:{ariaActiveDescendant:null,ariaAtomic:me,ariaAutoComplete:null,ariaBusy:me,ariaChecked:me,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:ve,ariaCurrent:null,ariaDescribedBy:ve,ariaDetails:null,ariaDisabled:me,ariaDropEffect:ve,ariaErrorMessage:null,ariaExpanded:me,ariaFlowTo:ve,ariaGrabbed:me,ariaHasPopup:null,ariaHidden:me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ve,ariaLevel:ye,ariaLive:null,ariaModal:me,ariaMultiLine:me,ariaMultiSelectable:me,ariaOrientation:null,ariaOwns:ve,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:me,ariaReadOnly:me,ariaRelevant:null,ariaRequired:me,ariaRoleDescription:ve,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:me,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Pe(e,t){return t in e?e[t]:t}function Ie(e,t){return Pe(e,t.toLowerCase())}const Te=Ee({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:be,acceptCharset:ve,accessKey:ve,action:null,allow:null,allowFullScreen:he,allowPaymentRequest:he,allowUserMedia:he,alt:null,as:null,async:he,autoCapitalize:null,autoComplete:ve,autoFocus:he,autoPlay:he,blocking:ve,capture:null,charSet:null,checked:he,cite:null,className:ve,cols:ye,colSpan:null,content:null,contentEditable:me,controls:he,controlsList:ve,coords:ye|be,crossOrigin:null,data:null,dateTime:null,decoding:null,default:he,defer:he,dir:null,dirName:null,disabled:he,download:ge,draggable:me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:he,formTarget:null,headers:ve,height:ye,hidden:ge,high:ye,href:null,hrefLang:null,htmlFor:ve,httpEquiv:ve,id:null,imageSizes:null,imageSrcSet:null,inert:he,inputMode:null,integrity:null,is:null,isMap:he,itemId:null,itemProp:ve,itemRef:ve,itemScope:he,itemType:ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:he,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:he,muted:he,name:null,nonce:null,noModule:he,noValidate:he,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:he,optimum:ye,pattern:null,ping:ve,placeholder:null,playsInline:he,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:he,referrerPolicy:null,rel:ve,required:he,reversed:he,rows:ye,rowSpan:ye,sandbox:ve,scope:null,scoped:he,seamless:he,selected:he,shadowRootClonable:he,shadowRootDelegatesFocus:he,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:he,useMap:null,value:me,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ve,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:he,declare:he,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:he,noHref:he,noShade:he,noWrap:he,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:me,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:he,disableRemotePlayback:he,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:Ie}),Le=Ee({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"},properties:{about:ke,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:ve,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:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:he,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:be,g2:be,glyphName:be,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:ke,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,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:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ke,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ke,rev:ke,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ke,requiredFeatures:ke,requiredFonts:ke,requiredFormats:ke,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:ke,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ke,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ke,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pe}),ze=Ee({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Me=Ee({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ie}),De=Ee({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),je={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"},Oe=/[A-Z]/g,Re=/-[a-z]/g,Fe=/^data[-\w.:]+$/i;function Ae(e){return"-"+e.toLowerCase()}function Be(e){return e.charAt(1).toUpperCase()}const Ue=ce([Ne,Te,ze,Me,De],"html"),He=ce([Ne,Le,ze,Me,De],"svg");var Ve,$e,We,qe={};function Qe(){if(We)return qe;We=1;var e=qe&&qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qe,"__esModule",{value:!0}),qe.default=function(e,n){let r=null;if(!e||"string"!=typeof e)return r;const l=(0,t.default)(e),o="function"==typeof n;return l.forEach(e=>{if("declaration"!==e.type)return;const{property:t,value:l}=e;o?n(t,l,e):l&&(r=r||{},r[t]=l)}),r};const t=e(function(){if($e)return Ve;$e=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,u="";function s(e){return e?e.replace(i,u):u}return Ve=function(i,c){if("string"!=typeof i)throw new TypeError("First argument must be a string");if(!i)return[];c=c||{};var f=1,d=1;function p(e){var n=e.match(t);n&&(f+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function h(){var e={line:f,column:d};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:f,column:d},this.source=c.source}function g(e){var t=new Error(c.source+":"+f+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=f,t.column=d,t.source=i,!c.silent)throw t}function y(e){var t=e.exec(i);if(t){var n=t[0];return p(n),i=i.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=k();)!1!==t&&e.push(t);return e}function k(){var e=h();if("/"==i.charAt(0)&&"*"==i.charAt(1)){for(var t=2;u!=i.charAt(t)&&("*"!=i.charAt(t)||"/"!=i.charAt(t+1));)++t;if(t+=2,u===i.charAt(t-1))return g("End of comment missing");var n=i.slice(2,t-2);return d+=2,p(n),i=i.slice(t),d+=2,e({type:"comment",comment:n})}}function x(){var t=h(),n=y(r);if(n){if(k(),!y(l))return g("property missing ':'");var i=y(o),c=t({type:"declaration",property:s(n[0].replace(e,u)),value:i?s(i[0].replace(e,u)):u});return y(a),c}}return m.prototype.content=i,v(),function(){var e,t=[];for(b(t);e=x();)!1!==e&&(t.push(e),b(t));return t}()}}());return qe}var Ke,Ye,Xe,Ze={};function Je(){if(Ke)return Ze;Ke=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};return Ze.camelCase=function(i,u){return void 0===u&&(u={}),function(t){return!t||n.test(t)||e.test(t)}(i)?i:(i=i.toLowerCase(),(i=u.reactCompat?i.replace(l,a):i.replace(r,a)).replace(t,o))},Ze}const Ge=r(function(){if(Xe)return Ye;Xe=1;var e=(Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Qe()),t=Je();function n(n,r){var l={};return n&&"string"==typeof n?((0,e.default)(n,function(e,n){e&&n&&(l[(0,t.camelCase)(e,r)]=n)}),l):l}return n.default=n,Ye=n}()),et=nt("end"),tt=nt("start");function nt(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function rt(e){return e&&"object"==typeof e?"position"in e||"type"in e?ot(e.position):"start"in e||"end"in e?ot(e):"line"in e||"column"in e?lt(e):"":""}function lt(e){return at(e&&e.line)+":"+at(e&&e.column)}function ot(e){return lt(e&&e.start)+"-"+lt(e&&e.end)}function at(e){return e&&"number"==typeof e?e:1}class it extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",l={},o=!1;if(t&&(l="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!l.cause&&e&&(o=!0,r=e.message,l.cause=e),!l.ruleId&&!l.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?l.ruleId=n:(l.source=n.slice(0,e),l.ruleId=n.slice(e+1))}if(!l.place&&l.ancestors&&l.ancestors){const e=l.ancestors[l.ancestors.length-1];e&&(l.place=e.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=rt(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&"string"==typeof l.cause.stack?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}it.prototype.file="",it.prototype.name="",it.prototype.reason="",it.prototype.message="",it.prototype.stack="",it.prototype.column=void 0,it.prototype.line=void 0,it.prototype.ancestors=void 0,it.prototype.cause=void 0,it.prototype.fatal=void 0,it.prototype.place=void 0,it.prototype.ruleId=void 0,it.prototype.source=void 0;const ut={}.hasOwnProperty,st=new Map,ct=/[A-Z]/g,ft=new Set(["table","tbody","thead","tfoot","tr"]),dt=new Set(["td","th"]),pt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ht(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,l,o){const a=Array.isArray(l.children),i=tt(n);return t(r,l,o,a,{columnNumber:i?i.column-1:void 0,fileName:e,lineNumber:i?i.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,l,o){const a=Array.isArray(l.children)?n:t;return o?a(r,l,o):a(r,l)}}(0,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?He:Ue,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=mt(l,e,void 0);return o&&"string"!=typeof o?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function mt(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let l=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(l=He,e.schema=l);e.ancestors.push(t);const o=kt(e,t.tagName,!1),a=function(e,t){const n={};let r,l;for(l in t.properties)if("children"!==l&&ut.call(t.properties,l)){const o=bt(e,l,t.properties[l]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&"align"===l&&"string"==typeof a&&dt.has(t.tagName)?r=a:n[l]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let i=vt(e,t);ft.has(t.tagName)&&(i=i.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&ue(t.value):ue(t));var t}));return gt(e,a,o,t),yt(a,i),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}xt(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let l=r;"svg"===t.name&&"html"===r.space&&(l=He,e.schema=l);e.ancestors.push(t);const o=null===t.name?e.Fragment:kt(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];te(t.type);const l=t.expression;te(l.type);const o=l.properties[0];te(o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else xt(e,t.position);else{const l=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];te(t.type),o=e.evaluater.evaluateExpression(t.expression)}else xt(e,t.position);else o=null===r.value||r.value;n[l]=o}return n}(e,t),i=vt(e,t);return gt(e,a,o,t),yt(a,i),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xt(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return yt(r,vt(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function gt(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function yt(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vt(e,t){const n=[];let r=-1;const l=e.passKeys?new Map:st;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=l.get(e)||0;a=e+"-"+t,l.set(e,t+1)}}const i=mt(e,o,a);void 0!==i&&n.push(i)}return n}function bt(e,t,n){const r=function(e,t){const n=fe(t);let r=t,l=de;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Fe.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Re,Be);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Re.test(e)){let n=e.replace(Oe,Ae);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}l=_e}return new l(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Ge(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new it("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=pt+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)ut.call(e,n)&&(t[wt(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?je[r.property]||r.property:r.attribute,n]}}function kt(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,l=-1;for(;++l<e.length;){const t=ae(e[l])?{type:"Identifier",name:e[l]}:{type:"Literal",value:e[l]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(l&&"Literal"===t.type),optional:!1}:t}r=n}else r=ae(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return ut.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);xt(e)}function xt(e,t){const n=new it("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=pt+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wt(e){let t=e.replace(ct,St);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function St(e){return"-"+e.toLowerCase()}const _t={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ct={};function Et(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nt(e.children,t,n)}return Array.isArray(e)?Nt(e,t,n):""}function Nt(e,t,n){const r=[];let l=-1;for(;++l<e.length;)r[l]=Et(e[l],t,n);return r.join("")}const Pt=document.createElement("i");function It(e){const t="&"+e+";";Pt.innerHTML=t;const n=Pt.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Tt(e,t,n,r){const l=e.length;let o,a=0;if(t=t<0?-t>l?0:l+t:t>l?l:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Lt(e,t){return e.length>0?(Tt(e,e.length,0,t),e):t}const zt={}.hasOwnProperty;function Mt(e,t){let n;for(n in t){const r=(zt.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){zt.call(r,o)||(r[o]=[]);const e=l[o];Dt(r[o],Array.isArray(e)?e:e?[e]:[])}}}function Dt(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Tt(e,0,0,r)}function jt(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function Ot(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rt=Yt(/[A-Za-z]/),Ft=Yt(/[\dA-Za-z]/),At=Yt(/[#-'*+\--9=?A-Z^-~]/);function Bt(e){return null!==e&&(e<32||127===e)}const Ut=Yt(/\d/),Ht=Yt(/[\dA-Fa-f]/),Vt=Yt(/[!-/:-@[-`{-~]/);function $t(e){return null!==e&&e<-2}function Wt(e){return null!==e&&(e<0||32===e)}function qt(e){return-2===e||-1===e||32===e}const Qt=Yt(new RegExp("\\p{P}|\\p{S}","u")),Kt=Yt(/\s/);function Yt(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Xt(e){const t=[];let n=-1,r=0,l=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(37===o&&Ft(e.charCodeAt(n+1))&&Ft(e.charCodeAt(n+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),l=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+l+1,a=""),l&&(n+=l,l=0)}return t.join("")+e.slice(r)}function Zt(e,t,n,r){const l=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(qt(r))return e.enter(n),a(r);return t(r)};function a(r){return qt(r)&&o++<l?(e.consume(r),a):(e.exit(n),t(r))}}const Jt={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Zt(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,l(t)}function l(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):$t(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),l)}}};const Gt={tokenize:function(e){const t=this,n=[];let r,l,o,a=0;return i;function i(r){if(a<n.length){const l=n[a];return t.containerState=l[1],e.attempt(l[0].continuation,u,s)(r)}return s(r)}function u(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let l,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){l=t.events[o][1].end;break}y(a);let i=n;for(;i<t.events.length;)t.events[i][1].end={...l},i++;return Tt(t.events,o+1,0,t.events.slice(n)),t.events.length=i,s(e)}return i(e)}function s(l){if(a===n.length){if(!r)return d(l);if(r.currentConstruct&&r.currentConstruct.concrete)return h(l);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(en,c,f)(l)}function c(e){return r&&v(),y(a),d(e)}function f(e){return t.parser.lazy[t.now().line]=a!==n.length,o=t.now().offset,h(e)}function d(n){return t.containerState={},e.attempt(en,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),d(e)}function h(n){return null===n?(r&&v(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:l}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):$t(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,i):(e.consume(n),m)}function g(e,n){const i=t.sliceStream(e);if(n&&i.push(null),e.previous=l,l&&(l.next=e),l=e,r.defineSkip(e.start),r.write(i),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let l,i,u=n;for(;u--;)if("exit"===t.events[u][0]&&"chunkFlow"===t.events[u][1].type){if(l){i=t.events[u][1].end;break}l=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...i},e++;Tt(t.events,u+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let l=n.length;for(;l-- >r;){const r=n[l];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),l=void 0,r=void 0,t.containerState._closeFlow=void 0}}},en={tokenize:function(e,t,n){return Zt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function tn(e){return null===e||Wt(e)||Kt(e)?1:Qt(e)?2:void 0}function nn(e,t,n){const r=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const rn={name:"attention",resolveAll:function(e,t){let n,r,l,o,a,i,u,s,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;i=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const f={...e[n][1].end},d={...e[c][1].start};ln(f,-i),ln(d,i),o={type:i>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},a={type:i>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},l={type:i>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:i>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[n][1].end={...o.start},e[c][1].start={...a.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=Lt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=Lt(u,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",l,t]]),u=Lt(u,nn(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),u=Lt(u,[["exit",l,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(s=2,u=Lt(u,[["enter",e[c][1],t],["exit",e[c][1],t]])):s=0,Tt(e,n-1,c-n+3,u),c=n+u.length-s-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,l=tn(r);let o;return function(t){return o=t,e.enter("attentionSequence"),a(t)};function a(i){if(i===o)return e.consume(i),a;const u=e.exit("attentionSequence"),s=tn(i),c=!s||2===s&&l||n.includes(i),f=!l||2===l&&s||n.includes(r);return u._open=Boolean(42===o?c:c&&(l||!f)),u._close=Boolean(42===o?f:f&&(s||!c)),t(i)}}};function ln(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const on={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return Rt(t)?(e.consume(t),o):64===t?n(t):u(t)}function o(e){return 43===e||45===e||46===e||Ft(e)?(r=1,a(e)):u(e)}function a(t){return 58===t?(e.consume(t),r=0,i):(43===t||45===t||46===t||Ft(t))&&r++<32?(e.consume(t),a):(r=0,u(t))}function i(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Bt(r)?n(r):(e.consume(r),i)}function u(t){return 64===t?(e.consume(t),s):At(t)?(e.consume(t),u):n(t)}function s(e){return Ft(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,s):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):f(n)}function f(t){if((45===t||Ft(t))&&r++<63){const n=45===t?f:c;return e.consume(t),n}return n(t)}}};const an={partial:!0,tokenize:function(e,t,n){return function(t){return qt(t)?Zt(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||$t(e)?t(e):n(e)}}};const un={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(qt(t))return Zt(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return l(t)};function l(r){return e.attempt(un,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),l}return n(t)};function l(n){return qt(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const sn={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Vt(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const cn={name:"characterReference",tokenize:function(e,t,n){const r=this;let l,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),i};function i(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=Ft,s(t))}function u(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Ht,s):(e.enter("characterReferenceValue"),l=7,o=Ut,s(t))}function s(i){if(59===i&&a){const l=e.exit("characterReferenceValue");return o!==Ft||It(r.sliceSerialize(l))?(e.enter("characterReferenceMarker"),e.consume(i),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(i)}return o(i)&&a++<l?(e.consume(i),s):n(i)}}};const fn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l};function l(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},dn={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,l={partial:!0,tokenize:function(e,t,n){let l=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u}function u(t){return e.enter("codeFencedFence"),qt(t)?Zt(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(l++,e.consume(t),c):l>=i?(e.exit("codeFencedFenceSequence"),qt(t)?Zt(e,f,"whitespace")(t):f(t)):n(t)}function f(r){return null===r||$t(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,a=0,i=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(t)}(t)};function u(t){return t===o?(i++,e.consume(t),u):i<3?n(t):(e.exit("codeFencedFenceSequence"),qt(t)?Zt(e,s,"whitespace")(t):s(t))}function s(n){return null===n||$t(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(fn,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||$t(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(t)):qt(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Zt(e,f,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),c)}function f(t){return null===t||$t(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||$t(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(t)):96===t&&t===o?n(t):(e.consume(t),d)}function p(t){return e.attempt(l,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&qt(t)?Zt(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||$t(t)?e.check(fn,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||$t(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const pn={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Zt(e,l,"linePrefix",5)(t)};function l(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?i(t):$t(t)?e.attempt(hn,o,i)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||$t(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function i(n){return e.exit("codeIndented"),t(n)}}},hn={partial:!0,tokenize:function(e,t,n){const r=this;return l;function l(t){return r.parser.lazy[r.now().line]?n(t):$t(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):Zt(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):$t(e)?l(e):n(e)}}};const mn={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,l=3;if(!("lineEnding"!==e[l][1].type&&"space"!==e[l][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=l;++t<r;)if("codeTextData"===e[t][1].type){e[l][1].type="codeTextPadding",e[r][1].type="codeTextPadding",l+=2,r-=2;break}t=l-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,l,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),i(t))}function i(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),i):96===t?(l=e.enter("codeTextSequence"),r=0,s(t)):$t(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):(e.enter("codeTextData"),u(t))}function u(t){return null===t||32===t||96===t||$t(t)?(e.exit("codeTextData"),i(t)):(e.consume(t),u)}function s(n){return 96===n?(e.consume(n),r++,s):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(l.type="codeTextData",u(n))}}};class gn{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const l=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&yn(this.left,n),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),yn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),yn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);yn(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);yn(this.left,t.reverse())}}}function yn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function vn(e){const t={};let n,r,l,o,a,i,u,s=-1;const c=new gn(e);for(;++s<c.length;){for(;s in t;)s=t[s];if(n=c.get(s),s&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(s-1)[1].type&&(i=n[1]._tokenizer.events,l=0,l<i.length&&"lineEndingBlank"===i[l][1].type&&(l+=2),l<i.length&&"content"===i[l][1].type))for(;++l<i.length&&"content"!==i[l][1].type;)"chunkText"===i[l][1].type&&(i[l][1]._isInFirstContentOfListItem=!0,l++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,bn(c,s)),s=t[s],u=!0);else if(n[1]._container){for(l=s,r=void 0;l--;)if(o=c.get(l),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=l);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...c.get(r)[1].start},a=c.slice(r,s),a.unshift(n),c.splice(r,s-r+1,a))}}return Tt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function bn(e,t){const n=e.get(t)[1],r=e.get(t)[2];let l=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const i=a.events,u=[],s={};let c,f,d=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++l)[1]!==p;);o.push(l),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<i.length;)"exit"===i[d][0]&&"enter"===i[d-1][0]&&i[d][1].type===i[d-1][1].type&&i[d][1].start.line!==i[d][1].end.line&&(m=d+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){const t=i.slice(g[d],g[d+1]),n=o.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),d=-1;++d<u.length;)s[h+u[d][0]]=h+u[d][1],h+=u[d][1]-u[d][0]-1;return s}const kn={resolve:function(e){return vn(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?l(t):$t(t)?e.check(xn,o,l)(t):(e.consume(t),r)}function l(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},xn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Zt(e,l,"linePrefix")};function l(l){if(null===l||$t(l))return n(l);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}};function wn(e,t,n,r,l,o,a,i,u){const s=u||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(l),e.enter(o),e.consume(t),e.exit(o),f;if(null===t||32===t||41===t||Bt(t))return n(t);return e.enter(r),e.enter(a),e.enter(i),e.enter("chunkString",{contentType:"string"}),h(t)};function f(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(l),e.exit(r),t):(e.enter(i),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(i),f(t)):null===t||60===t||$t(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function h(l){return c||null!==l&&41!==l&&!Wt(l)?c<s&&40===l?(e.consume(l),c++,h):41===l?(e.consume(l),c--,h):null===l||32===l||40===l||Bt(l)?n(l):(e.consume(l),92===l?m:h):(e.exit("chunkString"),e.exit(i),e.exit(a),e.exit(r),t(l))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Sn(e,t,n,r,l,o){const a=this;let i,u=0;return function(t){return e.enter(r),e.enter(l),e.consume(t),e.exit(l),e.enter(o),s};function s(f){return u>999||null===f||91===f||93===f&&!i||94===f&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):93===f?(e.exit(o),e.enter(l),e.consume(f),e.exit(l),e.exit(r),t):$t(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(t){return null===t||91===t||93===t||$t(t)||u++>999?(e.exit("chunkString"),s(t)):(e.consume(t),i||(i=!qt(t)),92===t?f:c)}function f(t){return 91===t||92===t||93===t?(e.consume(t),u++,c):c(t)}}function _n(e,t,n,r,l,o){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(l),e.consume(t),e.exit(l),a=40===t?41:t,i;return n(t)};function i(n){return n===a?(e.enter(l),e.consume(n),e.exit(l),e.exit(r),t):(e.enter(o),u(n))}function u(t){return t===a?(e.exit(o),i(a)):null===t?n(t):$t(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Zt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(t))}function s(t){return t===a||null===t||$t(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?c:s)}function c(t){return t===a||92===t?(e.consume(t),s):s(t)}}function Cn(e,t){let n;return function r(l){if($t(l))return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,r;if(qt(l))return Zt(e,r,n?"linePrefix":"lineSuffix")(l);return t(l)}}const En={name:"definition",tokenize:function(e,t,n){const r=this;let l;return function(t){return e.enter("definition"),function(t){return Sn.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return l=Ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return Wt(t)?Cn(e,i)(t):i(t)}function i(t){return wn(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function u(t){return e.attempt(Nn,s,s)(t)}function s(t){return qt(t)?Zt(e,c,"whitespace")(t):c(t)}function c(o){return null===o||$t(o)?(e.exit("definition"),r.parser.defined.push(l),t(o)):n(o)}}},Nn={partial:!0,tokenize:function(e,t,n){return function(t){return Wt(t)?Cn(e,r)(t):n(t)};function r(t){return _n(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function l(t){return qt(t)?Zt(e,o,"whitespace")(t):o(t)}function o(e){return null===e||$t(e)?t(e):n(e)}}};const Pn={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return $t(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const In={name:"headingAtx",resolve:function(e,t){let n,r,l=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);l-2>o&&"whitespace"===e[l][1].type&&(l-=2);"atxHeadingSequence"===e[l][1].type&&(o===l-1||l-4>o&&"whitespace"===e[l-2][1].type)&&(l-=o+1===l?2:4);l>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[l][1].end},r={type:"chunkText",start:e[o][1].start,end:e[l][1].end,contentType:"text"},Tt(e,o,l-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),l(t)}(t)};function l(t){return 35===t&&r++<6?(e.consume(t),l):null===t||Wt(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||$t(n)?(e.exit("atxHeading"),t(n)):qt(n)?Zt(e,o,"whitespace")(n):(e.enter("atxHeadingText"),i(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function i(t){return null===t||35===t||Wt(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),i)}}};const Tn=["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"],Ln=["pre","script","style","textarea"],zn={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let l,o,a,i,u;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),s}(t)};function s(i){return 33===i?(e.consume(i),c):47===i?(e.consume(i),o=!0,p):63===i?(e.consume(i),l=3,r.interrupt?t:D):Rt(i)?(e.consume(i),a=String.fromCharCode(i),h):n(i)}function c(o){return 45===o?(e.consume(o),l=2,f):91===o?(e.consume(o),l=5,i=0,d):Rt(o)?(e.consume(o),l=4,r.interrupt?t:D):n(o)}function f(l){return 45===l?(e.consume(l),r.interrupt?t:D):n(l)}function d(l){const o="CDATA[";return l===o.charCodeAt(i++)?(e.consume(l),6===i?r.interrupt?t:E:d):n(l)}function p(t){return Rt(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(i){if(null===i||47===i||62===i||Wt(i)){const u=47===i,s=a.toLowerCase();return u||o||!Ln.includes(s)?Tn.includes(a.toLowerCase())?(l=6,u?(e.consume(i),m):r.interrupt?t(i):E(i)):(l=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(i):o?g(i):y(i)):(l=1,r.interrupt?t(i):E(i))}return 45===i||Ft(i)?(e.consume(i),a+=String.fromCharCode(i),h):n(i)}function m(l){return 62===l?(e.consume(l),r.interrupt?t:E):n(l)}function g(t){return qt(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||Rt(t)?(e.consume(t),v):qt(t)?(e.consume(t),y):_(t)}function v(t){return 45===t||46===t||58===t||95===t||Ft(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),k):qt(t)?(e.consume(t),b):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),u=t,x):qt(t)?(e.consume(t),k):w(t)}function x(t){return t===u?(e.consume(t),u=null,S):null===t||$t(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Wt(t)?b(t):(e.consume(t),w)}function S(e){return 47===e||62===e||qt(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||$t(t)?E(t):qt(t)?(e.consume(t),C):n(t)}function E(t){return 45===t&&2===l?(e.consume(t),T):60===t&&1===l?(e.consume(t),L):62===t&&4===l?(e.consume(t),j):63===t&&3===l?(e.consume(t),D):93===t&&5===l?(e.consume(t),M):!$t(t)||6!==l&&7!==l?null===t||$t(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),E):(e.exit("htmlFlowData"),e.check(Mn,O,N)(t))}function N(t){return e.check(Dn,P,O)(t)}function P(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||$t(t)?N(t):(e.enter("htmlFlowData"),E(t))}function T(t){return 45===t?(e.consume(t),D):E(t)}function L(t){return 47===t?(e.consume(t),a="",z):E(t)}function z(t){if(62===t){const n=a.toLowerCase();return Ln.includes(n)?(e.consume(t),j):E(t)}return Rt(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),z):E(t)}function M(t){return 93===t?(e.consume(t),D):E(t)}function D(t){return 62===t?(e.consume(t),j):45===t&&2===l?(e.consume(t),D):E(t)}function j(t){return null===t||$t(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),j)}function O(n){return e.exit("htmlFlow"),t(n)}}},Mn={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(an,t,n)}}},Dn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if($t(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l;return n(t)};function l(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const jn={name:"htmlText",tokenize:function(e,t,n){const r=this;let l,o,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),i};function i(t){return 33===t?(e.consume(t),u):47===t?(e.consume(t),k):63===t?(e.consume(t),v):Rt(t)?(e.consume(t),S):n(t)}function u(t){return 45===t?(e.consume(t),s):91===t?(e.consume(t),o=0,p):Rt(t)?(e.consume(t),y):n(t)}function s(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),f):$t(t)?(a=c,z(t)):(e.consume(t),c)}function f(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?L(e):45===e?f(e):c(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):$t(t)?(a=h,z(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?L(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?L(t):$t(t)?(a=y,z(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):$t(t)?(a=v,z(t)):(e.consume(t),v)}function b(e){return 62===e?L(e):v(e)}function k(t){return Rt(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||Ft(t)?(e.consume(t),x):w(t)}function w(t){return $t(t)?(a=w,z(t)):qt(t)?(e.consume(t),w):L(t)}function S(t){return 45===t||Ft(t)?(e.consume(t),S):47===t||62===t||Wt(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),L):58===t||95===t||Rt(t)?(e.consume(t),C):$t(t)?(a=_,z(t)):qt(t)?(e.consume(t),_):L(t)}function C(t){return 45===t||46===t||58===t||95===t||Ft(t)?(e.consume(t),C):E(t)}function E(t){return 61===t?(e.consume(t),N):$t(t)?(a=E,z(t)):qt(t)?(e.consume(t),E):_(t)}function N(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,P):$t(t)?(a=N,z(t)):qt(t)?(e.consume(t),N):(e.consume(t),I)}function P(t){return t===l?(e.consume(t),l=void 0,T):null===t?n(t):$t(t)?(a=P,z(t)):(e.consume(t),P)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Wt(t)?_(t):(e.consume(t),I)}function T(e){return 47===e||62===e||Wt(e)?_(e):n(e)}function L(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function z(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return qt(t)?Zt(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),a(t)}}};const On={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Tt(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,l,o,a=e.length,i=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(l){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){i=2;break}}else"labelEnd"===n.type&&(l=a);const u={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[r][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[r+i+2][1].end},end:{...e[l-2][1].start}};return o=[["enter",u,t],["enter",s,t]],o=Lt(o,e.slice(r+1,r+i+3)),o=Lt(o,[["enter",c,t]]),o=Lt(o,nn(t.parser.constructs.insideSpan.null,e.slice(r+i+4,l-3),t)),o=Lt(o,[["exit",c,t],e[l-2],e[l-1],["exit",s,t]]),o=Lt(o,e.slice(l+1)),o=Lt(o,[["exit",u,t]]),Tt(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let l,o,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){l=r.events[a][1];break}return function(t){if(!l)return n(t);if(l._inactive)return c(t);return o=r.parser.defined.includes(Ot(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),i};function i(t){return 40===t?e.attempt(Rn,s,o?s:c)(t):91===t?e.attempt(Fn,s,o?u:c)(t):o?s(t):c(t)}function u(t){return e.attempt(An,s,c)(t)}function s(e){return t(e)}function c(e){return l._balanced=!0,n(e)}}},Rn={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Wt(t)?Cn(e,l)(t):l(t)}function l(t){return 41===t?s(t):wn(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Wt(t)?Cn(e,i)(t):s(t)}function a(e){return n(e)}function i(t){return 34===t||39===t||40===t?_n(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function u(t){return Wt(t)?Cn(e,s)(t):s(t)}function s(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Fn={tokenize:function(e,t,n){const r=this;return function(t){return Sn.call(r,e,l,o,"reference","referenceMarker","referenceString")(t)};function l(e){return r.parser.defined.includes(Ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},An={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const Bn={name:"labelStartImage",resolveAll:On.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),l};function l(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Un={name:"labelStartLink",resolveAll:On.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),l};function l(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Hn={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Zt(e,t,"linePrefix")}}};const Vn={name:"thematicBreak",tokenize:function(e,t,n){let r,l=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),a(o)):l>=3&&(null===o||$t(o))?(e.exit("thematicBreak"),t(o)):n(o)}function a(t){return t===r?(e.consume(t),l++,a):(e.exit("thematicBreakSequence"),qt(t)?Zt(e,o,"whitespace")(t):o(t))}}};const $n={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(an,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Zt(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!qt(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(qn,t,l)(n)});function l(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Zt(e,e.attempt($n,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,l=r.events[r.events.length-1];let o=l&&"linePrefix"===l[1].type?l[2].sliceSerialize(l[1],!0).length:0,a=0;return function(t){const l=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===l?!r.containerState.marker||t===r.containerState.marker:Ut(t)){if(r.containerState.type||(r.containerState.type=l,e.enter(l,{_container:!0})),"listUnordered"===l)return e.enter("listItemPrefix"),42===t||45===t?e.check(Vn,n,u)(t):u(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),i(t)}return n(t)};function i(t){return Ut(t)&&++a<10?(e.consume(t),i):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),u(t)):n(t)}function u(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(an,r.interrupt?n:s,e.attempt(Wn,f,c))}function s(e){return r.containerState.initialBlankLine=!0,o++,f(e)}function c(t){return qt(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):n(t)}function f(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Wn={partial:!0,tokenize:function(e,t,n){const r=this;return Zt(e,function(e){const l=r.events[r.events.length-1];return!qt(e)&&l&&"listItemPrefixWhitespace"===l[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},qn={partial:!0,tokenize:function(e,t,n){const r=this;return Zt(e,function(e){const l=r.events[r.events.length-1];return l&&"listItemIndent"===l[1].type&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Qn={name:"setextUnderline",resolveTo:function(e,t){let n,r,l,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),l||"definition"!==e[o][1].type||(l=o);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",l?(e.splice(r,0,["enter",a,t]),e.splice(l+1,0,["exit",e[n][1],t]),e[n][1].end={...e[l][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let l;return function(t){let a,i=r.events.length;for(;i--;)if("lineEnding"!==r.events[i][1].type&&"linePrefix"!==r.events[i][1].type&&"content"!==r.events[i][1].type){a="paragraph"===r.events[i][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),l=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===l?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),qt(t)?Zt(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||$t(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Kn={tokenize:function(e){const t=this,n=e.attempt(an,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,Zt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(kn,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Yn={resolveAll:Gn()},Xn=Jn("string"),Zn=Jn("text");function Jn(e){return{resolveAll:Gn("text"===e?er:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],l=t.attempt(r,o,a);return o;function o(e){return u(e)?l(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),i;t.consume(e)}function i(e){return u(e)?(t.exit("data"),l(e)):(t.consume(e),i)}function u(e){if(null===e)return!0;const t=r[e];let l=-1;if(t)for(;++l<t.length;){const e=t[l];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Gn(e){return function(t,n){let r,l=-1;for(;++l<=t.length;)void 0===r?t[l]&&"data"===t[l][1].type&&(r=l,l++):t[l]&&"data"===t[l][1].type||(l!==r+2&&(t[r][1].end=t[l-1][1].end,t.splice(r+2,l-r-2),l=r+2),r=void 0);return e?e(t,n):t}}function er(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],l=t.sliceStream(r);let o,a=l.length,i=-1,u=0;for(;a--;){const e=l[a];if("string"==typeof e){for(i=e.length;32===e.charCodeAt(i-1);)u++,i--;if(i)break;i=-1}else if(-2===e)o=!0,u++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const l={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?i:r.start._bufferIndex+i,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const tr={42:$n,43:$n,45:$n,48:$n,49:$n,50:$n,51:$n,52:$n,53:$n,54:$n,55:$n,56:$n,57:$n,62:un},nr={91:En},rr={[-2]:pn,[-1]:pn,32:pn},lr={35:In,42:Vn,45:[Qn,Vn],60:zn,61:Qn,95:Vn,96:dn,126:dn},or={38:cn,92:sn},ar={[-5]:Hn,[-4]:Hn,[-3]:Hn,33:Bn,38:cn,42:rn,60:[on,jn],91:Un,92:[Pn,sn],93:On,95:rn,96:mn},ir={null:[rn,Yn]},ur=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:nr,disable:{null:[]},document:tr,flow:lr,flowInitial:rr,insideSpan:ir,string:or,text:ar},Symbol.toStringTag,{value:"Module"}));function sr(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const l={},o=[];let a=[],i=[];const u={attempt:g(function(e,t){y(e,t.from)}),check:g(m),consume:function(e){$t(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));s.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),s.events.push(["enter",n,s]),i.push(n),n},exit:function(e){const t=i.pop();return t.end=d(),s.events.push(["exit",t,s]),t},interrupt:g(m,{interrupt:!0})},s={code:null,containerState:{},defineSkip:function(e){l[e.line]=e.column,v()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let l;for(;++n<e.length;){const o=e[n];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&l)continue;a=" ";break;default:a=String.fromCharCode(o)}l=-2===o,r.push(a)}return r.join("")}(f(e),t)},sliceStream:f,write:function(e){if(a=Lt(a,e),p(),null!==a[a.length-1])return[];return y(t,0),s.events=nn(o,s.events,s),s.events}};let c=t.tokenize.call(s,u);return t.resolveAll&&o.push(t),s;function f(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let a;if(n===l)a=[e[n].slice(r,o)];else{if(a=e.slice(n,l),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}o>0&&a.push(e[l].slice(0,o))}return a}(a,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:l,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:l,offset:o}}function p(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){c=c(e)}function m(e,t){t.restore()}function g(e,t){return function(n,l,o){let a,c,f,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,c=0,0===e.length?o:m(e[c])}function m(e){return function(n){p=function(){const e=d(),t=s.previous,n=s.currentConstruct,l=s.events.length,o=Array.from(i);return{from:l,restore:a};function a(){r=e,s.previous=t,s.currentConstruct=n,s.events.length=l,i=o,v()}}(),f=e,e.partial||(s.currentConstruct=e);if(e.name&&s.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(s),t):s,u,g,y)(n)}}function g(t){return e(f,p),l}function y(e){return p.restore(),++c<a.length?m(a[c]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&Tt(s.events,t,s.events.length-t,e.resolve(s.events.slice(t),s)),e.resolveTo&&(s.events=e.resolveTo(s.events,s))}function v(){r.line in l&&r.column<2&&(r.column=l[r.line],r.offset+=l[r.line]-1)}}function cr(e){const t={constructs:function(e){const t={};let n=-1;for(;++n<e.length;)Mt(t,e[n]);return t}([ur,...(e||{}).extensions||[]]),content:n(Jt),defined:[],document:n(Gt),flow:n(Kn),lazy:{},string:n(Xn),text:n(Zn)};return t;function n(e){return function(n){return sr(t,e,n)}}}const fr=/[\0\t\n\r]/g;const dr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function pr(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return jt(n.slice(t?2:1),t?16:10)}return It(n)||e}const hr={}.hasOwnProperty;function mr(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:C,autolinkEmail:C,atxHeading:o(Z),blockQuote:o(q),characterEscape:C,characterReference:C,codeFenced:o(Q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Q,a),codeText:o(K,a),codeTextData:C,data:C,codeFlowValue:C,definition:o(Y),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(X),hardBreakEscape:o(J),hardBreakTrailing:o(J),htmlFlow:o(G,a),htmlFlowData:C,htmlText:o(G,a),htmlTextData:C,image:o(ee),label:a,link:o(te),listItem:o(re),listItemValue:d,listOrdered:o(ne,f),listUnordered:o(ne),paragraph:o(le),reference:A,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Z),strong:o(oe),thematicBreak:o(ie)},exit:{atxHeading:u(),atxHeadingSequence:x,autolink:u(),autolinkEmail:W,autolinkProtocol:$,blockQuote:u(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:H,characterReference:V,codeFenced:u(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:E,codeIndented:u(y),codeText:u(L),codeTextData:E,data:E,definition:u(),definitionDestinationString:k,definitionLabelString:v,definitionTitleString:b,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(I),htmlFlowData:E,htmlText:u(T),htmlTextData:E,image:u(M),label:j,labelText:D,lineEnding:N,link:u(z),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:B,resourceDestinationString:O,resourceTitleString:R,resource:F,setextHeading:u(_),setextHeadingLineSequence:S,setextHeadingText:w,strong:u(),thematicBreak:u()}};yr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:i,exit:s,buffer:a,resume:c,data:n},u=[];let f=-1;for(;++f<e.length;)if("listOrdered"===e[f][1].type||"listUnordered"===e[f][1].type)if("enter"===e[f][0])u.push(f);else{f=l(e,u.pop(),f)}for(f=-1;++f<e.length;){const n=t[e[f][0]];hr.call(n,e[f][1].type)&&n[e[f][1].type].call(Object.assign({sliceSerialize:e[f][2].sliceSerialize},o),e[f][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||br).call(o,void 0,e[0])}for(r.position={start:gr(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:gr(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},f=-1;++f<t.transforms.length;)r=t.transforms[f](r)||r;return r}function l(e,t,n){let r,l,o,a,i=t-1,u=-1,s=!1;for(;++i<=n;){const t=e[i];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?u++:u--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||u||o||(o=i),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!u&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===u&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=i;for(l=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;l&&(e[l][1].type="lineEndingBlank",s=!0),t[1].type="lineEnding",l=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!l||o<l)&&(r._spread=!0),r.end=Object.assign({},l?e[l][1].start:t[1].end),e.splice(l||i,0,["exit",r,t[2]]),i++,n++}if("listItemPrefix"===t[1].type){const l={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=l,e.splice(i,0,["enter",l,t[2]]),i++,n++,o=void 0,a=!0}}}return e[t][1]._spread=s,n}function o(e,t){return n;function n(n){i.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function i(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:gr(t.start),end:void 0}}function u(e){return t;function t(t){e&&e.call(this,t),s.call(this,t)}}function s(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+rt({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||br).call(this,e,r[0])}n.position.end=gr(e.end)}function c(){return function(e){return Et(e,"boolean"!=typeof Ct.includeImageAlt||Ct.includeImageAlt,"boolean"!=typeof Ct.includeHtml||Ct.includeHtml)}(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ot(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function C(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:gr(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=gr(e.end)}function N(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=gr(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(C.call(this,e),E.call(this,e))}function P(){this.data.atHardBreak=!0}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function z(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(dr,pr)}(t),n.identifier=Ot(t).toLowerCase()}function j(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function O(){const e=this.resume();this.stack[this.stack.length-1].url=e}function R(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ot(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function U(e){this.data.characterReferenceType=e.type}function H(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=jt(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=It(t)}this.stack[this.stack.length-1].value+=r}function V(e){this.stack.pop().position.end=gr(e.end)}function $(e){E.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){E.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function Z(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function G(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function le(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function ie(){return{type:"thematicBreak"}}}(n)(function(e){for(;!vn(e););return e}(cr(n).document().write(function(){let e,t=1,n="",r=!0;return function(l,o,a){const i=[];let u,s,c,f,d;for(l=n+("string"==typeof l?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,n="",r&&(65279===l.charCodeAt(0)&&c++,r=void 0);c<l.length;){if(fr.lastIndex=c,u=fr.exec(l),f=u&&void 0!==u.index?u.index:l.length,d=l.charCodeAt(f),!u){n=l.slice(c);break}if(10===d&&c===f&&e)i.push(-3),e=void 0;else switch(e&&(i.push(-5),e=void 0),c<f&&(i.push(l.slice(c,f)),t+=f-c),d){case 0:i.push(65533),t++;break;case 9:for(s=4*Math.ceil(t/4),i.push(-2);t++<s;)i.push(-1);break;case 10:i.push(-4),t=1;break;default:e=!0,t=1}c=f+1}return a&&(e&&i.push(-5),n&&i.push(n),i.push(null)),i}}()(e,t,!0))))}function gr(e){return{line:e.line,column:e.column,offset:e.offset}}function yr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?yr(e,r):vr(e,r)}}function vr(e,t){let n;for(n in t)if(hr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function br(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+rt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+rt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+rt({start:t.start,end:t.end})+") is still open")}function kr(e){const t=this;t.parser=function(n){return mr(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xr(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const l=e.all(t),o=l[0];o&&"text"===o.type?o.value="["+o.value:l.unshift({type:"text",value:"["});const a=l[l.length-1];return a&&"text"===a.type?a.value+=r:l.push({type:"text",value:r}),l}function wr(e){const t=e.spread;return null==t?e.children.length>1:t}function Sr(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),l=0;const o=[];for(;r;)o.push(_r(t.slice(l,r.index),l>0,!0),r[0]),l=r.index+r[0].length,r=n.exec(t);return o.push(_r(t.slice(l),l>0,!1)),o.join("")}function _r(e,t,n){let r=0,l=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(l-1);for(;9===t||32===t;)l--,t=e.codePointAt(l-1)}return l>r?e.slice(r,l):""}const Cr={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(r.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:r,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},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),l=Xt(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,i=e.footnoteCounts.get(r);void 0===i?(i=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,i+=1,e.footnoteCounts.set(r,i);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+l,id:n+"fnref-"+l+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,s),e.applyData(t,s)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xr(e,t);const l={src:Xt(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(l.title=r.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:Xt(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xr(e,t);const l={href:Xt(r.url||"")};null!==r.title&&void 0!==r.title&&(l.title=r.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:Xt(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),l=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=wr(n[r])}return t}(n):wr(t),o={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let i=-1;for(;++i<r.length;){const e=r[i];(l||0!==i||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||l?a.push(e):a.push(...e.children)}const u=r[r.length-1];u&&(l||"element"!==u.type||"p"!==u.tagName)&&a.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,s),e.applyData(t,s)},list:function(e,t){const n={},r=e.all(t);let l=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++l<r.length;){const e=r[l];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.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)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),l=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),l.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=tt(t.children[1]),a=et(t.children[t.children.length-1]);o&&a&&(r.position={start:o,end:a}),l.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,l=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length;let i=-1;const u=[];for(;++i<a;){const n=t.children[i],r={},a=o?o[i]:void 0;a&&(r.align=a);let s={type:"element",tagName:l,properties:r,children:[]};n&&(s.children=e.all(n),e.patch(n,s),s=e.applyData(n,s)),u.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,s),e.applyData(t,s)},text:function(e,t){const n={type:"text",value:Sr(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Er,yaml:Er,definition:Er,footnoteDefinition:Er};function Er(){}const Nr="object"==typeof self?self:globalThis,Pr=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=l=>{if(e.has(l))return e.get(l);const[o,a]=t[l];switch(o){case 0:case-1:return n(a,l);case 1:{const e=n([],l);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},l);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),l);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),l)}case 5:{const e=n(new Map,l);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,l);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new Nr[e](t),l)}case 8:return n(BigInt(a),l);case"BigInt":return n(Object(BigInt(a)),l);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new Nr[o](a),l)};return r})(new Map,e)(0),Ir="",{toString:Tr}={},{keys:Lr}=Object,zr=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Tr.call(e).slice(8,-1);switch(n){case"Array":return[1,Ir];case"Object":return[2,Ir];case"Date":return[3,Ir];case"RegExp":return[4,Ir];case"Map":return[5,Ir];case"Set":return[6,Ir];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Mr=([e,t])=>0===e&&("function"===t||"symbol"===t),Dr=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const l=(e,t)=>{const l=r.push(e)-1;return n.set(t,l),l},o=r=>{if(n.has(r))return n.get(r);let[a,i]=zr(r);switch(a){case 0:{let t=r;switch(i){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+i);t=null;break;case"undefined":return l([-1],r)}return l([a,t],r)}case 1:{if(i){let e=r;return"DataView"===i?e=new Uint8Array(r.buffer):"ArrayBuffer"===i&&(e=new Uint8Array(r)),l([i,[...e]],r)}const e=[],t=l([a,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(i)switch(i){case"BigInt":return l([i,r.toString()],r);case"Boolean":case"Number":case"String":return l([i,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],u=l([a,n],r);for(const t of Lr(r))!e&&Mr(zr(r[t]))||n.push([o(t),o(r[t])]);return u}case 3:return l([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return l([a,{source:e,flags:t}],r)}case 5:{const t=[],n=l([a,t],r);for(const[l,a]of r)(e||!Mr(zr(l))&&!Mr(zr(a)))&&t.push([o(l),o(a)]);return n}case 6:{const t=[],n=l([a,t],r);for(const l of r)!e&&Mr(zr(l))||t.push(o(l));return n}}const{message:u}=r;return l([a,{name:i,message:u}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},jr="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Pr(Dr(e,t)):structuredClone(e):(e,t)=>Pr(Dr(e,t));function Or(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Rr(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Fr=function(e){if(null==e)return Br;if("function"==typeof e)return Ar(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fr(e[n]);return Ar(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return Ar(n);function n(n){const r=n;let l;for(l in e)if(r[l]!==t[l])return!1;return!0}}(e);if("string"==typeof e)return function(e){return Ar(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Ar(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Br(){return!0}const Ur=[],Hr=!0,Vr=!1;function $r(e,t,n,r){let l;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):l=t;const o=Fr(l),a=r?-1:1;!function e(l,i,u){const s=l&&"object"==typeof l?l:{};if("string"==typeof s.type){const e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(c,"name",{value:"node ("+l.type+(e?"<"+e+">":"")+")"})}return c;function c(){let s,c,f,d=Ur;if((!t||o(l,i,u[u.length-1]||void 0))&&(d=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Hr,e];return null==e?Ur:[e]}(n(l,u)),d[0]===Vr))return d;if("children"in l&&l.children){const t=l;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+a,f=u.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(s=e(n,c,f)(),s[0]===Vr)return s;c="number"==typeof s[1]?s[1]:c+a}}return d}}(e,void 0,[])()}function Wr(e,t,n,r){let l,o,a;"function"==typeof t&&"function"!=typeof n?(o=void 0,a=t,l=n):(o=t,a=n,l=r),$r(e,o,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},l)}const qr={}.hasOwnProperty,Qr={};function Kr(e,t){e.position&&(t.position=function(e){const t=tt(e),n=et(e);if(t&&n)return{start:t,end:n}}(e))}function Yr(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,l=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&l&&Object.assign(n.properties,jr(l)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Xr(e,t){const n=t.data||{},r=!("value"in t)||qr.call(n,"hProperties")||qr.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Zr(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Jr(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Gr(e,t){const n=function(e,t){const n=t||Qr,r=new Map,l=new Map,o=new Map,a={...Cr,...n.handlers},i={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const l=i.one(n[r],e);if(l){if(r&&"break"===n[r-1].type&&(Array.isArray(l)||"text"!==l.type||(l.value=Jr(l.value)),!Array.isArray(l)&&"element"===l.type)){const e=l.children[0];e&&"text"===e.type&&(e.value=Jr(e.value))}Array.isArray(l)?t.push(...l):t.push(l)}}}return t},applyData:Yr,definitionById:r,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=i.handlers[n];if(qr.call(i.handlers,n)&&r)return r(i,e,t);if(i.options.passThrough&&i.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=jr(n);return r.children=i.all(e),r}return jr(e)}return(i.options.unknownHandler||Xr)(i,e,t)},options:n,patch:Kr,wrap:Zr};return Wr(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:l,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),i}(e,t),r=n.one(e,void 0),l=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Or,r=e.options.footnoteBackLabel||Rr,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const o=e.all(l),a=String(l.identifier).toUpperCase(),s=Xt(a.toLowerCase());let c=0;const f=[],d=e.footnoteCounts.get(a);for(;void 0!==d&&++c<=d;){f.length>0&&f.push({type:"text",value:" "});let e="string"==typeof n?n:n(u,c);"string"==typeof e&&(e={type:"text",value:e}),f.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(u,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=o[o.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...f)}else o.push(...f);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+s},children:e.wrap(o,!0)};e.patch(l,h),i.push(h)}if(0!==i.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...jr(a),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(i,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return l&&o.children.push({type:"text",value:"\n"},l),o}function el(e,t){return e&&"run"in e?async function(n,r){const l=Gr(n,{file:r,...t});await e.run(l,r)}:function(n,r){return Gr(n,{file:r,...e||t})}}function tl(e){if(e)throw e}var nl,rl;var ll=function(){if(rl)return nl;rl=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,l=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!l&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},i=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return nl=function e(){var t,n,r,u,s,c,f=arguments[0],d=1,p=arguments.length,h=!1;for("boolean"==typeof f&&(h=f,f=arguments[1]||{},d=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=i(f,n),f!==(u=i(t,n))&&(h&&u&&(o(u)||(s=l(u)))?(s?(s=!1,c=r&&l(r)?r:[]):c=r&&o(r)?r:{},a(f,{name:n,newValue:e(h,c,u)})):void 0!==u&&a(f,{name:n,newValue:u}));return f},nl}();const ol=r(ll);function al(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function il(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function l(o,...a){const i=e[++n];let u=-1;if(o)r(o);else{for(;++u<t.length;)null!==a[u]&&void 0!==a[u]||(a[u]=t[u]);t=a,i?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(l);try{i=e.apply(this,t)}catch(o){if(r&&n)throw o;return l(o)}r||(i&&i.then&&"function"==typeof i.then?i.then(a,l):i instanceof Error?l(i):a(i))}function l(e,...r){n||(n=!0,t(e,...r))}function a(e){l(null,e)}}(i,l)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const ul={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');sl(e);let n,r=0,l=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else l<0&&(n=!0,l=o+1);return l<0?"":e.slice(r,l)}if(t===e)return"";let a=-1,i=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),i>-1&&(e.codePointAt(o)===t.codePointAt(i--)?i<0&&(l=o):(i=-1,l=a));r===l?l=a:l<0&&(l=e.length);return e.slice(r,l)},dirname:function(e){if(sl(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){sl(e);let t,n=e.length,r=-1,l=0,o=-1,a=0;for(;n--;){const i=e.codePointAt(n);if(47!==i)r<0&&(t=!0,r=n+1),46===i?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1);else if(t){l=n+1;break}}if(o<0||r<0||0===a||1===a&&o===r-1&&o===l+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)sl(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){sl(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,l="",o=0,a=-1,i=0,u=-1;for(;++u<=e.length;){if(u<e.length)n=e.codePointAt(u);else{if(47===n)break;n=47}if(47===n){if(a===u-1||1===i);else if(a!==u-1&&2===i){if(l.length<2||2!==o||46!==l.codePointAt(l.length-1)||46!==l.codePointAt(l.length-2))if(l.length>2){if(r=l.lastIndexOf("/"),r!==l.length-1){r<0?(l="",o=0):(l=l.slice(0,r),o=l.length-1-l.lastIndexOf("/")),a=u,i=0;continue}}else if(l.length>0){l="",o=0,a=u,i=0;continue}t&&(l=l.length>0?l+"/..":"..",o=2)}else l.length>0?l+="/"+e.slice(a+1,u):l=e.slice(a+1,u),o=u-a-1;a=u,i=0}else 46===n&&i>-1?i++:i=-1}return l}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function sl(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cl={cwd:function(){return"/"}};function fl(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function dl(e){if("string"==typeof e)e=new URL(e);else if(!fl(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const pl=["history","path","basename","stem","extname","dirname"];class hl{constructor(e){let t;t=e?fl(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":cl.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<pl.length;){const e=pl[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)pl.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?ul.basename(this.path):void 0}set basename(e){gl(e,"basename"),ml(e,"basename"),this.path=ul.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ul.dirname(this.path):void 0}set dirname(e){yl(this.basename,"dirname"),this.path=ul.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ul.extname(this.path):void 0}set extname(e){if(ml(e,"extname"),yl(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ul.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){fl(e)&&(e=dl(e)),gl(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ul.basename(this.path,this.extname):void 0}set stem(e){gl(e,"stem"),ml(e,"stem"),this.path=ul.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new it(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function ml(e,t){if(e&&e.includes(ul.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ul.sep+"`")}function gl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yl(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const vl=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},bl={}.hasOwnProperty;class kl extends vl{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=il()}copy(){const e=new kl;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(ol(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(_l("data",this.frozen),this.namespace[e]=t,this):bl.call(this.namespace,e)&&this.namespace[e]||void 0:e?(_l("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Nl(e),n=this.parser||this.Parser;return wl("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),wl("process",this.parser||this.Parser),Sl("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,l){const o=Nl(e),a=n.parse(o);function i(e,n){e||!n?l(e):r?r(n):t(void 0,n)}n.run(a,o,function(e,t,r){if(e||!t||!r)return i(e);const l=t,o=n.stringify(l,r);var a;"string"==typeof(a=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=o:r.result=o,i(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),wl("processSync",this.parser||this.Parser),Sl("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,tl(e),t=r}),El("processSync","process",n),t}run(e,t,n){Cl(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?l(void 0,n):new Promise(l);function l(l,o){const a=Nl(t);r.run(e,a,function(t,r,a){const i=r||e;t?o(t):l?l(i):n(void 0,i,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){tl(e),n=t,r=!0}),El("runSync","run",r),n}stringify(e,t){this.freeze();const n=Nl(t),r=this.compiler||this.Compiler;return Sl("stringify",r),Cl(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(_l("use",this.frozen),null==e);else if("function"==typeof e)i(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):o(e)}return this;function l(e){if("function"==typeof e)i(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;i(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=ol(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){l(e[t])}}}function i(e,t){let r=-1,l=-1;for(;++r<n.length;)if(n[r][0]===e){l=r;break}if(-1===l)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const a=n[l][1];al(a)&&al(r)&&(r=ol(!0,a,r)),n[l]=[e,r,...o]}}}}const xl=(new kl).freeze();function wl(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Sl(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function _l(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 Cl(e){if(!al(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function El(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Nl(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new hl(e)}const Pl=[],Il={allowDangerousHtml:!0},Tl=/^(https?|ircs?|mailto|xmpp)$/i,Ll=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zl(e){const t=function(e){const t=e.rehypePlugins||Pl,n=e.remarkPlugins||Pl,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Il}:Il,l=xl().use(kr).use(n).use(el,r).use(t);return l}(e),n=function(e){const t=e.children||"",n=new hl;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,l=t.components,o=t.disallowedElements,a=t.skipHtml,i=t.unwrapDisallowed,u=t.urlTransform||Ml;for(const c of Ll)Object.hasOwn(t,c.from)&&ne((c.from,c.to&&c.to,c.id));return Wr(e,s),ht(e,{Fragment:I.Fragment,components:l,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function s(e,t,l){if("raw"===e.type&&l&&"number"==typeof t)return a?l.children.splice(t,1):l.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in _t)if(Object.hasOwn(_t,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=_t[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=u(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!o&&o.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,l)),a&&l&&"number"==typeof t)return i&&e.children?l.children.splice(t,1,...e.children):l.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function Ml(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),l=e.indexOf("/");return-1===t||-1!==l&&t>l||-1!==n&&t>n||-1!==r&&t>r||Tl.test(e.slice(0,t))?e:""}const Dl="_messageWrapper_1thak_1",jl="_user_1thak_19",Ol="_assistant_1thak_24",Rl="_avatar_1thak_28",Fl="_avatarPlaceholder_1thak_43",Al="_brainbaseLogo_1thak_53",Bl="_messageBubble_1thak_58",Ul="_error_1thak_76",Hl="_content_1thak_81",Vl="_markdown_1thak_92",$l="_cursor_1thak_183",Wl="_errorIndicator_1thak_202",ql=({message:e,agentName:t,agentLogoUrl:n})=>{const r="user"===e.role,l="streaming"===e.status,o="error"===e.status;return I.jsxs("div",{className:`${Dl} ${r?jl:Ol}`,children:[!r&&I.jsx("div",{className:Rl,children:n?I.jsx("img",{src:n,alt:t||"AI"}):I.jsx("div",{className:Fl,children:I.jsx(F,{className:Al,color:"white",cutoutColor:"var(--bb-primary-color)"})})}),I.jsxs("div",{className:`${Bl} ${o?Ul:""}`,role:"article","aria-label":""+(r?"Your message":`${t||"AI"} says`),children:[I.jsxs("div",{className:`${Hl} ${r?"":Vl}`,children:[r?e.content:I.jsx(zl,{components:{a:({href:e,children:t})=>e?I.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t}):I.jsx(I.Fragment,{children:t})},children:e.content}),l&&I.jsx("span",{className:$l})]}),o&&I.jsxs("div",{className:Wl,children:[I.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[I.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),I.jsx("path",{d:"M12 8V12M12 16H12.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),I.jsx("span",{children:"Failed to send"})]})]})]})},Ql="_toolCall_1wby1_1",Kl="_iconWrapper_1wby1_24",Yl="_spinner_1wby1_33",Xl="_checkIcon_1wby1_48",Zl="_errorIcon_1wby1_54",Jl="_content_1wby1_60",Gl="_label_1wby1_66",eo="_name_1wby1_73",to="_pending_1wby1_78",no="_completed_1wby1_82",ro="_error_1wby1_54",lo=({toolCall:e})=>{const t="pending"===e.status||"executing"===e.status,n="completed"===e.status,r="error"===e.status;return I.jsxs("div",{className:`${Ql} ${t?to:""} ${n?no:""} ${r?ro:""}`,children:[I.jsx("div",{className:Kl,children:t?I.jsx("div",{className:Yl}):n?I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:Xl,children:I.jsx("path",{d:"M20 6L9 17L4 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:Zl,children:I.jsx("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),I.jsxs("div",{className:Jl,children:[I.jsx("span",{className:Gl,children:t?"Running":n?"Completed":"Failed"}),I.jsx("span",{className:eo,children:(l=e.name,l.replace(/_/g," ").replace(/([A-Z])/g," $1").trim().toLowerCase().replace(/^./,e=>e.toUpperCase()))})]})]});var l},oo="_wrapper_10rss_2",ao="_avatar_10rss_22",io="_avatarPlaceholder_10rss_37",uo="_brainbaseLogo_10rss_47",so="_bubble_10rss_52",co="_dot_10rss_63",fo=({agentName:e="AI",agentLogoUrl:t})=>I.jsxs("div",{className:oo,role:"status","aria-label":`${e} is typing`,children:[I.jsx("div",{className:ao,children:t?I.jsx("img",{src:t,alt:e}):I.jsx("div",{className:io,children:I.jsx(F,{className:uo,color:"white",cutoutColor:"var(--bb-primary-color)"})})}),I.jsxs("div",{className:so,children:[I.jsx("span",{className:co}),I.jsx("span",{className:co}),I.jsx("span",{className:co})]})]}),po="_messageList_241kk_1",ho="_emptyState_241kk_29",mo="_emptyIcon_241kk_40",go="_emptyText_241kk_52",yo=({messages:e,toolCalls:t=[],isLoading:n,agentName:r,agentLogoUrl:l})=>{var o;const a=c.useRef(null),i=c.useRef(null);c.useEffect(()=>{var e;null==(e=i.current)||e.scrollIntoView({behavior:"smooth"})},[e,t,n]);const u=t.filter(e=>"pending"===e.status||"executing"===e.status);return I.jsxs("div",{className:po,ref:a,role:"log","aria-live":"polite",children:[0===e.length&&!n&&I.jsxs("div",{className:ho,children:[I.jsx("div",{className:mo,children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M8 12H8.01M12 12H12.01M16 12H16.01M21 12C21 16.4183 16.9706 20 12 20C10.4607 20 9.01172 19.6565 7.74467 19.0511L3 20L4.39499 16.28C3.51156 15.0423 3 13.5743 3 12C3 7.58172 7.02944 4 12 4C16.9706 4 21 7.58172 21 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),I.jsx("p",{className:go,children:"Start a conversation"})]}),e.map(e=>I.jsx(ql,{message:e,agentName:r,agentLogoUrl:l},e.id)),u.map(e=>I.jsx(lo,{toolCall:e},e.id)),n&&"user"===(null==(o=e[e.length-1])?void 0:o.role)&&I.jsx(fo,{agentName:r,agentLogoUrl:l}),I.jsx("div",{ref:i})]})},vo="_inputWrapper_5lgg7_1",bo="_inputContainer_5lgg7_7",ko="_textarea_5lgg7_23",xo="_sendButton_5lgg7_50",wo="_hint_5lgg7_89",So=({onSend:e,disabled:t=!1,placeholder:n="Send a message..."})=>{const[r,l]=c.useState(""),o=c.useRef(null),a=c.useCallback(()=>{const e=o.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,150)}px`)},[]);c.useEffect(()=>{a()},[r,a]);const i=c.useCallback(n=>{null==n||n.preventDefault();const a=r.trim();a&&!t&&(e(a),l(""),o.current&&(o.current.style.height="auto"))},[r,t,e]),u=c.useCallback(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),i())},[i]);return I.jsxs("form",{className:vo,onSubmit:i,children:[I.jsxs("div",{className:bo,children:[I.jsx("textarea",{ref:o,className:ko,value:r,onChange:e=>l(e.target.value),onKeyDown:u,placeholder:n,disabled:t,rows:1,"aria-label":"Message input"}),I.jsx("button",{type:"submit",className:xo,disabled:t||!r.trim(),"aria-label":"Send message",children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M22 2L11 13M22 2L15 22L11 13M22 2L2 9L11 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),I.jsxs("div",{className:wo,children:["Press ",I.jsx("kbd",{children:"Enter"})," to send, ",I.jsx("kbd",{children:"Shift + Enter"})," for new line"]})]})},_o="_poweredBy_9jh5q_1",Co="_logo_9jh5q_20",Eo="_poweredText_9jh5q_24",No="_text_9jh5q_36",Po=({className:e})=>I.jsxs("svg",{className:e,viewBox:"0 0 800 800",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I.jsx("path",{d:"M400 412C400 405.373 405.373 400 412 400H788C794.627 400 800 405.373 800 412V740C800 773.137 773.137 800 740 800H412C405.373 800 400 794.627 400 788V412Z",fill:"currentColor"}),I.jsx("circle",{cx:"400",cy:"400",r:"400",fill:"currentColor"}),I.jsx("path",{d:"M0 60C0 26.8629 26.8629 0 60 0H397.614C398.932 0 400 1.06811 400 2.38569V2.38569C400 221.982 221.982 400 2.38569 400V400C1.06811 400 0 398.932 0 397.614V60Z",fill:"currentColor"}),I.jsx("path",{d:"M400 412C400 405.373 405.373 400 412 400H738C744.627 400 750 405.373 750 412V725C750 738.807 738.807 750 725 750H412C405.373 750 400 744.627 400 738V412Z",fill:"currentColor"}),I.jsx("circle",{cx:"400",cy:"400",r:"350",fill:"currentColor"}),I.jsx("path",{d:"M50 75C50 61.1929 61.1929 50 75 50H388C394.627 50 400 55.3726 400 62V388C400 394.627 394.627 400 388 400H62C55.3726 400 50 394.627 50 388V75Z",fill:"currentColor"}),I.jsx("rect",{x:"399.919",y:"209",width:"270",height:"270",rx:"12",transform:"rotate(45 399.919 209)",fill:"var(--bb-surface-bg, #ffffff)"})]}),Io=({showBranding:e=!0})=>e?I.jsxs("a",{href:"https://brainbaselabs.com/",target:"_blank",rel:"noopener noreferrer",className:_o,"aria-label":"Powered by Brainbase Labs",children:[I.jsx("span",{className:Eo,children:"Powered by"}),I.jsx(Po,{className:Co}),I.jsx("span",{className:No,children:"Brainbase Labs"})]}):null,To="_container_m2o9l_1",Lo="_body_m2o9l_26",zo="_confirmationOverlay_m2o9l_35",Mo="_confirmationDialog_m2o9l_56",Do="_confirmationText_m2o9l_78",jo="_confirmationButtons_m2o9l_86",Oo="_cancelButton_m2o9l_91",Ro="_confirmButton_m2o9l_92",Fo=({config:e,messages:t,toolCalls:n=[],isLoading:r,onSendMessage:l,onClose:o,onNewChat:a})=>{var i;const[u,s]=c.useState(!1),f=t.length>0;return I.jsxs("div",{className:To,role:"dialog","aria-label":"Chat window",children:[I.jsx(ee,{agentName:e.agentName,agentLogoUrl:e.agentLogoUrl,welcomeTitle:e.welcomeMessage||"Hello there.",welcomeSubtitle:e.welcomeMessage?void 0:"How can we help?",onClose:o,onNewChatRequest:()=>{s(!0)},showNewChatButton:f,compact:f}),I.jsxs("div",{className:Lo,children:[I.jsx(yo,{messages:t,toolCalls:n,isLoading:r,agentName:e.agentName,agentLogoUrl:e.agentLogoUrl}),I.jsx(So,{onSend:l,disabled:r,placeholder:"Ask a question..."})]}),I.jsx(Io,{showBranding:(null==(i=e.styling)?void 0:i.showBranding)??!0}),u&&I.jsx("div",{className:zo,children:I.jsxs("div",{className:Mo,children:[I.jsx("p",{className:Do,children:"End current chat and start a new conversation?"}),I.jsxs("div",{className:jo,children:[I.jsx("button",{className:Oo,onClick:()=>{s(!1)},type:"button",children:"Cancel"}),I.jsx("button",{className:Ro,onClick:()=>{s(!1),null==a||a()},type:"button",children:"End Chat"})]})]})})]})},Ao="_toggleButton_11dqz_1",Bo="_icon_11dqz_31",Uo="_agentLogo_11dqz_36",Ho="_unreadBadge_11dqz_43",Vo=({onClick:e,agentLogoUrl:t,unreadCount:n=0})=>I.jsxs("button",{className:Ao,onClick:e,"aria-label":"Open chat",type:"button",children:[t?I.jsx("img",{src:t,alt:"",className:Uo}):I.jsx("svg",{className:Bo,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:I.jsx("path",{d:"M8 12H8.01M12 12H12.01M16 12H16.01M21 12C21 16.4183 16.9706 20 12 20C10.4607 20 9.01172 19.6565 7.74467 19.0511L3 20L4.39499 16.28C3.51156 15.0423 3 13.5743 3 12C3 7.58172 7.02944 4 12 4C16.9706 4 21 7.58172 21 12Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),n>0&&I.jsx("span",{className:Ho,children:n>9?"9+":n})]}),$o="_container_kgfgt_1",Wo="_header_kgfgt_25",qo="_logoWrapper_kgfgt_38",Qo="_logo_kgfgt_38",Ko="_closeButton_kgfgt_51",Yo="_content_kgfgt_74",Xo="_iconWrapper_kgfgt_84",Zo="_errorIcon_kgfgt_95",Jo="_title_kgfgt_101",Go="_description_kgfgt_109",ea="_retryButton_kgfgt_117",ta="_footer_kgfgt_139",na="_poweredBy_kgfgt_146",ra="_footerLogo_kgfgt_160",la=({errorType:e,message:t,onRetry:n,onClose:r})=>{const{title:l,description:o,icon:a}=(()=>{switch(e){case"not_found":return{title:"Chat Not Found",description:t||"This chat widget is not configured correctly. Please check the embed ID.",icon:I.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:Zo,children:[I.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5"}),I.jsx("path",{d:"M12 7V13M12 16V16.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})};case"network":return{title:"Connection Error",description:t||"Unable to connect to the chat service. Please check your internet connection.",icon:I.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:Zo,children:[I.jsx("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"currentColor",strokeWidth:"1.5"}),I.jsx("path",{d:"M8 15L16 9M8 9L16 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})};default:return{title:"Something Went Wrong",description:t||"An unexpected error occurred. Please try again later.",icon:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:Zo,children:I.jsx("path",{d:"M12 9V13M12 17H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}}})();return I.jsxs("div",{className:$o,children:[I.jsxs("div",{className:Wo,children:[I.jsx("div",{className:qo,children:I.jsx(F,{className:Qo,color:"white",cutoutColor:"var(--bb-primary-color)"})}),r&&I.jsx("button",{className:Ko,onClick:r,"aria-label":"Close",type:"button",children:I.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:I.jsx("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),I.jsxs("div",{className:Yo,children:[I.jsx("div",{className:Xo,children:a}),I.jsx("h2",{className:Jo,children:l}),I.jsx("p",{className:Go,children:o}),n&&I.jsx("button",{className:ea,onClick:n,type:"button",children:"Try Again"})]}),I.jsx("div",{className:ta,children:I.jsxs("a",{href:"https://brainbaselabs.com",target:"_blank",rel:"noopener noreferrer",className:na,children:["Powered by"," ",I.jsx(F,{className:ra,color:"var(--bb-text-tertiary)",cutoutColor:"var(--bb-surface-bg)"}),I.jsx("span",{children:"Brainbase Labs"})]})})]})},oa={widget:"_widget_1ehud_1","bottom-right":"_bottom-right_1ehud_10","bottom-left":"_bottom-left_1ehud_17",inline:"_inline_1ehud_25"},aa=({embedId:e,apiBaseUrl:t=D,mockMode:n=!1,mockResponses:r,position:l="bottom-right",defaultOpen:o=!1,primaryColor:a,agentName:i,welcomeMessage:u,showBranding:s,className:f,onSessionStart:d,onSessionEnd:p,onMessage:h,onError:m})=>{const[g,y]=c.useState(o),[v,b]=c.useState(null),[k,x]=c.useState(!0),[w,S]=c.useState(null),[_,C]=c.useState(),E=c.useMemo(()=>n?function(e,t){const n={...j,...e},r=t??O,l=`mock-session-${Date.now()}`;return{getDeploymentConfig:async e=>(await R(300),n),async*sendMessage(e){yield{type:"session",data:{session_id:l,is_new:!0},timestamp:Date.now()};const t=r.find(t=>"string"==typeof t.trigger?e.toLowerCase().includes(t.trigger.toLowerCase()):t.trigger.test(e))??r[r.length-1];if(await R(t.delay??500),t.toolCalls)for(const r of t.toolCalls)yield{type:"tool_call",data:{function:r.name,args:r.arguments},timestamp:Date.now()},await R(300),yield{type:"tool_call",data:{function:r.name,result:r.result},timestamp:Date.now()},await R(200);const n=t.response.split(" ");let o="";for(const r of n)o+=(o?" ":"")+r,yield{type:"message",data:{content:o,role:"assistant"},timestamp:Date.now()},await R(30+40*Math.random());yield{type:"done",data:{session_id:l},timestamp:Date.now()}}}}({primaryColor:a,agentName:i,welcomeMessage:u},r):function(e=D){return{async getDeploymentConfig(t){const n=await fetch(`${e}/chat/config/${t}`);if(!n.ok)throw new Error(`Failed to fetch deployment config: ${n.status}`);const r=await n.json();return{embedId:r.embedId,deploymentId:"",workerId:"",flowId:"",welcomeMessage:r.welcomeMessage,agentName:r.agentName,agentLogoUrl:r.agentLogoUrl,primaryColor:r.primaryColor,styling:r.styling}},async sendMessage(t){const n=await fetch(`${e}/chat/message`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({embed_id:t.embedId,message:t.message,session_id:t.sessionId||void 0,metadata:t.metadata})});if(!n.ok){const e=await n.text();throw new Error(`Failed to send message: ${n.status} - ${e}`)}if(!n.body)throw new Error("No response stream available");return n.body}}}(t),[n,a,i,u,r,t]),N=c.useCallback(async()=>{x(!0),S(null),C(void 0);try{const t=await E.getDeploymentConfig(e);b({...t,primaryColor:a??t.primaryColor,agentName:i??t.agentName,welcomeMessage:u??t.welcomeMessage,styling:{...t.styling??{},...void 0!==s?{showBranding:s}:{}}})}catch(t){const r=t instanceof Error?t:new Error("Failed to load config");r.message.includes("404")?(S("not_found"),C("The chat widget with this embed ID was not found.")):r.message.includes("Failed to fetch")||r.message.includes("network")?S("network"):S("unknown"),n&&(b({embedId:e,deploymentId:"mock-deployment",workerId:"mock-worker",flowId:"mock-flow",primaryColor:a??"#1a1a2e",agentName:i??"AI Assistant",styling:void 0!==s?{showBranding:s}:void 0}),S(null)),null==m||m(r)}finally{x(!1)}},[e,n,E,a,i,u,m]);c.useEffect(()=>{N()},[N]);const P=c.useMemo(()=>v||{embedId:e,deploymentId:"",workerId:"",flowId:"",primaryColor:a,agentName:i,welcomeMessage:u,styling:void 0!==s?{showBranding:s}:void 0},[v,e,a,i,u,s]),T=M({config:P,apiClient:E,mockMode:n,onSessionStart:d,onSessionEnd:p,onMessage:h,onError:m}),L=c.useMemo(()=>({"--bb-primary-color":(null==v?void 0:v.primaryColor)??a??"#1a1a2e"}),[null==v?void 0:v.primaryColor,a]),z=()=>{y(!1)},F=()=>{N()},A="inline"===l;return k?null:w&&!n?A||g?I.jsx("div",{className:`${oa.widget} ${oa[l]} ${f??""}`,style:L,children:I.jsx(la,{errorType:w,message:_,onRetry:F,onClose:A?void 0:z})}):I.jsx("div",{className:`${oa.widget} ${oa[l]} ${f??""}`,style:L,children:I.jsx(Vo,{onClick:()=>y(!0),agentName:i})}):I.jsx("div",{className:`${oa.widget} ${oa[l]} ${f??""}`,style:L,children:g||A?I.jsx(Fo,{config:P,messages:T.messages,isLoading:T.isLoading,onSendMessage:T.sendMessage,onClose:A?void 0:z,onNewChat:()=>{T.endSession(),T.startNewSession()}}):I.jsx(Vo,{onClick:()=>y(!0),agentName:null==v?void 0:v.agentName,agentLogoUrl:null==v?void 0:v.agentLogoUrl})})};class ia extends HTMLElement{constructor(){super(...arguments),n(this,"root",null),n(this,"container",null)}static get observedAttributes(){return["embed-id","position","primary-color","agent-name","welcome-message","api-base-url","default-open"]}connectedCallback(){this.container=document.createElement("div"),this.container.className="brainbase-chat-container",this.appendChild(this.container),this.root=E.createRoot(this.container),this.render()}disconnectedCallback(){this.root&&(this.root.unmount(),this.root=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null)}attributeChangedCallback(e,t,n){t!==n&&this.root&&this.render()}render(){if(!this.root)return;const e=this.getProps();e.embedId?this.root.render(f.createElement(aa,e)):console.warn("[Brainbase Chat] embed-id attribute is required")}getProps(){return{embedId:this.getAttribute("embed-id")||"",position:this.getPositionAttribute(),primaryColor:this.getAttribute("primary-color")||void 0,agentName:this.getAttribute("agent-name")||void 0,welcomeMessage:this.getAttribute("welcome-message")||void 0,apiBaseUrl:this.getAttribute("api-base-url")||void 0,defaultOpen:"true"===this.getAttribute("default-open")}}getPositionAttribute(){const e=this.getAttribute("position");return"bottom-left"===e||"inline"===e?e:"bottom-right"}}return"undefined"==typeof customElements||customElements.get("brainbase-chat")||customElements.define("brainbase-chat",ia),"undefined"!=typeof window&&console.log("[Brainbase Chat] Widget loaded and ready"),e.ChatWidgetElement=ia,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});