open-edison 0.1.85rc1__py3-none-any.whl → 0.1.86__py3-none-any.whl

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.
@@ -0,0 +1,51 @@
1
+ var Yp=Object.defineProperty;var Xp=(e,t,n)=>t in e?Yp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xn=(e,t,n)=>Xp(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function Hc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gp(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Qc={exports:{}},hs={},Kc={exports:{}},je={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Qo=Symbol.for("react.element"),Zp=Symbol.for("react.portal"),eh=Symbol.for("react.fragment"),th=Symbol.for("react.strict_mode"),nh=Symbol.for("react.profiler"),rh=Symbol.for("react.provider"),oh=Symbol.for("react.context"),ih=Symbol.for("react.forward_ref"),sh=Symbol.for("react.suspense"),lh=Symbol.for("react.memo"),ah=Symbol.for("react.lazy"),Nu=Symbol.iterator;function uh(e){return e===null||typeof e!="object"?null:(e=Nu&&e[Nu]||e["@@iterator"],typeof e=="function"?e:null)}var Jc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yc=Object.assign,Xc={};function Vr(e,t,n){this.props=e,this.context=t,this.refs=Xc,this.updater=n||Jc}Vr.prototype.isReactComponent={};Vr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Vr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gc(){}Gc.prototype=Vr.prototype;function pa(e,t,n){this.props=e,this.context=t,this.refs=Xc,this.updater=n||Jc}var ha=pa.prototype=new Gc;ha.constructor=pa;Yc(ha,Vr.prototype);ha.isPureReactComponent=!0;var bu=Array.isArray,Zc=Object.prototype.hasOwnProperty,ma={current:null},ed={key:!0,ref:!0,__self:!0,__source:!0};function td(e,t,n){var r,o={},s=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)Zc.call(t,r)&&!ed.hasOwnProperty(r)&&(o[r]=t[r]);var d=arguments.length-2;if(d===1)o.children=n;else if(1<d){for(var h=Array(d),c=0;c<d;c++)h[c]=arguments[c+2];o.children=h}if(e&&e.defaultProps)for(r in d=e.defaultProps,d)o[r]===void 0&&(o[r]=d[r]);return{$$typeof:Qo,type:e,key:s,ref:a,props:o,_owner:ma.current}}function ch(e,t){return{$$typeof:Qo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function va(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qo}function dh(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Pu=/\/+/g;function qs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?dh(""+e.key):t.toString(36)}function Ti(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Qo:case Zp:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+qs(a,0):r,bu(o)?(n="",e!=null&&(n=e.replace(Pu,"$&/")+"/"),Ti(o,t,n,"",function(c){return c})):o!=null&&(va(o)&&(o=ch(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(Pu,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",bu(e))for(var d=0;d<e.length;d++){s=e[d];var h=r+qs(s,d);a+=Ti(s,t,n,h,o)}else if(h=uh(e),typeof h=="function")for(e=h.call(e),d=0;!(s=e.next()).done;)s=s.value,h=r+qs(s,d++),a+=Ti(s,t,n,h,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function fi(e,t,n){if(e==null)return e;var r=[],o=0;return Ti(e,r,"","",function(s){return t.call(n,s,o++)}),r}function fh(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var pt={current:null},Li={transition:null},ph={ReactCurrentDispatcher:pt,ReactCurrentBatchConfig:Li,ReactCurrentOwner:ma};function nd(){throw Error("act(...) is not supported in production builds of React.")}je.Children={map:fi,forEach:function(e,t,n){fi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fi(e,function(){t++}),t},toArray:function(e){return fi(e,function(t){return t})||[]},only:function(e){if(!va(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};je.Component=Vr;je.Fragment=eh;je.Profiler=nh;je.PureComponent=pa;je.StrictMode=th;je.Suspense=sh;je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ph;je.act=nd;je.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Yc({},e.props),o=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=ma.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var d=e.type.defaultProps;for(h in t)Zc.call(t,h)&&!ed.hasOwnProperty(h)&&(r[h]=t[h]===void 0&&d!==void 0?d[h]:t[h])}var h=arguments.length-2;if(h===1)r.children=n;else if(1<h){d=Array(h);for(var c=0;c<h;c++)d[c]=arguments[c+2];r.children=d}return{$$typeof:Qo,type:e.type,key:o,ref:s,props:r,_owner:a}};je.createContext=function(e){return e={$$typeof:oh,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:rh,_context:e},e.Consumer=e};je.createElement=td;je.createFactory=function(e){var t=td.bind(null,e);return t.type=e,t};je.createRef=function(){return{current:null}};je.forwardRef=function(e){return{$$typeof:ih,render:e}};je.isValidElement=va;je.lazy=function(e){return{$$typeof:ah,_payload:{_status:-1,_result:e},_init:fh}};je.memo=function(e,t){return{$$typeof:lh,type:e,compare:t===void 0?null:t}};je.startTransition=function(e){var t=Li.transition;Li.transition={};try{e()}finally{Li.transition=t}};je.unstable_act=nd;je.useCallback=function(e,t){return pt.current.useCallback(e,t)};je.useContext=function(e){return pt.current.useContext(e)};je.useDebugValue=function(){};je.useDeferredValue=function(e){return pt.current.useDeferredValue(e)};je.useEffect=function(e,t){return pt.current.useEffect(e,t)};je.useId=function(){return pt.current.useId()};je.useImperativeHandle=function(e,t,n){return pt.current.useImperativeHandle(e,t,n)};je.useInsertionEffect=function(e,t){return pt.current.useInsertionEffect(e,t)};je.useLayoutEffect=function(e,t){return pt.current.useLayoutEffect(e,t)};je.useMemo=function(e,t){return pt.current.useMemo(e,t)};je.useReducer=function(e,t,n){return pt.current.useReducer(e,t,n)};je.useRef=function(e){return pt.current.useRef(e)};je.useState=function(e){return pt.current.useState(e)};je.useSyncExternalStore=function(e,t,n){return pt.current.useSyncExternalStore(e,t,n)};je.useTransition=function(){return pt.current.useTransition()};je.version="18.3.1";Kc.exports=je;var O=Kc.exports;const bn=Hc(O);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var hh=O,mh=Symbol.for("react.element"),vh=Symbol.for("react.fragment"),gh=Object.prototype.hasOwnProperty,yh=hh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,wh={key:!0,ref:!0,__self:!0,__source:!0};function rd(e,t,n){var r,o={},s=null,a=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)gh.call(t,r)&&!wh.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:mh,type:e,key:s,ref:a,props:o,_owner:yh.current}}hs.Fragment=vh;hs.jsx=rd;hs.jsxs=rd;Qc.exports=hs;var p=Qc.exports,od={exports:{}},Ot={},id={exports:{}},sd={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(R,ne){var he=R.length;R.push(ne);e:for(;0<he;){var T=he-1>>>1,q=R[T];if(0<o(q,ne))R[T]=ne,R[he]=q,he=T;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var ne=R[0],he=R.pop();if(he!==ne){R[0]=he;e:for(var T=0,q=R.length,ve=q>>>1;T<ve;){var be=2*(T+1)-1,Oe=R[be],Pe=be+1,ae=R[Pe];if(0>o(Oe,he))Pe<q&&0>o(ae,Oe)?(R[T]=ae,R[Pe]=he,T=Pe):(R[T]=Oe,R[be]=he,T=be);else if(Pe<q&&0>o(ae,he))R[T]=ae,R[Pe]=he,T=Pe;else break e}}return ne}function o(R,ne){var he=R.sortIndex-ne.sortIndex;return he!==0?he:R.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,d=a.now();e.unstable_now=function(){return a.now()-d}}var h=[],c=[],E=1,S=null,j=3,b=!1,L=!1,U=!1,me=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(R){for(var ne=n(c);ne!==null;){if(ne.callback===null)r(c);else if(ne.startTime<=R)r(c),ne.sortIndex=ne.expirationTime,t(h,ne);else break;ne=n(c)}}function N(R){if(U=!1,w(R),!L)if(n(h)!==null)L=!0,te(A);else{var ne=n(c);ne!==null&&Ce(N,ne.startTime-R)}}function A(R,ne){L=!1,U&&(U=!1,y(K),K=-1),b=!0;var he=j;try{for(w(ne),S=n(h);S!==null&&(!(S.expirationTime>ne)||R&&!se());){var T=S.callback;if(typeof T=="function"){S.callback=null,j=S.priorityLevel;var q=T(S.expirationTime<=ne);ne=e.unstable_now(),typeof q=="function"?S.callback=q:S===n(h)&&r(h),w(ne)}else r(h);S=n(h)}if(S!==null)var ve=!0;else{var be=n(c);be!==null&&Ce(N,be.startTime-ne),ve=!1}return ve}finally{S=null,j=he,b=!1}}var V=!1,D=null,K=-1,fe=5,z=-1;function se(){return!(e.unstable_now()-z<fe)}function Me(){if(D!==null){var R=e.unstable_now();z=R;var ne=!0;try{ne=D(!0,R)}finally{ne?$():(V=!1,D=null)}}else V=!1}var $;if(typeof m=="function")$=function(){m(Me)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,H=J.port2;J.port1.onmessage=Me,$=function(){H.postMessage(null)}}else $=function(){me(Me,0)};function te(R){D=R,V||(V=!0,$())}function Ce(R,ne){K=me(function(){R(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){L||b||(L=!0,te(A))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(R){switch(j){case 1:case 2:case 3:var ne=3;break;default:ne=j}var he=j;j=ne;try{return R()}finally{j=he}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,ne){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var he=j;j=R;try{return ne()}finally{j=he}},e.unstable_scheduleCallback=function(R,ne,he){var T=e.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?T+he:T):he=T,R){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=he+q,R={id:E++,callback:ne,priorityLevel:R,startTime:he,expirationTime:q,sortIndex:-1},he>T?(R.sortIndex=he,t(c,R),n(h)===null&&R===n(c)&&(U?(y(K),K=-1):U=!0,Ce(N,he-T))):(R.sortIndex=q,t(h,R),L||b||(L=!0,te(A))),R},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(R){var ne=j;return function(){var he=j;j=ne;try{return R.apply(this,arguments)}finally{j=he}}}})(sd);id.exports=sd;var xh=id.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var _h=O,Pt=xh;function F(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 ld=new Set,Po={};function ar(e,t){Ar(e,t),Ar(e+"Capture",t)}function Ar(e,t){for(Po[e]=t,e=0;e<t.length;e++)ld.add(t[e])}var dn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_l=Object.prototype.hasOwnProperty,Sh=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ou={},Tu={};function kh(e){return _l.call(Tu,e)?!0:_l.call(Ou,e)?!1:Sh.test(e)?Tu[e]=!0:(Ou[e]=!0,!1)}function Eh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jh(e,t,n,r){if(t===null||typeof t>"u"||Eh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,o,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var ot={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ot[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ot[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ot[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ot[e]=new ht(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){ot[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ot[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ot[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ot[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ot[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var ga=/[\-:]([a-z])/g;function ya(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ga,ya);ot[t]=new ht(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(ga,ya);ot[t]=new ht(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(ga,ya);ot[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ot[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});ot.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ot[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function wa(e,t,n,r){var o=ot.hasOwnProperty(t)?ot[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(jh(t,n,o,r)&&(n=null),r||o===null?kh(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var mn=_h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pi=Symbol.for("react.element"),gr=Symbol.for("react.portal"),yr=Symbol.for("react.fragment"),xa=Symbol.for("react.strict_mode"),Sl=Symbol.for("react.profiler"),ad=Symbol.for("react.provider"),ud=Symbol.for("react.context"),_a=Symbol.for("react.forward_ref"),kl=Symbol.for("react.suspense"),El=Symbol.for("react.suspense_list"),Sa=Symbol.for("react.memo"),Sn=Symbol.for("react.lazy"),cd=Symbol.for("react.offscreen"),Lu=Symbol.iterator;function io(e){return e===null||typeof e!="object"?null:(e=Lu&&e[Lu]||e["@@iterator"],typeof e=="function"?e:null)}var We=Object.assign,Hs;function ho(e){if(Hs===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Hs=t&&t[1]||""}return`
34
+ `+Hs+e}var Qs=!1;function Ks(e,t){if(!e||Qs)return"";Qs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
35
+ `),s=r.stack.split(`
36
+ `),a=o.length-1,d=s.length-1;1<=a&&0<=d&&o[a]!==s[d];)d--;for(;1<=a&&0<=d;a--,d--)if(o[a]!==s[d]){if(a!==1||d!==1)do if(a--,d--,0>d||o[a]!==s[d]){var h=`
37
+ `+o[a].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),h}while(1<=a&&0<=d);break}}}finally{Qs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ho(e):""}function Ch(e){switch(e.tag){case 5:return ho(e.type);case 16:return ho("Lazy");case 13:return ho("Suspense");case 19:return ho("SuspenseList");case 0:case 2:case 15:return e=Ks(e.type,!1),e;case 11:return e=Ks(e.type.render,!1),e;case 1:return e=Ks(e.type,!0),e;default:return""}}function jl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yr:return"Fragment";case gr:return"Portal";case Sl:return"Profiler";case xa:return"StrictMode";case kl:return"Suspense";case El:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ud:return(e.displayName||"Context")+".Consumer";case ad:return(e._context.displayName||"Context")+".Provider";case _a:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Sa:return t=e.displayName||null,t!==null?t:jl(e.type)||"Memo";case Sn:t=e._payload,e=e._init;try{return jl(e(t))}catch{}}return null}function Nh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return jl(t);case 8:return t===xa?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function zn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function dd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bh(e){var t=dd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hi(e){e._valueTracker||(e._valueTracker=bh(e))}function fd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=dd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Cl(e,t){var n=t.checked;return We({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $u(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pd(e,t){t=t.checked,t!=null&&wa(e,"checked",t,!1)}function Nl(e,t){pd(e,t);var n=zn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bl(e,t.type,n):t.hasOwnProperty("defaultValue")&&bl(e,t.type,zn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function bl(e,t,n){(t!=="number"||Vi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mo=Array.isArray;function Or(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+zn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Pl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(F(91));return We({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ru(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(F(92));if(mo(n)){if(1<n.length)throw Error(F(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:zn(n)}}function hd(e,t){var n=zn(t.value),r=zn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Au(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function md(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 Ol(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?md(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var mi,vd=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(mi=mi||document.createElement("div"),mi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=mi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Oo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wo={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},Ph=["Webkit","ms","Moz","O"];Object.keys(wo).forEach(function(e){Ph.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wo[t]=wo[e]})});function gd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wo.hasOwnProperty(e)&&wo[e]?(""+t).trim():t+"px"}function yd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=gd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Oh=We({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 Tl(e,t){if(t){if(Oh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function Ll(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $l=null;function ka(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ml=null,Tr=null,Lr=null;function Iu(e){if(e=Yo(e)){if(typeof Ml!="function")throw Error(F(280));var t=e.stateNode;t&&(t=ws(t),Ml(e.stateNode,e.type,t))}}function wd(e){Tr?Lr?Lr.push(e):Lr=[e]:Tr=e}function xd(){if(Tr){var e=Tr,t=Lr;if(Lr=Tr=null,Iu(e),t)for(e=0;e<t.length;e++)Iu(t[e])}}function _d(e,t){return e(t)}function Sd(){}var Js=!1;function kd(e,t,n){if(Js)return e(t,n);Js=!0;try{return _d(e,t,n)}finally{Js=!1,(Tr!==null||Lr!==null)&&(Sd(),xd())}}function To(e,t){var n=e.stateNode;if(n===null)return null;var r=ws(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(F(231,t,typeof n));return n}var Rl=!1;if(dn)try{var so={};Object.defineProperty(so,"passive",{get:function(){Rl=!0}}),window.addEventListener("test",so,so),window.removeEventListener("test",so,so)}catch{Rl=!1}function Th(e,t,n,r,o,s,a,d,h){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(E){this.onError(E)}}var xo=!1,Wi=null,qi=!1,Al=null,Lh={onError:function(e){xo=!0,Wi=e}};function $h(e,t,n,r,o,s,a,d,h){xo=!1,Wi=null,Th.apply(Lh,arguments)}function Mh(e,t,n,r,o,s,a,d,h){if($h.apply(this,arguments),xo){if(xo){var c=Wi;xo=!1,Wi=null}else throw Error(F(198));qi||(qi=!0,Al=c)}}function ur(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Ed(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function zu(e){if(ur(e)!==e)throw Error(F(188))}function Rh(e){var t=e.alternate;if(!t){if(t=ur(e),t===null)throw Error(F(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return zu(o),e;if(s===r)return zu(o),t;s=s.sibling}throw Error(F(188))}if(n.return!==r.return)n=o,r=s;else{for(var a=!1,d=o.child;d;){if(d===n){a=!0,n=o,r=s;break}if(d===r){a=!0,r=o,n=s;break}d=d.sibling}if(!a){for(d=s.child;d;){if(d===n){a=!0,n=s,r=o;break}if(d===r){a=!0,r=s,n=o;break}d=d.sibling}if(!a)throw Error(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?e:t}function jd(e){return e=Rh(e),e!==null?Cd(e):null}function Cd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Cd(e);if(t!==null)return t;e=e.sibling}return null}var Nd=Pt.unstable_scheduleCallback,Uu=Pt.unstable_cancelCallback,Ah=Pt.unstable_shouldYield,Ih=Pt.unstable_requestPaint,Ke=Pt.unstable_now,zh=Pt.unstable_getCurrentPriorityLevel,Ea=Pt.unstable_ImmediatePriority,bd=Pt.unstable_UserBlockingPriority,Hi=Pt.unstable_NormalPriority,Uh=Pt.unstable_LowPriority,Pd=Pt.unstable_IdlePriority,ms=null,nn=null;function Dh(e){if(nn&&typeof nn.onCommitFiberRoot=="function")try{nn.onCommitFiberRoot(ms,e,void 0,(e.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:Vh,Fh=Math.log,Bh=Math.LN2;function Vh(e){return e>>>=0,e===0?32:31-(Fh(e)/Bh|0)|0}var vi=64,gi=4194304;function vo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Qi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var d=a&~o;d!==0?r=vo(d):(s&=a,s!==0&&(r=vo(s)))}else a=n&~o,a!==0?r=vo(a):s!==0&&(r=vo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Qt(t),o=1<<n,r|=e[n],t&=~o;return r}function Wh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qh(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Qt(s),d=1<<a,h=o[a];h===-1?(!(d&n)||d&r)&&(o[a]=Wh(d,t)):h<=t&&(e.expiredLanes|=d),s&=~d}}function Il(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Od(){var e=vi;return vi<<=1,!(vi&4194240)&&(vi=64),e}function Ys(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ko(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function Hh(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 o=31-Qt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function ja(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Le=0;function Td(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ld,Ca,$d,Md,Rd,zl=!1,yi=[],Pn=null,On=null,Tn=null,Lo=new Map,$o=new Map,En=[],Qh="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 Du(e,t){switch(e){case"focusin":case"focusout":Pn=null;break;case"dragenter":case"dragleave":On=null;break;case"mouseover":case"mouseout":Tn=null;break;case"pointerover":case"pointerout":Lo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$o.delete(t.pointerId)}}function lo(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Yo(t),t!==null&&Ca(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Kh(e,t,n,r,o){switch(t){case"focusin":return Pn=lo(Pn,e,t,n,r,o),!0;case"dragenter":return On=lo(On,e,t,n,r,o),!0;case"mouseover":return Tn=lo(Tn,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Lo.set(s,lo(Lo.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,$o.set(s,lo($o.get(s)||null,e,t,n,r,o)),!0}return!1}function Ad(e){var t=Gn(e.target);if(t!==null){var n=ur(t);if(n!==null){if(t=n.tag,t===13){if(t=Ed(n),t!==null){e.blockedOn=t,Rd(e.priority,function(){$d(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $i(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ul(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$l=r,n.target.dispatchEvent(r),$l=null}else return t=Yo(n),t!==null&&Ca(t),e.blockedOn=n,!1;t.shift()}return!0}function Fu(e,t,n){$i(e)&&n.delete(t)}function Jh(){zl=!1,Pn!==null&&$i(Pn)&&(Pn=null),On!==null&&$i(On)&&(On=null),Tn!==null&&$i(Tn)&&(Tn=null),Lo.forEach(Fu),$o.forEach(Fu)}function ao(e,t){e.blockedOn===t&&(e.blockedOn=null,zl||(zl=!0,Pt.unstable_scheduleCallback(Pt.unstable_NormalPriority,Jh)))}function Mo(e){function t(o){return ao(o,e)}if(0<yi.length){ao(yi[0],e);for(var n=1;n<yi.length;n++){var r=yi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pn!==null&&ao(Pn,e),On!==null&&ao(On,e),Tn!==null&&ao(Tn,e),Lo.forEach(t),$o.forEach(t),n=0;n<En.length;n++)r=En[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<En.length&&(n=En[0],n.blockedOn===null);)Ad(n),n.blockedOn===null&&En.shift()}var $r=mn.ReactCurrentBatchConfig,Ki=!0;function Yh(e,t,n,r){var o=Le,s=$r.transition;$r.transition=null;try{Le=1,Na(e,t,n,r)}finally{Le=o,$r.transition=s}}function Xh(e,t,n,r){var o=Le,s=$r.transition;$r.transition=null;try{Le=4,Na(e,t,n,r)}finally{Le=o,$r.transition=s}}function Na(e,t,n,r){if(Ki){var o=Ul(e,t,n,r);if(o===null)sl(e,t,r,Ji,n),Du(e,r);else if(Kh(o,e,t,n,r))r.stopPropagation();else if(Du(e,r),t&4&&-1<Qh.indexOf(e)){for(;o!==null;){var s=Yo(o);if(s!==null&&Ld(s),s=Ul(e,t,n,r),s===null&&sl(e,t,r,Ji,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else sl(e,t,r,null,n)}}var Ji=null;function Ul(e,t,n,r){if(Ji=null,e=ka(r),e=Gn(e),e!==null)if(t=ur(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ed(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ji=e,null}function Id(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(zh()){case Ea:return 1;case bd:return 4;case Hi:case Uh:return 16;case Pd:return 536870912;default:return 16}default:return 16}}var Cn=null,ba=null,Mi=null;function zd(){if(Mi)return Mi;var e,t=ba,n=t.length,r,o="value"in Cn?Cn.value:Cn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[s-r];r++);return Mi=o.slice(e,1<r?1-r:void 0)}function Ri(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function wi(){return!0}function Bu(){return!1}function Tt(e){function t(n,r,o,s,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(s):s[d]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?wi:Bu,this.isPropagationStopped=Bu,this}return We(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=wi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wi)},persist:function(){},isPersistent:wi}),t}var Wr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pa=Tt(Wr),Jo=We({},Wr,{view:0,detail:0}),Gh=Tt(Jo),Xs,Gs,uo,vs=We({},Jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==uo&&(uo&&e.type==="mousemove"?(Xs=e.screenX-uo.screenX,Gs=e.screenY-uo.screenY):Gs=Xs=0,uo=e),Xs)},movementY:function(e){return"movementY"in e?e.movementY:Gs}}),Vu=Tt(vs),Zh=We({},vs,{dataTransfer:0}),em=Tt(Zh),tm=We({},Jo,{relatedTarget:0}),Zs=Tt(tm),nm=We({},Wr,{animationName:0,elapsedTime:0,pseudoElement:0}),rm=Tt(nm),om=We({},Wr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),im=Tt(om),sm=We({},Wr,{data:0}),Wu=Tt(sm),lm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},am={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"},um={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=um[e])?!!t[e]:!1}function Oa(){return cm}var dm=We({},Jo,{key:function(e){if(e.key){var t=lm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ri(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?am[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oa,charCode:function(e){return e.type==="keypress"?Ri(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ri(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fm=Tt(dm),pm=We({},vs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qu=Tt(pm),hm=We({},Jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oa}),mm=Tt(hm),vm=We({},Wr,{propertyName:0,elapsedTime:0,pseudoElement:0}),gm=Tt(vm),ym=We({},vs,{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}),wm=Tt(ym),xm=[9,13,27,32],Ta=dn&&"CompositionEvent"in window,_o=null;dn&&"documentMode"in document&&(_o=document.documentMode);var _m=dn&&"TextEvent"in window&&!_o,Ud=dn&&(!Ta||_o&&8<_o&&11>=_o),Hu=" ",Qu=!1;function Dd(e,t){switch(e){case"keyup":return xm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wr=!1;function Sm(e,t){switch(e){case"compositionend":return Fd(t);case"keypress":return t.which!==32?null:(Qu=!0,Hu);case"textInput":return e=t.data,e===Hu&&Qu?null:e;default:return null}}function km(e,t){if(wr)return e==="compositionend"||!Ta&&Dd(e,t)?(e=zd(),Mi=ba=Cn=null,wr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ud&&t.locale!=="ko"?null:t.data;default:return null}}var Em={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 Ku(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Em[e.type]:t==="textarea"}function Bd(e,t,n,r){wd(r),t=Yi(t,"onChange"),0<t.length&&(n=new Pa("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var So=null,Ro=null;function jm(e){Zd(e,0)}function gs(e){var t=Sr(e);if(fd(t))return e}function Cm(e,t){if(e==="change")return t}var Vd=!1;if(dn){var el;if(dn){var tl="oninput"in document;if(!tl){var Ju=document.createElement("div");Ju.setAttribute("oninput","return;"),tl=typeof Ju.oninput=="function"}el=tl}else el=!1;Vd=el&&(!document.documentMode||9<document.documentMode)}function Yu(){So&&(So.detachEvent("onpropertychange",Wd),Ro=So=null)}function Wd(e){if(e.propertyName==="value"&&gs(Ro)){var t=[];Bd(t,Ro,e,ka(e)),kd(jm,t)}}function Nm(e,t,n){e==="focusin"?(Yu(),So=t,Ro=n,So.attachEvent("onpropertychange",Wd)):e==="focusout"&&Yu()}function bm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gs(Ro)}function Pm(e,t){if(e==="click")return gs(t)}function Om(e,t){if(e==="input"||e==="change")return gs(t)}function Tm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:Tm;function Ao(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!_l.call(t,o)||!Jt(e[o],t[o]))return!1}return!0}function Xu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gu(e,t){var n=Xu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xu(n)}}function qd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hd(){for(var e=window,t=Vi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vi(e.document)}return t}function La(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Lm(e){var t=Hd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qd(n.ownerDocument.documentElement,n)){if(r!==null&&La(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=Gu(n,s);var a=Gu(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>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;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var $m=dn&&"documentMode"in document&&11>=document.documentMode,xr=null,Dl=null,ko=null,Fl=!1;function Zu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fl||xr==null||xr!==Vi(r)||(r=xr,"selectionStart"in r&&La(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ko&&Ao(ko,r)||(ko=r,r=Yi(Dl,"onSelect"),0<r.length&&(t=new Pa("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=xr)))}function xi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionend:xi("Transition","TransitionEnd")},nl={},Qd={};dn&&(Qd=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);function ys(e){if(nl[e])return nl[e];if(!_r[e])return e;var t=_r[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qd)return nl[e]=t[n];return e}var Kd=ys("animationend"),Jd=ys("animationiteration"),Yd=ys("animationstart"),Xd=ys("transitionend"),Gd=new Map,ec="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 Dn(e,t){Gd.set(e,t),ar(t,[e])}for(var rl=0;rl<ec.length;rl++){var ol=ec[rl],Mm=ol.toLowerCase(),Rm=ol[0].toUpperCase()+ol.slice(1);Dn(Mm,"on"+Rm)}Dn(Kd,"onAnimationEnd");Dn(Jd,"onAnimationIteration");Dn(Yd,"onAnimationStart");Dn("dblclick","onDoubleClick");Dn("focusin","onFocus");Dn("focusout","onBlur");Dn(Xd,"onTransitionEnd");Ar("onMouseEnter",["mouseout","mouseover"]);Ar("onMouseLeave",["mouseout","mouseover"]);Ar("onPointerEnter",["pointerout","pointerover"]);Ar("onPointerLeave",["pointerout","pointerover"]);ar("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ar("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ar("onBeforeInput",["compositionend","keypress","textInput","paste"]);ar("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ar("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ar("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var go="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(" "),Am=new Set("cancel close invalid load scroll toggle".split(" ").concat(go));function tc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Mh(r,t,void 0,e),e.currentTarget=null}function Zd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var d=r[a],h=d.instance,c=d.currentTarget;if(d=d.listener,h!==s&&o.isPropagationStopped())break e;tc(o,d,c),s=h}else for(a=0;a<r.length;a++){if(d=r[a],h=d.instance,c=d.currentTarget,d=d.listener,h!==s&&o.isPropagationStopped())break e;tc(o,d,c),s=h}}}if(qi)throw e=Al,qi=!1,Al=null,e}function Ue(e,t){var n=t[Hl];n===void 0&&(n=t[Hl]=new Set);var r=e+"__bubble";n.has(r)||(ef(t,e,2,!1),n.add(r))}function il(e,t,n){var r=0;t&&(r|=4),ef(n,e,r,t)}var _i="_reactListening"+Math.random().toString(36).slice(2);function Io(e){if(!e[_i]){e[_i]=!0,ld.forEach(function(n){n!=="selectionchange"&&(Am.has(n)||il(n,!1,e),il(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_i]||(t[_i]=!0,il("selectionchange",!1,t))}}function ef(e,t,n,r){switch(Id(t)){case 1:var o=Yh;break;case 4:o=Xh;break;default:o=Na}n=o.bind(null,t,n,e),o=void 0,!Rl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function sl(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var d=r.stateNode.containerInfo;if(d===o||d.nodeType===8&&d.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var h=a.tag;if((h===3||h===4)&&(h=a.stateNode.containerInfo,h===o||h.nodeType===8&&h.parentNode===o))return;a=a.return}for(;d!==null;){if(a=Gn(d),a===null)return;if(h=a.tag,h===5||h===6){r=s=a;continue e}d=d.parentNode}}r=r.return}kd(function(){var c=s,E=ka(n),S=[];e:{var j=Gd.get(e);if(j!==void 0){var b=Pa,L=e;switch(e){case"keypress":if(Ri(n)===0)break e;case"keydown":case"keyup":b=fm;break;case"focusin":L="focus",b=Zs;break;case"focusout":L="blur",b=Zs;break;case"beforeblur":case"afterblur":b=Zs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=Vu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=em;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=mm;break;case Kd:case Jd:case Yd:b=rm;break;case Xd:b=gm;break;case"scroll":b=Gh;break;case"wheel":b=wm;break;case"copy":case"cut":case"paste":b=im;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=qu}var U=(t&4)!==0,me=!U&&e==="scroll",y=U?j!==null?j+"Capture":null:j;U=[];for(var m=c,w;m!==null;){w=m;var N=w.stateNode;if(w.tag===5&&N!==null&&(w=N,y!==null&&(N=To(m,y),N!=null&&U.push(zo(m,N,w)))),me)break;m=m.return}0<U.length&&(j=new b(j,L,null,n,E),S.push({event:j,listeners:U}))}}if(!(t&7)){e:{if(j=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",j&&n!==$l&&(L=n.relatedTarget||n.fromElement)&&(Gn(L)||L[fn]))break e;if((b||j)&&(j=E.window===E?E:(j=E.ownerDocument)?j.defaultView||j.parentWindow:window,b?(L=n.relatedTarget||n.toElement,b=c,L=L?Gn(L):null,L!==null&&(me=ur(L),L!==me||L.tag!==5&&L.tag!==6)&&(L=null)):(b=null,L=c),b!==L)){if(U=Vu,N="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(U=qu,N="onPointerLeave",y="onPointerEnter",m="pointer"),me=b==null?j:Sr(b),w=L==null?j:Sr(L),j=new U(N,m+"leave",b,n,E),j.target=me,j.relatedTarget=w,N=null,Gn(E)===c&&(U=new U(y,m+"enter",L,n,E),U.target=w,U.relatedTarget=me,N=U),me=N,b&&L)t:{for(U=b,y=L,m=0,w=U;w;w=mr(w))m++;for(w=0,N=y;N;N=mr(N))w++;for(;0<m-w;)U=mr(U),m--;for(;0<w-m;)y=mr(y),w--;for(;m--;){if(U===y||y!==null&&U===y.alternate)break t;U=mr(U),y=mr(y)}U=null}else U=null;b!==null&&nc(S,j,b,U,!1),L!==null&&me!==null&&nc(S,me,L,U,!0)}}e:{if(j=c?Sr(c):window,b=j.nodeName&&j.nodeName.toLowerCase(),b==="select"||b==="input"&&j.type==="file")var A=Cm;else if(Ku(j))if(Vd)A=Om;else{A=bm;var V=Nm}else(b=j.nodeName)&&b.toLowerCase()==="input"&&(j.type==="checkbox"||j.type==="radio")&&(A=Pm);if(A&&(A=A(e,c))){Bd(S,A,n,E);break e}V&&V(e,j,c),e==="focusout"&&(V=j._wrapperState)&&V.controlled&&j.type==="number"&&bl(j,"number",j.value)}switch(V=c?Sr(c):window,e){case"focusin":(Ku(V)||V.contentEditable==="true")&&(xr=V,Dl=c,ko=null);break;case"focusout":ko=Dl=xr=null;break;case"mousedown":Fl=!0;break;case"contextmenu":case"mouseup":case"dragend":Fl=!1,Zu(S,n,E);break;case"selectionchange":if($m)break;case"keydown":case"keyup":Zu(S,n,E)}var D;if(Ta)e:{switch(e){case"compositionstart":var K="onCompositionStart";break e;case"compositionend":K="onCompositionEnd";break e;case"compositionupdate":K="onCompositionUpdate";break e}K=void 0}else wr?Dd(e,n)&&(K="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(K="onCompositionStart");K&&(Ud&&n.locale!=="ko"&&(wr||K!=="onCompositionStart"?K==="onCompositionEnd"&&wr&&(D=zd()):(Cn=E,ba="value"in Cn?Cn.value:Cn.textContent,wr=!0)),V=Yi(c,K),0<V.length&&(K=new Wu(K,e,null,n,E),S.push({event:K,listeners:V}),D?K.data=D:(D=Fd(n),D!==null&&(K.data=D)))),(D=_m?Sm(e,n):km(e,n))&&(c=Yi(c,"onBeforeInput"),0<c.length&&(E=new Wu("onBeforeInput","beforeinput",null,n,E),S.push({event:E,listeners:c}),E.data=D))}Zd(S,t)})}function zo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yi(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=To(e,n),s!=null&&r.unshift(zo(e,s,o)),s=To(e,t),s!=null&&r.push(zo(e,s,o))),e=e.return}return r}function mr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function nc(e,t,n,r,o){for(var s=t._reactName,a=[];n!==null&&n!==r;){var d=n,h=d.alternate,c=d.stateNode;if(h!==null&&h===r)break;d.tag===5&&c!==null&&(d=c,o?(h=To(n,s),h!=null&&a.unshift(zo(n,h,d))):o||(h=To(n,s),h!=null&&a.push(zo(n,h,d)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Im=/\r\n?/g,zm=/\u0000|\uFFFD/g;function rc(e){return(typeof e=="string"?e:""+e).replace(Im,`
38
+ `).replace(zm,"")}function Si(e,t,n){if(t=rc(t),rc(e)!==t&&n)throw Error(F(425))}function Xi(){}var Bl=null,Vl=null;function Wl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ql=typeof setTimeout=="function"?setTimeout:void 0,Um=typeof clearTimeout=="function"?clearTimeout:void 0,oc=typeof Promise=="function"?Promise:void 0,Dm=typeof queueMicrotask=="function"?queueMicrotask:typeof oc<"u"?function(e){return oc.resolve(null).then(e).catch(Fm)}:ql;function Fm(e){setTimeout(function(){throw e})}function ll(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Mo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Mo(t)}function Ln(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ic(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qr=Math.random().toString(36).slice(2),tn="__reactFiber$"+qr,Uo="__reactProps$"+qr,fn="__reactContainer$"+qr,Hl="__reactEvents$"+qr,Bm="__reactListeners$"+qr,Vm="__reactHandles$"+qr;function Gn(e){var t=e[tn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fn]||n[tn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ic(e);e!==null;){if(n=e[tn])return n;e=ic(e)}return t}e=n,n=e.parentNode}return null}function Yo(e){return e=e[tn]||e[fn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Sr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(F(33))}function ws(e){return e[Uo]||null}var Ql=[],kr=-1;function Fn(e){return{current:e}}function De(e){0>kr||(e.current=Ql[kr],Ql[kr]=null,kr--)}function Ie(e,t){kr++,Ql[kr]=e.current,e.current=t}var Un={},at=Fn(Un),xt=Fn(!1),rr=Un;function Ir(e,t){var n=e.type.contextTypes;if(!n)return Un;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function _t(e){return e=e.childContextTypes,e!=null}function Gi(){De(xt),De(at)}function sc(e,t,n){if(at.current!==Un)throw Error(F(168));Ie(at,t),Ie(xt,n)}function tf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(F(108,Nh(e)||"Unknown",o));return We({},n,r)}function Zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Un,rr=at.current,Ie(at,e),Ie(xt,xt.current),!0}function lc(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=tf(e,t,rr),r.__reactInternalMemoizedMergedChildContext=e,De(xt),De(at),Ie(at,e)):De(xt),Ie(xt,n)}var ln=null,xs=!1,al=!1;function nf(e){ln===null?ln=[e]:ln.push(e)}function Wm(e){xs=!0,nf(e)}function Bn(){if(!al&&ln!==null){al=!0;var e=0,t=Le;try{var n=ln;for(Le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ln=null,xs=!1}catch(o){throw ln!==null&&(ln=ln.slice(e+1)),Nd(Ea,Bn),o}finally{Le=t,al=!1}}return null}var Er=[],jr=0,es=null,ts=0,Mt=[],Rt=0,or=null,an=1,un="";function Yn(e,t){Er[jr++]=ts,Er[jr++]=es,es=e,ts=t}function rf(e,t,n){Mt[Rt++]=an,Mt[Rt++]=un,Mt[Rt++]=or,or=e;var r=an;e=un;var o=32-Qt(r)-1;r&=~(1<<o),n+=1;var s=32-Qt(t)+o;if(30<s){var a=o-o%5;s=(r&(1<<a)-1).toString(32),r>>=a,o-=a,an=1<<32-Qt(t)+o|n<<o|r,un=s+e}else an=1<<s|n<<o|r,un=e}function $a(e){e.return!==null&&(Yn(e,1),rf(e,1,0))}function Ma(e){for(;e===es;)es=Er[--jr],Er[jr]=null,ts=Er[--jr],Er[jr]=null;for(;e===or;)or=Mt[--Rt],Mt[Rt]=null,un=Mt[--Rt],Mt[Rt]=null,an=Mt[--Rt],Mt[Rt]=null}var bt=null,Nt=null,Fe=!1,Ht=null;function of(e,t){var n=At(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ac(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,bt=e,Nt=Ln(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,bt=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=or!==null?{id:an,overflow:un}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=At(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,bt=e,Nt=null,!0):!1;default:return!1}}function Kl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Jl(e){if(Fe){var t=Nt;if(t){var n=t;if(!ac(e,t)){if(Kl(e))throw Error(F(418));t=Ln(n.nextSibling);var r=bt;t&&ac(e,t)?of(r,n):(e.flags=e.flags&-4097|2,Fe=!1,bt=e)}}else{if(Kl(e))throw Error(F(418));e.flags=e.flags&-4097|2,Fe=!1,bt=e}}}function uc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;bt=e}function ki(e){if(e!==bt)return!1;if(!Fe)return uc(e),Fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Wl(e.type,e.memoizedProps)),t&&(t=Nt)){if(Kl(e))throw sf(),Error(F(418));for(;t;)of(e,t),t=Ln(t.nextSibling)}if(uc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=Ln(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=bt?Ln(e.stateNode.nextSibling):null;return!0}function sf(){for(var e=Nt;e;)e=Ln(e.nextSibling)}function zr(){Nt=bt=null,Fe=!1}function Ra(e){Ht===null?Ht=[e]:Ht.push(e)}var qm=mn.ReactCurrentBatchConfig;function co(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(F(309));var r=n.stateNode}if(!r)throw Error(F(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var d=o.refs;a===null?delete d[s]:d[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(F(284));if(!n._owner)throw Error(F(290,e))}return e}function Ei(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function cc(e){var t=e._init;return t(e._payload)}function lf(e){function t(y,m){if(e){var w=y.deletions;w===null?(y.deletions=[m],y.flags|=16):w.push(m)}}function n(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function r(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function o(y,m){return y=An(y,m),y.index=0,y.sibling=null,y}function s(y,m,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<m?(y.flags|=2,m):w):(y.flags|=2,m)):(y.flags|=1048576,m)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function d(y,m,w,N){return m===null||m.tag!==6?(m=ml(w,y.mode,N),m.return=y,m):(m=o(m,w),m.return=y,m)}function h(y,m,w,N){var A=w.type;return A===yr?E(y,m,w.props.children,N,w.key):m!==null&&(m.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Sn&&cc(A)===m.type)?(N=o(m,w.props),N.ref=co(y,m,w),N.return=y,N):(N=Bi(w.type,w.key,w.props,null,y.mode,N),N.ref=co(y,m,w),N.return=y,N)}function c(y,m,w,N){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=vl(w,y.mode,N),m.return=y,m):(m=o(m,w.children||[]),m.return=y,m)}function E(y,m,w,N,A){return m===null||m.tag!==7?(m=nr(w,y.mode,N,A),m.return=y,m):(m=o(m,w),m.return=y,m)}function S(y,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=ml(""+m,y.mode,w),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case pi:return w=Bi(m.type,m.key,m.props,null,y.mode,w),w.ref=co(y,null,m),w.return=y,w;case gr:return m=vl(m,y.mode,w),m.return=y,m;case Sn:var N=m._init;return S(y,N(m._payload),w)}if(mo(m)||io(m))return m=nr(m,y.mode,w,null),m.return=y,m;Ei(y,m)}return null}function j(y,m,w,N){var A=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return A!==null?null:d(y,m,""+w,N);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case pi:return w.key===A?h(y,m,w,N):null;case gr:return w.key===A?c(y,m,w,N):null;case Sn:return A=w._init,j(y,m,A(w._payload),N)}if(mo(w)||io(w))return A!==null?null:E(y,m,w,N,null);Ei(y,w)}return null}function b(y,m,w,N,A){if(typeof N=="string"&&N!==""||typeof N=="number")return y=y.get(w)||null,d(m,y,""+N,A);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case pi:return y=y.get(N.key===null?w:N.key)||null,h(m,y,N,A);case gr:return y=y.get(N.key===null?w:N.key)||null,c(m,y,N,A);case Sn:var V=N._init;return b(y,m,w,V(N._payload),A)}if(mo(N)||io(N))return y=y.get(w)||null,E(m,y,N,A,null);Ei(m,N)}return null}function L(y,m,w,N){for(var A=null,V=null,D=m,K=m=0,fe=null;D!==null&&K<w.length;K++){D.index>K?(fe=D,D=null):fe=D.sibling;var z=j(y,D,w[K],N);if(z===null){D===null&&(D=fe);break}e&&D&&z.alternate===null&&t(y,D),m=s(z,m,K),V===null?A=z:V.sibling=z,V=z,D=fe}if(K===w.length)return n(y,D),Fe&&Yn(y,K),A;if(D===null){for(;K<w.length;K++)D=S(y,w[K],N),D!==null&&(m=s(D,m,K),V===null?A=D:V.sibling=D,V=D);return Fe&&Yn(y,K),A}for(D=r(y,D);K<w.length;K++)fe=b(D,y,K,w[K],N),fe!==null&&(e&&fe.alternate!==null&&D.delete(fe.key===null?K:fe.key),m=s(fe,m,K),V===null?A=fe:V.sibling=fe,V=fe);return e&&D.forEach(function(se){return t(y,se)}),Fe&&Yn(y,K),A}function U(y,m,w,N){var A=io(w);if(typeof A!="function")throw Error(F(150));if(w=A.call(w),w==null)throw Error(F(151));for(var V=A=null,D=m,K=m=0,fe=null,z=w.next();D!==null&&!z.done;K++,z=w.next()){D.index>K?(fe=D,D=null):fe=D.sibling;var se=j(y,D,z.value,N);if(se===null){D===null&&(D=fe);break}e&&D&&se.alternate===null&&t(y,D),m=s(se,m,K),V===null?A=se:V.sibling=se,V=se,D=fe}if(z.done)return n(y,D),Fe&&Yn(y,K),A;if(D===null){for(;!z.done;K++,z=w.next())z=S(y,z.value,N),z!==null&&(m=s(z,m,K),V===null?A=z:V.sibling=z,V=z);return Fe&&Yn(y,K),A}for(D=r(y,D);!z.done;K++,z=w.next())z=b(D,y,K,z.value,N),z!==null&&(e&&z.alternate!==null&&D.delete(z.key===null?K:z.key),m=s(z,m,K),V===null?A=z:V.sibling=z,V=z);return e&&D.forEach(function(Me){return t(y,Me)}),Fe&&Yn(y,K),A}function me(y,m,w,N){if(typeof w=="object"&&w!==null&&w.type===yr&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case pi:e:{for(var A=w.key,V=m;V!==null;){if(V.key===A){if(A=w.type,A===yr){if(V.tag===7){n(y,V.sibling),m=o(V,w.props.children),m.return=y,y=m;break e}}else if(V.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Sn&&cc(A)===V.type){n(y,V.sibling),m=o(V,w.props),m.ref=co(y,V,w),m.return=y,y=m;break e}n(y,V);break}else t(y,V);V=V.sibling}w.type===yr?(m=nr(w.props.children,y.mode,N,w.key),m.return=y,y=m):(N=Bi(w.type,w.key,w.props,null,y.mode,N),N.ref=co(y,m,w),N.return=y,y=N)}return a(y);case gr:e:{for(V=w.key;m!==null;){if(m.key===V)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){n(y,m.sibling),m=o(m,w.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=vl(w,y.mode,N),m.return=y,y=m}return a(y);case Sn:return V=w._init,me(y,m,V(w._payload),N)}if(mo(w))return L(y,m,w,N);if(io(w))return U(y,m,w,N);Ei(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(y,m.sibling),m=o(m,w),m.return=y,y=m):(n(y,m),m=ml(w,y.mode,N),m.return=y,y=m),a(y)):n(y,m)}return me}var Ur=lf(!0),af=lf(!1),ns=Fn(null),rs=null,Cr=null,Aa=null;function Ia(){Aa=Cr=rs=null}function za(e){var t=ns.current;De(ns),e._currentValue=t}function Yl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mr(e,t){rs=e,Aa=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(wt=!0),e.firstContext=null)}function zt(e){var t=e._currentValue;if(Aa!==e)if(e={context:e,memoizedValue:t,next:null},Cr===null){if(rs===null)throw Error(F(308));Cr=e,rs.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return t}var Zn=null;function Ua(e){Zn===null?Zn=[e]:Zn.push(e)}function uf(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Ua(t)):(n.next=o.next,o.next=n),t.interleaved=n,pn(e,r)}function pn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var kn=!1;function Da(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cf(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 cn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $n(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ne&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,pn(e,n)}return o=r.interleaved,o===null?(t.next=t,Ua(r)):(t.next=o.next,o.next=t),r.interleaved=t,pn(e,n)}function Ai(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ja(e,n)}}function dc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function os(e,t,n,r){var o=e.updateQueue;kn=!1;var s=o.firstBaseUpdate,a=o.lastBaseUpdate,d=o.shared.pending;if(d!==null){o.shared.pending=null;var h=d,c=h.next;h.next=null,a===null?s=c:a.next=c,a=h;var E=e.alternate;E!==null&&(E=E.updateQueue,d=E.lastBaseUpdate,d!==a&&(d===null?E.firstBaseUpdate=c:d.next=c,E.lastBaseUpdate=h))}if(s!==null){var S=o.baseState;a=0,E=c=h=null,d=s;do{var j=d.lane,b=d.eventTime;if((r&j)===j){E!==null&&(E=E.next={eventTime:b,lane:0,tag:d.tag,payload:d.payload,callback:d.callback,next:null});e:{var L=e,U=d;switch(j=t,b=n,U.tag){case 1:if(L=U.payload,typeof L=="function"){S=L.call(b,S,j);break e}S=L;break e;case 3:L.flags=L.flags&-65537|128;case 0:if(L=U.payload,j=typeof L=="function"?L.call(b,S,j):L,j==null)break e;S=We({},S,j);break e;case 2:kn=!0}}d.callback!==null&&d.lane!==0&&(e.flags|=64,j=o.effects,j===null?o.effects=[d]:j.push(d))}else b={eventTime:b,lane:j,tag:d.tag,payload:d.payload,callback:d.callback,next:null},E===null?(c=E=b,h=S):E=E.next=b,a|=j;if(d=d.next,d===null){if(d=o.shared.pending,d===null)break;j=d,d=j.next,j.next=null,o.lastBaseUpdate=j,o.shared.pending=null}}while(!0);if(E===null&&(h=S),o.baseState=h,o.firstBaseUpdate=c,o.lastBaseUpdate=E,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);sr|=a,e.lanes=a,e.memoizedState=S}}function fc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(F(191,o));o.call(r)}}}var Xo={},rn=Fn(Xo),Do=Fn(Xo),Fo=Fn(Xo);function er(e){if(e===Xo)throw Error(F(174));return e}function Fa(e,t){switch(Ie(Fo,t),Ie(Do,e),Ie(rn,Xo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ol(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ol(t,e)}De(rn),Ie(rn,t)}function Dr(){De(rn),De(Do),De(Fo)}function df(e){er(Fo.current);var t=er(rn.current),n=Ol(t,e.type);t!==n&&(Ie(Do,e),Ie(rn,n))}function Ba(e){Do.current===e&&(De(rn),De(Do))}var Be=Fn(0);function is(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ul=[];function Va(){for(var e=0;e<ul.length;e++)ul[e]._workInProgressVersionPrimary=null;ul.length=0}var Ii=mn.ReactCurrentDispatcher,cl=mn.ReactCurrentBatchConfig,ir=0,Ve=null,Ge=null,et=null,ss=!1,Eo=!1,Bo=0,Hm=0;function it(){throw Error(F(321))}function Wa(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jt(e[n],t[n]))return!1;return!0}function qa(e,t,n,r,o,s){if(ir=s,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ii.current=e===null||e.memoizedState===null?Ym:Xm,e=n(r,o),Eo){s=0;do{if(Eo=!1,Bo=0,25<=s)throw Error(F(301));s+=1,et=Ge=null,t.updateQueue=null,Ii.current=Gm,e=n(r,o)}while(Eo)}if(Ii.current=ls,t=Ge!==null&&Ge.next!==null,ir=0,et=Ge=Ve=null,ss=!1,t)throw Error(F(300));return e}function Ha(){var e=Bo!==0;return Bo=0,e}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?Ve.memoizedState=et=e:et=et.next=e,et}function Ut(){if(Ge===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=et===null?Ve.memoizedState:et.next;if(t!==null)et=t,Ge=e;else{if(e===null)throw Error(F(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},et===null?Ve.memoizedState=et=e:et=et.next=e}return et}function Vo(e,t){return typeof t=="function"?t(e):t}function dl(e){var t=Ut(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=Ge,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var a=o.next;o.next=s.next,s.next=a}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var d=a=null,h=null,c=s;do{var E=c.lane;if((ir&E)===E)h!==null&&(h=h.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var S={lane:E,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};h===null?(d=h=S,a=r):h=h.next=S,Ve.lanes|=E,sr|=E}c=c.next}while(c!==null&&c!==s);h===null?a=r:h.next=d,Jt(r,t.memoizedState)||(wt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=h,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Ve.lanes|=s,sr|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function fl(e){var t=Ut(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do s=e(s,a.action),a=a.next;while(a!==o);Jt(s,t.memoizedState)||(wt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ff(){}function pf(e,t){var n=Ve,r=Ut(),o=t(),s=!Jt(r.memoizedState,o);if(s&&(r.memoizedState=o,wt=!0),r=r.queue,Qa(vf.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||et!==null&&et.memoizedState.tag&1){if(n.flags|=2048,Wo(9,mf.bind(null,n,r,o,t),void 0,null),tt===null)throw Error(F(349));ir&30||hf(n,t,o)}return o}function hf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function mf(e,t,n,r){t.value=n,t.getSnapshot=r,gf(t)&&yf(e)}function vf(e,t,n){return n(function(){gf(t)&&yf(e)})}function gf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jt(e,n)}catch{return!0}}function yf(e){var t=pn(e,1);t!==null&&Kt(t,e,1,-1)}function pc(e){var t=en();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:e},t.queue=e,e=e.dispatch=Jm.bind(null,Ve,e),[t.memoizedState,e]}function Wo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function wf(){return Ut().memoizedState}function zi(e,t,n,r){var o=en();Ve.flags|=e,o.memoizedState=Wo(1|t,n,void 0,r===void 0?null:r)}function _s(e,t,n,r){var o=Ut();r=r===void 0?null:r;var s=void 0;if(Ge!==null){var a=Ge.memoizedState;if(s=a.destroy,r!==null&&Wa(r,a.deps)){o.memoizedState=Wo(t,n,s,r);return}}Ve.flags|=e,o.memoizedState=Wo(1|t,n,s,r)}function hc(e,t){return zi(8390656,8,e,t)}function Qa(e,t){return _s(2048,8,e,t)}function xf(e,t){return _s(4,2,e,t)}function _f(e,t){return _s(4,4,e,t)}function Sf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function kf(e,t,n){return n=n!=null?n.concat([e]):null,_s(4,4,Sf.bind(null,t,e),n)}function Ka(){}function Ef(e,t){var n=Ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function jf(e,t){var n=Ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cf(e,t,n){return ir&21?(Jt(n,t)||(n=Od(),Ve.lanes|=n,sr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wt=!0),e.memoizedState=n)}function Qm(e,t){var n=Le;Le=n!==0&&4>n?n:4,e(!0);var r=cl.transition;cl.transition={};try{e(!1),t()}finally{Le=n,cl.transition=r}}function Nf(){return Ut().memoizedState}function Km(e,t,n){var r=Rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bf(e))Pf(t,n);else if(n=uf(e,t,n,r),n!==null){var o=ft();Kt(n,e,r,o),Of(n,t,r)}}function Jm(e,t,n){var r=Rn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bf(e))Pf(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,d=s(a,n);if(o.hasEagerState=!0,o.eagerState=d,Jt(d,a)){var h=t.interleaved;h===null?(o.next=o,Ua(t)):(o.next=h.next,h.next=o),t.interleaved=o;return}}catch{}finally{}n=uf(e,t,o,r),n!==null&&(o=ft(),Kt(n,e,r,o),Of(n,t,r))}}function bf(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Pf(e,t){Eo=ss=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Of(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ja(e,n)}}var ls={readContext:zt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},Ym={readContext:zt,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:hc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zi(4194308,4,Sf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zi(4194308,4,e,t)},useInsertionEffect:function(e,t){return zi(4,2,e,t)},useMemo:function(e,t){var n=en();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=en();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Km.bind(null,Ve,e),[r.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:pc,useDebugValue:Ka,useDeferredValue:function(e){return en().memoizedState=e},useTransition:function(){var e=pc(!1),t=e[0];return e=Qm.bind(null,e[1]),en().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ve,o=en();if(Fe){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),tt===null)throw Error(F(349));ir&30||hf(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,hc(vf.bind(null,r,s,e),[e]),r.flags|=2048,Wo(9,mf.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=en(),t=tt.identifierPrefix;if(Fe){var n=un,r=an;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Bo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Hm++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xm={readContext:zt,useCallback:Ef,useContext:zt,useEffect:Qa,useImperativeHandle:kf,useInsertionEffect:xf,useLayoutEffect:_f,useMemo:jf,useReducer:dl,useRef:wf,useState:function(){return dl(Vo)},useDebugValue:Ka,useDeferredValue:function(e){var t=Ut();return Cf(t,Ge.memoizedState,e)},useTransition:function(){var e=dl(Vo)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:ff,useSyncExternalStore:pf,useId:Nf,unstable_isNewReconciler:!1},Gm={readContext:zt,useCallback:Ef,useContext:zt,useEffect:Qa,useImperativeHandle:kf,useInsertionEffect:xf,useLayoutEffect:_f,useMemo:jf,useReducer:fl,useRef:wf,useState:function(){return fl(Vo)},useDebugValue:Ka,useDeferredValue:function(e){var t=Ut();return Ge===null?t.memoizedState=e:Cf(t,Ge.memoizedState,e)},useTransition:function(){var e=fl(Vo)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:ff,useSyncExternalStore:pf,useId:Nf,unstable_isNewReconciler:!1};function Wt(e,t){if(e&&e.defaultProps){t=We({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Xl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:We({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ss={isMounted:function(e){return(e=e._reactInternals)?ur(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ft(),o=Rn(e),s=cn(r,o);s.payload=t,n!=null&&(s.callback=n),t=$n(e,s,o),t!==null&&(Kt(t,e,o,r),Ai(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ft(),o=Rn(e),s=cn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=$n(e,s,o),t!==null&&(Kt(t,e,o,r),Ai(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ft(),r=Rn(e),o=cn(n,r);o.tag=2,t!=null&&(o.callback=t),t=$n(e,o,r),t!==null&&(Kt(t,e,r,n),Ai(t,e,r))}};function mc(e,t,n,r,o,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,a):t.prototype&&t.prototype.isPureReactComponent?!Ao(n,r)||!Ao(o,s):!0}function Tf(e,t,n){var r=!1,o=Un,s=t.contextType;return typeof s=="object"&&s!==null?s=zt(s):(o=_t(t)?rr:at.current,r=t.contextTypes,s=(r=r!=null)?Ir(e,o):Un),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ss,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function vc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ss.enqueueReplaceState(t,t.state,null)}function Gl(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Da(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=zt(s):(s=_t(t)?rr:at.current,o.context=Ir(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Xl(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Ss.enqueueReplaceState(o,o.state,null),os(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Fr(e,t){try{var n="",r=t;do n+=Ch(r),r=r.return;while(r);var o=n}catch(s){o=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:o,digest:null}}function pl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Zl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Zm=typeof WeakMap=="function"?WeakMap:Map;function Lf(e,t,n){n=cn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){us||(us=!0,ua=r),Zl(e,t)},n}function $f(e,t,n){n=cn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Zl(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Zl(e,t),typeof r!="function"&&(Mn===null?Mn=new Set([this]):Mn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function gc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zm;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=pv.bind(null,e,t,n),t.then(e,e))}function yc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function wc(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=cn(-1,1),t.tag=2,$n(n,t,1))),n.lanes|=1),e)}var ev=mn.ReactCurrentOwner,wt=!1;function dt(e,t,n,r){t.child=e===null?af(t,null,n,r):Ur(t,e.child,n,r)}function xc(e,t,n,r,o){n=n.render;var s=t.ref;return Mr(t,o),r=qa(e,t,n,r,s,o),n=Ha(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,hn(e,t,o)):(Fe&&n&&$a(t),t.flags|=1,dt(e,t,r,o),t.child)}function _c(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!nu(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Mf(e,t,s,r,o)):(e=Bi(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ao,n(a,r)&&e.ref===t.ref)return hn(e,t,o)}return t.flags|=1,e=An(s,r),e.ref=t.ref,e.return=t,t.child=e}function Mf(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Ao(s,r)&&e.ref===t.ref)if(wt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(wt=!0);else return t.lanes=e.lanes,hn(e,t,o)}return ea(e,t,n,r,o)}function Rf(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ie(br,jt),jt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ie(br,jt),jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Ie(br,jt),jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Ie(br,jt),jt|=r;return dt(e,t,o,n),t.child}function Af(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ea(e,t,n,r,o){var s=_t(n)?rr:at.current;return s=Ir(t,s),Mr(t,o),n=qa(e,t,n,r,s,o),r=Ha(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,hn(e,t,o)):(Fe&&r&&$a(t),t.flags|=1,dt(e,t,n,o),t.child)}function Sc(e,t,n,r,o){if(_t(n)){var s=!0;Zi(t)}else s=!1;if(Mr(t,o),t.stateNode===null)Ui(e,t),Tf(t,n,r),Gl(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,d=t.memoizedProps;a.props=d;var h=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=zt(c):(c=_t(n)?rr:at.current,c=Ir(t,c));var E=n.getDerivedStateFromProps,S=typeof E=="function"||typeof a.getSnapshotBeforeUpdate=="function";S||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(d!==r||h!==c)&&vc(t,a,r,c),kn=!1;var j=t.memoizedState;a.state=j,os(t,r,a,o),h=t.memoizedState,d!==r||j!==h||xt.current||kn?(typeof E=="function"&&(Xl(t,n,E,r),h=t.memoizedState),(d=kn||mc(t,n,d,r,j,h,c))?(S||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=c,r=d):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,cf(e,t),d=t.memoizedProps,c=t.type===t.elementType?d:Wt(t.type,d),a.props=c,S=t.pendingProps,j=a.context,h=n.contextType,typeof h=="object"&&h!==null?h=zt(h):(h=_t(n)?rr:at.current,h=Ir(t,h));var b=n.getDerivedStateFromProps;(E=typeof b=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(d!==S||j!==h)&&vc(t,a,r,h),kn=!1,j=t.memoizedState,a.state=j,os(t,r,a,o);var L=t.memoizedState;d!==S||j!==L||xt.current||kn?(typeof b=="function"&&(Xl(t,n,b,r),L=t.memoizedState),(c=kn||mc(t,n,c,r,j,L,h)||!1)?(E||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,L,h),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,L,h)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||d===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=L),a.props=r,a.state=L,a.context=h,r=c):(typeof a.componentDidUpdate!="function"||d===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),r=!1)}return ta(e,t,n,r,s,o)}function ta(e,t,n,r,o,s){Af(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&lc(t,n,!1),hn(e,t,s);r=t.stateNode,ev.current=t;var d=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Ur(t,e.child,null,s),t.child=Ur(t,null,d,s)):dt(e,t,d,s),t.memoizedState=r.state,o&&lc(t,n,!0),t.child}function If(e){var t=e.stateNode;t.pendingContext?sc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sc(e,t.context,!1),Fa(e,t.containerInfo)}function kc(e,t,n,r,o){return zr(),Ra(o),t.flags|=256,dt(e,t,n,r),t.child}var na={dehydrated:null,treeContext:null,retryLane:0};function ra(e){return{baseLanes:e,cachePool:null,transitions:null}}function zf(e,t,n){var r=t.pendingProps,o=Be.current,s=!1,a=(t.flags&128)!==0,d;if((d=a)||(d=e!==null&&e.memoizedState===null?!1:(o&2)!==0),d?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ie(Be,o&1),e===null)return Jl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,s?(r=t.mode,s=t.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=js(a,r,0,null),e=nr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=ra(n),t.memoizedState=na,e):Ja(t,a));if(o=e.memoizedState,o!==null&&(d=o.dehydrated,d!==null))return tv(e,t,a,r,d,o,n);if(s){s=r.fallback,a=t.mode,o=e.child,d=o.sibling;var h={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=h,t.deletions=null):(r=An(o,h),r.subtreeFlags=o.subtreeFlags&14680064),d!==null?s=An(d,s):(s=nr(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,a=e.child.memoizedState,a=a===null?ra(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=na,r}return s=e.child,e=s.sibling,r=An(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ja(e,t){return t=js({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ji(e,t,n,r){return r!==null&&Ra(r),Ur(t,e.child,null,n),e=Ja(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tv(e,t,n,r,o,s,a){if(n)return t.flags&256?(t.flags&=-257,r=pl(Error(F(422))),ji(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=js({mode:"visible",children:r.children},o,0,null),s=nr(s,o,a,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ur(t,e.child,null,a),t.child.memoizedState=ra(a),t.memoizedState=na,s);if(!(t.mode&1))return ji(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var d=r.dgst;return r=d,s=Error(F(419)),r=pl(s,r,void 0),ji(e,t,a,r)}if(d=(a&e.childLanes)!==0,wt||d){if(r=tt,r!==null){switch(a&-a){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}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,pn(e,o),Kt(r,e,o,-1))}return tu(),r=pl(Error(F(421))),ji(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=hv.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,Nt=Ln(o.nextSibling),bt=t,Fe=!0,Ht=null,e!==null&&(Mt[Rt++]=an,Mt[Rt++]=un,Mt[Rt++]=or,an=e.id,un=e.overflow,or=t),t=Ja(t,r.children),t.flags|=4096,t)}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yl(e.return,t,n)}function hl(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function Uf(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(dt(e,t,r.children,n),r=Be.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ie(Be,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&is(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),hl(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&is(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}hl(t,!0,n,null,s);break;case"together":hl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ui(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function hn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=An(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=An(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nv(e,t,n){switch(t.tag){case 3:If(t),zr();break;case 5:df(t);break;case 1:_t(t.type)&&Zi(t);break;case 4:Fa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ie(ns,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ie(Be,Be.current&1),t.flags|=128,null):n&t.child.childLanes?zf(e,t,n):(Ie(Be,Be.current&1),e=hn(e,t,n),e!==null?e.sibling:null);Ie(Be,Be.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Uf(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ie(Be,Be.current),r)break;return null;case 22:case 23:return t.lanes=0,Rf(e,t,n)}return hn(e,t,n)}var Df,oa,Ff,Bf;Df=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};oa=function(){};Ff=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,er(rn.current);var s=null;switch(n){case"input":o=Cl(e,o),r=Cl(e,r),s=[];break;case"select":o=We({},o,{value:void 0}),r=We({},r,{value:void 0}),s=[];break;case"textarea":o=Pl(e,o),r=Pl(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xi)}Tl(n,r);var a;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var d=o[c];for(a in d)d.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Po.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var h=r[c];if(d=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&h!==d&&(h!=null||d!=null))if(c==="style")if(d){for(a in d)!d.hasOwnProperty(a)||h&&h.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in h)h.hasOwnProperty(a)&&d[a]!==h[a]&&(n||(n={}),n[a]=h[a])}else n||(s||(s=[]),s.push(c,n)),n=h;else c==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,d=d?d.__html:void 0,h!=null&&d!==h&&(s=s||[]).push(c,h)):c==="children"?typeof h!="string"&&typeof h!="number"||(s=s||[]).push(c,""+h):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Po.hasOwnProperty(c)?(h!=null&&c==="onScroll"&&Ue("scroll",e),s||d===h||(s=[])):(s=s||[]).push(c,h))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Bf=function(e,t,n,r){n!==r&&(t.flags|=4)};function fo(e,t){if(!Fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function st(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function rv(e,t,n){var r=t.pendingProps;switch(Ma(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return _t(t.type)&&Gi(),st(t),null;case 3:return r=t.stateNode,Dr(),De(xt),De(at),Va(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ki(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ht!==null&&(fa(Ht),Ht=null))),oa(e,t),st(t),null;case 5:Ba(t);var o=er(Fo.current);if(n=t.type,e!==null&&t.stateNode!=null)Ff(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(F(166));return st(t),null}if(e=er(rn.current),ki(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[tn]=t,r[Uo]=s,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(o=0;o<go.length;o++)Ue(go[o],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":$u(r,s),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ue("invalid",r);break;case"textarea":Ru(r,s),Ue("invalid",r)}Tl(n,s),o=null;for(var a in s)if(s.hasOwnProperty(a)){var d=s[a];a==="children"?typeof d=="string"?r.textContent!==d&&(s.suppressHydrationWarning!==!0&&Si(r.textContent,d,e),o=["children",d]):typeof d=="number"&&r.textContent!==""+d&&(s.suppressHydrationWarning!==!0&&Si(r.textContent,d,e),o=["children",""+d]):Po.hasOwnProperty(a)&&d!=null&&a==="onScroll"&&Ue("scroll",r)}switch(n){case"input":hi(r),Mu(r,s,!0);break;case"textarea":hi(r),Au(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Xi)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=md(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[tn]=t,e[Uo]=r,Df(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ll(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),o=r;break;case"iframe":case"object":case"embed":Ue("load",e),o=r;break;case"video":case"audio":for(o=0;o<go.length;o++)Ue(go[o],e);o=r;break;case"source":Ue("error",e),o=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),o=r;break;case"details":Ue("toggle",e),o=r;break;case"input":$u(e,r),o=Cl(e,r),Ue("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=We({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":Ru(e,r),o=Pl(e,r),Ue("invalid",e);break;default:o=r}Tl(n,o),d=o;for(s in d)if(d.hasOwnProperty(s)){var h=d[s];s==="style"?yd(e,h):s==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,h!=null&&vd(e,h)):s==="children"?typeof h=="string"?(n!=="textarea"||h!=="")&&Oo(e,h):typeof h=="number"&&Oo(e,""+h):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Po.hasOwnProperty(s)?h!=null&&s==="onScroll"&&Ue("scroll",e):h!=null&&wa(e,s,h,a))}switch(n){case"input":hi(e),Mu(e,r,!1);break;case"textarea":hi(e),Au(e);break;case"option":r.value!=null&&e.setAttribute("value",""+zn(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Or(e,!!r.multiple,s,!1):r.defaultValue!=null&&Or(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Xi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return st(t),null;case 6:if(e&&t.stateNode!=null)Bf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(166));if(n=er(Fo.current),er(rn.current),ki(t)){if(r=t.stateNode,n=t.memoizedProps,r[tn]=t,(s=r.nodeValue!==n)&&(e=bt,e!==null))switch(e.tag){case 3:Si(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Si(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[tn]=t,t.stateNode=r}return st(t),null;case 13:if(De(Be),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Fe&&Nt!==null&&t.mode&1&&!(t.flags&128))sf(),zr(),t.flags|=98560,s=!1;else if(s=ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(F(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(F(317));s[tn]=t}else zr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;st(t),s=!1}else Ht!==null&&(fa(Ht),Ht=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Be.current&1?Ze===0&&(Ze=3):tu())),t.updateQueue!==null&&(t.flags|=4),st(t),null);case 4:return Dr(),oa(e,t),e===null&&Io(t.stateNode.containerInfo),st(t),null;case 10:return za(t.type._context),st(t),null;case 17:return _t(t.type)&&Gi(),st(t),null;case 19:if(De(Be),s=t.memoizedState,s===null)return st(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)fo(s,!1);else{if(Ze!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=is(e),a!==null){for(t.flags|=128,fo(s,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ie(Be,Be.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ke()>Br&&(t.flags|=128,r=!0,fo(s,!1),t.lanes=4194304)}else{if(!r)if(e=is(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Fe)return st(t),null}else 2*Ke()-s.renderingStartTime>Br&&n!==1073741824&&(t.flags|=128,r=!0,fo(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ke(),t.sibling=null,n=Be.current,Ie(Be,r?n&1|2:n&1),t):(st(t),null);case 22:case 23:return eu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?jt&1073741824&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function ov(e,t){switch(Ma(t),t.tag){case 1:return _t(t.type)&&Gi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dr(),De(xt),De(at),Va(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ba(t),null;case 13:if(De(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return De(Be),null;case 4:return Dr(),null;case 10:return za(t.type._context),null;case 22:case 23:return eu(),null;case 24:return null;default:return null}}var Ci=!1,lt=!1,iv=typeof WeakSet=="function"?WeakSet:Set,ee=null;function Nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){He(e,t,r)}else n.current=null}function ia(e,t,n){try{n()}catch(r){He(e,t,r)}}var jc=!1;function sv(e,t){if(Bl=Ki,e=Hd(),La(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,d=-1,h=-1,c=0,E=0,S=e,j=null;t:for(;;){for(var b;S!==n||o!==0&&S.nodeType!==3||(d=a+o),S!==s||r!==0&&S.nodeType!==3||(h=a+r),S.nodeType===3&&(a+=S.nodeValue.length),(b=S.firstChild)!==null;)j=S,S=b;for(;;){if(S===e)break t;if(j===n&&++c===o&&(d=a),j===s&&++E===r&&(h=a),(b=S.nextSibling)!==null)break;S=j,j=S.parentNode}S=b}n=d===-1||h===-1?null:{start:d,end:h}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vl={focusedElem:e,selectionRange:n},Ki=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var L=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(L!==null){var U=L.memoizedProps,me=L.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?U:Wt(t.type,U),me);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(N){He(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return L=jc,jc=!1,L}function jo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&ia(t,n,s)}o=o.next}while(o!==r)}}function ks(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function sa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Vf(e){var t=e.alternate;t!==null&&(e.alternate=null,Vf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tn],delete t[Uo],delete t[Hl],delete t[Bm],delete t[Vm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Wf(e){return e.tag===5||e.tag===3||e.tag===4}function Cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function la(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xi));else if(r!==4&&(e=e.child,e!==null))for(la(e,t,n),e=e.sibling;e!==null;)la(e,t,n),e=e.sibling}function aa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(aa(e,t,n),e=e.sibling;e!==null;)aa(e,t,n),e=e.sibling}var nt=null,qt=!1;function _n(e,t,n){for(n=n.child;n!==null;)qf(e,t,n),n=n.sibling}function qf(e,t,n){if(nn&&typeof nn.onCommitFiberUnmount=="function")try{nn.onCommitFiberUnmount(ms,n)}catch{}switch(n.tag){case 5:lt||Nr(n,t);case 6:var r=nt,o=qt;nt=null,_n(e,t,n),nt=r,qt=o,nt!==null&&(qt?(e=nt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):nt.removeChild(n.stateNode));break;case 18:nt!==null&&(qt?(e=nt,n=n.stateNode,e.nodeType===8?ll(e.parentNode,n):e.nodeType===1&&ll(e,n),Mo(e)):ll(nt,n.stateNode));break;case 4:r=nt,o=qt,nt=n.stateNode.containerInfo,qt=!0,_n(e,t,n),nt=r,qt=o;break;case 0:case 11:case 14:case 15:if(!lt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&ia(n,t,a),o=o.next}while(o!==r)}_n(e,t,n);break;case 1:if(!lt&&(Nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(d){He(n,t,d)}_n(e,t,n);break;case 21:_n(e,t,n);break;case 22:n.mode&1?(lt=(r=lt)||n.memoizedState!==null,_n(e,t,n),lt=r):_n(e,t,n);break;default:_n(e,t,n)}}function Nc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new iv),t.forEach(function(r){var o=mv.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,a=t,d=a;e:for(;d!==null;){switch(d.tag){case 5:nt=d.stateNode,qt=!1;break e;case 3:nt=d.stateNode.containerInfo,qt=!0;break e;case 4:nt=d.stateNode.containerInfo,qt=!0;break e}d=d.return}if(nt===null)throw Error(F(160));qf(s,a,o),nt=null,qt=!1;var h=o.alternate;h!==null&&(h.return=null),o.return=null}catch(c){He(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hf(t,e),t=t.sibling}function Hf(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Vt(t,e),Zt(e),r&4){try{jo(3,e,e.return),ks(3,e)}catch(U){He(e,e.return,U)}try{jo(5,e,e.return)}catch(U){He(e,e.return,U)}}break;case 1:Vt(t,e),Zt(e),r&512&&n!==null&&Nr(n,n.return);break;case 5:if(Vt(t,e),Zt(e),r&512&&n!==null&&Nr(n,n.return),e.flags&32){var o=e.stateNode;try{Oo(o,"")}catch(U){He(e,e.return,U)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,a=n!==null?n.memoizedProps:s,d=e.type,h=e.updateQueue;if(e.updateQueue=null,h!==null)try{d==="input"&&s.type==="radio"&&s.name!=null&&pd(o,s),Ll(d,a);var c=Ll(d,s);for(a=0;a<h.length;a+=2){var E=h[a],S=h[a+1];E==="style"?yd(o,S):E==="dangerouslySetInnerHTML"?vd(o,S):E==="children"?Oo(o,S):wa(o,E,S,c)}switch(d){case"input":Nl(o,s);break;case"textarea":hd(o,s);break;case"select":var j=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var b=s.value;b!=null?Or(o,!!s.multiple,b,!1):j!==!!s.multiple&&(s.defaultValue!=null?Or(o,!!s.multiple,s.defaultValue,!0):Or(o,!!s.multiple,s.multiple?[]:"",!1))}o[Uo]=s}catch(U){He(e,e.return,U)}}break;case 6:if(Vt(t,e),Zt(e),r&4){if(e.stateNode===null)throw Error(F(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(U){He(e,e.return,U)}}break;case 3:if(Vt(t,e),Zt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Mo(t.containerInfo)}catch(U){He(e,e.return,U)}break;case 4:Vt(t,e),Zt(e);break;case 13:Vt(t,e),Zt(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Ga=Ke())),r&4&&Nc(e);break;case 22:if(E=n!==null&&n.memoizedState!==null,e.mode&1?(lt=(c=lt)||E,Vt(t,e),lt=c):Vt(t,e),Zt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!E&&e.mode&1)for(ee=e,E=e.child;E!==null;){for(S=ee=E;ee!==null;){switch(j=ee,b=j.child,j.tag){case 0:case 11:case 14:case 15:jo(4,j,j.return);break;case 1:Nr(j,j.return);var L=j.stateNode;if(typeof L.componentWillUnmount=="function"){r=j,n=j.return;try{t=r,L.props=t.memoizedProps,L.state=t.memoizedState,L.componentWillUnmount()}catch(U){He(r,n,U)}}break;case 5:Nr(j,j.return);break;case 22:if(j.memoizedState!==null){Pc(S);continue}}b!==null?(b.return=j,ee=b):Pc(S)}E=E.sibling}e:for(E=null,S=e;;){if(S.tag===5){if(E===null){E=S;try{o=S.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(d=S.stateNode,h=S.memoizedProps.style,a=h!=null&&h.hasOwnProperty("display")?h.display:null,d.style.display=gd("display",a))}catch(U){He(e,e.return,U)}}}else if(S.tag===6){if(E===null)try{S.stateNode.nodeValue=c?"":S.memoizedProps}catch(U){He(e,e.return,U)}}else if((S.tag!==22&&S.tag!==23||S.memoizedState===null||S===e)&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===e)break e;for(;S.sibling===null;){if(S.return===null||S.return===e)break e;E===S&&(E=null),S=S.return}E===S&&(E=null),S.sibling.return=S.return,S=S.sibling}}break;case 19:Vt(t,e),Zt(e),r&4&&Nc(e);break;case 21:break;default:Vt(t,e),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Wf(n)){var r=n;break e}n=n.return}throw Error(F(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Oo(o,""),r.flags&=-33);var s=Cc(e);aa(e,s,o);break;case 3:case 4:var a=r.stateNode.containerInfo,d=Cc(e);la(e,d,a);break;default:throw Error(F(161))}}catch(h){He(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function lv(e,t,n){ee=e,Qf(e)}function Qf(e,t,n){for(var r=(e.mode&1)!==0;ee!==null;){var o=ee,s=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Ci;if(!a){var d=o.alternate,h=d!==null&&d.memoizedState!==null||lt;d=Ci;var c=lt;if(Ci=a,(lt=h)&&!c)for(ee=o;ee!==null;)a=ee,h=a.child,a.tag===22&&a.memoizedState!==null?Oc(o):h!==null?(h.return=a,ee=h):Oc(o);for(;s!==null;)ee=s,Qf(s),s=s.sibling;ee=o,Ci=d,lt=c}bc(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,ee=s):bc(e)}}function bc(e){for(;ee!==null;){var t=ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:lt||ks(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!lt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Wt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&fc(t,s,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}fc(t,a,n)}break;case 5:var d=t.stateNode;if(n===null&&t.flags&4){n=d;var h=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":h.autoFocus&&n.focus();break;case"img":h.src&&(n.src=h.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var E=c.memoizedState;if(E!==null){var S=E.dehydrated;S!==null&&Mo(S)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(F(163))}lt||t.flags&512&&sa(t)}catch(j){He(t,t.return,j)}}if(t===e){ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,ee=n;break}ee=t.return}}function Pc(e){for(;ee!==null;){var t=ee;if(t===e){ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ee=n;break}ee=t.return}}function Oc(e){for(;ee!==null;){var t=ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ks(4,t)}catch(h){He(t,n,h)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(h){He(t,o,h)}}var s=t.return;try{sa(t)}catch(h){He(t,s,h)}break;case 5:var a=t.return;try{sa(t)}catch(h){He(t,a,h)}}}catch(h){He(t,t.return,h)}if(t===e){ee=null;break}var d=t.sibling;if(d!==null){d.return=t.return,ee=d;break}ee=t.return}}var av=Math.ceil,as=mn.ReactCurrentDispatcher,Ya=mn.ReactCurrentOwner,It=mn.ReactCurrentBatchConfig,Ne=0,tt=null,Xe=null,rt=0,jt=0,br=Fn(0),Ze=0,qo=null,sr=0,Es=0,Xa=0,Co=null,yt=null,Ga=0,Br=1/0,sn=null,us=!1,ua=null,Mn=null,Ni=!1,Nn=null,cs=0,No=0,ca=null,Di=-1,Fi=0;function ft(){return Ne&6?Ke():Di!==-1?Di:Di=Ke()}function Rn(e){return e.mode&1?Ne&2&&rt!==0?rt&-rt:qm.transition!==null?(Fi===0&&(Fi=Od()),Fi):(e=Le,e!==0||(e=window.event,e=e===void 0?16:Id(e.type)),e):1}function Kt(e,t,n,r){if(50<No)throw No=0,ca=null,Error(F(185));Ko(e,n,r),(!(Ne&2)||e!==tt)&&(e===tt&&(!(Ne&2)&&(Es|=n),Ze===4&&jn(e,rt)),St(e,r),n===1&&Ne===0&&!(t.mode&1)&&(Br=Ke()+500,xs&&Bn()))}function St(e,t){var n=e.callbackNode;qh(e,t);var r=Qi(e,e===tt?rt:0);if(r===0)n!==null&&Uu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Uu(n),t===1)e.tag===0?Wm(Tc.bind(null,e)):nf(Tc.bind(null,e)),Dm(function(){!(Ne&6)&&Bn()}),n=null;else{switch(Td(r)){case 1:n=Ea;break;case 4:n=bd;break;case 16:n=Hi;break;case 536870912:n=Pd;break;default:n=Hi}n=tp(n,Kf.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Kf(e,t){if(Di=-1,Fi=0,Ne&6)throw Error(F(327));var n=e.callbackNode;if(Rr()&&e.callbackNode!==n)return null;var r=Qi(e,e===tt?rt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ds(e,r);else{t=r;var o=Ne;Ne|=2;var s=Yf();(tt!==e||rt!==t)&&(sn=null,Br=Ke()+500,tr(e,t));do try{dv();break}catch(d){Jf(e,d)}while(!0);Ia(),as.current=s,Ne=o,Xe!==null?t=0:(tt=null,rt=0,t=Ze)}if(t!==0){if(t===2&&(o=Il(e),o!==0&&(r=o,t=da(e,o))),t===1)throw n=qo,tr(e,0),jn(e,r),St(e,Ke()),n;if(t===6)jn(e,r);else{if(o=e.current.alternate,!(r&30)&&!uv(o)&&(t=ds(e,r),t===2&&(s=Il(e),s!==0&&(r=s,t=da(e,s))),t===1))throw n=qo,tr(e,0),jn(e,r),St(e,Ke()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(F(345));case 2:Xn(e,yt,sn);break;case 3:if(jn(e,r),(r&130023424)===r&&(t=Ga+500-Ke(),10<t)){if(Qi(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ft(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ql(Xn.bind(null,e,yt,sn),t);break}Xn(e,yt,sn);break;case 4:if(jn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-Qt(r);s=1<<a,a=t[a],a>o&&(o=a),r&=~s}if(r=o,r=Ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*av(r/1960))-r,10<r){e.timeoutHandle=ql(Xn.bind(null,e,yt,sn),r);break}Xn(e,yt,sn);break;case 5:Xn(e,yt,sn);break;default:throw Error(F(329))}}}return St(e,Ke()),e.callbackNode===n?Kf.bind(null,e):null}function da(e,t){var n=Co;return e.current.memoizedState.isDehydrated&&(tr(e,t).flags|=256),e=ds(e,t),e!==2&&(t=yt,yt=n,t!==null&&fa(t)),e}function fa(e){yt===null?yt=e:yt.push.apply(yt,e)}function uv(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Jt(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function jn(e,t){for(t&=~Xa,t&=~Es,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qt(t),r=1<<n;e[n]=-1,t&=~r}}function Tc(e){if(Ne&6)throw Error(F(327));Rr();var t=Qi(e,0);if(!(t&1))return St(e,Ke()),null;var n=ds(e,t);if(e.tag!==0&&n===2){var r=Il(e);r!==0&&(t=r,n=da(e,r))}if(n===1)throw n=qo,tr(e,0),jn(e,t),St(e,Ke()),n;if(n===6)throw Error(F(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xn(e,yt,sn),St(e,Ke()),null}function Za(e,t){var n=Ne;Ne|=1;try{return e(t)}finally{Ne=n,Ne===0&&(Br=Ke()+500,xs&&Bn())}}function lr(e){Nn!==null&&Nn.tag===0&&!(Ne&6)&&Rr();var t=Ne;Ne|=1;var n=It.transition,r=Le;try{if(It.transition=null,Le=1,e)return e()}finally{Le=r,It.transition=n,Ne=t,!(Ne&6)&&Bn()}}function eu(){jt=br.current,De(br)}function tr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Um(n)),Xe!==null)for(n=Xe.return;n!==null;){var r=n;switch(Ma(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Gi();break;case 3:Dr(),De(xt),De(at),Va();break;case 5:Ba(r);break;case 4:Dr();break;case 13:De(Be);break;case 19:De(Be);break;case 10:za(r.type._context);break;case 22:case 23:eu()}n=n.return}if(tt=e,Xe=e=An(e.current,null),rt=jt=t,Ze=0,qo=null,Xa=Es=sr=0,yt=Co=null,Zn!==null){for(t=0;t<Zn.length;t++)if(n=Zn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var a=s.next;s.next=o,r.next=a}n.pending=r}Zn=null}return e}function Jf(e,t){do{var n=Xe;try{if(Ia(),Ii.current=ls,ss){for(var r=Ve.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ss=!1}if(ir=0,et=Ge=Ve=null,Eo=!1,Bo=0,Ya.current=null,n===null||n.return===null){Ze=1,qo=t,Xe=null;break}e:{var s=e,a=n.return,d=n,h=t;if(t=rt,d.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){var c=h,E=d,S=E.tag;if(!(E.mode&1)&&(S===0||S===11||S===15)){var j=E.alternate;j?(E.updateQueue=j.updateQueue,E.memoizedState=j.memoizedState,E.lanes=j.lanes):(E.updateQueue=null,E.memoizedState=null)}var b=yc(a);if(b!==null){b.flags&=-257,wc(b,a,d,s,t),b.mode&1&&gc(s,c,t),t=b,h=c;var L=t.updateQueue;if(L===null){var U=new Set;U.add(h),t.updateQueue=U}else L.add(h);break e}else{if(!(t&1)){gc(s,c,t),tu();break e}h=Error(F(426))}}else if(Fe&&d.mode&1){var me=yc(a);if(me!==null){!(me.flags&65536)&&(me.flags|=256),wc(me,a,d,s,t),Ra(Fr(h,d));break e}}s=h=Fr(h,d),Ze!==4&&(Ze=2),Co===null?Co=[s]:Co.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=Lf(s,h,t);dc(s,y);break e;case 1:d=h;var m=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Mn===null||!Mn.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var N=$f(s,d,t);dc(s,N);break e}}s=s.return}while(s!==null)}Gf(n)}catch(A){t=A,Xe===n&&n!==null&&(Xe=n=n.return);continue}break}while(!0)}function Yf(){var e=as.current;return as.current=ls,e===null?ls:e}function tu(){(Ze===0||Ze===3||Ze===2)&&(Ze=4),tt===null||!(sr&268435455)&&!(Es&268435455)||jn(tt,rt)}function ds(e,t){var n=Ne;Ne|=2;var r=Yf();(tt!==e||rt!==t)&&(sn=null,tr(e,t));do try{cv();break}catch(o){Jf(e,o)}while(!0);if(Ia(),Ne=n,as.current=r,Xe!==null)throw Error(F(261));return tt=null,rt=0,Ze}function cv(){for(;Xe!==null;)Xf(Xe)}function dv(){for(;Xe!==null&&!Ah();)Xf(Xe)}function Xf(e){var t=ep(e.alternate,e,jt);e.memoizedProps=e.pendingProps,t===null?Gf(e):Xe=t,Ya.current=null}function Gf(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ov(n,t),n!==null){n.flags&=32767,Xe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ze=6,Xe=null;return}}else if(n=rv(n,t,jt),n!==null){Xe=n;return}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);Ze===0&&(Ze=5)}function Xn(e,t,n){var r=Le,o=It.transition;try{It.transition=null,Le=1,fv(e,t,n,r)}finally{It.transition=o,Le=r}return null}function fv(e,t,n,r){do Rr();while(Nn!==null);if(Ne&6)throw Error(F(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(F(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(Hh(e,s),e===tt&&(Xe=tt=null,rt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ni||(Ni=!0,tp(Hi,function(){return Rr(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=It.transition,It.transition=null;var a=Le;Le=1;var d=Ne;Ne|=4,Ya.current=null,sv(e,n),Hf(n,e),Lm(Vl),Ki=!!Bl,Vl=Bl=null,e.current=n,lv(n),Ih(),Ne=d,Le=a,It.transition=s}else e.current=n;if(Ni&&(Ni=!1,Nn=e,cs=o),s=e.pendingLanes,s===0&&(Mn=null),Dh(n.stateNode),St(e,Ke()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(us)throw us=!1,e=ua,ua=null,e;return cs&1&&e.tag!==0&&Rr(),s=e.pendingLanes,s&1?e===ca?No++:(No=0,ca=e):No=0,Bn(),null}function Rr(){if(Nn!==null){var e=Td(cs),t=It.transition,n=Le;try{if(It.transition=null,Le=16>e?16:e,Nn===null)var r=!1;else{if(e=Nn,Nn=null,cs=0,Ne&6)throw Error(F(331));var o=Ne;for(Ne|=4,ee=e.current;ee!==null;){var s=ee,a=s.child;if(ee.flags&16){var d=s.deletions;if(d!==null){for(var h=0;h<d.length;h++){var c=d[h];for(ee=c;ee!==null;){var E=ee;switch(E.tag){case 0:case 11:case 15:jo(8,E,s)}var S=E.child;if(S!==null)S.return=E,ee=S;else for(;ee!==null;){E=ee;var j=E.sibling,b=E.return;if(Vf(E),E===c){ee=null;break}if(j!==null){j.return=b,ee=j;break}ee=b}}}var L=s.alternate;if(L!==null){var U=L.child;if(U!==null){L.child=null;do{var me=U.sibling;U.sibling=null,U=me}while(U!==null)}}ee=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,ee=a;else e:for(;ee!==null;){if(s=ee,s.flags&2048)switch(s.tag){case 0:case 11:case 15:jo(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,ee=y;break e}ee=s.return}}var m=e.current;for(ee=m;ee!==null;){a=ee;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,ee=w;else e:for(a=m;ee!==null;){if(d=ee,d.flags&2048)try{switch(d.tag){case 0:case 11:case 15:ks(9,d)}}catch(A){He(d,d.return,A)}if(d===a){ee=null;break e}var N=d.sibling;if(N!==null){N.return=d.return,ee=N;break e}ee=d.return}}if(Ne=o,Bn(),nn&&typeof nn.onPostCommitFiberRoot=="function")try{nn.onPostCommitFiberRoot(ms,e)}catch{}r=!0}return r}finally{Le=n,It.transition=t}}return!1}function Lc(e,t,n){t=Fr(n,t),t=Lf(e,t,1),e=$n(e,t,1),t=ft(),e!==null&&(Ko(e,1,t),St(e,t))}function He(e,t,n){if(e.tag===3)Lc(e,e,n);else for(;t!==null;){if(t.tag===3){Lc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Mn===null||!Mn.has(r))){e=Fr(n,e),e=$f(t,e,1),t=$n(t,e,1),e=ft(),t!==null&&(Ko(t,1,e),St(t,e));break}}t=t.return}}function pv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ft(),e.pingedLanes|=e.suspendedLanes&n,tt===e&&(rt&n)===n&&(Ze===4||Ze===3&&(rt&130023424)===rt&&500>Ke()-Ga?tr(e,0):Xa|=n),St(e,t)}function Zf(e,t){t===0&&(e.mode&1?(t=gi,gi<<=1,!(gi&130023424)&&(gi=4194304)):t=1);var n=ft();e=pn(e,t),e!==null&&(Ko(e,t,n),St(e,n))}function hv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zf(e,n)}function mv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),Zf(e,n)}var ep;ep=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)wt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wt=!1,nv(e,t,n);wt=!!(e.flags&131072)}else wt=!1,Fe&&t.flags&1048576&&rf(t,ts,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ui(e,t),e=t.pendingProps;var o=Ir(t,at.current);Mr(t,n),o=qa(null,t,r,e,o,n);var s=Ha();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,_t(r)?(s=!0,Zi(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Da(t),o.updater=Ss,t.stateNode=o,o._reactInternals=t,Gl(t,r,e,n),t=ta(null,t,r,!0,s,n)):(t.tag=0,Fe&&s&&$a(t),dt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ui(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=gv(r),e=Wt(r,e),o){case 0:t=ea(null,t,r,e,n);break e;case 1:t=Sc(null,t,r,e,n);break e;case 11:t=xc(null,t,r,e,n);break e;case 14:t=_c(null,t,r,Wt(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),ea(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),Sc(e,t,r,o,n);case 3:e:{if(If(t),e===null)throw Error(F(387));r=t.pendingProps,s=t.memoizedState,o=s.element,cf(e,t),os(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Fr(Error(F(423)),t),t=kc(e,t,r,n,o);break e}else if(r!==o){o=Fr(Error(F(424)),t),t=kc(e,t,r,n,o);break e}else for(Nt=Ln(t.stateNode.containerInfo.firstChild),bt=t,Fe=!0,Ht=null,n=af(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zr(),r===o){t=hn(e,t,n);break e}dt(e,t,r,n)}t=t.child}return t;case 5:return df(t),e===null&&Jl(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,a=o.children,Wl(r,o)?a=null:s!==null&&Wl(r,s)&&(t.flags|=32),Af(e,t),dt(e,t,a,n),t.child;case 6:return e===null&&Jl(t),null;case 13:return zf(e,t,n);case 4:return Fa(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ur(t,null,r,n):dt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),xc(e,t,r,o,n);case 7:return dt(e,t,t.pendingProps,n),t.child;case 8:return dt(e,t,t.pendingProps.children,n),t.child;case 12:return dt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,a=o.value,Ie(ns,r._currentValue),r._currentValue=a,s!==null)if(Jt(s.value,a)){if(s.children===o.children&&!xt.current){t=hn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var d=s.dependencies;if(d!==null){a=s.child;for(var h=d.firstContext;h!==null;){if(h.context===r){if(s.tag===1){h=cn(-1,n&-n),h.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var E=c.pending;E===null?h.next=h:(h.next=E.next,E.next=h),c.pending=h}}s.lanes|=n,h=s.alternate,h!==null&&(h.lanes|=n),Yl(s.return,n,t),d.lanes|=n;break}h=h.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(F(341));a.lanes|=n,d=a.alternate,d!==null&&(d.lanes|=n),Yl(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}dt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Mr(t,n),o=zt(o),r=r(o),t.flags|=1,dt(e,t,r,n),t.child;case 14:return r=t.type,o=Wt(r,t.pendingProps),o=Wt(r.type,o),_c(e,t,r,o,n);case 15:return Mf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),Ui(e,t),t.tag=1,_t(r)?(e=!0,Zi(t)):e=!1,Mr(t,n),Tf(t,r,o),Gl(t,r,o,n),ta(null,t,r,!0,e,n);case 19:return Uf(e,t,n);case 22:return Rf(e,t,n)}throw Error(F(156,t.tag))};function tp(e,t){return Nd(e,t)}function vv(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 At(e,t,n,r){return new vv(e,t,n,r)}function nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gv(e){if(typeof e=="function")return nu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_a)return 11;if(e===Sa)return 14}return 2}function An(e,t){var n=e.alternate;return n===null?(n=At(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bi(e,t,n,r,o,s){var a=2;if(r=e,typeof e=="function")nu(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case yr:return nr(n.children,o,s,t);case xa:a=8,o|=8;break;case Sl:return e=At(12,n,t,o|2),e.elementType=Sl,e.lanes=s,e;case kl:return e=At(13,n,t,o),e.elementType=kl,e.lanes=s,e;case El:return e=At(19,n,t,o),e.elementType=El,e.lanes=s,e;case cd:return js(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ad:a=10;break e;case ud:a=9;break e;case _a:a=11;break e;case Sa:a=14;break e;case Sn:a=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=At(a,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function nr(e,t,n,r){return e=At(7,e,r,t),e.lanes=n,e}function js(e,t,n,r){return e=At(22,e,r,t),e.elementType=cd,e.lanes=n,e.stateNode={isHidden:!1},e}function ml(e,t,n){return e=At(6,e,null,t),e.lanes=n,e}function vl(e,t,n){return t=At(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yv(e,t,n,r,o){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=Ys(0),this.expirationTimes=Ys(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ys(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ru(e,t,n,r,o,s,a,d,h){return e=new yv(e,t,n,d,h),t===1?(t=1,s===!0&&(t|=8)):t=0,s=At(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Da(s),e}function wv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:gr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function np(e){if(!e)return Un;e=e._reactInternals;e:{if(ur(e)!==e||e.tag!==1)throw Error(F(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(_t(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(F(171))}if(e.tag===1){var n=e.type;if(_t(n))return tf(e,n,t)}return t}function rp(e,t,n,r,o,s,a,d,h){return e=ru(n,r,!0,e,o,s,a,d,h),e.context=np(null),n=e.current,r=ft(),o=Rn(n),s=cn(r,o),s.callback=t??null,$n(n,s,o),e.current.lanes=o,Ko(e,o,r),St(e,r),e}function Cs(e,t,n,r){var o=t.current,s=ft(),a=Rn(o);return n=np(n),t.context===null?t.context=n:t.pendingContext=n,t=cn(s,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=$n(o,t,a),e!==null&&(Kt(e,o,a,s),Ai(e,o,a)),a}function fs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function $c(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ou(e,t){$c(e,t),(e=e.alternate)&&$c(e,t)}function xv(){return null}var op=typeof reportError=="function"?reportError:function(e){console.error(e)};function iu(e){this._internalRoot=e}Ns.prototype.render=iu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));Cs(e,t,null,null)};Ns.prototype.unmount=iu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lr(function(){Cs(null,e,null,null)}),t[fn]=null}};function Ns(e){this._internalRoot=e}Ns.prototype.unstable_scheduleHydration=function(e){if(e){var t=Md();e={blockedOn:null,target:e,priority:t};for(var n=0;n<En.length&&t!==0&&t<En[n].priority;n++);En.splice(n,0,e),n===0&&Ad(e)}};function su(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function bs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mc(){}function _v(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var c=fs(a);s.call(c)}}var a=rp(t,r,e,0,null,!1,!1,"",Mc);return e._reactRootContainer=a,e[fn]=a.current,Io(e.nodeType===8?e.parentNode:e),lr(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var d=r;r=function(){var c=fs(h);d.call(c)}}var h=ru(e,0,!1,null,null,!1,!1,"",Mc);return e._reactRootContainer=h,e[fn]=h.current,Io(e.nodeType===8?e.parentNode:e),lr(function(){Cs(t,h,n,r)}),h}function Ps(e,t,n,r,o){var s=n._reactRootContainer;if(s){var a=s;if(typeof o=="function"){var d=o;o=function(){var h=fs(a);d.call(h)}}Cs(t,a,e,o)}else a=_v(n,t,e,o,r);return fs(a)}Ld=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=vo(t.pendingLanes);n!==0&&(ja(t,n|1),St(t,Ke()),!(Ne&6)&&(Br=Ke()+500,Bn()))}break;case 13:lr(function(){var r=pn(e,1);if(r!==null){var o=ft();Kt(r,e,1,o)}}),ou(e,1)}};Ca=function(e){if(e.tag===13){var t=pn(e,134217728);if(t!==null){var n=ft();Kt(t,e,134217728,n)}ou(e,134217728)}};$d=function(e){if(e.tag===13){var t=Rn(e),n=pn(e,t);if(n!==null){var r=ft();Kt(n,e,t,r)}ou(e,t)}};Md=function(){return Le};Rd=function(e,t){var n=Le;try{return Le=e,t()}finally{Le=n}};Ml=function(e,t,n){switch(t){case"input":if(Nl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=ws(r);if(!o)throw Error(F(90));fd(r),Nl(r,o)}}}break;case"textarea":hd(e,n);break;case"select":t=n.value,t!=null&&Or(e,!!n.multiple,t,!1)}};_d=Za;Sd=lr;var Sv={usingClientEntryPoint:!1,Events:[Yo,Sr,ws,wd,xd,Za]},po={findFiberByHostInstance:Gn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},kv={bundleType:po.bundleType,version:po.version,rendererPackageName:po.rendererPackageName,rendererConfig:po.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=jd(e),e===null?null:e.stateNode},findFiberByHostInstance:po.findFiberByHostInstance||xv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bi.isDisabled&&bi.supportsFiber)try{ms=bi.inject(kv),nn=bi}catch{}}Ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sv;Ot.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!su(t))throw Error(F(200));return wv(e,t,null,n)};Ot.createRoot=function(e,t){if(!su(e))throw Error(F(299));var n=!1,r="",o=op;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ru(e,1,!1,null,null,n,!1,r,o),e[fn]=t.current,Io(e.nodeType===8?e.parentNode:e),new iu(t)};Ot.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=jd(t),e=e===null?null:e.stateNode,e};Ot.flushSync=function(e){return lr(e)};Ot.hydrate=function(e,t,n){if(!bs(t))throw Error(F(200));return Ps(null,e,t,!0,n)};Ot.hydrateRoot=function(e,t,n){if(!su(e))throw Error(F(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",a=op;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=rp(t,null,e,1,n??null,o,!1,s,a),e[fn]=t.current,Io(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ns(t)};Ot.render=function(e,t,n){if(!bs(t))throw Error(F(200));return Ps(null,e,t,!1,n)};Ot.unmountComponentAtNode=function(e){if(!bs(e))throw Error(F(40));return e._reactRootContainer?(lr(function(){Ps(null,null,e,!1,function(){e._reactRootContainer=null,e[fn]=null})}),!0):!1};Ot.unstable_batchedUpdates=Za;Ot.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!bs(n))throw Error(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return Ps(e,t,n,!1,r)};Ot.version="18.3.1-next-f1338f8080-20240426";function ip(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ip)}catch(e){console.error(e)}}ip(),od.exports=Ot;var Ev=od.exports,sp,Rc=Ev;sp=Rc.createRoot,Rc.hydrateRoot;function jv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ac(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ic(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ac(Object(n),!0).forEach(function(r){jv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ac(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cv(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Nv(e,t){if(e==null)return{};var n=Cv(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bv(e,t){return Pv(e)||Ov(e,t)||Tv(e,t)||Lv()}function Pv(e){if(Array.isArray(e))return e}function Ov(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,s=void 0;try{for(var a=e[Symbol.iterator](),d;!(r=(d=a.next()).done)&&(n.push(d.value),!(t&&n.length===t));r=!0);}catch(h){o=!0,s=h}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw s}}return n}}function Tv(e,t){if(e){if(typeof e=="string")return zc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zc(e,t)}}function zc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
41
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Dc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uc(Object(n),!0).forEach(function(r){$v(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,s){return s(o)},r)}}function yo(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return o.length>=e.length?e.apply(this,o):function(){for(var a=arguments.length,d=new Array(a),h=0;h<a;h++)d[h]=arguments[h];return t.apply(n,[].concat(o,d))}}}function ps(e){return{}.toString.call(e).includes("Object")}function Rv(e){return!Object.keys(e).length}function Ho(e){return typeof e=="function"}function Av(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Iv(e,t){return ps(t)||In("changeType"),Object.keys(t).some(function(n){return!Av(e,n)})&&In("changeField"),t}function zv(e){Ho(e)||In("selectorType")}function Uv(e){Ho(e)||ps(e)||In("handlerType"),ps(e)&&Object.values(e).some(function(t){return!Ho(t)})&&In("handlersType")}function Dv(e){e||In("initialIsRequired"),ps(e)||In("initialType"),Rv(e)&&In("initialContent")}function Fv(e,t){throw new Error(e[t]||e.default)}var Bv={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},In=yo(Fv)(Bv),Pi={changes:Iv,selector:zv,handler:Uv,initial:Dv};function Vv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Pi.initial(e),Pi.handler(t);var n={current:e},r=yo(Hv)(n,t),o=yo(qv)(n),s=yo(Pi.changes)(e),a=yo(Wv)(n);function d(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(E){return E};return Pi.selector(c),c(n.current)}function h(c){Mv(r,o,s,a)(c)}return[d,h]}function Wv(e,t){return Ho(t)?t(e.current):t}function qv(e,t){return e.current=Dc(Dc({},e.current),t),t}function Hv(e,t,n){return Ho(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var Qv={create:Vv},Kv={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function Jv(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return o.length>=e.length?e.apply(this,o):function(){for(var a=arguments.length,d=new Array(a),h=0;h<a;h++)d[h]=arguments[h];return t.apply(n,[].concat(o,d))}}}function Yv(e){return{}.toString.call(e).includes("Object")}function Xv(e){return e||Fc("configIsRequired"),Yv(e)||Fc("configType"),e.urls?(Gv(),{paths:{vs:e.urls.monacoBase}}):e}function Gv(){console.warn(lp.deprecation)}function Zv(e,t){throw new Error(e[t]||e.default)}var lp={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
42
+ You are using deprecated way of configuration.
43
+
44
+ Instead of using
45
+ monaco.config({ urls: { monacoBase: '...' } })
46
+ use
47
+ monaco.config({ paths: { vs: '...' } })
48
+
49
+ For more please check the link https://github.com/suren-atoyan/monaco-loader#config
50
+ `},Fc=Jv(Zv)(lp),eg={config:Xv},tg=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(s,a){return a(s)},o)}};function ap(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],ap(e[n],t[n]))}),Ic(Ic({},e),t)}var ng={type:"cancelation",msg:"operation is manually canceled"};function gl(e){var t=!1,n=new Promise(function(r,o){e.then(function(s){return t?o(ng):r(s)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var rg=Qv.create({config:Kv,isInitialized:!1,resolve:null,reject:null,monaco:null}),up=bv(rg,2),Go=up[0],Os=up[1];function og(e){var t=eg.config(e),n=t.monaco,r=Nv(t,["monaco"]);Os(function(o){return{config:ap(o.config,r),monaco:n}})}function ig(){var e=Go(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(Os({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),gl(yl);if(window.monaco&&window.monaco.editor)return cp(window.monaco),e.resolve(window.monaco),gl(yl);tg(sg,ag)(ug)}return gl(yl)}function sg(e){return document.body.appendChild(e)}function lg(e){var t=document.createElement("script");return e&&(t.src=e),t}function ag(e){var t=Go(function(r){var o=r.config,s=r.reject;return{config:o,reject:s}}),n=lg("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function ug(){var e=Go(function(n){var r=n.config,o=n.resolve,s=n.reject;return{config:r,resolve:o,reject:s}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){cp(n),e.resolve(n)},function(n){e.reject(n)})}function cp(e){Go().monaco||Os({monaco:e})}function cg(){return Go(function(e){var t=e.monaco;return t})}var yl=new Promise(function(e,t){return Os({resolve:e,reject:t})}),dp={config:og,init:ig,__getMonacoInstance:cg},dg={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},wl=dg,fg={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},pg=fg;function hg({children:e}){return bn.createElement("div",{style:pg.container},e)}var mg=hg,vg=mg;function gg({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:s,wrapperProps:a}){return bn.createElement("section",{style:{...wl.wrapper,width:e,height:t},...a},!n&&bn.createElement(vg,null,r),bn.createElement("div",{ref:o,style:{...wl.fullWidth,...!n&&wl.hide},className:s}))}var yg=gg,fp=O.memo(yg);function wg(e){O.useEffect(e,[])}var pp=wg;function xg(e,t,n=!0){let r=O.useRef(!0);O.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Ct=xg;function bo(){}function Pr(e,t,n,r){return _g(e,r)||Sg(e,t,n,r)}function _g(e,t){return e.editor.getModel(hp(e,t))}function Sg(e,t,n,r){return e.editor.createModel(t,n,r?hp(e,r):void 0)}function hp(e,t){return e.Uri.parse(t)}function kg({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:s,modifiedModelPath:a,keepCurrentOriginalModel:d=!1,keepCurrentModifiedModel:h=!1,theme:c="light",loading:E="Loading...",options:S={},height:j="100%",width:b="100%",className:L,wrapperProps:U={},beforeMount:me=bo,onMount:y=bo}){let[m,w]=O.useState(!1),[N,A]=O.useState(!0),V=O.useRef(null),D=O.useRef(null),K=O.useRef(null),fe=O.useRef(y),z=O.useRef(me),se=O.useRef(!1);pp(()=>{let H=dp.init();return H.then(te=>(D.current=te)&&A(!1)).catch(te=>(te==null?void 0:te.type)!=="cancelation"&&console.error("Monaco initialization: error:",te)),()=>V.current?J():H.cancel()}),Ct(()=>{if(V.current&&D.current){let H=V.current.getOriginalEditor(),te=Pr(D.current,e||"",r||n||"text",s||"");te!==H.getModel()&&H.setModel(te)}},[s],m),Ct(()=>{if(V.current&&D.current){let H=V.current.getModifiedEditor(),te=Pr(D.current,t||"",o||n||"text",a||"");te!==H.getModel()&&H.setModel(te)}},[a],m),Ct(()=>{let H=V.current.getModifiedEditor();H.getOption(D.current.editor.EditorOption.readOnly)?H.setValue(t||""):t!==H.getValue()&&(H.executeEdits("",[{range:H.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),H.pushUndoStop())},[t],m),Ct(()=>{var H,te;(te=(H=V.current)==null?void 0:H.getModel())==null||te.original.setValue(e||"")},[e],m),Ct(()=>{let{original:H,modified:te}=V.current.getModel();D.current.editor.setModelLanguage(H,r||n||"text"),D.current.editor.setModelLanguage(te,o||n||"text")},[n,r,o],m),Ct(()=>{var H;(H=D.current)==null||H.editor.setTheme(c)},[c],m),Ct(()=>{var H;(H=V.current)==null||H.updateOptions(S)},[S],m);let Me=O.useCallback(()=>{var Ce;if(!D.current)return;z.current(D.current);let H=Pr(D.current,e||"",r||n||"text",s||""),te=Pr(D.current,t||"",o||n||"text",a||"");(Ce=V.current)==null||Ce.setModel({original:H,modified:te})},[n,t,o,e,r,s,a]),$=O.useCallback(()=>{var H;!se.current&&K.current&&(V.current=D.current.editor.createDiffEditor(K.current,{automaticLayout:!0,...S}),Me(),(H=D.current)==null||H.editor.setTheme(c),w(!0),se.current=!0)},[S,c,Me]);O.useEffect(()=>{m&&fe.current(V.current,D.current)},[m]),O.useEffect(()=>{!N&&!m&&$()},[N,m,$]);function J(){var te,Ce,R,ne;let H=(te=V.current)==null?void 0:te.getModel();d||((Ce=H==null?void 0:H.original)==null||Ce.dispose()),h||((R=H==null?void 0:H.modified)==null||R.dispose()),(ne=V.current)==null||ne.dispose()}return bn.createElement(fp,{width:b,height:j,isEditorReady:m,loading:E,_ref:K,className:L,wrapperProps:U})}var Eg=kg;O.memo(Eg);function jg(e){let t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}var Cg=jg,Oi=new Map;function Ng({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:s,theme:a="light",line:d,loading:h="Loading...",options:c={},overrideServices:E={},saveViewState:S=!0,keepCurrentModel:j=!1,width:b="100%",height:L="100%",className:U,wrapperProps:me={},beforeMount:y=bo,onMount:m=bo,onChange:w,onValidate:N=bo}){let[A,V]=O.useState(!1),[D,K]=O.useState(!0),fe=O.useRef(null),z=O.useRef(null),se=O.useRef(null),Me=O.useRef(m),$=O.useRef(y),J=O.useRef(),H=O.useRef(r),te=Cg(s),Ce=O.useRef(!1),R=O.useRef(!1);pp(()=>{let T=dp.init();return T.then(q=>(fe.current=q)&&K(!1)).catch(q=>(q==null?void 0:q.type)!=="cancelation"&&console.error("Monaco initialization: error:",q)),()=>z.current?he():T.cancel()}),Ct(()=>{var q,ve,be,Oe;let T=Pr(fe.current,e||r||"",t||o||"",s||n||"");T!==((q=z.current)==null?void 0:q.getModel())&&(S&&Oi.set(te,(ve=z.current)==null?void 0:ve.saveViewState()),(be=z.current)==null||be.setModel(T),S&&((Oe=z.current)==null||Oe.restoreViewState(Oi.get(s))))},[s],A),Ct(()=>{var T;(T=z.current)==null||T.updateOptions(c)},[c],A),Ct(()=>{!z.current||r===void 0||(z.current.getOption(fe.current.editor.EditorOption.readOnly)?z.current.setValue(r):r!==z.current.getValue()&&(R.current=!0,z.current.executeEdits("",[{range:z.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),z.current.pushUndoStop(),R.current=!1))},[r],A),Ct(()=>{var q,ve;let T=(q=z.current)==null?void 0:q.getModel();T&&o&&((ve=fe.current)==null||ve.editor.setModelLanguage(T,o))},[o],A),Ct(()=>{var T;d!==void 0&&((T=z.current)==null||T.revealLine(d))},[d],A),Ct(()=>{var T;(T=fe.current)==null||T.editor.setTheme(a)},[a],A);let ne=O.useCallback(()=>{var T;if(!(!se.current||!fe.current)&&!Ce.current){$.current(fe.current);let q=s||n,ve=Pr(fe.current,r||e||"",t||o||"",q||"");z.current=(T=fe.current)==null?void 0:T.editor.create(se.current,{model:ve,automaticLayout:!0,...c},E),S&&z.current.restoreViewState(Oi.get(q)),fe.current.editor.setTheme(a),d!==void 0&&z.current.revealLine(d),V(!0),Ce.current=!0}},[e,t,n,r,o,s,c,E,S,a,d]);O.useEffect(()=>{A&&Me.current(z.current,fe.current)},[A]),O.useEffect(()=>{!D&&!A&&ne()},[D,A,ne]),H.current=r,O.useEffect(()=>{var T,q;A&&w&&((T=J.current)==null||T.dispose(),J.current=(q=z.current)==null?void 0:q.onDidChangeModelContent(ve=>{R.current||w(z.current.getValue(),ve)}))},[A,w]),O.useEffect(()=>{if(A){let T=fe.current.editor.onDidChangeMarkers(q=>{var be;let ve=(be=z.current.getModel())==null?void 0:be.uri;if(ve&&q.find(Oe=>Oe.path===ve.path)){let Oe=fe.current.editor.getModelMarkers({resource:ve});N==null||N(Oe)}});return()=>{T==null||T.dispose()}}return()=>{}},[A,N]);function he(){var T,q;(T=J.current)==null||T.dispose(),j?S&&Oi.set(s,z.current.saveViewState()):(q=z.current.getModel())==null||q.dispose(),z.current.dispose()}return bn.createElement(fp,{width:b,height:L,isEditorReady:A,loading:h,_ref:se,className:U,wrapperProps:me})}var bg=Ng,Pg=O.memo(bg),Og=Pg,mp={exports:{}};const Tg={},Lg=Object.freeze(Object.defineProperty({__proto__:null,default:Tg},Symbol.toStringTag,{value:"Module"})),Bc=Gp(Lg);(function(e,t){var n=void 0,r=function(o){return n||(n=new Promise(function(s,a){var d=typeof o<"u"?o:{},h=d.onAbort;d.onAbort=function(i){a(new Error(i)),h&&h(i)},d.postRun=d.postRun||[],d.postRun.push(function(){s(d)}),e=void 0;var c;c||(c=typeof d<"u"?d:{});var E=typeof window=="object",S=typeof WorkerGlobalScope<"u",j=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";c.onRuntimeInitialized=function(){function i(_,M){switch(typeof M){case"boolean":Kp(_,M?1:0);break;case"number":qp(_,M);break;case"string":Hp(_,M,-1,-1);break;case"object":if(M===null)ku(_);else if(M.length!=null){var le=ui(M,ai);Qp(_,le,M.length,-1),ci(le)}else di(_,"Wrong API use : tried to return a value of an unknown type ("+M+").",-1);break;default:ku(_)}}function l(_,M){for(var le=[],ge=0;ge<_;ge+=1){var xe=$e(M+4*ge,"i32"),Te=Dp(xe);if(Te===1||Te===2)xe=Wp(xe);else if(Te===3)xe=Bp(xe);else if(Te===4){Te=xe,xe=Fp(Te),Te=Vp(Te);for(var Ft=new Uint8Array(xe),$t=0;$t<xe;$t+=1)Ft[$t]=z[Te+$t];xe=Ft}else xe=null;le.push(xe)}return le}function u(_,M){this.Qa=_,this.db=M,this.Oa=1,this.lb=[]}function f(_,M){if(this.db=M,M=Wn(_)+1,this.eb=Bs(M),this.eb===null)throw Error("Unable to allocate memory for the SQL string");Dt(_,se,this.eb,M),this.kb=this.eb,this.Za=this.pb=null}function v(_){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),_!=null){var M=this.filename,le="/",ge=M;if(le&&(le=typeof le=="string"?le:Zr(le),ge=M?Vn(le+"/"+M):le),M=ti(!0,!0),ge=G(ge,M),_){if(typeof _=="string"){le=Array(_.length);for(var xe=0,Te=_.length;xe<Te;++xe)le[xe]=_.charCodeAt(xe);_=le}oi(ge,M|146),le=hr(ge,577),pu(le,_,0,_.length,0),As(le),oi(ge,M)}}this.handleError(de(this.filename,k)),this.db=$e(k,"i32"),ju(this.db),this.fb={},this.Sa={}}var k=wn(4),P=c.cwrap,de=P("sqlite3_open","number",["string","number"]),Ee=P("sqlite3_close_v2","number",["number"]),_e=P("sqlite3_exec","number",["number","string","number","number","number"]),qe=P("sqlite3_changes","number",["number"]),gt=P("sqlite3_prepare_v2","number",["number","string","number","number","number"]),yu=P("sqlite3_sql","string",["number"]),kp=P("sqlite3_normalized_sql","string",["number"]),wu=P("sqlite3_prepare_v2","number",["number","number","number","number","number"]),Ep=P("sqlite3_bind_text","number",["number","number","number","number","number"]),xu=P("sqlite3_bind_blob","number",["number","number","number","number","number"]),jp=P("sqlite3_bind_double","number",["number","number","number"]),Cp=P("sqlite3_bind_int","number",["number","number","number"]),Np=P("sqlite3_bind_parameter_index","number",["number","string"]),bp=P("sqlite3_step","number",["number"]),Pp=P("sqlite3_errmsg","string",["number"]),Op=P("sqlite3_column_count","number",["number"]),Tp=P("sqlite3_data_count","number",["number"]),Lp=P("sqlite3_column_double","number",["number","number"]),_u=P("sqlite3_column_text","string",["number","number"]),$p=P("sqlite3_column_blob","number",["number","number"]),Mp=P("sqlite3_column_bytes","number",["number","number"]),Rp=P("sqlite3_column_type","number",["number","number"]),Ap=P("sqlite3_column_name","string",["number","number"]),Ip=P("sqlite3_reset","number",["number"]),zp=P("sqlite3_clear_bindings","number",["number"]),Up=P("sqlite3_finalize","number",["number"]),Su=P("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),Dp=P("sqlite3_value_type","number",["number"]),Fp=P("sqlite3_value_bytes","number",["number"]),Bp=P("sqlite3_value_text","string",["number"]),Vp=P("sqlite3_value_blob","number",["number"]),Wp=P("sqlite3_value_double","number",["number"]),qp=P("sqlite3_result_double","",["number","number"]),ku=P("sqlite3_result_null","",["number"]),Hp=P("sqlite3_result_text","",["number","string","number","number"]),Qp=P("sqlite3_result_blob","",["number","number","number","number"]),Kp=P("sqlite3_result_int","",["number","number"]),di=P("sqlite3_result_error","",["number","string","number"]),Eu=P("sqlite3_aggregate_context","number",["number","number"]),ju=P("RegisterExtensionFunctions","number",["number"]),Cu=P("sqlite3_update_hook","number",["number","number","number"]);u.prototype.bind=function(_){if(!this.Qa)throw"Statement closed";return this.reset(),Array.isArray(_)?this.Cb(_):_!=null&&typeof _=="object"?this.Db(_):!0},u.prototype.step=function(){if(!this.Qa)throw"Statement closed";this.Oa=1;var _=bp(this.Qa);switch(_){case 100:return!0;case 101:return!1;default:throw this.db.handleError(_)}},u.prototype.wb=function(_){return _==null&&(_=this.Oa,this.Oa+=1),Lp(this.Qa,_)},u.prototype.Gb=function(_){if(_==null&&(_=this.Oa,this.Oa+=1),_=_u(this.Qa,_),typeof BigInt!="function")throw Error("BigInt is not supported");return BigInt(_)},u.prototype.Hb=function(_){return _==null&&(_=this.Oa,this.Oa+=1),_u(this.Qa,_)},u.prototype.getBlob=function(_){_==null&&(_=this.Oa,this.Oa+=1);var M=Mp(this.Qa,_);_=$p(this.Qa,_);for(var le=new Uint8Array(M),ge=0;ge<M;ge+=1)le[ge]=z[_+ge];return le},u.prototype.get=function(_,M){M=M||{},_!=null&&this.bind(_)&&this.step(),_=[];for(var le=Tp(this.Qa),ge=0;ge<le;ge+=1)switch(Rp(this.Qa,ge)){case 1:var xe=M.useBigInt?this.Gb(ge):this.wb(ge);_.push(xe);break;case 2:_.push(this.wb(ge));break;case 3:_.push(this.Hb(ge));break;case 4:_.push(this.getBlob(ge));break;default:_.push(null)}return _},u.prototype.getColumnNames=function(){for(var _=[],M=Op(this.Qa),le=0;le<M;le+=1)_.push(Ap(this.Qa,le));return _},u.prototype.getAsObject=function(_,M){_=this.get(_,M),M=this.getColumnNames();for(var le={},ge=0;ge<M.length;ge+=1)le[M[ge]]=_[ge];return le},u.prototype.getSQL=function(){return yu(this.Qa)},u.prototype.getNormalizedSQL=function(){return kp(this.Qa)},u.prototype.run=function(_){return _!=null&&this.bind(_),this.step(),this.reset()},u.prototype.sb=function(_,M){M==null&&(M=this.Oa,this.Oa+=1),_=qn(_);var le=ui(_,ai);this.lb.push(le),this.db.handleError(Ep(this.Qa,M,le,_.length-1,0))},u.prototype.Bb=function(_,M){M==null&&(M=this.Oa,this.Oa+=1);var le=ui(_,ai);this.lb.push(le),this.db.handleError(xu(this.Qa,M,le,_.length,0))},u.prototype.rb=function(_,M){M==null&&(M=this.Oa,this.Oa+=1),this.db.handleError((_===(_|0)?Cp:jp)(this.Qa,M,_))},u.prototype.Eb=function(_){_==null&&(_=this.Oa,this.Oa+=1),xu(this.Qa,_,0,0,0)},u.prototype.tb=function(_,M){switch(M==null&&(M=this.Oa,this.Oa+=1),typeof _){case"string":this.sb(_,M);return;case"number":this.rb(_,M);return;case"bigint":this.sb(_.toString(),M);return;case"boolean":this.rb(_+0,M);return;case"object":if(_===null){this.Eb(M);return}if(_.length!=null){this.Bb(_,M);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+_+")."},u.prototype.Db=function(_){var M=this;return Object.keys(_).forEach(function(le){var ge=Np(M.Qa,le);ge!==0&&M.tb(_[le],ge)}),!0},u.prototype.Cb=function(_){for(var M=0;M<_.length;M+=1)this.tb(_[M],M+1);return!0},u.prototype.reset=function(){return this.freemem(),zp(this.Qa)===0&&Ip(this.Qa)===0},u.prototype.freemem=function(){for(var _;(_=this.lb.pop())!==void 0;)ci(_)},u.prototype.free=function(){this.freemem();var _=Up(this.Qa)===0;return delete this.db.fb[this.Qa],this.Qa=0,_},f.prototype.next=function(){if(this.eb===null)return{done:!0};if(this.Za!==null&&(this.Za.free(),this.Za=null),!this.db.db)throw this.mb(),Error("Database closed");var _=oo(),M=wn(4);Re(k),Re(M);try{this.db.handleError(wu(this.db.db,this.kb,-1,k,M)),this.kb=$e(M,"i32");var le=$e(k,"i32");return le===0?(this.mb(),{done:!0}):(this.Za=new u(le,this.db),this.db.fb[le]=this.Za,{value:this.Za,done:!1})}catch(ge){throw this.pb=Lt(this.kb),this.mb(),ge}finally{ro(_)}},f.prototype.mb=function(){ci(this.eb),this.eb=null},f.prototype.getRemainingSQL=function(){return this.pb!==null?this.pb:Lt(this.kb)},typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(f.prototype[Symbol.iterator]=function(){return this}),v.prototype.run=function(_,M){if(!this.db)throw"Database closed";if(M){_=this.prepare(_,M);try{_.step()}finally{_.free()}}else this.handleError(_e(this.db,_,0,0,k));return this},v.prototype.exec=function(_,M,le){if(!this.db)throw"Database closed";var ge=oo(),xe=null;try{var Te=Ds(_),Ft=wn(4);for(_=[];$e(Te,"i8")!==0;){Re(k),Re(Ft),this.handleError(wu(this.db,Te,-1,k,Ft));var $t=$e(k,"i32");if(Te=$e(Ft,"i32"),$t!==0){var Et=null;for(xe=new u($t,this),M!=null&&xe.bind(M);xe.step();)Et===null&&(Et={columns:xe.getColumnNames(),values:[]},_.push(Et)),Et.values.push(xe.get(null,le));xe.free()}}return _}catch(Bt){throw xe&&xe.free(),Bt}finally{ro(ge)}},v.prototype.each=function(_,M,le,ge,xe){typeof M=="function"&&(ge=le,le=M,M=void 0),_=this.prepare(_,M);try{for(;_.step();)le(_.getAsObject(null,xe))}finally{_.free()}if(typeof ge=="function")return ge()},v.prototype.prepare=function(_,M){if(Re(k),this.handleError(gt(this.db,_,-1,k,0)),_=$e(k,"i32"),_===0)throw"Nothing to prepare";var le=new u(_,this);return M!=null&&le.bind(M),this.fb[_]=le},v.prototype.iterateStatements=function(_){return new f(_,this)},v.prototype.export=function(){Object.values(this.fb).forEach(function(M){M.free()}),Object.values(this.Sa).forEach(yn),this.Sa={},this.handleError(Ee(this.db));var _=gp(this.filename);return this.handleError(de(this.filename,k)),this.db=$e(k,"i32"),ju(this.db),_},v.prototype.close=function(){this.db!==null&&(Object.values(this.fb).forEach(function(_){_.free()}),Object.values(this.Sa).forEach(yn),this.Sa={},this.Ya&&(yn(this.Ya),this.Ya=void 0),this.handleError(Ee(this.db)),au("/"+this.filename),this.db=null)},v.prototype.handleError=function(_){if(_===0)return null;throw _=Pp(this.db),Error(_)},v.prototype.getRowsModified=function(){return qe(this.db)},v.prototype.create_function=function(_,M){Object.prototype.hasOwnProperty.call(this.Sa,_)&&(yn(this.Sa[_]),delete this.Sa[_]);var le=no(function(ge,xe,Te){xe=l(xe,Te);try{var Ft=M.apply(null,xe)}catch($t){di(ge,$t,-1);return}i(ge,Ft)},"viii");return this.Sa[_]=le,this.handleError(Su(this.db,_,M.length,1,0,le,0,0,0)),this},v.prototype.create_aggregate=function(_,M){var le=M.init||function(){return null},ge=M.finalize||function(Et){return Et},xe=M.step;if(!xe)throw"An aggregate function must have a step function in "+_;var Te={};Object.hasOwnProperty.call(this.Sa,_)&&(yn(this.Sa[_]),delete this.Sa[_]),M=_+"__finalize",Object.hasOwnProperty.call(this.Sa,M)&&(yn(this.Sa[M]),delete this.Sa[M]);var Ft=no(function(Et,Bt,Ws){var Jn=Eu(Et,1);Object.hasOwnProperty.call(Te,Jn)||(Te[Jn]=le()),Bt=l(Bt,Ws),Bt=[Te[Jn]].concat(Bt);try{Te[Jn]=xe.apply(null,Bt)}catch(Jp){delete Te[Jn],di(Et,Jp,-1)}},"viii"),$t=no(function(Et){var Bt=Eu(Et,1);try{var Ws=ge(Te[Bt])}catch(Jn){delete Te[Bt],di(Et,Jn,-1);return}i(Et,Ws),delete Te[Bt]},"vi");return this.Sa[_]=Ft,this.Sa[M]=$t,this.handleError(Su(this.db,_,xe.length-1,1,0,0,Ft,$t,0)),this},v.prototype.updateHook=function(_){this.Ya&&(Cu(this.db,0,0),yn(this.Ya),this.Ya=void 0),_&&(this.Ya=no(function(M,le,ge,xe,Te){switch(le){case 18:M="insert";break;case 23:M="update";break;case 9:M="delete";break;default:throw"unknown operationCode in updateHook callback: "+le}if(ge=ge?Ae(se,ge):"",xe=xe?Ae(se,xe):"",Te>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";_(M,ge,xe,Number(Te))},"viiiij"),Cu(this.db,this.Ya,0))},c.Database=v};var b={...c},L="./this.program",U=(i,l)=>{throw l},me="",y,m;if(j){var w=Bc;me=__dirname+"/",m=i=>(i=R(i)?new URL(i):i,w.readFileSync(i)),y=async i=>(i=R(i)?new URL(i):i,w.readFileSync(i,void 0)),!c.thisProgram&&1<process.argv.length&&(L=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),e.exports=c,U=(i,l)=>{throw process.exitCode=i,l}}else(E||S)&&(S?me=self.location.href:typeof document<"u"&&document.currentScript&&(me=document.currentScript.src),me=me.startsWith("blob:")?"":me.slice(0,me.replace(/[?#].*/,"").lastIndexOf("/")+1),S&&(m=i=>{var l=new XMLHttpRequest;return l.open("GET",i,!1),l.responseType="arraybuffer",l.send(null),new Uint8Array(l.response)}),y=async i=>{if(R(i))return new Promise((u,f)=>{var v=new XMLHttpRequest;v.open("GET",i,!0),v.responseType="arraybuffer",v.onload=()=>{v.status==200||v.status==0&&v.response?u(v.response):f(v.status)},v.onerror=f,v.send(null)});var l=await fetch(i,{credentials:"same-origin"});if(l.ok)return l.arrayBuffer();throw Error(l.status+" : "+l.url)});var N=c.print||console.log.bind(console),A=c.printErr||console.error.bind(console);Object.assign(c,b),b=null,c.thisProgram&&(L=c.thisProgram);var V=c.wasmBinary,D,K=!1,fe,z,se,Me,$,J,H,te,Ce,R=i=>i.startsWith("file://");function ne(){var i=D.buffer;c.HEAP8=z=new Int8Array(i),c.HEAP16=Me=new Int16Array(i),c.HEAPU8=se=new Uint8Array(i),c.HEAPU16=new Uint16Array(i),c.HEAP32=$=new Int32Array(i),c.HEAPU32=J=new Uint32Array(i),c.HEAPF32=H=new Float32Array(i),c.HEAPF64=Ce=new Float64Array(i),c.HEAP64=te=new BigInt64Array(i),c.HEAPU64=new BigUint64Array(i)}var he=0,T=null;function q(i){var l;throw(l=c.onAbort)==null||l.call(c,i),i="Aborted("+i+")",A(i),K=!0,new WebAssembly.RuntimeError(i+". Build with -sASSERTIONS for more info.")}var ve;async function be(i){if(!V)try{var l=await y(i);return new Uint8Array(l)}catch{}if(i==ve&&V)i=new Uint8Array(V);else if(m)i=m(i);else throw"both async and sync fetching of the wasm failed";return i}async function Oe(i,l){try{var u=await be(i);return await WebAssembly.instantiate(u,l)}catch(f){A(`failed to asynchronously prepare wasm: ${f}`),q(f)}}async function Pe(i){var l=ve;if(!V&&typeof WebAssembly.instantiateStreaming=="function"&&!R(l)&&!j)try{var u=fetch(l,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(u,i)}catch(f){A(`wasm streaming compile failed: ${f}`),A("falling back to ArrayBuffer instantiation")}return Oe(l,i)}class ae{constructor(l){xn(this,"name","ExitStatus");this.message=`Program terminated with exit(${l})`,this.status=l}}var Qe=i=>{for(;0<i.length;)i.shift()(c)},ut=[],Je=[],ct=()=>{var i=c.preRun.shift();Je.unshift(i)};function $e(i,l="i8"){switch(l.endsWith("*")&&(l="*"),l){case"i1":return z[i];case"i8":return z[i];case"i16":return Me[i>>1];case"i32":return $[i>>2];case"i64":return te[i>>3];case"float":return H[i>>2];case"double":return Ce[i>>3];case"*":return J[i>>2];default:q(`invalid type for getValue: ${l}`)}}var Se=c.noExitRuntime||!0;function Re(i){var l="i32";switch(l.endsWith("*")&&(l="*"),l){case"i1":z[i]=0;break;case"i8":z[i]=0;break;case"i16":Me[i>>1]=0;break;case"i32":$[i>>2]=0;break;case"i64":te[i>>3]=BigInt(0);break;case"float":H[i>>2]=0;break;case"double":Ce[i>>3]=0;break;case"*":J[i>>2]=0;break;default:q(`invalid type for setValue: ${l}`)}}var Ye=typeof TextDecoder<"u"?new TextDecoder:void 0,Ae=(i,l=0,u=NaN)=>{var f=l+u;for(u=l;i[u]&&!(u>=f);)++u;if(16<u-l&&i.buffer&&Ye)return Ye.decode(i.subarray(l,u));for(f="";l<u;){var v=i[l++];if(v&128){var k=i[l++]&63;if((v&224)==192)f+=String.fromCharCode((v&31)<<6|k);else{var P=i[l++]&63;v=(v&240)==224?(v&15)<<12|k<<6|P:(v&7)<<18|k<<12|P<<6|i[l++]&63,65536>v?f+=String.fromCharCode(v):(v-=65536,f+=String.fromCharCode(55296|v>>10,56320|v&1023))}}else f+=String.fromCharCode(v)}return f},Lt=(i,l)=>i?Ae(se,i,l):"",Hr=(i,l)=>{for(var u=0,f=i.length-1;0<=f;f--){var v=i[f];v==="."?i.splice(f,1):v===".."?(i.splice(f,1),u++):u&&(i.splice(f,1),u--)}if(l)for(;u;u--)i.unshift("..");return i},Vn=i=>{var l=i.charAt(0)==="/",u=i.slice(-1)==="/";return(i=Hr(i.split("/").filter(f=>!!f),!l).join("/"))||l||(i="."),i&&u&&(i+="/"),(l?"/":"")+i},cr=i=>{var l=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(i).slice(1);return i=l[0],l=l[1],!i&&!l?".":(l&&(l=l.slice(0,-1)),i+l)},vn=i=>i&&i.match(/([^\/]+|\/)\/*$/)[1],Qr=()=>{if(j){var i=Bc;return l=>i.randomFillSync(l)}return l=>crypto.getRandomValues(l)},Kr=i=>{(Kr=Qr())(i)},Ts=(...i)=>{for(var l="",u=!1,f=i.length-1;-1<=f&&!u;f--){if(u=0<=f?i[f]:"/",typeof u!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!u)return"";l=u+"/"+l,u=u.charAt(0)==="/"}return l=Hr(l.split("/").filter(v=>!!v),!u).join("/"),(u?"/":"")+l||"."},Yt=[],Wn=i=>{for(var l=0,u=0;u<i.length;++u){var f=i.charCodeAt(u);127>=f?l++:2047>=f?l+=2:55296<=f&&57343>=f?(l+=4,++u):l+=3}return l},Dt=(i,l,u,f)=>{if(!(0<f))return 0;var v=u;f=u+f-1;for(var k=0;k<i.length;++k){var P=i.charCodeAt(k);if(55296<=P&&57343>=P){var de=i.charCodeAt(++k);P=65536+((P&1023)<<10)|de&1023}if(127>=P){if(u>=f)break;l[u++]=P}else{if(2047>=P){if(u+1>=f)break;l[u++]=192|P>>6}else{if(65535>=P){if(u+2>=f)break;l[u++]=224|P>>12}else{if(u+3>=f)break;l[u++]=240|P>>18,l[u++]=128|P>>12&63}l[u++]=128|P>>6&63}l[u++]=128|P&63}}return l[u]=0,u-v},qn=(i,l)=>{var u=Array(Wn(i)+1);return i=Dt(i,u,0,u.length),l&&(u.length=i),u},Zo=[];function ei(i,l){Zo[i]={input:[],output:[],cb:l},X(i,Jr)}var Jr={open(i){var l=Zo[i.node.rdev];if(!l)throw new Q(43);i.tty=l,i.seekable=!1},close(i){i.tty.cb.fsync(i.tty)},fsync(i){i.tty.cb.fsync(i.tty)},read(i,l,u,f){if(!i.tty||!i.tty.cb.xb)throw new Q(60);for(var v=0,k=0;k<f;k++){try{var P=i.tty.cb.xb(i.tty)}catch{throw new Q(29)}if(P===void 0&&v===0)throw new Q(6);if(P==null)break;v++,l[u+k]=P}return v&&(i.node.atime=Date.now()),v},write(i,l,u,f){if(!i.tty||!i.tty.cb.qb)throw new Q(60);try{for(var v=0;v<f;v++)i.tty.cb.qb(i.tty,l[u+v])}catch{throw new Q(29)}return f&&(i.node.mtime=i.node.ctime=Date.now()),v}},Ls={xb(){e:{if(!Yt.length){var i=null;if(j){var l=Buffer.alloc(256),u=0,f=process.stdin.fd;try{u=w.readSync(f,l,0,256)}catch(v){if(v.toString().includes("EOF"))u=0;else throw v}0<u&&(i=l.slice(0,u).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(i=window.prompt("Input: "),i!==null&&(i+=`
51
+ `));if(!i){i=null;break e}Yt=qn(i,!0)}i=Yt.shift()}return i},qb(i,l){l===null||l===10?(N(Ae(i.output)),i.output=[]):l!=0&&i.output.push(l)},fsync(i){var l;0<((l=i.output)==null?void 0:l.length)&&(N(Ae(i.output)),i.output=[])},Tb(){return{Ob:25856,Qb:5,Nb:191,Pb:35387,Mb:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Ub(){return 0},Vb(){return[24,80]}},$s={qb(i,l){l===null||l===10?(A(Ae(i.output)),i.output=[]):l!=0&&i.output.push(l)},fsync(i){var l;0<((l=i.output)==null?void 0:l.length)&&(A(Ae(i.output)),i.output=[])}},ye={Wa:null,Xa(){return ye.createNode(null,"/",16895,0)},createNode(i,l,u,f){if((u&61440)===24576||(u&61440)===4096)throw new Q(63);return ye.Wa||(ye.Wa={dir:{node:{Ta:ye.La.Ta,Ua:ye.La.Ua,lookup:ye.La.lookup,hb:ye.La.hb,rename:ye.La.rename,unlink:ye.La.unlink,rmdir:ye.La.rmdir,readdir:ye.La.readdir,symlink:ye.La.symlink},stream:{Va:ye.Ma.Va}},file:{node:{Ta:ye.La.Ta,Ua:ye.La.Ua},stream:{Va:ye.Ma.Va,read:ye.Ma.read,write:ye.Ma.write,ib:ye.Ma.ib,jb:ye.Ma.jb}},link:{node:{Ta:ye.La.Ta,Ua:ye.La.Ua,readlink:ye.La.readlink},stream:{}},ub:{node:{Ta:ye.La.Ta,Ua:ye.La.Ua},stream:ue}}),u=g(i,l,u,f),x(u.mode)?(u.La=ye.Wa.dir.node,u.Ma=ye.Wa.dir.stream,u.Na={}):(u.mode&61440)===32768?(u.La=ye.Wa.file.node,u.Ma=ye.Wa.file.stream,u.Ra=0,u.Na=null):(u.mode&61440)===40960?(u.La=ye.Wa.link.node,u.Ma=ye.Wa.link.stream):(u.mode&61440)===8192&&(u.La=ye.Wa.ub.node,u.Ma=ye.Wa.ub.stream),u.atime=u.mtime=u.ctime=Date.now(),i&&(i.Na[l]=u,i.atime=i.mtime=i.ctime=u.atime),u},Sb(i){return i.Na?i.Na.subarray?i.Na.subarray(0,i.Ra):new Uint8Array(i.Na):new Uint8Array(0)},La:{Ta(i){var l={};return l.dev=(i.mode&61440)===8192?i.id:1,l.ino=i.id,l.mode=i.mode,l.nlink=1,l.uid=0,l.gid=0,l.rdev=i.rdev,x(i.mode)?l.size=4096:(i.mode&61440)===32768?l.size=i.Ra:(i.mode&61440)===40960?l.size=i.link.length:l.size=0,l.atime=new Date(i.atime),l.mtime=new Date(i.mtime),l.ctime=new Date(i.ctime),l.blksize=4096,l.blocks=Math.ceil(l.size/l.blksize),l},Ua(i,l){for(var u of["mode","atime","mtime","ctime"])l[u]!=null&&(i[u]=l[u]);l.size!==void 0&&(l=l.size,i.Ra!=l&&(l==0?(i.Na=null,i.Ra=0):(u=i.Na,i.Na=new Uint8Array(l),u&&i.Na.set(u.subarray(0,Math.min(l,i.Ra))),i.Ra=l)))},lookup(){throw ye.vb},hb(i,l,u,f){return ye.createNode(i,l,u,f)},rename(i,l,u){try{var f=vt(l,u)}catch{}if(f){if(x(i.mode))for(var v in f.Na)throw new Q(55);pr(f)}delete i.parent.Na[i.name],l.Na[u]=i,i.name=u,l.ctime=l.mtime=i.parent.ctime=i.parent.mtime=Date.now()},unlink(i,l){delete i.Na[l],i.ctime=i.mtime=Date.now()},rmdir(i,l){var u=vt(i,l),f;for(f in u.Na)throw new Q(55);delete i.Na[l],i.ctime=i.mtime=Date.now()},readdir(i){return[".","..",...Object.keys(i.Na)]},symlink(i,l,u){return i=ye.createNode(i,l,41471,0),i.link=u,i},readlink(i){if((i.mode&61440)!==40960)throw new Q(28);return i.link}},Ma:{read(i,l,u,f,v){var k=i.node.Na;if(v>=i.node.Ra)return 0;if(i=Math.min(i.node.Ra-v,f),8<i&&k.subarray)l.set(k.subarray(v,v+i),u);else for(f=0;f<i;f++)l[u+f]=k[v+f];return i},write(i,l,u,f,v,k){if(l.buffer===z.buffer&&(k=!1),!f)return 0;if(i=i.node,i.mtime=i.ctime=Date.now(),l.subarray&&(!i.Na||i.Na.subarray)){if(k)return i.Na=l.subarray(u,u+f),i.Ra=f;if(i.Ra===0&&v===0)return i.Na=l.slice(u,u+f),i.Ra=f;if(v+f<=i.Ra)return i.Na.set(l.subarray(u,u+f),v),f}k=v+f;var P=i.Na?i.Na.length:0;if(P>=k||(k=Math.max(k,P*(1048576>P?2:1.125)>>>0),P!=0&&(k=Math.max(k,256)),P=i.Na,i.Na=new Uint8Array(k),0<i.Ra&&i.Na.set(P.subarray(0,i.Ra),0)),i.Na.subarray&&l.subarray)i.Na.set(l.subarray(u,u+f),v);else for(k=0;k<f;k++)i.Na[v+k]=l[u+k];return i.Ra=Math.max(i.Ra,v+f),f},Va(i,l,u){if(u===1?l+=i.position:u===2&&(i.node.mode&61440)===32768&&(l+=i.node.Ra),0>l)throw new Q(28);return l},ib(i,l,u,f,v){if((i.node.mode&61440)!==32768)throw new Q(43);if(i=i.node.Na,v&2||!i||i.buffer!==z.buffer){v=!0,f=65536*Math.ceil(l/65536);var k=vu(65536,f);if(k&&se.fill(0,k,k+f),f=k,!f)throw new Q(48);i&&((0<u||u+l<i.length)&&(i.subarray?i=i.subarray(u,u+l):i=Array.prototype.slice.call(i,u,u+l)),z.set(i,f))}else v=!1,f=i.byteOffset;return{Kb:f,Ab:v}},jb(i,l,u,f){return ye.Ma.write(i,l,0,f,u,!1),0}}},ti=(i,l)=>{var u=0;return i&&(u|=365),l&&(u|=146),u},Yr=null,dr={},kt=[],Ms=1,Xt=null,ni=!1,fr=!0,Xr={},Q=class{constructor(i){xn(this,"name","ErrnoError");this.Pa=i}},ri=class{constructor(){xn(this,"gb",{});xn(this,"node",null)}get flags(){return this.gb.flags}set flags(i){this.gb.flags=i}get position(){return this.gb.position}set position(i){this.gb.position=i}},Gr=class{constructor(i,l,u,f){xn(this,"La",{});xn(this,"Ma",{});xn(this,"ab",null);i||(i=this),this.parent=i,this.Xa=i.Xa,this.id=Ms++,this.name=l,this.mode=u,this.rdev=f,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)===365}set read(i){i?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)===146}set write(i){i?this.mode|=146:this.mode&=-147}};function mt(i,l={}){if(!i)throw new Q(44);l.nb??(l.nb=!0),i.charAt(0)==="/"||(i="//"+i);var u=0;e:for(;40>u;u++){i=i.split("/").filter(de=>!!de);for(var f=Yr,v="/",k=0;k<i.length;k++){var P=k===i.length-1;if(P&&l.parent)break;if(i[k]!==".")if(i[k]==="..")v=cr(v),f=f.parent;else{v=Vn(v+"/"+i[k]);try{f=vt(f,i[k])}catch(de){if((de==null?void 0:de.Pa)===44&&P&&l.Jb)return{path:v};throw de}if(!f.ab||P&&!l.nb||(f=f.ab.root),(f.mode&61440)===40960&&(!P||l.$a)){if(!f.La.readlink)throw new Q(52);f=f.La.readlink(f),f.charAt(0)==="/"||(f=cr(v)+"/"+f),i=f+"/"+i.slice(k+1).join("/");continue e}}}return{path:v,node:f}}throw new Q(32)}function Zr(i){for(var l;;){if(i===i.parent)return i=i.Xa.zb,l?i[i.length-1]!=="/"?`${i}/${l}`:i+l:i;l=l?`${i.name}/${l}`:i.name,i=i.parent}}function Hn(i,l){for(var u=0,f=0;f<l.length;f++)u=(u<<5)-u+l.charCodeAt(f)|0;return(i+u>>>0)%Xt.length}function pr(i){var l=Hn(i.parent.id,i.name);if(Xt[l]===i)Xt[l]=i.bb;else for(l=Xt[l];l;){if(l.bb===i){l.bb=i.bb;break}l=l.bb}}function vt(i,l){var u=x(i.mode)?(u=ie(i,"x"))?u:i.La.lookup?0:2:54;if(u)throw new Q(u);for(u=Xt[Hn(i.id,l)];u;u=u.bb){var f=u.name;if(u.parent.id===i.id&&f===l)return u}return i.La.lookup(i,l)}function g(i,l,u,f){return i=new Gr(i,l,u,f),l=Hn(i.parent.id,i.name),i.bb=Xt[l],Xt[l]=i}function x(i){return(i&61440)===16384}function B(i){var l=["r","w","rw"][i&3];return i&512&&(l+="w"),l}function ie(i,l){if(fr)return 0;if(!l.includes("r")||i.mode&292){if(l.includes("w")&&!(i.mode&146)||l.includes("x")&&!(i.mode&73))return 2}else return 2;return 0}function W(i,l){if(!x(i.mode))return 54;try{return vt(i,l),20}catch{}return ie(i,"wx")}function re(i,l,u){try{var f=vt(i,l)}catch(v){return v.Pa}if(i=ie(i,"wx"))return i;if(u){if(!x(f.mode))return 54;if(f===f.parent||Zr(f)==="/")return 10}else if(x(f.mode))return 31;return 0}function Y(i){if(!i)throw new Q(63);return i}function Z(i){if(i=kt[i],!i)throw new Q(8);return i}function C(i,l=-1){if(i=Object.assign(new ri,i),l==-1)e:{for(l=0;4096>=l;l++)if(!kt[l])break e;throw new Q(33)}return i.fd=l,kt[l]=i}function ce(i,l=-1){var u,f;return i=C(i,l),(f=(u=i.Ma)==null?void 0:u.Rb)==null||f.call(u,i),i}function I(i,l,u){var f=i==null?void 0:i.Ma.Ua;i=f?i:l,f??(f=l.La.Ua),Y(f),f(i,u)}var ue={open(i){var l,u;i.Ma=dr[i.node.rdev].Ma,(u=(l=i.Ma).open)==null||u.call(l,i)},Va(){throw new Q(70)}};function X(i,l){dr[i]={Ma:l}}function oe(i,l){var u=l==="/";if(u&&Yr)throw new Q(10);if(!u&&l){var f=mt(l,{nb:!1});if(l=f.path,f=f.node,f.ab)throw new Q(10);if(!x(f.mode))throw new Q(54)}l={type:i,Wb:{},zb:l,Ib:[]},i=i.Xa(l),i.Xa=l,l.root=i,u?Yr=i:f&&(f.ab=l,f.Xa&&f.Xa.Ib.push(l))}function we(i,l,u){var f=mt(i,{parent:!0}).node;if(i=vn(i),!i)throw new Q(28);if(i==="."||i==="..")throw new Q(20);var v=W(f,i);if(v)throw new Q(v);if(!f.La.hb)throw new Q(63);return f.La.hb(f,i,l,u)}function G(i,l=438){return we(i,l&4095|32768,0)}function ke(i,l=511){return we(i,l&1023|16384,0)}function Gt(i,l,u){typeof u>"u"&&(u=l,l=438),we(i,l|8192,u)}function Rs(i,l){if(!Ts(i))throw new Q(44);var u=mt(l,{parent:!0}).node;if(!u)throw new Q(44);l=vn(l);var f=W(u,l);if(f)throw new Q(f);if(!u.La.symlink)throw new Q(63);u.La.symlink(u,l,i)}function lu(i){var l=mt(i,{parent:!0}).node;i=vn(i);var u=vt(l,i),f=re(l,i,!0);if(f)throw new Q(f);if(!l.La.rmdir)throw new Q(63);if(u.ab)throw new Q(10);l.La.rmdir(l,i),pr(u)}function au(i){var l=mt(i,{parent:!0}).node;if(!l)throw new Q(44);i=vn(i);var u=vt(l,i),f=re(l,i,!1);if(f)throw new Q(f);if(!l.La.unlink)throw new Q(63);if(u.ab)throw new Q(10);l.La.unlink(l,i),pr(u)}function eo(i,l){return i=mt(i,{$a:!l}).node,Y(i.La.Ta)(i)}function uu(i,l,u,f){I(i,l,{mode:u&4095|l.mode&-4096,ctime:Date.now(),Fb:f})}function oi(i,l){i=typeof i=="string"?mt(i,{$a:!0}).node:i,uu(null,i,l)}function cu(i,l,u){if(x(l.mode))throw new Q(31);if((l.mode&61440)!==32768)throw new Q(28);var f=ie(l,"w");if(f)throw new Q(f);I(i,l,{size:u,timestamp:Date.now()})}function hr(i,l,u=438){if(i==="")throw new Q(44);if(typeof l=="string"){var f={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[l];if(typeof f>"u")throw Error(`Unknown file open mode: ${l}`);l=f}if(u=l&64?u&4095|32768:0,typeof i=="object")f=i;else{var v=i.endsWith("/");i=mt(i,{$a:!(l&131072),Jb:!0}),f=i.node,i=i.path}var k=!1;if(l&64)if(f){if(l&128)throw new Q(20)}else{if(v)throw new Q(31);f=we(i,u|511,0),k=!0}if(!f)throw new Q(44);if((f.mode&61440)===8192&&(l&=-513),l&65536&&!x(f.mode))throw new Q(54);if(!k&&(v=f?(f.mode&61440)===40960?32:x(f.mode)&&(B(l)!=="r"||l&576)?31:ie(f,B(l)):44))throw new Q(v);return l&512&&!k&&(v=f,v=typeof v=="string"?mt(v,{$a:!0}).node:v,cu(null,v,0)),l&=-131713,v=C({node:f,path:Zr(f),flags:l,seekable:!0,position:0,Ma:f.Ma,Lb:[],error:!1}),v.Ma.open&&v.Ma.open(v),k&&oi(f,u&511),!c.logReadFiles||l&1||i in Xr||(Xr[i]=1),v}function As(i){if(i.fd===null)throw new Q(8);i.ob&&(i.ob=null);try{i.Ma.close&&i.Ma.close(i)}catch(l){throw l}finally{kt[i.fd]=null}i.fd=null}function du(i,l,u){if(i.fd===null)throw new Q(8);if(!i.seekable||!i.Ma.Va)throw new Q(70);if(u!=0&&u!=1&&u!=2)throw new Q(28);i.position=i.Ma.Va(i,l,u),i.Lb=[]}function fu(i,l,u,f,v){if(0>f||0>v)throw new Q(28);if(i.fd===null)throw new Q(8);if((i.flags&2097155)===1)throw new Q(8);if(x(i.node.mode))throw new Q(31);if(!i.Ma.read)throw new Q(28);var k=typeof v<"u";if(!k)v=i.position;else if(!i.seekable)throw new Q(70);return l=i.Ma.read(i,l,u,f,v),k||(i.position+=l),l}function pu(i,l,u,f,v){if(0>f||0>v)throw new Q(28);if(i.fd===null)throw new Q(8);if(!(i.flags&2097155))throw new Q(8);if(x(i.node.mode))throw new Q(31);if(!i.Ma.write)throw new Q(28);i.seekable&&i.flags&1024&&du(i,0,2);var k=typeof v<"u";if(!k)v=i.position;else if(!i.seekable)throw new Q(70);return l=i.Ma.write(i,l,u,f,v,void 0),k||(i.position+=l),l}function gp(i){var l,u=hr(i,u||0);i=eo(i).size;var f=new Uint8Array(i);return fu(u,f,0,i,0),l=f,As(u),l}function gn(i,l,u){i=Vn("/dev/"+i);var f=ti(!!l,!!u);gn.yb??(gn.yb=64);var v=gn.yb++<<8|0;X(v,{open(k){k.seekable=!1},close(){var k;(k=u==null?void 0:u.buffer)!=null&&k.length&&u(10)},read(k,P,de,Ee){for(var _e=0,qe=0;qe<Ee;qe++){try{var gt=l()}catch{throw new Q(29)}if(gt===void 0&&_e===0)throw new Q(6);if(gt==null)break;_e++,P[de+qe]=gt}return _e&&(k.node.atime=Date.now()),_e},write(k,P,de,Ee){for(var _e=0;_e<Ee;_e++)try{u(P[de+_e])}catch{throw new Q(29)}return Ee&&(k.node.mtime=k.node.ctime=Date.now()),_e}}),Gt(i,f,v)}var ze={};function Qn(i,l,u){if(l.charAt(0)==="/")return l;if(i=i===-100?"/":Z(i).path,l.length==0){if(!u)throw new Q(44);return i}return i+"/"+l}function ii(i,l){$[i>>2]=l.dev,$[i+4>>2]=l.mode,J[i+8>>2]=l.nlink,$[i+12>>2]=l.uid,$[i+16>>2]=l.gid,$[i+20>>2]=l.rdev,te[i+24>>3]=BigInt(l.size),$[i+32>>2]=4096,$[i+36>>2]=l.blocks;var u=l.atime.getTime(),f=l.mtime.getTime(),v=l.ctime.getTime();return te[i+40>>3]=BigInt(Math.floor(u/1e3)),J[i+48>>2]=u%1e3*1e6,te[i+56>>3]=BigInt(Math.floor(f/1e3)),J[i+64>>2]=f%1e3*1e6,te[i+72>>3]=BigInt(Math.floor(v/1e3)),J[i+80>>2]=v%1e3*1e6,te[i+88>>3]=BigInt(l.ino),0}var si=void 0,li=()=>{var i=$[+si>>2];return si+=4,i},Is=0,yp=[0,31,60,91,121,152,182,213,244,274,305,335],wp=[0,31,59,90,120,151,181,212,243,273,304,334],to={},hu=i=>{var l;fe=i,Se||0<Is||((l=c.onExit)==null||l.call(c,i),K=!0),U(i,new ae(i))},xp=i=>{if(!K)try{if(i(),!(Se||0<Is))try{fe=i=fe,hu(i)}catch(l){l instanceof ae||l=="unwind"||U(1,l)}}catch(l){l instanceof ae||l=="unwind"||U(1,l)}},zs={},mu=()=>{if(!Us){var i={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:L||"./this.program"},l;for(l in zs)zs[l]===void 0?delete i[l]:i[l]=zs[l];var u=[];for(l in i)u.push(`${l}=${i[l]}`);Us=u}return Us},Us,Ds=i=>{var l=Wn(i)+1,u=wn(l);return Dt(i,se,u,l),u},_p=(i,l,u,f)=>{var v={string:_e=>{var qe=0;return _e!=null&&_e!==0&&(qe=Ds(_e)),qe},array:_e=>{var qe=wn(_e.length);return z.set(_e,qe),qe}};i=c["_"+i];var k=[],P=0;if(f)for(var de=0;de<f.length;de++){var Ee=v[u[de]];Ee?(P===0&&(P=oo()),k[de]=Ee(f[de])):k[de]=f[de]}return u=i(...k),u=function(_e){return P!==0&&ro(P),l==="string"?_e?Ae(se,_e):"":l==="boolean"?!!_e:_e}(u)},ai=0,ui=(i,l)=>(l=l==1?wn(i.length):Bs(i.length),i.subarray||i.slice||(i=new Uint8Array(i)),se.set(i,l),l),Kn,Fs=[],on,yn=i=>{Kn.delete(on.get(i)),on.set(i,null),Fs.push(i)},no=(i,l)=>{if(!Kn){Kn=new WeakMap;var u=on.length;if(Kn)for(var f=0;f<0+u;f++){var v=on.get(f);v&&Kn.set(v,f)}}if(u=Kn.get(i)||0)return u;if(Fs.length)u=Fs.pop();else{try{on.grow(1)}catch(Ee){throw Ee instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":Ee}u=on.length-1}try{on.set(u,i)}catch(Ee){if(!(Ee instanceof TypeError))throw Ee;if(typeof WebAssembly.Function=="function"){var k=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},v={parameters:[],results:l[0]=="v"?[]:[f[l[0]]]};for(var P=1;P<l.length;++P)v.parameters.push(f[l[P]]);l=new k(v,i)}else{f=[1],v=l.slice(0,1),l=l.slice(1),P={i:127,p:127,j:126,f:125,d:124,e:111},f.push(96);var de=l.length;128>de?f.push(de):f.push(de%128|128,de>>7);for(k of l)f.push(P[k]);v=="v"?f.push(0):f.push(1,P[v]),l=[0,97,115,109,1,0,0,0,1],k=f.length,128>k?l.push(k):l.push(k%128|128,k>>7),l.push(...f),l.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),l=new WebAssembly.Module(new Uint8Array(l)),l=new WebAssembly.Instance(l,{e:{f:i}}).exports.f}on.set(u,l)}return Kn.set(i,u),u};Xt=Array(4096),oe(ye,"/"),ke("/tmp"),ke("/home"),ke("/home/web_user"),function(){ke("/dev"),X(259,{read:()=>0,write:(f,v,k,P)=>P,Va:()=>0}),Gt("/dev/null",259),ei(1280,Ls),ei(1536,$s),Gt("/dev/tty",1280),Gt("/dev/tty1",1536);var i=new Uint8Array(1024),l=0,u=()=>(l===0&&(Kr(i),l=i.byteLength),i[--l]);gn("random",u),gn("urandom",u),ke("/dev/shm"),ke("/dev/shm/tmp")}(),function(){ke("/proc");var i=ke("/proc/self");ke("/proc/self/fd"),oe({Xa(){var l=g(i,"fd",16895,73);return l.Ma={Va:ye.Ma.Va},l.La={lookup(u,f){u=+f;var v=Z(u);return u={parent:null,Xa:{zb:"fake"},La:{readlink:()=>v.path},id:u+1},u.parent=u},readdir(){return Array.from(kt.entries()).filter(([,u])=>u).map(([u])=>u.toString())}},l}},"/proc/self/fd")}(),ye.vb=new Q(44),ye.vb.stack="<generic error, no stack>";var Sp={a:(i,l,u,f)=>q(`Assertion failed: ${i?Ae(se,i):""}, at: `+[l?l?Ae(se,l):"":"unknown filename",u,f?f?Ae(se,f):"":"unknown function"]),i:function(i,l){try{return i=i?Ae(se,i):"",oi(i,l),0}catch(u){if(typeof ze>"u"||u.name!=="ErrnoError")throw u;return-u.Pa}},L:function(i,l,u){try{if(l=l?Ae(se,l):"",l=Qn(i,l),u&-8)return-28;var f=mt(l,{$a:!0}).node;return f?(i="",u&4&&(i+="r"),u&2&&(i+="w"),u&1&&(i+="x"),i&&ie(f,i)?-2:0):-44}catch(v){if(typeof ze>"u"||v.name!=="ErrnoError")throw v;return-v.Pa}},j:function(i,l){try{var u=Z(i);return uu(u,u.node,l,!1),0}catch(f){if(typeof ze>"u"||f.name!=="ErrnoError")throw f;return-f.Pa}},h:function(i){try{var l=Z(i);return I(l,l.node,{timestamp:Date.now(),Fb:!1}),0}catch(u){if(typeof ze>"u"||u.name!=="ErrnoError")throw u;return-u.Pa}},b:function(i,l,u){si=u;try{var f=Z(i);switch(l){case 0:var v=li();if(0>v)break;for(;kt[v];)v++;return ce(f,v).fd;case 1:case 2:return 0;case 3:return f.flags;case 4:return v=li(),f.flags|=v,0;case 12:return v=li(),Me[v+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(k){if(typeof ze>"u"||k.name!=="ErrnoError")throw k;return-k.Pa}},g:function(i,l){try{var u=Z(i),f=u.node,v=u.Ma.Ta;i=v?u:f,v??(v=f.La.Ta),Y(v);var k=v(i);return ii(l,k)}catch(P){if(typeof ze>"u"||P.name!=="ErrnoError")throw P;return-P.Pa}},H:function(i,l){l=-9007199254740992>l||9007199254740992<l?NaN:Number(l);try{if(isNaN(l))return 61;var u=Z(i);if(0>l||!(u.flags&2097155))throw new Q(28);return cu(u,u.node,l),0}catch(f){if(typeof ze>"u"||f.name!=="ErrnoError")throw f;return-f.Pa}},G:function(i,l){try{if(l===0)return-28;var u=Wn("/")+1;return l<u?-68:(Dt("/",se,i,l),u)}catch(f){if(typeof ze>"u"||f.name!=="ErrnoError")throw f;return-f.Pa}},K:function(i,l){try{return i=i?Ae(se,i):"",ii(l,eo(i,!0))}catch(u){if(typeof ze>"u"||u.name!=="ErrnoError")throw u;return-u.Pa}},C:function(i,l,u){try{return l=l?Ae(se,l):"",l=Qn(i,l),ke(l,u),0}catch(f){if(typeof ze>"u"||f.name!=="ErrnoError")throw f;return-f.Pa}},J:function(i,l,u,f){try{l=l?Ae(se,l):"";var v=f&256;return l=Qn(i,l,f&4096),ii(u,v?eo(l,!0):eo(l))}catch(k){if(typeof ze>"u"||k.name!=="ErrnoError")throw k;return-k.Pa}},x:function(i,l,u,f){si=f;try{l=l?Ae(se,l):"",l=Qn(i,l);var v=f?li():0;return hr(l,u,v).fd}catch(k){if(typeof ze>"u"||k.name!=="ErrnoError")throw k;return-k.Pa}},v:function(i,l,u,f){try{if(l=l?Ae(se,l):"",l=Qn(i,l),0>=f)return-28;var v=mt(l).node;if(!v)throw new Q(44);if(!v.La.readlink)throw new Q(28);var k=v.La.readlink(v),P=Math.min(f,Wn(k)),de=z[u+P];return Dt(k,se,u,f+1),z[u+P]=de,P}catch(Ee){if(typeof ze>"u"||Ee.name!=="ErrnoError")throw Ee;return-Ee.Pa}},u:function(i){try{return i=i?Ae(se,i):"",lu(i),0}catch(l){if(typeof ze>"u"||l.name!=="ErrnoError")throw l;return-l.Pa}},f:function(i,l){try{return i=i?Ae(se,i):"",ii(l,eo(i))}catch(u){if(typeof ze>"u"||u.name!=="ErrnoError")throw u;return-u.Pa}},r:function(i,l,u){try{return l=l?Ae(se,l):"",l=Qn(i,l),u===0?au(l):u===512?lu(l):q("Invalid flags passed to unlinkat"),0}catch(f){if(typeof ze>"u"||f.name!=="ErrnoError")throw f;return-f.Pa}},q:function(i,l,u){try{l=l?Ae(se,l):"",l=Qn(i,l,!0);var f=Date.now(),v,k;if(u){var P=J[u>>2]+4294967296*$[u+4>>2],de=$[u+8>>2];de==1073741823?v=f:de==1073741822?v=null:v=1e3*P+de/1e6,u+=16,P=J[u>>2]+4294967296*$[u+4>>2],de=$[u+8>>2],de==1073741823?k=f:de==1073741822?k=null:k=1e3*P+de/1e6}else k=v=f;if((k??v)!==null){i=v;var Ee=mt(l,{$a:!0}).node;Y(Ee.La.Ua)(Ee,{atime:i,mtime:k})}return 0}catch(_e){if(typeof ze>"u"||_e.name!=="ErrnoError")throw _e;return-_e.Pa}},m:()=>q(""),l:()=>{Se=!1,Is=0},A:function(i,l){i=-9007199254740992>i||9007199254740992<i?NaN:Number(i),i=new Date(1e3*i),$[l>>2]=i.getSeconds(),$[l+4>>2]=i.getMinutes(),$[l+8>>2]=i.getHours(),$[l+12>>2]=i.getDate(),$[l+16>>2]=i.getMonth(),$[l+20>>2]=i.getFullYear()-1900,$[l+24>>2]=i.getDay();var u=i.getFullYear();$[l+28>>2]=(u%4!==0||u%100===0&&u%400!==0?wp:yp)[i.getMonth()]+i.getDate()-1|0,$[l+36>>2]=-(60*i.getTimezoneOffset()),u=new Date(i.getFullYear(),6,1).getTimezoneOffset();var f=new Date(i.getFullYear(),0,1).getTimezoneOffset();$[l+32>>2]=(u!=f&&i.getTimezoneOffset()==Math.min(f,u))|0},y:function(i,l,u,f,v,k,P){v=-9007199254740992>v||9007199254740992<v?NaN:Number(v);try{if(isNaN(v))return 61;var de=Z(f);if(l&2&&!(u&2)&&(de.flags&2097155)!==2)throw new Q(2);if((de.flags&2097155)===1)throw new Q(2);if(!de.Ma.ib)throw new Q(43);if(!i)throw new Q(28);var Ee=de.Ma.ib(de,i,v,l,u),_e=Ee.Kb;return $[k>>2]=Ee.Ab,J[P>>2]=_e,0}catch(qe){if(typeof ze>"u"||qe.name!=="ErrnoError")throw qe;return-qe.Pa}},z:function(i,l,u,f,v,k){k=-9007199254740992>k||9007199254740992<k?NaN:Number(k);try{var P=Z(v);if(u&2){if(u=k,(P.node.mode&61440)!==32768)throw new Q(43);if(!(f&2)){var de=se.slice(i,i+l);P.Ma.jb&&P.Ma.jb(P,de,u,l,f)}}}catch(Ee){if(typeof ze>"u"||Ee.name!=="ErrnoError")throw Ee;return-Ee.Pa}},n:(i,l)=>{if(to[i]&&(clearTimeout(to[i].id),delete to[i]),!l)return 0;var u=setTimeout(()=>{delete to[i],xp(()=>gu(i,performance.now()))},l);return to[i]={id:u,Xb:l},0},B:(i,l,u,f)=>{var v=new Date().getFullYear(),k=new Date(v,0,1).getTimezoneOffset();v=new Date(v,6,1).getTimezoneOffset(),J[i>>2]=60*Math.max(k,v),$[l>>2]=+(k!=v),l=P=>{var de=Math.abs(P);return`UTC${0<=P?"-":"+"}${String(Math.floor(de/60)).padStart(2,"0")}${String(de%60).padStart(2,"0")}`},i=l(k),l=l(v),v<k?(Dt(i,se,u,17),Dt(l,se,f,17)):(Dt(i,se,f,17),Dt(l,se,u,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:i=>{var l=se.length;if(i>>>=0,2147483648<i)return!1;for(var u=1;4>=u;u*=2){var f=l*(1+.2/u);f=Math.min(f,i+100663296);e:{f=(Math.min(2147483648,65536*Math.ceil(Math.max(i,f)/65536))-D.buffer.byteLength+65535)/65536|0;try{D.grow(f),ne();var v=1;break e}catch{}v=void 0}if(v)return!0}return!1},E:(i,l)=>{var u=0;return mu().forEach((f,v)=>{var k=l+u;for(v=J[i+4*v>>2]=k,k=0;k<f.length;++k)z[v++]=f.charCodeAt(k);z[v]=0,u+=f.length+1}),0},F:(i,l)=>{var u=mu();J[i>>2]=u.length;var f=0;return u.forEach(v=>f+=v.length+1),J[l>>2]=f,0},e:function(i){try{var l=Z(i);return As(l),0}catch(u){if(typeof ze>"u"||u.name!=="ErrnoError")throw u;return u.Pa}},p:function(i,l){try{var u=Z(i);return z[l]=u.tty?2:x(u.mode)?3:(u.mode&61440)===40960?7:4,Me[l+2>>1]=0,te[l+8>>3]=BigInt(0),te[l+16>>3]=BigInt(0),0}catch(f){if(typeof ze>"u"||f.name!=="ErrnoError")throw f;return f.Pa}},w:function(i,l,u,f){try{e:{var v=Z(i);i=l;for(var k,P=l=0;P<u;P++){var de=J[i>>2],Ee=J[i+4>>2];i+=8;var _e=fu(v,z,de,Ee,k);if(0>_e){var qe=-1;break e}if(l+=_e,_e<Ee)break;typeof k<"u"&&(k+=_e)}qe=l}return J[f>>2]=qe,0}catch(gt){if(typeof ze>"u"||gt.name!=="ErrnoError")throw gt;return gt.Pa}},D:function(i,l,u,f){l=-9007199254740992>l||9007199254740992<l?NaN:Number(l);try{if(isNaN(l))return 61;var v=Z(i);return du(v,l,u),te[f>>3]=BigInt(v.position),v.ob&&l===0&&u===0&&(v.ob=null),0}catch(k){if(typeof ze>"u"||k.name!=="ErrnoError")throw k;return k.Pa}},I:function(i){var u;try{var l=Z(i);return(u=l.Ma)!=null&&u.fsync?l.Ma.fsync(l):0}catch(f){if(typeof ze>"u"||f.name!=="ErrnoError")throw f;return f.Pa}},t:function(i,l,u,f){try{e:{var v=Z(i);i=l;for(var k,P=l=0;P<u;P++){var de=J[i>>2],Ee=J[i+4>>2];i+=8;var _e=pu(v,z,de,Ee,k);if(0>_e){var qe=-1;break e}if(l+=_e,_e<Ee)break;typeof k<"u"&&(k+=_e)}qe=l}return J[f>>2]=qe,0}catch(gt){if(typeof ze>"u"||gt.name!=="ErrnoError")throw gt;return gt.Pa}},k:hu},pe;(async function(){var u;function i(f){var v;return pe=f.exports,D=pe.M,ne(),on=pe.O,he--,(v=c.monitorRunDependencies)==null||v.call(c,he),he==0&&T&&(f=T,T=null,f()),pe}he++,(u=c.monitorRunDependencies)==null||u.call(c,he);var l={a:Sp};return c.instantiateWasm?new Promise(f=>{c.instantiateWasm(l,(v,k)=>{i(v),f(v.exports)})}):(ve??(ve=c.locateFile?c.locateFile("sql-wasm.wasm",me):me+"sql-wasm.wasm"),i((await Pe(l)).instance))})(),c._sqlite3_free=i=>(c._sqlite3_free=pe.P)(i),c._sqlite3_value_text=i=>(c._sqlite3_value_text=pe.Q)(i),c._sqlite3_prepare_v2=(i,l,u,f,v)=>(c._sqlite3_prepare_v2=pe.R)(i,l,u,f,v),c._sqlite3_step=i=>(c._sqlite3_step=pe.S)(i),c._sqlite3_reset=i=>(c._sqlite3_reset=pe.T)(i),c._sqlite3_exec=(i,l,u,f,v)=>(c._sqlite3_exec=pe.U)(i,l,u,f,v),c._sqlite3_finalize=i=>(c._sqlite3_finalize=pe.V)(i),c._sqlite3_column_name=(i,l)=>(c._sqlite3_column_name=pe.W)(i,l),c._sqlite3_column_text=(i,l)=>(c._sqlite3_column_text=pe.X)(i,l),c._sqlite3_column_type=(i,l)=>(c._sqlite3_column_type=pe.Y)(i,l),c._sqlite3_errmsg=i=>(c._sqlite3_errmsg=pe.Z)(i),c._sqlite3_clear_bindings=i=>(c._sqlite3_clear_bindings=pe._)(i),c._sqlite3_value_blob=i=>(c._sqlite3_value_blob=pe.$)(i),c._sqlite3_value_bytes=i=>(c._sqlite3_value_bytes=pe.aa)(i),c._sqlite3_value_double=i=>(c._sqlite3_value_double=pe.ba)(i),c._sqlite3_value_int=i=>(c._sqlite3_value_int=pe.ca)(i),c._sqlite3_value_type=i=>(c._sqlite3_value_type=pe.da)(i),c._sqlite3_result_blob=(i,l,u,f)=>(c._sqlite3_result_blob=pe.ea)(i,l,u,f),c._sqlite3_result_double=(i,l)=>(c._sqlite3_result_double=pe.fa)(i,l),c._sqlite3_result_error=(i,l,u)=>(c._sqlite3_result_error=pe.ga)(i,l,u),c._sqlite3_result_int=(i,l)=>(c._sqlite3_result_int=pe.ha)(i,l),c._sqlite3_result_int64=(i,l)=>(c._sqlite3_result_int64=pe.ia)(i,l),c._sqlite3_result_null=i=>(c._sqlite3_result_null=pe.ja)(i),c._sqlite3_result_text=(i,l,u,f)=>(c._sqlite3_result_text=pe.ka)(i,l,u,f),c._sqlite3_aggregate_context=(i,l)=>(c._sqlite3_aggregate_context=pe.la)(i,l),c._sqlite3_column_count=i=>(c._sqlite3_column_count=pe.ma)(i),c._sqlite3_data_count=i=>(c._sqlite3_data_count=pe.na)(i),c._sqlite3_column_blob=(i,l)=>(c._sqlite3_column_blob=pe.oa)(i,l),c._sqlite3_column_bytes=(i,l)=>(c._sqlite3_column_bytes=pe.pa)(i,l),c._sqlite3_column_double=(i,l)=>(c._sqlite3_column_double=pe.qa)(i,l),c._sqlite3_bind_blob=(i,l,u,f,v)=>(c._sqlite3_bind_blob=pe.ra)(i,l,u,f,v),c._sqlite3_bind_double=(i,l,u)=>(c._sqlite3_bind_double=pe.sa)(i,l,u),c._sqlite3_bind_int=(i,l,u)=>(c._sqlite3_bind_int=pe.ta)(i,l,u),c._sqlite3_bind_text=(i,l,u,f,v)=>(c._sqlite3_bind_text=pe.ua)(i,l,u,f,v),c._sqlite3_bind_parameter_index=(i,l)=>(c._sqlite3_bind_parameter_index=pe.va)(i,l),c._sqlite3_sql=i=>(c._sqlite3_sql=pe.wa)(i),c._sqlite3_normalized_sql=i=>(c._sqlite3_normalized_sql=pe.xa)(i),c._sqlite3_changes=i=>(c._sqlite3_changes=pe.ya)(i),c._sqlite3_close_v2=i=>(c._sqlite3_close_v2=pe.za)(i),c._sqlite3_create_function_v2=(i,l,u,f,v,k,P,de,Ee)=>(c._sqlite3_create_function_v2=pe.Aa)(i,l,u,f,v,k,P,de,Ee),c._sqlite3_update_hook=(i,l,u)=>(c._sqlite3_update_hook=pe.Ba)(i,l,u),c._sqlite3_open=(i,l)=>(c._sqlite3_open=pe.Ca)(i,l);var Bs=c._malloc=i=>(Bs=c._malloc=pe.Da)(i),ci=c._free=i=>(ci=c._free=pe.Ea)(i);c._RegisterExtensionFunctions=i=>(c._RegisterExtensionFunctions=pe.Fa)(i);var vu=(i,l)=>(vu=pe.Ga)(i,l),gu=(i,l)=>(gu=pe.Ha)(i,l),ro=i=>(ro=pe.Ia)(i),wn=i=>(wn=pe.Ja)(i),oo=()=>(oo=pe.Ka)();c.stackSave=()=>oo(),c.stackRestore=i=>ro(i),c.stackAlloc=i=>wn(i),c.cwrap=(i,l,u,f)=>{var v=!u||u.every(k=>k==="number"||k==="boolean");return l!=="string"&&v&&!f?c["_"+i]:(...k)=>_p(i,l,u,k)},c.addFunction=no,c.removeFunction=yn,c.UTF8ToString=Lt,c.ALLOC_NORMAL=ai,c.allocate=ui,c.allocateUTF8OnStack=Ds;function Vs(){function i(){var v;if(c.calledRun=!0,!K){if(!c.noFSInit&&!ni){var l,u;ni=!0,f??(f=c.stdin),l??(l=c.stdout),u??(u=c.stderr),f?gn("stdin",f):Rs("/dev/tty","/dev/stdin"),l?gn("stdout",null,l):Rs("/dev/tty","/dev/stdout"),u?gn("stderr",null,u):Rs("/dev/tty1","/dev/stderr"),hr("/dev/stdin",0),hr("/dev/stdout",1),hr("/dev/stderr",1)}if(pe.N(),fr=!1,(v=c.onRuntimeInitialized)==null||v.call(c),c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;){var f=c.postRun.shift();ut.unshift(f)}Qe(ut)}}if(0<he)T=Vs;else{if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)ct();Qe(Je),0<he?T=Vs:c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1),i()},1)):i()}}if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);0<c.preInit.length;)c.preInit.pop()();return Vs(),d}),n)};e.exports=r,e.exports.default=r})(mp);var $g=mp.exports;const Mg=Hc($g);function Rg(e){const[t,n]=O.useState(null),[r,o]=O.useState(!0),[s,a]=O.useState(null);return O.useEffect(()=>{let d=!0;const h=async()=>{o(!0),a(null);try{const E=await Mg({locateFile:y=>`https://sql.js.org/dist/${y}`}),S=await fetch(`/@fs${e}`);if(!S.ok)throw new Error(`Cannot read DB at ${e}`);const j=new Uint8Array(await S.arrayBuffer()),U=new E.Database(j).exec("SELECT session_id, correlation_id, tool_calls, data_access_summary FROM mcp_sessions ORDER BY id DESC LIMIT 200;"),me=[];if(U.length>0){const y=U[0].columns,m=U[0].values;for(const w of m){const N={};y.forEach((D,K)=>N[D]=w[K]);const A=(()=>{try{return Array.isArray(N.tool_calls)?N.tool_calls:JSON.parse(N.tool_calls??"[]")}catch{return[]}})(),V=(()=>{try{return typeof N.data_access_summary=="object"?N.data_access_summary:JSON.parse(N.data_access_summary??"{}")}catch{return{}}})();me.push({session_id:String(N.session_id),correlation_id:String(N.correlation_id??""),tool_calls:A,data_access_summary:V})}}d&&n({sessions:me})}catch(E){d&&a(E instanceof Error?E.message:"Unknown error")}finally{d&&o(!1)}};h();const c=setInterval(h,5e3);return()=>{d=!1,clearInterval(c)}},[e]),{data:t,loading:r,error:s}}function Ag({sessions:e,startDay:t,endDay:n,onRangeChange:r}){const o=O.useMemo(()=>{const h=new Map;for(const j of e){const b=j.day;b&&h.set(b,(h.get(b)??0)+1)}const c=Array.from(h.entries()).sort((j,b)=>j[0].localeCompare(b[0])),E=c.reduce((j,[,b])=>Math.max(j,b),1);return{entries:c,max:E,indexOf:j=>c.findIndex(([b])=>b===j)}},[e]),s=O.useRef(!1),a=O.useRef(-1),d=(h,c)=>{var j,b,L,U;const E=Math.max(0,Math.min(h,c)),S=Math.min(o.entries.length-1,Math.max(h,c));if(E<=S){const me=((b=(j=o.entries)==null?void 0:j[E])==null?void 0:b[0])??"",y=((U=(L=o.entries)==null?void 0:L[S])==null?void 0:U[0])??"";r(me,y)}};return o.entries.length===0?null:p.jsxs("div",{className:"card select-none",children:[p.jsx("div",{className:"text-xs text-app-muted mb-2",children:"Timeline (drag to select)"}),p.jsx("div",{className:"flex items-end gap-1",onMouseLeave:()=>{s.current=!1,a.current=-1},onMouseUp:()=>{s.current=!1,a.current=-1},children:o.entries.map(([h,c],E)=>{const S=Math.max(6,c/o.max*64),j=!t||!n?!1:h>=t&&h<=n;return p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsx("div",{className:`rounded-t w-4 cursor-pointer ${j?"bg-app-accent":"bg-app-border hover:bg-app-accent/60"}`,style:{height:`${S}px`},onMouseDown:()=>{s.current=!0,a.current=E,d(E,E)},onMouseEnter:()=>{s.current&&a.current!==-1&&d(a.current,E)},onClick:()=>{s.current||d(E,E)},title:`${h}: ${c}`}),p.jsx("div",{className:"text-[10px] text-app-muted mt-1",children:h.slice(5)})]},h)})})]})}function Vc(e){if(!e)return"";try{return new Date(e).toLocaleString()}catch{return e}}function Wc(e,t=6,n=4){return e?e.length<=t+n+1?e:`${e.slice(0,t)}…${e.slice(-n)}`:""}function Ig(e){const t=e||{},n=t.lethal_trifecta||t.trifecta||{};return{privateData:!!n.has_private_data_access,untrusted:!!n.has_untrusted_content_exposure,external:!!n.has_external_communication}}function zg(e){const t=Number(e.privateData)+Number(e.untrusted)+Number(e.external);return t>=2?{label:"High",colorClass:"text-rose-400"}:t===1?{label:"Medium",colorClass:"text-amber-400"}:{label:"Low",colorClass:"text-green-400"}}function qc({sessions:e}){const[t,n]=O.useState(null),r=s=>{const d=(s||{}).acl||{},h=(d.highest_acl_level||d.level||"").toString().toUpperCase();return h==="PRIVATE"||h==="SECRET"||h==="PUBLIC"?h:"PUBLIC"},o=s=>{const a=s==="SECRET"?"text-rose-400":s==="PRIVATE"?"text-amber-400":"text-green-400";return p.jsx("span",{className:a,children:s})};return p.jsx("div",{className:"card",children:p.jsxs("table",{className:"w-full border-collapse",children:[p.jsxs("thead",{children:[p.jsxs("tr",{children:[p.jsx("th",{rowSpan:2,className:"border-b border-app-border py-2 text-left align-bottom",children:"Date/Time"}),p.jsx("th",{rowSpan:2,className:"border-b border-app-border py-2 text-left align-bottom",children:"Session"}),p.jsx("th",{colSpan:3,className:"border-b border-app-border py-1 text-center text-xs text-app-muted align-bottom",children:"Data access"}),p.jsx("th",{rowSpan:2,className:"border-b border-app-border py-2 text-left align-bottom",children:"Risk"}),p.jsx("th",{rowSpan:2,className:"border-b border-app-border py-2 text-left align-bottom",children:"ACL"}),p.jsx("th",{rowSpan:2,className:"border-b border-app-border py-2 text-left align-bottom",children:"Tool calls"}),p.jsx("th",{rowSpan:2,className:"border-b border-app-border py-2 text-left align-bottom"})]}),p.jsxs("tr",{children:[p.jsx("th",{className:"border-b border-app-border py-1 text-left",children:"Private"}),p.jsx("th",{className:"border-b border-app-border py-1 text-left",children:"Untrusted"}),p.jsx("th",{className:"border-b border-app-border py-1 text-left",children:"External"})]})]}),p.jsx("tbody",{children:e.map(s=>{var c;const a=t===s.session_id,d=s.created_at||((c=s.tool_calls[0])==null?void 0:c.timestamp),h=Ig(s.data_access_summary);return p.jsxs(bn.Fragment,{children:[p.jsxs("tr",{className:a?"bg-app-bg/30":"",children:[p.jsx("td",{className:"border-b border-app-border py-2 whitespace-nowrap",children:d?Vc(d):"Unknown"}),p.jsxs("td",{className:"border-b border-app-border py-2 max-w-[260px]",children:[p.jsx("div",{className:"truncate",title:s.session_id,children:Wc(s.session_id,6,4)}),p.jsx("div",{className:"text-xs text-app-muted truncate",title:`Correlation: ${s.correlation_id}`,children:Wc(s.correlation_id,4,4)})]}),p.jsx("td",{className:"border-b border-app-border py-2",children:p.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${h.privateData?"bg-blue-400":"bg-app-border"}`,title:h.privateData?"Private data access":"No private data access"})}),p.jsx("td",{className:"border-b border-app-border py-2",children:p.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${h.untrusted?"bg-amber-400":"bg-app-border"}`,title:h.untrusted?"Untrusted content exposure":"No untrusted exposure"})}),p.jsx("td",{className:"border-b border-app-border py-2",children:p.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${h.external?"bg-rose-400":"bg-app-border"}`,title:h.external?"External communication":"No external communication"})}),p.jsx("td",{className:"border-b border-app-border py-2",children:(()=>{const E=zg(h);return p.jsx("span",{className:E.colorClass,children:E.label})})()}),p.jsx("td",{className:"border-b border-app-border py-2",children:o(r(s.data_access_summary))}),p.jsx("td",{className:"border-b border-app-border py-2",children:s.tool_calls.length}),p.jsx("td",{className:"border-b border-app-border py-2",children:p.jsx("button",{className:"button",onClick:()=>n(a?null:s.session_id),children:a?"Hide":"Show"})})]}),a&&p.jsx("tr",{children:p.jsx("td",{colSpan:8,className:"py-3",children:p.jsx("div",{style:{overflowX:"auto"},children:s.tool_calls.length>0&&p.jsxs("table",{className:"w-full border-collapse",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{className:"border-b border-app-border py-2 text-left",children:"Time"}),p.jsx("th",{className:"border-b border-app-border py-2 text-left",children:"Tool"}),p.jsx("th",{className:"border-b border-app-border py-2 text-left",children:"Status"}),p.jsx("th",{className:"border-b border-app-border py-2 text-left",children:"Duration (s)"}),p.jsx("th",{className:"border-b border-app-border py-2 text-left min-w-[240px]",children:"Parameters"})]})}),p.jsx("tbody",{children:s.tool_calls.map(E=>p.jsxs("tr",{children:[p.jsx("td",{className:"border-b border-app-border py-2 whitespace-nowrap",children:Vc(E.timestamp)}),p.jsx("td",{className:"border-b border-app-border py-2",children:E.tool_name}),p.jsx("td",{className:"border-b border-app-border py-2",children:E.status??"pending"}),p.jsx("td",{className:"border-b border-app-border py-2",children:typeof E.duration_ms=="number"?(E.duration_ms/1e3).toPrecision(3):""}),p.jsx("td",{className:"border-b border-app-border py-2 text-xs font-mono",children:p.jsx("code",{className:"text-xs",children:JSON.stringify(E.parameters??{},null,0)})})]},E.id))})]})})})})]},s.session_id)})})]})})}function vr({checked:e,onChange:t}){return p.jsx("button",{type:"button",role:"switch","aria-checked":e,className:`relative inline-flex h-6 w-10 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 ${e?"bg-blue-500":"bg-app-border"}`,onClick:()=>{console.log(`🔄 Toggle clicked: current=${e}, new=${!e}`),t(!e)},onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t(!e))},children:p.jsx("span",{className:`inline-block h-5 w-5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-5":"translate-x-1"}`})})}function Ug(){const e="/sessions.db",t=globalThis.__PROJECT_ROOT__?`${globalThis.__PROJECT_ROOT__}${e}`:`${window.location.pathname}${e}`,{data:n,loading:r,error:o}=Rg(t),s=O.useMemo(()=>(n==null?void 0:n.sessions)??[],[n]),a=O.useMemo(()=>((n==null?void 0:n.sessions)??[]).map(T=>{var Oe;const q=T.created_at||((Oe=T.tool_calls[0])==null?void 0:Oe.timestamp),ve=q?Date.parse(q):0,be=q&&!Number.isNaN(ve)?new Date(ve).toISOString().slice(0,10):"";return{...T,ts:ve,day:be}}),[n]),[d,h]=O.useState(""),[c,E]=O.useState(""),[S,j]=O.useState(!1),b=(T,q)=>!T&&!q?0:T?q?T.localeCompare(q):1:-1,L=O.useMemo(()=>a.filter(T=>!(!T.day||d&&b(T.day,d)<0||c&&b(T.day,c)>0)),[a,d,c]),U=O.useMemo(()=>a.filter(T=>!T.day),[a]),me=O.useMemo(()=>{const T=L.reduce((q,ve)=>q+ve.tool_calls.length,0);return S?T+U.reduce((q,ve)=>q+ve.tool_calls.length,0):T},[L,U,S]),[y,m]=O.useState(()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark");O.useEffect(()=>{document.documentElement.setAttribute("data-theme",y)},[y]);const w=globalThis.__PROJECT_ROOT__||"",[N,A]=O.useState("sessions"),[V,D]=O.useState(!1),K=T=>{V&&N==="configs"&&!window.confirm("You have unsaved changes in the JSON editor. Are you sure you want to switch views? Your changes will be lost.")||A(T)},[fe,z]=O.useState("checking"),[se,Me]=O.useState(null);O.useEffect(()=>{if(!se)return;const T=setTimeout(()=>Me(null),5e3);return()=>clearTimeout(T)},[se]);const[$,J]=O.useState([]),[H,te]=O.useState(0),[Ce,R]=O.useState(!1);O.useEffect(()=>{if(!H)return;R(!0);const T=setTimeout(()=>R(!1),2500);return()=>clearTimeout(T)},[H]);const ne=async T=>{try{await fetch("/api/approve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_id:T.sessionId,kind:T.kind,name:T.name})}),Me({message:`Approved ${T.kind} '${T.name}'`,type:"success"})}catch{Me({message:`Failed to approve ${T.kind} '${T.name}'`,type:"error"})}finally{J(q=>q.filter(ve=>ve.id!==T.id))}},he=T=>{J(q=>q.filter(ve=>ve.id!==T.id))};return O.useEffect(()=>{const T=async()=>{var ve,be,Oe;try{console.log("🔄 Starting MCP status check...");const Pe=await fetch(`/@fs${w}/config.json`,{cache:"no-cache",headers:{"Cache-Control":"no-cache"}});if(!Pe.ok){console.log("❌ Failed to load config.json"),z("offline");return}const ae=await Pe.json(),Qe=((ve=ae==null?void 0:ae.server)==null?void 0:ve.host)||"localhost",ut=((be=ae==null?void 0:ae.server)==null?void 0:be.port)||3e3,Je=ut+1,ct=((Oe=ae==null?void 0:ae.server)==null?void 0:Oe.api_key)||"";console.log("🔍 Checking servers:",{serverHost:Qe,basePort:ut,apiPort:Je,mcpUrl:`http://${Qe}:${ut}/`,apiUrl:`http://${Qe}:${Je}/health`});const[$e,Se]=await Promise.allSettled([fetch(`http://${Qe}:${Je}/mcp/status`,{method:"GET",mode:"cors",headers:{Accept:"application/json",Authorization:`Bearer ${ct}`}}),fetch(`http://${Qe}:${Je}/health`,{method:"GET",mode:"cors",headers:{Accept:"application/json",Authorization:`Bearer ${ct}`}})]);console.log("📡 Raw responses:",{mcpResponse:$e.status==="fulfilled"?{status:$e.value.status,statusText:$e.value.statusText,ok:$e.value.ok}:$e.reason,apiResponse:Se.status==="fulfilled"?{status:Se.value.status,statusText:Se.value.statusText,ok:Se.value.ok}:Se.reason});const Re=$e.status==="fulfilled",Ye=Se.status==="fulfilled"&&Se.value.ok;console.log("🔍 MCP Status Check:",{mcpOk:Re,apiOk:Ye,finalStatus:Re&&Ye?"online":Re?"reduced":"offline"}),z(Re&&Ye?"online":Re?"reduced":"offline")}catch(Pe){console.error("❌ MCP status check error:",Pe),z("offline")}};T();const q=setInterval(T,5e3);return()=>clearInterval(q)},[]),O.useEffect(()=>{var be,Oe;(async()=>{if("serviceWorker"in navigator)try{await navigator.serviceWorker.register("/sw.js")}catch{}})();const q=Pe=>{try{const ae=Pe.data||{};if(ae&&ae.type==="MCP_ENQUEUE_PENDING"&&ae.data){const Qe=ae.data||{},ut=String(Qe.sessionId||""),Je=Qe.kind,ct=Qe.name;if(ut&&Je&&ct){const $e={id:`${Date.now()}-${Je}-${ct}-${Math.random()}`,sessionId:ut,kind:Je,name:ct,reason:Qe.reason};J(Se=>Se.some(Re=>Re.sessionId===$e.sessionId&&Re.kind===$e.kind&&Re.name===$e.name)?Se:[...Se,$e]),te(Date.now())}}}catch{}};(Oe=(be=navigator.serviceWorker)==null?void 0:be.addEventListener)==null||Oe.call(be,"message",q);const ve=new EventSource("/events");return ve.onmessage=Pe=>{try{const ae=JSON.parse(Pe.data||"{}");if((ae==null?void 0:ae.type)==="mcp_pre_block"){const Qe="Edison blocked a risky action",ut=`${ae.kind}: ${ae.name}${ae.reason?` — ${ae.reason}`:""}`,Je=ae.session_id||"";if(Je&&ae.kind&&ae.name){const Se={id:`${Date.now()}-${ae.kind}-${ae.name}-${Math.random()}`,sessionId:Je,kind:ae.kind,name:ae.name,reason:ae.reason};J(Re=>Re.some(Ye=>Ye.sessionId===Se.sessionId&&Ye.kind===Se.kind&&Ye.name===Se.name)?Re:[...Re,Se]),te(Date.now())}const ct=async()=>{var Se;try{if("serviceWorker"in navigator&&Notification)return await(async()=>Notification.permission==="granted"?!0:Notification.permission==="denied"?!1:await Notification.requestPermission()==="granted")()?((Se=(await navigator.serviceWorker.ready).active)==null||Se.postMessage({type:"SHOW_MCP_BLOCK_NOTIFICATION",title:Qe,body:ut,data:{sessionId:Je,kind:ae.kind,name:ae.name}}),!0):!1}catch{}return!1},$e=()=>{if(typeof Notification>"u")return;const Se=()=>{try{const Re=new Notification(Qe,{body:ut});Re.onclick=async()=>{try{window.confirm(`Allow ${ae.kind} '${ae.name}' for this session?`)&&Je&&await fetch("/api/approve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_id:Je,kind:ae.kind,name:ae.name})})}catch{}}}catch{}};Notification.permission==="granted"?Se():Notification.permission!=="denied"&&Notification.requestPermission().then(Re=>{Re==="granted"&&Se()}).catch(()=>{})};ct().then(Se=>{Se||$e()})}else if((ae==null?void 0:ae.type)==="mcp_approved_once"){const Qe=`Approved ${ae.kind} '${ae.name}'`;Me({message:Qe,type:"success"})}}catch{}},ve.onerror=()=>{},()=>{var Pe,ae;ve.close();try{(ae=(Pe=navigator.serviceWorker)==null?void 0:Pe.removeEventListener)==null||ae.call(Pe,"message",q)}catch{}}},[]),O.useEffect(()=>{try{const T=new URL(window.location.href),q=T.searchParams.get("pa_s")||"",ve=T.searchParams.get("pa_k")||"",be=T.searchParams.get("pa_n")||"";if(q&&ve&&be){const Oe={id:`${Date.now()}-${ve}-${be}-${Math.random()}`,sessionId:q,kind:ve,name:be};J(Pe=>Pe.some(ae=>ae.sessionId===Oe.sessionId&&ae.kind===Oe.kind&&ae.name===Oe.name)?Pe:[...Pe,Oe]),te(Date.now());try{const Pe=T.origin+T.pathname;window.history.replaceState({},"",Pe)}catch{}}}catch{}},[]),p.jsxs("div",{className:"mx-auto max-w-[1400px] p-6 space-y-4",children:[p.jsxs("div",{className:"flex items-center justify-between gap-3",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"m-0 text-2xl font-bold",children:"Open Edison Sessions"}),p.jsx("p",{className:"m-0 text-sm text-app-muted",children:"Live view of recent MCP sessions from the local SQLite store."})]}),p.jsxs("div",{className:"flex gap-2 items-center",children:[p.jsxs("div",{className:"hidden sm:flex border border-app-border rounded overflow-hidden",children:[p.jsx("button",{className:`px-3 py-1 text-sm ${N==="sessions"?"text-app-accent border-r border-app-border bg-app-accent/10":""}`,onClick:()=>K("sessions"),children:"Sessions"}),p.jsx("button",{className:`px-3 py-1 text-sm ${N==="configs"?"text-app-accent border-r border-app-border bg-app-accent/10":""}`,onClick:()=>K("configs"),children:"Configs"}),p.jsx("button",{className:`px-3 py-1 text-sm ${N==="manager"?"text-app-accent bg-app-accent/10":""}`,onClick:()=>K("manager"),children:"Configuration Manager"})]}),p.jsxs("button",{className:"button",onClick:()=>m(T=>T==="light"?"dark":"light"),children:[y==="light"?"Dark":"Light"," mode"]}),p.jsx("button",{className:"button",onClick:()=>location.reload(),children:"Refresh"})]})]}),N==="sessions"?p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[p.jsx("div",{className:"card flex items-center gap-3",children:p.jsxs("div",{children:[p.jsx("div",{className:"text-xs text-app-muted",children:"Total sessions"}),p.jsx("div",{className:"text-xl font-bold",children:L.length})]})}),p.jsx("div",{className:"card flex items-center gap-3",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:`w-3 h-3 rounded-full ${fe==="online"?"bg-green-500":fe==="reduced"?"bg-yellow-500":fe==="checking"?"bg-blue-500 animate-pulse":"bg-red-500"}`}),p.jsxs("div",{children:[p.jsx("div",{className:"text-xs text-app-muted",children:"MCP Server"}),p.jsx("div",{className:`text-xl font-bold ${fe==="online"?"text-green-500":fe==="reduced"?"text-yellow-500":fe==="checking"?"text-blue-500":"text-red-500"}`,children:fe==="online"?"Live":fe==="reduced"?"Reduced":fe==="checking"?"Checking...":"Offline"})]})]})}),p.jsx("div",{className:"card flex items-center gap-3",children:p.jsxs("div",{children:[p.jsx("div",{className:"text-xs text-app-muted",children:"Total tool calls"}),p.jsx("div",{className:"text-xl font-bold",children:me})]})})]}),p.jsxs("div",{className:"card flex flex-col sm:flex-row gap-3 items-start sm:items-end",children:[p.jsxs("div",{className:"flex flex-col",children:[p.jsx("label",{className:"text-xs text-app-muted mb-1",children:"Start day"}),p.jsx("input",{type:"date",className:"button !py-2 !px-3",value:d,onChange:T=>h(T.target.value)})]}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("label",{className:"text-xs text-app-muted mb-1",children:"End day"}),p.jsx("input",{type:"date",className:"button !py-2 !px-3",value:c,onChange:T=>E(T.target.value)})]}),p.jsx("button",{className:"button",onClick:()=>{h(""),E("")},children:"Clear"}),p.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[p.jsx("span",{className:"text-xs text-app-muted",children:"Show unknown date"}),p.jsx(vr,{checked:S,onChange:j}),U.length>0&&!S&&p.jsxs("span",{className:"text-xs text-app-muted",children:["(",U.length," hidden)"]})]})]}),p.jsx(Ag,{sessions:L,startDay:d,endDay:c,onRangeChange:(T,q)=>{h(T),E(q)}}),r&&p.jsx("div",{children:"Loading…"}),o&&p.jsxs("div",{className:"danger",style:{margin:"8px 0"},children:["Failed to load sessions: ",o]}),!r&&!o&&s.length===0&&p.jsx("div",{className:"muted",style:{marginTop:12},children:"No sessions recorded yet."}),p.jsx(qc,{sessions:L}),S&&U.length>0&&p.jsxs("div",{className:"space-y-2",children:[p.jsx("div",{className:"text-xs text-app-muted",children:"Unknown date"}),p.jsx(qc,{sessions:U})]})]}):N==="configs"?p.jsx(Dg,{projectRoot:w,onUnsavedChangesChange:D}):p.jsx(Fg,{projectRoot:w}),$.length>0&&$[0]&&p.jsx("div",{className:`fixed bottom-4 right-4 z-50 w-[min(92vw,28rem)] transition-transform duration-300 ${Ce?"animate-[pop_300ms_ease-out] translate-y-[-4px]":""}`,children:(()=>{const T=$[0];return p.jsxs("div",{className:"relative p-4 rounded-lg shadow-xl border border-blue-400/60 bg-blue-50 text-blue-900 dark:bg-blue-900/20 dark:text-blue-200",children:[p.jsx("div",{className:"absolute -inset-0.5 rounded-lg bg-blue-400/20 blur-md pointer-events-none","aria-hidden":"true"}),p.jsx("div",{className:"relative text-sm font-semibold mb-1",children:"Approval required"}),p.jsxs("div",{className:"relative text-xs mb-3",children:[T.kind,": ",p.jsx("span",{className:"font-mono",children:T.name}),T.reason?` — ${T.reason}`:""]}),p.jsxs("div",{className:"relative flex gap-2",children:[p.jsx("button",{className:"button !bg-blue-600 !text-white hover:!bg-blue-700",onClick:()=>ne(T),children:"Approve"}),p.jsx("button",{className:"button !bg-blue-100 dark:!bg-blue-800/40",onClick:()=>he(T),children:"Deny"})]})]})})()}),se&&p.jsx("div",{className:`fixed bottom-4 left-4 right-auto z-50 p-4 rounded-lg shadow-lg max-w-sm transition-all duration-300 ${se.type==="success"?"bg-green-500 text-white":"bg-red-500 text-white"}`,children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-sm font-medium",children:se.message}),p.jsx("button",{onClick:()=>Me(null),className:"ml-3 text-white hover:text-gray-200 text-lg font-bold",children:"×"})]})})]})}function Dg({projectRoot:e,onUnsavedChangesChange:t}){const n=O.useMemo(()=>[{key:"config",name:"config.json",path:`${e}/config.json`,description:"Global configuration for Open Edison. Defines server host/port, API key, logging level, and the list of MCP servers (name, command, args, env, enabled). Changes affect server behavior across the app."},{key:"tool",name:"tool_permissions.json",path:`${e}/tool_permissions.json`,description:"Fine-grained tool permissions. Controls which tools can be invoked, optional allow/deny lists, and classification flags (e.g., read private data, write operation, external communication). Used by the session tracker and policy checks."},{key:"resource",name:"resource_permissions.json",path:`${e}/resource_permissions.json`,description:"Resource access policy. Maps resource identifiers (files, endpoints, secrets) to allowed operations and visibility. Used to determine untrusted/public vs private data access."},{key:"prompt",name:"prompt_permissions.json",path:`${e}/prompt_permissions.json`,description:"Prompt/library access policy. Governs which predefined prompts can be loaded or executed and with what constraints. Useful for reducing prompt injection or limiting sensitive prompts."}],[e]),[r,o]=O.useState("config"),[s,a]=O.useState({}),[d,h]=O.useState({}),[c,E]=O.useState({}),[S,j]=O.useState(""),[b,L]=O.useState(null),[U,me]=O.useState(null),y=()=>{try{const $=localStorage.getItem("json_editor_needs_permission_update"),J=localStorage.getItem("json_editor_needs_config_update");return{needsPermissionUpdate:$?JSON.parse($):{},needsConfigUpdate:J?JSON.parse(J):{}}}catch{return{needsPermissionUpdate:{},needsConfigUpdate:{}}}},m=($,J)=>{try{localStorage.setItem("json_editor_needs_permission_update",JSON.stringify($)),localStorage.setItem("json_editor_needs_config_update",JSON.stringify(J))}catch{}},[w,N]=O.useState(y);O.useEffect(()=>{N(y())},[r]),O.useEffect(()=>{if(b){const $=setTimeout(()=>{L(null)},1e4);return()=>clearTimeout($)}},[b]),O.useEffect(()=>{if(s[r]!==void 0&&d[r]!==void 0){const $=s[r]!==d[r];if(E(J=>({...J,[r]:$})),$){const J=y();if(r==="tool"||r==="resource"||r==="prompt"){const H={...J.needsPermissionUpdate,[r]:!0};m(H,J.needsConfigUpdate),N({needsPermissionUpdate:H,needsConfigUpdate:J.needsConfigUpdate})}else if(r==="config"){const H={...J.needsConfigUpdate,[r]:!0};m(J.needsPermissionUpdate,H),N({needsPermissionUpdate:J.needsPermissionUpdate,needsConfigUpdate:H})}}}},[s,d,r]);const A=()=>Object.values(c).some($=>$);O.useEffect(()=>{t==null||t(A())},[c,t]),O.useEffect(()=>{const $=J=>{if(A())return J.preventDefault(),J.returnValue="You have unsaved changes. Are you sure you want to leave?","You have unsaved changes. Are you sure you want to leave?"};return window.addEventListener("beforeunload",$),()=>window.removeEventListener("beforeunload",$)},[c]),O.useEffect(()=>{const $=n.find(H=>H.key===r);if(!$||s[r]!==void 0)return;(async()=>{var H;try{me(r);const te=await fetch(`/@fs${$.path}`);if(!te.ok)throw new Error(`Cannot read ${$.name}`);const Ce=await te.text();if(a(R=>({...R,[r]:Ce})),h(R=>({...R,[r]:Ce})),E(R=>({...R,[r]:!1})),$.key==="config")try{const R=JSON.parse(Ce);(H=R==null?void 0:R.server)!=null&&H.api_key&&localStorage.setItem("api_key",R.server.api_key)}catch{}}catch(te){j(te instanceof Error?te.message:"Failed to load file")}finally{me(null)}})()},[r]);const V=()=>{const $=n.find(te=>te.key===r),J=new Blob([s[r]??""],{type:"application/json"}),H=document.createElement("a");H.href=URL.createObjectURL(J),H.download=$.name,H.click(),URL.revokeObjectURL(H.href)},D=async()=>{try{const $=n.find(H=>H.key===r);if(!(await fetch("/__save_json__",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:$.path,content:s[r]??""})})).ok)throw new Error("Local save helper not running or error saving");L({message:"Saved",type:"success"}),E(H=>({...H,[r]:!1})),h(H=>({...H,[r]:s[r]??""}))}catch{L({message:"Failed to save",type:"error"})}};async function K($,J,H){const te=new AbortController,Ce=setTimeout(()=>te.abort(),H);try{return await fetch($,{...J,signal:te.signal})}finally{clearTimeout(Ce)}}const fe=async()=>{var $,J;try{L({message:"Updating permissions…",type:"success"});const H=n.find(ne=>ne.key===r);console.log(`🔄 Clearing permission caches after ${H.name} save...`);const te=await fetch("/config.json",{cache:"no-cache",headers:{"Cache-Control":"no-cache"}});if(te.ok){const ne=await te.json(),he=(($=ne==null?void 0:ne.server)==null?void 0:$.host)||"localhost",T=(((J=ne==null?void 0:ne.server)==null?void 0:J.port)||3e3)+1,q=await fetch(`http://${he}:${T}/api/permissions-changed`,{method:"POST",headers:{"Content-Type":"application/json"}});if(q.ok){const ve=await q.json();console.log("✅ Cache invalidation successful:",ve)}else console.warn("⚠️ Cache invalidation failed (server may not be running):",q.status)}L({message:"Permissions updated",type:"success"});const Ce=y(),R={...Ce.needsPermissionUpdate,[r]:!1};m(R,Ce.needsConfigUpdate),N({needsPermissionUpdate:R,needsConfigUpdate:Ce.needsConfigUpdate})}catch{L({message:"Failed to update permissions",type:"error"})}},z=async()=>{L({message:"Updating open-edison configuration",type:"success"});try{const $={"Content-Type":"application/json"},J=(()=>{try{return localStorage.getItem("api_key")||""}catch{return""}})();J&&($.Authorization=`Bearer ${J}`);const H=await K("/mcp/reinitialize",{method:"POST",headers:$},1e4);if(!H.ok){const R=await H.json().catch(()=>({}));throw new Error(R.message||`Reinitialize failed (${H.status})`)}L({message:"Configuration updated",type:"success"});const te=y(),Ce={...te.needsConfigUpdate,[r]:!1};m(te.needsPermissionUpdate,Ce),N({needsPermissionUpdate:te.needsPermissionUpdate,needsConfigUpdate:Ce})}catch($){const J=($==null?void 0:$.name)==="AbortError";L({message:J?"Reinitialize timed out after 10s":($==null?void 0:$.message)||"Failed to reinitialize",type:"error"})}},se=n.find($=>$.key===r),Me=s[r]??(U===r?"// Loading…":"");return p.jsxs("div",{className:"card",children:[p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[220px_1fr] gap-3",children:[p.jsxs("div",{className:"border border-app-border rounded p-2 h-[580px] overflow-y-auto bg-app-bg/50",children:[p.jsx("div",{className:"text-xs text-app-muted px-2 pb-2",children:"Files"}),p.jsx("ul",{className:"space-y-1",children:n.map($=>{const J=r===$.key;return p.jsx("li",{children:p.jsxs("button",{className:`w-full text-left px-3 py-2 rounded border transition-colors ${J?"border-app-accent text-app-accent bg-app-accent/10":"border-app-border text-app-text hover:bg-app-border/20"}`,onClick:()=>o($.key),title:$.path,children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{className:"text-sm font-medium truncate",children:$.name}),c[$.key]&&p.jsx("div",{className:"w-2 h-2 bg-orange-500 rounded-full ml-2 flex-shrink-0",title:"File has been edited"})]}),p.jsx("div",{className:"text-[10px] text-app-muted truncate",children:$.path.replace(e,"")||$.path})]})},$.key)})})]}),p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm text-app-muted",children:[p.jsx("span",{children:"Editing:"}),p.jsx("span",{className:"text-app-text",children:se.name}),c[r]&&p.jsxs("div",{className:"flex items-center gap-1 text-orange-500",children:[p.jsx("div",{className:"w-2 h-2 bg-orange-500 rounded-full"}),p.jsx("span",{className:"text-xs",children:"edited"})]})]}),p.jsxs("div",{className:"flex gap-2 items-center",children:[p.jsx("button",{className:`button ${c[r]?"!bg-orange-500 hover:!bg-orange-600 !text-white":""}`,onClick:D,children:"Save"}),p.jsx("button",{className:"button",onClick:V,children:"Download"})]})]}),S&&p.jsx("div",{className:"text-rose-400 text-sm mb-2",children:S}),p.jsx("div",{className:"border border-app-border rounded overflow-hidden",children:p.jsx(Og,{height:"520px",defaultLanguage:"json",language:"json",theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:12,wordWrap:"on",scrollBeyondLastLine:!1},value:Me,onChange:$=>a(J=>({...J,[r]:$??""}))})}),p.jsxs("div",{className:"flex items-center justify-between mt-2",children:[p.jsx("div",{className:"text-xs text-app-muted",children:'Read-only viewer (no direct disk writes). Use Download or Save to persist changes. You need to explicitly click "Update Configuration" for changes in the configuration file and "Update Permissions" for changes in the other files, for these changes to take effect in Open-Edison. '}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx("button",{className:`button text-xs px-2 py-1 ${w.needsPermissionUpdate[r]?"!bg-orange-500 hover:!bg-orange-600 !text-white":""}`,onClick:fe,children:"Update Permissions"}),p.jsx("button",{className:`button text-xs px-2 py-1 ${w.needsConfigUpdate[r]?"!bg-orange-500 hover:!bg-orange-600 !text-white":""}`,onClick:z,children:"Update Configuration"})]})]}),p.jsxs("div",{className:"mt-3 border border-app-border rounded p-3 bg-app-bg/50",children:[p.jsx("div",{className:"text-sm font-semibold mb-1",children:"About this file"}),p.jsx("p",{className:"text-xs text-app-muted whitespace-pre-wrap",children:se.description})]})]})]}),b&&p.jsx("div",{className:`fixed bottom-4 right-4 z-50 p-4 rounded-lg shadow-lg max-w-sm transition-all duration-300 ${b.type==="success"?"bg-green-500 text-white":"bg-red-500 text-white"}`,children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-sm font-medium",children:b.message}),p.jsx("button",{onClick:()=>L(null),className:"ml-3 text-white hover:text-gray-200 text-lg font-bold",children:"×"})]})})]})}function Fg({projectRoot:e}){const[t,n]=O.useState(!0),[r,o]=O.useState(""),[s,a]=O.useState([]),[d,h]=O.useState(null),[c,E]=O.useState(null),[S,j]=O.useState(null),[b,L]=O.useState(null),[U,me]=O.useState(!1),[y,m]=O.useState(null),[w,N]=O.useState("section"),[A,V]=O.useState(!1),[D,K]=O.useState({}),[fe,z]=O.useState({}),[se,Me]=O.useState({});O.useEffect(()=>{if(y){const g=setTimeout(()=>{m(null)},1e4);return()=>clearTimeout(g)}},[y]);const[$,J]=O.useState(null),[H,te]=O.useState(null),[Ce,R]=O.useState({}),[ne,he]=O.useState(!1),[T,q]=O.useState(""),[ve,be]=O.useState(!1),[Oe,Pe]=O.useState(!1),[ae,Qe]=O.useState(""),[ut,Je]=O.useState(!1);O.useEffect(()=>{try{const g=localStorage.getItem("cm_view_mode");(g==="section"||g==="tiles")&&N(g)}catch{}},[]),O.useEffect(()=>{try{localStorage.setItem("cm_view_mode",w)}catch{}},[w]),O.useEffect(()=>{const g=(d==null?void 0:d["edison-watch-api-key"])||"";q(g)},[d]),O.useEffect(()=>{var x;const g=((x=d==null?void 0:d.server)==null?void 0:x.api_key)||"";Qe(g)},[d]),O.useEffect(()=>{var g;if((g=d==null?void 0:d.server)!=null&&g.api_key)try{localStorage.setItem("api_key",d.server.api_key)}catch{}},[d]),O.useEffect(()=>{const g=()=>{try{const B=localStorage.getItem("json_editor_needs_config_update");if(B){const ie=JSON.parse(B);V(!!ie.config)}}catch{}};g();const x=setInterval(g,1e3);return()=>clearInterval(x)},[]);const[ct,$e]=O.useState(null),[Se,Re]=O.useState(null),[Ye,Ae]=O.useState(null),[Lt,Hr]=O.useState(null);O.useEffect(()=>{if(console.log("🔄 Autosave useEffect triggered"),console.log("🔄 toolPerms:",c),console.log("🔄 origToolPerms:",Se),c&&Se){const g=JSON.stringify(c),x=JSON.stringify(Se);console.log("🔄 Current JSON:",g),console.log("🔄 Original JSON:",x),console.log("🔄 Are they different?",g!==x),g!==x?(console.log("🔄 Tool permissions changed, triggering autosave"),setTimeout(()=>Jr(),0)):console.log("🔄 No changes detected, skipping autosave")}else console.log("🔄 Missing data, skipping autosave")},[c,Se]),O.useEffect(()=>{S&&Ye&&JSON.stringify(S)!==JSON.stringify(Ye)&&Jr()},[S,Ye]),O.useEffect(()=>{b&&Lt&&JSON.stringify(b)!==JSON.stringify(Lt)&&Jr()},[b,Lt]);const Vn="config.json",cr="tool_permissions.json",vn="resource_permissions.json",Qr="prompt_permissions.json";O.useEffect(()=>{let g=!0;return(async()=>{n(!0),o("");try{const[B,ie,W,re]=await Promise.all([fetch(`/@fs${e}/${Vn}`,{cache:"no-cache",headers:{"Cache-Control":"no-cache"}}),fetch(`/@fs${e}/${cr}`,{cache:"no-cache",headers:{"Cache-Control":"no-cache"}}),fetch(`/@fs${e}/${vn}`,{cache:"no-cache",headers:{"Cache-Control":"no-cache"}}),fetch(`/@fs${e}/${Qr}`,{cache:"no-cache",headers:{"Cache-Control":"no-cache"}})]);if(!B.ok)throw new Error("Failed to load config.json");if(!ie.ok)throw new Error("Failed to load tool_permissions.json");if(!W.ok)throw new Error("Failed to load resource_permissions.json");if(!re.ok)throw new Error("Failed to load prompt_permissions.json");const Y=await B.json(),Z=await ie.json(),C=await W.json(),ce=await re.json();if(!g)return;const I=Array.isArray(Y==null?void 0:Y.mcp_servers)?Y.mcp_servers.map(G=>String(G.name||"").trim()):[],ue=G=>Object.keys(G||{}).filter(ke=>ke!=="_metadata"&&ke!=="builtin"),X=new Set([...ue(Z),...ue(C),...ue(ce)].map(G=>String(G||"").trim())),oe=I.map(G=>({name:G,tools:Z==null?void 0:Z[G],resources:C==null?void 0:C[G],prompts:ce==null?void 0:ce[G]}));for(const G of Array.from(X))I.map(ke=>ke.toLowerCase()).includes(G.toLowerCase())||oe.push({name:G,tools:Z==null?void 0:Z[G],resources:C==null?void 0:C[G],prompts:ce==null?void 0:ce[G]});a(oe),h(Y),$e(Y),E(Z),j(C),L(ce),Re(Z),Ae(C),Hr(ce)}catch(B){if(!g)return;o(B instanceof Error?B.message:"Failed to load data")}finally{g&&n(!1)}})(),()=>{g=!1}},[e]);function Kr(g,x){const B=g.mcp_servers||[],ie=x.mcp_servers||[],W=B.map(C=>({...C}));for(const C of ie){const ce=W.findIndex(I=>I.name===C.name);if(ce===-1)W.push(C);else{const I=W[ce];Ts(I,C)||(W[ce]=C)}}const re={...g,mcp_servers:W},Y=x==null?void 0:x["edison-watch-api-key"],Z=g==null?void 0:g["edison-watch-api-key"];return Y!==Z&&(re["edison-watch-api-key"]=Y),re}function Ts(g,x){const B=g.env||{},ie=x.env||{},W=g.args||[],re=x.args||[];return g.name===x.name&&g.command===x.command&&JSON.stringify(W)===JSON.stringify(re)&&JSON.stringify(B)===JSON.stringify(ie)&&!!g.enabled==!!x.enabled}function Yt(g,x,B,ie){var Z;const W=Dt(g),re={};for(const C of B){const ce=C[ie];ce&&(re[C.name]=ce)}const Y=C=>({enabled:!!(C!=null&&C.enabled),write_operation:!!(C!=null&&C.write_operation),read_private_data:!!(C!=null&&C.read_private_data),read_untrusted_public_data:!!(C!=null&&C.read_untrusted_public_data),...(C==null?void 0:C.acl)&&{acl:C.acl}});for(const[C,ce]of Object.entries(x))if(C!=="_metadata")for(const[I,ue]of Object.entries(ce)){const X=g[C]||{},we=Object.prototype.hasOwnProperty.call(X,I)?X[I]:(Z=re[C])==null?void 0:Z[I];we?Wn(ue,we)||(W[C]||(W[C]={}),W[C][I]=Y(ue)):(ue.enabled||ue.write_operation||ue.read_private_data||ue.read_untrusted_public_data||ue.acl)&&(W[C]||(W[C]={}),W[C][I]=Y(ue))}return W}function Wn(g,x){return!!(g!=null&&g.enabled)==!!(x!=null&&x.enabled)&&!!(g!=null&&g.write_operation)==!!(x!=null&&x.write_operation)&&!!(g!=null&&g.read_private_data)==!!(x!=null&&x.read_private_data)&&!!(g!=null&&g.read_untrusted_public_data)==!!(x!=null&&x.read_untrusted_public_data)&&(g==null?void 0:g.acl)===(x==null?void 0:x.acl)}function Dt(g){return JSON.parse(JSON.stringify(g))}const qn=async(g,x)=>{try{const B=[...(d==null?void 0:d.mcp_servers)||[]],ie=B.findIndex(ce=>(ce.name||"").trim().toLowerCase()===g.toLowerCase()),W=ie>=0?B[ie]:void 0,re={name:g,command:(W==null?void 0:W.command)??"",args:(W==null?void 0:W.args)??[],env:(W==null?void 0:W.env)??{},enabled:x,roots:(W==null?void 0:W.roots)??[]},Y=[...B];ie===-1?Y.push(re):Y[ie]=re;const Z={...d||{mcp_servers:[]},mcp_servers:Y};if(h(Z),!(await fetch("/__save_json__",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"config.json",content:JSON.stringify(Z,null,4)})})).ok)throw new Error("Save failed");$e(Z),console.log(`✅ Auto-saved config.json after toggling ${g} to ${x}`);try{const ce=localStorage.getItem("json_editor_needs_config_update"),I=ce?JSON.parse(ce):{};I.config=!0,localStorage.setItem("json_editor_needs_config_update",JSON.stringify(I))}catch{}}catch(B){console.warn("⚠️ Failed to auto-save config.json on toggle:",B)}},Zo=async g=>{var x,B;me(!0),m(null);try{const ie=(I,ue)=>fetch("/__save_json__",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:I,content:ue})}),W=g&&ct&&d?Kr(ct,d):d,re=g&&c&&Se?Yt(Se,c,s,"tools"):c,Y=g&&S&&Ye?Yt(Ye,S,s,"resources"):S,Z=g&&b&&Lt?Yt(Lt,b,s,"prompts"):b;if((await Promise.all([ie(Vn,JSON.stringify(W,null,4)),ie(cr,JSON.stringify(re,null,4)),ie(vn,JSON.stringify(Y,null,4)),ie(Qr,JSON.stringify(Z,null,4))])).find(I=>!I.ok))throw new Error("One or more files failed to save");console.log("🔄 Clearing permission caches after configuration save...");try{const I=((x=d==null?void 0:d.server)==null?void 0:x.host)||"localhost",ue=(((B=d==null?void 0:d.server)==null?void 0:B.port)||3e3)+1,X=await fetch(`http://${I}:${ue}/api/permissions-changed`,{method:"POST",headers:{"Content-Type":"application/json"}});if(X.ok){const oe=await X.json();console.log("✅ Cache invalidation successful:",oe)}else console.warn("⚠️ Cache invalidation failed (server may not be running):",X.status)}catch(I){console.warn("⚠️ Cache invalidation failed (server may not be running):",I)}m({message:g?"Saved changes":"Saved",type:"success"});try{const I=localStorage.getItem("json_editor_needs_permission_update");if(I){const X={...JSON.parse(I),tool:!1,resource:!1,prompt:!1};localStorage.setItem("json_editor_needs_permission_update",JSON.stringify(X))}}catch{}}catch(ie){m({message:ie instanceof Error?ie.message:"Save failed",type:"error"})}finally{me(!1)}},ei=async()=>{try{console.log("🔄 Starting autosave..."),console.log("🔄 Before autosave - toolPerms:",c),console.log("🔄 Before autosave - origToolPerms:",Se),await Zo(!0),Re(c),Ae(S),Hr(b),console.log("🔄 After autosave - Updated origToolPerms to match current state"),m({message:"Changes saved",type:"success"})}catch(g){console.error("Auto-save failed:",g)}},Jr=(()=>{let g=null;return()=>{g&&clearTimeout(g),g=setTimeout(()=>{ei()},500)}})();async function Ls(g,x,B){const ie=new AbortController,W=setTimeout(()=>ie.abort(),B);try{return await fetch(g,{...x,signal:ie.signal})}finally{clearTimeout(W)}}const $s=async()=>{var g;me(!0),m(null);try{console.log("🔄 Saving configuration changes...");const x=(G,ke)=>fetch("/__save_json__",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:G,content:ke})}),B=ct&&d?Kr(ct,d):d,ie=c&&Se?Yt(Se,c,s,"tools"):c,W=S&&Ye?Yt(Ye,S,s,"resources"):S,re=b&&Lt?Yt(Lt,b,s,"prompts"):b;if((await Promise.all([x(Vn,JSON.stringify(B,null,4)),x(cr,JSON.stringify(ie,null,4)),x(vn,JSON.stringify(W,null,4)),x(Qr,JSON.stringify(re,null,4))])).find(G=>!G.ok))throw new Error("One or more files failed to save");console.log("✅ Configuration saved successfully"),m({message:"Saved. Reinitializing servers…",type:"success"}),console.log("🔄 Clearing permission caches...");try{const G=await fetch("/api/permissions-changed",{method:"POST",headers:{"Content-Type":"application/json"}});if(G.ok){const ke=await G.json();console.log("✅ Cache invalidation successful:",ke)}else console.warn("⚠️ Cache invalidation failed (server may not be running):",G.status)}catch(G){console.warn("⚠️ Cache invalidation failed (server may not be running):",G)}console.log("🔄 Reinitializing MCP servers...");const C={"Content-Type":"application/json"},I=(()=>{try{return localStorage.getItem("api_key")||""}catch{return""}})()||((g=d==null?void 0:d.server)==null?void 0:g.api_key)||"";I&&(C.Authorization=`Bearer ${I}`);const ue=await Ls("/mcp/reinitialize",{method:"POST",headers:C},1e4);if(!ue.ok){const G=await ue.json().catch(()=>({}));throw new Error(G.message||`Reinitialize failed (${ue.status})`)}const X=await ue.json();console.log("✅ MCP servers reinitialized successfully:",X);const oe=X.total_final_mounted||0,we=Array.isArray(X.mounted_servers)?X.mounted_servers.join(", "):"";m({message:`Saved and reinitialized ${oe} servers${we?`: ${we}`:""}`,type:"success"}),console.log("🔐 Refreshing OAuth status after reinitialization..."),await fr();try{const G=localStorage.getItem("json_editor_needs_config_update");if(G){const Gt={...JSON.parse(G),config:!1};localStorage.setItem("json_editor_needs_config_update",JSON.stringify(Gt))}}catch{}}catch(x){console.error("❌ Failed to save and reinitialize:",x);const ie=(x==null?void 0:x.name)==="AbortError"?"Reinitialize timed out after 10s":x instanceof Error?x.message:"Save and reinitialize failed";m({message:ie,type:"error"})}finally{me(!1)}};async function ye(g){m(null),te(g);try{const x=((d==null?void 0:d.mcp_servers)||[]).find(C=>(C.name||"").trim().toLowerCase()===g.toLowerCase());if(!x)throw new Error("Server not found in config.json");const B={name:x.name,command:x.command||"",args:Array.isArray(x.args)?x.args:[],env:x.env||{},roots:Array.isArray(x.roots)?x.roots:void 0,timeout_s:20},ie={"Content-Type":"application/json"},W=(()=>{try{return localStorage.getItem("api_key")||""}catch{return""}})();W&&(ie.Authorization=`Bearer ${W}`);const re=await fetch("/mcp/validate",{method:"POST",headers:ie,body:JSON.stringify(B)}),Y=await re.json();if(!re.ok||(Y==null?void 0:Y.valid)===!1){const C=Y&&typeof Y.error=="string"?Y.error:`Validate failed (${re.status})`;throw new Error(C)}const Z=C=>({enabled:!1,write_operation:!1,read_private_data:!1,read_untrusted_public_data:!1,description:C,acl:"PUBLIC"});E(C=>{const ce={...C||{}},I=ce[g]||{};for(const ue of Y.tools||[]){const X=kt(String(ue.name||""),g);I[X]||(I[X]=Z(ue.description))}return ce[g]=I,ce}),j(C=>{const ce={...C||{}},I=ce[g]||{};for(const ue of Y.resources||[]){const X=ue.uri;I[X]||(I[X]=Z(ue.description))}return ce[g]=I,ce}),L(C=>{const ce={...C||{}},I=ce[g]||{};for(const ue of Y.prompts||[]){const X=kt(String(ue.name||""),g);I[X]||(I[X]=Z(ue.description))}return ce[g]=I,ce}),m({message:"Imported initial permissions from validation (not yet saved)",type:"success"}),R(C=>{const ce={...C};return delete ce[g],ce})}catch(x){const B=x instanceof Error?x.message:"Validation failed";R(ie=>({...ie,[g]:B}))}finally{te(null)}}async function ti(g){await ye(g),await qn(g,!0),m({message:"Quick-start: imported permissions and enabled",type:"success"})}const Yr=globalThis.__AUTOCONFIG_URL__||"https://api.edison.watch/api/config-perms";function dr(g,x){if(!g)return[];const B=g[x]||{};return Object.keys(B).filter(ie=>ie!=="_metadata")}function kt(g,x){const B=`${x}_`;return g.toLowerCase().startsWith(B.toLowerCase())?g.slice(B.length):g}async function Ms(g){try{const x=dr(c,g),B=dr(S,g),ie=dr(b,g);if(x.length===0&&B.length===0&&ie.length===0){m({message:"No known tools/resources/prompts for this server",type:"error"});return}const W={"Content-Type":"application/json"},re=(d==null?void 0:d["edison-watch-api-key"])||"";if(!re||re==="change-me"){m({message:"Autoconfig requires an Edison Watch API key. Enter it in Configuration and try again.",type:"error"});return}W["X-API-KEY"]=re;const Y={server:g,tools:x.map(X=>kt(X,g)),resources:B,prompts:ie.map(X=>kt(X,g))},Z=await fetch(Yr,{method:"POST",headers:W,body:JSON.stringify(Y),mode:"cors"});if(!Z.ok){const X=await Z.text().catch(()=>""),oe=Z.status===401?"Autoconfig unauthorized. Check your Edison Watch API key.":"";m({message:`Autoconfig failed (${Z.status})${oe?` - ${oe}`:X?` - ${X}`:""}`,type:"error"});return}let C=null;try{C=await Z.json()}catch{}if(!C){m({message:"Autoconfig succeeded (no payload)",type:"success"});return}const ce=C.tools,I=C.resources,ue=C.prompts;ce&&E(X=>{const oe={...X||{}},we={...oe[g]||{}};for(const[G,ke]of Object.entries(ce)){const Gt=kt(String(G),g);we[Gt]=ke}return oe[g]=we,oe}),I&&j(X=>{const oe={...X||{}},we={...oe[g]||{}};for(const[G,ke]of Object.entries(I))we[G]=ke;return oe[g]=we,oe}),ue&&L(X=>{const oe={...X||{}},we={...oe[g]||{}};for(const[G,ke]of Object.entries(ue)){const Gt=kt(String(G),g);we[Gt]=ke}return oe[g]=we,oe}),m({message:"Autoconfig applied (not yet saved)",type:"success"})}catch(x){console.warn("Autoconfig request error:",x),m({message:"Autoconfig failed",type:"error"})}}const Xt=async()=>{if(d){be(!0);try{const g={...d,"edison-watch-api-key":T};if(!(await fetch("/__save_json__",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"config.json",content:JSON.stringify(g,null,4)})})).ok)throw new Error("Save failed");h(g),$e(g),m({message:"API key saved",type:"success"})}catch{m({message:"Failed to save API key",type:"error"})}finally{be(!1)}}},ni=async()=>{if(d){Je(!0);try{const g={...d,server:{...d.server,api_key:ae}};if(!(await fetch("/__save_json__",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"config.json",content:JSON.stringify(g,null,4)})})).ok)throw new Error("Save failed");h(g),$e(g),m({message:"Open Edison API key saved",type:"success"})}catch{m({message:"Failed to save Open Edison API key",type:"error"})}finally{Je(!1)}}},fr=async()=>{if(d)try{const g=d.server.host||"localhost",x=(d.server.port||3e3)+1,ie={Accept:"application/json",Authorization:`Bearer ${d.server.api_key||""}`},W=await fetch(`http://${g}:${x}/mcp/oauth/status`,{method:"GET",headers:ie});if(W.ok){const re=await W.json();K(re.oauth_status)}}catch(g){console.warn("Failed to load OAuth status:",g)}},Xr=async g=>{if(d){z(x=>({...x,[g]:!0})),Me(x=>{const B={...x};return delete B[g],B});try{const x=d.server.host||"localhost",B=(d.server.port||3e3)+1,W={"Content-Type":"application/json",Authorization:`Bearer ${d.server.api_key||""}`},re={},Y=await fetch(`http://${x}:${B}/mcp/oauth/test-connection/${g}`,{method:"POST",headers:W,body:JSON.stringify(re)});if(Y.ok){const Z=await Y.json();m({message:Z.message,type:"success"}),setTimeout(fr,1e3)}else{const Z=await Y.json().catch(()=>({}));throw new Error(Z.detail||`Connection test failed (${Y.status})`)}}catch(x){const B=x instanceof Error?x.message:"Connection test failed";Me(ie=>({...ie,[g]:B})),m({message:B,type:"error"})}finally{z(x=>({...x,[g]:!1}))}}},Q=async g=>{if(d){z(x=>({...x,[g]:!0}));try{const x=d.server.host||"localhost",B=(d.server.port||3e3)+1,W={Authorization:`Bearer ${d.server.api_key||""}`},re=await fetch(`http://${x}:${B}/mcp/oauth/tokens/${g}`,{method:"DELETE",headers:W});if(re.ok){const Y=await re.json();m({message:Y.message,type:"success"}),K(Z=>({...Z,[g]:{server_name:g,status:"needs_auth",has_refresh_token:!1,token_expires_at:null,...Z[g]}}))}else{const Y=await re.json().catch(()=>({}));throw new Error(Y.detail||`Failed to clear tokens (${re.status})`)}}catch(x){const B=x instanceof Error?x.message:"Failed to clear tokens";m({message:B,type:"error"})}finally{z(x=>({...x,[g]:!1}))}}},ri=async g=>{if(d){z(x=>({...x,[g]:!0}));try{const x=d.server.host||"localhost",B=(d.server.port||3e3)+1,W={"Content-Type":"application/json",Authorization:`Bearer ${d.server.api_key||""}`},re=await fetch(`http://${x}:${B}/mcp/oauth/refresh/${g}`,{method:"POST",headers:W});if(re.ok){const Y=await re.json();K(Z=>({...Z,[g]:{server_name:g,status:Y.oauth_status,error_message:Y.error_message,has_refresh_token:Y.has_refresh_token,token_expires_at:Y.token_expires_at,scopes:Y.scopes}})),m({message:"OAuth status refreshed",type:"success"})}else{const Y=await re.json().catch(()=>({}));throw new Error(Y.detail||`Failed to refresh status (${re.status})`)}}catch(x){const B=x instanceof Error?x.message:"Failed to refresh OAuth status";m({message:B,type:"error"})}finally{z(x=>({...x,[g]:!1}))}}},Gr=g=>{var x,B;return g.command==="npx"&&((x=g.args)==null?void 0:x.length)>=3&&g.args[1]==="mcp-remote"&&((B=g.args[2])==null?void 0:B.startsWith("https://"))};O.useEffect(()=>{d&&!t&&fr()},[d,t]);const mt=g=>{switch(g){case"authenticated":return"text-green-500";case"needs_auth":return"text-yellow-500";case"error":return"text-red-500";case"not_required":return"text-gray-400";default:return"text-gray-400"}},Zr=g=>{switch(g){case"authenticated":return"🔐";case"needs_auth":return"⚠️";case"error":return"❌";case"not_required":return"🔓";default:return"❓"}},Hn=g=>g?Object.keys(g).filter(x=>x!=="_metadata").length:0,pr=g=>({tools:Hn(c==null?void 0:c[g]),resources:Hn(S==null?void 0:S[g]),prompts:Hn(b==null?void 0:b[g])}),vt=(g,x,B,ie=!1,W=!0)=>{if(!x)return null;const re=Object.entries(x).filter(([C])=>C!=="_metadata"),Y=C=>{var ce,I;return!!((I=(ce=d==null?void 0:d.mcp_servers)==null?void 0:ce.find(ue=>ue.name===C))!=null&&I.enabled)},Z=p.jsxs("div",{className:"space-y-2",children:[re.length===0&&p.jsx("div",{className:"text-xs text-app-muted",children:"No entries"}),re.map(([C,ce])=>p.jsx("div",{className:"border border-app-border rounded p-2",children:W?p.jsxs("details",{open:Y(C),children:[p.jsx("summary",{className:"text-xs text-app-muted cursor-pointer select-none",children:C}),p.jsx("div",{className:"mt-2 grid grid-cols-1 sm:grid-cols-2 gap-2",children:Object.entries(ce).map(([I,ue])=>p.jsxs("div",{className:"border border-app-border rounded p-2 bg-app-bg/50",children:[p.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p.jsx("div",{className:"font-medium text-sm truncate",title:`${C}.${I}`,children:I}),p.jsxs("div",{className:"text-xs flex items-center gap-2",children:[p.jsx(vr,{checked:!!ue.enabled,onChange:X=>{console.log(`🔄 Toggle raw values: flags.enabled=${ue.enabled}, !!flags.enabled=${!!ue.enabled}, new value=${X}`),console.log(`🔄 Toggle changed: ${C}.${I}.enabled = ${X}`),console.log("🔄 Current flags:",ue),B(oe=>{var ke;const we=((ke=oe[C])==null?void 0:ke[I])||{},G={...oe,[C]:{...oe[C],[I]:{...we,enabled:X}}};return console.log(`🔄 New data for ${C}.${I}:`,G[C][I]),G})}}),p.jsx("span",{children:ue.enabled?"Enabled":"Disabled"})]})]}),p.jsx("div",{className:"text-xs text-app-muted mt-1",children:ue.description||"No description provided"}),p.jsxs("div",{className:"mt-2 grid grid-cols-1 gap-2",children:[p.jsxs("label",{className:"text-xs flex items-center gap-2 border border-app-border rounded px-2 py-1 bg-app-bg/50",children:[p.jsx("input",{type:"checkbox",className:"accent-blue-500",checked:!!ue.write_operation,onChange:X=>{console.log(`🔄 Checkbox changed: ${C}.${I}.write_operation = ${X.target.checked}`),B(oe=>{var G;const we=((G=oe[C])==null?void 0:G[I])||{};return{...oe,[C]:{...oe[C],[I]:{...we,write_operation:X.target.checked}}}})}}),p.jsx("span",{children:"write_operation"})]}),p.jsxs("label",{className:"text-xs flex items-center gap-2 border border-app-border rounded px-2 py-1 bg-app-bg/50",children:[p.jsx("input",{type:"checkbox",className:"accent-blue-500",checked:!!ue.read_private_data,onChange:X=>{console.log(`🔄 Checkbox changed: ${C}.${I}.read_private_data = ${X.target.checked}`),B(oe=>{var G;const we=((G=oe[C])==null?void 0:G[I])||{};return{...oe,[C]:{...oe[C],[I]:{...we,read_private_data:X.target.checked}}}})}}),p.jsx("span",{children:"read_private_data"})]}),p.jsxs("label",{className:"text-xs flex items-center gap-2 border border-app-border rounded px-2 py-1 bg-app-bg/50",children:[p.jsx("input",{type:"checkbox",className:"accent-blue-500",checked:!!ue.read_untrusted_public_data,onChange:X=>{console.log(`🔄 Checkbox changed: ${C}.${I}.read_untrusted_public_data = ${X.target.checked}`),B(oe=>{var G;const we=((G=oe[C])==null?void 0:G[I])||{};return{...oe,[C]:{...oe[C],[I]:{...we,read_untrusted_public_data:X.target.checked}}}})}}),p.jsx("span",{children:"read_untrusted_public_data"})]}),p.jsxs("div",{className:"text-xs border border-app-border rounded px-2 py-1 bg-app-bg/50 flex items-center justify-between",children:[p.jsx("label",{className:"text-xs text-app-muted mr-2",children:"Access level"}),p.jsxs("select",{className:"text-xs bg-app-bg border border-app-border rounded px-2 py-1",value:ue.acl??"PUBLIC",onChange:X=>{const oe=X.target.value||"PUBLIC";console.log(`🔄 Select changed: ${C}.${I}.acl = ${oe}`),B(we=>{var ke;const G=((ke=we[C])==null?void 0:ke[I])||{};return{...we,[C]:{...we[C],[I]:{...G,acl:oe}}}})},children:[p.jsx("option",{value:"PUBLIC",children:"PUBLIC"}),p.jsx("option",{value:"PRIVATE",children:"PRIVATE"}),p.jsx("option",{value:"SECRET",children:"SECRET"})]})]})]}),!(c!=null&&c[C])&&!(S!=null&&S[C])&&!(b!=null&&b[C])&&p.jsx("div",{className:"mt-2",children:p.jsx("button",{className:"button",onClick:()=>ye(C),children:"Validate & import"})})]},I))})]}):p.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:Object.entries(ce).map(([I,ue])=>p.jsxs("div",{className:"border border-app-border rounded p-2 bg-app-bg/50",children:[p.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p.jsx("div",{className:"font-medium text-sm truncate",title:`${C}.${I}`,children:I}),p.jsxs("div",{className:"text-xs flex items-center gap-2",children:[p.jsx(vr,{checked:!!ue.enabled,onChange:X=>{console.log(`🔄 Toggle raw values (non-collapsible): flags.enabled=${ue.enabled}, !!flags.enabled=${!!ue.enabled}, new value=${X}`),console.log(`🔄 Toggle changed (non-collapsible): ${C}.${I}.enabled = ${X}`),console.log("🔄 Current flags (non-collapsible):",ue),B(oe=>{var ke;const we=((ke=oe[C])==null?void 0:ke[I])||{},G={...oe,[C]:{...oe[C],[I]:{...we,enabled:X}}};return console.log(`🔄 New data for ${C}.${I} (non-collapsible):`,G[C][I]),G})}}),p.jsx("span",{children:ue.enabled?"Enabled":"Disabled"})]})]}),p.jsx("div",{className:"text-xs text-app-muted mt-1",children:ue.description||"No description provided"}),p.jsxs("div",{className:"mt-2 grid grid-cols-1 gap-2",children:[p.jsxs("label",{className:"text-xs flex items-center gap-2 border border-app-border rounded px-2 py-1 bg-app-bg/50",children:[p.jsx("input",{type:"checkbox",className:"accent-blue-500",checked:!!ue.write_operation,onChange:X=>{console.log(`🔄 Checkbox changed (non-collapsible): ${C}.${I}.write_operation = ${X.target.checked}`),B(oe=>{var G;const we=((G=oe[C])==null?void 0:G[I])||{};return{...oe,[C]:{...oe[C],[I]:{...we,write_operation:X.target.checked}}}})}}),p.jsx("span",{children:"write_operation"})]}),p.jsxs("label",{className:"text-xs flex items-center gap-2 border border-app-border rounded px-2 py-1 bg-app-bg/50",children:[p.jsx("input",{type:"checkbox",className:"accent-blue-500",checked:!!ue.read_private_data,onChange:X=>{console.log(`🔄 Checkbox changed (non-collapsible): ${C}.${I}.read_private_data = ${X.target.checked}`),B(oe=>{var G;const we=((G=oe[C])==null?void 0:G[I])||{};return{...oe,[C]:{...oe[C],[I]:{...we,read_private_data:X.target.checked}}}})}}),p.jsx("span",{children:"read_private_data"})]}),p.jsxs("label",{className:"text-xs flex items-center gap-2 border border-app-border rounded px-2 py-1 bg-app-bg/50",children:[p.jsx("input",{type:"checkbox",className:"accent-blue-500",checked:!!ue.read_untrusted_public_data,onChange:X=>{console.log(`🔄 Checkbox changed (non-collapsible): ${C}.${I}.read_untrusted_public_data = ${X.target.checked}`),B(oe=>{var G;const we=((G=oe[C])==null?void 0:G[I])||{};return{...oe,[C]:{...oe[C],[I]:{...we,read_untrusted_public_data:X.target.checked}}}})}}),p.jsx("span",{children:"read_untrusted_public_data"})]}),p.jsxs("div",{className:"text-xs border border-app-border rounded px-2 py-1 bg-app-bg/50 flex items-center justify-between",children:[p.jsx("label",{className:"text-xs text-app-muted mr-2",children:"Access level"}),p.jsxs("select",{className:"text-xs bg-app-bg border border-app-border rounded px-2 py-1",value:ue.acl??"PUBLIC",onChange:X=>{const oe=X.target.value||"PUBLIC";console.log(`🔄 Select changed (non-collapsible): ${C}.${I}.acl = ${oe}`),B(we=>{var ke;const G=((ke=we[C])==null?void 0:ke[I])||{};return{...we,[C]:{...we[C],[I]:{...G,acl:oe}}}})},children:[p.jsx("option",{value:"PUBLIC",children:"PUBLIC"}),p.jsx("option",{value:"PRIVATE",children:"PRIVATE"}),p.jsx("option",{value:"SECRET",children:"SECRET"})]})]})]})]},I))})},C))]});return p.jsx("div",{className:"card",children:ie?p.jsxs("details",{open:!0,children:[p.jsx("summary",{className:"text-sm font-semibold cursor-pointer select-none",children:g}),p.jsx("div",{className:"mt-2",children:Z})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"text-sm font-semibold mb-2",children:g}),Z]})})};return t?p.jsx("div",{className:"card",children:"Loading…"}):r?p.jsx("div",{className:"card danger",children:r}):d?p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"card",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-semibold",children:"Servers"}),p.jsx("div",{className:"text-xs text-app-muted",children:"Click a tile to edit. Toggle enable and set API keys as needed."})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"hidden sm:flex border border-app-border rounded overflow-hidden",children:[p.jsx("button",{className:`px-3 py-1 text-xs ${w==="section"?"text-app-accent border-r border-app-border bg-app-accent/10":""}`,onClick:()=>N("section"),children:"Section"}),p.jsx("button",{className:`px-3 py-1 text-xs ${w==="tiles"?"text-app-accent bg-app-accent/10":""}`,onClick:()=>N("tiles"),children:"Tiles"})]}),p.jsx("button",{className:`button ${A?"!bg-orange-500 hover:!bg-orange-600 !text-white":""}`,disabled:U,onClick:$s,children:U?"Saving and reinitializing…":"Reinitialize"})]})]}),w==="section"?p.jsx("div",{className:"mt-3 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:Array.from(new Set([...(d.mcp_servers||[]).map(g=>(g.name||"").trim()),...s.map(g=>(g.name||"").trim())])).map(g=>{const x=s.find(W=>(W.name||"").trim().toLowerCase()===g.toLowerCase())||{name:g},B=(d.mcp_servers||[]).find(W=>(W.name||"").trim().toLowerCase()===g.toLowerCase()),ie=!!(B!=null&&B.enabled);return p.jsx("div",{className:"border border-app-border rounded p-3 bg-app-bg/50",children:p.jsxs("details",{open:!0,children:[p.jsxs("summary",{className:"flex items-start justify-between gap-2 cursor-pointer select-none",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"font-semibold",children:x.name}),(()=>{var C;const W=(d.mcp_servers||[]).find(ce=>(ce.name||"").trim().toLowerCase()===x.name.toLowerCase());if(!W||!Gr(W))return null;const re=((C=D[x.name])==null?void 0:C.status)||"unknown",Y=Zr(re),Z=mt(re);return re!=="unknown"&&re!=="not_required"?p.jsx("span",{className:`text-sm ${Z}`,title:`OAuth status: ${re}`,children:Y}):null})()]}),(()=>{const W=pr(x.name),re=Ce[x.name];return p.jsxs("div",{className:"text-xs mt-0.5",children:[p.jsxs("span",{className:"text-app-muted",children:[W.tools," tools · ",W.resources," resources · ",W.prompts," prompts"]}),H===x.name&&p.jsx("span",{className:"ml-2 text-app-muted",children:"(validating…)"}),re&&p.jsx("div",{className:"text-rose-400 mt-1",children:re})]})})(),(()=>{var Z,C,ce;const W=(d.mcp_servers||[]).find(I=>(I.name||"").trim().toLowerCase()===x.name.toLowerCase());if(!W||!Gr(W))return null;const re=(Z=D[x.name])==null?void 0:Z.status,Y=((C=D[x.name])==null?void 0:C.error_message)||se[x.name];if(Y)return p.jsxs("div",{className:"text-xs text-red-400 mt-1",children:["OAuth: ",Y]});if(re==="needs_auth")return p.jsx("div",{className:"text-xs text-yellow-500 mt-1",children:"OAuth authentication required"});if(re==="authenticated"){const I=(ce=D[x.name])==null?void 0:ce.token_expires_at;return I?p.jsxs("div",{className:"text-xs text-green-500 mt-1",children:["OAuth authenticated (expires: ",new Date(I).toLocaleDateString(),")"]}):p.jsx("div",{className:"text-xs text-green-500 mt-1",children:"OAuth authenticated"})}return null})()]}),p.jsxs("div",{className:"text-xs flex items-center gap-2",children:[p.jsx(vr,{checked:ie,onChange:W=>qn(x.name,W)}),p.jsx("span",{children:ie?"Enabled":"Disabled"})]})]}),p.jsxs("div",{className:"mt-2",children:[p.jsxs("details",{className:"mt-2",children:[p.jsx("summary",{className:"text-xs cursor-pointer",children:"Command"}),p.jsx("div",{className:"text-xs font-mono mt-1",children:B?p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-app-muted",children:"cmd:"})," ",(B.command??"").trim()||"(not set)"]}),p.jsxs("div",{children:[p.jsx("span",{className:"text-app-muted",children:"args:"})," ",(Array.isArray(B.args)?B.args:[]).join(" ")]})]}):p.jsx("div",{className:"text-app-muted",children:"Not configured"})})]}),p.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[p.jsx("button",{className:"button",onClick:()=>ye(x.name),children:"Validate & import"}),p.jsx("button",{className:"button",onClick:()=>ti(x.name),children:"Quick start"}),(()=>{const W=pr(x.name);return ie&&W.tools+W.resources+W.prompts>0?p.jsx("button",{className:"button",onClick:()=>Ms(x.name),children:"Autoconfig"}):null})(),(()=>{var Z;const W=(d.mcp_servers||[]).find(C=>(C.name||"").trim().toLowerCase()===x.name.toLowerCase());if(!W||!Gr(W))return null;const re=(Z=D[x.name])==null?void 0:Z.status,Y=fe[x.name];return re==="needs_auth"?p.jsx("button",{className:"button",onClick:()=>Xr(x.name),disabled:Y,title:"Test connection and authorize OAuth if needed",children:Y?"Testing...":"🔗 Test Connection"}):re==="authenticated"?p.jsxs("div",{className:"flex gap-2",children:[p.jsx("button",{className:"button",onClick:()=>ri(x.name),disabled:Y,title:"Refresh OAuth status",children:Y?"Refreshing...":"🔄 Refresh OAuth"}),p.jsx("button",{className:"button",onClick:()=>Q(x.name),disabled:Y,title:"Clear stored OAuth tokens",children:Y?"Clearing...":"🗑️ Clear Tokens"})]}):re==="error"||re==="expired"?p.jsxs("div",{className:"flex gap-2",children:[p.jsx("button",{className:"button",onClick:()=>ri(x.name),disabled:Y,title:"Refresh OAuth status",children:Y?"Refreshing...":"🔄 Refresh OAuth"}),p.jsx("button",{className:"button",onClick:()=>Xr(x.name),disabled:Y,title:"Test connection and re-authorize OAuth",children:Y?"Testing...":"🔗 Test Connection"})]}):null})()]})]})]})},x.name)})}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"mt-3 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:s.map(g=>{const x=(d.mcp_servers||[]).find(W=>(W.name||"").trim().toLowerCase()===(g.name||"").trim().toLowerCase()),B=!!(x!=null&&x.enabled),ie=$===g.name;return p.jsx("div",{className:`text-left border rounded p-3 transition-colors ${ie?"border-app-accent bg-app-accent/5":"border-app-border bg-app-bg/50 hover:bg-app-border/20"}`,children:p.jsxs("div",{className:"flex items-start justify-between gap-2",children:[p.jsxs("button",{className:"text-left",onClick:()=>J(g.name),children:[p.jsx("div",{className:"font-semibold",children:g.name}),p.jsx("div",{className:"text-xs text-app-muted mt-0.5",children:"Derived from permissions files"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(vr,{checked:B,onChange:W=>qn(g.name,W)}),p.jsx("span",{className:`text-xs ${B?"text-blue-400":"text-app-muted"}`,children:B?"Enabled":"Disabled"})]})]})},g.name)})}),$&&p.jsxs("div",{className:"mt-4 space-y-3",children:[(()=>{const g=(d.mcp_servers||[]).find(B=>(B.name||"").trim().toLowerCase()===$.toLowerCase()),x=!!(g!=null&&g.enabled);return p.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[p.jsx("span",{className:"text-app-muted",children:"Server status"}),p.jsx(vr,{checked:x,onChange:B=>qn($,B)}),p.jsx("span",{children:x?"Enabled":"Disabled"})]})})(),vt(`Tools — ${$}`,xl(c,$),E,!1,!1),vt(`Resources — ${$}`,xl(S,$),j,!1,!1),vt(`Prompts — ${$}`,xl(b,$),L,!1,!1)]})]}),p.jsxs("div",{className:"mt-3 border border-app-border rounded p-2 bg-app-bg/50",children:[p.jsx("div",{className:"text-xs text-app-muted mb-1",children:"Open Edison server API key"}),p.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p.jsx("input",{type:Oe?"text":"password",className:"button !py-1.5 !px-2 w-[260px]",placeholder:"Enter server API key",value:ae,onChange:g=>Qe(g.target.value)}),p.jsx("button",{className:"button",onClick:()=>Pe(g=>!g),children:Oe?"Hide":"Show"}),p.jsx("button",{className:"button",disabled:ut,onClick:ni,children:ut?"Saving…":"Save key"})]})]}),p.jsxs("div",{className:"mt-3 border border-app-border rounded p-2 bg-app-bg/50",children:[p.jsx("div",{className:"text-xs text-app-muted mb-1",children:"Edison Watch API key"}),p.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p.jsx("input",{type:ne?"text":"password",className:"button !py-1.5 !px-2 w-[260px]",placeholder:"Enter API key",value:T,onChange:g=>q(g.target.value)}),p.jsx("button",{className:"button",onClick:()=>he(g=>!g),children:ne?"Hide":"Show"}),p.jsx("button",{className:"button",disabled:ve,onClick:Xt,children:ve?"Saving…":"Save key"})]})]})]}),w==="section"&&p.jsxs(p.Fragment,{children:[vt("Tools",c,E,!0,!0),vt("Resources",S,j,!0,!0),vt("Prompts",b,L,!0,!0)]}),y&&p.jsx("div",{className:`fixed bottom-4 right-4 z-50 p-4 rounded-lg shadow-lg max-w-sm transition-all duration-300 ${y.type==="success"?"bg-green-500 text-white":"bg-red-500 text-white"}`,children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-sm font-medium",children:y.message}),p.jsx("button",{onClick:()=>m(null),className:"ml-3 text-white hover:text-gray-200 text-lg font-bold",children:"×"})]})})]}):p.jsx("div",{className:"card",children:"No config loaded"})}function xl(e,t){if(!e)return e;const n={...e||{}};for(const r of Object.keys(n))r!=="_metadata"&&r!==t&&delete n[r];return n}const vp=document.getElementById("root");if(!vp)throw new Error("Root container not found");const Bg=sp(vp);Bg.render(p.jsx(bn.StrictMode,{children:p.jsx(Ug,{})}));