@langgraph-js/ui 2.2.1 → 3.0.0

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,280 @@
1
+ var kq=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var M0e=kq((rr,ir)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var pd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Iy={exports:{}},yu={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and 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 IA;function Cq(){if(IA)return yu;IA=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:a}}return yu.Fragment=t,yu.jsx=n,yu.jsxs=n,yu}var PA;function Aq(){return PA||(PA=1,Iy.exports=Cq()),Iy.exports}var O=Aq(),Py={exports:{}},bu={},zy={exports:{}},Ly={};/**
10
+ * @license React
11
+ * scheduler.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and 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 zA;function Tq(){return zA||(zA=1,function(e){function t(H,G){var X=H.length;H.push(G);e:for(;0<X;){var W=X-1>>>1,L=H[W];if(0<i(L,G))H[W]=G,H[X]=L,X=W;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var G=H[0],X=H.pop();if(X!==G){H[0]=X;e:for(var W=0,L=H.length,P=L>>>1;W<P;){var Z=2*(W+1)-1,R=H[Z],D=Z+1,U=H[D];if(0>i(R,X))D<L&&0>i(U,R)?(H[W]=U,H[D]=X,W=D):(H[W]=R,H[Z]=X,W=Z);else if(D<L&&0>i(U,X))H[W]=U,H[D]=X,W=D;else break e}}return G}function i(H,G){var X=H.sortIndex-G.sortIndex;return X!==0?X:H.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],f=[],d=1,p=null,m=3,g=!1,_=!1,S=!1,b=!1,x=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function k(H){for(var G=n(f);G!==null;){if(G.callback===null)r(f);else if(G.startTime<=H)r(f),G.sortIndex=G.expirationTime,t(c,G);else break;G=n(f)}}function C(H){if(S=!1,k(H),!_)if(n(c)!==null)_=!0,T||(T=!0,F());else{var G=n(f);G!==null&&V(C,G.startTime-H)}}var T=!1,N=-1,j=5,$=-1;function M(){return b?!0:!(e.unstable_now()-$<j)}function q(){if(b=!1,T){var H=e.unstable_now();$=H;var G=!0;try{e:{_=!1,S&&(S=!1,w(N),N=-1),g=!0;var X=m;try{t:{for(k(H),p=n(c);p!==null&&!(p.expirationTime>H&&M());){var W=p.callback;if(typeof W=="function"){p.callback=null,m=p.priorityLevel;var L=W(p.expirationTime<=H);if(H=e.unstable_now(),typeof L=="function"){p.callback=L,k(H),G=!0;break t}p===n(c)&&r(c),k(H)}else r(c);p=n(c)}if(p!==null)G=!0;else{var P=n(f);P!==null&&V(C,P.startTime-H),G=!1}}break e}finally{p=null,m=X,g=!1}G=void 0}}finally{G?F():T=!1}}}var F;if(typeof v=="function")F=function(){v(q)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,I=B.port2;B.port1.onmessage=q,F=function(){I.postMessage(null)}}else F=function(){x(q,0)};function V(H,G){N=x(function(){H(e.unstable_now())},G)}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(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(H){switch(m){case 1:case 2:case 3:var G=3;break;default:G=m}var X=m;m=G;try{return H()}finally{m=X}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(H,G){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var X=m;m=H;try{return G()}finally{m=X}},e.unstable_scheduleCallback=function(H,G,X){var W=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?W+X:W):X=W,H){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=X+L,H={id:d++,callback:G,priorityLevel:H,startTime:X,expirationTime:L,sortIndex:-1},X>W?(H.sortIndex=X,t(f,H),n(c)===null&&H===n(f)&&(S?(w(N),N=-1):S=!0,V(C,X-W))):(H.sortIndex=L,t(c,H),_||g||(_=!0,T||(T=!0,F()))),H},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(H){var G=m;return function(){var X=m;m=G;try{return H.apply(this,arguments)}finally{m=X}}}}(Ly)),Ly}var LA;function Nq(){return LA||(LA=1,zy.exports=Tq()),zy.exports}var qy={exports:{}},Fe={};/**
18
+ * @license React
19
+ * react.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and 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
+ */var qA;function Oq(){if(qA)return Fe;qA=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function g(P){return P===null||typeof P!="object"?null:(P=m&&P[m]||P["@@iterator"],typeof P=="function"?P:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function x(P,Z,R){this.props=P,this.context=Z,this.refs=b,this.updater=R||_}x.prototype.isReactComponent={},x.prototype.setState=function(P,Z){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,Z,"setState")},x.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function w(){}w.prototype=x.prototype;function v(P,Z,R){this.props=P,this.context=Z,this.refs=b,this.updater=R||_}var k=v.prototype=new w;k.constructor=v,S(k,x.prototype),k.isPureReactComponent=!0;var C=Array.isArray;function T(){}var N={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function $(P,Z,R){var D=R.ref;return{$$typeof:e,type:P,key:Z,ref:D!==void 0?D:null,props:R}}function M(P,Z){return $(P.type,Z,P.props)}function q(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function F(P){var Z={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(R){return Z[R]})}var B=/\/+/g;function I(P,Z){return typeof P=="object"&&P!==null&&P.key!=null?F(""+P.key):Z.toString(36)}function V(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(T,T):(P.status="pending",P.then(function(Z){P.status==="pending"&&(P.status="fulfilled",P.value=Z)},function(Z){P.status==="pending"&&(P.status="rejected",P.reason=Z)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function H(P,Z,R,D,U){var Y=typeof P;(Y==="undefined"||Y==="boolean")&&(P=null);var ne=!1;if(P===null)ne=!0;else switch(Y){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(P.$$typeof){case e:case t:ne=!0;break;case d:return ne=P._init,H(ne(P._payload),Z,R,D,U)}}if(ne)return U=U(P),ne=D===""?"."+I(P,0):D,C(U)?(R="",ne!=null&&(R=ne.replace(B,"$&/")+"/"),H(U,Z,R,"",function(de){return de})):U!=null&&(q(U)&&(U=M(U,R+(U.key==null||P&&P.key===U.key?"":(""+U.key).replace(B,"$&/")+"/")+ne)),Z.push(U)),1;ne=0;var ae=D===""?".":D+":";if(C(P))for(var re=0;re<P.length;re++)D=P[re],Y=ae+I(D,re),ne+=H(D,Z,R,Y,U);else if(re=g(P),typeof re=="function")for(P=re.call(P),re=0;!(D=P.next()).done;)D=D.value,Y=ae+I(D,re++),ne+=H(D,Z,R,Y,U);else if(Y==="object"){if(typeof P.then=="function")return H(V(P),Z,R,D,U);throw Z=String(P),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ne}function G(P,Z,R){if(P==null)return P;var D=[],U=0;return H(P,D,"","",function(Y){return Z.call(R,Y,U++)}),D}function X(P){if(P._status===-1){var Z=P._result;Z=Z(),Z.then(function(R){(P._status===0||P._status===-1)&&(P._status=1,P._result=R)},function(R){(P._status===0||P._status===-1)&&(P._status=2,P._result=R)}),P._status===-1&&(P._status=0,P._result=Z)}if(P._status===1)return P._result.default;throw P._result}var W=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},L={map:G,forEach:function(P,Z,R){G(P,function(){Z.apply(this,arguments)},R)},count:function(P){var Z=0;return G(P,function(){Z++}),Z},toArray:function(P){return G(P,function(Z){return Z})||[]},only:function(P){if(!q(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Fe.Activity=p,Fe.Children=L,Fe.Component=x,Fe.Fragment=n,Fe.Profiler=i,Fe.PureComponent=v,Fe.StrictMode=r,Fe.Suspense=c,Fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Fe.__COMPILER_RUNTIME={__proto__:null,c:function(P){return N.H.useMemoCache(P)}},Fe.cache=function(P){return function(){return P.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Fe.cloneElement=function(P,Z,R){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var D=S({},P.props),U=P.key;if(Z!=null)for(Y in Z.key!==void 0&&(U=""+Z.key),Z)!j.call(Z,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&Z.ref===void 0||(D[Y]=Z[Y]);var Y=arguments.length-2;if(Y===1)D.children=R;else if(1<Y){for(var ne=Array(Y),ae=0;ae<Y;ae++)ne[ae]=arguments[ae+2];D.children=ne}return $(P.type,U,D)},Fe.createContext=function(P){return P={$$typeof:o,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:a,_context:P},P},Fe.createElement=function(P,Z,R){var D,U={},Y=null;if(Z!=null)for(D in Z.key!==void 0&&(Y=""+Z.key),Z)j.call(Z,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(U[D]=Z[D]);var ne=arguments.length-2;if(ne===1)U.children=R;else if(1<ne){for(var ae=Array(ne),re=0;re<ne;re++)ae[re]=arguments[re+2];U.children=ae}if(P&&P.defaultProps)for(D in ne=P.defaultProps,ne)U[D]===void 0&&(U[D]=ne[D]);return $(P,Y,U)},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(P){return{$$typeof:l,render:P}},Fe.isValidElement=q,Fe.lazy=function(P){return{$$typeof:d,_payload:{_status:-1,_result:P},_init:X}},Fe.memo=function(P,Z){return{$$typeof:f,type:P,compare:Z===void 0?null:Z}},Fe.startTransition=function(P){var Z=N.T,R={};N.T=R;try{var D=P(),U=N.S;U!==null&&U(R,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(T,W)}catch(Y){W(Y)}finally{Z!==null&&R.types!==null&&(Z.types=R.types),N.T=Z}},Fe.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Fe.use=function(P){return N.H.use(P)},Fe.useActionState=function(P,Z,R){return N.H.useActionState(P,Z,R)},Fe.useCallback=function(P,Z){return N.H.useCallback(P,Z)},Fe.useContext=function(P){return N.H.useContext(P)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(P,Z){return N.H.useDeferredValue(P,Z)},Fe.useEffect=function(P,Z){return N.H.useEffect(P,Z)},Fe.useEffectEvent=function(P){return N.H.useEffectEvent(P)},Fe.useId=function(){return N.H.useId()},Fe.useImperativeHandle=function(P,Z,R){return N.H.useImperativeHandle(P,Z,R)},Fe.useInsertionEffect=function(P,Z){return N.H.useInsertionEffect(P,Z)},Fe.useLayoutEffect=function(P,Z){return N.H.useLayoutEffect(P,Z)},Fe.useMemo=function(P,Z){return N.H.useMemo(P,Z)},Fe.useOptimistic=function(P,Z){return N.H.useOptimistic(P,Z)},Fe.useReducer=function(P,Z,R){return N.H.useReducer(P,Z,R)},Fe.useRef=function(P){return N.H.useRef(P)},Fe.useState=function(P){return N.H.useState(P)},Fe.useSyncExternalStore=function(P,Z,R){return N.H.useSyncExternalStore(P,Z,R)},Fe.useTransition=function(){return N.H.useTransition()},Fe.version="19.2.0",Fe}var FA;function Ec(){return FA||(FA=1,qy.exports=Oq()),qy.exports}var Fy={exports:{}},vn={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and 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 BA;function Rq(){if(BA)return vn;BA=1;var e=Ec();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)f+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(c,f,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:c,containerInfo:f,implementation:d}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return vn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,vn.createPortal=function(c,f){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(c,f,null,d)},vn.flushSync=function(c){var f=o.T,d=r.p;try{if(o.T=null,r.p=2,c)return c()}finally{o.T=f,r.p=d,r.d.f()}},vn.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},vn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},vn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var d=f.as,p=l(d,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,g=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;d==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:g}):d==="script"&&r.d.X(c,{crossOrigin:p,integrity:m,fetchPriority:g,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},vn.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var d=l(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:d,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},vn.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var d=f.as,p=l(d,f.crossOrigin);r.d.L(c,d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},vn.preloadModule=function(c,f){if(typeof c=="string")if(f){var d=l(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:d,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},vn.requestFormReset=function(c){r.d.r(c)},vn.unstable_batchedUpdates=function(c,f){return c(f)},vn.useFormState=function(c,f,d){return o.H.useFormState(c,f,d)},vn.useFormStatus=function(){return o.H.useHostTransitionStatus()},vn.version="19.2.0",vn}var UA;function c5(){if(UA)return Fy.exports;UA=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Fy.exports=Rq(),Fy.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var HA;function jq(){if(HA)return bu;HA=1;var e=Nq(),t=Ec(),n=c5();function r(s){var u="https://react.dev/errors/"+s;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function a(s){var u=s,h=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,(u.flags&4098)!==0&&(h=u.return),s=u.return;while(s)}return u.tag===3?h:null}function o(s){if(s.tag===13){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function l(s){if(s.tag===31){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function c(s){if(a(s)!==s)throw Error(r(188))}function f(s){var u=s.alternate;if(!u){if(u=a(s),u===null)throw Error(r(188));return u!==s?null:s}for(var h=s,y=u;;){var E=h.return;if(E===null)break;var A=E.alternate;if(A===null){if(y=E.return,y!==null){h=y;continue}break}if(E.child===A.child){for(A=E.child;A;){if(A===h)return c(E),s;if(A===y)return c(E),u;A=A.sibling}throw Error(r(188))}if(h.return!==y.return)h=E,y=A;else{for(var z=!1,K=E.child;K;){if(K===h){z=!0,h=E,y=A;break}if(K===y){z=!0,y=E,h=A;break}K=K.sibling}if(!z){for(K=A.child;K;){if(K===h){z=!0,h=A,y=E;break}if(K===y){z=!0,y=A,h=E;break}K=K.sibling}if(!z)throw Error(r(189))}}if(h.alternate!==y)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?s:u}function d(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s;for(s=s.child;s!==null;){if(u=d(s),u!==null)return u;s=s.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),v=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function F(s){return s===null||typeof s!="object"?null:(s=q&&s[q]||s["@@iterator"],typeof s=="function"?s:null)}var B=Symbol.for("react.client.reference");function I(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===B?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case S:return"Fragment";case x:return"Profiler";case b:return"StrictMode";case C:return"Suspense";case T:return"SuspenseList";case $:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case _:return"Portal";case v:return s.displayName||"Context";case w:return(s._context.displayName||"Context")+".Consumer";case k:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case N:return u=s.displayName||null,u!==null?u:I(s.type)||"Memo";case j:u=s._payload,s=s._init;try{return I(s(u))}catch{}}return null}var V=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},W=[],L=-1;function P(s){return{current:s}}function Z(s){0>L||(s.current=W[L],W[L]=null,L--)}function R(s,u){L++,W[L]=s.current,s.current=u}var D=P(null),U=P(null),Y=P(null),ne=P(null);function ae(s,u){switch(R(Y,u),R(U,s),R(D,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?aA(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=aA(u),s=sA(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}Z(D),R(D,s)}function re(){Z(D),Z(U),Z(Y)}function de(s){s.memoizedState!==null&&R(ne,s);var u=D.current,h=sA(u,s.type);u!==h&&(R(U,s),R(D,h))}function Q(s){U.current===s&&(Z(D),Z(U)),ne.current===s&&(Z(ne),hu._currentValue=X)}var J,oe;function fe(s){if(J===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);J=u&&u[1]||"",oe=-1<h.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+J+s+oe}var me=!1;function we(s,u){if(!s||me)return"";me=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(he){var ce=he}Reflect.construct(s,[],be)}else{try{be.call()}catch(he){ce=he}s.call(be.prototype)}}else{try{throw Error()}catch(he){ce=he}(be=s())&&typeof be.catch=="function"&&be.catch(function(){})}}catch(he){if(he&&ce&&typeof he.stack=="string")return[he.stack,ce.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=y.DetermineComponentFrameRoot(),z=A[0],K=A[1];if(z&&K){var te=z.split(`
44
+ `),ue=K.split(`
45
+ `);for(E=y=0;y<te.length&&!te[y].includes("DetermineComponentFrameRoot");)y++;for(;E<ue.length&&!ue[E].includes("DetermineComponentFrameRoot");)E++;if(y===te.length||E===ue.length)for(y=te.length-1,E=ue.length-1;1<=y&&0<=E&&te[y]!==ue[E];)E--;for(;1<=y&&0<=E;y--,E--)if(te[y]!==ue[E]){if(y!==1||E!==1)do if(y--,E--,0>E||te[y]!==ue[E]){var ge=`
46
+ `+te[y].replace(" at new "," at ");return s.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",s.displayName)),ge}while(1<=y&&0<=E);break}}}finally{me=!1,Error.prepareStackTrace=h}return(h=s?s.displayName||s.name:"")?fe(h):""}function ke(s,u){switch(s.tag){case 26:case 27:case 5:return fe(s.type);case 16:return fe("Lazy");case 13:return s.child!==u&&u!==null?fe("Suspense Fallback"):fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return we(s.type,!1);case 11:return we(s.type.render,!1);case 1:return we(s.type,!0);case 31:return fe("Activity");default:return""}}function Ze(s){try{var u="",h=null;do u+=ke(s,h),h=s,s=s.return;while(s);return u}catch(y){return`
47
+ Error generating stack: `+y.message+`
48
+ `+y.stack}}var Le=Object.prototype.hasOwnProperty,Ye=e.unstable_scheduleCallback,Ve=e.unstable_cancelCallback,$e=e.unstable_shouldYield,qe=e.unstable_requestPaint,We=e.unstable_now,Tt=e.unstable_getCurrentPriorityLevel,pe=e.unstable_ImmediatePriority,_e=e.unstable_UserBlockingPriority,Te=e.unstable_NormalPriority,ze=e.unstable_LowPriority,Je=e.unstable_IdlePriority,un=e.log,On=e.unstable_setDisableYieldValue,jt=null,vt=null;function bn(s){if(typeof un=="function"&&On(s),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(jt,s)}catch{}}var _t=Math.clz32?Math.clz32:wm,qr=Math.log,Bn=Math.LN2;function wm(s){return s>>>=0,s===0?32:31-(qr(s)/Bn|0)|0}var Bs=256,Us=262144,Hs=4194304;function oi(s){var u=s&42;if(u!==0)return u;switch(s&-s){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Fa(s,u,h){var y=s.pendingLanes;if(y===0)return 0;var E=0,A=s.suspendedLanes,z=s.pingedLanes;s=s.warmLanes;var K=y&134217727;return K!==0?(y=K&~A,y!==0?E=oi(y):(z&=K,z!==0?E=oi(z):h||(h=K&~s,h!==0&&(E=oi(h))))):(K=y&~A,K!==0?E=oi(K):z!==0?E=oi(z):h||(h=y&~s,h!==0&&(E=oi(h)))),E===0?0:u!==0&&u!==E&&(u&A)===0&&(A=E&-E,h=u&-u,A>=h||A===32&&(h&4194048)!==0)?u:E}function Ba(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function Sm(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32: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 u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Gc(){var s=Hs;return Hs<<=1,(Hs&62914560)===0&&(Hs=4194304),s}function El(s){for(var u=[],h=0;31>h;h++)u.push(s);return u}function Ua(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Em(s,u,h,y,E,A){var z=s.pendingLanes;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=h,s.entangledLanes&=h,s.errorRecoveryDisabledLanes&=h,s.shellSuspendCounter=0;var K=s.entanglements,te=s.expirationTimes,ue=s.hiddenUpdates;for(h=z&~h;0<h;){var ge=31-_t(h),be=1<<ge;K[ge]=0,te[ge]=-1;var ce=ue[ge];if(ce!==null)for(ue[ge]=null,ge=0;ge<ce.length;ge++){var he=ce[ge];he!==null&&(he.lane&=-536870913)}h&=~be}y!==0&&Zc(s,y,0),A!==0&&E===0&&s.tag!==0&&(s.suspendedLanes|=A&~(z&~u))}function Zc(s,u,h){s.pendingLanes|=u,s.suspendedLanes&=~u;var y=31-_t(u);s.entangledLanes|=u,s.entanglements[y]=s.entanglements[y]|1073741824|h&261930}function Yc(s,u){var h=s.entangledLanes|=u;for(s=s.entanglements;h;){var y=31-_t(h),E=1<<y;E&u|s[y]&u&&(s[y]|=u),h&=~E}}function Kc(s,u){var h=u&-u;return h=(h&42)!==0?1:kl(h),(h&(s.suspendedLanes|u))!==0?0:h}function kl(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Cl(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Xc(){var s=G.p;return s!==0?s:(s=window.event,s===void 0?32:NA(s.type))}function Wc(s,u){var h=G.p;try{return G.p=s,u()}finally{G.p=h}}var Fr=Math.random().toString(36).slice(2),rn="__reactFiber$"+Fr,cn="__reactProps$"+Fr,li="__reactContainer$"+Fr,Vs="__reactEvents$"+Fr,km="__reactListeners$"+Fr,Cm="__reactHandles$"+Fr,Qc="__reactResources$"+Fr,Ha="__reactMarker$"+Fr;function Al(s){delete s[rn],delete s[cn],delete s[Vs],delete s[km],delete s[Cm]}function Yi(s){var u=s[rn];if(u)return u;for(var h=s.parentNode;h;){if(u=h[li]||h[rn]){if(h=u.alternate,u.child!==null||h!==null&&h.child!==null)for(s=hA(s);s!==null;){if(h=s[rn])return h;s=hA(s)}return u}s=h,h=s.parentNode}return null}function ui(s){if(s=s[rn]||s[li]){var u=s.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return s}return null}function Va(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s.stateNode;throw Error(r(33))}function Ki(s){var u=s[Qc];return u||(u=s[Qc]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function Yt(s){s[Ha]=!0}var Jc=new Set,ef={};function ci(s,u){Xi(s,u),Xi(s+"Capture",u)}function Xi(s,u){for(ef[s]=u,s=0;s<u.length;s++)Jc.add(u[s])}var tf=RegExp("^[: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]*$"),nf={},rf={};function Am(s){return Le.call(rf,s)?!0:Le.call(nf,s)?!1:tf.test(s)?rf[s]=!0:(nf[s]=!0,!1)}function Gs(s,u,h){if(Am(u))if(h===null)s.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":s.removeAttribute(u);return;case"boolean":var y=u.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){s.removeAttribute(u);return}}s.setAttribute(u,""+h)}}function Zs(s,u,h){if(h===null)s.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(u);return}s.setAttribute(u,""+h)}}function wr(s,u,h,y){if(y===null)s.removeAttribute(h);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(h);return}s.setAttributeNS(u,h,""+y)}}function Rn(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Tl(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Tm(s,u,h){var y=Object.getOwnPropertyDescriptor(s.constructor.prototype,u);if(!s.hasOwnProperty(u)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var E=y.get,A=y.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return E.call(this)},set:function(z){h=""+z,A.call(this,z)}}),Object.defineProperty(s,u,{enumerable:y.enumerable}),{getValue:function(){return h},setValue:function(z){h=""+z},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function Nl(s){if(!s._valueTracker){var u=Tl(s)?"checked":"value";s._valueTracker=Tm(s,u,""+s[u])}}function Ys(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var h=u.getValue(),y="";return s&&(y=Tl(s)?s.checked?"true":"false":s.value),s=y,s!==h?(u.setValue(s),!0):!1}function Ks(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Nm=/[\n"\\]/g;function Sn(s){return s.replace(Nm,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Om(s,u,h,y,E,A,z,K){s.name="",z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?s.type=z:s.removeAttribute("type"),u!=null?z==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+Rn(u)):s.value!==""+Rn(u)&&(s.value=""+Rn(u)):z!=="submit"&&z!=="reset"||s.removeAttribute("value"),u!=null?Rm(s,z,Rn(u)):h!=null?Rm(s,z,Rn(h)):y!=null&&s.removeAttribute("value"),E==null&&A!=null&&(s.defaultChecked=!!A),E!=null&&(s.checked=E&&typeof E!="function"&&typeof E!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+Rn(K):s.removeAttribute("name")}function JE(s,u,h,y,E,A,z,K){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(s.type=A),u!=null||h!=null){if(!(A!=="submit"&&A!=="reset"||u!=null)){Nl(s);return}h=h!=null?""+Rn(h):"",u=u!=null?""+Rn(u):h,K||u===s.value||(s.value=u),s.defaultValue=u}y=y??E,y=typeof y!="function"&&typeof y!="symbol"&&!!y,s.checked=K?s.checked:!!y,s.defaultChecked=!!y,z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(s.name=z),Nl(s)}function Rm(s,u,h){u==="number"&&Ks(s.ownerDocument)===s||s.defaultValue===""+h||(s.defaultValue=""+h)}function Xs(s,u,h,y){if(s=s.options,u){u={};for(var E=0;E<h.length;E++)u["$"+h[E]]=!0;for(h=0;h<s.length;h++)E=u.hasOwnProperty("$"+s[h].value),s[h].selected!==E&&(s[h].selected=E),E&&y&&(s[h].defaultSelected=!0)}else{for(h=""+Rn(h),u=null,E=0;E<s.length;E++){if(s[E].value===h){s[E].selected=!0,y&&(s[E].defaultSelected=!0);return}u!==null||s[E].disabled||(u=s[E])}u!==null&&(u.selected=!0)}}function ek(s,u,h){if(u!=null&&(u=""+Rn(u),u!==s.value&&(s.value=u),h==null)){s.defaultValue!==u&&(s.defaultValue=u);return}s.defaultValue=h!=null?""+Rn(h):""}function tk(s,u,h,y){if(u==null){if(y!=null){if(h!=null)throw Error(r(92));if(V(y)){if(1<y.length)throw Error(r(93));y=y[0]}h=y}h==null&&(h=""),u=h}h=Rn(u),s.defaultValue=h,y=s.textContent,y===h&&y!==""&&y!==null&&(s.value=y),Nl(s)}function Ws(s,u){if(u){var h=s.firstChild;if(h&&h===s.lastChild&&h.nodeType===3){h.nodeValue=u;return}}s.textContent=u}var _z=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function nk(s,u,h){var y=u.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?y?s.setProperty(u,""):u==="float"?s.cssFloat="":s[u]="":y?s.setProperty(u,h):typeof h!="number"||h===0||_z.has(u)?u==="float"?s.cssFloat=h:s[u]=(""+h).trim():s[u]=h+"px"}function rk(s,u,h){if(u!=null&&typeof u!="object")throw Error(r(62));if(s=s.style,h!=null){for(var y in h)!h.hasOwnProperty(y)||u!=null&&u.hasOwnProperty(y)||(y.indexOf("--")===0?s.setProperty(y,""):y==="float"?s.cssFloat="":s[y]="");for(var E in u)y=u[E],u.hasOwnProperty(E)&&h[E]!==y&&nk(s,E,y)}else for(var A in u)u.hasOwnProperty(A)&&nk(s,A,u[A])}function jm(s){if(s.indexOf("-")===-1)return!1;switch(s){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 xz=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),wz=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function af(s){return wz.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function fi(){}var Mm=null;function $m(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Qs=null,Js=null;function ik(s){var u=ui(s);if(u&&(s=u.stateNode)){var h=s[cn]||null;e:switch(s=u.stateNode,u.type){case"input":if(Om(s,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),u=h.name,h.type==="radio"&&u!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+Sn(""+u)+'"][type="radio"]'),u=0;u<h.length;u++){var y=h[u];if(y!==s&&y.form===s.form){var E=y[cn]||null;if(!E)throw Error(r(90));Om(y,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(u=0;u<h.length;u++)y=h[u],y.form===s.form&&Ys(y)}break e;case"textarea":ek(s,h.value,h.defaultValue);break e;case"select":u=h.value,u!=null&&Xs(s,!!h.multiple,u,!1)}}}var Dm=!1;function ak(s,u,h){if(Dm)return s(u,h);Dm=!0;try{var y=s(u);return y}finally{if(Dm=!1,(Qs!==null||Js!==null)&&(Gf(),Qs&&(u=Qs,s=Js,Js=Qs=null,ik(u),s)))for(u=0;u<s.length;u++)ik(s[u])}}function Ol(s,u){var h=s.stateNode;if(h===null)return null;var y=h[cn]||null;if(y===null)return null;h=y[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break e;default:s=!1}if(s)return null;if(h&&typeof h!="function")throw Error(r(231,u,typeof h));return h}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Im=!1;if(di)try{var Rl={};Object.defineProperty(Rl,"passive",{get:function(){Im=!0}}),window.addEventListener("test",Rl,Rl),window.removeEventListener("test",Rl,Rl)}catch{Im=!1}var Wi=null,Pm=null,sf=null;function sk(){if(sf)return sf;var s,u=Pm,h=u.length,y,E="value"in Wi?Wi.value:Wi.textContent,A=E.length;for(s=0;s<h&&u[s]===E[s];s++);var z=h-s;for(y=1;y<=z&&u[h-y]===E[A-y];y++);return sf=E.slice(s,1<y?1-y:void 0)}function of(s){var u=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&u===13&&(s=13)):s=u,s===10&&(s=13),32<=s||s===13?s:0}function lf(){return!0}function ok(){return!1}function jn(s){function u(h,y,E,A,z){this._reactName=h,this._targetInst=E,this.type=y,this.nativeEvent=A,this.target=z,this.currentTarget=null;for(var K in s)s.hasOwnProperty(K)&&(h=s[K],this[K]=h?h(A):A[K]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?lf:ok,this.isPropagationStopped=ok,this}return p(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=lf)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=lf)},persist:function(){},isPersistent:lf}),u}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uf=jn(Ga),jl=p({},Ga,{view:0,detail:0}),Sz=jn(jl),zm,Lm,Ml,cf=p({},jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fm,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Ml&&(Ml&&s.type==="mousemove"?(zm=s.screenX-Ml.screenX,Lm=s.screenY-Ml.screenY):Lm=zm=0,Ml=s),zm)},movementY:function(s){return"movementY"in s?s.movementY:Lm}}),lk=jn(cf),Ez=p({},cf,{dataTransfer:0}),kz=jn(Ez),Cz=p({},jl,{relatedTarget:0}),qm=jn(Cz),Az=p({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),Tz=jn(Az),Nz=p({},Ga,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Oz=jn(Nz),Rz=p({},Ga,{data:0}),uk=jn(Rz),jz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mz={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"},$z={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dz(s){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(s):(s=$z[s])?!!u[s]:!1}function Fm(){return Dz}var Iz=p({},jl,{key:function(s){if(s.key){var u=jz[s.key]||s.key;if(u!=="Unidentified")return u}return s.type==="keypress"?(s=of(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Mz[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fm,charCode:function(s){return s.type==="keypress"?of(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?of(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Pz=jn(Iz),zz=p({},cf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ck=jn(zz),Lz=p({},jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fm}),qz=jn(Lz),Fz=p({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bz=jn(Fz),Uz=p({},cf,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Hz=jn(Uz),Vz=p({},Ga,{newState:0,oldState:0}),Gz=jn(Vz),Zz=[9,13,27,32],Bm=di&&"CompositionEvent"in window,$l=null;di&&"documentMode"in document&&($l=document.documentMode);var Yz=di&&"TextEvent"in window&&!$l,fk=di&&(!Bm||$l&&8<$l&&11>=$l),dk=" ",hk=!1;function pk(s,u){switch(s){case"keyup":return Zz.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mk(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var eo=!1;function Kz(s,u){switch(s){case"compositionend":return mk(u);case"keypress":return u.which!==32?null:(hk=!0,dk);case"textInput":return s=u.data,s===dk&&hk?null:s;default:return null}}function Xz(s,u){if(eo)return s==="compositionend"||!Bm&&pk(s,u)?(s=sk(),sf=Pm=Wi=null,eo=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return fk&&u.locale!=="ko"?null:u.data;default:return null}}var Wz={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 gk(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u==="input"?!!Wz[s.type]:u==="textarea"}function yk(s,u,h,y){Qs?Js?Js.push(y):Js=[y]:Qs=y,u=Jf(u,"onChange"),0<u.length&&(h=new uf("onChange","change",null,h,y),s.push({event:h,listeners:u}))}var Dl=null,Il=null;function Qz(s){JC(s,0)}function ff(s){var u=Va(s);if(Ys(u))return s}function bk(s,u){if(s==="change")return u}var vk=!1;if(di){var Um;if(di){var Hm="oninput"in document;if(!Hm){var _k=document.createElement("div");_k.setAttribute("oninput","return;"),Hm=typeof _k.oninput=="function"}Um=Hm}else Um=!1;vk=Um&&(!document.documentMode||9<document.documentMode)}function xk(){Dl&&(Dl.detachEvent("onpropertychange",wk),Il=Dl=null)}function wk(s){if(s.propertyName==="value"&&ff(Il)){var u=[];yk(u,Il,s,$m(s)),ak(Qz,u)}}function Jz(s,u,h){s==="focusin"?(xk(),Dl=u,Il=h,Dl.attachEvent("onpropertychange",wk)):s==="focusout"&&xk()}function eL(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return ff(Il)}function tL(s,u){if(s==="click")return ff(u)}function nL(s,u){if(s==="input"||s==="change")return ff(u)}function rL(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}var Un=typeof Object.is=="function"?Object.is:rL;function Pl(s,u){if(Un(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var h=Object.keys(s),y=Object.keys(u);if(h.length!==y.length)return!1;for(y=0;y<h.length;y++){var E=h[y];if(!Le.call(u,E)||!Un(s[E],u[E]))return!1}return!0}function Sk(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Ek(s,u){var h=Sk(s);s=0;for(var y;h;){if(h.nodeType===3){if(y=s+h.textContent.length,s<=u&&y>=u)return{node:h,offset:u-s};s=y}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=Sk(h)}}function kk(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?kk(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function Ck(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=Ks(s.document);u instanceof s.HTMLIFrameElement;){try{var h=typeof u.contentWindow.location.href=="string"}catch{h=!1}if(h)s=u.contentWindow;else break;u=Ks(s.document)}return u}function Vm(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var iL=di&&"documentMode"in document&&11>=document.documentMode,to=null,Gm=null,zl=null,Zm=!1;function Ak(s,u,h){var y=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;Zm||to==null||to!==Ks(y)||(y=to,"selectionStart"in y&&Vm(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),zl&&Pl(zl,y)||(zl=y,y=Jf(Gm,"onSelect"),0<y.length&&(u=new uf("onSelect","select",null,u,h),s.push({event:u,listeners:y}),u.target=to)))}function Za(s,u){var h={};return h[s.toLowerCase()]=u.toLowerCase(),h["Webkit"+s]="webkit"+u,h["Moz"+s]="moz"+u,h}var no={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},Ym={},Tk={};di&&(Tk=document.createElement("div").style,"AnimationEvent"in window||(delete no.animationend.animation,delete no.animationiteration.animation,delete no.animationstart.animation),"TransitionEvent"in window||delete no.transitionend.transition);function Ya(s){if(Ym[s])return Ym[s];if(!no[s])return s;var u=no[s],h;for(h in u)if(u.hasOwnProperty(h)&&h in Tk)return Ym[s]=u[h];return s}var Nk=Ya("animationend"),Ok=Ya("animationiteration"),Rk=Ya("animationstart"),aL=Ya("transitionrun"),sL=Ya("transitionstart"),oL=Ya("transitioncancel"),jk=Ya("transitionend"),Mk=new Map,Km="abort auxClick beforeToggle 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(" ");Km.push("scrollEnd");function Sr(s,u){Mk.set(s,u),ci(u,[s])}var df=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},ur=[],ro=0,Xm=0;function hf(){for(var s=ro,u=Xm=ro=0;u<s;){var h=ur[u];ur[u++]=null;var y=ur[u];ur[u++]=null;var E=ur[u];ur[u++]=null;var A=ur[u];if(ur[u++]=null,y!==null&&E!==null){var z=y.pending;z===null?E.next=E:(E.next=z.next,z.next=E),y.pending=E}A!==0&&$k(h,E,A)}}function pf(s,u,h,y){ur[ro++]=s,ur[ro++]=u,ur[ro++]=h,ur[ro++]=y,Xm|=y,s.lanes|=y,s=s.alternate,s!==null&&(s.lanes|=y)}function Wm(s,u,h,y){return pf(s,u,h,y),mf(s)}function Ka(s,u){return pf(s,null,null,u),mf(s)}function $k(s,u,h){s.lanes|=h;var y=s.alternate;y!==null&&(y.lanes|=h);for(var E=!1,A=s.return;A!==null;)A.childLanes|=h,y=A.alternate,y!==null&&(y.childLanes|=h),A.tag===22&&(s=A.stateNode,s===null||s._visibility&1||(E=!0)),s=A,A=A.return;return s.tag===3?(A=s.stateNode,E&&u!==null&&(E=31-_t(h),s=A.hiddenUpdates,y=s[E],y===null?s[E]=[u]:y.push(u),u.lane=h|536870912),A):null}function mf(s){if(50<su)throw su=0,sy=null,Error(r(185));for(var u=s.return;u!==null;)s=u,u=s.return;return s.tag===3?s.stateNode:null}var io={};function lL(s,u,h,y){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hn(s,u,h,y){return new lL(s,u,h,y)}function Qm(s){return s=s.prototype,!(!s||!s.isReactComponent)}function hi(s,u){var h=s.alternate;return h===null?(h=Hn(s.tag,u,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=u,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&65011712,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,u=s.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h.refCleanup=s.refCleanup,h}function Dk(s,u){s.flags&=65011714;var h=s.alternate;return h===null?(s.childLanes=0,s.lanes=u,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=h.childLanes,s.lanes=h.lanes,s.child=h.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=h.memoizedProps,s.memoizedState=h.memoizedState,s.updateQueue=h.updateQueue,s.type=h.type,u=h.dependencies,s.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),s}function gf(s,u,h,y,E,A){var z=0;if(y=s,typeof s=="function")Qm(s)&&(z=1);else if(typeof s=="string")z=hq(s,h,D.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case $:return s=Hn(31,h,u,E),s.elementType=$,s.lanes=A,s;case S:return Xa(h.children,E,A,u);case b:z=8,E|=24;break;case x:return s=Hn(12,h,u,E|2),s.elementType=x,s.lanes=A,s;case C:return s=Hn(13,h,u,E),s.elementType=C,s.lanes=A,s;case T:return s=Hn(19,h,u,E),s.elementType=T,s.lanes=A,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case v:z=10;break e;case w:z=9;break e;case k:z=11;break e;case N:z=14;break e;case j:z=16,y=null;break e}z=29,h=Error(r(130,s===null?"null":typeof s,"")),y=null}return u=Hn(z,h,u,E),u.elementType=s,u.type=y,u.lanes=A,u}function Xa(s,u,h,y){return s=Hn(7,s,y,u),s.lanes=h,s}function Jm(s,u,h){return s=Hn(6,s,null,u),s.lanes=h,s}function Ik(s){var u=Hn(18,null,null,0);return u.stateNode=s,u}function eg(s,u,h){return u=Hn(4,s.children!==null?s.children:[],s.key,u),u.lanes=h,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}var Pk=new WeakMap;function cr(s,u){if(typeof s=="object"&&s!==null){var h=Pk.get(s);return h!==void 0?h:(u={value:s,source:u,stack:Ze(u)},Pk.set(s,u),u)}return{value:s,source:u,stack:Ze(u)}}var ao=[],so=0,yf=null,Ll=0,fr=[],dr=0,Qi=null,Br=1,Ur="";function pi(s,u){ao[so++]=Ll,ao[so++]=yf,yf=s,Ll=u}function zk(s,u,h){fr[dr++]=Br,fr[dr++]=Ur,fr[dr++]=Qi,Qi=s;var y=Br;s=Ur;var E=32-_t(y)-1;y&=~(1<<E),h+=1;var A=32-_t(u)+E;if(30<A){var z=E-E%5;A=(y&(1<<z)-1).toString(32),y>>=z,E-=z,Br=1<<32-_t(u)+E|h<<E|y,Ur=A+s}else Br=1<<A|h<<E|y,Ur=s}function tg(s){s.return!==null&&(pi(s,1),zk(s,1,0))}function ng(s){for(;s===yf;)yf=ao[--so],ao[so]=null,Ll=ao[--so],ao[so]=null;for(;s===Qi;)Qi=fr[--dr],fr[dr]=null,Ur=fr[--dr],fr[dr]=null,Br=fr[--dr],fr[dr]=null}function Lk(s,u){fr[dr++]=Br,fr[dr++]=Ur,fr[dr++]=Qi,Br=u.id,Ur=u.overflow,Qi=s}var fn=null,It=null,at=!1,Ji=null,hr=!1,rg=Error(r(519));function ea(s){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ql(cr(u,s)),rg}function qk(s){var u=s.stateNode,h=s.type,y=s.memoizedProps;switch(u[rn]=s,u[cn]=y,h){case"dialog":tt("cancel",u),tt("close",u);break;case"iframe":case"object":case"embed":tt("load",u);break;case"video":case"audio":for(h=0;h<lu.length;h++)tt(lu[h],u);break;case"source":tt("error",u);break;case"img":case"image":case"link":tt("error",u),tt("load",u);break;case"details":tt("toggle",u);break;case"input":tt("invalid",u),JE(u,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":tt("invalid",u);break;case"textarea":tt("invalid",u),tk(u,y.value,y.defaultValue,y.children)}h=y.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||u.textContent===""+h||y.suppressHydrationWarning===!0||rA(u.textContent,h)?(y.popover!=null&&(tt("beforetoggle",u),tt("toggle",u)),y.onScroll!=null&&tt("scroll",u),y.onScrollEnd!=null&&tt("scrollend",u),y.onClick!=null&&(u.onclick=fi),u=!0):u=!1,u||ea(s,!0)}function Fk(s){for(fn=s.return;fn;)switch(fn.tag){case 5:case 31:case 13:hr=!1;return;case 27:case 3:hr=!0;return;default:fn=fn.return}}function oo(s){if(s!==fn)return!1;if(!at)return Fk(s),at=!0,!1;var u=s.tag,h;if((h=u!==3&&u!==27)&&((h=u===5)&&(h=s.type,h=!(h!=="form"&&h!=="button")||xy(s.type,s.memoizedProps)),h=!h),h&&It&&ea(s),Fk(s),u===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));It=dA(s)}else if(u===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));It=dA(s)}else u===27?(u=It,pa(s.type)?(s=Cy,Cy=null,It=s):It=u):It=fn?mr(s.stateNode.nextSibling):null;return!0}function Wa(){It=fn=null,at=!1}function ig(){var s=Ji;return s!==null&&(In===null?In=s:In.push.apply(In,s),Ji=null),s}function ql(s){Ji===null?Ji=[s]:Ji.push(s)}var ag=P(null),Qa=null,mi=null;function ta(s,u,h){R(ag,u._currentValue),u._currentValue=h}function gi(s){s._currentValue=ag.current,Z(ag)}function sg(s,u,h){for(;s!==null;){var y=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),s===h)break;s=s.return}}function og(s,u,h,y){var E=s.child;for(E!==null&&(E.return=s);E!==null;){var A=E.dependencies;if(A!==null){var z=E.child;A=A.firstContext;e:for(;A!==null;){var K=A;A=E;for(var te=0;te<u.length;te++)if(K.context===u[te]){A.lanes|=h,K=A.alternate,K!==null&&(K.lanes|=h),sg(A.return,h,s),y||(z=null);break e}A=K.next}}else if(E.tag===18){if(z=E.return,z===null)throw Error(r(341));z.lanes|=h,A=z.alternate,A!==null&&(A.lanes|=h),sg(z,h,s),z=null}else z=E.child;if(z!==null)z.return=E;else for(z=E;z!==null;){if(z===s){z=null;break}if(E=z.sibling,E!==null){E.return=z.return,z=E;break}z=z.return}E=z}}function lo(s,u,h,y){s=null;for(var E=u,A=!1;E!==null;){if(!A){if((E.flags&524288)!==0)A=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var z=E.alternate;if(z===null)throw Error(r(387));if(z=z.memoizedProps,z!==null){var K=E.type;Un(E.pendingProps.value,z.value)||(s!==null?s.push(K):s=[K])}}else if(E===ne.current){if(z=E.alternate,z===null)throw Error(r(387));z.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(s!==null?s.push(hu):s=[hu])}E=E.return}s!==null&&og(u,s,h,y),u.flags|=262144}function bf(s){for(s=s.firstContext;s!==null;){if(!Un(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Ja(s){Qa=s,mi=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function dn(s){return Bk(Qa,s)}function vf(s,u){return Qa===null&&Ja(s),Bk(s,u)}function Bk(s,u){var h=u._currentValue;if(u={context:u,memoizedValue:h,next:null},mi===null){if(s===null)throw Error(r(308));mi=u,s.dependencies={lanes:0,firstContext:u},s.flags|=524288}else mi=mi.next=u;return h}var uL=typeof AbortController<"u"?AbortController:function(){var s=[],u=this.signal={aborted:!1,addEventListener:function(h,y){s.push(y)}};this.abort=function(){u.aborted=!0,s.forEach(function(h){return h()})}},cL=e.unstable_scheduleCallback,fL=e.unstable_NormalPriority,Kt={$$typeof:v,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lg(){return{controller:new uL,data:new Map,refCount:0}}function Fl(s){s.refCount--,s.refCount===0&&cL(fL,function(){s.controller.abort()})}var Bl=null,ug=0,uo=0,co=null;function dL(s,u){if(Bl===null){var h=Bl=[];ug=0,uo=dy(),co={status:"pending",value:void 0,then:function(y){h.push(y)}}}return ug++,u.then(Uk,Uk),u}function Uk(){if(--ug===0&&Bl!==null){co!==null&&(co.status="fulfilled");var s=Bl;Bl=null,uo=0,co=null;for(var u=0;u<s.length;u++)(0,s[u])()}}function hL(s,u){var h=[],y={status:"pending",value:null,reason:null,then:function(E){h.push(E)}};return s.then(function(){y.status="fulfilled",y.value=u;for(var E=0;E<h.length;E++)(0,h[E])(u)},function(E){for(y.status="rejected",y.reason=E,E=0;E<h.length;E++)(0,h[E])(void 0)}),y}var Hk=H.S;H.S=function(s,u){AC=We(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&dL(s,u),Hk!==null&&Hk(s,u)};var es=P(null);function cg(){var s=es.current;return s!==null?s:Nt.pooledCache}function _f(s,u){u===null?R(es,es.current):R(es,u.pool)}function Vk(){var s=cg();return s===null?null:{parent:Kt._currentValue,pool:s}}var fo=Error(r(460)),fg=Error(r(474)),xf=Error(r(542)),wf={then:function(){}};function Gk(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Zk(s,u,h){switch(h=s[h],h===void 0?s.push(u):h!==u&&(u.then(fi,fi),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,Kk(s),s;default:if(typeof u.status=="string")u.then(fi,fi);else{if(s=Nt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=u,s.status="pending",s.then(function(y){if(u.status==="pending"){var E=u;E.status="fulfilled",E.value=y}},function(y){if(u.status==="pending"){var E=u;E.status="rejected",E.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,Kk(s),s}throw ns=u,fo}}function ts(s){try{var u=s._init;return u(s._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(ns=h,fo):h}}var ns=null;function Yk(){if(ns===null)throw Error(r(459));var s=ns;return ns=null,s}function Kk(s){if(s===fo||s===xf)throw Error(r(483))}var ho=null,Ul=0;function Sf(s){var u=Ul;return Ul+=1,ho===null&&(ho=[]),Zk(ho,s,u)}function Hl(s,u){u=u.props.ref,s.ref=u!==void 0?u:null}function Ef(s,u){throw u.$$typeof===m?Error(r(525)):(s=Object.prototype.toString.call(u),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s)))}function Xk(s){function u(se,ie){if(s){var le=se.deletions;le===null?(se.deletions=[ie],se.flags|=16):le.push(ie)}}function h(se,ie){if(!s)return null;for(;ie!==null;)u(se,ie),ie=ie.sibling;return null}function y(se){for(var ie=new Map;se!==null;)se.key!==null?ie.set(se.key,se):ie.set(se.index,se),se=se.sibling;return ie}function E(se,ie){return se=hi(se,ie),se.index=0,se.sibling=null,se}function A(se,ie,le){return se.index=le,s?(le=se.alternate,le!==null?(le=le.index,le<ie?(se.flags|=67108866,ie):le):(se.flags|=67108866,ie)):(se.flags|=1048576,ie)}function z(se){return s&&se.alternate===null&&(se.flags|=67108866),se}function K(se,ie,le,ye){return ie===null||ie.tag!==6?(ie=Jm(le,se.mode,ye),ie.return=se,ie):(ie=E(ie,le),ie.return=se,ie)}function te(se,ie,le,ye){var Me=le.type;return Me===S?ge(se,ie,le.props.children,ye,le.key):ie!==null&&(ie.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===j&&ts(Me)===ie.type)?(ie=E(ie,le.props),Hl(ie,le),ie.return=se,ie):(ie=gf(le.type,le.key,le.props,null,se.mode,ye),Hl(ie,le),ie.return=se,ie)}function ue(se,ie,le,ye){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==le.containerInfo||ie.stateNode.implementation!==le.implementation?(ie=eg(le,se.mode,ye),ie.return=se,ie):(ie=E(ie,le.children||[]),ie.return=se,ie)}function ge(se,ie,le,ye,Me){return ie===null||ie.tag!==7?(ie=Xa(le,se.mode,ye,Me),ie.return=se,ie):(ie=E(ie,le),ie.return=se,ie)}function be(se,ie,le){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Jm(""+ie,se.mode,le),ie.return=se,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case g:return le=gf(ie.type,ie.key,ie.props,null,se.mode,le),Hl(le,ie),le.return=se,le;case _:return ie=eg(ie,se.mode,le),ie.return=se,ie;case j:return ie=ts(ie),be(se,ie,le)}if(V(ie)||F(ie))return ie=Xa(ie,se.mode,le,null),ie.return=se,ie;if(typeof ie.then=="function")return be(se,Sf(ie),le);if(ie.$$typeof===v)return be(se,vf(se,ie),le);Ef(se,ie)}return null}function ce(se,ie,le,ye){var Me=ie!==null?ie.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Me!==null?null:K(se,ie,""+le,ye);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case g:return le.key===Me?te(se,ie,le,ye):null;case _:return le.key===Me?ue(se,ie,le,ye):null;case j:return le=ts(le),ce(se,ie,le,ye)}if(V(le)||F(le))return Me!==null?null:ge(se,ie,le,ye,null);if(typeof le.then=="function")return ce(se,ie,Sf(le),ye);if(le.$$typeof===v)return ce(se,ie,vf(se,le),ye);Ef(se,le)}return null}function he(se,ie,le,ye,Me){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return se=se.get(le)||null,K(ie,se,""+ye,Me);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case g:return se=se.get(ye.key===null?le:ye.key)||null,te(ie,se,ye,Me);case _:return se=se.get(ye.key===null?le:ye.key)||null,ue(ie,se,ye,Me);case j:return ye=ts(ye),he(se,ie,le,ye,Me)}if(V(ye)||F(ye))return se=se.get(le)||null,ge(ie,se,ye,Me,null);if(typeof ye.then=="function")return he(se,ie,le,Sf(ye),Me);if(ye.$$typeof===v)return he(se,ie,le,vf(ie,ye),Me);Ef(ie,ye)}return null}function Ae(se,ie,le,ye){for(var Me=null,ft=null,Oe=ie,Ge=ie=0,it=null;Oe!==null&&Ge<le.length;Ge++){Oe.index>Ge?(it=Oe,Oe=null):it=Oe.sibling;var dt=ce(se,Oe,le[Ge],ye);if(dt===null){Oe===null&&(Oe=it);break}s&&Oe&&dt.alternate===null&&u(se,Oe),ie=A(dt,ie,Ge),ft===null?Me=dt:ft.sibling=dt,ft=dt,Oe=it}if(Ge===le.length)return h(se,Oe),at&&pi(se,Ge),Me;if(Oe===null){for(;Ge<le.length;Ge++)Oe=be(se,le[Ge],ye),Oe!==null&&(ie=A(Oe,ie,Ge),ft===null?Me=Oe:ft.sibling=Oe,ft=Oe);return at&&pi(se,Ge),Me}for(Oe=y(Oe);Ge<le.length;Ge++)it=he(Oe,se,Ge,le[Ge],ye),it!==null&&(s&&it.alternate!==null&&Oe.delete(it.key===null?Ge:it.key),ie=A(it,ie,Ge),ft===null?Me=it:ft.sibling=it,ft=it);return s&&Oe.forEach(function(va){return u(se,va)}),at&&pi(se,Ge),Me}function Pe(se,ie,le,ye){if(le==null)throw Error(r(151));for(var Me=null,ft=null,Oe=ie,Ge=ie=0,it=null,dt=le.next();Oe!==null&&!dt.done;Ge++,dt=le.next()){Oe.index>Ge?(it=Oe,Oe=null):it=Oe.sibling;var va=ce(se,Oe,dt.value,ye);if(va===null){Oe===null&&(Oe=it);break}s&&Oe&&va.alternate===null&&u(se,Oe),ie=A(va,ie,Ge),ft===null?Me=va:ft.sibling=va,ft=va,Oe=it}if(dt.done)return h(se,Oe),at&&pi(se,Ge),Me;if(Oe===null){for(;!dt.done;Ge++,dt=le.next())dt=be(se,dt.value,ye),dt!==null&&(ie=A(dt,ie,Ge),ft===null?Me=dt:ft.sibling=dt,ft=dt);return at&&pi(se,Ge),Me}for(Oe=y(Oe);!dt.done;Ge++,dt=le.next())dt=he(Oe,se,Ge,dt.value,ye),dt!==null&&(s&&dt.alternate!==null&&Oe.delete(dt.key===null?Ge:dt.key),ie=A(dt,ie,Ge),ft===null?Me=dt:ft.sibling=dt,ft=dt);return s&&Oe.forEach(function(Eq){return u(se,Eq)}),at&&pi(se,Ge),Me}function At(se,ie,le,ye){if(typeof le=="object"&&le!==null&&le.type===S&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case g:e:{for(var Me=le.key;ie!==null;){if(ie.key===Me){if(Me=le.type,Me===S){if(ie.tag===7){h(se,ie.sibling),ye=E(ie,le.props.children),ye.return=se,se=ye;break e}}else if(ie.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===j&&ts(Me)===ie.type){h(se,ie.sibling),ye=E(ie,le.props),Hl(ye,le),ye.return=se,se=ye;break e}h(se,ie);break}else u(se,ie);ie=ie.sibling}le.type===S?(ye=Xa(le.props.children,se.mode,ye,le.key),ye.return=se,se=ye):(ye=gf(le.type,le.key,le.props,null,se.mode,ye),Hl(ye,le),ye.return=se,se=ye)}return z(se);case _:e:{for(Me=le.key;ie!==null;){if(ie.key===Me)if(ie.tag===4&&ie.stateNode.containerInfo===le.containerInfo&&ie.stateNode.implementation===le.implementation){h(se,ie.sibling),ye=E(ie,le.children||[]),ye.return=se,se=ye;break e}else{h(se,ie);break}else u(se,ie);ie=ie.sibling}ye=eg(le,se.mode,ye),ye.return=se,se=ye}return z(se);case j:return le=ts(le),At(se,ie,le,ye)}if(V(le))return Ae(se,ie,le,ye);if(F(le)){if(Me=F(le),typeof Me!="function")throw Error(r(150));return le=Me.call(le),Pe(se,ie,le,ye)}if(typeof le.then=="function")return At(se,ie,Sf(le),ye);if(le.$$typeof===v)return At(se,ie,vf(se,le),ye);Ef(se,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,ie!==null&&ie.tag===6?(h(se,ie.sibling),ye=E(ie,le),ye.return=se,se=ye):(h(se,ie),ye=Jm(le,se.mode,ye),ye.return=se,se=ye),z(se)):h(se,ie)}return function(se,ie,le,ye){try{Ul=0;var Me=At(se,ie,le,ye);return ho=null,Me}catch(Oe){if(Oe===fo||Oe===xf)throw Oe;var ft=Hn(29,Oe,null,se.mode);return ft.lanes=ye,ft.return=se,ft}finally{}}}var rs=Xk(!0),Wk=Xk(!1),na=!1;function dg(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hg(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function ra(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function ia(s,u,h){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(mt&2)!==0){var E=y.pending;return E===null?u.next=u:(u.next=E.next,E.next=u),y.pending=u,u=mf(s),$k(s,null,h),u}return pf(s,y,u,h),mf(s)}function Vl(s,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194048)!==0)){var y=u.lanes;y&=s.pendingLanes,h|=y,u.lanes=h,Yc(s,h)}}function pg(s,u){var h=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,h===y)){var E=null,A=null;if(h=h.firstBaseUpdate,h!==null){do{var z={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};A===null?E=A=z:A=A.next=z,h=h.next}while(h!==null);A===null?E=A=u:A=A.next=u}else E=A=u;h={baseState:y.baseState,firstBaseUpdate:E,lastBaseUpdate:A,shared:y.shared,callbacks:y.callbacks},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=u:s.next=u,h.lastBaseUpdate=u}var mg=!1;function Gl(){if(mg){var s=co;if(s!==null)throw s}}function Zl(s,u,h,y){mg=!1;var E=s.updateQueue;na=!1;var A=E.firstBaseUpdate,z=E.lastBaseUpdate,K=E.shared.pending;if(K!==null){E.shared.pending=null;var te=K,ue=te.next;te.next=null,z===null?A=ue:z.next=ue,z=te;var ge=s.alternate;ge!==null&&(ge=ge.updateQueue,K=ge.lastBaseUpdate,K!==z&&(K===null?ge.firstBaseUpdate=ue:K.next=ue,ge.lastBaseUpdate=te))}if(A!==null){var be=E.baseState;z=0,ge=ue=te=null,K=A;do{var ce=K.lane&-536870913,he=ce!==K.lane;if(he?(rt&ce)===ce:(y&ce)===ce){ce!==0&&ce===uo&&(mg=!0),ge!==null&&(ge=ge.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var Ae=s,Pe=K;ce=u;var At=h;switch(Pe.tag){case 1:if(Ae=Pe.payload,typeof Ae=="function"){be=Ae.call(At,be,ce);break e}be=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Pe.payload,ce=typeof Ae=="function"?Ae.call(At,be,ce):Ae,ce==null)break e;be=p({},be,ce);break e;case 2:na=!0}}ce=K.callback,ce!==null&&(s.flags|=64,he&&(s.flags|=8192),he=E.callbacks,he===null?E.callbacks=[ce]:he.push(ce))}else he={lane:ce,tag:K.tag,payload:K.payload,callback:K.callback,next:null},ge===null?(ue=ge=he,te=be):ge=ge.next=he,z|=ce;if(K=K.next,K===null){if(K=E.shared.pending,K===null)break;he=K,K=he.next,he.next=null,E.lastBaseUpdate=he,E.shared.pending=null}}while(!0);ge===null&&(te=be),E.baseState=te,E.firstBaseUpdate=ue,E.lastBaseUpdate=ge,A===null&&(E.shared.lanes=0),ua|=z,s.lanes=z,s.memoizedState=be}}function Qk(s,u){if(typeof s!="function")throw Error(r(191,s));s.call(u)}function Jk(s,u){var h=s.callbacks;if(h!==null)for(s.callbacks=null,s=0;s<h.length;s++)Qk(h[s],u)}var po=P(null),kf=P(0);function e2(s,u){s=ki,R(kf,s),R(po,u),ki=s|u.baseLanes}function gg(){R(kf,ki),R(po,po.current)}function yg(){ki=kf.current,Z(po),Z(kf)}var Vn=P(null),pr=null;function aa(s){var u=s.alternate;R(Gt,Gt.current&1),R(Vn,s),pr===null&&(u===null||po.current!==null||u.memoizedState!==null)&&(pr=s)}function bg(s){R(Gt,Gt.current),R(Vn,s),pr===null&&(pr=s)}function t2(s){s.tag===22?(R(Gt,Gt.current),R(Vn,s),pr===null&&(pr=s)):sa()}function sa(){R(Gt,Gt.current),R(Vn,Vn.current)}function Gn(s){Z(Vn),pr===s&&(pr=null),Z(Gt)}var Gt=P(0);function Cf(s){for(var u=s;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||Ey(h)||ky(h)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var yi=0,Ue=null,kt=null,Xt=null,Af=!1,mo=!1,is=!1,Tf=0,Yl=0,go=null,pL=0;function Bt(){throw Error(r(321))}function vg(s,u){if(u===null)return!1;for(var h=0;h<u.length&&h<s.length;h++)if(!Un(s[h],u[h]))return!1;return!0}function _g(s,u,h,y,E,A){return yi=A,Ue=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,H.H=s===null||s.memoizedState===null?z2:Dg,is=!1,A=h(y,E),is=!1,mo&&(A=r2(u,h,y,E)),n2(s),A}function n2(s){H.H=Wl;var u=kt!==null&&kt.next!==null;if(yi=0,Xt=kt=Ue=null,Af=!1,Yl=0,go=null,u)throw Error(r(300));s===null||Wt||(s=s.dependencies,s!==null&&bf(s)&&(Wt=!0))}function r2(s,u,h,y){Ue=s;var E=0;do{if(mo&&(go=null),Yl=0,mo=!1,25<=E)throw Error(r(301));if(E+=1,Xt=kt=null,s.updateQueue!=null){var A=s.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}H.H=L2,A=u(h,y)}while(mo);return A}function mL(){var s=H.H,u=s.useState()[0];return u=typeof u.then=="function"?Kl(u):u,s=s.useState()[0],(kt!==null?kt.memoizedState:null)!==s&&(Ue.flags|=1024),u}function xg(){var s=Tf!==0;return Tf=0,s}function wg(s,u,h){u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~h}function Sg(s){if(Af){for(s=s.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}Af=!1}yi=0,Xt=kt=Ue=null,mo=!1,Yl=Tf=0,go=null}function En(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xt===null?Ue.memoizedState=Xt=s:Xt=Xt.next=s,Xt}function Zt(){if(kt===null){var s=Ue.alternate;s=s!==null?s.memoizedState:null}else s=kt.next;var u=Xt===null?Ue.memoizedState:Xt.next;if(u!==null)Xt=u,kt=s;else{if(s===null)throw Ue.alternate===null?Error(r(467)):Error(r(310));kt=s,s={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},Xt===null?Ue.memoizedState=Xt=s:Xt=Xt.next=s}return Xt}function Nf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kl(s){var u=Yl;return Yl+=1,go===null&&(go=[]),s=Zk(go,s,u),u=Ue,(Xt===null?u.memoizedState:Xt.next)===null&&(u=u.alternate,H.H=u===null||u.memoizedState===null?z2:Dg),s}function Of(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Kl(s);if(s.$$typeof===v)return dn(s)}throw Error(r(438,String(s)))}function Eg(s){var u=null,h=Ue.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var y=Ue.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(E){return E.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=Nf(),Ue.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(s),y=0;y<s;y++)h[y]=M;return u.index++,h}function bi(s,u){return typeof u=="function"?u(s):u}function Rf(s){var u=Zt();return kg(u,kt,s)}function kg(s,u,h){var y=s.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=h;var E=s.baseQueue,A=y.pending;if(A!==null){if(E!==null){var z=E.next;E.next=A.next,A.next=z}u.baseQueue=E=A,y.pending=null}if(A=s.baseState,E===null)s.memoizedState=A;else{u=E.next;var K=z=null,te=null,ue=u,ge=!1;do{var be=ue.lane&-536870913;if(be!==ue.lane?(rt&be)===be:(yi&be)===be){var ce=ue.revertLane;if(ce===0)te!==null&&(te=te.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),be===uo&&(ge=!0);else if((yi&ce)===ce){ue=ue.next,ce===uo&&(ge=!0);continue}else be={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},te===null?(K=te=be,z=A):te=te.next=be,Ue.lanes|=ce,ua|=ce;be=ue.action,is&&h(A,be),A=ue.hasEagerState?ue.eagerState:h(A,be)}else ce={lane:be,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},te===null?(K=te=ce,z=A):te=te.next=ce,Ue.lanes|=be,ua|=be;ue=ue.next}while(ue!==null&&ue!==u);if(te===null?z=A:te.next=K,!Un(A,s.memoizedState)&&(Wt=!0,ge&&(h=co,h!==null)))throw h;s.memoizedState=A,s.baseState=z,s.baseQueue=te,y.lastRenderedState=A}return E===null&&(y.lanes=0),[s.memoizedState,y.dispatch]}function Cg(s){var u=Zt(),h=u.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=s;var y=h.dispatch,E=h.pending,A=u.memoizedState;if(E!==null){h.pending=null;var z=E=E.next;do A=s(A,z.action),z=z.next;while(z!==E);Un(A,u.memoizedState)||(Wt=!0),u.memoizedState=A,u.baseQueue===null&&(u.baseState=A),h.lastRenderedState=A}return[A,y]}function i2(s,u,h){var y=Ue,E=Zt(),A=at;if(A){if(h===void 0)throw Error(r(407));h=h()}else h=u();var z=!Un((kt||E).memoizedState,h);if(z&&(E.memoizedState=h,Wt=!0),E=E.queue,Ng(o2.bind(null,y,E,s),[s]),E.getSnapshot!==u||z||Xt!==null&&Xt.memoizedState.tag&1){if(y.flags|=2048,yo(9,{destroy:void 0},s2.bind(null,y,E,h,u),null),Nt===null)throw Error(r(349));A||(yi&127)!==0||a2(y,u,h)}return h}function a2(s,u,h){s.flags|=16384,s={getSnapshot:u,value:h},u=Ue.updateQueue,u===null?(u=Nf(),Ue.updateQueue=u,u.stores=[s]):(h=u.stores,h===null?u.stores=[s]:h.push(s))}function s2(s,u,h,y){u.value=h,u.getSnapshot=y,l2(u)&&u2(s)}function o2(s,u,h){return h(function(){l2(u)&&u2(s)})}function l2(s){var u=s.getSnapshot;s=s.value;try{var h=u();return!Un(s,h)}catch{return!0}}function u2(s){var u=Ka(s,2);u!==null&&Pn(u,s,2)}function Ag(s){var u=En();if(typeof s=="function"){var h=s;if(s=h(),is){bn(!0);try{h()}finally{bn(!1)}}}return u.memoizedState=u.baseState=s,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:s},u}function c2(s,u,h,y){return s.baseState=h,kg(s,kt,typeof y=="function"?y:bi)}function gL(s,u,h,y,E){if($f(s))throw Error(r(485));if(s=u.action,s!==null){var A={payload:E,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(z){A.listeners.push(z)}};H.T!==null?h(!0):A.isTransition=!1,y(A),h=u.pending,h===null?(A.next=u.pending=A,f2(u,A)):(A.next=h.next,u.pending=h.next=A)}}function f2(s,u){var h=u.action,y=u.payload,E=s.state;if(u.isTransition){var A=H.T,z={};H.T=z;try{var K=h(E,y),te=H.S;te!==null&&te(z,K),d2(s,u,K)}catch(ue){Tg(s,u,ue)}finally{A!==null&&z.types!==null&&(A.types=z.types),H.T=A}}else try{A=h(E,y),d2(s,u,A)}catch(ue){Tg(s,u,ue)}}function d2(s,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(y){h2(s,u,y)},function(y){return Tg(s,u,y)}):h2(s,u,h)}function h2(s,u,h){u.status="fulfilled",u.value=h,p2(u),s.state=h,u=s.pending,u!==null&&(h=u.next,h===u?s.pending=null:(h=h.next,u.next=h,f2(s,h)))}function Tg(s,u,h){var y=s.pending;if(s.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=h,p2(u),u=u.next;while(u!==y)}s.action=null}function p2(s){s=s.listeners;for(var u=0;u<s.length;u++)(0,s[u])()}function m2(s,u){return u}function g2(s,u){if(at){var h=Nt.formState;if(h!==null){e:{var y=Ue;if(at){if(It){t:{for(var E=It,A=hr;E.nodeType!==8;){if(!A){E=null;break t}if(E=mr(E.nextSibling),E===null){E=null;break t}}A=E.data,E=A==="F!"||A==="F"?E:null}if(E){It=mr(E.nextSibling),y=E.data==="F!";break e}}ea(y)}y=!1}y&&(u=h[0])}}return h=En(),h.memoizedState=h.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:m2,lastRenderedState:u},h.queue=y,h=D2.bind(null,Ue,y),y.dispatch=h,y=Ag(!1),A=$g.bind(null,Ue,!1,y.queue),y=En(),E={state:u,dispatch:null,action:s,pending:null},y.queue=E,h=gL.bind(null,Ue,E,A,h),E.dispatch=h,y.memoizedState=s,[u,h,!1]}function y2(s){var u=Zt();return b2(u,kt,s)}function b2(s,u,h){if(u=kg(s,u,m2)[0],s=Rf(bi)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var y=Kl(u)}catch(z){throw z===fo?xf:z}else y=u;u=Zt();var E=u.queue,A=E.dispatch;return h!==u.memoizedState&&(Ue.flags|=2048,yo(9,{destroy:void 0},yL.bind(null,E,h),null)),[y,A,s]}function yL(s,u){s.action=u}function v2(s){var u=Zt(),h=kt;if(h!==null)return b2(u,h,s);Zt(),u=u.memoizedState,h=Zt();var y=h.queue.dispatch;return h.memoizedState=s,[u,y,!1]}function yo(s,u,h,y){return s={tag:s,create:h,deps:y,inst:u,next:null},u=Ue.updateQueue,u===null&&(u=Nf(),Ue.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=s.next=s:(y=h.next,h.next=s,s.next=y,u.lastEffect=s),s}function _2(){return Zt().memoizedState}function jf(s,u,h,y){var E=En();Ue.flags|=s,E.memoizedState=yo(1|u,{destroy:void 0},h,y===void 0?null:y)}function Mf(s,u,h,y){var E=Zt();y=y===void 0?null:y;var A=E.memoizedState.inst;kt!==null&&y!==null&&vg(y,kt.memoizedState.deps)?E.memoizedState=yo(u,A,h,y):(Ue.flags|=s,E.memoizedState=yo(1|u,A,h,y))}function x2(s,u){jf(8390656,8,s,u)}function Ng(s,u){Mf(2048,8,s,u)}function bL(s){Ue.flags|=4;var u=Ue.updateQueue;if(u===null)u=Nf(),Ue.updateQueue=u,u.events=[s];else{var h=u.events;h===null?u.events=[s]:h.push(s)}}function w2(s){var u=Zt().memoizedState;return bL({ref:u,nextImpl:s}),function(){if((mt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function S2(s,u){return Mf(4,2,s,u)}function E2(s,u){return Mf(4,4,s,u)}function k2(s,u){if(typeof u=="function"){s=s();var h=u(s);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function C2(s,u,h){h=h!=null?h.concat([s]):null,Mf(4,4,k2.bind(null,u,s),h)}function Og(){}function A2(s,u){var h=Zt();u=u===void 0?null:u;var y=h.memoizedState;return u!==null&&vg(u,y[1])?y[0]:(h.memoizedState=[s,u],s)}function T2(s,u){var h=Zt();u=u===void 0?null:u;var y=h.memoizedState;if(u!==null&&vg(u,y[1]))return y[0];if(y=s(),is){bn(!0);try{s()}finally{bn(!1)}}return h.memoizedState=[y,u],y}function Rg(s,u,h){return h===void 0||(yi&1073741824)!==0&&(rt&261930)===0?s.memoizedState=u:(s.memoizedState=h,s=NC(),Ue.lanes|=s,ua|=s,h)}function N2(s,u,h,y){return Un(h,u)?h:po.current!==null?(s=Rg(s,h,y),Un(s,u)||(Wt=!0),s):(yi&42)===0||(yi&1073741824)!==0&&(rt&261930)===0?(Wt=!0,s.memoizedState=h):(s=NC(),Ue.lanes|=s,ua|=s,u)}function O2(s,u,h,y,E){var A=G.p;G.p=A!==0&&8>A?A:8;var z=H.T,K={};H.T=K,$g(s,!1,u,h);try{var te=E(),ue=H.S;if(ue!==null&&ue(K,te),te!==null&&typeof te=="object"&&typeof te.then=="function"){var ge=hL(te,y);Xl(s,u,ge,Kn(s))}else Xl(s,u,y,Kn(s))}catch(be){Xl(s,u,{then:function(){},status:"rejected",reason:be},Kn())}finally{G.p=A,z!==null&&K.types!==null&&(z.types=K.types),H.T=z}}function vL(){}function jg(s,u,h,y){if(s.tag!==5)throw Error(r(476));var E=R2(s).queue;O2(s,E,u,X,h===null?vL:function(){return j2(s),h(y)})}function R2(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:X},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:h},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function j2(s){var u=R2(s);u.next===null&&(u=s.alternate.memoizedState),Xl(s,u.next.queue,{},Kn())}function Mg(){return dn(hu)}function M2(){return Zt().memoizedState}function $2(){return Zt().memoizedState}function _L(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var h=Kn();s=ra(h);var y=ia(u,s,h);y!==null&&(Pn(y,u,h),Vl(y,u,h)),u={cache:lg()},s.payload=u;return}u=u.return}}function xL(s,u,h){var y=Kn();h={lane:y,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},$f(s)?I2(u,h):(h=Wm(s,u,h,y),h!==null&&(Pn(h,s,y),P2(h,u,y)))}function D2(s,u,h){var y=Kn();Xl(s,u,h,y)}function Xl(s,u,h,y){var E={lane:y,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if($f(s))I2(u,E);else{var A=s.alternate;if(s.lanes===0&&(A===null||A.lanes===0)&&(A=u.lastRenderedReducer,A!==null))try{var z=u.lastRenderedState,K=A(z,h);if(E.hasEagerState=!0,E.eagerState=K,Un(K,z))return pf(s,u,E,0),Nt===null&&hf(),!1}catch{}finally{}if(h=Wm(s,u,E,y),h!==null)return Pn(h,s,y),P2(h,u,y),!0}return!1}function $g(s,u,h,y){if(y={lane:2,revertLane:dy(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},$f(s)){if(u)throw Error(r(479))}else u=Wm(s,h,y,2),u!==null&&Pn(u,s,2)}function $f(s){var u=s.alternate;return s===Ue||u!==null&&u===Ue}function I2(s,u){mo=Af=!0;var h=s.pending;h===null?u.next=u:(u.next=h.next,h.next=u),s.pending=u}function P2(s,u,h){if((h&4194048)!==0){var y=u.lanes;y&=s.pendingLanes,h|=y,u.lanes=h,Yc(s,h)}}var Wl={readContext:dn,use:Of,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useLayoutEffect:Bt,useInsertionEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useSyncExternalStore:Bt,useId:Bt,useHostTransitionStatus:Bt,useFormState:Bt,useActionState:Bt,useOptimistic:Bt,useMemoCache:Bt,useCacheRefresh:Bt};Wl.useEffectEvent=Bt;var z2={readContext:dn,use:Of,useCallback:function(s,u){return En().memoizedState=[s,u===void 0?null:u],s},useContext:dn,useEffect:x2,useImperativeHandle:function(s,u,h){h=h!=null?h.concat([s]):null,jf(4194308,4,k2.bind(null,u,s),h)},useLayoutEffect:function(s,u){return jf(4194308,4,s,u)},useInsertionEffect:function(s,u){jf(4,2,s,u)},useMemo:function(s,u){var h=En();u=u===void 0?null:u;var y=s();if(is){bn(!0);try{s()}finally{bn(!1)}}return h.memoizedState=[y,u],y},useReducer:function(s,u,h){var y=En();if(h!==void 0){var E=h(u);if(is){bn(!0);try{h(u)}finally{bn(!1)}}}else E=u;return y.memoizedState=y.baseState=E,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:E},y.queue=s,s=s.dispatch=xL.bind(null,Ue,s),[y.memoizedState,s]},useRef:function(s){var u=En();return s={current:s},u.memoizedState=s},useState:function(s){s=Ag(s);var u=s.queue,h=D2.bind(null,Ue,u);return u.dispatch=h,[s.memoizedState,h]},useDebugValue:Og,useDeferredValue:function(s,u){var h=En();return Rg(h,s,u)},useTransition:function(){var s=Ag(!1);return s=O2.bind(null,Ue,s.queue,!0,!1),En().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,h){var y=Ue,E=En();if(at){if(h===void 0)throw Error(r(407));h=h()}else{if(h=u(),Nt===null)throw Error(r(349));(rt&127)!==0||a2(y,u,h)}E.memoizedState=h;var A={value:h,getSnapshot:u};return E.queue=A,x2(o2.bind(null,y,A,s),[s]),y.flags|=2048,yo(9,{destroy:void 0},s2.bind(null,y,A,h,u),null),h},useId:function(){var s=En(),u=Nt.identifierPrefix;if(at){var h=Ur,y=Br;h=(y&~(1<<32-_t(y)-1)).toString(32)+h,u="_"+u+"R_"+h,h=Tf++,0<h&&(u+="H"+h.toString(32)),u+="_"}else h=pL++,u="_"+u+"r_"+h.toString(32)+"_";return s.memoizedState=u},useHostTransitionStatus:Mg,useFormState:g2,useActionState:g2,useOptimistic:function(s){var u=En();u.memoizedState=u.baseState=s;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=$g.bind(null,Ue,!0,h),h.dispatch=u,[s,u]},useMemoCache:Eg,useCacheRefresh:function(){return En().memoizedState=_L.bind(null,Ue)},useEffectEvent:function(s){var u=En(),h={impl:s};return u.memoizedState=h,function(){if((mt&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},Dg={readContext:dn,use:Of,useCallback:A2,useContext:dn,useEffect:Ng,useImperativeHandle:C2,useInsertionEffect:S2,useLayoutEffect:E2,useMemo:T2,useReducer:Rf,useRef:_2,useState:function(){return Rf(bi)},useDebugValue:Og,useDeferredValue:function(s,u){var h=Zt();return N2(h,kt.memoizedState,s,u)},useTransition:function(){var s=Rf(bi)[0],u=Zt().memoizedState;return[typeof s=="boolean"?s:Kl(s),u]},useSyncExternalStore:i2,useId:M2,useHostTransitionStatus:Mg,useFormState:y2,useActionState:y2,useOptimistic:function(s,u){var h=Zt();return c2(h,kt,s,u)},useMemoCache:Eg,useCacheRefresh:$2};Dg.useEffectEvent=w2;var L2={readContext:dn,use:Of,useCallback:A2,useContext:dn,useEffect:Ng,useImperativeHandle:C2,useInsertionEffect:S2,useLayoutEffect:E2,useMemo:T2,useReducer:Cg,useRef:_2,useState:function(){return Cg(bi)},useDebugValue:Og,useDeferredValue:function(s,u){var h=Zt();return kt===null?Rg(h,s,u):N2(h,kt.memoizedState,s,u)},useTransition:function(){var s=Cg(bi)[0],u=Zt().memoizedState;return[typeof s=="boolean"?s:Kl(s),u]},useSyncExternalStore:i2,useId:M2,useHostTransitionStatus:Mg,useFormState:v2,useActionState:v2,useOptimistic:function(s,u){var h=Zt();return kt!==null?c2(h,kt,s,u):(h.baseState=s,[s,h.queue.dispatch])},useMemoCache:Eg,useCacheRefresh:$2};L2.useEffectEvent=w2;function Ig(s,u,h,y){u=s.memoizedState,h=h(y,u),h=h==null?u:p({},u,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}var Pg={enqueueSetState:function(s,u,h){s=s._reactInternals;var y=Kn(),E=ra(y);E.payload=u,h!=null&&(E.callback=h),u=ia(s,E,y),u!==null&&(Pn(u,s,y),Vl(u,s,y))},enqueueReplaceState:function(s,u,h){s=s._reactInternals;var y=Kn(),E=ra(y);E.tag=1,E.payload=u,h!=null&&(E.callback=h),u=ia(s,E,y),u!==null&&(Pn(u,s,y),Vl(u,s,y))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var h=Kn(),y=ra(h);y.tag=2,u!=null&&(y.callback=u),u=ia(s,y,h),u!==null&&(Pn(u,s,h),Vl(u,s,h))}};function q2(s,u,h,y,E,A,z){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,A,z):u.prototype&&u.prototype.isPureReactComponent?!Pl(h,y)||!Pl(E,A):!0}function F2(s,u,h,y){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,y),u.state!==s&&Pg.enqueueReplaceState(u,u.state,null)}function as(s,u){var h=u;if("ref"in u){h={};for(var y in u)y!=="ref"&&(h[y]=u[y])}if(s=s.defaultProps){h===u&&(h=p({},h));for(var E in s)h[E]===void 0&&(h[E]=s[E])}return h}function B2(s){df(s)}function U2(s){console.error(s)}function H2(s){df(s)}function Df(s,u){try{var h=s.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function V2(s,u,h){try{var y=s.onCaughtError;y(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function zg(s,u,h){return h=ra(h),h.tag=3,h.payload={element:null},h.callback=function(){Df(s,u)},h}function G2(s){return s=ra(s),s.tag=3,s}function Z2(s,u,h,y){var E=h.type.getDerivedStateFromError;if(typeof E=="function"){var A=y.value;s.payload=function(){return E(A)},s.callback=function(){V2(u,h,y)}}var z=h.stateNode;z!==null&&typeof z.componentDidCatch=="function"&&(s.callback=function(){V2(u,h,y),typeof E!="function"&&(ca===null?ca=new Set([this]):ca.add(this));var K=y.stack;this.componentDidCatch(y.value,{componentStack:K!==null?K:""})})}function wL(s,u,h,y,E){if(h.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=h.alternate,u!==null&&lo(u,h,E,!0),h=Vn.current,h!==null){switch(h.tag){case 31:case 13:return pr===null?Zf():h.alternate===null&&Ut===0&&(Ut=3),h.flags&=-257,h.flags|=65536,h.lanes=E,y===wf?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([y]):u.add(y),uy(s,y,E)),!1;case 22:return h.flags|=65536,y===wf?h.flags|=16384:(u=h.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},h.updateQueue=u):(h=u.retryQueue,h===null?u.retryQueue=new Set([y]):h.add(y)),uy(s,y,E)),!1}throw Error(r(435,h.tag))}return uy(s,y,E),Zf(),!1}if(at)return u=Vn.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=E,y!==rg&&(s=Error(r(422),{cause:y}),ql(cr(s,h)))):(y!==rg&&(u=Error(r(423),{cause:y}),ql(cr(u,h))),s=s.current.alternate,s.flags|=65536,E&=-E,s.lanes|=E,y=cr(y,h),E=zg(s.stateNode,y,E),pg(s,E),Ut!==4&&(Ut=2)),!1;var A=Error(r(520),{cause:y});if(A=cr(A,h),au===null?au=[A]:au.push(A),Ut!==4&&(Ut=2),u===null)return!0;y=cr(y,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,s=E&-E,h.lanes|=s,s=zg(h.stateNode,y,s),pg(h,s),!1;case 1:if(u=h.type,A=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(ca===null||!ca.has(A))))return h.flags|=65536,E&=-E,h.lanes|=E,E=G2(E),Z2(E,s,h,y),pg(h,E),!1}h=h.return}while(h!==null);return!1}var Lg=Error(r(461)),Wt=!1;function hn(s,u,h,y){u.child=s===null?Wk(u,null,h,y):rs(u,s.child,h,y)}function Y2(s,u,h,y,E){h=h.render;var A=u.ref;if("ref"in y){var z={};for(var K in y)K!=="ref"&&(z[K]=y[K])}else z=y;return Ja(u),y=_g(s,u,h,z,A,E),K=xg(),s!==null&&!Wt?(wg(s,u,E),vi(s,u,E)):(at&&K&&tg(u),u.flags|=1,hn(s,u,y,E),u.child)}function K2(s,u,h,y,E){if(s===null){var A=h.type;return typeof A=="function"&&!Qm(A)&&A.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=A,X2(s,u,A,y,E)):(s=gf(h.type,null,y,u,u.mode,E),s.ref=u.ref,s.return=u,u.child=s)}if(A=s.child,!Zg(s,E)){var z=A.memoizedProps;if(h=h.compare,h=h!==null?h:Pl,h(z,y)&&s.ref===u.ref)return vi(s,u,E)}return u.flags|=1,s=hi(A,y),s.ref=u.ref,s.return=u,u.child=s}function X2(s,u,h,y,E){if(s!==null){var A=s.memoizedProps;if(Pl(A,y)&&s.ref===u.ref)if(Wt=!1,u.pendingProps=y=A,Zg(s,E))(s.flags&131072)!==0&&(Wt=!0);else return u.lanes=s.lanes,vi(s,u,E)}return qg(s,u,h,y,E)}function W2(s,u,h,y){var E=y.children,A=s!==null?s.memoizedState:null;if(s===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((u.flags&128)!==0){if(A=A!==null?A.baseLanes|h:h,s!==null){for(y=u.child=s.child,E=0;y!==null;)E=E|y.lanes|y.childLanes,y=y.sibling;y=E&~A}else y=0,u.child=null;return Q2(s,u,A,h,y)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},s!==null&&_f(u,A!==null?A.cachePool:null),A!==null?e2(u,A):gg(),t2(u);else return y=u.lanes=536870912,Q2(s,u,A!==null?A.baseLanes|h:h,h,y)}else A!==null?(_f(u,A.cachePool),e2(u,A),sa(),u.memoizedState=null):(s!==null&&_f(u,null),gg(),sa());return hn(s,u,E,h),u.child}function Ql(s,u){return s!==null&&s.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function Q2(s,u,h,y,E){var A=cg();return A=A===null?null:{parent:Kt._currentValue,pool:A},u.memoizedState={baseLanes:h,cachePool:A},s!==null&&_f(u,null),gg(),t2(u),s!==null&&lo(s,u,y,!0),u.childLanes=E,null}function If(s,u){return u=zf({mode:u.mode,children:u.children},s.mode),u.ref=s.ref,s.child=u,u.return=s,u}function J2(s,u,h){return rs(u,s.child,null,h),s=If(u,u.pendingProps),s.flags|=2,Gn(u),u.memoizedState=null,s}function SL(s,u,h){var y=u.pendingProps,E=(u.flags&128)!==0;if(u.flags&=-129,s===null){if(at){if(y.mode==="hidden")return s=If(u,y),u.lanes=536870912,Ql(null,s);if(bg(u),(s=It)?(s=fA(s,hr),s=s!==null&&s.data==="&"?s:null,s!==null&&(u.memoizedState={dehydrated:s,treeContext:Qi!==null?{id:Br,overflow:Ur}:null,retryLane:536870912,hydrationErrors:null},h=Ik(s),h.return=u,u.child=h,fn=u,It=null)):s=null,s===null)throw ea(u);return u.lanes=536870912,null}return If(u,y)}var A=s.memoizedState;if(A!==null){var z=A.dehydrated;if(bg(u),E)if(u.flags&256)u.flags&=-257,u=J2(s,u,h);else if(u.memoizedState!==null)u.child=s.child,u.flags|=128,u=null;else throw Error(r(558));else if(Wt||lo(s,u,h,!1),E=(h&s.childLanes)!==0,Wt||E){if(y=Nt,y!==null&&(z=Kc(y,h),z!==0&&z!==A.retryLane))throw A.retryLane=z,Ka(s,z),Pn(y,s,z),Lg;Zf(),u=J2(s,u,h)}else s=A.treeContext,It=mr(z.nextSibling),fn=u,at=!0,Ji=null,hr=!1,s!==null&&Lk(u,s),u=If(u,y),u.flags|=4096;return u}return s=hi(s.child,{mode:y.mode,children:y.children}),s.ref=u.ref,u.child=s,s.return=u,s}function Pf(s,u){var h=u.ref;if(h===null)s!==null&&s.ref!==null&&(u.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(s===null||s.ref!==h)&&(u.flags|=4194816)}}function qg(s,u,h,y,E){return Ja(u),h=_g(s,u,h,y,void 0,E),y=xg(),s!==null&&!Wt?(wg(s,u,E),vi(s,u,E)):(at&&y&&tg(u),u.flags|=1,hn(s,u,h,E),u.child)}function eC(s,u,h,y,E,A){return Ja(u),u.updateQueue=null,h=r2(u,y,h,E),n2(s),y=xg(),s!==null&&!Wt?(wg(s,u,A),vi(s,u,A)):(at&&y&&tg(u),u.flags|=1,hn(s,u,h,A),u.child)}function tC(s,u,h,y,E){if(Ja(u),u.stateNode===null){var A=io,z=h.contextType;typeof z=="object"&&z!==null&&(A=dn(z)),A=new h(y,A),u.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=Pg,u.stateNode=A,A._reactInternals=u,A=u.stateNode,A.props=y,A.state=u.memoizedState,A.refs={},dg(u),z=h.contextType,A.context=typeof z=="object"&&z!==null?dn(z):io,A.state=u.memoizedState,z=h.getDerivedStateFromProps,typeof z=="function"&&(Ig(u,h,z,y),A.state=u.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(z=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),z!==A.state&&Pg.enqueueReplaceState(A,A.state,null),Zl(u,y,A,E),Gl(),A.state=u.memoizedState),typeof A.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(s===null){A=u.stateNode;var K=u.memoizedProps,te=as(h,K);A.props=te;var ue=A.context,ge=h.contextType;z=io,typeof ge=="object"&&ge!==null&&(z=dn(ge));var be=h.getDerivedStateFromProps;ge=typeof be=="function"||typeof A.getSnapshotBeforeUpdate=="function",K=u.pendingProps!==K,ge||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(K||ue!==z)&&F2(u,A,y,z),na=!1;var ce=u.memoizedState;A.state=ce,Zl(u,y,A,E),Gl(),ue=u.memoizedState,K||ce!==ue||na?(typeof be=="function"&&(Ig(u,h,be,y),ue=u.memoizedState),(te=na||q2(u,h,te,y,ce,ue,z))?(ge||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"&&(u.flags|=4194308)):(typeof A.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=ue),A.props=y,A.state=ue,A.context=z,y=te):(typeof A.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{A=u.stateNode,hg(s,u),z=u.memoizedProps,ge=as(h,z),A.props=ge,be=u.pendingProps,ce=A.context,ue=h.contextType,te=io,typeof ue=="object"&&ue!==null&&(te=dn(ue)),K=h.getDerivedStateFromProps,(ue=typeof K=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(z!==be||ce!==te)&&F2(u,A,y,te),na=!1,ce=u.memoizedState,A.state=ce,Zl(u,y,A,E),Gl();var he=u.memoizedState;z!==be||ce!==he||na||s!==null&&s.dependencies!==null&&bf(s.dependencies)?(typeof K=="function"&&(Ig(u,h,K,y),he=u.memoizedState),(ge=na||q2(u,h,ge,y,ce,he,te)||s!==null&&s.dependencies!==null&&bf(s.dependencies))?(ue||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(y,he,te),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(y,he,te)),typeof A.componentDidUpdate=="function"&&(u.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof A.componentDidUpdate!="function"||z===s.memoizedProps&&ce===s.memoizedState||(u.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||z===s.memoizedProps&&ce===s.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=he),A.props=y,A.state=he,A.context=te,y=ge):(typeof A.componentDidUpdate!="function"||z===s.memoizedProps&&ce===s.memoizedState||(u.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||z===s.memoizedProps&&ce===s.memoizedState||(u.flags|=1024),y=!1)}return A=y,Pf(s,u),y=(u.flags&128)!==0,A||y?(A=u.stateNode,h=y&&typeof h.getDerivedStateFromError!="function"?null:A.render(),u.flags|=1,s!==null&&y?(u.child=rs(u,s.child,null,E),u.child=rs(u,null,h,E)):hn(s,u,h,E),u.memoizedState=A.state,s=u.child):s=vi(s,u,E),s}function nC(s,u,h,y){return Wa(),u.flags|=256,hn(s,u,h,y),u.child}var Fg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bg(s){return{baseLanes:s,cachePool:Vk()}}function Ug(s,u,h){return s=s!==null?s.childLanes&~h:0,u&&(s|=Yn),s}function rC(s,u,h){var y=u.pendingProps,E=!1,A=(u.flags&128)!==0,z;if((z=A)||(z=s!==null&&s.memoizedState===null?!1:(Gt.current&2)!==0),z&&(E=!0,u.flags&=-129),z=(u.flags&32)!==0,u.flags&=-33,s===null){if(at){if(E?aa(u):sa(),(s=It)?(s=fA(s,hr),s=s!==null&&s.data!=="&"?s:null,s!==null&&(u.memoizedState={dehydrated:s,treeContext:Qi!==null?{id:Br,overflow:Ur}:null,retryLane:536870912,hydrationErrors:null},h=Ik(s),h.return=u,u.child=h,fn=u,It=null)):s=null,s===null)throw ea(u);return ky(s)?u.lanes=32:u.lanes=536870912,null}var K=y.children;return y=y.fallback,E?(sa(),E=u.mode,K=zf({mode:"hidden",children:K},E),y=Xa(y,E,h,null),K.return=u,y.return=u,K.sibling=y,u.child=K,y=u.child,y.memoizedState=Bg(h),y.childLanes=Ug(s,z,h),u.memoizedState=Fg,Ql(null,y)):(aa(u),Hg(u,K))}var te=s.memoizedState;if(te!==null&&(K=te.dehydrated,K!==null)){if(A)u.flags&256?(aa(u),u.flags&=-257,u=Vg(s,u,h)):u.memoizedState!==null?(sa(),u.child=s.child,u.flags|=128,u=null):(sa(),K=y.fallback,E=u.mode,y=zf({mode:"visible",children:y.children},E),K=Xa(K,E,h,null),K.flags|=2,y.return=u,K.return=u,y.sibling=K,u.child=y,rs(u,s.child,null,h),y=u.child,y.memoizedState=Bg(h),y.childLanes=Ug(s,z,h),u.memoizedState=Fg,u=Ql(null,y));else if(aa(u),ky(K)){if(z=K.nextSibling&&K.nextSibling.dataset,z)var ue=z.dgst;z=ue,y=Error(r(419)),y.stack="",y.digest=z,ql({value:y,source:null,stack:null}),u=Vg(s,u,h)}else if(Wt||lo(s,u,h,!1),z=(h&s.childLanes)!==0,Wt||z){if(z=Nt,z!==null&&(y=Kc(z,h),y!==0&&y!==te.retryLane))throw te.retryLane=y,Ka(s,y),Pn(z,s,y),Lg;Ey(K)||Zf(),u=Vg(s,u,h)}else Ey(K)?(u.flags|=192,u.child=s.child,u=null):(s=te.treeContext,It=mr(K.nextSibling),fn=u,at=!0,Ji=null,hr=!1,s!==null&&Lk(u,s),u=Hg(u,y.children),u.flags|=4096);return u}return E?(sa(),K=y.fallback,E=u.mode,te=s.child,ue=te.sibling,y=hi(te,{mode:"hidden",children:y.children}),y.subtreeFlags=te.subtreeFlags&65011712,ue!==null?K=hi(ue,K):(K=Xa(K,E,h,null),K.flags|=2),K.return=u,y.return=u,y.sibling=K,u.child=y,Ql(null,y),y=u.child,K=s.child.memoizedState,K===null?K=Bg(h):(E=K.cachePool,E!==null?(te=Kt._currentValue,E=E.parent!==te?{parent:te,pool:te}:E):E=Vk(),K={baseLanes:K.baseLanes|h,cachePool:E}),y.memoizedState=K,y.childLanes=Ug(s,z,h),u.memoizedState=Fg,Ql(s.child,y)):(aa(u),h=s.child,s=h.sibling,h=hi(h,{mode:"visible",children:y.children}),h.return=u,h.sibling=null,s!==null&&(z=u.deletions,z===null?(u.deletions=[s],u.flags|=16):z.push(s)),u.child=h,u.memoizedState=null,h)}function Hg(s,u){return u=zf({mode:"visible",children:u},s.mode),u.return=s,s.child=u}function zf(s,u){return s=Hn(22,s,null,u),s.lanes=0,s}function Vg(s,u,h){return rs(u,s.child,null,h),s=Hg(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function iC(s,u,h){s.lanes|=u;var y=s.alternate;y!==null&&(y.lanes|=u),sg(s.return,u,h)}function Gg(s,u,h,y,E,A){var z=s.memoizedState;z===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:h,tailMode:E,treeForkCount:A}:(z.isBackwards=u,z.rendering=null,z.renderingStartTime=0,z.last=y,z.tail=h,z.tailMode=E,z.treeForkCount=A)}function aC(s,u,h){var y=u.pendingProps,E=y.revealOrder,A=y.tail;y=y.children;var z=Gt.current,K=(z&2)!==0;if(K?(z=z&1|2,u.flags|=128):z&=1,R(Gt,z),hn(s,u,y,h),y=at?Ll:0,!K&&s!==null&&(s.flags&128)!==0)e:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&iC(s,h,u);else if(s.tag===19)iC(s,h,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break e;for(;s.sibling===null;){if(s.return===null||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(E){case"forwards":for(h=u.child,E=null;h!==null;)s=h.alternate,s!==null&&Cf(s)===null&&(E=h),h=h.sibling;h=E,h===null?(E=u.child,u.child=null):(E=h.sibling,h.sibling=null),Gg(u,!1,E,h,A,y);break;case"backwards":case"unstable_legacy-backwards":for(h=null,E=u.child,u.child=null;E!==null;){if(s=E.alternate,s!==null&&Cf(s)===null){u.child=E;break}s=E.sibling,E.sibling=h,h=E,E=s}Gg(u,!0,h,null,A,y);break;case"together":Gg(u,!1,null,null,void 0,y);break;default:u.memoizedState=null}return u.child}function vi(s,u,h){if(s!==null&&(u.dependencies=s.dependencies),ua|=u.lanes,(h&u.childLanes)===0)if(s!==null){if(lo(s,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(s!==null&&u.child!==s.child)throw Error(r(153));if(u.child!==null){for(s=u.child,h=hi(s,s.pendingProps),u.child=h,h.return=u;s.sibling!==null;)s=s.sibling,h=h.sibling=hi(s,s.pendingProps),h.return=u;h.sibling=null}return u.child}function Zg(s,u){return(s.lanes&u)!==0?!0:(s=s.dependencies,!!(s!==null&&bf(s)))}function EL(s,u,h){switch(u.tag){case 3:ae(u,u.stateNode.containerInfo),ta(u,Kt,s.memoizedState.cache),Wa();break;case 27:case 5:de(u);break;case 4:ae(u,u.stateNode.containerInfo);break;case 10:ta(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,bg(u),null;break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(aa(u),u.flags|=128,null):(h&u.child.childLanes)!==0?rC(s,u,h):(aa(u),s=vi(s,u,h),s!==null?s.sibling:null);aa(u);break;case 19:var E=(s.flags&128)!==0;if(y=(h&u.childLanes)!==0,y||(lo(s,u,h,!1),y=(h&u.childLanes)!==0),E){if(y)return aC(s,u,h);u.flags|=128}if(E=u.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),R(Gt,Gt.current),y)break;return null;case 22:return u.lanes=0,W2(s,u,h,u.pendingProps);case 24:ta(u,Kt,s.memoizedState.cache)}return vi(s,u,h)}function sC(s,u,h){if(s!==null)if(s.memoizedProps!==u.pendingProps)Wt=!0;else{if(!Zg(s,h)&&(u.flags&128)===0)return Wt=!1,EL(s,u,h);Wt=(s.flags&131072)!==0}else Wt=!1,at&&(u.flags&1048576)!==0&&zk(u,Ll,u.index);switch(u.lanes=0,u.tag){case 16:e:{var y=u.pendingProps;if(s=ts(u.elementType),u.type=s,typeof s=="function")Qm(s)?(y=as(s,y),u.tag=1,u=tC(null,u,s,y,h)):(u.tag=0,u=qg(null,u,s,y,h));else{if(s!=null){var E=s.$$typeof;if(E===k){u.tag=11,u=Y2(null,u,s,y,h);break e}else if(E===N){u.tag=14,u=K2(null,u,s,y,h);break e}}throw u=I(s)||s,Error(r(306,u,""))}}return u;case 0:return qg(s,u,u.type,u.pendingProps,h);case 1:return y=u.type,E=as(y,u.pendingProps),tC(s,u,y,E,h);case 3:e:{if(ae(u,u.stateNode.containerInfo),s===null)throw Error(r(387));y=u.pendingProps;var A=u.memoizedState;E=A.element,hg(s,u),Zl(u,y,null,h);var z=u.memoizedState;if(y=z.cache,ta(u,Kt,y),y!==A.cache&&og(u,[Kt],h,!0),Gl(),y=z.element,A.isDehydrated)if(A={element:y,isDehydrated:!1,cache:z.cache},u.updateQueue.baseState=A,u.memoizedState=A,u.flags&256){u=nC(s,u,y,h);break e}else if(y!==E){E=cr(Error(r(424)),u),ql(E),u=nC(s,u,y,h);break e}else{switch(s=u.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(It=mr(s.firstChild),fn=u,at=!0,Ji=null,hr=!0,h=Wk(u,null,y,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(Wa(),y===E){u=vi(s,u,h);break e}hn(s,u,y,h)}u=u.child}return u;case 26:return Pf(s,u),s===null?(h=yA(u.type,null,u.pendingProps,null))?u.memoizedState=h:at||(h=u.type,s=u.pendingProps,y=ed(Y.current).createElement(h),y[rn]=u,y[cn]=s,pn(y,h,s),Yt(y),u.stateNode=y):u.memoizedState=yA(u.type,s.memoizedProps,u.pendingProps,s.memoizedState),null;case 27:return de(u),s===null&&at&&(y=u.stateNode=pA(u.type,u.pendingProps,Y.current),fn=u,hr=!0,E=It,pa(u.type)?(Cy=E,It=mr(y.firstChild)):It=E),hn(s,u,u.pendingProps.children,h),Pf(s,u),s===null&&(u.flags|=4194304),u.child;case 5:return s===null&&at&&((E=y=It)&&(y=eq(y,u.type,u.pendingProps,hr),y!==null?(u.stateNode=y,fn=u,It=mr(y.firstChild),hr=!1,E=!0):E=!1),E||ea(u)),de(u),E=u.type,A=u.pendingProps,z=s!==null?s.memoizedProps:null,y=A.children,xy(E,A)?y=null:z!==null&&xy(E,z)&&(u.flags|=32),u.memoizedState!==null&&(E=_g(s,u,mL,null,null,h),hu._currentValue=E),Pf(s,u),hn(s,u,y,h),u.child;case 6:return s===null&&at&&((s=h=It)&&(h=tq(h,u.pendingProps,hr),h!==null?(u.stateNode=h,fn=u,It=null,s=!0):s=!1),s||ea(u)),null;case 13:return rC(s,u,h);case 4:return ae(u,u.stateNode.containerInfo),y=u.pendingProps,s===null?u.child=rs(u,null,y,h):hn(s,u,y,h),u.child;case 11:return Y2(s,u,u.type,u.pendingProps,h);case 7:return hn(s,u,u.pendingProps,h),u.child;case 8:return hn(s,u,u.pendingProps.children,h),u.child;case 12:return hn(s,u,u.pendingProps.children,h),u.child;case 10:return y=u.pendingProps,ta(u,u.type,y.value),hn(s,u,y.children,h),u.child;case 9:return E=u.type._context,y=u.pendingProps.children,Ja(u),E=dn(E),y=y(E),u.flags|=1,hn(s,u,y,h),u.child;case 14:return K2(s,u,u.type,u.pendingProps,h);case 15:return X2(s,u,u.type,u.pendingProps,h);case 19:return aC(s,u,h);case 31:return SL(s,u,h);case 22:return W2(s,u,h,u.pendingProps);case 24:return Ja(u),y=dn(Kt),s===null?(E=cg(),E===null&&(E=Nt,A=lg(),E.pooledCache=A,A.refCount++,A!==null&&(E.pooledCacheLanes|=h),E=A),u.memoizedState={parent:y,cache:E},dg(u),ta(u,Kt,E)):((s.lanes&h)!==0&&(hg(s,u),Zl(u,null,null,h),Gl()),E=s.memoizedState,A=u.memoizedState,E.parent!==y?(E={parent:y,cache:y},u.memoizedState=E,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=E),ta(u,Kt,y)):(y=A.cache,ta(u,Kt,y),y!==E.cache&&og(u,[Kt],h,!0))),hn(s,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function _i(s){s.flags|=4}function Yg(s,u,h,y,E){if((u=(s.mode&32)!==0)&&(u=!1),u){if(s.flags|=16777216,(E&335544128)===E)if(s.stateNode.complete)s.flags|=8192;else if(MC())s.flags|=8192;else throw ns=wf,fg}else s.flags&=-16777217}function oC(s,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!wA(u))if(MC())s.flags|=8192;else throw ns=wf,fg}function Lf(s,u){u!==null&&(s.flags|=4),s.flags&16384&&(u=s.tag!==22?Gc():536870912,s.lanes|=u,xo|=u)}function Jl(s,u){if(!at)switch(s.tailMode){case"hidden":u=s.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var y=null;h!==null;)h.alternate!==null&&(y=h),h=h.sibling;y===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function Pt(s){var u=s.alternate!==null&&s.alternate.child===s.child,h=0,y=0;if(u)for(var E=s.child;E!==null;)h|=E.lanes|E.childLanes,y|=E.subtreeFlags&65011712,y|=E.flags&65011712,E.return=s,E=E.sibling;else for(E=s.child;E!==null;)h|=E.lanes|E.childLanes,y|=E.subtreeFlags,y|=E.flags,E.return=s,E=E.sibling;return s.subtreeFlags|=y,s.childLanes=h,u}function kL(s,u,h){var y=u.pendingProps;switch(ng(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pt(u),null;case 1:return Pt(u),null;case 3:return h=u.stateNode,y=null,s!==null&&(y=s.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),gi(Kt),re(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(s===null||s.child===null)&&(oo(u)?_i(u):s===null||s.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,ig())),Pt(u),null;case 26:var E=u.type,A=u.memoizedState;return s===null?(_i(u),A!==null?(Pt(u),oC(u,A)):(Pt(u),Yg(u,E,null,y,h))):A?A!==s.memoizedState?(_i(u),Pt(u),oC(u,A)):(Pt(u),u.flags&=-16777217):(s=s.memoizedProps,s!==y&&_i(u),Pt(u),Yg(u,E,s,y,h)),null;case 27:if(Q(u),h=Y.current,E=u.type,s!==null&&u.stateNode!=null)s.memoizedProps!==y&&_i(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return Pt(u),null}s=D.current,oo(u)?qk(u):(s=pA(E,y,h),u.stateNode=s,_i(u))}return Pt(u),null;case 5:if(Q(u),E=u.type,s!==null&&u.stateNode!=null)s.memoizedProps!==y&&_i(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return Pt(u),null}if(A=D.current,oo(u))qk(u);else{var z=ed(Y.current);switch(A){case 1:A=z.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:A=z.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":A=z.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":A=z.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":A=z.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof y.is=="string"?z.createElement("select",{is:y.is}):z.createElement("select"),y.multiple?A.multiple=!0:y.size&&(A.size=y.size);break;default:A=typeof y.is=="string"?z.createElement(E,{is:y.is}):z.createElement(E)}}A[rn]=u,A[cn]=y;e:for(z=u.child;z!==null;){if(z.tag===5||z.tag===6)A.appendChild(z.stateNode);else if(z.tag!==4&&z.tag!==27&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===u)break e;for(;z.sibling===null;){if(z.return===null||z.return===u)break e;z=z.return}z.sibling.return=z.return,z=z.sibling}u.stateNode=A;e:switch(pn(A,E,y),E){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&_i(u)}}return Pt(u),Yg(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,h),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==y&&_i(u);else{if(typeof y!="string"&&u.stateNode===null)throw Error(r(166));if(s=Y.current,oo(u)){if(s=u.stateNode,h=u.memoizedProps,y=null,E=fn,E!==null)switch(E.tag){case 27:case 5:y=E.memoizedProps}s[rn]=u,s=!!(s.nodeValue===h||y!==null&&y.suppressHydrationWarning===!0||rA(s.nodeValue,h)),s||ea(u,!0)}else s=ed(s).createTextNode(y),s[rn]=u,u.stateNode=s}return Pt(u),null;case 31:if(h=u.memoizedState,s===null||s.memoizedState!==null){if(y=oo(u),h!==null){if(s===null){if(!y)throw Error(r(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[rn]=u}else Wa(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Pt(u),s=!1}else h=ig(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=h),s=!0;if(!s)return u.flags&256?(Gn(u),u):(Gn(u),null);if((u.flags&128)!==0)throw Error(r(558))}return Pt(u),null;case 13:if(y=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(E=oo(u),y!==null&&y.dehydrated!==null){if(s===null){if(!E)throw Error(r(318));if(E=u.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[rn]=u}else Wa(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Pt(u),E=!1}else E=ig(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=E),E=!0;if(!E)return u.flags&256?(Gn(u),u):(Gn(u),null)}return Gn(u),(u.flags&128)!==0?(u.lanes=h,u):(h=y!==null,s=s!==null&&s.memoizedState!==null,h&&(y=u.child,E=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(E=y.alternate.memoizedState.cachePool.pool),A=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(A=y.memoizedState.cachePool.pool),A!==E&&(y.flags|=2048)),h!==s&&h&&(u.child.flags|=8192),Lf(u,u.updateQueue),Pt(u),null);case 4:return re(),s===null&&gy(u.stateNode.containerInfo),Pt(u),null;case 10:return gi(u.type),Pt(u),null;case 19:if(Z(Gt),y=u.memoizedState,y===null)return Pt(u),null;if(E=(u.flags&128)!==0,A=y.rendering,A===null)if(E)Jl(y,!1);else{if(Ut!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(A=Cf(s),A!==null){for(u.flags|=128,Jl(y,!1),s=A.updateQueue,u.updateQueue=s,Lf(u,s),u.subtreeFlags=0,s=h,h=u.child;h!==null;)Dk(h,s),h=h.sibling;return R(Gt,Gt.current&1|2),at&&pi(u,y.treeForkCount),u.child}s=s.sibling}y.tail!==null&&We()>Hf&&(u.flags|=128,E=!0,Jl(y,!1),u.lanes=4194304)}else{if(!E)if(s=Cf(A),s!==null){if(u.flags|=128,E=!0,s=s.updateQueue,u.updateQueue=s,Lf(u,s),Jl(y,!0),y.tail===null&&y.tailMode==="hidden"&&!A.alternate&&!at)return Pt(u),null}else 2*We()-y.renderingStartTime>Hf&&h!==536870912&&(u.flags|=128,E=!0,Jl(y,!1),u.lanes=4194304);y.isBackwards?(A.sibling=u.child,u.child=A):(s=y.last,s!==null?s.sibling=A:u.child=A,y.last=A)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=We(),s.sibling=null,h=Gt.current,R(Gt,E?h&1|2:h&1),at&&pi(u,y.treeForkCount),s):(Pt(u),null);case 22:case 23:return Gn(u),yg(),y=u.memoizedState!==null,s!==null?s.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(h&536870912)!==0&&(u.flags&128)===0&&(Pt(u),u.subtreeFlags&6&&(u.flags|=8192)):Pt(u),h=u.updateQueue,h!==null&&Lf(u,h.retryQueue),h=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==h&&(u.flags|=2048),s!==null&&Z(es),null;case 24:return h=null,s!==null&&(h=s.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),gi(Kt),Pt(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function CL(s,u){switch(ng(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return gi(Kt),re(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return Q(u),null;case 31:if(u.memoizedState!==null){if(Gn(u),u.alternate===null)throw Error(r(340));Wa()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Gn(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Wa()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return Z(Gt),null;case 4:return re(),null;case 10:return gi(u.type),null;case 22:case 23:return Gn(u),yg(),s!==null&&Z(es),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return gi(Kt),null;case 25:return null;default:return null}}function lC(s,u){switch(ng(u),u.tag){case 3:gi(Kt),re();break;case 26:case 27:case 5:Q(u);break;case 4:re();break;case 31:u.memoizedState!==null&&Gn(u);break;case 13:Gn(u);break;case 19:Z(Gt);break;case 10:gi(u.type);break;case 22:case 23:Gn(u),yg(),s!==null&&Z(es);break;case 24:gi(Kt)}}function eu(s,u){try{var h=u.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var E=y.next;h=E;do{if((h.tag&s)===s){y=void 0;var A=h.create,z=h.inst;y=A(),z.destroy=y}h=h.next}while(h!==E)}}catch(K){wt(u,u.return,K)}}function oa(s,u,h){try{var y=u.updateQueue,E=y!==null?y.lastEffect:null;if(E!==null){var A=E.next;y=A;do{if((y.tag&s)===s){var z=y.inst,K=z.destroy;if(K!==void 0){z.destroy=void 0,E=u;var te=h,ue=K;try{ue()}catch(ge){wt(E,te,ge)}}}y=y.next}while(y!==A)}}catch(ge){wt(u,u.return,ge)}}function uC(s){var u=s.updateQueue;if(u!==null){var h=s.stateNode;try{Jk(u,h)}catch(y){wt(s,s.return,y)}}}function cC(s,u,h){h.props=as(s.type,s.memoizedProps),h.state=s.memoizedState;try{h.componentWillUnmount()}catch(y){wt(s,u,y)}}function tu(s,u){try{var h=s.ref;if(h!==null){switch(s.tag){case 26:case 27:case 5:var y=s.stateNode;break;case 30:y=s.stateNode;break;default:y=s.stateNode}typeof h=="function"?s.refCleanup=h(y):h.current=y}}catch(E){wt(s,u,E)}}function Hr(s,u){var h=s.ref,y=s.refCleanup;if(h!==null)if(typeof y=="function")try{y()}catch(E){wt(s,u,E)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(E){wt(s,u,E)}else h.current=null}function fC(s){var u=s.type,h=s.memoizedProps,y=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":h.autoFocus&&y.focus();break e;case"img":h.src?y.src=h.src:h.srcSet&&(y.srcset=h.srcSet)}}catch(E){wt(s,s.return,E)}}function Kg(s,u,h){try{var y=s.stateNode;YL(y,s.type,h,u),y[cn]=u}catch(E){wt(s,s.return,E)}}function dC(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&pa(s.type)||s.tag===4}function Xg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||dC(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&pa(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Wg(s,u,h){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(s,u):(u=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,u.appendChild(s),h=h._reactRootContainer,h!=null||u.onclick!==null||(u.onclick=fi));else if(y!==4&&(y===27&&pa(s.type)&&(h=s.stateNode,u=null),s=s.child,s!==null))for(Wg(s,u,h),s=s.sibling;s!==null;)Wg(s,u,h),s=s.sibling}function qf(s,u,h){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?h.insertBefore(s,u):h.appendChild(s);else if(y!==4&&(y===27&&pa(s.type)&&(h=s.stateNode),s=s.child,s!==null))for(qf(s,u,h),s=s.sibling;s!==null;)qf(s,u,h),s=s.sibling}function hC(s){var u=s.stateNode,h=s.memoizedProps;try{for(var y=s.type,E=u.attributes;E.length;)u.removeAttributeNode(E[0]);pn(u,y,h),u[rn]=s,u[cn]=h}catch(A){wt(s,s.return,A)}}var xi=!1,Qt=!1,Qg=!1,pC=typeof WeakSet=="function"?WeakSet:Set,ln=null;function AL(s,u){if(s=s.containerInfo,vy=od,s=Ck(s),Vm(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var y=h.getSelection&&h.getSelection();if(y&&y.rangeCount!==0){h=y.anchorNode;var E=y.anchorOffset,A=y.focusNode;y=y.focusOffset;try{h.nodeType,A.nodeType}catch{h=null;break e}var z=0,K=-1,te=-1,ue=0,ge=0,be=s,ce=null;t:for(;;){for(var he;be!==h||E!==0&&be.nodeType!==3||(K=z+E),be!==A||y!==0&&be.nodeType!==3||(te=z+y),be.nodeType===3&&(z+=be.nodeValue.length),(he=be.firstChild)!==null;)ce=be,be=he;for(;;){if(be===s)break t;if(ce===h&&++ue===E&&(K=z),ce===A&&++ge===y&&(te=z),(he=be.nextSibling)!==null)break;be=ce,ce=be.parentNode}be=he}h=K===-1||te===-1?null:{start:K,end:te}}else h=null}h=h||{start:0,end:0}}else h=null;for(_y={focusedElem:s,selectionRange:h},od=!1,ln=u;ln!==null;)if(u=ln,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,ln=s;else for(;ln!==null;){switch(u=ln,A=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(h=0;h<s.length;h++)E=s[h],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&A!==null){s=void 0,h=u,E=A.memoizedProps,A=A.memoizedState,y=h.stateNode;try{var Ae=as(h.type,E);s=y.getSnapshotBeforeUpdate(Ae,A),y.__reactInternalSnapshotBeforeUpdate=s}catch(Pe){wt(h,h.return,Pe)}}break;case 3:if((s&1024)!==0){if(s=u.stateNode.containerInfo,h=s.nodeType,h===9)Sy(s);else if(h===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Sy(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=u.sibling,s!==null){s.return=u.return,ln=s;break}ln=u.return}}function mC(s,u,h){var y=h.flags;switch(h.tag){case 0:case 11:case 15:Si(s,h),y&4&&eu(5,h);break;case 1:if(Si(s,h),y&4)if(s=h.stateNode,u===null)try{s.componentDidMount()}catch(z){wt(h,h.return,z)}else{var E=as(h.type,u.memoizedProps);u=u.memoizedState;try{s.componentDidUpdate(E,u,s.__reactInternalSnapshotBeforeUpdate)}catch(z){wt(h,h.return,z)}}y&64&&uC(h),y&512&&tu(h,h.return);break;case 3:if(Si(s,h),y&64&&(s=h.updateQueue,s!==null)){if(u=null,h.child!==null)switch(h.child.tag){case 27:case 5:u=h.child.stateNode;break;case 1:u=h.child.stateNode}try{Jk(s,u)}catch(z){wt(h,h.return,z)}}break;case 27:u===null&&y&4&&hC(h);case 26:case 5:Si(s,h),u===null&&y&4&&fC(h),y&512&&tu(h,h.return);break;case 12:Si(s,h);break;case 31:Si(s,h),y&4&&bC(s,h);break;case 13:Si(s,h),y&4&&vC(s,h),y&64&&(s=h.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(h=IL.bind(null,h),nq(s,h))));break;case 22:if(y=h.memoizedState!==null||xi,!y){u=u!==null&&u.memoizedState!==null||Qt,E=xi;var A=Qt;xi=y,(Qt=u)&&!A?Ei(s,h,(h.subtreeFlags&8772)!==0):Si(s,h),xi=E,Qt=A}break;case 30:break;default:Si(s,h)}}function gC(s){var u=s.alternate;u!==null&&(s.alternate=null,gC(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&Al(u)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var qt=null,Mn=!1;function wi(s,u,h){for(h=h.child;h!==null;)yC(s,u,h),h=h.sibling}function yC(s,u,h){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(jt,h)}catch{}switch(h.tag){case 26:Qt||Hr(h,u),wi(s,u,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:Qt||Hr(h,u);var y=qt,E=Mn;pa(h.type)&&(qt=h.stateNode,Mn=!1),wi(s,u,h),cu(h.stateNode),qt=y,Mn=E;break;case 5:Qt||Hr(h,u);case 6:if(y=qt,E=Mn,qt=null,wi(s,u,h),qt=y,Mn=E,qt!==null)if(Mn)try{(qt.nodeType===9?qt.body:qt.nodeName==="HTML"?qt.ownerDocument.body:qt).removeChild(h.stateNode)}catch(A){wt(h,u,A)}else try{qt.removeChild(h.stateNode)}catch(A){wt(h,u,A)}break;case 18:qt!==null&&(Mn?(s=qt,uA(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,h.stateNode),No(s)):uA(qt,h.stateNode));break;case 4:y=qt,E=Mn,qt=h.stateNode.containerInfo,Mn=!0,wi(s,u,h),qt=y,Mn=E;break;case 0:case 11:case 14:case 15:oa(2,h,u),Qt||oa(4,h,u),wi(s,u,h);break;case 1:Qt||(Hr(h,u),y=h.stateNode,typeof y.componentWillUnmount=="function"&&cC(h,u,y)),wi(s,u,h);break;case 21:wi(s,u,h);break;case 22:Qt=(y=Qt)||h.memoizedState!==null,wi(s,u,h),Qt=y;break;default:wi(s,u,h)}}function bC(s,u){if(u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{No(s)}catch(h){wt(u,u.return,h)}}}function vC(s,u){if(u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{No(s)}catch(h){wt(u,u.return,h)}}function TL(s){switch(s.tag){case 31:case 13:case 19:var u=s.stateNode;return u===null&&(u=s.stateNode=new pC),u;case 22:return s=s.stateNode,u=s._retryCache,u===null&&(u=s._retryCache=new pC),u;default:throw Error(r(435,s.tag))}}function Ff(s,u){var h=TL(s);u.forEach(function(y){if(!h.has(y)){h.add(y);var E=PL.bind(null,s,y);y.then(E,E)}})}function $n(s,u){var h=u.deletions;if(h!==null)for(var y=0;y<h.length;y++){var E=h[y],A=s,z=u,K=z;e:for(;K!==null;){switch(K.tag){case 27:if(pa(K.type)){qt=K.stateNode,Mn=!1;break e}break;case 5:qt=K.stateNode,Mn=!1;break e;case 3:case 4:qt=K.stateNode.containerInfo,Mn=!0;break e}K=K.return}if(qt===null)throw Error(r(160));yC(A,z,E),qt=null,Mn=!1,A=E.alternate,A!==null&&(A.return=null),E.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)_C(u,s),u=u.sibling}var Er=null;function _C(s,u){var h=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:$n(u,s),Dn(s),y&4&&(oa(3,s,s.return),eu(3,s),oa(5,s,s.return));break;case 1:$n(u,s),Dn(s),y&512&&(Qt||h===null||Hr(h,h.return)),y&64&&xi&&(s=s.updateQueue,s!==null&&(y=s.callbacks,y!==null&&(h=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=h===null?y:h.concat(y))));break;case 26:var E=Er;if($n(u,s),Dn(s),y&512&&(Qt||h===null||Hr(h,h.return)),y&4){var A=h!==null?h.memoizedState:null;if(y=s.memoizedState,h===null)if(y===null)if(s.stateNode===null){e:{y=s.type,h=s.memoizedProps,E=E.ownerDocument||E;t:switch(y){case"title":A=E.getElementsByTagName("title")[0],(!A||A[Ha]||A[rn]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=E.createElement(y),E.head.insertBefore(A,E.querySelector("head > title"))),pn(A,y,h),A[rn]=s,Yt(A),y=A;break e;case"link":var z=_A("link","href",E).get(y+(h.href||""));if(z){for(var K=0;K<z.length;K++)if(A=z[K],A.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&A.getAttribute("rel")===(h.rel==null?null:h.rel)&&A.getAttribute("title")===(h.title==null?null:h.title)&&A.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){z.splice(K,1);break t}}A=E.createElement(y),pn(A,y,h),E.head.appendChild(A);break;case"meta":if(z=_A("meta","content",E).get(y+(h.content||""))){for(K=0;K<z.length;K++)if(A=z[K],A.getAttribute("content")===(h.content==null?null:""+h.content)&&A.getAttribute("name")===(h.name==null?null:h.name)&&A.getAttribute("property")===(h.property==null?null:h.property)&&A.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&A.getAttribute("charset")===(h.charSet==null?null:h.charSet)){z.splice(K,1);break t}}A=E.createElement(y),pn(A,y,h),E.head.appendChild(A);break;default:throw Error(r(468,y))}A[rn]=s,Yt(A),y=A}s.stateNode=y}else xA(E,s.type,s.stateNode);else s.stateNode=vA(E,y,s.memoizedProps);else A!==y?(A===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):A.count--,y===null?xA(E,s.type,s.stateNode):vA(E,y,s.memoizedProps)):y===null&&s.stateNode!==null&&Kg(s,s.memoizedProps,h.memoizedProps)}break;case 27:$n(u,s),Dn(s),y&512&&(Qt||h===null||Hr(h,h.return)),h!==null&&y&4&&Kg(s,s.memoizedProps,h.memoizedProps);break;case 5:if($n(u,s),Dn(s),y&512&&(Qt||h===null||Hr(h,h.return)),s.flags&32){E=s.stateNode;try{Ws(E,"")}catch(Ae){wt(s,s.return,Ae)}}y&4&&s.stateNode!=null&&(E=s.memoizedProps,Kg(s,E,h!==null?h.memoizedProps:E)),y&1024&&(Qg=!0);break;case 6:if($n(u,s),Dn(s),y&4){if(s.stateNode===null)throw Error(r(162));y=s.memoizedProps,h=s.stateNode;try{h.nodeValue=y}catch(Ae){wt(s,s.return,Ae)}}break;case 3:if(rd=null,E=Er,Er=td(u.containerInfo),$n(u,s),Er=E,Dn(s),y&4&&h!==null&&h.memoizedState.isDehydrated)try{No(u.containerInfo)}catch(Ae){wt(s,s.return,Ae)}Qg&&(Qg=!1,xC(s));break;case 4:y=Er,Er=td(s.stateNode.containerInfo),$n(u,s),Dn(s),Er=y;break;case 12:$n(u,s),Dn(s);break;case 31:$n(u,s),Dn(s),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,Ff(s,y)));break;case 13:$n(u,s),Dn(s),s.child.flags&8192&&s.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Uf=We()),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,Ff(s,y)));break;case 22:E=s.memoizedState!==null;var te=h!==null&&h.memoizedState!==null,ue=xi,ge=Qt;if(xi=ue||E,Qt=ge||te,$n(u,s),Qt=ge,xi=ue,Dn(s),y&8192)e:for(u=s.stateNode,u._visibility=E?u._visibility&-2:u._visibility|1,E&&(h===null||te||xi||Qt||ss(s)),h=null,u=s;;){if(u.tag===5||u.tag===26){if(h===null){te=h=u;try{if(A=te.stateNode,E)z=A.style,typeof z.setProperty=="function"?z.setProperty("display","none","important"):z.display="none";else{K=te.stateNode;var be=te.memoizedProps.style,ce=be!=null&&be.hasOwnProperty("display")?be.display:null;K.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(Ae){wt(te,te.return,Ae)}}}else if(u.tag===6){if(h===null){te=u;try{te.stateNode.nodeValue=E?"":te.memoizedProps}catch(Ae){wt(te,te.return,Ae)}}}else if(u.tag===18){if(h===null){te=u;try{var he=te.stateNode;E?cA(he,!0):cA(te.stateNode,!1)}catch(Ae){wt(te,te.return,Ae)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===s)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break e;for(;u.sibling===null;){if(u.return===null||u.return===s)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}y&4&&(y=s.updateQueue,y!==null&&(h=y.retryQueue,h!==null&&(y.retryQueue=null,Ff(s,h))));break;case 19:$n(u,s),Dn(s),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,Ff(s,y)));break;case 30:break;case 21:break;default:$n(u,s),Dn(s)}}function Dn(s){var u=s.flags;if(u&2){try{for(var h,y=s.return;y!==null;){if(dC(y)){h=y;break}y=y.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var E=h.stateNode,A=Xg(s);qf(s,A,E);break;case 5:var z=h.stateNode;h.flags&32&&(Ws(z,""),h.flags&=-33);var K=Xg(s);qf(s,K,z);break;case 3:case 4:var te=h.stateNode.containerInfo,ue=Xg(s);Wg(s,ue,te);break;default:throw Error(r(161))}}catch(ge){wt(s,s.return,ge)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function xC(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var u=s;xC(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),s=s.sibling}}function Si(s,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)mC(s,u.alternate,u),u=u.sibling}function ss(s){for(s=s.child;s!==null;){var u=s;switch(u.tag){case 0:case 11:case 14:case 15:oa(4,u,u.return),ss(u);break;case 1:Hr(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&cC(u,u.return,h),ss(u);break;case 27:cu(u.stateNode);case 26:case 5:Hr(u,u.return),ss(u);break;case 22:u.memoizedState===null&&ss(u);break;case 30:ss(u);break;default:ss(u)}s=s.sibling}}function Ei(s,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,E=s,A=u,z=A.flags;switch(A.tag){case 0:case 11:case 15:Ei(E,A,h),eu(4,A);break;case 1:if(Ei(E,A,h),y=A,E=y.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(ue){wt(y,y.return,ue)}if(y=A,E=y.updateQueue,E!==null){var K=y.stateNode;try{var te=E.shared.hiddenCallbacks;if(te!==null)for(E.shared.hiddenCallbacks=null,E=0;E<te.length;E++)Qk(te[E],K)}catch(ue){wt(y,y.return,ue)}}h&&z&64&&uC(A),tu(A,A.return);break;case 27:hC(A);case 26:case 5:Ei(E,A,h),h&&y===null&&z&4&&fC(A),tu(A,A.return);break;case 12:Ei(E,A,h);break;case 31:Ei(E,A,h),h&&z&4&&bC(E,A);break;case 13:Ei(E,A,h),h&&z&4&&vC(E,A);break;case 22:A.memoizedState===null&&Ei(E,A,h),tu(A,A.return);break;case 30:break;default:Ei(E,A,h)}u=u.sibling}}function Jg(s,u){var h=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),s=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(s=u.memoizedState.cachePool.pool),s!==h&&(s!=null&&s.refCount++,h!=null&&Fl(h))}function ey(s,u){s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&Fl(s))}function kr(s,u,h,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)wC(s,u,h,y),u=u.sibling}function wC(s,u,h,y){var E=u.flags;switch(u.tag){case 0:case 11:case 15:kr(s,u,h,y),E&2048&&eu(9,u);break;case 1:kr(s,u,h,y);break;case 3:kr(s,u,h,y),E&2048&&(s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&Fl(s)));break;case 12:if(E&2048){kr(s,u,h,y),s=u.stateNode;try{var A=u.memoizedProps,z=A.id,K=A.onPostCommit;typeof K=="function"&&K(z,u.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(te){wt(u,u.return,te)}}else kr(s,u,h,y);break;case 31:kr(s,u,h,y);break;case 13:kr(s,u,h,y);break;case 23:break;case 22:A=u.stateNode,z=u.alternate,u.memoizedState!==null?A._visibility&2?kr(s,u,h,y):nu(s,u):A._visibility&2?kr(s,u,h,y):(A._visibility|=2,bo(s,u,h,y,(u.subtreeFlags&10256)!==0||!1)),E&2048&&Jg(z,u);break;case 24:kr(s,u,h,y),E&2048&&ey(u.alternate,u);break;default:kr(s,u,h,y)}}function bo(s,u,h,y,E){for(E=E&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var A=s,z=u,K=h,te=y,ue=z.flags;switch(z.tag){case 0:case 11:case 15:bo(A,z,K,te,E),eu(8,z);break;case 23:break;case 22:var ge=z.stateNode;z.memoizedState!==null?ge._visibility&2?bo(A,z,K,te,E):nu(A,z):(ge._visibility|=2,bo(A,z,K,te,E)),E&&ue&2048&&Jg(z.alternate,z);break;case 24:bo(A,z,K,te,E),E&&ue&2048&&ey(z.alternate,z);break;default:bo(A,z,K,te,E)}u=u.sibling}}function nu(s,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=s,y=u,E=y.flags;switch(y.tag){case 22:nu(h,y),E&2048&&Jg(y.alternate,y);break;case 24:nu(h,y),E&2048&&ey(y.alternate,y);break;default:nu(h,y)}u=u.sibling}}var ru=8192;function vo(s,u,h){if(s.subtreeFlags&ru)for(s=s.child;s!==null;)SC(s,u,h),s=s.sibling}function SC(s,u,h){switch(s.tag){case 26:vo(s,u,h),s.flags&ru&&s.memoizedState!==null&&pq(h,Er,s.memoizedState,s.memoizedProps);break;case 5:vo(s,u,h);break;case 3:case 4:var y=Er;Er=td(s.stateNode.containerInfo),vo(s,u,h),Er=y;break;case 22:s.memoizedState===null&&(y=s.alternate,y!==null&&y.memoizedState!==null?(y=ru,ru=16777216,vo(s,u,h),ru=y):vo(s,u,h));break;default:vo(s,u,h)}}function EC(s){var u=s.alternate;if(u!==null&&(s=u.child,s!==null)){u.child=null;do u=s.sibling,s.sibling=null,s=u;while(s!==null)}}function iu(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];ln=y,CC(y,s)}EC(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)kC(s),s=s.sibling}function kC(s){switch(s.tag){case 0:case 11:case 15:iu(s),s.flags&2048&&oa(9,s,s.return);break;case 3:iu(s);break;case 12:iu(s);break;case 22:var u=s.stateNode;s.memoizedState!==null&&u._visibility&2&&(s.return===null||s.return.tag!==13)?(u._visibility&=-3,Bf(s)):iu(s);break;default:iu(s)}}function Bf(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];ln=y,CC(y,s)}EC(s)}for(s=s.child;s!==null;){switch(u=s,u.tag){case 0:case 11:case 15:oa(8,u,u.return),Bf(u);break;case 22:h=u.stateNode,h._visibility&2&&(h._visibility&=-3,Bf(u));break;default:Bf(u)}s=s.sibling}}function CC(s,u){for(;ln!==null;){var h=ln;switch(h.tag){case 0:case 11:case 15:oa(8,h,u);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var y=h.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Fl(h.memoizedState.cache)}if(y=h.child,y!==null)y.return=h,ln=y;else e:for(h=s;ln!==null;){y=ln;var E=y.sibling,A=y.return;if(gC(y),y===h){ln=null;break e}if(E!==null){E.return=A,ln=E;break e}ln=A}}}var NL={getCacheForType:function(s){var u=dn(Kt),h=u.data.get(s);return h===void 0&&(h=s(),u.data.set(s,h)),h},cacheSignal:function(){return dn(Kt).controller.signal}},OL=typeof WeakMap=="function"?WeakMap:Map,mt=0,Nt=null,et=null,rt=0,xt=0,Zn=null,la=!1,_o=!1,ty=!1,ki=0,Ut=0,ua=0,os=0,ny=0,Yn=0,xo=0,au=null,In=null,ry=!1,Uf=0,AC=0,Hf=1/0,Vf=null,ca=null,an=0,fa=null,wo=null,Ci=0,iy=0,ay=null,TC=null,su=0,sy=null;function Kn(){return(mt&2)!==0&&rt!==0?rt&-rt:H.T!==null?dy():Xc()}function NC(){if(Yn===0)if((rt&536870912)===0||at){var s=Us;Us<<=1,(Us&3932160)===0&&(Us=262144),Yn=s}else Yn=536870912;return s=Vn.current,s!==null&&(s.flags|=32),Yn}function Pn(s,u,h){(s===Nt&&(xt===2||xt===9)||s.cancelPendingCommit!==null)&&(So(s,0),da(s,rt,Yn,!1)),Ua(s,h),((mt&2)===0||s!==Nt)&&(s===Nt&&((mt&2)===0&&(os|=h),Ut===4&&da(s,rt,Yn,!1)),Vr(s))}function OC(s,u,h){if((mt&6)!==0)throw Error(r(327));var y=!h&&(u&127)===0&&(u&s.expiredLanes)===0||Ba(s,u),E=y?ML(s,u):ly(s,u,!0),A=y;do{if(E===0){_o&&!y&&da(s,u,0,!1);break}else{if(h=s.current.alternate,A&&!RL(h)){E=ly(s,u,!1),A=!1;continue}if(E===2){if(A=u,s.errorRecoveryDisabledLanes&A)var z=0;else z=s.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){u=z;e:{var K=s;E=au;var te=K.current.memoizedState.isDehydrated;if(te&&(So(K,z).flags|=256),z=ly(K,z,!1),z!==2){if(ty&&!te){K.errorRecoveryDisabledLanes|=A,os|=A,E=4;break e}A=In,In=E,A!==null&&(In===null?In=A:In.push.apply(In,A))}E=z}if(A=!1,E!==2)continue}}if(E===1){So(s,0),da(s,u,0,!0);break}e:{switch(y=s,A=E,A){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:da(y,u,Yn,!la);break e;case 2:In=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(E=Uf+300-We(),10<E)){if(da(y,u,Yn,!la),Fa(y,0,!0)!==0)break e;Ci=u,y.timeoutHandle=oA(RC.bind(null,y,h,In,Vf,ry,u,Yn,os,xo,la,A,"Throttled",-0,0),E);break e}RC(y,h,In,Vf,ry,u,Yn,os,xo,la,A,null,-0,0)}}break}while(!0);Vr(s)}function RC(s,u,h,y,E,A,z,K,te,ue,ge,be,ce,he){if(s.timeoutHandle=-1,be=u.subtreeFlags,be&8192||(be&16785408)===16785408){be={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fi},SC(u,A,be);var Ae=(A&62914560)===A?Uf-We():(A&4194048)===A?AC-We():0;if(Ae=mq(be,Ae),Ae!==null){Ci=A,s.cancelPendingCommit=Ae(LC.bind(null,s,u,A,h,y,E,z,K,te,ge,be,null,ce,he)),da(s,A,z,!ue);return}}LC(s,u,A,h,y,E,z,K,te)}function RL(s){for(var u=s;;){var h=u.tag;if((h===0||h===11||h===15)&&u.flags&16384&&(h=u.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var y=0;y<h.length;y++){var E=h[y],A=E.getSnapshot;E=E.value;try{if(!Un(A(),E))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function da(s,u,h,y){u&=~ny,u&=~os,s.suspendedLanes|=u,s.pingedLanes&=~u,y&&(s.warmLanes|=u),y=s.expirationTimes;for(var E=u;0<E;){var A=31-_t(E),z=1<<A;y[A]=-1,E&=~z}h!==0&&Zc(s,h,u)}function Gf(){return(mt&6)===0?(ou(0),!1):!0}function oy(){if(et!==null){if(xt===0)var s=et.return;else s=et,mi=Qa=null,Sg(s),ho=null,Ul=0,s=et;for(;s!==null;)lC(s.alternate,s),s=s.return;et=null}}function So(s,u){var h=s.timeoutHandle;h!==-1&&(s.timeoutHandle=-1,WL(h)),h=s.cancelPendingCommit,h!==null&&(s.cancelPendingCommit=null,h()),Ci=0,oy(),Nt=s,et=h=hi(s.current,null),rt=u,xt=0,Zn=null,la=!1,_o=Ba(s,u),ty=!1,xo=Yn=ny=os=ua=Ut=0,In=au=null,ry=!1,(u&8)!==0&&(u|=u&32);var y=s.entangledLanes;if(y!==0)for(s=s.entanglements,y&=u;0<y;){var E=31-_t(y),A=1<<E;u|=s[E],y&=~A}return ki=u,hf(),h}function jC(s,u){Ue=null,H.H=Wl,u===fo||u===xf?(u=Yk(),xt=3):u===fg?(u=Yk(),xt=4):xt=u===Lg?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Zn=u,et===null&&(Ut=1,Df(s,cr(u,s.current)))}function MC(){var s=Vn.current;return s===null?!0:(rt&4194048)===rt?pr===null:(rt&62914560)===rt||(rt&536870912)!==0?s===pr:!1}function $C(){var s=H.H;return H.H=Wl,s===null?Wl:s}function DC(){var s=H.A;return H.A=NL,s}function Zf(){Ut=4,la||(rt&4194048)!==rt&&Vn.current!==null||(_o=!0),(ua&134217727)===0&&(os&134217727)===0||Nt===null||da(Nt,rt,Yn,!1)}function ly(s,u,h){var y=mt;mt|=2;var E=$C(),A=DC();(Nt!==s||rt!==u)&&(Vf=null,So(s,u)),u=!1;var z=Ut;e:do try{if(xt!==0&&et!==null){var K=et,te=Zn;switch(xt){case 8:oy(),z=6;break e;case 3:case 2:case 9:case 6:Vn.current===null&&(u=!0);var ue=xt;if(xt=0,Zn=null,Eo(s,K,te,ue),h&&_o){z=0;break e}break;default:ue=xt,xt=0,Zn=null,Eo(s,K,te,ue)}}jL(),z=Ut;break}catch(ge){jC(s,ge)}while(!0);return u&&s.shellSuspendCounter++,mi=Qa=null,mt=y,H.H=E,H.A=A,et===null&&(Nt=null,rt=0,hf()),z}function jL(){for(;et!==null;)IC(et)}function ML(s,u){var h=mt;mt|=2;var y=$C(),E=DC();Nt!==s||rt!==u?(Vf=null,Hf=We()+500,So(s,u)):_o=Ba(s,u);e:do try{if(xt!==0&&et!==null){u=et;var A=Zn;t:switch(xt){case 1:xt=0,Zn=null,Eo(s,u,A,1);break;case 2:case 9:if(Gk(A)){xt=0,Zn=null,PC(u);break}u=function(){xt!==2&&xt!==9||Nt!==s||(xt=7),Vr(s)},A.then(u,u);break e;case 3:xt=7;break e;case 4:xt=5;break e;case 7:Gk(A)?(xt=0,Zn=null,PC(u)):(xt=0,Zn=null,Eo(s,u,A,7));break;case 5:var z=null;switch(et.tag){case 26:z=et.memoizedState;case 5:case 27:var K=et;if(z?wA(z):K.stateNode.complete){xt=0,Zn=null;var te=K.sibling;if(te!==null)et=te;else{var ue=K.return;ue!==null?(et=ue,Yf(ue)):et=null}break t}}xt=0,Zn=null,Eo(s,u,A,5);break;case 6:xt=0,Zn=null,Eo(s,u,A,6);break;case 8:oy(),Ut=6;break e;default:throw Error(r(462))}}$L();break}catch(ge){jC(s,ge)}while(!0);return mi=Qa=null,H.H=y,H.A=E,mt=h,et!==null?0:(Nt=null,rt=0,hf(),Ut)}function $L(){for(;et!==null&&!$e();)IC(et)}function IC(s){var u=sC(s.alternate,s,ki);s.memoizedProps=s.pendingProps,u===null?Yf(s):et=u}function PC(s){var u=s,h=u.alternate;switch(u.tag){case 15:case 0:u=eC(h,u,u.pendingProps,u.type,void 0,rt);break;case 11:u=eC(h,u,u.pendingProps,u.type.render,u.ref,rt);break;case 5:Sg(u);default:lC(h,u),u=et=Dk(u,ki),u=sC(h,u,ki)}s.memoizedProps=s.pendingProps,u===null?Yf(s):et=u}function Eo(s,u,h,y){mi=Qa=null,Sg(u),ho=null,Ul=0;var E=u.return;try{if(wL(s,E,u,h,rt)){Ut=1,Df(s,cr(h,s.current)),et=null;return}}catch(A){if(E!==null)throw et=E,A;Ut=1,Df(s,cr(h,s.current)),et=null;return}u.flags&32768?(at||y===1?s=!0:_o||(rt&536870912)!==0?s=!1:(la=s=!0,(y===2||y===9||y===3||y===6)&&(y=Vn.current,y!==null&&y.tag===13&&(y.flags|=16384))),zC(u,s)):Yf(u)}function Yf(s){var u=s;do{if((u.flags&32768)!==0){zC(u,la);return}s=u.return;var h=kL(u.alternate,u,ki);if(h!==null){et=h;return}if(u=u.sibling,u!==null){et=u;return}et=u=s}while(u!==null);Ut===0&&(Ut=5)}function zC(s,u){do{var h=CL(s.alternate,s);if(h!==null){h.flags&=32767,et=h;return}if(h=s.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(s=s.sibling,s!==null)){et=s;return}et=s=h}while(s!==null);Ut=6,et=null}function LC(s,u,h,y,E,A,z,K,te){s.cancelPendingCommit=null;do Kf();while(an!==0);if((mt&6)!==0)throw Error(r(327));if(u!==null){if(u===s.current)throw Error(r(177));if(A=u.lanes|u.childLanes,A|=Xm,Em(s,h,A,z,K,te),s===Nt&&(et=Nt=null,rt=0),wo=u,fa=s,Ci=h,iy=A,ay=E,TC=y,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,zL(Te,function(){return HC(),null})):(s.callbackNode=null,s.callbackPriority=0),y=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||y){y=H.T,H.T=null,E=G.p,G.p=2,z=mt,mt|=4;try{AL(s,u,h)}finally{mt=z,G.p=E,H.T=y}}an=1,qC(),FC(),BC()}}function qC(){if(an===1){an=0;var s=fa,u=wo,h=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||h){h=H.T,H.T=null;var y=G.p;G.p=2;var E=mt;mt|=4;try{_C(u,s);var A=_y,z=Ck(s.containerInfo),K=A.focusedElem,te=A.selectionRange;if(z!==K&&K&&K.ownerDocument&&kk(K.ownerDocument.documentElement,K)){if(te!==null&&Vm(K)){var ue=te.start,ge=te.end;if(ge===void 0&&(ge=ue),"selectionStart"in K)K.selectionStart=ue,K.selectionEnd=Math.min(ge,K.value.length);else{var be=K.ownerDocument||document,ce=be&&be.defaultView||window;if(ce.getSelection){var he=ce.getSelection(),Ae=K.textContent.length,Pe=Math.min(te.start,Ae),At=te.end===void 0?Pe:Math.min(te.end,Ae);!he.extend&&Pe>At&&(z=At,At=Pe,Pe=z);var se=Ek(K,Pe),ie=Ek(K,At);if(se&&ie&&(he.rangeCount!==1||he.anchorNode!==se.node||he.anchorOffset!==se.offset||he.focusNode!==ie.node||he.focusOffset!==ie.offset)){var le=be.createRange();le.setStart(se.node,se.offset),he.removeAllRanges(),Pe>At?(he.addRange(le),he.extend(ie.node,ie.offset)):(le.setEnd(ie.node,ie.offset),he.addRange(le))}}}}for(be=[],he=K;he=he.parentNode;)he.nodeType===1&&be.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;K<be.length;K++){var ye=be[K];ye.element.scrollLeft=ye.left,ye.element.scrollTop=ye.top}}od=!!vy,_y=vy=null}finally{mt=E,G.p=y,H.T=h}}s.current=u,an=2}}function FC(){if(an===2){an=0;var s=fa,u=wo,h=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||h){h=H.T,H.T=null;var y=G.p;G.p=2;var E=mt;mt|=4;try{mC(s,u.alternate,u)}finally{mt=E,G.p=y,H.T=h}}an=3}}function BC(){if(an===4||an===3){an=0,qe();var s=fa,u=wo,h=Ci,y=TC;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?an=5:(an=0,wo=fa=null,UC(s,s.pendingLanes));var E=s.pendingLanes;if(E===0&&(ca=null),Cl(h),u=u.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(jt,u,void 0,(u.current.flags&128)===128)}catch{}if(y!==null){u=H.T,E=G.p,G.p=2,H.T=null;try{for(var A=s.onRecoverableError,z=0;z<y.length;z++){var K=y[z];A(K.value,{componentStack:K.stack})}}finally{H.T=u,G.p=E}}(Ci&3)!==0&&Kf(),Vr(s),E=s.pendingLanes,(h&261930)!==0&&(E&42)!==0?s===sy?su++:(su=0,sy=s):su=0,ou(0)}}function UC(s,u){(s.pooledCacheLanes&=u)===0&&(u=s.pooledCache,u!=null&&(s.pooledCache=null,Fl(u)))}function Kf(){return qC(),FC(),BC(),HC()}function HC(){if(an!==5)return!1;var s=fa,u=iy;iy=0;var h=Cl(Ci),y=H.T,E=G.p;try{G.p=32>h?32:h,H.T=null,h=ay,ay=null;var A=fa,z=Ci;if(an=0,wo=fa=null,Ci=0,(mt&6)!==0)throw Error(r(331));var K=mt;if(mt|=4,kC(A.current),wC(A,A.current,z,h),mt=K,ou(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(jt,A)}catch{}return!0}finally{G.p=E,H.T=y,UC(s,u)}}function VC(s,u,h){u=cr(h,u),u=zg(s.stateNode,u,2),s=ia(s,u,2),s!==null&&(Ua(s,2),Vr(s))}function wt(s,u,h){if(s.tag===3)VC(s,s,h);else for(;u!==null;){if(u.tag===3){VC(u,s,h);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(ca===null||!ca.has(y))){s=cr(h,s),h=G2(2),y=ia(u,h,2),y!==null&&(Z2(h,y,u,s),Ua(y,2),Vr(y));break}}u=u.return}}function uy(s,u,h){var y=s.pingCache;if(y===null){y=s.pingCache=new OL;var E=new Set;y.set(u,E)}else E=y.get(u),E===void 0&&(E=new Set,y.set(u,E));E.has(h)||(ty=!0,E.add(h),s=DL.bind(null,s,u,h),u.then(s,s))}function DL(s,u,h){var y=s.pingCache;y!==null&&y.delete(u),s.pingedLanes|=s.suspendedLanes&h,s.warmLanes&=~h,Nt===s&&(rt&h)===h&&(Ut===4||Ut===3&&(rt&62914560)===rt&&300>We()-Uf?(mt&2)===0&&So(s,0):ny|=h,xo===rt&&(xo=0)),Vr(s)}function GC(s,u){u===0&&(u=Gc()),s=Ka(s,u),s!==null&&(Ua(s,u),Vr(s))}function IL(s){var u=s.memoizedState,h=0;u!==null&&(h=u.retryLane),GC(s,h)}function PL(s,u){var h=0;switch(s.tag){case 31:case 13:var y=s.stateNode,E=s.memoizedState;E!==null&&(h=E.retryLane);break;case 19:y=s.stateNode;break;case 22:y=s.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(u),GC(s,h)}function zL(s,u){return Ye(s,u)}var Xf=null,ko=null,cy=!1,Wf=!1,fy=!1,ha=0;function Vr(s){s!==ko&&s.next===null&&(ko===null?Xf=ko=s:ko=ko.next=s),Wf=!0,cy||(cy=!0,qL())}function ou(s,u){if(!fy&&Wf){fy=!0;do for(var h=!1,y=Xf;y!==null;){if(s!==0){var E=y.pendingLanes;if(E===0)var A=0;else{var z=y.suspendedLanes,K=y.pingedLanes;A=(1<<31-_t(42|s)+1)-1,A&=E&~(z&~K),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(h=!0,XC(y,A))}else A=rt,A=Fa(y,y===Nt?A:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(A&3)===0||Ba(y,A)||(h=!0,XC(y,A));y=y.next}while(h);fy=!1}}function LL(){ZC()}function ZC(){Wf=cy=!1;var s=0;ha!==0&&XL()&&(s=ha);for(var u=We(),h=null,y=Xf;y!==null;){var E=y.next,A=YC(y,u);A===0?(y.next=null,h===null?Xf=E:h.next=E,E===null&&(ko=h)):(h=y,(s!==0||(A&3)!==0)&&(Wf=!0)),y=E}an!==0&&an!==5||ou(s),ha!==0&&(ha=0)}function YC(s,u){for(var h=s.suspendedLanes,y=s.pingedLanes,E=s.expirationTimes,A=s.pendingLanes&-62914561;0<A;){var z=31-_t(A),K=1<<z,te=E[z];te===-1?((K&h)===0||(K&y)!==0)&&(E[z]=Sm(K,u)):te<=u&&(s.expiredLanes|=K),A&=~K}if(u=Nt,h=rt,h=Fa(s,s===u?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),y=s.callbackNode,h===0||s===u&&(xt===2||xt===9)||s.cancelPendingCommit!==null)return y!==null&&y!==null&&Ve(y),s.callbackNode=null,s.callbackPriority=0;if((h&3)===0||Ba(s,h)){if(u=h&-h,u===s.callbackPriority)return u;switch(y!==null&&Ve(y),Cl(h)){case 2:case 8:h=_e;break;case 32:h=Te;break;case 268435456:h=Je;break;default:h=Te}return y=KC.bind(null,s),h=Ye(h,y),s.callbackPriority=u,s.callbackNode=h,u}return y!==null&&y!==null&&Ve(y),s.callbackPriority=2,s.callbackNode=null,2}function KC(s,u){if(an!==0&&an!==5)return s.callbackNode=null,s.callbackPriority=0,null;var h=s.callbackNode;if(Kf()&&s.callbackNode!==h)return null;var y=rt;return y=Fa(s,s===Nt?y:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),y===0?null:(OC(s,y,u),YC(s,We()),s.callbackNode!=null&&s.callbackNode===h?KC.bind(null,s):null)}function XC(s,u){if(Kf())return null;OC(s,u,!0)}function qL(){QL(function(){(mt&6)!==0?Ye(pe,LL):ZC()})}function dy(){if(ha===0){var s=uo;s===0&&(s=Bs,Bs<<=1,(Bs&261888)===0&&(Bs=256)),ha=s}return ha}function WC(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:af(""+s)}function QC(s,u){var h=u.ownerDocument.createElement("input");return h.name=u.name,h.value=u.value,s.id&&h.setAttribute("form",s.id),u.parentNode.insertBefore(h,u),s=new FormData(s),h.parentNode.removeChild(h),s}function FL(s,u,h,y,E){if(u==="submit"&&h&&h.stateNode===E){var A=WC((E[cn]||null).action),z=y.submitter;z&&(u=(u=z[cn]||null)?WC(u.formAction):z.getAttribute("formAction"),u!==null&&(A=u,z=null));var K=new uf("action","action",null,y,E);s.push({event:K,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(ha!==0){var te=z?QC(E,z):new FormData(E);jg(h,{pending:!0,data:te,method:E.method,action:A},null,te)}}else typeof A=="function"&&(K.preventDefault(),te=z?QC(E,z):new FormData(E),jg(h,{pending:!0,data:te,method:E.method,action:A},A,te))},currentTarget:E}]})}}for(var hy=0;hy<Km.length;hy++){var py=Km[hy],BL=py.toLowerCase(),UL=py[0].toUpperCase()+py.slice(1);Sr(BL,"on"+UL)}Sr(Nk,"onAnimationEnd"),Sr(Ok,"onAnimationIteration"),Sr(Rk,"onAnimationStart"),Sr("dblclick","onDoubleClick"),Sr("focusin","onFocus"),Sr("focusout","onBlur"),Sr(aL,"onTransitionRun"),Sr(sL,"onTransitionStart"),Sr(oL,"onTransitionCancel"),Sr(jk,"onTransitionEnd"),Xi("onMouseEnter",["mouseout","mouseover"]),Xi("onMouseLeave",["mouseout","mouseover"]),Xi("onPointerEnter",["pointerout","pointerover"]),Xi("onPointerLeave",["pointerout","pointerover"]),ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lu="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(" "),HL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lu));function JC(s,u){u=(u&4)!==0;for(var h=0;h<s.length;h++){var y=s[h],E=y.event;y=y.listeners;e:{var A=void 0;if(u)for(var z=y.length-1;0<=z;z--){var K=y[z],te=K.instance,ue=K.currentTarget;if(K=K.listener,te!==A&&E.isPropagationStopped())break e;A=K,E.currentTarget=ue;try{A(E)}catch(ge){df(ge)}E.currentTarget=null,A=te}else for(z=0;z<y.length;z++){if(K=y[z],te=K.instance,ue=K.currentTarget,K=K.listener,te!==A&&E.isPropagationStopped())break e;A=K,E.currentTarget=ue;try{A(E)}catch(ge){df(ge)}E.currentTarget=null,A=te}}}}function tt(s,u){var h=u[Vs];h===void 0&&(h=u[Vs]=new Set);var y=s+"__bubble";h.has(y)||(eA(u,s,2,!1),h.add(y))}function my(s,u,h){var y=0;u&&(y|=4),eA(h,s,y,u)}var Qf="_reactListening"+Math.random().toString(36).slice(2);function gy(s){if(!s[Qf]){s[Qf]=!0,Jc.forEach(function(h){h!=="selectionchange"&&(HL.has(h)||my(h,!1,s),my(h,!0,s))});var u=s.nodeType===9?s:s.ownerDocument;u===null||u[Qf]||(u[Qf]=!0,my("selectionchange",!1,u))}}function eA(s,u,h,y){switch(NA(u)){case 2:var E=bq;break;case 8:E=vq;break;default:E=Ry}h=E.bind(null,u,h,s),E=void 0,!Im||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(E=!0),y?E!==void 0?s.addEventListener(u,h,{capture:!0,passive:E}):s.addEventListener(u,h,!0):E!==void 0?s.addEventListener(u,h,{passive:E}):s.addEventListener(u,h,!1)}function yy(s,u,h,y,E){var A=y;if((u&1)===0&&(u&2)===0&&y!==null)e:for(;;){if(y===null)return;var z=y.tag;if(z===3||z===4){var K=y.stateNode.containerInfo;if(K===E)break;if(z===4)for(z=y.return;z!==null;){var te=z.tag;if((te===3||te===4)&&z.stateNode.containerInfo===E)return;z=z.return}for(;K!==null;){if(z=Yi(K),z===null)return;if(te=z.tag,te===5||te===6||te===26||te===27){y=A=z;continue e}K=K.parentNode}}y=y.return}ak(function(){var ue=A,ge=$m(h),be=[];e:{var ce=Mk.get(s);if(ce!==void 0){var he=uf,Ae=s;switch(s){case"keypress":if(of(h)===0)break e;case"keydown":case"keyup":he=Pz;break;case"focusin":Ae="focus",he=qm;break;case"focusout":Ae="blur",he=qm;break;case"beforeblur":case"afterblur":he=qm;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=lk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=kz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=qz;break;case Nk:case Ok:case Rk:he=Tz;break;case jk:he=Bz;break;case"scroll":case"scrollend":he=Sz;break;case"wheel":he=Hz;break;case"copy":case"cut":case"paste":he=Oz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=ck;break;case"toggle":case"beforetoggle":he=Gz}var Pe=(u&4)!==0,At=!Pe&&(s==="scroll"||s==="scrollend"),se=Pe?ce!==null?ce+"Capture":null:ce;Pe=[];for(var ie=ue,le;ie!==null;){var ye=ie;if(le=ye.stateNode,ye=ye.tag,ye!==5&&ye!==26&&ye!==27||le===null||se===null||(ye=Ol(ie,se),ye!=null&&Pe.push(uu(ie,ye,le))),At)break;ie=ie.return}0<Pe.length&&(ce=new he(ce,Ae,null,h,ge),be.push({event:ce,listeners:Pe}))}}if((u&7)===0){e:{if(ce=s==="mouseover"||s==="pointerover",he=s==="mouseout"||s==="pointerout",ce&&h!==Mm&&(Ae=h.relatedTarget||h.fromElement)&&(Yi(Ae)||Ae[li]))break e;if((he||ce)&&(ce=ge.window===ge?ge:(ce=ge.ownerDocument)?ce.defaultView||ce.parentWindow:window,he?(Ae=h.relatedTarget||h.toElement,he=ue,Ae=Ae?Yi(Ae):null,Ae!==null&&(At=a(Ae),Pe=Ae.tag,Ae!==At||Pe!==5&&Pe!==27&&Pe!==6)&&(Ae=null)):(he=null,Ae=ue),he!==Ae)){if(Pe=lk,ye="onMouseLeave",se="onMouseEnter",ie="mouse",(s==="pointerout"||s==="pointerover")&&(Pe=ck,ye="onPointerLeave",se="onPointerEnter",ie="pointer"),At=he==null?ce:Va(he),le=Ae==null?ce:Va(Ae),ce=new Pe(ye,ie+"leave",he,h,ge),ce.target=At,ce.relatedTarget=le,ye=null,Yi(ge)===ue&&(Pe=new Pe(se,ie+"enter",Ae,h,ge),Pe.target=le,Pe.relatedTarget=At,ye=Pe),At=ye,he&&Ae)t:{for(Pe=VL,se=he,ie=Ae,le=0,ye=se;ye;ye=Pe(ye))le++;ye=0;for(var Me=ie;Me;Me=Pe(Me))ye++;for(;0<le-ye;)se=Pe(se),le--;for(;0<ye-le;)ie=Pe(ie),ye--;for(;le--;){if(se===ie||ie!==null&&se===ie.alternate){Pe=se;break t}se=Pe(se),ie=Pe(ie)}Pe=null}else Pe=null;he!==null&&tA(be,ce,he,Pe,!1),Ae!==null&&At!==null&&tA(be,At,Ae,Pe,!0)}}e:{if(ce=ue?Va(ue):window,he=ce.nodeName&&ce.nodeName.toLowerCase(),he==="select"||he==="input"&&ce.type==="file")var ft=bk;else if(gk(ce))if(vk)ft=nL;else{ft=eL;var Oe=Jz}else he=ce.nodeName,!he||he.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?ue&&jm(ue.elementType)&&(ft=bk):ft=tL;if(ft&&(ft=ft(s,ue))){yk(be,ft,h,ge);break e}Oe&&Oe(s,ce,ue),s==="focusout"&&ue&&ce.type==="number"&&ue.memoizedProps.value!=null&&Rm(ce,"number",ce.value)}switch(Oe=ue?Va(ue):window,s){case"focusin":(gk(Oe)||Oe.contentEditable==="true")&&(to=Oe,Gm=ue,zl=null);break;case"focusout":zl=Gm=to=null;break;case"mousedown":Zm=!0;break;case"contextmenu":case"mouseup":case"dragend":Zm=!1,Ak(be,h,ge);break;case"selectionchange":if(iL)break;case"keydown":case"keyup":Ak(be,h,ge)}var Ge;if(Bm)e:{switch(s){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else eo?pk(s,h)&&(it="onCompositionEnd"):s==="keydown"&&h.keyCode===229&&(it="onCompositionStart");it&&(fk&&h.locale!=="ko"&&(eo||it!=="onCompositionStart"?it==="onCompositionEnd"&&eo&&(Ge=sk()):(Wi=ge,Pm="value"in Wi?Wi.value:Wi.textContent,eo=!0)),Oe=Jf(ue,it),0<Oe.length&&(it=new uk(it,s,null,h,ge),be.push({event:it,listeners:Oe}),Ge?it.data=Ge:(Ge=mk(h),Ge!==null&&(it.data=Ge)))),(Ge=Yz?Kz(s,h):Xz(s,h))&&(it=Jf(ue,"onBeforeInput"),0<it.length&&(Oe=new uk("onBeforeInput","beforeinput",null,h,ge),be.push({event:Oe,listeners:it}),Oe.data=Ge)),FL(be,s,ue,h,ge)}JC(be,u)})}function uu(s,u,h){return{instance:s,listener:u,currentTarget:h}}function Jf(s,u){for(var h=u+"Capture",y=[];s!==null;){var E=s,A=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||A===null||(E=Ol(s,h),E!=null&&y.unshift(uu(s,E,A)),E=Ol(s,u),E!=null&&y.push(uu(s,E,A))),s.tag===3)return y;s=s.return}return[]}function VL(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function tA(s,u,h,y,E){for(var A=u._reactName,z=[];h!==null&&h!==y;){var K=h,te=K.alternate,ue=K.stateNode;if(K=K.tag,te!==null&&te===y)break;K!==5&&K!==26&&K!==27||ue===null||(te=ue,E?(ue=Ol(h,A),ue!=null&&z.unshift(uu(h,ue,te))):E||(ue=Ol(h,A),ue!=null&&z.push(uu(h,ue,te)))),h=h.return}z.length!==0&&s.push({event:u,listeners:z})}var GL=/\r\n?/g,ZL=/\u0000|\uFFFD/g;function nA(s){return(typeof s=="string"?s:""+s).replace(GL,`
49
+ `).replace(ZL,"")}function rA(s,u){return u=nA(u),nA(s)===u}function Ct(s,u,h,y,E,A){switch(h){case"children":typeof y=="string"?u==="body"||u==="textarea"&&y===""||Ws(s,y):(typeof y=="number"||typeof y=="bigint")&&u!=="body"&&Ws(s,""+y);break;case"className":Zs(s,"class",y);break;case"tabIndex":Zs(s,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":Zs(s,h,y);break;case"style":rk(s,y,A);break;case"data":if(u!=="object"){Zs(s,"data",y);break}case"src":case"href":if(y===""&&(u!=="a"||h!=="href")){s.removeAttribute(h);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){s.removeAttribute(h);break}y=af(""+y),s.setAttribute(h,y);break;case"action":case"formAction":if(typeof y=="function"){s.setAttribute(h,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof A=="function"&&(h==="formAction"?(u!=="input"&&Ct(s,u,"name",E.name,E,null),Ct(s,u,"formEncType",E.formEncType,E,null),Ct(s,u,"formMethod",E.formMethod,E,null),Ct(s,u,"formTarget",E.formTarget,E,null)):(Ct(s,u,"encType",E.encType,E,null),Ct(s,u,"method",E.method,E,null),Ct(s,u,"target",E.target,E,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){s.removeAttribute(h);break}y=af(""+y),s.setAttribute(h,y);break;case"onClick":y!=null&&(s.onclick=fi);break;case"onScroll":y!=null&&tt("scroll",s);break;case"onScrollEnd":y!=null&&tt("scrollend",s);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(h=y.__html,h!=null){if(E.children!=null)throw Error(r(60));s.innerHTML=h}}break;case"multiple":s.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":s.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){s.removeAttribute("xlink:href");break}h=af(""+y),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(h,""+y):s.removeAttribute(h);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":y&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(h,""):s.removeAttribute(h);break;case"capture":case"download":y===!0?s.setAttribute(h,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(h,y):s.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?s.setAttribute(h,y):s.removeAttribute(h);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?s.removeAttribute(h):s.setAttribute(h,y);break;case"popover":tt("beforetoggle",s),tt("toggle",s),Gs(s,"popover",y);break;case"xlinkActuate":wr(s,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":wr(s,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":wr(s,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":wr(s,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":wr(s,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":wr(s,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":wr(s,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":wr(s,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":wr(s,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":Gs(s,"is",y);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=xz.get(h)||h,Gs(s,h,y))}}function by(s,u,h,y,E,A){switch(h){case"style":rk(s,y,A);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(h=y.__html,h!=null){if(E.children!=null)throw Error(r(60));s.innerHTML=h}}break;case"children":typeof y=="string"?Ws(s,y):(typeof y=="number"||typeof y=="bigint")&&Ws(s,""+y);break;case"onScroll":y!=null&&tt("scroll",s);break;case"onScrollEnd":y!=null&&tt("scrollend",s);break;case"onClick":y!=null&&(s.onclick=fi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ef.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(E=h.endsWith("Capture"),u=h.slice(2,E?h.length-7:void 0),A=s[cn]||null,A=A!=null?A[h]:null,typeof A=="function"&&s.removeEventListener(u,A,E),typeof y=="function")){typeof A!="function"&&A!==null&&(h in s?s[h]=null:s.hasAttribute(h)&&s.removeAttribute(h)),s.addEventListener(u,y,E);break e}h in s?s[h]=y:y===!0?s.setAttribute(h,""):Gs(s,h,y)}}}function pn(s,u,h){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":tt("error",s),tt("load",s);var y=!1,E=!1,A;for(A in h)if(h.hasOwnProperty(A)){var z=h[A];if(z!=null)switch(A){case"src":y=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Ct(s,u,A,z,h,null)}}E&&Ct(s,u,"srcSet",h.srcSet,h,null),y&&Ct(s,u,"src",h.src,h,null);return;case"input":tt("invalid",s);var K=A=z=E=null,te=null,ue=null;for(y in h)if(h.hasOwnProperty(y)){var ge=h[y];if(ge!=null)switch(y){case"name":E=ge;break;case"type":z=ge;break;case"checked":te=ge;break;case"defaultChecked":ue=ge;break;case"value":A=ge;break;case"defaultValue":K=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,u));break;default:Ct(s,u,y,ge,h,null)}}JE(s,A,K,te,ue,z,E,!1);return;case"select":tt("invalid",s),y=z=A=null;for(E in h)if(h.hasOwnProperty(E)&&(K=h[E],K!=null))switch(E){case"value":A=K;break;case"defaultValue":z=K;break;case"multiple":y=K;default:Ct(s,u,E,K,h,null)}u=A,h=z,s.multiple=!!y,u!=null?Xs(s,!!y,u,!1):h!=null&&Xs(s,!!y,h,!0);return;case"textarea":tt("invalid",s),A=E=y=null;for(z in h)if(h.hasOwnProperty(z)&&(K=h[z],K!=null))switch(z){case"value":y=K;break;case"defaultValue":E=K;break;case"children":A=K;break;case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(91));break;default:Ct(s,u,z,K,h,null)}tk(s,y,E,A);return;case"option":for(te in h)if(h.hasOwnProperty(te)&&(y=h[te],y!=null))switch(te){case"selected":s.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:Ct(s,u,te,y,h,null)}return;case"dialog":tt("beforetoggle",s),tt("toggle",s),tt("cancel",s),tt("close",s);break;case"iframe":case"object":tt("load",s);break;case"video":case"audio":for(y=0;y<lu.length;y++)tt(lu[y],s);break;case"image":tt("error",s),tt("load",s);break;case"details":tt("toggle",s);break;case"embed":case"source":case"link":tt("error",s),tt("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in h)if(h.hasOwnProperty(ue)&&(y=h[ue],y!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Ct(s,u,ue,y,h,null)}return;default:if(jm(u)){for(ge in h)h.hasOwnProperty(ge)&&(y=h[ge],y!==void 0&&by(s,u,ge,y,h,void 0));return}}for(K in h)h.hasOwnProperty(K)&&(y=h[K],y!=null&&Ct(s,u,K,y,h,null))}function YL(s,u,h,y){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,A=null,z=null,K=null,te=null,ue=null,ge=null;for(he in h){var be=h[he];if(h.hasOwnProperty(he)&&be!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":te=be;default:y.hasOwnProperty(he)||Ct(s,u,he,null,y,be)}}for(var ce in y){var he=y[ce];if(be=h[ce],y.hasOwnProperty(ce)&&(he!=null||be!=null))switch(ce){case"type":A=he;break;case"name":E=he;break;case"checked":ue=he;break;case"defaultChecked":ge=he;break;case"value":z=he;break;case"defaultValue":K=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,u));break;default:he!==be&&Ct(s,u,ce,he,y,be)}}Om(s,z,K,te,ue,ge,A,E);return;case"select":he=z=K=ce=null;for(A in h)if(te=h[A],h.hasOwnProperty(A)&&te!=null)switch(A){case"value":break;case"multiple":he=te;default:y.hasOwnProperty(A)||Ct(s,u,A,null,y,te)}for(E in y)if(A=y[E],te=h[E],y.hasOwnProperty(E)&&(A!=null||te!=null))switch(E){case"value":ce=A;break;case"defaultValue":K=A;break;case"multiple":z=A;default:A!==te&&Ct(s,u,E,A,y,te)}u=K,h=z,y=he,ce!=null?Xs(s,!!h,ce,!1):!!y!=!!h&&(u!=null?Xs(s,!!h,u,!0):Xs(s,!!h,h?[]:"",!1));return;case"textarea":he=ce=null;for(K in h)if(E=h[K],h.hasOwnProperty(K)&&E!=null&&!y.hasOwnProperty(K))switch(K){case"value":break;case"children":break;default:Ct(s,u,K,null,y,E)}for(z in y)if(E=y[z],A=h[z],y.hasOwnProperty(z)&&(E!=null||A!=null))switch(z){case"value":ce=E;break;case"defaultValue":he=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:E!==A&&Ct(s,u,z,E,y,A)}ek(s,ce,he);return;case"option":for(var Ae in h)if(ce=h[Ae],h.hasOwnProperty(Ae)&&ce!=null&&!y.hasOwnProperty(Ae))switch(Ae){case"selected":s.selected=!1;break;default:Ct(s,u,Ae,null,y,ce)}for(te in y)if(ce=y[te],he=h[te],y.hasOwnProperty(te)&&ce!==he&&(ce!=null||he!=null))switch(te){case"selected":s.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:Ct(s,u,te,ce,y,he)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Pe in h)ce=h[Pe],h.hasOwnProperty(Pe)&&ce!=null&&!y.hasOwnProperty(Pe)&&Ct(s,u,Pe,null,y,ce);for(ue in y)if(ce=y[ue],he=h[ue],y.hasOwnProperty(ue)&&ce!==he&&(ce!=null||he!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,u));break;default:Ct(s,u,ue,ce,y,he)}return;default:if(jm(u)){for(var At in h)ce=h[At],h.hasOwnProperty(At)&&ce!==void 0&&!y.hasOwnProperty(At)&&by(s,u,At,void 0,y,ce);for(ge in y)ce=y[ge],he=h[ge],!y.hasOwnProperty(ge)||ce===he||ce===void 0&&he===void 0||by(s,u,ge,ce,y,he);return}}for(var se in h)ce=h[se],h.hasOwnProperty(se)&&ce!=null&&!y.hasOwnProperty(se)&&Ct(s,u,se,null,y,ce);for(be in y)ce=y[be],he=h[be],!y.hasOwnProperty(be)||ce===he||ce==null&&he==null||Ct(s,u,be,ce,y,he)}function iA(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function KL(){if(typeof performance.getEntriesByType=="function"){for(var s=0,u=0,h=performance.getEntriesByType("resource"),y=0;y<h.length;y++){var E=h[y],A=E.transferSize,z=E.initiatorType,K=E.duration;if(A&&K&&iA(z)){for(z=0,K=E.responseEnd,y+=1;y<h.length;y++){var te=h[y],ue=te.startTime;if(ue>K)break;var ge=te.transferSize,be=te.initiatorType;ge&&iA(be)&&(te=te.responseEnd,z+=ge*(te<K?1:(K-ue)/(te-ue)))}if(--y,u+=8*(A+z)/(E.duration/1e3),s++,10<s)break}}if(0<s)return u/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var vy=null,_y=null;function ed(s){return s.nodeType===9?s:s.ownerDocument}function aA(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sA(s,u){if(s===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&u==="foreignObject"?0:s}function xy(s,u){return s==="textarea"||s==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var wy=null;function XL(){var s=window.event;return s&&s.type==="popstate"?s===wy?!1:(wy=s,!0):(wy=null,!1)}var oA=typeof setTimeout=="function"?setTimeout:void 0,WL=typeof clearTimeout=="function"?clearTimeout:void 0,lA=typeof Promise=="function"?Promise:void 0,QL=typeof queueMicrotask=="function"?queueMicrotask:typeof lA<"u"?function(s){return lA.resolve(null).then(s).catch(JL)}:oA;function JL(s){setTimeout(function(){throw s})}function pa(s){return s==="head"}function uA(s,u){var h=u,y=0;do{var E=h.nextSibling;if(s.removeChild(h),E&&E.nodeType===8)if(h=E.data,h==="/$"||h==="/&"){if(y===0){s.removeChild(E),No(u);return}y--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")y++;else if(h==="html")cu(s.ownerDocument.documentElement);else if(h==="head"){h=s.ownerDocument.head,cu(h);for(var A=h.firstChild;A;){var z=A.nextSibling,K=A.nodeName;A[Ha]||K==="SCRIPT"||K==="STYLE"||K==="LINK"&&A.rel.toLowerCase()==="stylesheet"||h.removeChild(A),A=z}}else h==="body"&&cu(s.ownerDocument.body);h=E}while(h);No(u)}function cA(s,u){var h=s;s=0;do{var y=h.nextSibling;if(h.nodeType===1?u?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(u?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),y&&y.nodeType===8)if(h=y.data,h==="/$"){if(s===0)break;s--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||s++;h=y}while(h)}function Sy(s){var u=s.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var h=u;switch(u=u.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":Sy(h),Al(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}s.removeChild(h)}}function eq(s,u,h,y){for(;s.nodeType===1;){var E=h;if(s.nodeName.toLowerCase()!==u.toLowerCase()){if(!y&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(y){if(!s[Ha])switch(u){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(A=s.getAttribute("rel"),A==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(A!==E.rel||s.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||s.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||s.getAttribute("title")!==(E.title==null?null:E.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(A=s.getAttribute("src"),(A!==(E.src==null?null:E.src)||s.getAttribute("type")!==(E.type==null?null:E.type)||s.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&A&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(u==="input"&&s.type==="hidden"){var A=E.name==null?null:""+E.name;if(E.type==="hidden"&&s.getAttribute("name")===A)return s}else return s;if(s=mr(s.nextSibling),s===null)break}return null}function tq(s,u,h){if(u==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!h||(s=mr(s.nextSibling),s===null))return null;return s}function fA(s,u){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!u||(s=mr(s.nextSibling),s===null))return null;return s}function Ey(s){return s.data==="$?"||s.data==="$~"}function ky(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function nq(s,u){var h=s.ownerDocument;if(s.data==="$~")s._reactRetry=u;else if(s.data!=="$?"||h.readyState!=="loading")u();else{var y=function(){u(),h.removeEventListener("DOMContentLoaded",y)};h.addEventListener("DOMContentLoaded",y),s._reactRetry=y}}function mr(s){for(;s!=null;s=s.nextSibling){var u=s.nodeType;if(u===1||u===3)break;if(u===8){if(u=s.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return s}var Cy=null;function dA(s){s=s.nextSibling;for(var u=0;s;){if(s.nodeType===8){var h=s.data;if(h==="/$"||h==="/&"){if(u===0)return mr(s.nextSibling);u--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||u++}s=s.nextSibling}return null}function hA(s){s=s.previousSibling;for(var u=0;s;){if(s.nodeType===8){var h=s.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(u===0)return s;u--}else h!=="/$"&&h!=="/&"||u++}s=s.previousSibling}return null}function pA(s,u,h){switch(u=ed(h),s){case"html":if(s=u.documentElement,!s)throw Error(r(452));return s;case"head":if(s=u.head,!s)throw Error(r(453));return s;case"body":if(s=u.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function cu(s){for(var u=s.attributes;u.length;)s.removeAttributeNode(u[0]);Al(s)}var gr=new Map,mA=new Set;function td(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Ai=G.d;G.d={f:rq,r:iq,D:aq,C:sq,L:oq,m:lq,X:cq,S:uq,M:fq};function rq(){var s=Ai.f(),u=Gf();return s||u}function iq(s){var u=ui(s);u!==null&&u.tag===5&&u.type==="form"?j2(u):Ai.r(s)}var Co=typeof document>"u"?null:document;function gA(s,u,h){var y=Co;if(y&&typeof u=="string"&&u){var E=Sn(u);E='link[rel="'+s+'"][href="'+E+'"]',typeof h=="string"&&(E+='[crossorigin="'+h+'"]'),mA.has(E)||(mA.add(E),s={rel:s,crossOrigin:h,href:u},y.querySelector(E)===null&&(u=y.createElement("link"),pn(u,"link",s),Yt(u),y.head.appendChild(u)))}}function aq(s){Ai.D(s),gA("dns-prefetch",s,null)}function sq(s,u){Ai.C(s,u),gA("preconnect",s,u)}function oq(s,u,h){Ai.L(s,u,h);var y=Co;if(y&&s&&u){var E='link[rel="preload"][as="'+Sn(u)+'"]';u==="image"&&h&&h.imageSrcSet?(E+='[imagesrcset="'+Sn(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(E+='[imagesizes="'+Sn(h.imageSizes)+'"]')):E+='[href="'+Sn(s)+'"]';var A=E;switch(u){case"style":A=Ao(s);break;case"script":A=To(s)}gr.has(A)||(s=p({rel:"preload",href:u==="image"&&h&&h.imageSrcSet?void 0:s,as:u},h),gr.set(A,s),y.querySelector(E)!==null||u==="style"&&y.querySelector(fu(A))||u==="script"&&y.querySelector(du(A))||(u=y.createElement("link"),pn(u,"link",s),Yt(u),y.head.appendChild(u)))}}function lq(s,u){Ai.m(s,u);var h=Co;if(h&&s){var y=u&&typeof u.as=="string"?u.as:"script",E='link[rel="modulepreload"][as="'+Sn(y)+'"][href="'+Sn(s)+'"]',A=E;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=To(s)}if(!gr.has(A)&&(s=p({rel:"modulepreload",href:s},u),gr.set(A,s),h.querySelector(E)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(du(A)))return}y=h.createElement("link"),pn(y,"link",s),Yt(y),h.head.appendChild(y)}}}function uq(s,u,h){Ai.S(s,u,h);var y=Co;if(y&&s){var E=Ki(y).hoistableStyles,A=Ao(s);u=u||"default";var z=E.get(A);if(!z){var K={loading:0,preload:null};if(z=y.querySelector(fu(A)))K.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":u},h),(h=gr.get(A))&&Ay(s,h);var te=z=y.createElement("link");Yt(te),pn(te,"link",s),te._p=new Promise(function(ue,ge){te.onload=ue,te.onerror=ge}),te.addEventListener("load",function(){K.loading|=1}),te.addEventListener("error",function(){K.loading|=2}),K.loading|=4,nd(z,u,y)}z={type:"stylesheet",instance:z,count:1,state:K},E.set(A,z)}}}function cq(s,u){Ai.X(s,u);var h=Co;if(h&&s){var y=Ki(h).hoistableScripts,E=To(s),A=y.get(E);A||(A=h.querySelector(du(E)),A||(s=p({src:s,async:!0},u),(u=gr.get(E))&&Ty(s,u),A=h.createElement("script"),Yt(A),pn(A,"link",s),h.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},y.set(E,A))}}function fq(s,u){Ai.M(s,u);var h=Co;if(h&&s){var y=Ki(h).hoistableScripts,E=To(s),A=y.get(E);A||(A=h.querySelector(du(E)),A||(s=p({src:s,async:!0,type:"module"},u),(u=gr.get(E))&&Ty(s,u),A=h.createElement("script"),Yt(A),pn(A,"link",s),h.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},y.set(E,A))}}function yA(s,u,h,y){var E=(E=Y.current)?td(E):null;if(!E)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(u=Ao(h.href),h=Ki(E).hoistableStyles,y=h.get(u),y||(y={type:"style",instance:null,count:0,state:null},h.set(u,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){s=Ao(h.href);var A=Ki(E).hoistableStyles,z=A.get(s);if(z||(E=E.ownerDocument||E,z={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(s,z),(A=E.querySelector(fu(s)))&&!A._p&&(z.instance=A,z.state.loading=5),gr.has(s)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},gr.set(s,h),A||dq(E,s,h,z.state))),u&&y===null)throw Error(r(528,""));return z}if(u&&y!==null)throw Error(r(529,""));return null;case"script":return u=h.async,h=h.src,typeof h=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=To(h),h=Ki(E).hoistableScripts,y=h.get(u),y||(y={type:"script",instance:null,count:0,state:null},h.set(u,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Ao(s){return'href="'+Sn(s)+'"'}function fu(s){return'link[rel="stylesheet"]['+s+"]"}function bA(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function dq(s,u,h,y){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?y.loading=1:(u=s.createElement("link"),y.preload=u,u.addEventListener("load",function(){return y.loading|=1}),u.addEventListener("error",function(){return y.loading|=2}),pn(u,"link",h),Yt(u),s.head.appendChild(u))}function To(s){return'[src="'+Sn(s)+'"]'}function du(s){return"script[async]"+s}function vA(s,u,h){if(u.count++,u.instance===null)switch(u.type){case"style":var y=s.querySelector('style[data-href~="'+Sn(h.href)+'"]');if(y)return u.instance=y,Yt(y),y;var E=p({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return y=(s.ownerDocument||s).createElement("style"),Yt(y),pn(y,"style",E),nd(y,h.precedence,s),u.instance=y;case"stylesheet":E=Ao(h.href);var A=s.querySelector(fu(E));if(A)return u.state.loading|=4,u.instance=A,Yt(A),A;y=bA(h),(E=gr.get(E))&&Ay(y,E),A=(s.ownerDocument||s).createElement("link"),Yt(A);var z=A;return z._p=new Promise(function(K,te){z.onload=K,z.onerror=te}),pn(A,"link",y),u.state.loading|=4,nd(A,h.precedence,s),u.instance=A;case"script":return A=To(h.src),(E=s.querySelector(du(A)))?(u.instance=E,Yt(E),E):(y=h,(E=gr.get(A))&&(y=p({},h),Ty(y,E)),s=s.ownerDocument||s,E=s.createElement("script"),Yt(E),pn(E,"link",y),s.head.appendChild(E),u.instance=E);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(y=u.instance,u.state.loading|=4,nd(y,h.precedence,s));return u.instance}function nd(s,u,h){for(var y=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=y.length?y[y.length-1]:null,A=E,z=0;z<y.length;z++){var K=y[z];if(K.dataset.precedence===u)A=K;else if(A!==E)break}A?A.parentNode.insertBefore(s,A.nextSibling):(u=h.nodeType===9?h.head:h,u.insertBefore(s,u.firstChild))}function Ay(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.title==null&&(s.title=u.title)}function Ty(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.integrity==null&&(s.integrity=u.integrity)}var rd=null;function _A(s,u,h){if(rd===null){var y=new Map,E=rd=new Map;E.set(h,y)}else E=rd,y=E.get(h),y||(y=new Map,E.set(h,y));if(y.has(s))return y;for(y.set(s,null),h=h.getElementsByTagName(s),E=0;E<h.length;E++){var A=h[E];if(!(A[Ha]||A[rn]||s==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var z=A.getAttribute(u)||"";z=s+z;var K=y.get(z);K?K.push(A):y.set(z,[A])}}return y}function xA(s,u,h){s=s.ownerDocument||s,s.head.insertBefore(h,u==="title"?s.querySelector("head > title"):null)}function hq(s,u,h){if(h===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function wA(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function pq(s,u,h,y){if(h.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var E=Ao(y.href),A=u.querySelector(fu(E));if(A){u=A._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=id.bind(s),u.then(s,s)),h.state.loading|=4,h.instance=A,Yt(A);return}A=u.ownerDocument||u,y=bA(y),(E=gr.get(E))&&Ay(y,E),A=A.createElement("link"),Yt(A);var z=A;z._p=new Promise(function(K,te){z.onload=K,z.onerror=te}),pn(A,"link",y),h.instance=A}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(h,u),(u=h.state.preload)&&(h.state.loading&3)===0&&(s.count++,h=id.bind(s),u.addEventListener("load",h),u.addEventListener("error",h))}}var Ny=0;function mq(s,u){return s.stylesheets&&s.count===0&&sd(s,s.stylesheets),0<s.count||0<s.imgCount?function(h){var y=setTimeout(function(){if(s.stylesheets&&sd(s,s.stylesheets),s.unsuspend){var A=s.unsuspend;s.unsuspend=null,A()}},6e4+u);0<s.imgBytes&&Ny===0&&(Ny=62500*KL());var E=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&sd(s,s.stylesheets),s.unsuspend)){var A=s.unsuspend;s.unsuspend=null,A()}},(s.imgBytes>Ny?50:800)+u);return s.unsuspend=h,function(){s.unsuspend=null,clearTimeout(y),clearTimeout(E)}}:null}function id(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var ad=null;function sd(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,ad=new Map,u.forEach(gq,s),ad=null,id.call(s))}function gq(s,u){if(!(u.state.loading&4)){var h=ad.get(s);if(h)var y=h.get(null);else{h=new Map,ad.set(s,h);for(var E=s.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<E.length;A++){var z=E[A];(z.nodeName==="LINK"||z.getAttribute("media")!=="not all")&&(h.set(z.dataset.precedence,z),y=z)}y&&h.set(null,y)}E=u.instance,z=E.getAttribute("data-precedence"),A=h.get(z)||y,A===y&&h.set(null,E),h.set(z,E),this.count++,y=id.bind(this),E.addEventListener("load",y),E.addEventListener("error",y),A?A.parentNode.insertBefore(E,A.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(E,s.firstChild)),u.state.loading|=4}}var hu={$$typeof:v,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function yq(s,u,h,y,E,A,z,K,te){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=El(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=El(0),this.hiddenUpdates=El(null),this.identifierPrefix=y,this.onUncaughtError=E,this.onCaughtError=A,this.onRecoverableError=z,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=te,this.incompleteTransitions=new Map}function SA(s,u,h,y,E,A,z,K,te,ue,ge,be){return s=new yq(s,u,h,z,te,ue,ge,be,K),u=1,A===!0&&(u|=24),A=Hn(3,null,null,u),s.current=A,A.stateNode=s,u=lg(),u.refCount++,s.pooledCache=u,u.refCount++,A.memoizedState={element:y,isDehydrated:h,cache:u},dg(A),s}function EA(s){return s?(s=io,s):io}function kA(s,u,h,y,E,A){E=EA(E),y.context===null?y.context=E:y.pendingContext=E,y=ra(u),y.payload={element:h},A=A===void 0?null:A,A!==null&&(y.callback=A),h=ia(s,y,u),h!==null&&(Pn(h,s,u),Vl(h,s,u))}function CA(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<u?h:u}}function Oy(s,u){CA(s,u),(s=s.alternate)&&CA(s,u)}function AA(s){if(s.tag===13||s.tag===31){var u=Ka(s,67108864);u!==null&&Pn(u,s,67108864),Oy(s,67108864)}}function TA(s){if(s.tag===13||s.tag===31){var u=Kn();u=kl(u);var h=Ka(s,u);h!==null&&Pn(h,s,u),Oy(s,u)}}var od=!0;function bq(s,u,h,y){var E=H.T;H.T=null;var A=G.p;try{G.p=2,Ry(s,u,h,y)}finally{G.p=A,H.T=E}}function vq(s,u,h,y){var E=H.T;H.T=null;var A=G.p;try{G.p=8,Ry(s,u,h,y)}finally{G.p=A,H.T=E}}function Ry(s,u,h,y){if(od){var E=jy(y);if(E===null)yy(s,u,y,ld,h),OA(s,y);else if(xq(E,s,u,h,y))y.stopPropagation();else if(OA(s,y),u&4&&-1<_q.indexOf(s)){for(;E!==null;){var A=ui(E);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var z=oi(A.pendingLanes);if(z!==0){var K=A;for(K.pendingLanes|=2,K.entangledLanes|=2;z;){var te=1<<31-_t(z);K.entanglements[1]|=te,z&=~te}Vr(A),(mt&6)===0&&(Hf=We()+500,ou(0))}}break;case 31:case 13:K=Ka(A,2),K!==null&&Pn(K,A,2),Gf(),Oy(A,2)}if(A=jy(y),A===null&&yy(s,u,y,ld,h),A===E)break;E=A}E!==null&&y.stopPropagation()}else yy(s,u,y,null,h)}}function jy(s){return s=$m(s),My(s)}var ld=null;function My(s){if(ld=null,s=Yi(s),s!==null){var u=a(s);if(u===null)s=null;else{var h=u.tag;if(h===13){if(s=o(u),s!==null)return s;s=null}else if(h===31){if(s=l(u),s!==null)return s;s=null}else if(h===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;s=null}else u!==s&&(s=null)}}return ld=s,null}function NA(s){switch(s){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Tt()){case pe:return 2;case _e:return 8;case Te:case ze:return 32;case Je:return 268435456;default:return 32}default:return 32}}var $y=!1,ma=null,ga=null,ya=null,pu=new Map,mu=new Map,ba=[],_q="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".split(" ");function OA(s,u){switch(s){case"focusin":case"focusout":ma=null;break;case"dragenter":case"dragleave":ga=null;break;case"mouseover":case"mouseout":ya=null;break;case"pointerover":case"pointerout":pu.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(u.pointerId)}}function gu(s,u,h,y,E,A){return s===null||s.nativeEvent!==A?(s={blockedOn:u,domEventName:h,eventSystemFlags:y,nativeEvent:A,targetContainers:[E]},u!==null&&(u=ui(u),u!==null&&AA(u)),s):(s.eventSystemFlags|=y,u=s.targetContainers,E!==null&&u.indexOf(E)===-1&&u.push(E),s)}function xq(s,u,h,y,E){switch(u){case"focusin":return ma=gu(ma,s,u,h,y,E),!0;case"dragenter":return ga=gu(ga,s,u,h,y,E),!0;case"mouseover":return ya=gu(ya,s,u,h,y,E),!0;case"pointerover":var A=E.pointerId;return pu.set(A,gu(pu.get(A)||null,s,u,h,y,E)),!0;case"gotpointercapture":return A=E.pointerId,mu.set(A,gu(mu.get(A)||null,s,u,h,y,E)),!0}return!1}function RA(s){var u=Yi(s.target);if(u!==null){var h=a(u);if(h!==null){if(u=h.tag,u===13){if(u=o(h),u!==null){s.blockedOn=u,Wc(s.priority,function(){TA(h)});return}}else if(u===31){if(u=l(h),u!==null){s.blockedOn=u,Wc(s.priority,function(){TA(h)});return}}else if(u===3&&h.stateNode.current.memoizedState.isDehydrated){s.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}s.blockedOn=null}function ud(s){if(s.blockedOn!==null)return!1;for(var u=s.targetContainers;0<u.length;){var h=jy(s.nativeEvent);if(h===null){h=s.nativeEvent;var y=new h.constructor(h.type,h);Mm=y,h.target.dispatchEvent(y),Mm=null}else return u=ui(h),u!==null&&AA(u),s.blockedOn=h,!1;u.shift()}return!0}function jA(s,u,h){ud(s)&&h.delete(u)}function wq(){$y=!1,ma!==null&&ud(ma)&&(ma=null),ga!==null&&ud(ga)&&(ga=null),ya!==null&&ud(ya)&&(ya=null),pu.forEach(jA),mu.forEach(jA)}function cd(s,u){s.blockedOn===u&&(s.blockedOn=null,$y||($y=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,wq)))}var fd=null;function MA(s){fd!==s&&(fd=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){fd===s&&(fd=null);for(var u=0;u<s.length;u+=3){var h=s[u],y=s[u+1],E=s[u+2];if(typeof y!="function"){if(My(y||h)===null)continue;break}var A=ui(h);A!==null&&(s.splice(u,3),u-=3,jg(A,{pending:!0,data:E,method:h.method,action:y},y,E))}}))}function No(s){function u(te){return cd(te,s)}ma!==null&&cd(ma,s),ga!==null&&cd(ga,s),ya!==null&&cd(ya,s),pu.forEach(u),mu.forEach(u);for(var h=0;h<ba.length;h++){var y=ba[h];y.blockedOn===s&&(y.blockedOn=null)}for(;0<ba.length&&(h=ba[0],h.blockedOn===null);)RA(h),h.blockedOn===null&&ba.shift();if(h=(s.ownerDocument||s).$$reactFormReplay,h!=null)for(y=0;y<h.length;y+=3){var E=h[y],A=h[y+1],z=E[cn]||null;if(typeof A=="function")z||MA(h);else if(z){var K=null;if(A&&A.hasAttribute("formAction")){if(E=A,z=A[cn]||null)K=z.formAction;else if(My(E)!==null)continue}else K=z.action;typeof K=="function"?h[y+1]=K:(h.splice(y,3),y-=3),MA(h)}}}function $A(){function s(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(z){return E=z})},focusReset:"manual",scroll:"manual"})}function u(){E!==null&&(E(),E=null),y||setTimeout(h,20)}function h(){if(!y&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,E=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(h,100),function(){y=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),E!==null&&(E(),E=null)}}}function Dy(s){this._internalRoot=s}dd.prototype.render=Dy.prototype.render=function(s){var u=this._internalRoot;if(u===null)throw Error(r(409));var h=u.current,y=Kn();kA(h,y,s,u,null,null)},dd.prototype.unmount=Dy.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var u=s.containerInfo;kA(s.current,2,null,s,null,null),Gf(),u[li]=null}};function dd(s){this._internalRoot=s}dd.prototype.unstable_scheduleHydration=function(s){if(s){var u=Xc();s={blockedOn:null,target:s,priority:u};for(var h=0;h<ba.length&&u!==0&&u<ba[h].priority;h++);ba.splice(h,0,s),h===0&&RA(s)}};var DA=t.version;if(DA!=="19.2.0")throw Error(r(527,DA,"19.2.0"));G.findDOMNode=function(s){var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(u),s=s!==null?d(s):null,s=s===null?null:s.stateNode,s};var Sq={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hd.isDisabled&&hd.supportsFiber)try{jt=hd.inject(Sq),vt=hd}catch{}}return bu.createRoot=function(s,u){if(!i(s))throw Error(r(299));var h=!1,y="",E=B2,A=U2,z=H2;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(E=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(z=u.onRecoverableError)),u=SA(s,1,!1,null,null,h,y,null,E,A,z,$A),s[li]=u.current,gy(s),new Dy(u)},bu.hydrateRoot=function(s,u,h){if(!i(s))throw Error(r(299));var y=!1,E="",A=B2,z=U2,K=H2,te=null;return h!=null&&(h.unstable_strictMode===!0&&(y=!0),h.identifierPrefix!==void 0&&(E=h.identifierPrefix),h.onUncaughtError!==void 0&&(A=h.onUncaughtError),h.onCaughtError!==void 0&&(z=h.onCaughtError),h.onRecoverableError!==void 0&&(K=h.onRecoverableError),h.formState!==void 0&&(te=h.formState)),u=SA(s,1,!0,u,h??null,y,E,te,A,z,K,$A),u.context=EA(null),h=u.current,y=Kn(),y=kl(y),E=ra(y),E.callback=null,ia(h,E,y),h=y,u.current.lanes=h,Ua(u,h),Vr(u),s[li]=u.current,gy(s),new dd(u)},bu.version="19.2.0",bu}var VA;function Mq(){if(VA)return Py.exports;VA=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Py.exports=jq(),Py.exports}var $q=Mq();const Dq=qn($q);(()=>{var e=`.container{background-color:var(--base00);color:var(--base05);padding:10px;letter-spacing:0.5px;font-family:monospace;border-radius:3px}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;padding-bottom:5px;border-bottom:solid 1px var(--base02)}.toolbar .options,.toolbar .search-wrapper{display:flex;align-items:center}.toolbar .icon-wrapper{height:15px;display:flex;align-items:center;padding:2px 5px}.toolbar .icon-wrapper:hover{background-color:var(--base02);border-radius:3px}.toolbar .icon-wrapper:first-child{margin-left:0px}.toolbar .search.icon{margin-right:5px}.toolbar .search-input{border:none;background:transparent;outline:none;flex:1;font-size:16px;color:var(--base0D)}.match{background-color:yellow;font-weight:bold;color:red}.data-row{padding:3px 0}.data-row .data-row{border-left:solid 1px var(--base02);padding-left:20px;margin-left:5px;display:none}.data-row.expanded>.data-row{display:block}.data-row .key-value-wrapper{display:flex;align-items:center}.data-row .key{color:var(--base07)}.data-row .key.number{color:var(--base0C)}.data-row .colon{color:var(--base07);margin:0 5px 0 0}.clickable{cursor:pointer}.data-row .opening-parenthesis,.data-row .closing-parenthesis{color:var(--base07)}.data-row .ellipsis{color:var(--base09)}.data-row.expanded>.key-value-wrapper .closing-parenthesis,.data-row.expanded>.key-value-wrapper .ellipsis{display:none}.data-row>.closing-parenthesis{display:none}.data-row.expanded>.closing-parenthesis{display:inline-block}.data-row .items-size{margin-left:10px;color:var(--base04);font-style:italic;display:none}.show-size .data-row .items-size{display:inline-block}.data-row .value.bool,.data-row .value.boolean{color:var(--base0E)}.data-row .value.function{color:var(--base0D)}.data-row .value.int,.data-row .value.integer{color:var(--base0F)}.data-row .value.float{color:var(--base0B)}.data-row .value.string{color:var(--base09)}.data-row .value.string .content{overflow-wrap:break-word}.data-row .value.string .content::before{content:open-quote}.data-row .value.string .content::after{content:close-quote}.data-row .value.regexp{color:var(--base0A)}.data-row .value.nan{color:var(--base08)}.data-row .value.null{color:var(--base0A)}.data-row .value.undefined{color:var(--base05)}.data-row .value.date{color:var(--base0D)}.data-row .value.nan,.data-row .value.null,.data-row .value.undefined{border-radius:3px;background-color:var(--base02);padding:1px 2px}.data-row .value .type{font-size:smaller;margin-right:4px;opacity:0.8;display:none}.data-row .value .value-data{word-break:break-all}.show-data-types .data-row .value .type{display:inline-block}.icon-wrapper,.copy-icon-wrapper{display:inline-block;cursor:pointer}.icon{display:block;position:relative}.icon:before,.icon:after{content:"";position:absolute;display:block}.expand.icon{margin-right:5px}.expand-icon-arrow .expand.icon{margin-left:3px;width:0;height:0;border-left:solid 6px var(--base0E);border-top:solid 6px transparent;border-bottom:solid 6px transparent}.expand-icon-arrow .expanded>.key-value-wrapper .expand.icon,.expand-icon-arrow .expanded.icon.expand{transform:rotate(90deg);border-left-color:var(--base0D)}.expand-icon-square .expand.icon,.expand-icon-circle .expand.icon{display:block;width:9px;height:9px;border-radius:2px;border:solid 1px var(--base0E)}.expand-icon-circle .expand.icon{border-radius:50%}.expand-icon-square .expand.icon:before,.expand-icon-circle .expand.icon:before,.expand-icon-square .expand.icon:after,.expand-icon-circle .expand.icon:after{width:5px;height:1px;background-color:var(--base0E);left:2px;top:4px}.expand-icon-square .expand.icon:after,.expand-icon-circle .expand.icon:after{transform:rotate(90deg)}.expand-icon-square .expanded>.key-value-wrapper .expand.icon:after,.expand-icon-circle .expanded>.key-value-wrapper .expand.icon:after,.expand-icon-square .expand.icon.expanded:after,.expand-icon-circle .expand.icon.expanded:after{display:none}.expand-icon-square .expanded>.key-value-wrapper .expand.icon,.expand-icon-circle .expanded>.key-value-wrapper .expand.icon,.expand-icon-square .expand.icon.expanded,.expand-icon-circle .expanded.expand.icon{border-color:var(--base0D)}.expand-icon-square .expanded>.key-value-wrapper .expand.icon:before,.expand-icon-circle .expanded>.key-value-wrapper .expand.icon:before,.expand-icon-square .expanded.expand.icon:before,.expand-icon-circle .expanded.expand.icon:before{background-color:var(--base0D)}.icon-wrapper{display:inline-block;cursor:pointer}.show-copy .key-value-wrapper:hover .icon.copy{display:block}.copy.icon{margin-left:10px;display:none;width:8px;height:10px;border:solid 1px var(--base0D);border-radius:1px;position:relative;top:4px;transition:0.2s all}.copy.icon:active{transform:scale(1.6);background-color:var(--base0B)}.copy.icon:before{content:"";display:block;left:-3px;top:-3px;width:8px;height:10px;border-top:solid 1px var(--base0D);border-left:solid 1px var(--base0D);border-radius:1px 0 0 0}.plus.icon{width:11px;height:1px;background-color:var(--base0D)}.plus.icon:after{content:"";width:11px;height:1px;background-color:var(--base0D);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.minus.icon{width:11px;height:1px;background-color:var(--base0D)}.indent.icon{color:var(--base0D);width:17px;height:8px;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D)}.indent.icon:before{content:"";position:absolute;top:2px;right:0;width:11px;height:2px;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D)}.indent.icon:after{content:"";position:absolute;top:1px;width:0;height:0;border-top:solid 3px transparent;border-bottom:solid 3px transparent;border-left:solid 3px var(--base0D);border-right:solid 3px transparent}.outdent.icon{color:var(--base0D);margin-left:2px;width:17px;height:8px;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D)}.outdent.icon:before{content:"";top:2px;right:0;width:11px;height:2px;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D)}.outdent.icon:after{content:"";top:1px;left:-3px;width:0;height:0;border-top:solid 3px transparent;border-bottom:solid 3px transparent;border-left:solid 3px transparent;border-right:solid 3px var(--base0D)}.refresh.icon{color:var(--base0D);width:10px;height:10px;border-radius:50%;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D);border-left:solid 1px transparent;border-right:solid 1px var(--base0D)}.refresh.icon:before{content:"";left:1px;top:8px;width:3px;height:3px;border-top:solid 1px var(--base0D);border-left:solid 1px var(--base0D);-webkit-transform:rotate(-22.5deg);transform:rotate(-22.5deg)}.info.icon{width:12px;height:11px;border:solid 1px var(--base0D);border-radius:2px}.info.icon::before{top:5px;left:5px;width:2px;height:5px;background-color:var(--base0D)}.info.icon::after{top:2px;left:5px;width:2px;height:2px;background-color:var(--base0D)}.info.icon.active{background-color:var(--base0D)}.info.icon.active::before,.info.icon.active::after{background-color:var(--base02)}.search.icon{color:var(--base0D);width:11px;height:11px;border:solid 1px var(--base0D);border-radius:100%;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.search.icon:before{content:"";top:11px;left:5px;height:6px;width:1px;background-color:var(--base0D)}
50
+ `,t={apathy:["#031a16","#0b342d","#184e45","#2b685e","#5f9c92","#81b5ac","#a7cec8","#d2e7e4","#3e9688","#3e7996","#3e4c96","#883e96","#963e4c","#96883e","#4c963e","#3e965b"],ashes:["#1c2023","#393f45","#565e65","#747c84","#adb3ba","#c7ccd1","#dfe2e5","#f3f4f5","#c7ae95","#c7c795","#aec795","#95c7ae","#95aec7","#ae95c7","#c795ae","#c79595"],"atelier-dune-light":["#fefbec","#e8e4cf","#a6a28c","#999580","#7d7a68","#6e6b5e","#292824","#20201d","#d73737","#b65611","#ae9513","#60ac39","#1fad83","#6684e1","#b854d4","#d43552"],"atelier-dune":["#20201d","#292824","#6e6b5e","#7d7a68","#999580","#a6a28c","#e8e4cf","#fefbec","#d73737","#b65611","#ae9513","#60ac39","#1fad83","#6684e1","#b854d4","#d43552"],atlas:["#002635","#00384d","#517f8d","#6c8b91","#869696","#a1a19a","#e6e6dc","#fafaf8","#ff5a67","#f08e48","#ffcc1b","#7fc06e","#14747e","#5dd7b9","#9a70a4","#c43060"],bespin:["#28211c","#36312e","#5e5d5c","#666666","#797977","#8a8986","#9d9b97","#baae9e","#cf6a4c","#cf7d34","#f9ee98","#54be0d","#afc4db","#5ea6ea","#9b859d","#937121"],"black-metal":["#000000","#121212","#222222","#333333","#999999","#c1c1c1","#999999","#c1c1c1","#5f8787","#aaaaaa","#a06666","#dd9999","#aaaaaa","#888888","#999999","#444444"],brewer:["#0c0d0e","#2e2f30","#515253","#737475","#959697","#b7b8b9","#dadbdc","#fcfdfe","#e31a1c","#e6550d","#dca060","#31a354","#80b1d3","#3182bd","#756bb1","#b15928"],bright:["#000000","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#f5f5f5","#ffffff","#fb0120","#fc6d24","#fda331","#a1c659","#76c7b7","#6fb3d2","#d381c3","#be643c"],brogrammer:["#1f1f1f","#f81118","#2dc55e","#ecba0f","#2a84d2","#4e5ab7","#1081d6","#d6dbe5","#d6dbe5","#de352e","#1dd361","#f3bd09","#1081d6","#5350b9","#0f7ddb","#ffffff"],"brushtrees-dark":["#485867","#5a6d7a","#6d828e","#8299a1","#98afb5","#b0c5c8","#c9dbdc","#e3efef","#b38686","#d8bba2","#aab386","#87b386","#86b3b3","#868cb3","#b386b2","#b39f9f"],brushtrees:["#e3efef","#c9dbdc","#b0c5c8","#98afb5","#8299a1","#6d828e","#5a6d7a","#485867","#b38686","#d8bba2","#aab386","#87b386","#86b3b3","#868cb3","#b386b2","#b39f9f"],chalk:["#151515","#202020","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#f5f5f5","#fb9fb1","#eda987","#ddb26f","#acc267","#12cfc0","#6fc2ef","#e1a3ee","#deaf8f"],circus:["#191919","#202020","#303030","#5f5a60","#505050","#a7a7a7","#808080","#ffffff","#dc657d","#4bb1a7","#c3ba63","#84b97c","#4bb1a7","#639ee4","#b888e2","#b888e2"],"classic-dark":["#151515","#202020","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#f5f5f5","#ac4142","#d28445","#f4bf75","#90a959","#75b5aa","#6a9fb5","#aa759f","#8f5536"],"classic-light":["#f5f5f5","#e0e0e0","#d0d0d0","#b0b0b0","#505050","#303030","#202020","#151515","#ac4142","#d28445","#f4bf75","#90a959","#75b5aa","#6a9fb5","#aa759f","#8f5536"],codeschool:["#232c31","#1c3657","#2a343a","#3f4944","#84898c","#9ea7a6","#a7cfa3","#b5d8f6","#2a5491","#43820d","#a03b1e","#237986","#b02f30","#484d79","#c59820","#c98344"],cupcake:["#fbf1f2","#f2f1f4","#d8d5dd","#bfb9c6","#a59daf","#8b8198","#72677e","#585062","#d57e85","#ebb790","#dcb16c","#a3b367","#69a9a7","#7297b9","#bb99b4","#baa58c"],cupertino:["#ffffff","#c0c0c0","#c0c0c0","#808080","#808080","#404040","#404040","#5e5e5e","#c41a15","#eb8500","#826b28","#007400","#318495","#0000ff","#a90d91","#826b28"],darcula:["#2b2b2b","#323232","#323232","#606366","#a4a3a3","#a9b7c6","#ffc66d","#ffffff","#4eade5","#689757","#bbb529","#6a8759","#629755","#9876aa","#cc7832","#808080"],darktooth:["#1d2021","#32302f","#504945","#665c54","#928374","#a89984","#d5c4a1","#fdf4c1","#fb543f","#fe8625","#fac03b","#95c085","#8ba59b","#0d6678","#8f4673","#a87322"],"default-dark":["#181818","#282828","#383838","#585858","#b8b8b8","#d8d8d8","#e8e8e8","#f8f8f8","#ab4642","#dc9656","#f7ca88","#a1b56c","#86c1b9","#7cafc2","#ba8baf","#a16946"],"default-light":["#ffffff","#e8e8e8","#d8d8d8","#b8b8b8","#585858","#383838","#282828","#181818","#ab4642","#dc9656","#ab4642","#a1b56c","#86c1b9","#7cafc2","#ba8baf","#a16946"],dracula:["#282936","#3a3c4e","#4d4f68","#626483","#62d6e8","#e9e9f4","#f1f2f8","#f7f7fb","#ea51b2","#b45bcf","#00f769","#ebff87","#a1efe4","#62d6e8","#b45bcf","#00f769"],eighties:["#2d2d2d","#393939","#515151","#747369","#a09f93","#d3d0c8","#e8e6df","#f2f0ec","#f2777a","#f99157","#ffcc66","#99cc99","#66cccc","#6699cc","#cc99cc","#d27b53"],embers:["#16130f","#2c2620","#433b32","#5a5047","#8a8075","#a39a90","#beb6ae","#dbd6d1","#826d57","#828257","#6d8257","#57826d","#576d82","#6d5782","#82576d","#825757"],flat:["#2c3e50","#34495e","#7f8c8d","#95a5a6","#bdc3c7","#e0e0e0","#f5f5f5","#ecf0f1","#e74c3c","#e67e22","#f1c40f","#2ecc71","#1abc9c","#3498db","#9b59b6","#be643c"],"fruit-soda":["#f1ecf1","#e0dee0","#d8d5d5","#b5b4b6","#979598","#515151","#474545","#2d2c2c","#fe3e31","#fe6d08","#f7e203","#47f74c","#0f9cfd","#2931df","#611fce","#b16f40"],github:["#ffffff","#f5f5f5","#c8c8fa","#969896","#e8e8e8","#333333","#ffffff","#969896","#ed6a43","#0086b3","#795da3","#183691","#183691","#795da3","#a71d5d","#333333"],"google-dark":["#1d1f21","#282a2e","#373b41","#969896","#b4b7b4","#c5c8c6","#e0e0e0","#ffffff","#cc342b","#f96a38","#fba922","#198844","#3971ed","#3971ed","#a36ac7","#3971ed"],"google-light":["#ffffff","#e0e0e0","#c5c8c6","#b4b7b4","#969896","#373b41","#282a2e","#1d1f21","#cc342b","#f96a38","#fba922","#198844","#3971ed","#3971ed","#a36ac7","#3971ed"],"grayscale-dark":["#101010","#252525","#464646","#525252","#ababab","#b9b9b9","#e3e3e3","#f7f7f7","#7c7c7c","#999999","#a0a0a0","#8e8e8e","#868686","#686868","#747474","#5e5e5e"],"grayscale-light":["#f7f7f7","#e3e3e3","#b9b9b9","#ababab","#525252","#464646","#252525","#101010","#7c7c7c","#999999","#a0a0a0","#8e8e8e","#868686","#686868","#747474","#5e5e5e"],greenscreen:["#001100","#003300","#005500","#007700","#009900","#00bb00","#00dd00","#00ff00","#007700","#009900","#007700","#00bb00","#005500","#009900","#00bb00","#005500"],"gruvbox-dark-hard":["#1d2021","#3c3836","#504945","#665c54","#bdae93","#d5c4a1","#ebdbb2","#fbf1c7","#fb4934","#fe8019","#fabd2f","#b8bb26","#8ec07c","#83a598","#d3869b","#d65d0e"],"gruvbox-light-hard":["#f9f5d7","#ebdbb2","#d5c4a1","#bdae93","#665c54","#504945","#3c3836","#282828","#9d0006","#af3a03","#b57614","#79740e","#427b58","#076678","#8f3f71","#d65d0e"],"harmonic-dark":["#0b1c2c","#223b54","#405c79","#627e99","#aabcce","#cbd6e2","#e5ebf1","#f7f9fb","#bf8b56","#bfbf56","#8bbf56","#56bf8b","#568bbf","#8b56bf","#bf568b","#bf5656"],"harmonic-light":["#f7f9fb","#e5ebf1","#cbd6e2","#aabcce","#627e99","#405c79","#223b54","#0b1c2c","#bf8b56","#bfbf56","#8bbf56","#56bf8b","#568bbf","#8b56bf","#bf568b","#bf5656"],"heetch-light":["#feffff","#392551","#7b6d8b","#9c92a8","#ddd6e5","#5a496e","#470546","#190134","#27d9d5","#bdb6c5","#5ba2b6","#f80059","#c33678","#47f9f5","#bd0152","#dedae2"],heetch:["#190134","#392551","#5a496e","#7b6d8b","#9c92a8","#bdb6c5","#dedae2","#feffff","#27d9d5","#5ba2b6","#8f6c97","#c33678","#f80059","#bd0152","#82034c","#470546"],helios:["#1d2021","#383c3e","#53585b","#6f7579","#cdcdcd","#d5d5d5","#dddddd","#e5e5e5","#d72638","#eb8413","#f19d1a","#88b92d","#1ba595","#1e8bac","#be4264","#c85e0d"],hopscotch:["#322931","#433b42","#5c545b","#797379","#989498","#b9b5b8","#d5d3d5","#ffffff","#dd464c","#fd8b19","#fdcc59","#8fc13e","#149b93","#1290bf","#c85e7c","#b33508"],"horizon-dark":["#1c1e26","#232530","#2e303e","#676a8d","#ced1d0","#cbced0","#dcdfe4","#e3e6ee","#e93c58","#e58d7d","#efb993","#efaf8e","#24a8b4","#df5273","#b072d1","#e4a382"],"ia-dark":["#1a1a1a","#222222","#1d414d","#767676","#b8b8b8","#cccccc","#e8e8e8","#f8f8f8","#d88568","#d86868","#b99353","#83a471","#7c9cae","#8eccdd","#b98eb2","#8b6c37"],"ia-light":["#f6f6f6","#dedede","#bde5f2","#898989","#767676","#181818","#e8e8e8","#898989","#9c5a02","#c43e18","#c48218","#38781c","#2d6bb1","#48bac2","#a94598","#8b6c37"],icy:["#021012","#031619","#041f23","#052e34","#064048","#095b67","#0c7c8c","#109cb0","#16c1d9","#b3ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7"],isotope:["#000000","#404040","#606060","#808080","#c0c0c0","#d0d0d0","#e0e0e0","#ffffff","#ff0000","#ff9900","#ff0099","#33ff00","#00ffff","#0066ff","#cc00ff","#3300ff"],macintosh:["#000000","#404040","#404040","#808080","#808080","#c0c0c0","#c0c0c0","#ffffff","#dd0907","#ff6403","#fbf305","#1fb714","#02abea","#0000d3","#4700a5","#90713a"],marrakesh:["#201602","#302e00","#5f5b17","#6c6823","#86813b","#948e48","#ccc37a","#faf0a5","#c35359","#b36144","#a88339","#18974e","#75a738","#477ca1","#8868b3","#b3588e"],materia:["#263238","#2c393f","#37474f","#707880","#c9ccd3","#cdd3de","#d5dbe5","#ffffff","#ec5f67","#ea9560","#ffcc00","#8bd649","#80cbc4","#89ddff","#82aaff","#ec5f67"],"material-lighter":["#fafafa","#e7eaec","#cceae7","#ccd7da","#8796b0","#80cbc4","#80cbc4","#666666","#ff5370","#f76d47","#ffb62c","#91b859","#39adb5","#6182b8","#7c4dff","#e53935"],material:["#263238","#2e3c43","#314549","#546e7a","#b2ccd6","#eeffff","#eeffff","#ffffff","#f07178","#f78c6c","#ffcb6b","#c3e88d","#89ddff","#82aaff","#c792ea","#ff5370"],"mellow-purple":["#1e0528","#1a092d","#331354","#320f55","#873582","#ffeeff","#ffeeff","#f8c0ff","#00d9e9","#aa00a3","#955ae7","#05cb0d","#b900b1","#550068","#8991bb","#4d6fff"],"mexico-light":["#f8f8f8","#e8e8e8","#d8d8d8","#b8b8b8","#585858","#383838","#282828","#181818","#ab4642","#dc9656","#f79a0e","#538947","#4b8093","#7cafc2","#96609e","#a16946"],mocha:["#3b3228","#534636","#645240","#7e705a","#b8afad","#d0c8c6","#e9e1dd","#f5eeeb","#cb6077","#d28b71","#f4bc87","#beb55b","#7bbda4","#8ab3b5","#a89bb9","#bb9584"],monokai:["#272822","#383830","#49483e","#75715e","#a59f85","#f8f8f2","#f5f4f1","#f9f8f5","#f92672","#fd971f","#f4bf75","#a6e22e","#a1efe4","#66d9ef","#ae81ff","#cc6633"],nord:["#2e3440","#3b4252","#434c5e","#4c566a","#d8dee9","#e5e9f0","#eceff4","#8fbcbb","#88c0d0","#81a1c1","#5e81ac","#bf616a","#d08770","#ebcb8b","#a3be8c","#b48ead"],ocean:["#2b303b","#343d46","#4f5b66","#65737e","#a7adba","#c0c5ce","#dfe1e8","#eff1f5","#bf616a","#d08770","#ebcb8b","#a3be8c","#96b5b4","#8fa1b3","#b48ead","#ab7967"],"one-light":["#fafafa","#f0f0f1","#e5e5e6","#a0a1a7","#696c77","#383a42","#202227","#090a0b","#ca1243","#d75f00","#c18401","#50a14f","#0184bc","#4078f2","#a626a4","#986801"],onedark:["#282c34","#353b45","#3e4451","#545862","#565c64","#abb2bf","#b6bdca","#c8ccd4","#e06c75","#d19a66","#e5c07b","#98c379","#56b6c2","#61afef","#c678dd","#be5046"],"papercolor-dark":["#1c1c1c","#af005f","#5faf00","#d7af5f","#5fafd7","#808080","#d7875f","#d0d0d0","#585858","#5faf5f","#afd700","#af87d7","#ffaf00","#ff5faf","#00afaf","#5f8787"],"papercolor-light":["#eeeeee","#af0000","#008700","#5f8700","#0087af","#878787","#005f87","#444444","#bcbcbc","#d70000","#d70087","#8700af","#d75f00","#d75f00","#005faf","#005f87"],paraiso:["#2f1e2e","#41323f","#4f424c","#776e71","#8d8687","#a39e9b","#b9b6b0","#e7e9db","#ef6155","#f99b15","#fec418","#48b685","#5bc4bf","#06b6ef","#815ba4","#e96ba8"],pico:["#000000","#1d2b53","#7e2553","#008751","#ab5236","#5f574f","#c2c3c7","#fff1e8","#ff004d","#ffa300","#fff024","#00e756","#29adff","#83769c","#ff77a8","#ffccaa"],pop:["#000000","#202020","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#ffffff","#eb008a","#f29333","#f8ca12","#37b349","#00aabb","#0e5a94","#b31e8d","#7a2d00"],railscasts:["#2b2b2b","#272935","#3a4055","#5a647e","#d4cfc9","#e6e1dc","#f4f1ed","#f9f7f3","#da4939","#cc7833","#ffc66d","#a5c261","#519f50","#6d9cbe","#b6b3eb","#bc9458"],seti:["#151718","#282a2b","#3b758c","#41535b","#43a5d5","#d6d6d6","#eeeeee","#ffffff","#cd3f45","#db7b55","#e6cd69","#9fca56","#55dbbe","#55b5db","#a074c4","#8a553f"],"solarized-dark":["#002b36","#073642","#586e75","#657b83","#839496","#93a1a1","#eee8d5","#fdf6e3","#dc322f","#cb4b16","#b58900","#859900","#2aa198","#268bd2","#6c71c4","#d33682"],"solarized-light":["#fdf6e3","#eee8d5","#93a1a1","#839496","#657b83","#586e75","#073642","#002b36","#dc322f","#cb4b16","#b58900","#859900","#2aa198","#268bd2","#6c71c4","#d33682"],spacemacs:["#1f2022","#282828","#444155","#585858","#b8b8b8","#a3a3a3","#e8e8e8","#f8f8f8","#f2241f","#ffa500","#b1951d","#67b11d","#2d9574","#4f97d7","#a31db1","#b03060"],"summerfruit-dark":["#151515","#202020","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#ffffff","#ff0086","#fd8900","#aba800","#00c918","#1faaaa","#3777e6","#ad00a1","#cc6633"],"summerfruit-light":["#ffffff","#e0e0e0","#d0d0d0","#b0b0b0","#000000","#101010","#151515","#202020","#ff0086","#fd8900","#aba800","#00c918","#1faaaa","#3777e6","#ad00a1","#cc6633"],"tomorrow-night":["#1d1f21","#282a2e","#373b41","#969896","#b4b7b4","#c5c8c6","#e0e0e0","#ffffff","#cc6666","#de935f","#f0c674","#b5bd68","#8abeb7","#81a2be","#b294bb","#a3685a"],tomorrow:["#ffffff","#e0e0e0","#d6d6d6","#8e908c","#969896","#4d4d4c","#282a2e","#1d1f21","#c82829","#f5871f","#eab700","#718c00","#3e999f","#4271ae","#8959a8","#a3685a"],tube:["#231f20","#1c3f95","#5a5758","#737171","#959ca1","#d9d8d8","#e7e7e8","#ffffff","#ee2e24","#f386a1","#ffd204","#00853e","#85cebc","#009ddc","#98005d","#b06110"],twilight:["#1e1e1e","#323537","#464b50","#5f5a60","#838184","#a7a7a7","#c3c3c3","#ffffff","#cf6a4c","#cda869","#f9ee98","#8f9d6a","#afc4db","#7587a6","#9b859d","#9b703f"],woodland:["#231e18","#302b25","#48413a","#9d8b70","#b4a490","#cabcb1","#d7c8bc","#e4d4c8","#d35c5c","#ca7f32","#e0ac16","#b7ba53","#6eb958","#88a4d3","#bb90e2","#b49368"],zenburn:["#383838","#404040","#606060","#6f6f6f","#808080","#dcdccc","#c0c0c0","#ffffff","#dca3a3","#dfaf8f","#e0cf9f","#5f7f5f","#93e0e3","#7cb8bb","#dc8cc3","#000000"]},n=w=>{let v;if(typeof w=="string"){if(t[w]===void 0)throw new Error(`${w} not found`);v=t[w].reduce((k,C,T)=>{let N=`base0${T.toString(16).toUpperCase()}`;return k[N]=C,k},{})}else v=w;return`.container{${Object.keys(v).map(k=>`--${k}: ${v[k]};`).join("")}}`},r=w=>{try{return!!new URL(w)}catch{return!1}},i=w=>{if(Array.isArray(w))return"array";if(w===null)return"null";if(w instanceof RegExp)return"regexp";let v=typeof w;return v==="number"?isNaN(w)?"NaN":isFinite(w)?Number.isInteger(w)?"int":"float":"Infinity":v==="boolean"?"bool":v==="object"&&w instanceof Date?"date":v},a=w=>{if(typeof w=="boolean")return w;if(w==="true")return!0;if(w==="false")return!1;throw new Error("should be a boolean!")},o=w=>{if(typeof w=="string")return w;throw new Error("should be a string!")},l=w=>{if(typeof w=="number"&&w>=0)return w;if(typeof w=="string"&&(w=parseFloat(w)),isNaN(w)||w<0)throw new Error("should be a positive number!");return w},c=w=>{if(typeof w=="boolean"||typeof w=="number")return w;if(w==="true")return!0;if(w==="false")return!1;if(typeof w=="string"&&(w=parseFloat(w),!isNaN(w)&&w>=0))return w;throw new Error("should be a boolean or a positive number!")},f=w=>{if(typeof w=="object")return w;if(typeof w=="string")try{return JSON.parse(w)}catch{return w}throw new Error("should be a string or JSON!")},d=function({key:w,value:v,expanded:k,indent:C,onToggleExpand:T,level:N=0,parentRow:j}){let $=document.createElement("div");this.maxLevel=N;let M=i(v),q=M==="array"||M==="object",F=k===!0||k>N,B,I,V,H;$.className=`data-row ${F?"expanded":""}`,$.dataset.key=w,$.dataset.level=N,N>0&&($.style.paddingLeft=`${C*5}px`);let G=document.createElement("span");G.className="key-value-wrapper",$.appendChild(G);let X=()=>{$.classList.toggle("expanded"),T&&($.classList.contains("expanded")?T(N+1):T(N))};if(q){let Z=document.createElement("span");Z.className="icon-wrapper",G.appendChild(Z),B=document.createElement("span"),B.className="expand icon clickable",B.setAttribute("title",F?"Collapse":"Expand"),Z.appendChild(B),Z.addEventListener("click",()=>X())}if(w!==null&&w!==""){let Z=typeof w;V=document.createElement("span"),V.className=`key clickable ${Z==="number"?"number":""}`,V.textContent=Z==="number"?w:`${w}`,V.addEventListener("click",()=>X()),G.appendChild(V);let R=document.createElement("span");R.classList.add("colon"),R.textContent=":",G.appendChild(R)}if(q){let Z=document.createElement("span");Z.className="opening-parenthesis",Z.textContent=M==="array"?"[":"{",G.appendChild(Z);let R=document.createElement("span");R.className="ellipsis clickable",R.textContent="...",R.addEventListener("click",()=>X()),G.appendChild(R);let D=document.createElement("span");D.className="closing-parenthesis",D.textContent=M==="array"?"]":"}",G.appendChild(D);let U=document.createElement("span"),Y=M==="array"?v.length:Object.keys(v).length;U.className="items-size",U.textContent=`${Y} item${Y===1?"":"s"}`,G.appendChild(U),I=[],(M==="array"?v.map((ae,re)=>re):Object.keys(v)).forEach(ae=>{let re=new d({key:ae,value:v[ae],expanded:k,indent:C,onToggleExpand:T,level:N+1,parentRow:$});I.push(re),$.appendChild(re.element),this.maxLevel=Math.max(this.maxLevel,re.maxLevel)});let ne=document.createElement("span");ne.className="closing-parenthesis",ne.textContent=M==="array"?"]":"}",$.appendChild(ne)}else{let Z=null;["nan","NaN","undefined","null"].includes(M)||(Z=document.createElement("span"),Z.className="type",Z.textContent=M.toLowerCase());let R=document.createElement("span");R.className=`value ${M.toLowerCase()}`,H=document.createElement("span"),H.className="value-data",H.textContent=M==="string"?`"${v}"`:v,Z&&R.appendChild(Z),R.appendChild(H),G.appendChild(R)}let W=document.createElement("span");W.className="copy icon",W.setAttribute("title","Copy to clipboard");let L=document.createElement("span");L.className="icon-wrapper",L.addEventListener("click",()=>{navigator.clipboard.writeText(JSON.stringify(v,null,C))}),L.appendChild(W),G.appendChild(L);let P=Z=>{let R=new RegExp(Z,"gi"),D=[];V&&D.push(V),H&&D.push(H);let U=!1;D.forEach(Y=>{let ne=Y.textContent;if(Y.innerHTML=ne,!Z||Z==="")return;let ae=[...ne.matchAll(R)].map(Q=>Q.index),re=[],de=0;ae.forEach(Q=>{U=!0,re.push(ne.slice(de,Q)),re.push(`<span class="match">${Z}</span>`),de=Q+Z.length}),re.push(ne.slice(de)),Y.innerHTML=re.join("")}),U&&!$.classList.contains("expanded")&&(X(),j&&j.classList.add("expanded"))};this.update=({expanded:Z,indent:R,searchTerm:D})=>{R!==void 0&&N>0&&($.style.paddingLeft=`${R*5}px`),Z!==void 0&&(F=Z===!0||Z>N,$.classList.toggle("expanded",F),B&&(B.title=F?"Collapse":"Expand")),D!=null&&P(D),I&&I.forEach(U=>U.update({expanded:Z,indent:R,searchTerm:D}))},this.element=$},p=d,m=function({expanded:w,indent:v,onChange:k,onSearch:C,showDetails:T}){this.indent=v||2,this.expanded=typeof w=="number"?w:2,this.showDetails=T!==!1,this.maxExpandLevel=0;let N,j=document.createElement("div");j.className="toolbar";let $=document.createElement("div");$.className="options",j.appendChild($);let M=document.createElement("div");M.className="search-wrapper",j.appendChild(M);let q=document.createElement("div");q.className="icon-wrapper clickable",$.appendChild(q);let F=document.createElement("span");F.className="icon refresh",q.onclick=()=>this.refresh(),q.appendChild(F);let B=document.createElement("div");B.className="icon-wrapper clickable",$.appendChild(B);let I=document.createElement("span");I.className="icon plus",B.appendChild(I),B.onclick=()=>{this.expanded<this.maxExpandLevel&&(this.expanded+=1),k({expanded:this.expanded})};let V=document.createElement("div");V.className="icon-wrapper clickable",$.appendChild(V);let H=document.createElement("span");H.className="icon minus",V.appendChild(H),V.onclick=()=>{this.expanded>this.maxExpandLevel&&(this.expanded=this.maxExpandLevel),this.expanded>0&&(this.expanded-=1),k({expanded:this.expanded})};let G=document.createElement("div");G.className="icon-wrapper clickable",$.appendChild(G);let X=document.createElement("span");X.className="icon indent",G.onclick=()=>{this.indent+=1,k({indent:this.indent})},G.appendChild(X);let W=document.createElement("div");W.className="icon-wrapper clickable",$.appendChild(W);let L=document.createElement("span");L.className="icon outdent",W.onclick=()=>{this.indent-=1,k({indent:this.indent})},W.appendChild(L);let P=document.createElement("div");P.className="icon-wrapper clickable",$.appendChild(P);let Z=document.createElement("span");Z.className=`icon info ${this.showDetails?"active":""}`,P.onclick=()=>{Z.classList.toggle("active"),this.showDetails=!this.showDetails,k({showDetails:this.showDetails})},P.appendChild(Z);let R=document.createElement("span");R.className="icon search",M.appendChild(R),N=document.createElement("input"),N.className="search-input",N.placeholder="Search",N.oninput=D=>{C(D.target.value)},M.appendChild(N),this.refresh=()=>{this.expanded=1,this.indent=2,N&&(N.value=""),k({indent:2,expanded:1}),C("")},this.updateShowDetails=D=>{this.showDetails=D,this.showDetails?Z.classList.add("active"):Z.classList.remove("active")},this.element=j},g=m;function _(w,v={}){let k=document.createElement("div");k.className="container",w.appendChild(k);let C=null,T=null,N={};this.update=({data:j,expanded:$,indent:M,expandIconType:q,showDataTypes:F,showToolbar:B,showSize:I,showCopy:V})=>{if(j){let G=JSON.stringify(j);N.dataComapreString!==G&&(N.dataComapreString=G,C=new p({key:"",value:j,expanded:$,indent:M,onToggleExpand:X=>{T&&(T.expanded=X),N.expanded=X}}),k.replaceChildren(C.element),N.showToolbar&&T&&(k.prepend(T.element),T.maxExpandLevel=C.maxLevel,T.refresh()))}if(B!==void 0&&N.showToolbar!==B)if(N.showToolbar=B,B)T||(T=new g({expanded:N.expanded,indent:N.indent,onChange:({expanded:G,indent:X,showDetails:W})=>{let L={expanded:G,indent:X};W!==void 0&&(L.showCopy=W,L.showSize=W,L.showDataTypes=W),this.update(L)},onSearch:G=>{C&&C.update({searchTerm:G})}})),C&&(T.maxExpandLevel=C.maxLevel),k.prepend(T.element);else{let G=k.querySelector(".toolbar");G&&G.remove()}let H={};$!==void 0&&N.expanded!==$&&(N.expanded=$,H.expanded=$),M!==void 0&&N.indent!==M&&(N.indent=M,H.indent=M),Object.keys(H).length>0&&C&&C.update(H),V!==void 0&&N.showCopy!==V&&(N.showCopy=V,k.classList.toggle("show-copy",V)),I!==void 0&&N.showSize!==I&&(N.showSize=I,k.classList.toggle("show-size",I),T&&T.updateShowDetails(N.showSize||N.showDataTypes)),F!==void 0&&N.showDataTypes!==F&&(N.showDataTypes=F,k.classList.toggle("show-data-types",F),T&&T.updateShowDetails(N.showSize||N.showDataTypes)),q!==void 0&&N.expandIconType!==q&&(k.classList.add(`expand-icon-${q}`),k.classList.remove(`expand-icon-${N.expandIconType}`),N.expandIconType=q)},this.update(v)}var S=_,b={indent:2,expanded:1,theme:"default-light",showDataTypes:!0,showToolbar:!1,expandIconType:"arrow",showCopy:!0,showSize:!0,data:null},x=class iw extends HTMLElement{#n;#e;#i;#s;constructor(){super(),this.#e={...b},this.#n=document.createElement("style");let v=this.attachShadow({mode:"open"}),k=document.createElement("style");k.textContent=`${e}`,v.appendChild(k),v.appendChild(this.#n),this.theme=this.#e.theme,this.#s=new S(v,this.#e)}static get observedAttributes(){return Object.keys(b).map(v=>v.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())}static allowedAttributes=["id"].concat(iw.observedAttributes);#r=(...v)=>{console.warn(`JsonViewer${this.id?` (${this.id})`:""}:`,...v)};#t=(v,k,C,T)=>{try{if(k=C(k),T&&!T.includes(k))throw new Error(`should be one of ${T.join(", ")}`);if(this.#e[v]===k)return;this.#e[v]=k,this.#a()}catch(N){this.#r(`Attribute ${v}: ${N.message}`)}};set showDataTypes(v){this.#t("showDataTypes",v,a)}set showToolbar(v){this.#t("showToolbar",v,a)}set indent(v){this.#t("indent",v,l)}set expandIconType(v){this.#t("expandIconType",v,o,["arrow","square","circle"])}set expanded(v){this.#t("expanded",v,c)}set showSize(v){this.#t("showSize",v,a)}set showCopy(v){this.#t("showCopy",v,a)}set theme(v){try{if(v=f(v),this.#e.theme===v&&this.#n.textContent!=="")return;this.#n.textContent=n(v),this.#e.theme=v}catch(k){this.#r(`Attribute theme: ${k.message}`)}}set data(v){try{v=f(v);let k=JSON.stringify(v);if(this.#e.data===k)return;this.#e.data=k,r(v)?fetch(v).then(C=>C.json()).then(C=>{this.#i=C,this.#a()}):(this.#i=v,this.#a())}catch(k){this.#r(`Attribute data: ${k.message}`)}}get options(){return this.#e}connectedCallback(){window.addEventListener("DOMContentLoaded",()=>{let v=this.textContent;this.textContent="",v&&(this.data=v)})}attributeChangedCallback(v,k,C){if(iw.allowedAttributes.indexOf(v)>-1){let T=v.replace(/-([a-z])/g,N=>N[1].toUpperCase());this[T]=C}else this.#r(`Attribute ${v} is not supported and will be ignored!`),this.removeAttribute(v)}#a=()=>{this.#s.update({data:this.#i,expanded:this.#e.expanded,expandIconType:this.#e.expandIconType,indent:this.#e.indent,showDataTypes:this.#e.showDataTypes,showToolbar:this.#e.showToolbar,showSize:this.#e.showSize,showCopy:this.#e.showCopy})}};customElements.get("andypf-json-viewer")||customElements.define("andypf-json-viewer",x)})();var ee=Ec();const f5=qn(ee),Iq=e=>{const n=e.trim().match(/^<file type="([^"]+)" url="([^"]+)"><\/file>$/);if(n){const[,r,i]=n;if(r==="image")return[{type:"image_url",image_url:{url:i}}];if(r==="video")return[{type:"video_url",video_url:{url:i}}];if(r==="audio")return[{type:"audio_url",audio_url:{url:i}}];if(r==="other")return[{type:"file_url",file_url:{url:i}}]}return[]},Pq=({content:e})=>{const t=()=>typeof e=="string"?O.jsx("div",{className:"text-white whitespace-pre-wrap",children:e}):Array.isArray(e)?e.flatMap(n=>{if(n.type==="text"&&typeof n.text=="string"){const r=Iq(n.text);return r.length>0?r:[n]}else return[n]}).map((n,r)=>{switch(n.type){case"text":return O.jsx("div",{className:"text-white whitespace-pre-wrap",children:n.text},r);case"image_url":return O.jsx("div",{className:"mt-2",children:O.jsx("img",{src:n.image_url.url,alt:n.image_url.url,className:"max-w-[200px] rounded"})},r);case"video_url":return O.jsx("div",{className:"mt-2",children:O.jsx("video",{controls:!0,src:n.video_url.url,className:"max-w-[200px] rounded",children:"您的浏览器不支持视频播放"})},r);case"audio_url":return O.jsx("div",{className:"mt-2",children:O.jsx("audio",{controls:!0,src:n.audio_url.url,className:"w-full",children:"您的浏览器不支持音频播放"})},r);case"file_url":return O.jsxs("div",{className:"mt-2 p-2 bg-gray-100 rounded flex items-center gap-2",children:[O.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",className:"text-gray-500",children:O.jsx("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})}),O.jsx("a",{href:n.file_url.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline text-sm",children:"下载文件"})]},r);default:return O.jsx("div",{className:"text-white whitespace-pre-wrap",children:JSON.stringify(n)},r)}}):O.jsx("div",{className:"text-white whitespace-pre-wrap",children:JSON.stringify(e)});return O.jsx("div",{className:"flex flex-row w-full justify-end",children:O.jsx("div",{className:"flex flex-col w-fit bg-blue-500/90 rounded-2xl text-white px-4 py-3 max-w-[80%]",children:t()})})},md=e=>e.toString(),lS=({usage_metadata:e,spend_time:t,response_metadata:n,id:r,tool_call_id:i})=>{const a=t?(e.output_tokens||0)*1e3/(t||1):0;return t=t&&!isNaN(t)?t:0,O.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-400 mt-3",children:[O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx(zq,{usage_metadata:e}),!!t&&O.jsxs("span",{className:"text-gray-400",children:[(t/1e3).toFixed(2),"s"]}),!!a&&O.jsxs("span",{className:"text-gray-400",children:[a.toFixed(2)," TPS"]})]}),O.jsxs("div",{className:"flex items-center gap-2",children:[n?.model_name&&O.jsx("span",{className:"text-gray-500",children:n.model_name}),i&&O.jsxs("span",{className:"text-gray-400",children:["Tool: ",i]}),r&&O.jsxs("span",{className:"text-gray-400",children:["ID: ",r]})]})]})},zq=({usage_metadata:e})=>O.jsx("div",{className:"flex items-center gap-1",children:O.jsxs("span",{className:"flex items-center gap-1.5 group relative",children:[O.jsx("span",{className:"text-xs",children:"📊"}),O.jsx("span",{className:"text-gray-400",children:md(e.total_tokens||0)}),O.jsx("div",{className:"hidden group-hover:block absolute bottom-full left-0 mb-2 bg-white/95 backdrop-blur-sm border border-gray-200 shadow-lg rounded-lg text-xs z-10 min-w-[280px]",children:O.jsxs("div",{className:"p-3",children:[O.jsx("div",{className:"text-sm font-medium text-gray-700 mb-3 border-b border-gray-100 pb-2",children:"Token 使用详情"}),O.jsxs("div",{className:"space-y-3",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("span",{className:"text-green-600",children:"📥"}),O.jsx("span",{className:"text-gray-700 font-medium",children:"输入 Token"})]}),O.jsx("span",{className:"text-gray-900 font-mono",children:md(e.input_tokens||0)})]}),!!e.input_token_details?.cache_read&&O.jsxs("div",{className:"flex items-center justify-between ml-6",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("span",{className:"text-blue-600",children:"💾"}),O.jsx("span",{className:"text-gray-600 text-xs",children:"缓存读取"})]}),O.jsx("span",{className:"text-blue-700 font-mono text-xs",children:md(e.input_token_details.cache_read)})]}),O.jsxs("div",{className:"flex items-center justify-between border-t border-gray-100 pt-3",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("span",{className:"text-blue-600",children:"📤"}),O.jsx("span",{className:"text-gray-700 font-medium",children:"输出 Token"})]}),O.jsx("span",{className:"text-gray-900 font-mono",children:md(e.output_tokens||0)})]}),(e.prompt_tokens_details||e.completion_tokens_details)&&O.jsxs("div",{className:"border-t border-gray-100 pt-3 mt-3",children:[O.jsx("div",{className:"text-xs text-gray-500 mb-2",children:"详细数据"}),O.jsxs("div",{className:"text-xs text-gray-400 bg-gray-50 p-2 rounded",children:["输入详情: ",JSON.stringify(e)]})]})]})]})})]})});var By={exports:{}},GA;function Lq(){return GA||(GA=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,f,d){this.fn=c,this.context=f,this.once=d||!1}function a(c,f,d,p,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new i(d,p||c,m),_=n?n+f:f;return c._events[_]?c._events[_].fn?c._events[_]=[c._events[_],g]:c._events[_].push(g):(c._events[_]=g,c._eventsCount++),c}function o(c,f){--c._eventsCount===0?c._events=new r:delete c._events[f]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],d,p;if(this._eventsCount===0)return f;for(p in d=this._events)t.call(d,p)&&f.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(d)):f},l.prototype.listeners=function(f){var d=n?n+f:f,p=this._events[d];if(!p)return[];if(p.fn)return[p.fn];for(var m=0,g=p.length,_=new Array(g);m<g;m++)_[m]=p[m].fn;return _},l.prototype.listenerCount=function(f){var d=n?n+f:f,p=this._events[d];return p?p.fn?1:p.length:0},l.prototype.emit=function(f,d,p,m,g,_){var S=n?n+f:f;if(!this._events[S])return!1;var b=this._events[S],x=arguments.length,w,v;if(b.fn){switch(b.once&&this.removeListener(f,b.fn,void 0,!0),x){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,p),!0;case 4:return b.fn.call(b.context,d,p,m),!0;case 5:return b.fn.call(b.context,d,p,m,g),!0;case 6:return b.fn.call(b.context,d,p,m,g,_),!0}for(v=1,w=new Array(x-1);v<x;v++)w[v-1]=arguments[v];b.fn.apply(b.context,w)}else{var k=b.length,C;for(v=0;v<k;v++)switch(b[v].once&&this.removeListener(f,b[v].fn,void 0,!0),x){case 1:b[v].fn.call(b[v].context);break;case 2:b[v].fn.call(b[v].context,d);break;case 3:b[v].fn.call(b[v].context,d,p);break;case 4:b[v].fn.call(b[v].context,d,p,m);break;default:if(!w)for(C=1,w=new Array(x-1);C<x;C++)w[C-1]=arguments[C];b[v].fn.apply(b[v].context,w)}}return!0},l.prototype.on=function(f,d,p){return a(this,f,d,p,!1)},l.prototype.once=function(f,d,p){return a(this,f,d,p,!0)},l.prototype.removeListener=function(f,d,p,m){var g=n?n+f:f;if(!this._events[g])return this;if(!d)return o(this,g),this;var _=this._events[g];if(_.fn)_.fn===d&&(!m||_.once)&&(!p||_.context===p)&&o(this,g);else{for(var S=0,b=[],x=_.length;S<x;S++)(_[S].fn!==d||m&&!_[S].once||p&&_[S].context!==p)&&b.push(_[S]);b.length?this._events[g]=b.length===1?b[0]:b:o(this,g)}return this},l.prototype.removeAllListeners=function(f){var d;return f?(d=n?n+f:f,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l}(By)),By.exports}var qq=Lq();const Fq=qn(qq);var ht;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),o={};for(const l of a)o[l]=i[l];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ht||(ht={}));var ZA;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ZA||(ZA={}));const Ne=ht.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ta=e=>{switch(typeof e){case"undefined":return Ne.undefined;case"string":return Ne.string;case"number":return Number.isNaN(e)?Ne.nan:Ne.number;case"boolean":return Ne.boolean;case"function":return Ne.function;case"bigint":return Ne.bigint;case"symbol":return Ne.symbol;case"object":return Array.isArray(e)?Ne.array:e===null?Ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ne.promise:typeof Map<"u"&&e instanceof Map?Ne.map:typeof Set<"u"&&e instanceof Set?Ne.set:typeof Date<"u"&&e instanceof Date?Ne.date:Ne.object;default:return Ne.unknown}},Se=ht.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class zi extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let l=r,c=0;for(;c<o.path.length;){const f=o.path[c];c===o.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(n(o))):l[f]=l[f]||{_errors:[]},l=l[f],c++}}};return i(this),r}static assert(t){if(!(t instanceof zi))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ht.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}zi.create=e=>new zi(e);const aw=(e,t)=>{let n;switch(e.code){case Se.invalid_type:e.received===Ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ht.jsonStringifyReplacer)}`;break;case Se.unrecognized_keys:n=`Unrecognized key(s) in object: ${ht.joinValues(e.keys,", ")}`;break;case Se.invalid_union:n="Invalid input";break;case Se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ht.joinValues(e.options)}`;break;case Se.invalid_enum_value:n=`Invalid enum value. Expected ${ht.joinValues(e.options)}, received '${e.received}'`;break;case Se.invalid_arguments:n="Invalid function arguments";break;case Se.invalid_return_type:n="Invalid function return type";break;case Se.invalid_date:n="Invalid date";break;case Se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ht.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Se.custom:n="Invalid input";break;case Se.invalid_intersection_types:n="Intersection results could not be merged";break;case Se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Se.not_finite:n="Number must be finite";break;default:n=t.defaultError,ht.assertNever(e)}return{message:n}};let Bq=aw;function Uq(){return Bq}const Hq=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let l="";const c=r.filter(f=>!!f).slice().reverse();for(const f of c)l=f(o,{data:t,defaultError:l}).message;return{...i,path:a,message:l}};function Ce(e,t){const n=Uq(),r=Hq({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===aw?void 0:aw].filter(i=>!!i)});e.common.issues.push(r)}class sr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Be;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return sr.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Be;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Be=Object.freeze({status:"aborted"}),Pu=e=>({status:"dirty",value:e}),xr=e=>({status:"valid",value:e}),YA=e=>e.status==="aborted",KA=e=>e.status==="dirty",Zo=e=>e.status==="valid",Lh=e=>typeof Promise<"u"&&e instanceof Promise;var je;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(je||(je={}));class Pa{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const XA=(e,t)=>{if(Zo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new zi(e.common.issues);return this._error=n,this._error}}};function Qe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,l)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??r??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:c??n??l.defaultError}},description:i}}class ct{get description(){return this._def.description}_getType(t){return Ta(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ta(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new sr,ctx:{common:t.parent.common,data:t.data,parsedType:Ta(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Lh(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ta(t)},i=this._parseSync({data:t,path:r.path,parent:r});return XA(r,i)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ta(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return Zo(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Zo(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ta(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Lh(i)?i:Promise.resolve(i));return XA(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),l=()=>a.addIssue({code:Se.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Xo({schema:this,typeName:Ee.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Di.create(this,this._def)}nullable(){return Wo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xr.create(this)}promise(){return Uh.create(this,this._def)}or(t){return Fh.create([this,t],this._def)}and(t){return Bh.create(this,t,this._def)}transform(t){return new Xo({...Qe(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new uw({...Qe(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new hF({typeName:Ee.ZodBranded,type:this,...Qe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new cw({...Qe(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return uS.create(this,t)}readonly(){return fw.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Vq=/^c[^\s-]{8,}$/i,Gq=/^[0-9a-z]+$/,Zq=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Yq=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Kq=/^[a-z0-9_-]{21}$/i,Xq=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Wq=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Qq=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Jq="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Uy;const eF=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tF=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,nF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,rF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,iF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,aF=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,d5="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",sF=new RegExp(`^${d5}$`);function h5(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function oF(e){return new RegExp(`^${h5(e)}$`)}function lF(e){let t=`${d5}T${h5(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function uF(e,t){return!!((t==="v4"||!t)&&eF.test(e)||(t==="v6"||!t)&&nF.test(e))}function cF(e,t){if(!Xq.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function fF(e,t){return!!((t==="v4"||!t)&&tF.test(e)||(t==="v6"||!t)&&rF.test(e))}class Ra extends ct{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ne.string){const a=this._getOrReturnCtx(t);return Ce(a,{code:Se.invalid_type,expected:Ne.string,received:a.parsedType}),Be}const r=new sr;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,l=t.data.length<a.value;(o||l)&&(i=this._getOrReturnCtx(t,i),o?Ce(i,{code:Se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&Ce(i,{code:Se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")Qq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"email",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Uy||(Uy=new RegExp(Jq,"u")),Uy.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"emoji",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")Yq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"uuid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")Kq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"nanoid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")Vq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"cuid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Gq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"cuid2",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")Zq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"ulid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Ce(i,{validation:"url",code:Se.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"regex",code:Se.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?lF(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?sF.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?oF(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?Wq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"duration",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?uF(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"ip",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?cF(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"jwt",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?fF(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"cidr",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?iF.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"base64",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?aF.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"base64url",code:Se.invalid_string,message:a.message}),r.dirty()):ht.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:Se.invalid_string,...je.errToObj(r)})}_addCheck(t){return new Ra({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...je.errToObj(t)})}url(t){return this._addCheck({kind:"url",...je.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...je.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...je.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...je.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...je.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...je.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...je.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...je.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...je.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...je.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...je.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...je.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...je.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...je.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...je.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...je.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...je.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...je.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...je.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...je.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...je.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...je.errToObj(n)})}nonempty(t){return this.min(1,je.errToObj(t))}trim(){return new Ra({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ra({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ra({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ra.create=e=>new Ra({checks:[],typeName:Ee.ZodString,coerce:e?.coerce??!1,...Qe(e)});function dF(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return a%o/10**i}class Yo extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ne.number){const a=this._getOrReturnCtx(t);return Ce(a,{code:Se.invalid_type,expected:Ne.number,received:a.parsedType}),Be}let r;const i=new sr;for(const a of this._def.checks)a.kind==="int"?ht.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?dF(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.not_finite,message:a.message}),i.dirty()):ht.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,je.toString(n))}gt(t,n){return this.setLimit("min",t,!1,je.toString(n))}lte(t,n){return this.setLimit("max",t,!0,je.toString(n))}lt(t,n){return this.setLimit("max",t,!1,je.toString(n))}setLimit(t,n,r,i){return new Yo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:je.toString(i)}]})}_addCheck(t){return new Yo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:je.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:je.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:je.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:je.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:je.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:je.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:je.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:je.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:je.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ht.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Yo.create=e=>new Yo({checks:[],typeName:Ee.ZodNumber,coerce:e?.coerce||!1,...Qe(e)});class ec extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ne.bigint)return this._getInvalidInput(t);let r;const i=new sr;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ht.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Ce(n,{code:Se.invalid_type,expected:Ne.bigint,received:n.parsedType}),Be}gte(t,n){return this.setLimit("min",t,!0,je.toString(n))}gt(t,n){return this.setLimit("min",t,!1,je.toString(n))}lte(t,n){return this.setLimit("max",t,!0,je.toString(n))}lt(t,n){return this.setLimit("max",t,!1,je.toString(n))}setLimit(t,n,r,i){return new ec({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:je.toString(i)}]})}_addCheck(t){return new ec({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:je.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:je.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:je.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:je.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:je.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ec.create=e=>new ec({checks:[],typeName:Ee.ZodBigInt,coerce:e?.coerce??!1,...Qe(e)});class sw extends ct{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ne.boolean){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Ne.boolean,received:r.parsedType}),Be}return xr(t.data)}}sw.create=e=>new sw({typeName:Ee.ZodBoolean,coerce:e?.coerce||!1,...Qe(e)});class qh extends ct{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ne.date){const a=this._getOrReturnCtx(t);return Ce(a,{code:Se.invalid_type,expected:Ne.date,received:a.parsedType}),Be}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Ce(a,{code:Se.invalid_date}),Be}const r=new sr;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):ht.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new qh({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:je.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:je.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}qh.create=e=>new qh({checks:[],coerce:e?.coerce||!1,typeName:Ee.ZodDate,...Qe(e)});class WA extends ct{_parse(t){if(this._getType(t)!==Ne.symbol){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Ne.symbol,received:r.parsedType}),Be}return xr(t.data)}}WA.create=e=>new WA({typeName:Ee.ZodSymbol,...Qe(e)});class QA extends ct{_parse(t){if(this._getType(t)!==Ne.undefined){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Ne.undefined,received:r.parsedType}),Be}return xr(t.data)}}QA.create=e=>new QA({typeName:Ee.ZodUndefined,...Qe(e)});class JA extends ct{_parse(t){if(this._getType(t)!==Ne.null){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Ne.null,received:r.parsedType}),Be}return xr(t.data)}}JA.create=e=>new JA({typeName:Ee.ZodNull,...Qe(e)});class ow extends ct{constructor(){super(...arguments),this._any=!0}_parse(t){return xr(t.data)}}ow.create=e=>new ow({typeName:Ee.ZodAny,...Qe(e)});class eT extends ct{constructor(){super(...arguments),this._unknown=!0}_parse(t){return xr(t.data)}}eT.create=e=>new eT({typeName:Ee.ZodUnknown,...Qe(e)});class za extends ct{_parse(t){const n=this._getOrReturnCtx(t);return Ce(n,{code:Se.invalid_type,expected:Ne.never,received:n.parsedType}),Be}}za.create=e=>new za({typeName:Ee.ZodNever,...Qe(e)});class tT extends ct{_parse(t){if(this._getType(t)!==Ne.undefined){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Ne.void,received:r.parsedType}),Be}return xr(t.data)}}tT.create=e=>new tT({typeName:Ee.ZodVoid,...Qe(e)});class Xr extends ct{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Ne.array)return Ce(n,{code:Se.invalid_type,expected:Ne.array,received:n.parsedType}),Be;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,l=n.data.length<i.exactLength.value;(o||l)&&(Ce(n,{code:o?Se.too_big:Se.too_small,minimum:l?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Ce(n,{code:Se.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Ce(n,{code:Se.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,l)=>i.type._parseAsync(new Pa(n,o,n.path,l)))).then(o=>sr.mergeArray(r,o));const a=[...n.data].map((o,l)=>i.type._parseSync(new Pa(n,o,n.path,l)));return sr.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Xr({...this._def,minLength:{value:t,message:je.toString(n)}})}max(t,n){return new Xr({...this._def,maxLength:{value:t,message:je.toString(n)}})}length(t,n){return new Xr({...this._def,exactLength:{value:t,message:je.toString(n)}})}nonempty(t){return this.min(1,t)}}Xr.create=(e,t)=>new Xr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,...Qe(t)});function zo(e){if(e instanceof en){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Di.create(zo(r))}return new en({...e._def,shape:()=>t})}else return e instanceof Xr?new Xr({...e._def,type:zo(e.element)}):e instanceof Di?Di.create(zo(e.unwrap())):e instanceof Wo?Wo.create(zo(e.unwrap())):e instanceof Es?Es.create(e.items.map(t=>zo(t))):e}class en extends ct{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ht.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ne.object){const f=this._getOrReturnCtx(t);return Ce(f,{code:Se.invalid_type,expected:Ne.object,received:f.parsedType}),Be}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof za&&this._def.unknownKeys==="strip"))for(const f in i.data)o.includes(f)||l.push(f);const c=[];for(const f of o){const d=a[f],p=i.data[f];c.push({key:{status:"valid",value:f},value:d._parse(new Pa(i,p,i.path,f)),alwaysSet:f in i.data})}if(this._def.catchall instanceof za){const f=this._def.unknownKeys;if(f==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(f==="strict")l.length>0&&(Ce(i,{code:Se.unrecognized_keys,keys:l}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const d of l){const p=i.data[d];c.push({key:{status:"valid",value:d},value:f._parse(new Pa(i,p,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const f=[];for(const d of c){const p=await d.key,m=await d.value;f.push({key:p,value:m,alwaysSet:d.alwaysSet})}return f}).then(f=>sr.mergeObjectSync(r,f)):sr.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return je.errToObj,new en({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:je.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new en({...this._def,unknownKeys:"strip"})}passthrough(){return new en({...this._def,unknownKeys:"passthrough"})}extend(t){return new en({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new en({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ee.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new en({...this._def,catchall:t})}pick(t){const n={};for(const r of ht.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new en({...this._def,shape:()=>n})}omit(t){const n={};for(const r of ht.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new en({...this._def,shape:()=>n})}deepPartial(){return zo(this)}partial(t){const n={};for(const r of ht.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new en({...this._def,shape:()=>n})}required(t){const n={};for(const r of ht.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Di;)a=a._def.innerType;n[r]=a}return new en({...this._def,shape:()=>n})}keyof(){return p5(ht.objectKeys(this.shape))}}en.create=(e,t)=>new en({shape:()=>e,unknownKeys:"strip",catchall:za.create(),typeName:Ee.ZodObject,...Qe(t)});en.strictCreate=(e,t)=>new en({shape:()=>e,unknownKeys:"strict",catchall:za.create(),typeName:Ee.ZodObject,...Qe(t)});en.lazycreate=(e,t)=>new en({shape:e,unknownKeys:"strip",catchall:za.create(),typeName:Ee.ZodObject,...Qe(t)});class Fh extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const o=a.map(l=>new zi(l.ctx.common.issues));return Ce(n,{code:Se.invalid_union,unionErrors:o}),Be}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const f={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:f});if(d.status==="valid")return d;d.status==="dirty"&&!a&&(a={result:d,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const l=o.map(c=>new zi(c));return Ce(n,{code:Se.invalid_union,unionErrors:l}),Be}}get options(){return this._def.options}}Fh.create=(e,t)=>new Fh({options:e,typeName:Ee.ZodUnion,...Qe(t)});function lw(e,t){const n=Ta(e),r=Ta(t);if(e===t)return{valid:!0,data:e};if(n===Ne.object&&r===Ne.object){const i=ht.objectKeys(t),a=ht.objectKeys(e).filter(l=>i.indexOf(l)!==-1),o={...e,...t};for(const l of a){const c=lw(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(n===Ne.array&&r===Ne.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],l=t[a],c=lw(o,l);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===Ne.date&&r===Ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Bh extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(YA(a)||YA(o))return Be;const l=lw(a.value,o.value);return l.valid?((KA(a)||KA(o))&&n.dirty(),{status:n.value,value:l.data}):(Ce(r,{code:Se.invalid_intersection_types}),Be)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Bh.create=(e,t,n)=>new Bh({left:e,right:t,typeName:Ee.ZodIntersection,...Qe(n)});class Es extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.array)return Ce(r,{code:Se.invalid_type,expected:Ne.array,received:r.parsedType}),Be;if(r.data.length<this._def.items.length)return Ce(r,{code:Se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&r.data.length>this._def.items.length&&(Ce(r,{code:Se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new Pa(r,o,r.path,l)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>sr.mergeArray(n,o)):sr.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Es({...this._def,rest:t})}}Es.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Es({items:e,typeName:Ee.ZodTuple,rest:null,...Qe(t)})};class nT extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.map)return Ce(r,{code:Se.invalid_type,expected:Ne.map,received:r.parsedType}),Be;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([l,c],f)=>({key:i._parse(new Pa(r,l,r.path,[f,"key"])),value:a._parse(new Pa(r,c,r.path,[f,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const f=await c.key,d=await c.value;if(f.status==="aborted"||d.status==="aborted")return Be;(f.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(f.value,d.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const c of o){const f=c.key,d=c.value;if(f.status==="aborted"||d.status==="aborted")return Be;(f.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(f.value,d.value)}return{status:n.value,value:l}}}}nT.create=(e,t,n)=>new nT({valueType:t,keyType:e,typeName:Ee.ZodMap,...Qe(n)});class tc extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.set)return Ce(r,{code:Se.invalid_type,expected:Ne.set,received:r.parsedType}),Be;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Ce(r,{code:Se.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Ce(r,{code:Se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const f=new Set;for(const d of c){if(d.status==="aborted")return Be;d.status==="dirty"&&n.dirty(),f.add(d.value)}return{status:n.value,value:f}}const l=[...r.data.values()].map((c,f)=>a._parse(new Pa(r,c,r.path,f)));return r.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,n){return new tc({...this._def,minSize:{value:t,message:je.toString(n)}})}max(t,n){return new tc({...this._def,maxSize:{value:t,message:je.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}tc.create=(e,t)=>new tc({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,...Qe(t)});class rT extends ct{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}rT.create=(e,t)=>new rT({getter:e,typeName:Ee.ZodLazy,...Qe(t)});class iT extends ct{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ce(n,{received:n.data,code:Se.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}iT.create=(e,t)=>new iT({value:e,typeName:Ee.ZodLiteral,...Qe(t)});function p5(e,t){return new Ko({values:e,typeName:Ee.ZodEnum,...Qe(t)})}class Ko extends ct{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ce(n,{expected:ht.joinValues(r),received:n.parsedType,code:Se.invalid_type}),Be}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Ce(n,{received:n.data,code:Se.invalid_enum_value,options:r}),Be}return xr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ko.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ko.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ko.create=p5;class aT extends ct{_parse(t){const n=ht.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ne.string&&r.parsedType!==Ne.number){const i=ht.objectValues(n);return Ce(r,{expected:ht.joinValues(i),received:r.parsedType,code:Se.invalid_type}),Be}if(this._cache||(this._cache=new Set(ht.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=ht.objectValues(n);return Ce(r,{received:r.data,code:Se.invalid_enum_value,options:i}),Be}return xr(t.data)}get enum(){return this._def.values}}aT.create=(e,t)=>new aT({values:e,typeName:Ee.ZodNativeEnum,...Qe(t)});class Uh extends ct{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.promise&&n.common.async===!1)return Ce(n,{code:Se.invalid_type,expected:Ne.promise,received:n.parsedType}),Be;const r=n.parsedType===Ne.promise?n.data:Promise.resolve(n.data);return xr(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Uh.create=(e,t)=>new Uh({type:e,typeName:Ee.ZodPromise,...Qe(t)});class Xo extends ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{Ce(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async l=>{if(n.value==="aborted")return Be;const c=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return c.status==="aborted"?Be:c.status==="dirty"||n.value==="dirty"?Pu(c.value):c});{if(n.value==="aborted")return Be;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?Be:l.status==="dirty"||n.value==="dirty"?Pu(l.value):l}}if(i.type==="refinement"){const o=l=>{const c=i.refinement(l,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?Be:(l.status==="dirty"&&n.dirty(),o(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?Be:(l.status==="dirty"&&n.dirty(),o(l.value).then(()=>({status:n.value,value:l.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Zo(o))return Be;const l=i.transform(o.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Zo(o)?Promise.resolve(i.transform(o.value,a)).then(l=>({status:n.value,value:l})):Be);ht.assertNever(i)}}Xo.create=(e,t,n)=>new Xo({schema:e,typeName:Ee.ZodEffects,effect:t,...Qe(n)});Xo.createWithPreprocess=(e,t,n)=>new Xo({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,...Qe(n)});class Di extends ct{_parse(t){return this._getType(t)===Ne.undefined?xr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Di.create=(e,t)=>new Di({innerType:e,typeName:Ee.ZodOptional,...Qe(t)});class Wo extends ct{_parse(t){return this._getType(t)===Ne.null?xr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wo.create=(e,t)=>new Wo({innerType:e,typeName:Ee.ZodNullable,...Qe(t)});class uw extends ct{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}uw.create=(e,t)=>new uw({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Qe(t)});class cw extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Lh(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new zi(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}cw.create=(e,t)=>new cw({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Qe(t)});class sT extends ct{_parse(t){if(this._getType(t)!==Ne.nan){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Ne.nan,received:r.parsedType}),Be}return{status:"valid",value:t.data}}}sT.create=e=>new sT({typeName:Ee.ZodNaN,...Qe(e)});class hF extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class uS extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Be:a.status==="dirty"?(n.dirty(),Pu(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Be:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new uS({in:t,out:n,typeName:Ee.ZodPipeline})}}class fw extends ct{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Zo(i)&&(i.value=Object.freeze(i.value)),i);return Lh(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}fw.create=(e,t)=>new fw({innerType:e,typeName:Ee.ZodReadonly,...Qe(t)});var Ee;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ee||(Ee={}));const pF=Ra.create,mF=Yo.create,gF=sw.create,yF=ow.create;za.create;const bF=Xr.create,Eh=en.create;Fh.create;Bh.create;Es.create;Ko.create;Uh.create;Di.create;Wo.create;function vF(e){let t={};for(let r of e||[])t[r.name]=m5(r);let n=[];for(let r of e||[])r.required!==!1&&n.push(r.name);return{type:"object",properties:t,required:n}}function m5(e){switch(e.type){case"string":return{type:"string",description:e.description,...e.enum&&{enum:e.enum}};case"number":case"boolean":return{type:e.type,description:e.description};case"object":case"object[]":const t=e.attributes?.reduce((r,i)=>(r[i.name]=m5(i),r),{}),n=e.attributes?.filter(r=>r.required!==!1).map(r=>r.name);return e.type==="object[]"?{type:"array",items:{type:"object",...t&&{properties:t},...n&&n.length>0&&{required:n}},description:e.description}:{type:"object",description:e.description,...t&&{properties:t},...n&&n.length>0&&{required:n}};default:return e.type?.endsWith("[]")?{type:"array",items:{type:e.type.slice(0,-2)},description:e.description}:{type:"string",description:e.description}}}function _F(e){const t={};for(const[n,r]of Object.entries(e.properties))t[n]=dw(r,e.required?e.required.includes(n):!1);return t}function dw(e,t){if(e.type==="object"){const n={};if(!e.properties||!Object.keys(e.properties).length)return t?Eh(n):Eh(n).optional();for(const[i,a]of Object.entries(e.properties))n[i]=dw(a,e.required?e.required.includes(i):!1);let r=Eh(n).describe(e.description);return t?r:r.optional()}else if(e.type==="string"){let n=pF().describe(e.description);return t?n:n.optional()}else if(e.type==="number"){let n=mF().describe(e.description);return t?n:n.optional()}else if(e.type==="boolean"){let n=gF().describe(e.description);return t?n:n.optional()}else if(e.type==="array"){let n=dw(e.items,!0),r=bF(n).describe(e.description);return t?r:r.optional()}throw new Error("Invalid JSON schema")}const xF=Symbol("Let zodToJsonSchema decide on which parser to use"),wF={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},SF=e=>({...wF,...e}),EF=e=>{const t=SF(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([r,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,r],jsonSchema:void 0}]))}};function g5(e,t,n,r){r?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function Et(e,t,n,r,i){e[t]=n,g5(e,t,r,i)}function kF(){return{}}function CF(e,t){const n={type:"array"};return e.type?._def&&e.type?._def?.typeName!==Ee.ZodAny&&(n.items=yt(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&Et(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&Et(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(Et(n,"minItems",e.exactLength.value,e.exactLength.message,t),Et(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}function AF(e,t){const n={type:"integer",format:"int64"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"min":t.target==="jsonSchema7"?r.inclusive?Et(n,"minimum",r.value,r.message,t):Et(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),Et(n,"minimum",r.value,r.message,t));break;case"max":t.target==="jsonSchema7"?r.inclusive?Et(n,"maximum",r.value,r.message,t):Et(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),Et(n,"maximum",r.value,r.message,t));break;case"multipleOf":Et(n,"multipleOf",r.value,r.message,t);break}return n}function TF(){return{type:"boolean"}}function y5(e,t){return yt(e.type._def,t)}const NF=(e,t)=>yt(e.innerType._def,t);function b5(e,t,n){const r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((i,a)=>b5(e,t,i))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return OF(e,t)}}const OF=(e,t)=>{const n={type:"integer",format:"unix-time"};if(t.target==="openApi3")return n;for(const r of e.checks)switch(r.kind){case"min":Et(n,"minimum",r.value,r.message,t);break;case"max":Et(n,"maximum",r.value,r.message,t);break}return n};function RF(e,t){return{...yt(e.innerType._def,t),default:e.defaultValue()}}function jF(e,t){return t.effectStrategy==="input"?yt(e.schema._def,t):{}}function MF(e){return{type:"string",enum:Array.from(e.values)}}const $F=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function DF(e,t){const n=[yt(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),yt(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(a=>!!a);let r=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const i=[];return n.forEach(a=>{if($F(a))i.push(...a.allOf),a.unevaluatedProperties===void 0&&(r=void 0);else{let o=a;if("additionalProperties"in a&&a.additionalProperties===!1){const{additionalProperties:l,...c}=a;o=c}else r=void 0;i.push(o)}}),i.length?{allOf:i,...r}:void 0}function IF(e,t){const n=typeof e.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[e.value]}:{type:n==="bigint"?"integer":n,const:e.value}}let Hy;const Cr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Hy===void 0&&(Hy=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Hy),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function v5(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":Et(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,t);break;case"max":Et(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Ar(n,"email",r.message,t);break;case"format:idn-email":Ar(n,"idn-email",r.message,t);break;case"pattern:zod":kn(n,Cr.email,r.message,t);break}break;case"url":Ar(n,"uri",r.message,t);break;case"uuid":Ar(n,"uuid",r.message,t);break;case"regex":kn(n,r.regex,r.message,t);break;case"cuid":kn(n,Cr.cuid,r.message,t);break;case"cuid2":kn(n,Cr.cuid2,r.message,t);break;case"startsWith":kn(n,RegExp(`^${Vy(r.value,t)}`),r.message,t);break;case"endsWith":kn(n,RegExp(`${Vy(r.value,t)}$`),r.message,t);break;case"datetime":Ar(n,"date-time",r.message,t);break;case"date":Ar(n,"date",r.message,t);break;case"time":Ar(n,"time",r.message,t);break;case"duration":Ar(n,"duration",r.message,t);break;case"length":Et(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,t),Et(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"includes":{kn(n,RegExp(Vy(r.value,t)),r.message,t);break}case"ip":{r.version!=="v6"&&Ar(n,"ipv4",r.message,t),r.version!=="v4"&&Ar(n,"ipv6",r.message,t);break}case"base64url":kn(n,Cr.base64url,r.message,t);break;case"jwt":kn(n,Cr.jwt,r.message,t);break;case"cidr":{r.version!=="v6"&&kn(n,Cr.ipv4Cidr,r.message,t),r.version!=="v4"&&kn(n,Cr.ipv6Cidr,r.message,t);break}case"emoji":kn(n,Cr.emoji(),r.message,t);break;case"ulid":{kn(n,Cr.ulid,r.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Ar(n,"binary",r.message,t);break}case"contentEncoding:base64":{Et(n,"contentEncoding","base64",r.message,t);break}case"pattern:zod":{kn(n,Cr.base64,r.message,t);break}}break}case"nanoid":kn(n,Cr.nanoid,r.message,t)}return n}function Vy(e,t){return t.patternStrategy==="escape"?zF(e):e}const PF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function zF(e){let t="";for(let n=0;n<e.length;n++)PF.has(e[n])||(t+="\\"),t+=e[n];return t}function Ar(e,t,n,r){e.format||e.anyOf?.some(i=>i.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):Et(e,"format",t,n,r)}function kn(e,t,n,r){e.pattern||e.allOf?.some(i=>i.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:oT(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):Et(e,"pattern",oT(t,r),n,r)}function oT(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},r=n.i?e.source.toLowerCase():e.source;let i="",a=!1,o=!1,l=!1;for(let c=0;c<r.length;c++){if(a){i+=r[c],a=!1;continue}if(n.i){if(o){if(r[c].match(/[a-z]/)){l?(i+=r[c],i+=`${r[c-2]}-${r[c]}`.toUpperCase(),l=!1):r[c+1]==="-"&&r[c+2]?.match(/[a-z]/)?(i+=r[c],l=!0):i+=`${r[c]}${r[c].toUpperCase()}`;continue}}else if(r[c].match(/[a-z]/)){i+=`[${r[c]}${r[c].toUpperCase()}]`;continue}}if(n.m){if(r[c]==="^"){i+=`(^|(?<=[\r
51
+ ]))`;continue}else if(r[c]==="$"){i+=`($|(?=[\r
52
+ ]))`;continue}}if(n.s&&r[c]==="."){i+=o?`${r[c]}\r
53
+ `:`[${r[c]}\r
54
+ ]`;continue}i+=r[c],r[c]==="\\"?a=!0:o&&r[c]==="]"?o=!1:!o&&r[c]==="["&&(o=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function _5(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===Ee.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((r,i)=>({...r,[i]:yt(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",i]})??{}}),{}),additionalProperties:t.rejectedAdditionalProperties};const n={type:"object",additionalProperties:yt(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return n;if(e.keyType?._def.typeName===Ee.ZodString&&e.keyType._def.checks?.length){const{type:r,...i}=v5(e.keyType._def,t);return{...n,propertyNames:i}}else{if(e.keyType?._def.typeName===Ee.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===Ee.ZodBranded&&e.keyType._def.type._def.typeName===Ee.ZodString&&e.keyType._def.type._def.checks?.length){const{type:r,...i}=y5(e.keyType._def,t);return{...n,propertyNames:i}}}return n}function LF(e,t){if(t.mapStrategy==="record")return _5(e,t);const n=yt(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},r=yt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{};return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}function qF(e){const t=e.values,r=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[a]),i=Array.from(new Set(r.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:r}}function FF(){return{not:{}}}function BF(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const Hh={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function UF(e,t){if(t.target==="openApi3")return lT(e,t);const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(r=>r._def.typeName in Hh&&(!r._def.checks||!r._def.checks.length))){const r=n.reduce((i,a)=>{const o=Hh[a._def.typeName];return o&&!i.includes(o)?[...i,o]:i},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){const r=n.reduce((i,a)=>{const o=typeof a._def.value;switch(o){case"string":case"number":case"boolean":return[...i,o];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];case"symbol":case"undefined":case"function":default:return i}},[]);if(r.length===n.length){const i=r.filter((a,o,l)=>l.indexOf(a)===o);return{type:i.length>1?i:i[0],enum:n.reduce((a,o)=>a.includes(o._def.value)?a:[...a,o._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,i)=>[...r,...i._def.values.filter(a=>!r.includes(a))],[])};return lT(e,t)}const lT=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((r,i)=>yt(r._def,{...t,currentPath:[...t.currentPath,"anyOf",`${i}`]})).filter(r=>!!r&&(!t.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function HF(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:Hh[e.innerType._def.typeName],nullable:!0}:{type:[Hh[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const r=yt(e.innerType._def,{...t,currentPath:[...t.currentPath]});return r&&"$ref"in r?{allOf:[r],nullable:!0}:r&&{...r,nullable:!0}}const n=yt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function VF(e,t){const n={type:"number"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"int":n.type="integer",g5(n,"type",r.message,t);break;case"min":t.target==="jsonSchema7"?r.inclusive?Et(n,"minimum",r.value,r.message,t):Et(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),Et(n,"minimum",r.value,r.message,t));break;case"max":t.target==="jsonSchema7"?r.inclusive?Et(n,"maximum",r.value,r.message,t):Et(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),Et(n,"maximum",r.value,r.message,t));break;case"multipleOf":Et(n,"multipleOf",r.value,r.message,t);break}return n}function GF(e,t){const n=t.target==="openAi",r={type:"object",properties:{}},i=[],a=e.shape();for(const l in a){let c=a[l];if(c===void 0||c._def===void 0)continue;let f=YF(c);f&&n&&(c instanceof Di&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),f=!1);const d=yt(c._def,{...t,currentPath:[...t.currentPath,"properties",l],propertyPath:[...t.currentPath,"properties",l]});d!==void 0&&(r.properties[l]=d,f||i.push(l))}i.length&&(r.required=i);const o=ZF(e,t);return o!==void 0&&(r.additionalProperties=o),r}function ZF(e,t){if(e.catchall._def.typeName!=="ZodNever")return yt(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function YF(e){try{return e.isOptional()}catch{return!0}}const KF=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return yt(e.innerType._def,t);const n=yt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:{}},n]}:{}},XF=(e,t)=>{if(t.pipeStrategy==="input")return yt(e.in._def,t);if(t.pipeStrategy==="output")return yt(e.out._def,t);const n=yt(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),r=yt(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(i=>i!==void 0)}};function WF(e,t){return yt(e.type._def,t)}function QF(e,t){const r={type:"array",uniqueItems:!0,items:yt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&Et(r,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&Et(r,"maxItems",e.maxSize.value,e.maxSize.message,t),r}function JF(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,r)=>yt(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:yt(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,r)=>yt(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function e7(){return{not:{}}}function t7(){return{}}const n7=(e,t)=>yt(e.innerType._def,t),r7=(e,t,n)=>{switch(t){case Ee.ZodString:return v5(e,n);case Ee.ZodNumber:return VF(e,n);case Ee.ZodObject:return GF(e,n);case Ee.ZodBigInt:return AF(e,n);case Ee.ZodBoolean:return TF();case Ee.ZodDate:return b5(e,n);case Ee.ZodUndefined:return e7();case Ee.ZodNull:return BF(n);case Ee.ZodArray:return CF(e,n);case Ee.ZodUnion:case Ee.ZodDiscriminatedUnion:return UF(e,n);case Ee.ZodIntersection:return DF(e,n);case Ee.ZodTuple:return JF(e,n);case Ee.ZodRecord:return _5(e,n);case Ee.ZodLiteral:return IF(e,n);case Ee.ZodEnum:return MF(e);case Ee.ZodNativeEnum:return qF(e);case Ee.ZodNullable:return HF(e,n);case Ee.ZodOptional:return KF(e,n);case Ee.ZodMap:return LF(e,n);case Ee.ZodSet:return QF(e,n);case Ee.ZodLazy:return()=>e.getter()._def;case Ee.ZodPromise:return WF(e,n);case Ee.ZodNaN:case Ee.ZodNever:return FF();case Ee.ZodEffects:return jF(e,n);case Ee.ZodAny:return kF();case Ee.ZodUnknown:return t7();case Ee.ZodDefault:return RF(e,n);case Ee.ZodBranded:return y5(e,n);case Ee.ZodReadonly:return n7(e,n);case Ee.ZodCatch:return NF(e,n);case Ee.ZodPipeline:return XF(e,n);case Ee.ZodFunction:case Ee.ZodVoid:case Ee.ZodSymbol:return;default:return(r=>{})()}};function yt(e,t,n=!1){const r=t.seen.get(e);if(t.override){const l=t.override?.(e,t,r,n);if(l!==xF)return l}if(r&&!n){const l=i7(r,t);if(l!==void 0)return l}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const a=r7(e,e.typeName,t),o=typeof a=="function"?yt(a(),t):a;if(o&&s7(e,t,o),t.postProcess){const l=t.postProcess(o,e,t);return i.jsonSchema=o,l}return i.jsonSchema=o,o}const i7=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:a7(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,r)=>t.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):t.$refStrategy==="seen"?{}:void 0}},a7=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")},s7=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n),o7=(e,t)=>{const n=EF(t),r=void 0,i=t?.name,a=yt(e._def,n,!1)??{},o=i===void 0?r?{...a,[n.definitionPath]:r}:a:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,i].join("/"),[n.definitionPath]:{...r,[i]:a}};return n.target==="jsonSchema7"?o.$schema="http://json-schema.org/draft-07/schema#":(n.target==="jsonSchema2019-09"||n.target==="openAi")&&(o.$schema="https://json-schema.org/draft/2019-09/schema#"),n.target==="openAi"&&("anyOf"in o||"oneOf"in o||"allOf"in o||"type"in o&&Array.isArray(o.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),o},x5=e=>{const t=e.execute||(async(n,r)=>{try{const i=await e.handler?.(n,r);return typeof i=="string"?[{type:"text",text:i}]:[{type:"text",text:JSON.stringify(i)}]}catch(i){return[{type:"text",text:`Error: ${i}`}]}});return{...e,execute:t}},l7=e=>({render:e.render,onlyRender:e.onlyRender,name:e.name,description:e.description||"",parameters:_F(vF(e.parameters||[])),returnDirect:e.returnDirect,callbackMessage:e.callbackMessage,allowAgent:e.allowAgent,allowGraph:e.allowGraph,async execute(t,n){try{const r=await e.handler?.(t,n);return typeof r=="string"?[{type:"text",text:r}]:[{type:"text",text:JSON.stringify(r)}]}catch(r){return[{type:"text",text:`Error: ${r}`}]}}}),u7=e=>({name:e.name,description:e.description,parameters:e.isPureParams?e.parameters:o7(Eh(e.parameters))}),uT=l7;class w5{constructor(){this.tools=new Map,this.waitingMap=new Map}bindTool(t){if(this.tools.has(t.name))throw new Error(`Tool with name ${t.name} already exists`);this.tools.set(t.name,t)}bindTools(t){t.forEach(n=>this.bindTool(n))}getAllTools(){return Array.from(this.tools.values())}getTool(t){return this.tools.get(t)}removeTool(t){return this.tools.delete(t)}clearTools(){this.tools.clear()}reset(){this.clearTools(),this.clearWaiting()}clearWaiting(){this.waitingMap.clear()}async callTool(t,n,r){const i=this.getTool(t);if(!i)throw new Error(`Tool with name ${t} not found`);return await i.execute?.(n,r)}async toJSON(t,n=!0){return Array.from(this.tools.values()).filter(r=>n?!r.onlyRender:!0).filter(r=>!r.allowGraph||r.allowGraph.includes(t)).map(r=>u7(r))}doneWaiting(t,n){return this.waitingMap.has(t)?(this.waitingMap.get(t)(n),this.waitingMap.delete(t),!0):(console.warn(`Waiting for tool ${t} not found`),!1)}waitForDone(t){return this.waitingMap.has(t)?this.waitingMap.get(t):new Promise((r,i)=>{this.waitingMap.set(t,r)})}static waitForUIDone(t,n){return n.client.tools.waitForDone(n.message.id)}}class Gy{static isTool(t){return t.type==="tool"}static isToolAssistant(t){return t.type==="ai"&&(t.tool_calls?.length||t.tool_call_chunks?.length)}}class c7{constructor(t="task_store"){this.streamingMessage=[],this.graphMessages=[],this.subAgentsKey=t}getStreamingMessages(){return[...this.streamingMessage]}setStreamingMessages(t){this.streamingMessage=t}clearStreamingMessages(){this.streamingMessage=[]}getGraphMessages(){return[...this.graphMessages]}setGraphMessages(t){this.graphMessages=t}updateStreamingMessage(t){const n=this.streamingMessage[this.streamingMessage.length-1];if(!n?.id||t.id!==n.id){this.streamingMessage.push(t);return}this.streamingMessage[this.streamingMessage.length-1]=t}combineGraphMessagesWithStreamingMessages(){const t=new Map(this.streamingMessage.map(n=>[n.id,n]));return[...this.graphMessages.map(n=>{if(t.has(n.id)){const r=t.get(n.id);return t.delete(n.id),r}return n}),...t.values()]}mergeSubGraphMessagesToStreamingMessages(t){const n=new Map(t.filter(r=>r.id).map(r=>[r.id,r]));this.streamingMessage.forEach(r=>{if(n.has(r.id)){const i=n.get(r.id);Object.assign(r,i),n.delete(r.id)}}),n.forEach(r=>{r.type==="tool"&&r.tool_call_id&&this.streamingMessage.push(r)})}cloneMessage(t){return JSON.parse(JSON.stringify(t))}attachInfoForMessage(t){let n=null;const r=[...t];for(const i of r){const a=i.response_metadata?.create_time||"";if(i.unique_id=i.tool_call_id||i.id,i.spend_time=new Date(a).getTime()-new Date(n?.response_metadata?.create_time||a).getTime(),!i.usage_metadata&&i.response_metadata?.usage){const o=i.response_metadata.usage;i.usage_metadata={...o,input_tokens:o.prompt_tokens,output_tokens:o.completion_tokens,total_tokens:o.total_tokens}}n=i}return r}composeToolMessages(t){const n=[],r=new Map,i=new Map;for(const a of t)if(!(Gy.isToolAssistant(a)&&((a.tool_calls||a.tool_call_chunks)?.forEach(o=>{r.set(o.id,o),i.set(o.id,a)}),!a.content))){if(Gy.isTool(a)&&!a.tool_input){const o=r.get(a.tool_call_id),l=i.get(a.tool_call_id);o&&(a.tool_input=typeof o.args!="string"?JSON.stringify(o.args):o.args,a.additional_kwargs?(a.additional_kwargs.done=!0,a.done=!0):(a.done=!0,a.additional_kwargs={done:!0})),l&&(a.usage_metadata=l.usage_metadata,a.node_name=l.name,a.name||(a.name=l.tool_calls.find(c=>c.id===a.tool_call_id)?.name))}n.push(a)}return n}convertSubAgentMessages(t,n){const r=n[this.subAgentsKey];if(!r)return t;const i=JSON.parse(JSON.stringify(r));t.filter(l=>l.node_name?.startsWith("subagent_")).forEach(l=>{const c=l.node_name.replace("subagent_",""),f=i[c];f?f.messages.some(p=>p.id===l.id)||f.messages.push(l):i[c]={messages:[l]}});const a=new Set;Object.values(i).forEach(l=>{l.messages.forEach(c=>{a.add(c.id)})});const o=[];for(const l of t){if(l.type==="tool"&&l.tool_call_id){const c=i[l.tool_call_id];c&&(l.sub_agent_messages=this.processMessages(c.messages))}l.id&&a.has(l.id)||o.push(l)}return o}renderMessages(t,n){const r=new Map,i=new Set,a=[],o=this.combineGraphMessagesWithStreamingMessages();for(let l=o.length-1;l>=0;l--){const c=this.cloneMessage(o[l]);if(!c.id){a.unshift(c);continue}if(c.type==="ai"&&(c.name||(c.name=n().name)),Gy.isToolAssistant(c)){const f=c;r.set(c.id,f);const p=(f.tool_calls?.length?f.tool_calls:f.tool_call_chunks).filter(m=>!i.has(m.id)).map((m,g)=>({type:"tool",additional_kwargs:{},tool_input:f.additional_kwargs?.tool_calls?.[g]?.function?.arguments,id:m.id,name:m.name,response_metadata:{},tool_call_id:m.id,content:""}));for(const m of p)r.has(m.id)||(a.unshift(m),r.set(m.id,m));a.unshift(f)}else c.type==="tool"&&c.tool_call_id&&i.add(c.tool_call_id),r.set(c.id,c),a.unshift(c)}return this.processMessages(a,t)}processMessages(t,n){const r=this.composeToolMessages(t),i=this.attachInfoForMessage(r);return n?this.convertSubAgentMessages(i,n):i}}async function f7(e,t,n){const r=await e.threads.get(t),i=r.values.messages,a=i.findIndex(f=>f.id===n);if(a===-1)throw new Error(`Message id ${n} not found`);const o=i.slice(a+1),l={...r.values,messages:o.map(f=>({type:"remove",id:f.id}))},c=await e.threads.updateState(t,{values:l});return{state:{messages:i.slice(0,a+1)},checkpoint:c}}class d7 extends Fq{constructor(t){super(),this.currentAssistant=null,this.currentThread=null,this.tools=new w5,this.availableAssistants=[],this.graphState={},this.stopController=null,this.subAgentsKey="task_store",this.graphPosition="",this.extraParams={},this.client=t.client,this.messageProcessor=new c7(this.subAgentsKey)}get assistants(){return this.client.assistants}get threads(){return this.client.threads}get runs(){return this.client.runs}listAssistants(){return this.assistants.search({metadata:null,offset:0,limit:100})}async initAssistant(t){try{const n=await this.listAssistants();if(this.availableAssistants=n,n.length>0)if(t){if(this.currentAssistant=n.find(r=>r.graph_id===t)||null,!this.currentAssistant)throw new Error("Agent not found: "+t)}else this.currentAssistant=n[0];else throw new Error("No assistants found")}catch(n){throw console.error("Failed to initialize LangGraphClient:",n),n}}async createThread({threadId:t,graphId:n}={}){try{return this.currentThread=await this.threads.create({threadId:t,graphId:n}),this.currentThread}catch(r){throw console.error("Failed to create new thread:",r),r}}graphVisualize(){return this.assistants.getGraph(this.currentAssistant?.assistant_id,{xray:!0})}async listThreads(){return this.threads.search({sortOrder:"desc"})}async deleteThread(t){return this.threads.delete(t)}async resetThread(t,n){await this.initAssistant(t),this.currentThread=await this.threads.get(n),this.graphState=this.currentThread.values;const r=this.graphState?.messages||[];return this.messageProcessor.setGraphMessages(r),this.emit("value",{event:"messages/partial",data:{messages:this.messageProcessor.getGraphMessages()}}),this.currentThread}async resetStream(){const n=(await this.runs.list(this.currentThread.thread_id))?.find(r=>r.status==="running"||r.status==="pending");n&&await this.sendMessage([],{joinRunId:n.run_id})}cloneMessage(t){return this.messageProcessor.cloneMessage(t)}get renderMessage(){return this.messageProcessor.renderMessages(this.graphState,()=>this.getGraphNodeNow())}get tokenCounter(){return this.messageProcessor.getGraphMessages().reduce((t,n)=>{if(n.usage_metadata)t.total_tokens+=n.usage_metadata?.total_tokens||0,t.input_tokens+=n.usage_metadata?.input_tokens||0,t.output_tokens+=n.usage_metadata?.output_tokens||0;else if(n.response_metadata?.usage){const r=n.response_metadata?.usage;t.total_tokens+=r.total_tokens||0,t.input_tokens+=r.prompt_tokens||0,t.output_tokens+=r.completion_tokens||0}return t},{total_tokens:0,input_tokens:0,output_tokens:0})}isFELocking(t){const n=t[t.length-1];if(!n)return!1;const r=this.tools.getTool(n?.name);return r&&r.render&&n?.type==="tool"&&!n?.additional_kwargs?.done}cancelRun(){this.currentThread?.thread_id&&this.currentRun?.run_id&&this.runs.cancel(this.currentThread.thread_id,this.currentRun.run_id)}async revertChatTo(t){const{state:n,checkpoint:r}=await f7(this.client,this.currentThread.thread_id,t);return this.graphState=n,this.messageProcessor.clearStreamingMessages(),this.messageProcessor.setGraphMessages(n.messages),n}async sendMessage(t,{joinRunId:n,extraParams:r,_debug:i,command:a}={}){if(!this.currentAssistant)throw new Error("Thread or Assistant not initialized");this.currentThread||(await this.createThread({graphId:this.currentAssistant.graph_id}),this.emit("thread",{event:"thread/create",data:{thread:this.currentThread}}));const o=Array.isArray(t)?t:[{type:"human",content:t}],c=await(async()=>i?.streamResponse?i.streamResponse:n?this.runs.joinStream(this.currentThread.thread_id,n):this.runs.stream(this.currentThread.thread_id,this.currentAssistant.assistant_id,{input:{...this.graphState,...this.extraParams,...r||{},messages:o,fe_tools:await this.tools.toJSON(this.currentAssistant.graph_id)},streamMode:["messages","values"],streamSubgraphs:!0,command:a}))(),f=[];this.emit("start",{event:"start"});for await(const p of c)if(f.push(p),p.event==="metadata")this.currentRun=p.data;else if(p.event==="error"||p.event==="Error"||p.event==="__stream_error__")this.emit("error",p);else if(p.event==="messages/partial"){for(const m of p.data)this.messageProcessor.updateStreamingMessage(m);this.emit("message",p);continue}else if(p.event==="values"){const m=p.data;if(m.messages){const g=!!a?.resume,_=m.messages.length>=this.messageProcessor.getGraphMessages().length;(!g||g&&_)&&(this.messageProcessor.setGraphMessages(m.messages),this.emit("value",p)),this.graphState=p.data}continue}else p.event.startsWith("values|")&&(p.data?.messages&&this.messageProcessor.mergeSubGraphMessagesToStreamingMessages(p.data.messages),this.graphPosition=p.event.split("|")[1]);const d=await this.runFETool();return d&&f.push(...d),this.emit("done",{event:"done"}),this.messageProcessor.clearStreamingMessages(),f}getGraphPosition(){return this.graphPosition.split("|").map(t=>{const[n,r]=t.split(":");return{id:r,name:n}})}getGraphNodeNow(){const t=this.getGraphPosition();return t[t.length-1]}runFETool(){const t=this.messageProcessor.getStreamingMessages(),n=t[t.length-1];if(n&&n.type==="ai"&&n.tool_calls?.length){const r=n.tool_calls.map(i=>{if(this.tools.getTool(i.name)){const a={...i,tool_call_id:i.id,tool_input:JSON.stringify(i.args),additional_kwargs:{}};return this.callFETool(a,i.args)}});return this.currentThread.status="interrupted",Promise.all(r)}}async callFETool(t,n){const r=this,i=await this.tools.callTool(t.name,n,{client:r,message:t});if(i)return this.resume(i)}resume(t){return this.sendMessage([],{command:{resume:t}})}doneFEToolWaiting(t,n){!this.tools.doneWaiting(t,n)&&this.currentThread?.status==="interrupted"&&this.resume(n)}getCurrentThread(){return this.currentThread}getCurrentAssistant(){return this.currentAssistant}async reset(){await this.initAssistant(this.currentAssistant?.graph_id),this.currentThread=null,this.graphState={},this.messageProcessor.setGraphMessages([]),this.messageProcessor.clearStreamingMessages(),this.currentRun=void 0,this.tools.clearWaiting(),this.emit("value",{event:"messages/partial",data:{messages:[]}})}}let Tr=[],_a=0;const gd=4;let An=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(r){return n.lc=t.push(r),()=>{for(let a=_a+gd;a<Tr.length;)Tr[a]===r?Tr.splice(a,gd):a+=gd;let i=t.indexOf(r);~i&&(t.splice(i,1),--n.lc||n.off())}},notify(r,i){let a=!Tr.length;for(let o of t)Tr.push(o,n.value,r,i);if(a){for(_a=0;_a<Tr.length;_a+=gd)Tr[_a](Tr[_a+1],Tr[_a+2],Tr[_a+3]);Tr.length=0}},off(){},set(r){let i=n.value;i!==r&&(n.value=r,n.notify(i))},subscribe(r){let i=n.listen(r);return r(n.value),i},value:e};return n};function h7(e,t,n){let r=new Set(t).add(void 0);return e.listen((i,a,o)=>{r.has(o)&&n(i,a,o)})}function p7(e,t,n){var r,i,a;n===void 0&&(n={});var o=(r=n.isImmediate)!=null&&r,l=(i=n.callback)!=null&&i,c=n.maxWait,f=Date.now(),d=[];function p(){if(c!==void 0){var g=Date.now()-f;if(g+t>=c)return c-g}return t}var m=function(){var g=[].slice.call(arguments),_=this;return new Promise(function(S,b){var x=o&&a===void 0;if(a!==void 0&&clearTimeout(a),a=setTimeout(function(){if(a=void 0,f=Date.now(),!o){var v=e.apply(_,g);l&&l(v),d.forEach(function(k){return(0,k.resolve)(v)}),d=[]}},p()),x){var w=e.apply(_,g);return l&&l(w),S(w)}d.push({resolve:S,reject:b})})};return m.cancel=function(g){a!==void 0&&clearTimeout(a),d.forEach(function(_){return(0,_.reject)(g)}),d=[]},m}const m7="modulepreload",g7=function(e){return"/"+e},cT={},y7=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let f=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};var o=f;document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");i=f(n.map(d=>{if(d=g7(d),d in cT)return;cT[d]=!0;const p=d.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":m7,p||(g.as="script"),g.crossOrigin="",g.href=d,c&&g.setAttribute("nonce",c),document.head.appendChild(g),p)return new Promise((_,S)=>{g.addEventListener("load",_),g.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&a(c.reason);return t().catch(a)})},b7=async e=>{const{Client:t}=await y7(async()=>{const{Client:n}=await Promise.resolve().then(()=>wB);return{Client:n}},void 0);return new t(e)},v7=e=>e.toLocaleTimeString("en-US"),_7=e=>e.toLocaleString("en"),Vh=e=>typeof e=="string"?e:Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.type==="text"?t.text:t.type==="image_url"?"[图片]":JSON.stringify(t)).join(""):JSON.stringify(e),x7=e=>{const t=e?.values?.messages?.[0]?.content;return t&&Array.isArray(t)?t.map(n=>{if(n.type==="text")return n.text}):typeof t=="string"?t:""},w7=(e,t,n={})=>{const r=An(null),i=An([]),a=An(""),o=An(!1),l=An([]),c=An(null),f=An(n.showHistory??!1),d=An(e),p=An(null),m=An("__start__"),g=An([]),_=async()=>{const F=r.get();F&&(F.tools.clearTools(),F.tools.bindTools(g.get()))},S=An(n.showGraph??!1),b=An(null),x=async()=>{S.get()&&b.set(await r.get()?.graphVisualize()||null)},w=p7(F=>{const B=F.renderMessage,I=B[B.length-1];m.set(I?.node_name||I?.name||"__start__"),i.set(B)},10);async function v(){const F=new d7({...t,client:t.client??await b7(t)});return await F.initAssistant(d.get()),d.set(F.getCurrentAssistant().graph_id),c.set(null),F.on("start",()=>{o.set(!0)}),F.on("thread",()=>{p.set(F.getCurrentThread()?.thread_id||null),m.set("__start__"),$()}),F.on("done",()=>{o.set(!1),w(F)}),F.on("error",B=>{o.set(!1),c.set(B.data)}),F.on("message",()=>{p.set(F.getCurrentThread()?.thread_id||null),w(F)}),F.on("value",()=>{p.set(F.getCurrentThread()?.thread_id||null),w(F)}),n.onInit?.(F),F.graphState={},r.set(F),S.get()&&x(),_(),F}const k=async(F,B,I=!1)=>{if(!(!I&&!a.get().trim()&&!F?.length||o.get()||!r.get())){o.set(!0),c.set(null);try{await r.get()?.sendMessage(F||a.get(),B)}catch(V){if(V.message.includes("422"))await r.get()?.resetStream();else throw V}finally{a.set(""),o.set(!1)}}},C=()=>{r.get()?.cancelRun()},T=F=>{const B=l.get();l.set(B.includes(F)?B.filter(I=>I!==F):[...B,F])},N=()=>{f.set(!f.get()),f.get()&&$()},j=An([]),$=async()=>{if(!(!r.get()||!f.get()))try{const F=await r.get()?.listThreads();j.set(F||[])}catch(F){console.error("Failed to fetch threads:",F)}};return{data:{client:r,renderMessages:i,userInput:a,loading:o,inChatError:c,currentAgent:d,collapsedTools:l,showHistory:f,historyList:j,currentChatId:p,showGraph:S,graphVisualize:b,currentNodeName:m,tools:g},mutations:{refreshTools:_,setTools(F){g.set(F),_()},isFELocking(){return r.get()?.isFELocking(i.get())},initClient:v,sendMessage:k,stopGeneration:C,toggleToolCollapse:T,toggleHistoryVisible:N,refreshHistoryList:$,addToHistory:F=>{const B=j.get();j.set([F,...B])},async revertChatTo(F,B=!1,I){if(await r.get()?.revertChatTo(F),B)return k([],I,!0);w(r.get())},setUserInput(F){a.set(F)},setCurrentAgent(F){return d.set(F),v().then(()=>{f.get()&&$()})},toggleGraphVisible(){S.set(!S.get()),S.get()&&x()},refreshGraph:x,createNewChat(){r.get()?.reset(),c.set(null),o.set(!1)},async toHistoryChat(F){c.set(null),o.set(!1);const B=await r.get()?.resetThread(F.metadata?.graph_id,F.thread_id);return B&&r.get()?.resetStream(),B},async deleteHistoryChat(F){await r.get()?.deleteThread(F.thread_id),await $()},getToolUIRender:F=>{const I=r.get().tools.getAllTools().find(V=>V.name===F)?.render;return I?V=>I(new B7(V,r.get())):null}}}};class Oo extends Error{constructor(t,n){super("".concat(t," at position ").concat(n)),this.position=n}}const S5=32,S7=10,E5=9,k5=13,E7=160,k7=8192,C7=8202,A7=8239,T7=8287,N7=12288;function O7(e){return/^[0-9A-Fa-f]$/.test(e)}function ls(e){return e>="0"&&e<="9"}function R7(e){return e>=" "}function yd(e){return`,:[]/{}()
55
+ +`.includes(e)}function fT(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="_"||e==="$"}function dT(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="_"||e==="$"||e>="0"&&e<="9"}const hT=/^(http|https|ftp|mailto|file|data|irc):\/\/$/,pT=/^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;function mT(e){return`,[]/{}
56
+ +`.includes(e)}function gT(e){return kh(e)||j7.test(e)}const j7=/^[[{\w-]$/;function M7(e){return e===`
57
+ `||e==="\r"||e===" "||e==="\b"||e==="\f"}function ms(e,t){const n=e.charCodeAt(t);return n===S5||n===S7||n===E5||n===k5}function $7(e,t){const n=e.charCodeAt(t);return n===S5||n===E5||n===k5}function D7(e,t){const n=e.charCodeAt(t);return n===E7||n>=k7&&n<=C7||n===A7||n===T7||n===N7}function kh(e){return C5(e)||hw(e)}function C5(e){return e==='"'||e==="“"||e==="”"}function yT(e){return e==='"'}function hw(e){return e==="'"||e==="‘"||e==="’"||e==="`"||e==="´"}function bT(e){return e==="'"}function vu(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const r=e.lastIndexOf(t);return r!==-1?e.substring(0,r)+(n?"":e.substring(r+1)):e}function Nr(e,t){let n=e.length;if(!ms(e,n-1))return e+t;for(;ms(e,n-1);)n--;return e.substring(0,n)+t+e.substring(n)}function I7(e,t,n){return e.substring(0,t)+e.substring(t+n)}function P7(e){return/[,\n][ \t\r]*$/.test(e)}const z7={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},L7={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
58
+ `,r:"\r",t:" "};function q7(e){let t=0,n="";f(),a()||B(),f();const i=d(",");for(i&&o(),gT(e[t])&&P7(n)?(i||(n=Nr(n,",")),b()):i&&(n=vu(n,","));e[t]==="}"||e[t]==="]";)t++,o();if(t>=e.length)return n;F();function a(){o();const G=_()||S()||x()||v()||k()||T(!1)||N();return o(),G}function o(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const X=t;let W=l(G);do W=c(),W&&(W=l(G));while(W);return t>X}function l(G){const X=G?ms:$7;let W="";for(;;)if(X(e,t))W+=e[t],t++;else if(D7(e,t))W+=" ",t++;else break;return W.length>0?(n+=W,!0):!1}function c(){if(e[t]==="/"&&e[t+1]==="*"){for(;t<e.length&&!F7(e,t);)t++;return t+=2,!0}if(e[t]==="/"&&e[t+1]==="/"){for(;t<e.length&&e[t]!==`
59
+ `;)t++;return!0}return!1}function f(){if(e.slice(t,t+3)==="```"){if(t+=3,fT(e[t]))for(;t<e.length&&dT(e[t]);)t++;return o(),!0}return!1}function d(G){return e[t]===G?(n+=e[t],t++,!0):!1}function p(G){return e[t]===G?(t++,!0):!1}function m(){return p("\\")}function g(){return o(),e[t]==="."&&e[t+1]==="."&&e[t+2]==="."?(t+=3,o(),p(","),!0):!1}function _(){if(e[t]==="{"){n+="{",t++,o(),p(",")&&o();let G=!0;for(;t<e.length&&e[t]!=="}";){let X;if(G?(X=!0,G=!1):(X=d(","),X||(n=Nr(n,",")),o()),g(),!(x()||T(!0))){e[t]==="}"||e[t]==="{"||e[t]==="]"||e[t]==="["||e[t]===void 0?n=vu(n,","):I();break}o();const L=d(":"),P=t>=e.length;L||(gT(e[t])||P?n=Nr(n,":"):V()),a()||(L||P?n+="null":V())}return e[t]==="}"?(n+="}",t++):n=Nr(n,"}"),!0}return!1}function S(){if(e[t]==="["){n+="[",t++,o(),p(",")&&o();let G=!0;for(;t<e.length&&e[t]!=="]";)if(G?G=!1:d(",")||(n=Nr(n,",")),g(),!a()){n=vu(n,",");break}return e[t]==="]"?(n+="]",t++):n=Nr(n,"]"),!0}return!1}function b(){let G=!0,X=!0;for(;X;)G?G=!1:d(",")||(n=Nr(n,",")),X=a();X||(n=vu(n,",")),n=`[
60
+ `.concat(n,`
61
+ ]`)}function x(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,W=e[t]==="\\";if(W&&(t++,W=!0),kh(e[t])){const L=yT(e[t])?yT:bT(e[t])?bT:hw(e[t])?hw:C5,P=t,Z=n.length;let R='"';for(t++;;){if(t>=e.length){const D=j(t-1);return!G&&yd(e.charAt(D))?(t=P,n=n.substring(0,Z),x(!0)):(R=Nr(R,'"'),n+=R,!0)}else{if(t===X)return R=Nr(R,'"'),n+=R,!0;if(L(e[t])){const D=t,U=R.length;if(R+='"',t++,n+=R,o(!1),G||t>=e.length||yd(e[t])||kh(e[t])||ls(e[t]))return w(),!0;const Y=j(D-1),ne=e.charAt(Y);if(ne===",")return t=P,n=n.substring(0,Z),x(!1,Y);if(yd(ne))return t=P,n=n.substring(0,Z),x(!0);n=n.substring(0,Z),t=D+1,R="".concat(R.substring(0,U),"\\").concat(R.substring(U))}else if(G&&mT(e[t])){if(e[t-1]===":"&&hT.test(e.substring(P+1,t+2)))for(;t<e.length&&pT.test(e[t]);)R+=e[t],t++;return R=Nr(R,'"'),n+=R,w(),!0}else if(e[t]==="\\"){const D=e.charAt(t+1);if(L7[D]!==void 0)R+=e.slice(t,t+2),t+=2;else if(D==="u"){let Y=2;for(;Y<6&&O7(e[t+Y]);)Y++;Y===6?(R+=e.slice(t,t+6),t+=6):t+Y>=e.length?t=e.length:H()}else R+=D,t+=2}else{const D=e.charAt(t);D==='"'&&e[t-1]!=="\\"?(R+="\\".concat(D),t++):M7(D)?(R+=z7[D],t++):(R7(D)||q(D),R+=D,t++)}}W&&m()}}return!1}function w(){let G=!1;for(o();e[t]==="+";){G=!0,t++,o(),n=vu(n,'"',!0);const X=n.length;x()?n=I7(n,X,1):n=Nr(n,'"')}return G}function v(){const G=t;if(e[t]==="-"){if(t++,$())return M(G),!0;if(!ls(e[t]))return t=G,!1}for(;ls(e[t]);)t++;if(e[t]==="."){if(t++,$())return M(G),!0;if(!ls(e[t]))return t=G,!1;for(;ls(e[t]);)t++}if(e[t]==="e"||e[t]==="E"){if(t++,(e[t]==="-"||e[t]==="+")&&t++,$())return M(G),!0;if(!ls(e[t]))return t=G,!1;for(;ls(e[t]);)t++}if(!$())return t=G,!1;if(t>G){const X=e.slice(G,t),W=/^0\d/.test(X);return n+=W?'"'.concat(X,'"'):X,!0}return!1}function k(){return C("true","true")||C("false","false")||C("null","null")||C("True","true")||C("False","false")||C("None","null")}function C(G,X){return e.slice(t,t+G.length)===G?(n+=X,t+=G.length,!0):!1}function T(G){const X=t;if(fT(e[t])){for(;t<e.length&&dT(e[t]);)t++;let W=t;for(;ms(e,W);)W++;if(e[W]==="(")return t=W+1,a(),e[t]===")"&&(t++,e[t]===";"&&t++),!0}for(;t<e.length&&!mT(e[t])&&!kh(e[t])&&(!G||e[t]!==":");)t++;if(e[t-1]===":"&&hT.test(e.substring(X,t+2)))for(;t<e.length&&pT.test(e[t]);)t++;if(t>X){for(;ms(e,t-1)&&t>0;)t--;const W=e.slice(X,t);return n+=W==="undefined"?"null":JSON.stringify(W),e[t]==='"'&&t++,!0}}function N(){if(e[t]==="/"){const G=t;for(t++;t<e.length&&(e[t]!=="/"||e[t-1]==="\\");)t++;return t++,n+='"'.concat(e.substring(G,t),'"'),!0}}function j(G){let X=G;for(;X>0&&ms(e,X);)X--;return X}function $(){return t>=e.length||yd(e[t])||ms(e,t)}function M(G){n+="".concat(e.slice(G,t),"0")}function q(G){throw new Oo("Invalid character ".concat(JSON.stringify(G)),t)}function F(){throw new Oo("Unexpected character ".concat(JSON.stringify(e[t])),t)}function B(){throw new Oo("Unexpected end of json string",e.length)}function I(){throw new Oo("Object key expected",t)}function V(){throw new Oo("Colon expected",t)}function H(){const G=e.slice(t,t+6);throw new Oo('Invalid unicode character "'.concat(G,'"'),t)}}function F7(e,t){return e[t]==="*"&&e[t+1]==="/"}class B7{constructor(t,n){this.message=t,this.client=n}get state(){return this.message.type==="tool"&&this.message?.additional_kwargs?.done?"done":this.message.tool_input?"loading":"idle"}get input(){try{return JSON.parse(this.message.tool_input)}catch{return null}}get output(){return Vh(this.message.content)}getJSONOutput(){return JSON.parse(this.output)}getJSONOutputSafe(){try{return JSON.parse(this.output)}catch{return null}}getInputRepaired(){try{return JSON.parse(q7(this.message.tool_input||""))}catch{return{}}}response(t){this.client.doneFEToolWaiting(this.message.id,JSON.stringify(t))}}var _u={exports:{}},Zy={},Yy,vT;function U7(){if(vT)return Yy;vT=1;function e(t,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return Yy=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var n=new Date().getTime();if(t&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1);else return!1;var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},r),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(t,n){this._fn=t,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},e.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},e.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},n=null,r=0,i=0;i<this._errors.length;i++){var a=this._errors[i],o=a.message,l=(t[o]||0)+1;t[o]=l,l>=r&&(n=a,r=l)}return n},Yy}var _T;function H7(){return _T||(_T=1,function(e){var t=U7();e.operation=function(n){var r=e.timeouts(n);return new t(r,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(n){if(n instanceof Array)return[].concat(n);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)r[i]=n[i];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],o=0;o<r.retries;o++)a.push(this.createTimeout(o,r));return n&&n.forever&&!a.length&&a.push(this.createTimeout(o,r)),a.sort(function(l,c){return l-c}),a},e.createTimeout=function(n,r){var i=r.randomize?Math.random()+1:1,a=Math.round(i*Math.max(r.minTimeout,1)*Math.pow(r.factor,n));return a=Math.min(a,r.maxTimeout),a},e.wrap=function(n,r,i){if(r instanceof Array&&(i=r,r=null),!i){i=[];for(var a in n)typeof n[a]=="function"&&i.push(a)}for(var o=0;o<i.length;o++){var l=i[o],c=n[l];n[l]=(function(d){var p=e.operation(r),m=Array.prototype.slice.call(arguments,1),g=m.pop();m.push(function(_){p.retry(_)||(_&&(arguments[0]=p.mainError()),g.apply(this,arguments))}),p.attempt(function(){d.apply(n,m)})}).bind(n,c),n[l].options=r}}}(Zy)),Zy}var Ky,xT;function V7(){return xT||(xT=1,Ky=H7()),Ky}var wT;function G7(){if(wT)return _u.exports;wT=1;const e=V7(),t=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class n extends Error{constructor(l){super(),l instanceof Error?(this.originalError=l,{message:l}=l):(this.originalError=new Error(l),this.originalError.stack=this.stack),this.name="AbortError",this.message=l}}const r=(o,l,c)=>{const f=c.retries-(l-1);return o.attemptNumber=l,o.retriesLeft=f,o},i=o=>t.includes(o),a=(o,l)=>new Promise((c,f)=>{l={onFailedAttempt:()=>{},retries:10,...l};const d=e.operation(l);d.attempt(async p=>{try{c(await o(p))}catch(m){if(!(m instanceof Error)){f(new TypeError(`Non-error was thrown: "${m}". You should only throw errors.`));return}if(m instanceof n)d.stop(),f(m.originalError);else if(m instanceof TypeError&&!i(m.message))d.stop(),f(m);else{r(m,p,l);try{await l.onFailedAttempt(m)}catch(g){f(g);return}d.retry(m)||f(d.mainError())}}})});return _u.exports=a,_u.exports.default=a,_u.exports.AbortError=n,_u.exports}var Z7=G7();const Y7=qn(Z7);var bd={},Xy={exports:{}},ST;function K7(){return ST||(ST=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,f,d){this.fn=c,this.context=f,this.once=d||!1}function a(c,f,d,p,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new i(d,p||c,m),_=n?n+f:f;return c._events[_]?c._events[_].fn?c._events[_]=[c._events[_],g]:c._events[_].push(g):(c._events[_]=g,c._eventsCount++),c}function o(c,f){--c._eventsCount===0?c._events=new r:delete c._events[f]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],d,p;if(this._eventsCount===0)return f;for(p in d=this._events)t.call(d,p)&&f.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(d)):f},l.prototype.listeners=function(f){var d=n?n+f:f,p=this._events[d];if(!p)return[];if(p.fn)return[p.fn];for(var m=0,g=p.length,_=new Array(g);m<g;m++)_[m]=p[m].fn;return _},l.prototype.listenerCount=function(f){var d=n?n+f:f,p=this._events[d];return p?p.fn?1:p.length:0},l.prototype.emit=function(f,d,p,m,g,_){var S=n?n+f:f;if(!this._events[S])return!1;var b=this._events[S],x=arguments.length,w,v;if(b.fn){switch(b.once&&this.removeListener(f,b.fn,void 0,!0),x){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,p),!0;case 4:return b.fn.call(b.context,d,p,m),!0;case 5:return b.fn.call(b.context,d,p,m,g),!0;case 6:return b.fn.call(b.context,d,p,m,g,_),!0}for(v=1,w=new Array(x-1);v<x;v++)w[v-1]=arguments[v];b.fn.apply(b.context,w)}else{var k=b.length,C;for(v=0;v<k;v++)switch(b[v].once&&this.removeListener(f,b[v].fn,void 0,!0),x){case 1:b[v].fn.call(b[v].context);break;case 2:b[v].fn.call(b[v].context,d);break;case 3:b[v].fn.call(b[v].context,d,p);break;case 4:b[v].fn.call(b[v].context,d,p,m);break;default:if(!w)for(C=1,w=new Array(x-1);C<x;C++)w[C-1]=arguments[C];b[v].fn.apply(b[v].context,w)}}return!0},l.prototype.on=function(f,d,p){return a(this,f,d,p,!1)},l.prototype.once=function(f,d,p){return a(this,f,d,p,!0)},l.prototype.removeListener=function(f,d,p,m){var g=n?n+f:f;if(!this._events[g])return this;if(!d)return o(this,g),this;var _=this._events[g];if(_.fn)_.fn===d&&(!m||_.once)&&(!p||_.context===p)&&o(this,g);else{for(var S=0,b=[],x=_.length;S<x;S++)(_[S].fn!==d||m&&!_[S].once||p&&_[S].context!==p)&&b.push(_[S]);b.length?this._events[g]=b.length===1?b[0]:b:o(this,g)}return this},l.prototype.removeAllListeners=function(f){var d;return f?(d=n?n+f:f,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l}(Xy)),Xy.exports}var xu={exports:{}},Wy,ET;function X7(){return ET||(ET=1,Wy=(e,t)=>(t=t||(()=>{}),e.then(n=>new Promise(r=>{r(t())}).then(()=>n),n=>new Promise(r=>{r(t())}).then(()=>{throw n})))),Wy}var kT;function W7(){if(kT)return xu.exports;kT=1;const e=X7();class t extends Error{constructor(i){super(i),this.name="TimeoutError"}}const n=(r,i,a)=>new Promise((o,l)=>{if(typeof i!="number"||i<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(i===1/0){o(r);return}const c=setTimeout(()=>{if(typeof a=="function"){try{o(a())}catch(p){l(p)}return}const f=typeof a=="string"?a:`Promise timed out after ${i} milliseconds`,d=a instanceof Error?a:new t(f);typeof r.cancel=="function"&&r.cancel(),l(d)},i);e(r.then(o,l),()=>{clearTimeout(c)})});return xu.exports=n,xu.exports.default=n,xu.exports.TimeoutError=t,xu.exports}var vd={},_d={},CT;function Q7(){if(CT)return _d;CT=1,Object.defineProperty(_d,"__esModule",{value:!0});function e(t,n,r){let i=0,a=t.length;for(;a>0;){const o=a/2|0;let l=i+o;r(t[l],n)<=0?(i=++l,a-=o+1):a=o}return i}return _d.default=e,_d}var AT;function J7(){if(AT)return vd;AT=1,Object.defineProperty(vd,"__esModule",{value:!0});const e=Q7();class t{constructor(){this._queue=[]}enqueue(r,i){i=Object.assign({priority:0},i);const a={priority:i.priority,run:r};if(this.size&&this._queue[this.size-1].priority>=i.priority){this._queue.push(a);return}const o=e.default(this._queue,a,(l,c)=>c.priority-l.priority);this._queue.splice(o,0,a)}dequeue(){const r=this._queue.shift();return r?.run}filter(r){return this._queue.filter(i=>i.priority===r.priority).map(i=>i.run)}get size(){return this._queue.length}}return vd.default=t,vd}var TT;function eB(){if(TT)return bd;TT=1,Object.defineProperty(bd,"__esModule",{value:!0});const e=K7(),t=W7(),n=J7(),r=()=>{},i=new t.TimeoutError;class a extends e{constructor(l){var c,f,d,p;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=r,this._resolveIdle=r,l=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:n.default},l),!(typeof l.intervalCap=="number"&&l.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(f=(c=l.intervalCap)===null||c===void 0?void 0:c.toString())!==null&&f!==void 0?f:""}\` (${typeof l.intervalCap})`);if(l.interval===void 0||!(Number.isFinite(l.interval)&&l.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(p=(d=l.interval)===null||d===void 0?void 0:d.toString())!==null&&p!==void 0?p:""}\` (${typeof l.interval})`);this._carryoverConcurrencyCount=l.carryoverConcurrencyCount,this._isIntervalIgnored=l.intervalCap===1/0||l.interval===0,this._intervalCap=l.intervalCap,this._interval=l.interval,this._queue=new l.queueClass,this._queueClass=l.queueClass,this.concurrency=l.concurrency,this._timeout=l.timeout,this._throwOnTimeout=l.throwOnTimeout===!0,this._isPaused=l.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=r,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=r,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const l=Date.now();if(this._intervalId===void 0){const c=this._intervalEnd-l;if(c<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},c)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const l=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const c=this._queue.dequeue();return c?(this.emit("active"),c(),l&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(l){if(!(typeof l=="number"&&l>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${l}\` (${typeof l})`);this._concurrency=l,this._processQueue()}async add(l,c={}){return new Promise((f,d)=>{const p=async()=>{this._pendingCount++,this._intervalCount++;try{const m=this._timeout===void 0&&c.timeout===void 0?l():t.default(Promise.resolve(l()),c.timeout===void 0?this._timeout:c.timeout,()=>{(c.throwOnTimeout===void 0?this._throwOnTimeout:c.throwOnTimeout)&&d(i)});f(await m)}catch(m){d(m)}this._next()};this._queue.enqueue(p,c),this._tryToStartAnother(),this.emit("add")})}async addAll(l,c){return Promise.all(l.map(async f=>this.add(f,c)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(l=>{const c=this._resolveEmpty;this._resolveEmpty=()=>{c(),l()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(l=>{const c=this._resolveIdle;this._resolveIdle=()=>{c(),l()}})}get size(){return this._queue.size}sizeBy(l){return this._queue.filter(l).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(l){this._timeout=l}}return bd.default=a,bd}var tB=eB();const Qy=qn(tB),nB=(...e)=>fetch(...e),rB=Symbol.for("lg:fetch_implementation"),iB=()=>globalThis[rB]??nB,aB=[400,401,402,403,404,405,406,407,408,409,422];function sB(e){return e==null||typeof e!="object"?!1:"status"in e&&"statusText"in e&&"text"in e}class nc extends Error{constructor(t,n,r){super(`HTTP ${t}: ${n}`),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.status=t,this.text=n,this.response=r}static async fromResponse(t,n){try{return new nc(t.status,await t.text(),n?.includeResponse?t:void 0)}catch{return new nc(t.status,t.statusText,n?.includeResponse?t:void 0)}}}class oB{constructor(t){Object.defineProperty(this,"maxConcurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxRetries",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onFailedResponseHook",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"customFetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxConcurrency=t.maxConcurrency??1/0,this.maxRetries=t.maxRetries??4,"default"in Qy?this.queue=new Qy.default({concurrency:this.maxConcurrency}):this.queue=new Qy({concurrency:this.maxConcurrency}),this.onFailedResponseHook=t?.onFailedResponseHook,this.customFetch=t.fetch}call(t,...n){const{onFailedResponseHook:r}=this;return this.queue.add(()=>Y7(()=>t(...n).catch(async i=>{throw i instanceof Error?i:sB(i)?await nc.fromResponse(i,{includeResponse:!!r}):new Error(i)}),{async onFailedAttempt(i){if(i.message.startsWith("Cancel")||i.message.startsWith("TimeoutError")||i.message.startsWith("AbortError")||i?.code==="ECONNABORTED")throw i;if(i instanceof nc){if(aB.includes(i.status))throw i;r&&i.response&&await r(i.response)}},retries:this.maxRetries,randomize:!0}),{throwOnTimeout:!0})}callWithOptions(t,n,...r){return t.signal?Promise.race([this.call(n,...r),new Promise((i,a)=>{t.signal?.addEventListener("abort",()=>{a(new Error("AbortError"))})})]):this.call(n,...r)}fetch(...t){const n=this.customFetch??iB();return this.call(()=>n(...t).then(r=>r.ok?r:Promise.reject(r)))}}var lB={};function uB(e){try{return typeof process<"u"?lB?.[e]:void 0}catch{return}}function cB(...e){const t=e.filter(r=>r!=null);if(t.length===0)return;if(t.length===1)return t[0];const n=new AbortController;for(const r of e){if(r?.aborted)return n.abort(r.reason),n.signal;r?.addEventListener("abort",()=>n.abort(r.reason),{once:!0})}return n.signal}const zu=13,pw=10,fB=0,NT=58,dB=32,hB=[zu,pw];function mw(){let e=[],t=!1;return new TransformStream({start(){e=[],t=!1},transform(n,r){let i=n;if(t&&(i=Ch([[zu],i]),t=!1),i.length>0&&i.at(-1)===zu&&(t=!0,i=i.subarray(0,-1)),!i.length)return;const a=hB.includes(i.at(-1)),o=i.length-1,{lines:l}=i.reduce((c,f,d)=>(c.from>d||((f===zu||f===pw)&&(c.lines.push(i.subarray(c.from,d)),f===zu&&i[d+1]===pw?c.from=d+2:c.from=d+1),d===o&&c.from<=o&&c.lines.push(i.subarray(c.from))),c),{lines:[],from:0});if(l.length===1&&!a){e.push(l[0]);return}e.length&&(e.push(l[0]),l[0]=Ch(e),e=[]),a||l.length&&(e=[l.pop()]);for(const c of l)r.enqueue(c)},flush(n){e.length&&n.enqueue(Ch(e))}})}function gw(){let e="",t=[],n="",r=null;const i=new TextDecoder;return new TransformStream({transform(a,o){if(!a.length){if(!e&&!t.length&&!n&&r==null)return;const d={id:n||void 0,event:e,data:t.length?OT(i,t):null};e="",t=[],r=null,o.enqueue(d);return}if(a[0]===NT)return;const l=a.indexOf(NT);if(l===-1)return;const c=i.decode(a.subarray(0,l));let f=a.subarray(l+1);if(f[0]===dB&&(f=f.subarray(1)),c==="event")e=i.decode(f);else if(c==="data")t.push(f);else if(c==="id")f.indexOf(fB)===-1&&(n=i.decode(f));else if(c==="retry"){const d=Number.parseInt(i.decode(f),10);Number.isNaN(d)||(r=d)}},flush(a){e&&a.enqueue({id:n||void 0,event:e,data:t.length?OT(i,t):null})}})}function Ch(e){const t=e.reduce((i,a)=>i+a.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function OT(e,t){return JSON.parse(e.decode(Ch(t)))}class Qo extends ReadableStream{constructor(){super(...arguments),Object.defineProperty(this,"reader",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}ensureReader(){this.reader||(this.reader=this.getReader())}async next(){this.ensureReader();try{const t=await this.reader.read();return t.done?(this.reader.releaseLock(),{done:!0,value:void 0}):{done:!1,value:t.value}}catch(t){throw this.reader.releaseLock(),t}}async return(){if(this.ensureReader(),this.locked){const t=this.reader.cancel();this.reader.releaseLock(),await t}return{done:!0,value:void 0}}async throw(t){if(this.ensureReader(),this.locked){const n=this.reader.cancel();this.reader.releaseLock(),await n}throw t}async[Symbol.asyncDispose](){await this.return()}[Symbol.asyncIterator](){return this}static fromReadableStream(t){const n=t.getReader();return new Qo({start(r){return i();function i(){return n.read().then(({done:a,value:o})=>{if(a){r.close();return}return r.enqueue(o),i()})}},cancel(){n.releaseLock()}})}static fromAsyncGenerator(t){return new Qo({async pull(n){const{value:r,done:i}=await t.next();i&&n.close(),n.enqueue(r)},async cancel(n){await t.return(n)}})}}function*pB(e){let t,n=!1;if(e instanceof Headers){const r=[];e.forEach((i,a)=>{r.push([a,i])}),t=r}else Array.isArray(e)?t=e:(n=!0,t=Object.entries(e??{}));for(const r of t){const i=r[0];if(typeof i!="string")throw new TypeError(`Expected header name to be a string, got ${typeof i}`);const a=Array.isArray(r[1])?r[1]:[r[1]];let o=!1;for(const l of a)l!==void 0&&(n&&!o&&(o=!0,yield[i,null]),yield[i,l])}}function RT(...e){const t=new Headers;for(const r of e)if(r)for(const[i,a]of pB(r))a===null?t.delete(i):t.append(i,a);const n=[];return t.forEach((r,i)=>{n.push([i,r])}),Object.fromEntries(n)}function A5(e){if(e)return e;const t=["LANGGRAPH","LANGSMITH","LANGCHAIN"];for(const n of t){const r=uB(`${n}_API_KEY`);if(r)return r.trim().replace(/^["']|["']$/g,"")}}const mB=/(\/threads\/(?<thread_id>.+))?\/runs\/(?<run_id>.+)/;function Jy(e){const t=e.headers.get("Content-Location");if(!t)return;const n=mB.exec(t);if(n?.groups?.run_id)return{run_id:n.groups.run_id,thread_id:n.groups.thread_id||void 0}}class hl{constructor(t){Object.defineProperty(this,"asyncCaller",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timeoutMs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"apiUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"defaultHeaders",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onRequest",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const n={maxRetries:4,maxConcurrency:4,...t?.callerOptions};let r="http://localhost:8123";if(!t?.apiUrl&&typeof globalThis=="object"&&globalThis!=null){const a=Symbol.for("langgraph_api:fetch"),o=Symbol.for("langgraph_api:url"),l=globalThis;l[a]&&(n.fetch??=l[a]),l[o]&&(r=l[o])}this.asyncCaller=new oB(n),this.timeoutMs=t?.timeoutMs,this.apiUrl=t?.apiUrl?.replace(/\/$/,"")||r,this.defaultHeaders=t?.defaultHeaders||{},this.onRequest=t?.onRequest;const i=A5(t?.apiKey);i&&(this.defaultHeaders["x-api-key"]=i)}prepareFetchOptions(t,n){const r={...n,headers:RT(this.defaultHeaders,n?.headers)};r.json&&(r.body=JSON.stringify(r.json),r.headers=RT(r.headers,{"content-type":"application/json"}),delete r.json),r.withResponse&&delete r.withResponse;let i=null;typeof n?.timeoutMs<"u"?n.timeoutMs!=null&&(i=AbortSignal.timeout(n.timeoutMs)):this.timeoutMs!=null&&(i=AbortSignal.timeout(this.timeoutMs)),r.signal=cB(i,r.signal);const a=new URL(`${this.apiUrl}${t}`);if(r.params){for(const[o,l]of Object.entries(r.params)){if(l==null)continue;const c=typeof l=="string"||typeof l=="number"?l.toString():JSON.stringify(l);a.searchParams.append(o,c)}delete r.params}return[a,r]}async fetch(t,n){const[r,i]=this.prepareFetchOptions(t,n);let a=i;this.onRequest&&(a=await this.onRequest(r,i));const o=await this.asyncCaller.fetch(r,a),l=(()=>{if(!(o.status===202||o.status===204))return o.json()})();return n?.withResponse?[await l,o]:l}}class gB extends hl{async createForThread(t,n,r){const i={schedule:r?.schedule,input:r?.input,config:r?.config,context:r?.context,metadata:r?.metadata,assistant_id:n,interrupt_before:r?.interruptBefore,interrupt_after:r?.interruptAfter,webhook:r?.webhook,multitask_strategy:r?.multitaskStrategy,if_not_exists:r?.ifNotExists,checkpoint_during:r?.checkpointDuring,durability:r?.durability};return this.fetch(`/threads/${t}/runs/crons`,{method:"POST",json:i})}async create(t,n){const r={schedule:n?.schedule,input:n?.input,config:n?.config,context:n?.context,metadata:n?.metadata,assistant_id:t,interrupt_before:n?.interruptBefore,interrupt_after:n?.interruptAfter,webhook:n?.webhook,multitask_strategy:n?.multitaskStrategy,if_not_exists:n?.ifNotExists,checkpoint_during:n?.checkpointDuring,durability:n?.durability};return this.fetch("/runs/crons",{method:"POST",json:r})}async delete(t){await this.fetch(`/runs/crons/${t}`,{method:"DELETE"})}async search(t){return this.fetch("/runs/crons/search",{method:"POST",json:{assistant_id:t?.assistantId??void 0,thread_id:t?.threadId??void 0,limit:t?.limit??10,offset:t?.offset??0,sort_by:t?.sortBy??void 0,sort_order:t?.sortOrder??void 0,select:t?.select??void 0}})}async count(t){return this.fetch("/runs/crons/count",{method:"POST",json:{assistant_id:t?.assistantId??void 0,thread_id:t?.threadId??void 0}})}}class yB extends hl{async get(t){return this.fetch(`/assistants/${t}`)}async getGraph(t,n){return this.fetch(`/assistants/${t}/graph`,{params:{xray:n?.xray}})}async getSchemas(t){return this.fetch(`/assistants/${t}/schemas`)}async getSubgraphs(t,n){return n?.namespace?this.fetch(`/assistants/${t}/subgraphs/${n.namespace}`,{params:{recurse:n?.recurse}}):this.fetch(`/assistants/${t}/subgraphs`,{params:{recurse:n?.recurse}})}async create(t){return this.fetch("/assistants",{method:"POST",json:{graph_id:t.graphId,config:t.config,context:t.context,metadata:t.metadata,assistant_id:t.assistantId,if_exists:t.ifExists,name:t.name,description:t.description}})}async update(t,n){return this.fetch(`/assistants/${t}`,{method:"PATCH",json:{graph_id:n.graphId,config:n.config,context:n.context,metadata:n.metadata,name:n.name,description:n.description}})}async delete(t){return this.fetch(`/assistants/${t}`,{method:"DELETE"})}async search(t){return this.fetch("/assistants/search",{method:"POST",json:{graph_id:t?.graphId??void 0,metadata:t?.metadata??void 0,limit:t?.limit??10,offset:t?.offset??0,sort_by:t?.sortBy??void 0,sort_order:t?.sortOrder??void 0,select:t?.select??void 0}})}async count(t){return this.fetch("/assistants/count",{method:"POST",json:{metadata:t?.metadata??void 0,graph_id:t?.graphId??void 0}})}async getVersions(t,n){return this.fetch(`/assistants/${t}/versions`,{method:"POST",json:{metadata:n?.metadata??void 0,limit:n?.limit??10,offset:n?.offset??0}})}async setLatest(t,n){return this.fetch(`/assistants/${t}/latest`,{method:"POST",json:{version:n}})}}class bB extends hl{async get(t){return this.fetch(`/threads/${t}`)}async create(t){const n=typeof t?.ttl=="number"?{ttl:t.ttl,strategy:"delete"}:t?.ttl;return this.fetch("/threads",{method:"POST",json:{metadata:{...t?.metadata,graph_id:t?.graphId},thread_id:t?.threadId,if_exists:t?.ifExists,supersteps:t?.supersteps?.map(r=>({updates:r.updates.map(i=>({values:i.values,command:i.command,as_node:i.asNode}))})),ttl:n}})}async copy(t){return this.fetch(`/threads/${t}/copy`,{method:"POST"})}async update(t,n){const r=typeof n?.ttl=="number"?{ttl:n.ttl,strategy:"delete"}:n?.ttl;return this.fetch(`/threads/${t}`,{method:"PATCH",json:{metadata:n?.metadata,ttl:r}})}async delete(t){return this.fetch(`/threads/${t}`,{method:"DELETE"})}async search(t){return this.fetch("/threads/search",{method:"POST",json:{metadata:t?.metadata??void 0,ids:t?.ids??void 0,limit:t?.limit??10,offset:t?.offset??0,status:t?.status,sort_by:t?.sortBy,sort_order:t?.sortOrder,select:t?.select??void 0}})}async count(t){return this.fetch("/threads/count",{method:"POST",json:{metadata:t?.metadata??void 0,values:t?.values??void 0,status:t?.status??void 0}})}async getState(t,n,r){return n!=null?typeof n!="string"?this.fetch(`/threads/${t}/state/checkpoint`,{method:"POST",json:{checkpoint:n,subgraphs:r?.subgraphs}}):this.fetch(`/threads/${t}/state/${n}`,{params:{subgraphs:r?.subgraphs}}):this.fetch(`/threads/${t}/state`,{params:{subgraphs:r?.subgraphs}})}async updateState(t,n){return this.fetch(`/threads/${t}/state`,{method:"POST",json:{values:n.values,checkpoint_id:n.checkpointId,checkpoint:n.checkpoint,as_node:n?.asNode}})}async patchState(t,n){let r;if(typeof t!="string"){if(typeof t.configurable?.thread_id!="string")throw new Error("Thread ID is required when updating state with a config.");r=t.configurable.thread_id}else r=t;return this.fetch(`/threads/${r}/state`,{method:"PATCH",json:{metadata:n}})}async getHistory(t,n){return this.fetch(`/threads/${t}/history`,{method:"POST",json:{limit:n?.limit??10,before:n?.before,metadata:n?.metadata,checkpoint:n?.checkpoint}})}async*joinStream(t,n){let[r,i]=this.prepareFetchOptions(`/threads/${t}/stream`,{method:"GET",headers:n?.lastEventId?{"Last-Event-ID":n.lastEventId}:void 0,params:n?.streamMode?{stream_mode:n.streamMode}:void 0});this.onRequest!=null&&(i=await this.onRequest(r,i));const o=((await this.asyncCaller.fetch(r,i)).body||new ReadableStream({start:l=>l.close()})).pipeThrough(mw()).pipeThrough(gw());yield*Qo.fromReadableStream(o)}}class vB extends hl{async*stream(t,n,r){const i={input:r?.input,command:r?.command,config:r?.config,context:r?.context,metadata:r?.metadata,stream_mode:r?.streamMode,stream_subgraphs:r?.streamSubgraphs,stream_resumable:r?.streamResumable,feedback_keys:r?.feedbackKeys,assistant_id:n,interrupt_before:r?.interruptBefore,interrupt_after:r?.interruptAfter,checkpoint:r?.checkpoint,checkpoint_id:r?.checkpointId,webhook:r?.webhook,multitask_strategy:r?.multitaskStrategy,on_completion:r?.onCompletion,on_disconnect:r?.onDisconnect,after_seconds:r?.afterSeconds,if_not_exists:r?.ifNotExists,checkpoint_during:r?.checkpointDuring,durability:r?.durability},a=t==null?"/runs/stream":`/threads/${t}/runs/stream`;let[o,l]=this.prepareFetchOptions(a,{method:"POST",json:i,timeoutMs:null,signal:r?.signal});this.onRequest!=null&&(l=await this.onRequest(o,l));const c=await this.asyncCaller.fetch(o,l),f=Jy(c);f&&r?.onRunCreated?.(f);const d=(c.body||new ReadableStream({start:p=>p.close()})).pipeThrough(mw()).pipeThrough(gw());yield*Qo.fromReadableStream(d)}async create(t,n,r){const i={input:r?.input,command:r?.command,config:r?.config,context:r?.context,metadata:r?.metadata,stream_mode:r?.streamMode,stream_subgraphs:r?.streamSubgraphs,stream_resumable:r?.streamResumable,assistant_id:n,interrupt_before:r?.interruptBefore,interrupt_after:r?.interruptAfter,webhook:r?.webhook,checkpoint:r?.checkpoint,checkpoint_id:r?.checkpointId,multitask_strategy:r?.multitaskStrategy,after_seconds:r?.afterSeconds,if_not_exists:r?.ifNotExists,checkpoint_during:r?.checkpointDuring,durability:r?.durability,langsmith_tracer:r?._langsmithTracer?{project_name:r?._langsmithTracer?.projectName,example_id:r?._langsmithTracer?.exampleId}:void 0},a=t===null?"/runs":`/threads/${t}/runs`,[o,l]=await this.fetch(a,{method:"POST",json:i,signal:r?.signal,withResponse:!0}),c=Jy(l);return c&&r?.onRunCreated?.(c),o}async createBatch(t){const n=t.map(r=>({...r,assistant_id:r.assistantId})).map(r=>Object.fromEntries(Object.entries(r).filter(([i,a])=>a!==void 0)));return this.fetch("/runs/batch",{method:"POST",json:n})}async wait(t,n,r){const i={input:r?.input,command:r?.command,config:r?.config,context:r?.context,metadata:r?.metadata,assistant_id:n,interrupt_before:r?.interruptBefore,interrupt_after:r?.interruptAfter,checkpoint:r?.checkpoint,checkpoint_id:r?.checkpointId,webhook:r?.webhook,multitask_strategy:r?.multitaskStrategy,on_completion:r?.onCompletion,on_disconnect:r?.onDisconnect,after_seconds:r?.afterSeconds,if_not_exists:r?.ifNotExists,checkpoint_during:r?.checkpointDuring,durability:r?.durability,langsmith_tracer:r?._langsmithTracer?{project_name:r?._langsmithTracer?.projectName,example_id:r?._langsmithTracer?.exampleId}:void 0},a=t==null?"/runs/wait":`/threads/${t}/runs/wait`,[o,l]=await this.fetch(a,{method:"POST",json:i,timeoutMs:null,signal:r?.signal,withResponse:!0}),c=Jy(l);if(c&&r?.onRunCreated?.(c),(r?.raiseError!==void 0?r.raiseError:!0)&&"__error__"in o&&typeof o.__error__=="object"&&o.__error__&&"error"in o.__error__&&"message"in o.__error__)throw new Error(`${o.__error__?.error}: ${o.__error__?.message}`);return o}async list(t,n){return this.fetch(`/threads/${t}/runs`,{params:{limit:n?.limit??10,offset:n?.offset??0,status:n?.status??void 0,select:n?.select??void 0}})}async get(t,n){return this.fetch(`/threads/${t}/runs/${n}`)}async cancel(t,n,r=!1,i="interrupt"){return this.fetch(`/threads/${t}/runs/${n}/cancel`,{method:"POST",params:{wait:r?"1":"0",action:i}})}async join(t,n,r){return this.fetch(`/threads/${t}/runs/${n}/join`,{timeoutMs:null,signal:r?.signal})}async*joinStream(t,n,r){const i=typeof r=="object"&&r!=null&&r instanceof AbortSignal?{signal:r}:r;let[a,o]=this.prepareFetchOptions(t!=null?`/threads/${t}/runs/${n}/stream`:`/runs/${n}/stream`,{method:"GET",timeoutMs:null,signal:i?.signal,headers:i?.lastEventId?{"Last-Event-ID":i.lastEventId}:void 0,params:{cancel_on_disconnect:i?.cancelOnDisconnect?"1":"0",stream_mode:i?.streamMode}});this.onRequest!=null&&(o=await this.onRequest(a,o));const c=((await this.asyncCaller.fetch(a,o)).body||new ReadableStream({start:f=>f.close()})).pipeThrough(mw()).pipeThrough(gw());yield*Qo.fromReadableStream(c)}async delete(t,n){return this.fetch(`/threads/${t}/runs/${n}`,{method:"DELETE"})}}class _B extends hl{async putItem(t,n,r,i){t.forEach(o=>{if(o.includes("."))throw new Error(`Invalid namespace label '${o}'. Namespace labels cannot contain periods ('.')`)});const a={namespace:t,key:n,value:r,index:i?.index,ttl:i?.ttl};return this.fetch("/store/items",{method:"PUT",json:a})}async getItem(t,n,r){t.forEach(o=>{if(o.includes("."))throw new Error(`Invalid namespace label '${o}'. Namespace labels cannot contain periods ('.')`)});const i={namespace:t.join("."),key:n};r?.refreshTtl!==void 0&&(i.refresh_ttl=r.refreshTtl);const a=await this.fetch("/store/items",{params:i});return a?{...a,createdAt:a.created_at,updatedAt:a.updated_at}:null}async deleteItem(t,n){return t.forEach(r=>{if(r.includes("."))throw new Error(`Invalid namespace label '${r}'. Namespace labels cannot contain periods ('.')`)}),this.fetch("/store/items",{method:"DELETE",json:{namespace:t,key:n}})}async searchItems(t,n){const r={namespace_prefix:t,filter:n?.filter,limit:n?.limit??10,offset:n?.offset??0,query:n?.query,refresh_ttl:n?.refreshTtl};return{items:(await this.fetch("/store/items/search",{method:"POST",json:r})).items.map(a=>({...a,createdAt:a.created_at,updatedAt:a.updated_at}))}}async listNamespaces(t){const n={prefix:t?.prefix,suffix:t?.suffix,max_depth:t?.maxDepth,limit:t?.limit??100,offset:t?.offset??0};return this.fetch("/store/namespaces",{method:"POST",json:n})}}class bs extends hl{static getOrCached(t,n){if(bs.promiseCache[t]!=null)return bs.promiseCache[t];const r=n();return bs.promiseCache[t]=r,r}async getComponent(t,n){return bs.getOrCached(`${this.apiUrl}-${t}-${n}`,async()=>{let[r,i]=this.prepareFetchOptions(`/ui/${t}`,{headers:{Accept:"text/html","Content-Type":"application/json"},method:"POST",json:{name:n}});return this.onRequest!=null&&(i=await this.onRequest(r,i)),(await this.asyncCaller.fetch(r,i)).text()})}}Object.defineProperty(bs,"promiseCache",{enumerable:!0,configurable:!0,writable:!0,value:{}});class xB{constructor(t){Object.defineProperty(this,"assistants",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"threads",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"runs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"crons",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"~ui",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"~configHash",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this["~configHash"]=JSON.stringify({apiUrl:t?.apiUrl,apiKey:t?.apiKey,timeoutMs:t?.timeoutMs,defaultHeaders:t?.defaultHeaders,maxConcurrency:t?.callerOptions?.maxConcurrency,maxRetries:t?.callerOptions?.maxRetries,callbacks:{onFailedResponseHook:t?.callerOptions?.onFailedResponseHook!=null,onRequest:t?.onRequest!=null,fetch:t?.callerOptions?.fetch!=null}}),this.assistants=new yB(t),this.threads=new bB(t),this.runs=new vB(t),this.crons=new gB(t),this.store=new _B(t),this["~ui"]=new bs(t)}}const wB=Object.freeze(Object.defineProperty({__proto__:null,Client:xB,getApiKey:A5},Symbol.toStringTag,{value:"Module"})),SB=(e,t)=>({...Object.fromEntries(Object.entries(e.data).map(([r,i])=>[r,t(i)])),...e.mutations});function EB(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const kB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AB={};function jT(e,t){return(AB.jsx?CB:kB).test(e)}const TB=/[ \t\n\f\r]/g;function NB(e){return typeof e=="object"?e.type==="text"?MT(e.value):!1:MT(e)}function MT(e){return e.replace(TB,"")===""}class kc{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}kc.prototype.normal={};kc.prototype.property={};kc.prototype.space=void 0;function T5(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new kc(n,r,t)}function yw(e){return e.toLowerCase()}class Fn{constructor(t,n){this.attribute=n,this.property=t}}Fn.prototype.attribute="";Fn.prototype.booleanish=!1;Fn.prototype.boolean=!1;Fn.prototype.commaOrSpaceSeparated=!1;Fn.prototype.commaSeparated=!1;Fn.prototype.defined=!1;Fn.prototype.mustUseProperty=!1;Fn.prototype.number=!1;Fn.prototype.overloadedBoolean=!1;Fn.prototype.property="";Fn.prototype.spaceSeparated=!1;Fn.prototype.space=void 0;let OB=0;const He=Rs(),Jt=Rs(),N5=Rs(),xe=Rs(),$t=Rs(),Uo=Rs(),Qn=Rs();function Rs(){return 2**++OB}const bw=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:Jt,commaOrSpaceSeparated:Qn,commaSeparated:Uo,number:xe,overloadedBoolean:N5,spaceSeparated:$t},Symbol.toStringTag,{value:"Module"})),e0=Object.keys(bw);class cS extends Fn{constructor(t,n,r,i){let a=-1;if(super(t,n),$T(this,"space",i),typeof r=="number")for(;++a<e0.length;){const o=e0[a];$T(this,e0[a],(r&bw[o])===bw[o])}}}cS.prototype.defined=!0;function $T(e,t,n){n&&(e[t]=n)}function pl(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new cS(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[yw(r)]=r,n[yw(a.attribute)]=r}return new kc(t,n,e.space)}const O5=pl({properties:{ariaActiveDescendant:null,ariaAtomic:Jt,ariaAutoComplete:null,ariaBusy:Jt,ariaChecked:Jt,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:$t,ariaCurrent:null,ariaDescribedBy:$t,ariaDetails:null,ariaDisabled:Jt,ariaDropEffect:$t,ariaErrorMessage:null,ariaExpanded:Jt,ariaFlowTo:$t,ariaGrabbed:Jt,ariaHasPopup:null,ariaHidden:Jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$t,ariaLevel:xe,ariaLive:null,ariaModal:Jt,ariaMultiLine:Jt,ariaMultiSelectable:Jt,ariaOrientation:null,ariaOwns:$t,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:Jt,ariaReadOnly:Jt,ariaRelevant:null,ariaRequired:Jt,ariaRoleDescription:$t,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:Jt,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function R5(e,t){return t in e?e[t]:t}function j5(e,t){return R5(e,t.toLowerCase())}const RB=pl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Uo,acceptCharset:$t,accessKey:$t,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:$t,autoFocus:He,autoPlay:He,blocking:$t,capture:null,charSet:null,checked:He,cite:null,className:$t,cols:xe,colSpan:null,content:null,contentEditable:Jt,controls:He,controlsList:$t,coords:xe|Uo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:N5,draggable:Jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:$t,height:xe,hidden:He,high:xe,href:null,hrefLang:null,htmlFor:$t,httpEquiv:$t,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:$t,itemRef:$t,itemScope:He,itemType:$t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:He,optimum:xe,pattern:null,ping:$t,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:$t,required:He,reversed:He,rows:xe,rowSpan:xe,sandbox:$t,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:Jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:Jt,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$t,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:Jt,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:j5}),jB=pl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Qn,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:$t,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Uo,g2:Uo,glyphName:Uo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:Qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:xe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qn,rev:Qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qn,requiredFeatures:Qn,requiredFonts:Qn,requiredFormats:Qn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:Qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qn,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:R5}),M5=pl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),$5=pl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:j5}),D5=pl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),MB={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$B=/[A-Z]/g,DT=/-[a-z]/g,DB=/^data[-\w.:]+$/i;function IB(e,t){const n=yw(t);let r=t,i=Fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&DB.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(DT,zB);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!DT.test(a)){let o=a.replace($B,PB);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=cS}return new i(r,t)}function PB(e){return"-"+e.toLowerCase()}function zB(e){return e.charAt(1).toUpperCase()}const LB=T5([O5,RB,M5,$5,D5],"html"),fS=T5([O5,jB,M5,$5,D5],"svg");function qB(e){return e.join(" ").trim()}var Ro={},t0,IT;function FB(){if(IT)return t0;IT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
62
+ `,f="/",d="*",p="",m="comment",g="declaration";t0=function(S,b){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];b=b||{};var x=1,w=1;function v(B){var I=B.match(t);I&&(x+=I.length);var V=B.lastIndexOf(c);w=~V?B.length-V:w+B.length}function k(){var B={line:x,column:w};return function(I){return I.position=new C(B),j(),I}}function C(B){this.start=B,this.end={line:x,column:w},this.source=b.source}C.prototype.content=S;function T(B){var I=new Error(b.source+":"+x+":"+w+": "+B);if(I.reason=B,I.filename=b.source,I.line=x,I.column=w,I.source=S,!b.silent)throw I}function N(B){var I=B.exec(S);if(I){var V=I[0];return v(V),S=S.slice(V.length),I}}function j(){N(n)}function $(B){var I;for(B=B||[];I=M();)I!==!1&&B.push(I);return B}function M(){var B=k();if(!(f!=S.charAt(0)||d!=S.charAt(1))){for(var I=2;p!=S.charAt(I)&&(d!=S.charAt(I)||f!=S.charAt(I+1));)++I;if(I+=2,p===S.charAt(I-1))return T("End of comment missing");var V=S.slice(2,I-2);return w+=2,v(V),S=S.slice(I),w+=2,B({type:m,comment:V})}}function q(){var B=k(),I=N(r);if(I){if(M(),!N(i))return T("property missing ':'");var V=N(a),H=B({type:g,property:_(I[0].replace(e,p)),value:V?_(V[0].replace(e,p)):p});return N(o),H}}function F(){var B=[];$(B);for(var I;I=q();)I!==!1&&(B.push(I),$(B));return B}return j(),F()};function _(S){return S?S.replace(l,p):p}return t0}var PT;function BB(){if(PT)return Ro;PT=1;var e=Ro&&Ro.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.default=n;var t=e(FB());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var o=(0,t.default)(r),l=typeof i=="function";return o.forEach(function(c){if(c.type==="declaration"){var f=c.property,d=c.value;l?i(f,d,c):d&&(a=a||{},a[f]=d)}}),a}return Ro}var wu={},zT;function UB(){if(zT)return wu;zT=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},o=function(f,d){return d.toUpperCase()},l=function(f,d){return"".concat(d,"-")},c=function(f,d){return d===void 0&&(d={}),a(f)?f:(f=f.toLowerCase(),d.reactCompat?f=f.replace(i,l):f=f.replace(r,l),f.replace(t,o))};return wu.camelCase=c,wu}var Su,LT;function HB(){if(LT)return Su;LT=1;var e=Su&&Su.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(BB()),n=UB();function r(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(o[(0,n.camelCase)(l,a)]=c)}),o}return r.default=r,Su=r,Su}var VB=HB();const GB=qn(VB),I5=P5("end"),dS=P5("start");function P5(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ZB(e){const t=dS(e),n=I5(e);if(t&&n)return{start:t,end:n}}function Hu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?qT(e.position):"start"in e||"end"in e?qT(e):"line"in e||"column"in e?vw(e):""}function vw(e){return FT(e&&e.line)+":"+FT(e&&e.column)}function qT(e){return vw(e&&e.start)+"-"+vw(e&&e.end)}function FT(e){return e&&typeof e=="number"?e:1}class xn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=Hu(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}xn.prototype.file="";xn.prototype.name="";xn.prototype.reason="";xn.prototype.message="";xn.prototype.stack="";xn.prototype.column=void 0;xn.prototype.line=void 0;xn.prototype.ancestors=void 0;xn.prototype.cause=void 0;xn.prototype.fatal=void 0;xn.prototype.place=void 0;xn.prototype.ruleId=void 0;xn.prototype.source=void 0;const hS={}.hasOwnProperty,YB=new Map,KB=/[A-Z]/g,XB=new Set(["table","tbody","thead","tfoot","tr"]),WB=new Set(["td","th"]),z5="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function QB(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=sU(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=aU(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?fS:LB,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=L5(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function L5(e,t,n){if(t.type==="element")return JB(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return eU(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nU(e,t,n);if(t.type==="mdxjsEsm")return tU(e,t);if(t.type==="root")return rU(e,t,n);if(t.type==="text")return iU(e,t)}function JB(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=fS,e.schema=i),e.ancestors.push(t);const a=F5(e,t.tagName,!1),o=oU(e,t);let l=mS(e,t);return XB.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!NB(c):!0})),q5(e,o,a,t),pS(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function eU(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}rc(e,t.position)}function tU(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rc(e,t.position)}function nU(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=fS,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:F5(e,t.name,!0),o=lU(e,t),l=mS(e,t);return q5(e,o,a,t),pS(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function rU(e,t,n){const r={};return pS(r,mS(e,t)),e.create(t,e.Fragment,r,n)}function iU(e,t){return t.value}function q5(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pS(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function aU(e,t,n){return r;function r(i,a,o,l){const f=Array.isArray(o.children)?n:t;return l?f(a,o,l):f(a,o)}}function sU(e,t){return n;function n(r,i,a,o){const l=Array.isArray(a.children),c=dS(r);return t(i,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function oU(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&hS.call(t.properties,i)){const a=uU(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&WB.has(t.tagName)?r=l:n[o]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function lU(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else rc(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else rc(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function mS(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:YB;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const f=i.get(c)||0;o=c+"-"+f,i.set(c,f+1)}}const l=L5(e,a,o);l!==void 0&&n.push(l)}return n}function uU(e,t,n){const r=IB(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?EB(n):qB(n)),r.property==="style"){let i=typeof n=="object"?n:cU(e,String(n));return e.stylePropertyNameCase==="css"&&(i=fU(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?MB[r.property]||r.property:r.attribute,n]}}function cU(e,t){try{return GB(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new xn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=z5+"#cannot-parse-style-attribute",i}}function F5(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=jT(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=o}else r=jT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return hS.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rc(e)}function rc(e,t){const n=new xn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=z5+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fU(e){const t={};let n;for(n in e)hS.call(e,n)&&(t[dU(n)]=e[n]);return t}function dU(e){let t=e.replace(KB,hU);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hU(e){return"-"+e.toLowerCase()}const n0={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},pU={};function gS(e,t){const n=pU,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return B5(e,r,i)}function B5(e,t,n){if(mU(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return BT(e.children,t,n)}return Array.isArray(e)?BT(e,t,n):""}function BT(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=B5(e[i],t,n);return r.join("")}function mU(e){return!!(e&&typeof e=="object")}const UT=document.createElement("i");function yS(e){const t="&"+e+";";UT.innerHTML=t;const n=UT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ar(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function yr(e,t){return e.length>0?(ar(e,e.length,0,t),e):t}const HT={}.hasOwnProperty;function U5(e){const t={};let n=-1;for(;++n<e.length;)gU(t,e[n]);return t}function gU(e,t){let n;for(n in t){const i=(HT.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){HT.call(i,o)||(i[o]=[]);const l=a[o];yU(i[o],Array.isArray(l)?l:l?[l]:[])}}}function yU(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ar(e,0,0,r)}function H5(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Dr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=La(/[A-Za-z]/),_n=La(/[\dA-Za-z]/),bU=La(/[#-'*+\--9=?A-Z^-~]/);function Gh(e){return e!==null&&(e<32||e===127)}const _w=La(/\d/),vU=La(/[\dA-Fa-f]/),_U=La(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function Rt(e){return e!==null&&(e<0||e===32)}function nt(e){return e===-2||e===-1||e===32}const wp=La(new RegExp("\\p{P}|\\p{S}","u")),ks=La(/\s/);function La(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ml(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&_n(e.charCodeAt(n+1))&&_n(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function st(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return nt(c)?(e.enter(n),l(c)):t(c)}function l(c){return nt(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}const xU={tokenize:wU};function wU(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),st(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return De(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const SU={tokenize:EU},VT={tokenize:kU};function EU(e){const t=this,n=[];let r=0,i,a,o;return l;function l(v){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,c,f)(v)}return f(v)}function c(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&w();const k=t.events.length;let C=k,T;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){T=t.events[C][1].end;break}x(r);let N=k;for(;N<t.events.length;)t.events[N][1].end={...T},N++;return ar(t.events,C+1,0,t.events.slice(k)),t.events.length=N,f(v)}return l(v)}function f(v){if(r===n.length){if(!i)return m(v);if(i.currentConstruct&&i.currentConstruct.concrete)return _(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(VT,d,p)(v)}function d(v){return i&&w(),x(r),m(v)}function p(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,_(v)}function m(v){return t.containerState={},e.attempt(VT,g,_)(v)}function g(v){return r++,n.push([t.currentConstruct,t.containerState]),m(v)}function _(v){if(v===null){i&&w(),x(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),S(v)}function S(v){if(v===null){b(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return De(v)?(e.consume(v),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(v),S)}function b(v,k){const C=t.sliceStream(v);if(k&&C.push(null),v.previous=a,a&&(a.next=v),a=v,i.defineSkip(v.start),i.write(C),t.parser.lazy[v.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<o&&(!i.events[T][1].end||i.events[T][1].end.offset>o))return;const N=t.events.length;let j=N,$,M;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if($){M=t.events[j][1].end;break}$=!0}for(x(r),T=N;T<t.events.length;)t.events[T][1].end={...M},T++;ar(t.events,j+1,0,t.events.slice(N)),t.events.length=T}}function x(v){let k=n.length;for(;k-- >v;){const C=n[k];t.containerState=C[1],C[0].exit.call(t,e)}n.length=v}function w(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function kU(e,t,n){return st(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Jo(e){if(e===null||Rt(e)||ks(e))return 1;if(wp(e))return 2}function Sp(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const xw={name:"attention",resolveAll:CU,tokenize:AU};function CU(e,t){let n=-1,r,i,a,o,l,c,f,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},m={...e[n][1].start};GT(p,-c),GT(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=yr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=yr(f,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),f=yr(f,Sp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=yr(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,f=yr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ar(e,r-1,n-r+3,f),n=r+f.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function AU(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Jo(r);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const f=e.exit("attentionSequence"),d=Jo(c),p=!d||d===2&&i||n.includes(c),m=!i||i===2&&d||n.includes(r);return f._open=!!(a===42?p:p&&(i||!m)),f._close=!!(a===42?m:m&&(d||!p)),t(c)}}function GT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const TU={name:"autolink",tokenize:NU};function NU(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(g){return Nn(g)?(e.consume(g),o):g===64?n(g):f(g)}function o(g){return g===43||g===45||g===46||_n(g)?(r=1,l(g)):f(g)}function l(g){return g===58?(e.consume(g),r=0,c):(g===43||g===45||g===46||_n(g))&&r++<32?(e.consume(g),l):(r=0,f(g))}function c(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||Gh(g)?n(g):(e.consume(g),c)}function f(g){return g===64?(e.consume(g),d):bU(g)?(e.consume(g),f):n(g)}function d(g){return _n(g)?p(g):n(g)}function p(g){return g===46?(e.consume(g),r=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):m(g)}function m(g){if((g===45||_n(g))&&r++<63){const _=g===45?m:p;return e.consume(g),_}return n(g)}}const Cc={partial:!0,tokenize:OU};function OU(e,t,n){return r;function r(a){return nt(a)?st(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||De(a)?t(a):n(a)}}const V5={continuation:{tokenize:jU},exit:MU,name:"blockQuote",tokenize:RU};function RU(e,t,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return nt(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function jU(e,t,n){const r=this;return i;function i(o){return nt(o)?st(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(V5,t,n)(o)}}function MU(e){e.exit("blockQuote")}const G5={name:"characterEscape",tokenize:$U};function $U(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return _U(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Z5={name:"characterReference",tokenize:DU};function DU(e,t,n){const r=this;let i=0,a,o;return l;function l(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,o=_n,d(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=vU,d):(e.enter("characterReferenceValue"),a=7,o=_w,d(p))}function d(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return o===_n&&!yS(r.sliceSerialize(m))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(p)&&i++<a?(e.consume(p),d):n(p)}}const ZT={partial:!0,tokenize:PU},YT={concrete:!0,name:"codeFenced",tokenize:IU};function IU(e,t,n){const r=this,i={partial:!0,tokenize:C};let a=0,o=0,l;return c;function c(T){return f(T)}function f(T){const N=r.events[r.events.length-1];return a=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,l=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(T)}function d(T){return T===l?(o++,e.consume(T),d):o<3?n(T):(e.exit("codeFencedFenceSequence"),nt(T)?st(e,p,"whitespace")(T):p(T))}function p(T){return T===null||De(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(ZT,S,k)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===null||De(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(T)):nt(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),st(e,g,"whitespace")(T)):T===96&&T===l?n(T):(e.consume(T),m)}function g(T){return T===null||De(T)?p(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(T))}function _(T){return T===null||De(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(T)):T===96&&T===l?n(T):(e.consume(T),_)}function S(T){return e.attempt(i,k,b)(T)}function b(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),x}function x(T){return a>0&&nt(T)?st(e,w,"linePrefix",a+1)(T):w(T)}function w(T){return T===null||De(T)?e.check(ZT,S,k)(T):(e.enter("codeFlowValue"),v(T))}function v(T){return T===null||De(T)?(e.exit("codeFlowValue"),w(T)):(e.consume(T),v)}function k(T){return e.exit("codeFenced"),t(T)}function C(T,N,j){let $=0;return M;function M(V){return T.enter("lineEnding"),T.consume(V),T.exit("lineEnding"),q}function q(V){return T.enter("codeFencedFence"),nt(V)?st(T,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):F(V)}function F(V){return V===l?(T.enter("codeFencedFenceSequence"),B(V)):j(V)}function B(V){return V===l?($++,T.consume(V),B):$>=o?(T.exit("codeFencedFenceSequence"),nt(V)?st(T,I,"whitespace")(V):I(V)):j(V)}function I(V){return V===null||De(V)?(T.exit("codeFencedFence"),N(V)):j(V)}}}function PU(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const r0={name:"codeIndented",tokenize:LU},zU={partial:!0,tokenize:qU};function LU(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),st(e,a,"linePrefix",5)(f)}function a(f){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(f):n(f)}function o(f){return f===null?c(f):De(f)?e.attempt(zU,o,c)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||De(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),l)}function c(f){return e.exit("codeIndented"),t(f)}}function qU(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):st(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):De(o)?i(o):n(o)}}const FU={name:"codeText",previous:UU,resolve:BU,tokenize:HU};function BU(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function UU(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function HU(e,t,n){let r=0,i,a;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),l(p)}function l(p){return p===96?(e.consume(p),r++,l):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(a=e.enter("codeTextSequence"),i=0,d(p)):De(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||De(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),f)}function d(p){return p===96?(e.consume(p),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",f(p))}}class VU{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Eu(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Eu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Eu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Eu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Eu(this.left,n.reverse())}}}function Eu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Y5(e){const t={};let n=-1,r,i,a,o,l,c,f;const d=new VU(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,GU(d,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=d.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},l=d.slice(i,n),l.unshift(r),d.splice(i,n-i+1,l))}}return ar(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!f}function GU(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],f={};let d,p,m=-1,g=n,_=0,S=0;const b=[S];for(;g;){for(;e.get(++i)[1]!==g;);a.push(i),g._tokenizer||(d=r.sliceStream(g),g.next||d.push(null),p&&o.defineSkip(g.start),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=n;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(S=m+1,b.push(S),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(o.events=[],g?(g._tokenizer=void 0,g.previous=void 0):b.pop(),m=b.length;m--;){const x=l.slice(b[m],b[m+1]),w=a.pop();c.push([w,w+x.length-1]),e.splice(w,2,x)}for(c.reverse(),m=-1;++m<c.length;)f[_+c[m][0]]=_+c[m][1],_+=c[m][1]-c[m][0]-1;return f}const ZU={resolve:KU,tokenize:XU},YU={partial:!0,tokenize:WU};function KU(e){return Y5(e),e}function XU(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):De(l)?e.check(YU,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function WU(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),st(e,a,"linePrefix")}function a(o){if(o===null||De(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function K5(e,t,n,r,i,a,o,l,c){const f=c||Number.POSITIVE_INFINITY;let d=0;return p;function p(x){return x===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(x),e.exit(a),m):x===null||x===32||x===41||Gh(x)?n(x):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),S(x))}function m(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===62?(e.exit("chunkString"),e.exit(l),m(x)):x===null||x===60||De(x)?n(x):(e.consume(x),x===92?_:g)}function _(x){return x===60||x===62||x===92?(e.consume(x),g):g(x)}function S(x){return!d&&(x===null||x===41||Rt(x))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(x)):d<f&&x===40?(e.consume(x),d++,S):x===41?(e.consume(x),d--,S):x===null||x===32||x===40||Gh(x)?n(x):(e.consume(x),x===92?b:S)}function b(x){return x===40||x===41||x===92?(e.consume(x),S):S(x)}}function X5(e,t,n,r,i,a){const o=this;let l=0,c;return f;function f(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(a),d}function d(g){return l>999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(g):g===93?(e.exit(a),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):De(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||De(g)||l++>999?(e.exit("chunkString"),d(g)):(e.consume(g),c||(c=!nt(g)),g===92?m:p)}function m(g){return g===91||g===92||g===93?(e.consume(g),l++,p):p(g)}}function W5(e,t,n,r,i,a){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,c):n(m)}function c(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(a),f(m))}function f(m){return m===o?(e.exit(a),c(o)):m===null?n(m):De(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),st(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===o||m===null||De(m)?(e.exit("chunkString"),f(m)):(e.consume(m),m===92?p:d)}function p(m){return m===o||m===92?(e.consume(m),d):d(m)}}function Vu(e,t){let n;return r;function r(i){return De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):nt(i)?st(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const QU={name:"definition",tokenize:eH},JU={partial:!0,tokenize:tH};function eH(e,t,n){const r=this;let i;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return X5.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return i=Dr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):n(g)}function c(g){return Rt(g)?Vu(e,f)(g):f(g)}function f(g){return K5(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(JU,p,p)(g)}function p(g){return nt(g)?st(e,m,"whitespace")(g):m(g)}function m(g){return g===null||De(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function tH(e,t,n){return r;function r(l){return Rt(l)?Vu(e,i)(l):n(l)}function i(l){return W5(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return nt(l)?st(e,o,"whitespace")(l):o(l)}function o(l){return l===null||De(l)?t(l):n(l)}}const nH={name:"hardBreakEscape",tokenize:rH};function rH(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const iH={name:"headingAtx",resolve:aH,tokenize:sH};function aH(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ar(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function sH(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||Rt(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||De(d)?(e.exit("atxHeading"),t(d)):nt(d)?st(e,l,"whitespace")(d):(e.enter("atxHeadingText"),f(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function f(d){return d===null||d===35||Rt(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),f)}}const oH=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],KT=["pre","script","style","textarea"],lH={concrete:!0,name:"htmlFlow",resolveTo:fH,tokenize:dH},uH={partial:!0,tokenize:pH},cH={partial:!0,tokenize:hH};function fH(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function dH(e,t,n){const r=this;let i,a,o,l,c;return f;function f(R){return d(R)}function d(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),m):R===47?(e.consume(R),a=!0,S):R===63?(e.consume(R),i=3,r.interrupt?t:L):Nn(R)?(e.consume(R),o=String.fromCharCode(R),b):n(R)}function m(R){return R===45?(e.consume(R),i=2,g):R===91?(e.consume(R),i=5,l=0,_):Nn(R)?(e.consume(R),i=4,r.interrupt?t:L):n(R)}function g(R){return R===45?(e.consume(R),r.interrupt?t:L):n(R)}function _(R){const D="CDATA[";return R===D.charCodeAt(l++)?(e.consume(R),l===D.length?r.interrupt?t:F:_):n(R)}function S(R){return Nn(R)?(e.consume(R),o=String.fromCharCode(R),b):n(R)}function b(R){if(R===null||R===47||R===62||Rt(R)){const D=R===47,U=o.toLowerCase();return!D&&!a&&KT.includes(U)?(i=1,r.interrupt?t(R):F(R)):oH.includes(o.toLowerCase())?(i=6,D?(e.consume(R),x):r.interrupt?t(R):F(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):a?w(R):v(R))}return R===45||_n(R)?(e.consume(R),o+=String.fromCharCode(R),b):n(R)}function x(R){return R===62?(e.consume(R),r.interrupt?t:F):n(R)}function w(R){return nt(R)?(e.consume(R),w):M(R)}function v(R){return R===47?(e.consume(R),M):R===58||R===95||Nn(R)?(e.consume(R),k):nt(R)?(e.consume(R),v):M(R)}function k(R){return R===45||R===46||R===58||R===95||_n(R)?(e.consume(R),k):C(R)}function C(R){return R===61?(e.consume(R),T):nt(R)?(e.consume(R),C):v(R)}function T(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),c=R,N):nt(R)?(e.consume(R),T):j(R)}function N(R){return R===c?(e.consume(R),c=null,$):R===null||De(R)?n(R):(e.consume(R),N)}function j(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Rt(R)?C(R):(e.consume(R),j)}function $(R){return R===47||R===62||nt(R)?v(R):n(R)}function M(R){return R===62?(e.consume(R),q):n(R)}function q(R){return R===null||De(R)?F(R):nt(R)?(e.consume(R),q):n(R)}function F(R){return R===45&&i===2?(e.consume(R),H):R===60&&i===1?(e.consume(R),G):R===62&&i===4?(e.consume(R),P):R===63&&i===3?(e.consume(R),L):R===93&&i===5?(e.consume(R),W):De(R)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(uH,Z,B)(R)):R===null||De(R)?(e.exit("htmlFlowData"),B(R)):(e.consume(R),F)}function B(R){return e.check(cH,I,Z)(R)}function I(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),V}function V(R){return R===null||De(R)?B(R):(e.enter("htmlFlowData"),F(R))}function H(R){return R===45?(e.consume(R),L):F(R)}function G(R){return R===47?(e.consume(R),o="",X):F(R)}function X(R){if(R===62){const D=o.toLowerCase();return KT.includes(D)?(e.consume(R),P):F(R)}return Nn(R)&&o.length<8?(e.consume(R),o+=String.fromCharCode(R),X):F(R)}function W(R){return R===93?(e.consume(R),L):F(R)}function L(R){return R===62?(e.consume(R),P):R===45&&i===2?(e.consume(R),L):F(R)}function P(R){return R===null||De(R)?(e.exit("htmlFlowData"),Z(R)):(e.consume(R),P)}function Z(R){return e.exit("htmlFlow"),t(R)}}function hH(e,t,n){const r=this;return i;function i(o){return De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function pH(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Cc,t,n)}}const mH={name:"htmlText",tokenize:gH};function gH(e,t,n){const r=this;let i,a,o;return l;function l(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),f):L===47?(e.consume(L),C):L===63?(e.consume(L),v):Nn(L)?(e.consume(L),j):n(L)}function f(L){return L===45?(e.consume(L),d):L===91?(e.consume(L),a=0,_):Nn(L)?(e.consume(L),w):n(L)}function d(L){return L===45?(e.consume(L),g):n(L)}function p(L){return L===null?n(L):L===45?(e.consume(L),m):De(L)?(o=p,G(L)):(e.consume(L),p)}function m(L){return L===45?(e.consume(L),g):p(L)}function g(L){return L===62?H(L):L===45?m(L):p(L)}function _(L){const P="CDATA[";return L===P.charCodeAt(a++)?(e.consume(L),a===P.length?S:_):n(L)}function S(L){return L===null?n(L):L===93?(e.consume(L),b):De(L)?(o=S,G(L)):(e.consume(L),S)}function b(L){return L===93?(e.consume(L),x):S(L)}function x(L){return L===62?H(L):L===93?(e.consume(L),x):S(L)}function w(L){return L===null||L===62?H(L):De(L)?(o=w,G(L)):(e.consume(L),w)}function v(L){return L===null?n(L):L===63?(e.consume(L),k):De(L)?(o=v,G(L)):(e.consume(L),v)}function k(L){return L===62?H(L):v(L)}function C(L){return Nn(L)?(e.consume(L),T):n(L)}function T(L){return L===45||_n(L)?(e.consume(L),T):N(L)}function N(L){return De(L)?(o=N,G(L)):nt(L)?(e.consume(L),N):H(L)}function j(L){return L===45||_n(L)?(e.consume(L),j):L===47||L===62||Rt(L)?$(L):n(L)}function $(L){return L===47?(e.consume(L),H):L===58||L===95||Nn(L)?(e.consume(L),M):De(L)?(o=$,G(L)):nt(L)?(e.consume(L),$):H(L)}function M(L){return L===45||L===46||L===58||L===95||_n(L)?(e.consume(L),M):q(L)}function q(L){return L===61?(e.consume(L),F):De(L)?(o=q,G(L)):nt(L)?(e.consume(L),q):$(L)}function F(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),i=L,B):De(L)?(o=F,G(L)):nt(L)?(e.consume(L),F):(e.consume(L),I)}function B(L){return L===i?(e.consume(L),i=void 0,V):L===null?n(L):De(L)?(o=B,G(L)):(e.consume(L),B)}function I(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Rt(L)?$(L):(e.consume(L),I)}function V(L){return L===47||L===62||Rt(L)?$(L):n(L)}function H(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function G(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),X}function X(L){return nt(L)?st(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):W(L)}function W(L){return e.enter("htmlTextData"),o(L)}}const bS={name:"labelEnd",resolveAll:_H,resolveTo:xH,tokenize:wH},yH={tokenize:SH},bH={tokenize:EH},vH={tokenize:kH};function _H(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ar(e,0,e.length,n),e}function xH(e,t){let n=e.length,r=0,i,a,o,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",f,t]],l=yr(l,e.slice(a+1,a+r+3)),l=yr(l,[["enter",d,t]]),l=yr(l,Sp(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),l=yr(l,[["exit",d,t],e[o-2],e[o-1],["exit",f,t]]),l=yr(l,e.slice(o+1)),l=yr(l,[["exit",c,t]]),ar(e,a,e.length,l),e}function wH(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(m){return a?a._inactive?p(m):(o=r.parser.defined.includes(Dr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(yH,d,o?d:p)(m):m===91?e.attempt(bH,d,o?f:p)(m):o?d(m):p(m)}function f(m){return e.attempt(vH,d,p)(m)}function d(m){return t(m)}function p(m){return a._balanced=!0,n(m)}}function SH(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return Rt(p)?Vu(e,a)(p):a(p)}function a(p){return p===41?d(p):K5(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return Rt(p)?Vu(e,c)(p):d(p)}function l(p){return n(p)}function c(p){return p===34||p===39||p===40?W5(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function f(p){return Rt(p)?Vu(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function EH(e,t,n){const r=this;return i;function i(l){return X5.call(r,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Dr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function kH(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const CH={name:"labelStartImage",resolveAll:bS.resolveAll,tokenize:AH};function AH(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const TH={name:"labelStartLink",resolveAll:bS.resolveAll,tokenize:NH};function NH(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const i0={name:"lineEnding",tokenize:OH};function OH(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),st(e,t,"linePrefix")}}const Ah={name:"thematicBreak",tokenize:RH};function RH(e,t,n){let r=0,i;return a;function a(f){return e.enter("thematicBreak"),o(f)}function o(f){return i=f,l(f)}function l(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||De(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),nt(f)?st(e,l,"whitespace")(f):l(f))}}const zn={continuation:{tokenize:DH},exit:PH,name:"list",tokenize:$H},jH={partial:!0,tokenize:zH},MH={partial:!0,tokenize:IH};function $H(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(g){const _=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:_w(g)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Ah,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return _w(g)&&++o<10?(e.consume(g),c):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Cc,r.interrupt?n:d,e.attempt(jH,m,p))}function d(g){return r.containerState.initialBlankLine=!0,a++,m(g)}function p(g){return nt(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):n(g)}function m(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function DH(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Cc,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,st(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!nt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(MH,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,st(e,e.attempt(zn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function IH(e,t,n){const r=this;return st(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function PH(e){e.exit(this.containerState.type)}function zH(e,t,n){const r=this;return st(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!nt(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const XT={name:"setextUnderline",resolveTo:LH,tokenize:qH};function LH(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function qH(e,t,n){const r=this;let i;return a;function a(f){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=f,o(f)):n(f)}function o(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===i?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),nt(f)?st(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||De(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const FH={tokenize:BH};function BH(e){const t=this,n=e.attempt(Cc,r,e.attempt(this.parser.constructs.flowInitial,i,st(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ZU,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const UH={resolveAll:J5()},HH=Q5("string"),VH=Q5("text");function Q5(e){return{resolveAll:J5(e==="text"?GH:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(d){return f(d)?a(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return f(d)?(n.exit("data"),a(d)):(n.consume(d),c)}function f(d){if(d===null)return!0;const p=i[d];let m=-1;if(p)for(;++m<p.length;){const g=p[m];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function J5(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function GH(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,l=0,c;for(;a--;){const f=i[a];if(typeof f=="string"){for(o=f.length;f.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(f===-2)c=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const ZH={42:zn,43:zn,45:zn,48:zn,49:zn,50:zn,51:zn,52:zn,53:zn,54:zn,55:zn,56:zn,57:zn,62:V5},YH={91:QU},KH={[-2]:r0,[-1]:r0,32:r0},XH={35:iH,42:Ah,45:[XT,Ah],60:lH,61:XT,95:Ah,96:YT,126:YT},WH={38:Z5,92:G5},QH={[-5]:i0,[-4]:i0,[-3]:i0,33:CH,38:Z5,42:xw,60:[TU,mH],91:TH,92:[nH,G5],93:bS,95:xw,96:FU},JH={null:[xw,UH]},eV={null:[42,95]},tV={null:[]},nV=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eV,contentInitial:YH,disable:tV,document:ZH,flow:XH,flowInitial:KH,insideSpan:JH,string:WH,text:QH},Symbol.toStringTag,{value:"Module"}));function rV(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],l=[];const c={attempt:N(C),check:N(T),consume:w,enter:v,exit:k,interrupt:N(T,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:m,sliceStream:g,write:p};let d=t.tokenize.call(f,c);return t.resolveAll&&a.push(t),f;function p(q){return o=yr(o,q),b(),o[o.length-1]!==null?[]:(j(t,0),f.events=Sp(a,f.events,f),f.events)}function m(q,F){return aV(g(q),F)}function g(q){return iV(o,q)}function _(){const{_bufferIndex:q,_index:F,line:B,column:I,offset:V}=r;return{_bufferIndex:q,_index:F,line:B,column:I,offset:V}}function S(q){i[q.line]=q.column,M()}function b(){let q;for(;r._index<o.length;){const F=o[r._index];if(typeof F=="string")for(q=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===q&&r._bufferIndex<F.length;)x(F.charCodeAt(r._bufferIndex));else x(F)}}function x(q){d=d(q)}function w(q){De(q)?(r.line++,r.column=1,r.offset+=q===-3?2:1,M()):q!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=q}function v(q,F){const B=F||{};return B.type=q,B.start=_(),f.events.push(["enter",B,f]),l.push(B),B}function k(q){const F=l.pop();return F.end=_(),f.events.push(["exit",F,f]),F}function C(q,F){j(q,F.from)}function T(q,F){F.restore()}function N(q,F){return B;function B(I,V,H){let G,X,W,L;return Array.isArray(I)?Z(I):"tokenize"in I?Z([I]):P(I);function P(Y){return ne;function ne(ae){const re=ae!==null&&Y[ae],de=ae!==null&&Y.null,Q=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(de)?de:de?[de]:[]];return Z(Q)(ae)}}function Z(Y){return G=Y,X=0,Y.length===0?H:R(Y[X])}function R(Y){return ne;function ne(ae){return L=$(),W=Y,Y.partial||(f.currentConstruct=Y),Y.name&&f.parser.constructs.disable.null.includes(Y.name)?U():Y.tokenize.call(F?Object.assign(Object.create(f),F):f,c,D,U)(ae)}}function D(Y){return q(W,L),V}function U(Y){return L.restore(),++X<G.length?R(G[X]):H}}}function j(q,F){q.resolveAll&&!a.includes(q)&&a.push(q),q.resolve&&ar(f.events,F,f.events.length-F,q.resolve(f.events.slice(F),f)),q.resolveTo&&(f.events=q.resolveTo(f.events,f))}function $(){const q=_(),F=f.previous,B=f.currentConstruct,I=f.events.length,V=Array.from(l);return{from:I,restore:H};function H(){r=q,f.previous=F,f.currentConstruct=B,f.events.length=I,l=V,M()}}function M(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function iV(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function aV(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
63
+ `;break}case-3:{o=`\r
64
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function sV(e){const r={constructs:U5([nV,...(e||{}).extensions||[]]),content:i(xU),defined:[],document:i(SU),flow:i(FH),lazy:{},string:i(HH),text:i(VH)};return r;function i(a){return o;function o(l){return rV(r,a,l)}}}function oV(e){for(;!Y5(e););return e}const WT=/[\0\t\n\r]/g;function lV(){let e=1,t="",n=!0,r;return i;function i(a,o,l){const c=[];let f,d,p,m,g;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if(WT.lastIndex=p,f=WT.exec(a),m=f&&f.index!==void 0?f.index:a.length,g=a.charCodeAt(m),!f){t=a.slice(p);break}if(g===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(a.slice(p,m)),e+=m-p),g){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=m+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const uV=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cV(e){return e.replace(uV,fV)}function fV(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return H5(n.slice(a?2:1),a?16:10)}return yS(n)||e}const eI={}.hasOwnProperty;function dV(e,t,n){return typeof t!="string"&&(n=t,t=void 0),hV(n)(oV(sV(n).document().write(lV()(e,t,!0))))}function hV(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Le),autolinkProtocol:$,autolinkEmail:$,atxHeading:a(me),blockQuote:a(de),characterEscape:$,characterReference:$,codeFenced:a(Q),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Q,o),codeText:a(J,o),codeTextData:$,data:$,codeFlowValue:$,definition:a(oe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(fe),hardBreakEscape:a(we),hardBreakTrailing:a(we),htmlFlow:a(ke,o),htmlFlowData:$,htmlText:a(ke,o),htmlTextData:$,image:a(Ze),label:o,link:a(Le),listItem:a(Ve),listItemValue:m,listOrdered:a(Ye,p),listUnordered:a(Ye),paragraph:a($e),reference:R,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(qe),thematicBreak:a(Tt)},exit:{atxHeading:c(),atxHeadingSequence:C,autolink:c(),autolinkEmail:re,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:Y,characterReference:ne,codeFenced:c(b),codeFencedFence:S,codeFencedFenceInfo:g,codeFencedFenceMeta:_,codeFlowValue:M,codeIndented:c(x),codeText:c(V),codeTextData:M,data:M,definition:c(),definitionDestinationString:k,definitionLabelString:w,definitionTitleString:v,emphasis:c(),hardBreakEscape:c(F),hardBreakTrailing:c(F),htmlFlow:c(B),htmlFlowData:M,htmlText:c(I),htmlTextData:M,image:c(G),label:W,labelText:X,lineEnding:q,link:c(H),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:D,resourceDestinationString:L,resourceTitleString:P,resource:Z,setextHeading:c(j),setextHeadingLineSequence:N,setextHeadingText:T,strong:c(),thematicBreak:c()}};tI(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(pe){let _e={type:"root",children:[]};const Te={stack:[_e],tokenStack:[],config:t,enter:l,exit:f,buffer:o,resume:d,data:n},ze=[];let Je=-1;for(;++Je<pe.length;)if(pe[Je][1].type==="listOrdered"||pe[Je][1].type==="listUnordered")if(pe[Je][0]==="enter")ze.push(Je);else{const un=ze.pop();Je=i(pe,un,Je)}for(Je=-1;++Je<pe.length;){const un=t[pe[Je][0]];eI.call(un,pe[Je][1].type)&&un[pe[Je][1].type].call(Object.assign({sliceSerialize:pe[Je][2].sliceSerialize},Te),pe[Je][1])}if(Te.tokenStack.length>0){const un=Te.tokenStack[Te.tokenStack.length-1];(un[1]||QT).call(Te,void 0,un[0])}for(_e.position={start:xa(pe.length>0?pe[0][1].start:{line:1,column:1,offset:0}),end:xa(pe.length>0?pe[pe.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)_e=t.transforms[Je](_e)||_e;return _e}function i(pe,_e,Te){let ze=_e-1,Je=-1,un=!1,On,jt,vt,bn;for(;++ze<=Te;){const _t=pe[ze];switch(_t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_t[0]==="enter"?Je++:Je--,bn=void 0;break}case"lineEndingBlank":{_t[0]==="enter"&&(On&&!bn&&!Je&&!vt&&(vt=ze),bn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bn=void 0}if(!Je&&_t[0]==="enter"&&_t[1].type==="listItemPrefix"||Je===-1&&_t[0]==="exit"&&(_t[1].type==="listUnordered"||_t[1].type==="listOrdered")){if(On){let qr=ze;for(jt=void 0;qr--;){const Bn=pe[qr];if(Bn[1].type==="lineEnding"||Bn[1].type==="lineEndingBlank"){if(Bn[0]==="exit")continue;jt&&(pe[jt][1].type="lineEndingBlank",un=!0),Bn[1].type="lineEnding",jt=qr}else if(!(Bn[1].type==="linePrefix"||Bn[1].type==="blockQuotePrefix"||Bn[1].type==="blockQuotePrefixWhitespace"||Bn[1].type==="blockQuoteMarker"||Bn[1].type==="listItemIndent"))break}vt&&(!jt||vt<jt)&&(On._spread=!0),On.end=Object.assign({},jt?pe[jt][1].start:_t[1].end),pe.splice(jt||ze,0,["exit",On,_t[2]]),ze++,Te++}if(_t[1].type==="listItemPrefix"){const qr={type:"listItem",_spread:!1,start:Object.assign({},_t[1].start),end:void 0};On=qr,pe.splice(ze,0,["enter",qr,_t[2]]),ze++,Te++,vt=void 0,bn=!0}}}return pe[_e][1]._spread=un,Te}function a(pe,_e){return Te;function Te(ze){l.call(this,pe(ze),ze),_e&&_e.call(this,ze)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(pe,_e,Te){this.stack[this.stack.length-1].children.push(pe),this.stack.push(pe),this.tokenStack.push([_e,Te||void 0]),pe.position={start:xa(_e.start),end:void 0}}function c(pe){return _e;function _e(Te){pe&&pe.call(this,Te),f.call(this,Te)}}function f(pe,_e){const Te=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==pe.type&&(_e?_e.call(this,pe,ze[0]):(ze[1]||QT).call(this,pe,ze[0]));else throw new Error("Cannot close `"+pe.type+"` ("+Hu({start:pe.start,end:pe.end})+"): it’s not open");Te.position.end=xa(pe.end)}function d(){return gS(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(pe){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(pe),10),this.data.expectingFirstListItemValue=void 0}}function g(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=pe}function _(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=pe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe.replace(/(\r?\n|\r)$/g,"")}function w(pe){const _e=this.resume(),Te=this.stack[this.stack.length-1];Te.label=_e,Te.identifier=Dr(this.sliceSerialize(pe)).toLowerCase()}function v(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=pe}function k(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=pe}function C(pe){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Te=this.sliceSerialize(pe).length;_e.depth=Te}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function N(pe){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(pe).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function $(pe){const Te=this.stack[this.stack.length-1].children;let ze=Te[Te.length-1];(!ze||ze.type!=="text")&&(ze=We(),ze.position={start:xa(pe.start),end:void 0},Te.push(ze)),this.stack.push(ze)}function M(pe){const _e=this.stack.pop();_e.value+=this.sliceSerialize(pe),_e.position.end=xa(pe.end)}function q(pe){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=_e.children[_e.children.length-1];Te.position.end=xa(pe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&($.call(this,pe),M.call(this,pe))}function F(){this.data.atHardBreak=!0}function B(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe}function I(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe}function V(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe}function H(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=_e,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function G(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=_e,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function X(pe){const _e=this.sliceSerialize(pe),Te=this.stack[this.stack.length-2];Te.label=cV(_e),Te.identifier=Dr(_e).toLowerCase()}function W(){const pe=this.stack[this.stack.length-1],_e=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const ze=pe.children;Te.children=ze}else Te.alt=_e}function L(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=pe}function P(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=pe}function Z(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function D(pe){const _e=this.resume(),Te=this.stack[this.stack.length-1];Te.label=_e,Te.identifier=Dr(this.sliceSerialize(pe)).toLowerCase(),this.data.referenceType="full"}function U(pe){this.data.characterReferenceType=pe.type}function Y(pe){const _e=this.sliceSerialize(pe),Te=this.data.characterReferenceType;let ze;Te?(ze=H5(_e,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=yS(_e);const Je=this.stack[this.stack.length-1];Je.value+=ze}function ne(pe){const _e=this.stack.pop();_e.position.end=xa(pe.end)}function ae(pe){M.call(this,pe);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(pe)}function re(pe){M.call(this,pe);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(pe)}function de(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function J(){return{type:"inlineCode",value:""}}function oe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function we(){return{type:"break"}}function ke(){return{type:"html",value:""}}function Ze(){return{type:"image",title:null,url:"",alt:null}}function Le(){return{type:"link",title:null,url:"",children:[]}}function Ye(pe){return{type:"list",ordered:pe.type==="listOrdered",start:null,spread:pe._spread,children:[]}}function Ve(pe){return{type:"listItem",spread:pe._spread,checked:null,children:[]}}function $e(){return{type:"paragraph",children:[]}}function qe(){return{type:"strong",children:[]}}function We(){return{type:"text",value:""}}function Tt(){return{type:"thematicBreak"}}}function xa(e){return{line:e.line,column:e.column,offset:e.offset}}function tI(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?tI(e,r):pV(e,r)}}function pV(e,t){let n;for(n in t)if(eI.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function QT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Hu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Hu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Hu({start:t.start,end:t.end})+") is still open")}function mV(e){const t=this;t.parser=n;function n(r){return dV(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gV(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function yV(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
65
+ `}]}function bV(e,t){const n=t.value?t.value+`
66
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function vV(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _V(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xV(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ml(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,f),e.applyData(t,f)}function wV(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SV(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function nI(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function EV(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nI(e,t);const i={src:ml(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function kV(e,t){const n={src:ml(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function CV(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function AV(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nI(e,t);const i={href:ml(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function TV(e,t){const n={href:ml(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function NV(e,t,n){const r=e.all(t),i=n?OV(n):rI(t),a={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(i||l!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
67
+ `}),d.type==="element"&&d.tagName==="p"&&!i?o.push(...d.children):o.push(d)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
68
+ `});const f={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,f),e.applyData(t,f)}function OV(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=rI(n[r])}return t}function rI(e){const t=e.spread;return t??e.children.length>1}function RV(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function jV(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MV(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function $V(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DV(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=dS(t.children[1]),c=I5(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function IV(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const f=[];for(;++c<l;){const p=t.children[c],m={},g=o?o[c]:void 0;g&&(m.align=g);let _={type:"element",tagName:a,properties:m,children:[]};p&&(_.children=e.all(p),e.patch(p,_),_=e.applyData(p,_)),f.push(_)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,d),e.applyData(t,d)}function PV(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const JT=9,eN=32;function zV(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(tN(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(tN(t.slice(i),i>0,!1)),a.join("")}function tN(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===JT||a===eN;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===JT||a===eN;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function LV(e,t){const n={type:"text",value:zV(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function qV(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const FV={blockquote:gV,break:yV,code:bV,delete:vV,emphasis:_V,footnoteReference:xV,heading:wV,html:SV,imageReference:EV,image:kV,inlineCode:CV,linkReference:AV,link:TV,listItem:NV,list:RV,paragraph:jV,root:MV,strong:$V,table:DV,tableCell:PV,tableRow:IV,text:LV,thematicBreak:qV,toml:xd,yaml:xd,definition:xd,footnoteDefinition:xd};function xd(){}const iI=-1,Ep=0,Gu=1,Zh=2,vS=3,_S=4,xS=5,wS=6,aI=7,sI=8,nN=typeof self=="object"?self:globalThis,BV=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Ep:case iI:return n(o,i);case Gu:{const l=n([],i);for(const c of o)l.push(r(c));return l}case Zh:{const l=n({},i);for(const[c,f]of o)l[r(c)]=r(f);return l}case vS:return n(new Date(o),i);case _S:{const{source:l,flags:c}=o;return n(new RegExp(l,c),i)}case xS:{const l=n(new Map,i);for(const[c,f]of o)l.set(r(c),r(f));return l}case wS:{const l=n(new Set,i);for(const c of o)l.add(r(c));return l}case aI:{const{name:l,message:c}=o;return n(new nN[l](c),i)}case sI:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new nN[a](o),i)};return r},rN=e=>BV(new Map,e)(0),jo="",{toString:UV}={},{keys:HV}=Object,ku=e=>{const t=typeof e;if(t!=="object"||!e)return[Ep,t];const n=UV.call(e).slice(8,-1);switch(n){case"Array":return[Gu,jo];case"Object":return[Zh,jo];case"Date":return[vS,jo];case"RegExp":return[_S,jo];case"Map":return[xS,jo];case"Set":return[wS,jo];case"DataView":return[Gu,n]}return n.includes("Array")?[Gu,n]:n.includes("Error")?[aI,n]:[Zh,n]},wd=([e,t])=>e===Ep&&(t==="function"||t==="symbol"),VV=(e,t,n,r)=>{const i=(o,l)=>{const c=r.push(o)-1;return n.set(l,c),c},a=o=>{if(n.has(o))return n.get(o);let[l,c]=ku(o);switch(l){case Ep:{let d=o;switch(c){case"bigint":l=sI,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return i([iI],o)}return i([l,d],o)}case Gu:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),i([c,[...m]],o)}const d=[],p=i([l,d],o);for(const m of o)d.push(a(m));return p}case Zh:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const d=[],p=i([l,d],o);for(const m of HV(o))(e||!wd(ku(o[m])))&&d.push([a(m),a(o[m])]);return p}case vS:return i([l,o.toISOString()],o);case _S:{const{source:d,flags:p}=o;return i([l,{source:d,flags:p}],o)}case xS:{const d=[],p=i([l,d],o);for(const[m,g]of o)(e||!(wd(ku(m))||wd(ku(g))))&&d.push([a(m),a(g)]);return p}case wS:{const d=[],p=i([l,d],o);for(const m of o)(e||!wd(ku(m)))&&d.push(a(m));return p}}const{message:f}=o;return i([l,{name:c,message:f}],o)};return a},iN=(e,{json:t,lossy:n}={})=>{const r=[];return VV(!(t||n),!!t,new Map,r)(e),r},Yh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?rN(iN(e,t)):structuredClone(e):(e,t)=>rN(iN(e,t));function GV(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function ZV(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function YV(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||GV,r=e.options.footnoteBackLabel||ZV,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[c]);if(!f)continue;const d=e.all(f),p=String(f.identifier).toUpperCase(),m=ml(p.toLowerCase());let g=0;const _=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++g<=S;){_.length>0&&_.push({type:"text",value:" "});let w=typeof n=="string"?n:n(c,g);typeof w=="string"&&(w={type:"text",value:w}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const b=d[d.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const w=b.children[b.children.length-1];w&&w.type==="text"?w.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(..._)}else d.push(..._);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(f,x),l.push(x)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Yh(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
69
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
70
+ `}]}}const kp=function(e){if(e==null)return QV;if(typeof e=="function")return Cp(e);if(typeof e=="object")return Array.isArray(e)?KV(e):XV(e);if(typeof e=="string")return WV(e);throw new Error("Expected function, string, or object as test")};function KV(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kp(e[n]);return Cp(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function XV(e){const t=e;return Cp(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function WV(e){return Cp(t);function t(n){return n&&n.type===e}}function Cp(e){return t;function t(n,r,i){return!!(JV(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function QV(){return!0}function JV(e){return e!==null&&typeof e=="object"&&"type"in e}const oI=[],eG=!0,ww=!1,tG="skip";function lI(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=kp(i),o=r?-1:1;l(e,void 0,[])();function l(c,f,d){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const g=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=oI,_,S,b;if((!t||a(c,f,d[d.length-1]||void 0))&&(g=nG(n(c,d)),g[0]===ww))return g;if("children"in c&&c.children){const x=c;if(x.children&&g[0]!==tG)for(S=(r?x.children.length:-1)+o,b=d.concat(x);S>-1&&S<x.children.length;){const w=x.children[S];if(_=l(w,S,b)(),_[0]===ww)return _;S=typeof _[1]=="number"?_[1]:S+o}}return g}}}function nG(e){return Array.isArray(e)?e:typeof e=="number"?[eG,e]:e==null?oI:[e]}function SS(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),lI(e,a,l,i);function l(c,f){const d=f[f.length-1],p=d?d.children.indexOf(c):void 0;return o(c,p,d)}}const Sw={}.hasOwnProperty,rG={};function iG(e,t){const n=t||rG,r=new Map,i=new Map,a=new Map,o={...FV,...n.handlers},l={all:f,applyData:sG,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:c,options:n,patch:aG,wrap:lG};return SS(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const p=d.type==="definition"?r:i,m=String(d.identifier).toUpperCase();p.has(m)||p.set(m,d)}}),l;function c(d,p){const m=d.type,g=l.handlers[m];if(Sw.call(l.handlers,m)&&g)return g(l,d,p);if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in d){const{children:S,...b}=d,x=Yh(b);return x.children=l.all(d),x}return Yh(d)}return(l.options.unknownHandler||oG)(l,d,p)}function f(d){const p=[];if("children"in d){const m=d.children;let g=-1;for(;++g<m.length;){const _=l.one(m[g],d);if(_){if(g&&m[g-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=aN(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=aN(S.value))}Array.isArray(_)?p.push(..._):p.push(_)}}}return p}}function aG(e,t){e.position&&(t.position=ZB(e))}function sG(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Yh(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function oG(e,t){const n=t.data||{},r="value"in t&&!(Sw.call(n,"hProperties")||Sw.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lG(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
71
+ `});++r<e.length;)r&&n.push({type:"text",value:`
72
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
73
+ `}),n}function aN(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function sN(e,t){const n=iG(e,t),r=n.one(e,void 0),i=YV(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
74
+ `},i),a}function uG(e,t){return e&&"run"in e?async function(n,r){const i=sN(n,{file:r,...t});await e.run(i,r)}:function(n,r){return sN(n,{file:r,...e||t})}}function oN(e){if(e)throw e}var a0,lN;function cG(){if(lN)return a0;lN=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var d=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!d&&!p)return!1;var m;for(m in f);return typeof m>"u"||e.call(f,m)},o=function(f,d){n&&d.name==="__proto__"?n(f,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):f[d.name]=d.newValue},l=function(f,d){if(d==="__proto__")if(e.call(f,d)){if(r)return r(f,d).value}else return;return f[d]};return a0=function c(){var f,d,p,m,g,_,S=arguments[0],b=1,x=arguments.length,w=!1;for(typeof S=="boolean"&&(w=S,S=arguments[1]||{},b=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});b<x;++b)if(f=arguments[b],f!=null)for(d in f)p=l(S,d),m=l(f,d),S!==m&&(w&&m&&(a(m)||(g=i(m)))?(g?(g=!1,_=p&&i(p)?p:[]):_=p&&a(p)?p:{},o(S,{name:d,newValue:c(w,_,m)})):typeof m<"u"&&o(S,{name:d,newValue:m}));return S},a0}var fG=cG();const s0=qn(fG);function Ew(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dG(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(c,...f){const d=e[++a];let p=-1;if(c){o(c);return}for(;++p<i.length;)(f[p]===null||f[p]===void 0)&&(f[p]=i[p]);i=f,d?hG(d,l)(...f):o(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function hG(e,t){let n;return r;function r(...o){const l=e.length>o.length;let c;l&&o.push(i);try{c=e.apply(this,o)}catch(f){const d=f;if(l&&n)throw d;return i(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const Zr={basename:pG,dirname:mG,extname:gG,join:yG,sep:"/"};function pG(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ac(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function mG(e){if(Ac(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gG(e){Ac(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function yG(...e){let t=-1,n;for(;++t<e.length;)Ac(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bG(n)}function bG(e){Ac(e);const t=e.codePointAt(0)===47;let n=vG(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vG(e,t){let n="",r=0,i=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function Ac(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _G={cwd:xG};function xG(){return"/"}function kw(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wG(e){if(typeof e=="string")e=new URL(e);else if(!kw(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return SG(e)}function SG(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const o0=["history","path","basename","stem","extname","dirname"];class uI{constructor(t){let n;t?kw(t)?n={path:t}:typeof t=="string"||EG(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_G.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<o0.length;){const a=o0[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)o0.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Zr.basename(this.path):void 0}set basename(t){u0(t,"basename"),l0(t,"basename"),this.path=Zr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Zr.dirname(this.path):void 0}set dirname(t){uN(this.basename,"dirname"),this.path=Zr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Zr.extname(this.path):void 0}set extname(t){if(l0(t,"extname"),uN(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Zr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kw(t)&&(t=wG(t)),u0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Zr.basename(this.path,this.extname):void 0}set stem(t){u0(t,"stem"),l0(t,"stem"),this.path=Zr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new xn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function l0(e,t){if(e&&e.includes(Zr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Zr.sep+"`")}function u0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function uN(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function EG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kG=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},CG={}.hasOwnProperty;class ES extends kG{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dG()}copy(){const t=new ES;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(s0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(d0("data",this.frozen),this.namespace[t]=n,this):CG.call(this.namespace,t)&&this.namespace[t]||void 0:t?(d0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Sd(t),r=this.parser||this.Parser;return c0("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),c0("process",this.parser||this.Parser),f0("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=Sd(t),c=r.parse(l);r.run(c,l,function(d,p,m){if(d||!p||!m)return f(d);const g=p,_=r.stringify(g,m);NG(_)?m.value=_:m.result=_,f(d,m)});function f(d,p){d||!p?o(d):a?a(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),c0("processSync",this.parser||this.Parser),f0("processSync",this.compiler||this.Compiler),this.process(t,i),fN("processSync","process",n),r;function i(a,o){n=!0,oN(a),r=o}}run(t,n,r){cN(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,l){const c=Sd(n);i.run(t,c,f);function f(d,p,m){const g=p||t;d?l(d):o?o(g):r(void 0,g,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),fN("runSync","run",r),i;function a(o,l){oN(o),i=l,r=!0}}stringify(t,n){this.freeze();const r=Sd(n),i=this.compiler||this.Compiler;return f0("stringify",i),cN(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(d0("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")c(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[d,...p]=f;c(d,p)}else o(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function o(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(i.settings=s0(!0,i.settings,f.settings))}function l(f){let d=-1;if(f!=null)if(Array.isArray(f))for(;++d<f.length;){const p=f[d];a(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function c(f,d){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===f){m=p;break}if(m===-1)r.push([f,...d]);else if(d.length>0){let[g,..._]=d;const S=r[m][1];Ew(S)&&Ew(g)&&(g=s0(!0,S,g)),r[m]=[f,g,..._]}}}}const AG=new ES().freeze();function c0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function f0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function d0(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cN(e){if(!Ew(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fN(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Sd(e){return TG(e)?e:new uI(e)}function TG(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function NG(e){return typeof e=="string"||OG(e)}function OG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const RG="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",dN=[],hN={allowDangerousHtml:!0},jG=/^(https?|ircs?|mailto|xmpp)$/i,MG=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function cI(e){const t=$G(e),n=DG(e);return IG(t.runSync(t.parse(n),n),e)}function $G(e){const t=e.rehypePlugins||dN,n=e.remarkPlugins||dN,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...hN}:hN;return AG().use(mV).use(n).use(uG,r).use(t)}function DG(e){const t=e.children||"",n=new uI;return typeof t=="string"&&(n.value=t),n}function IG(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||PG;for(const d of MG)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+RG+d.id,void 0);return SS(e,f),QB(e,{Fragment:O.Fragment,components:i,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function f(d,p,m){if(d.type==="raw"&&m&&typeof p=="number")return o?m.children.splice(p,1):m.children[p]={type:"text",value:d.value},p;if(d.type==="element"){let g;for(g in n0)if(Object.hasOwn(n0,g)&&Object.hasOwn(d.properties,g)){const _=d.properties[g],S=n0[g];(S===null||S.includes(d.tagName))&&(d.properties[g]=c(String(_||""),g,d))}}if(d.type==="element"){let g=n?!n.includes(d.tagName):a?a.includes(d.tagName):!1;if(!g&&r&&typeof p=="number"&&(g=!r(d,p,m)),g&&m&&typeof p=="number")return l&&d.children?m.children.splice(p,1,...d.children):m.children.splice(p,1),p}}}function PG(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||jG.test(e.slice(0,t))?e:""}function pN(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function zG(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function LG(e,t,n){const i=kp((n||{}).ignore||[]),a=qG(t);let o=-1;for(;++o<a.length;)lI(e,"text",l);function l(f,d){let p=-1,m;for(;++p<d.length;){const g=d[p],_=m?m.children:void 0;if(i(g,_?_.indexOf(g):void 0,m))return;m=g}if(m)return c(f,d)}function c(f,d){const p=d[d.length-1],m=a[o][0],g=a[o][1];let _=0;const b=p.children.indexOf(f);let x=!1,w=[];m.lastIndex=0;let v=m.exec(f.value);for(;v;){const k=v.index,C={index:v.index,input:v.input,stack:[...d,f]};let T=g(...v,C);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?m.lastIndex=k+1:(_!==k&&w.push({type:"text",value:f.value.slice(_,k)}),Array.isArray(T)?w.push(...T):T&&w.push(T),_=k+v[0].length,x=!0),!m.global)break;v=m.exec(f.value)}return x?(_<f.value.length&&w.push({type:"text",value:f.value.slice(_)}),p.children.splice(b,1,...w)):w=[f],b+w.length}}function qG(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([FG(i[0]),BG(i[1])])}return t}function FG(e){return typeof e=="string"?new RegExp(zG(e),"g"):e}function BG(e){return typeof e=="function"?e:function(){return e}}const h0="phrasing",p0=["autolink","link","image","label"];function UG(){return{transforms:[XG],enter:{literalAutolink:VG,literalAutolinkEmail:m0,literalAutolinkHttp:m0,literalAutolinkWww:m0},exit:{literalAutolink:KG,literalAutolinkEmail:YG,literalAutolinkHttp:GG,literalAutolinkWww:ZG}}}function HG(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:h0,notInConstruct:p0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:h0,notInConstruct:p0},{character:":",before:"[ps]",after:"\\/",inConstruct:h0,notInConstruct:p0}]}}function VG(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function m0(e){this.config.enter.autolinkProtocol.call(this,e)}function GG(e){this.config.exit.autolinkProtocol.call(this,e)}function ZG(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function YG(e){this.config.exit.autolinkEmail.call(this,e)}function KG(e){this.exit(e)}function XG(e){LG(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,WG],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),QG]],{ignore:["link","linkReference"]})}function WG(e,t,n,r,i){let a="";if(!fI(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!JG(n)))return!1;const o=eZ(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function QG(e,t,n,r){return!fI(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function JG(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function eZ(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=pN(e,"(");let a=pN(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function fI(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ks(n)||wp(n))&&(!t||n!==47)}dI.peek=uZ;function tZ(){this.buffer()}function nZ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function rZ(){this.buffer()}function iZ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function aZ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Dr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sZ(e){this.exit(e)}function oZ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Dr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lZ(e){this.exit(e)}function uZ(){return"["}function dI(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]"),a}function cZ(){return{enter:{gfmFootnoteCallString:tZ,gfmFootnoteCall:nZ,gfmFootnoteDefinitionLabelString:rZ,gfmFootnoteDefinition:iZ},exit:{gfmFootnoteCallString:aZ,gfmFootnoteCall:sZ,gfmFootnoteDefinitionLabelString:oZ,gfmFootnoteDefinition:lZ}}}function fZ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:dI},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,o){const l=a.createTracker(o);let c=l.move("[^");const f=a.enter("footnoteDefinition"),d=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),d(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
75
+ `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?hI:dZ))),f(),c}}function dZ(e,t,n){return t===0?e:hI(e,t,n)}function hI(e,t,n){return(n?"":" ")+e}const hZ=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];pI.peek=bZ;function pZ(){return{canContainEols:["delete"],enter:{strikethrough:gZ},exit:{strikethrough:yZ}}}function mZ(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:hZ}],handlers:{delete:pI}}}function gZ(e){this.enter({type:"delete",children:[]},e)}function yZ(e){this.exit(e)}function pI(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function bZ(){return"~"}function vZ(e){return e.length}function _Z(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||vZ,a=[],o=[],l=[],c=[];let f=0,d=-1;for(;++d<e.length;){const S=[],b=[];let x=-1;for(e[d].length>f&&(f=e[d].length);++x<e[d].length;){const w=xZ(e[d][x]);if(n.alignDelimiters!==!1){const v=i(w);b[x]=v,(c[x]===void 0||v>c[x])&&(c[x]=v)}S.push(w)}o[d]=S,l[d]=b}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)a[p]=mN(r[p]);else{const S=mN(r);for(;++p<f;)a[p]=S}p=-1;const m=[],g=[];for(;++p<f;){const S=a[p];let b="",x="";S===99?(b=":",x=":"):S===108?b=":":S===114&&(x=":");let w=n.alignDelimiters===!1?1:Math.max(1,c[p]-b.length-x.length);const v=b+"-".repeat(w)+x;n.alignDelimiters!==!1&&(w=b.length+w+x.length,w>c[p]&&(c[p]=w),g[p]=w),m[p]=v}o.splice(1,0,m),l.splice(1,0,g),d=-1;const _=[];for(;++d<o.length;){const S=o[d],b=l[d];p=-1;const x=[];for(;++p<f;){const w=S[p]||"";let v="",k="";if(n.alignDelimiters!==!1){const C=c[p]-(b[p]||0),T=a[p];T===114?v=" ".repeat(C):T===99?C%2?(v=" ".repeat(C/2+.5),k=" ".repeat(C/2-.5)):(v=" ".repeat(C/2),k=v):k=" ".repeat(C)}n.delimiterStart!==!1&&!p&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&w==="")&&(n.delimiterStart!==!1||p)&&x.push(" "),n.alignDelimiters!==!1&&x.push(v),x.push(w),n.alignDelimiters!==!1&&x.push(k),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&x.push("|")}_.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return _.join(`
76
+ `)}function xZ(e){return e==null?"":String(e)}function mN(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function wZ(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),SZ);return i(),o}function SZ(e,t,n){return">"+(n?"":" ")+e}function EZ(e,t){return gN(e,t.inConstruct,!0)&&!gN(e,t.notInConstruct,!1)}function gN(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function yN(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
77
+ `&&EZ(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
78
+ `}function kZ(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function CZ(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function AZ(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function TZ(e,t,n,r){const i=AZ(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(CZ(e,n)){const p=n.enter("codeIndented"),m=n.indentLines(a,NZ);return p(),m}const l=n.createTracker(r),c=i.repeat(Math.max(kZ(a,i)+1,3)),f=n.enter("codeFenced");let d=l.move(c);if(e.lang){const p=n.enter(`codeFencedLang${o}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:`
79
+ `,encode:["`"],...l.current()})),p()}return d+=l.move(`
80
+ `),a&&(d+=l.move(a+`
81
+ `)),d+=l.move(c),f(),d}function NZ(e,t,n){return(n?"":" ")+e}function kS(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function OZ(e,t,n,r){const i=kS(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");return f+=c.move(n.safe(n.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
82
+ `,...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),l()),o(),f}function RZ(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ic(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Kh(e,t,n){const r=Jo(e),i=Jo(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}mI.peek=jZ;function mI(e,t,n,r){const i=RZ(n),a=n.enter("emphasis"),o=n.createTracker(r),l=o.move(i);let c=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const f=c.charCodeAt(0),d=Kh(r.before.charCodeAt(r.before.length-1),f,i);d.inside&&(c=ic(f)+c.slice(1));const p=c.charCodeAt(c.length-1),m=Kh(r.after.charCodeAt(0),p,i);m.inside&&(c=c.slice(0,-1)+ic(p));const g=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+c+g}function jZ(e,t,n){return n.options.emphasis||"*"}function MZ(e,t){let n=!1;return SS(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ww}),!!((!e.depth||e.depth<3)&&gS(e)&&(t.options.setext||n))}function $Z(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(MZ(e,n)){const d=n.enter("headingSetext"),p=n.enter("phrasing"),m=n.containerPhrasing(e,{...a.current(),before:`
83
+ `,after:`
84
+ `});return p(),d(),m+`
85
+ `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
86
+ `))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(o+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
87
+ `,...a.current()});return/^[\t ]/.test(f)&&(f=ic(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,n.options.closeAtx&&(f+=" "+o),c(),l(),f}gI.peek=DZ;function gI(e){return e.value||""}function DZ(){return"<"}yI.peek=IZ;function yI(e,t,n,r){const i=kS(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");return f+=c.move(n.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),l()),f+=c.move(")"),o(),f}function IZ(){return"!"}bI.peek=PZ;function bI(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const f=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,a(),i==="full"||!f||f!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function PZ(){return"!"}vI.peek=zZ;function vI(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(r);){let f=c.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(c.index+1)}}return i+r+i}function zZ(){return"`"}function _I(e,t){const n=gS(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}xI.peek=LZ;function xI(e,t,n,r){const i=kS(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,c;if(_I(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let p=o.move("<");return p+=o.move(n.containerPhrasing(e,{before:p,after:">",...o.current()})),p+=o.move(">"),l(),n.stack=d,p}l=n.enter("link"),c=n.enter("label");let f=o.move("[");return f+=o.move(n.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(n.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(c=n.enter("destinationRaw"),f+=o.move(n.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=o.move(" "+i),f+=o.move(n.safe(e.title,{before:f,after:i,...o.current()})),f+=o.move(i),c()),f+=o.move(")"),l(),f}function LZ(e,t,n){return _I(e,n)?"<":"["}wI.peek=qZ;function wI(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,a(),i==="full"||!f||f!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function qZ(){return"["}function CS(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function FZ(e){const t=CS(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function BZ(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function SI(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function UZ(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?BZ(n):CS(n);const l=e.ordered?o==="."?")":".":FZ(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),SI(n)===o&&d){let p=-1;for(;++p<e.children.length;){const m=e.children[p];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const f=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),f}function HZ(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function VZ(e,t,n,r){const i=HZ(n);let a=n.bulletCurrent||CS(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),d);return c(),f;function d(p,m,g){return m?(g?"":" ".repeat(o))+p:(g?a:a+" ".repeat(o-a.length))+p}}function GZ(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const ZZ=kp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function YZ(e,t,n,r){return(e.children.some(function(o){return ZZ(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function KZ(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}EI.peek=XZ;function EI(e,t,n,r){const i=KZ(n),a=n.enter("strong"),o=n.createTracker(r),l=o.move(i+i);let c=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const f=c.charCodeAt(0),d=Kh(r.before.charCodeAt(r.before.length-1),f,i);d.inside&&(c=ic(f)+c.slice(1));const p=c.charCodeAt(c.length-1),m=Kh(r.after.charCodeAt(0),p,i);m.inside&&(c=c.slice(0,-1)+ic(p));const g=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+c+g}function XZ(e,t,n){return n.options.strong||"*"}function WZ(e,t,n,r){return n.safe(e.value,r)}function QZ(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function JZ(e,t,n){const r=(SI(n)+(n.options.ruleSpaces?" ":"")).repeat(QZ(n));return n.options.ruleSpaces?r.slice(0,-1):r}const kI={blockquote:wZ,break:yN,code:TZ,definition:OZ,emphasis:mI,hardBreak:yN,heading:$Z,html:gI,image:yI,imageReference:bI,inlineCode:vI,link:xI,linkReference:wI,list:UZ,listItem:VZ,paragraph:GZ,root:YZ,strong:EI,text:WZ,thematicBreak:JZ};function eY(){return{enter:{table:tY,tableData:bN,tableHeader:bN,tableRow:rY},exit:{codeText:iY,table:nY,tableData:g0,tableHeader:g0,tableRow:g0}}}function tY(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function nY(e){this.exit(e),this.data.inTable=void 0}function rY(e){this.enter({type:"tableRow",children:[]},e)}function g0(e){this.exit(e)}function bN(e){this.enter({type:"tableCell",children:[]},e)}function iY(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,aY));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function aY(e,t){return t==="|"?t:e}function sY(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
88
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:o,tableCell:c,tableRow:l}};function o(g,_,S,b){return f(d(g,S,b),g.align)}function l(g,_,S,b){const x=p(g,S,b),w=f([x]);return w.slice(0,w.indexOf(`
89
+ `))}function c(g,_,S,b){const x=S.enter("tableCell"),w=S.enter("phrasing"),v=S.containerPhrasing(g,{...b,before:a,after:a});return w(),x(),v}function f(g,_){return _Z(g,{align:_,alignDelimiters:r,padding:n,stringLength:i})}function d(g,_,S){const b=g.children;let x=-1;const w=[],v=_.enter("table");for(;++x<b.length;)w[x]=p(b[x],_,S);return v(),w}function p(g,_,S){const b=g.children;let x=-1;const w=[],v=_.enter("tableRow");for(;++x<b.length;)w[x]=c(b[x],g,_,S);return v(),w}function m(g,_,S){let b=kI.inlineCode(g,_,S);return S.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function oY(){return{exit:{taskListCheckValueChecked:vN,taskListCheckValueUnchecked:vN,paragraph:uY}}}function lY(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cY}}}function vN(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function uY(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cY(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let c=kI.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(d){return d+o}}function fY(){return[UG(),cZ(),pZ(),eY(),oY()]}function dY(e){return{extensions:[HG(),fZ(e),mZ(),sY(e),lY()]}}const hY={tokenize:vY,partial:!0},CI={tokenize:_Y,partial:!0},AI={tokenize:xY,partial:!0},TI={tokenize:wY,partial:!0},pY={tokenize:SY,partial:!0},NI={name:"wwwAutolink",tokenize:yY,previous:RI},OI={name:"protocolAutolink",tokenize:bY,previous:jI},Ui={name:"emailAutolink",tokenize:gY,previous:MI},ti={};function mY(){return{text:ti}}let us=48;for(;us<123;)ti[us]=Ui,us++,us===58?us=65:us===91&&(us=97);ti[43]=Ui;ti[45]=Ui;ti[46]=Ui;ti[95]=Ui;ti[72]=[Ui,OI];ti[104]=[Ui,OI];ti[87]=[Ui,NI];ti[119]=[Ui,NI];function gY(e,t,n){const r=this;let i,a;return o;function o(p){return!Cw(p)||!MI.call(r,r.previous)||AS(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(p))}function l(p){return Cw(p)?(e.consume(p),l):p===64?(e.consume(p),c):n(p)}function c(p){return p===46?e.check(pY,d,f)(p):p===45||p===95||_n(p)?(a=!0,e.consume(p),c):d(p)}function f(p){return e.consume(p),i=!0,c}function d(p){return a&&i&&Nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function yY(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!RI.call(r,r.previous)||AS(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(hY,e.attempt(CI,e.attempt(AI,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function bY(e,t,n){const r=this;let i="",a=!1;return o;function o(p){return(p===72||p===104)&&jI.call(r,r.previous)&&!AS(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),l):n(p)}function l(p){if(Nn(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),l;if(p===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(p),c}return n(p)}function c(p){return p===47?(e.consume(p),a?f:(a=!0,c)):n(p)}function f(p){return p===null||Gh(p)||Rt(p)||ks(p)||wp(p)?n(p):e.attempt(CI,e.attempt(AI,d),n)(p)}function d(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function vY(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function _Y(e,t,n){let r,i,a;return o;function o(f){return f===46||f===95?e.check(TI,c,l)(f):f===null||Rt(f)||ks(f)||f!==45&&wp(f)?c(f):(a=!0,e.consume(f),o)}function l(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),o}function c(f){return i||r||!a?n(f):t(f)}}function xY(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(TI,t,a)(o):o===null||Rt(o)||ks(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function wY(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||Rt(l)||ks(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||Rt(l)||ks(l)?t(l):r(l)}function a(l){return Nn(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):Nn(l)?(e.consume(l),o):n(l)}}function SY(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return _n(a)?n(a):t(a)}}function RI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Rt(e)}function jI(e){return!Nn(e)}function MI(e){return!(e===47||Cw(e))}function Cw(e){return e===43||e===45||e===46||e===95||_n(e)}function AS(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const EY={tokenize:jY,partial:!0};function kY(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:NY,continuation:{tokenize:OY},exit:RY}},text:{91:{name:"gfmFootnoteCall",tokenize:TY},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:CY,resolveTo:AY}}}}function CY(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return n(c);const f=Dr(r.sliceSerialize({start:o.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function AY(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function TY(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(a>999||p===93&&!o||p===null||p===91||Rt(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Dr(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Rt(p)||(o=!0),a++,e.consume(p),p===92?d:f}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function NY(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(_)}function d(_){if(o>999||_===93&&!l||_===null||_===91||Rt(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Dr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Rt(_)||(l=!0),o++,e.consume(_),_===92?p:d}function p(_){return _===91||_===92||_===93?(e.consume(_),o++,d):d(_)}function m(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),i.includes(a)||i.push(a),st(e,g,"gfmFootnoteDefinitionWhitespace")):n(_)}function g(_){return t(_)}}function OY(e,t,n){return e.check(Cc,t,e.attempt(EY,t,n))}function RY(e){e.exit("gfmFootnoteDefinition")}function jY(e,t,n){const r=this;return st(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function MY(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let f=c;for(;f--;)if(o[f][0]==="exit"&&o[f][1].type==="strikethroughSequenceTemporary"&&o[f][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[f][1].end.offset-o[f][1].start.offset){o[c][1].type="strikethroughSequence",o[f][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[f][1].start),end:Object.assign({},o[c][1].end)},p={type:"strikethroughText",start:Object.assign({},o[f][1].end),end:Object.assign({},o[c][1].start)},m=[["enter",d,l],["enter",o[f][1],l],["exit",o[f][1],l],["enter",p,l]],g=l.parser.constructs.insideSpan.null;g&&ar(m,m.length,0,Sp(g,o.slice(f+1,c),l)),ar(m,m.length,0,[["exit",p,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",d,l]]),ar(o,f-1,c-f+3,m),c=f+m.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function a(o,l,c){const f=this.previous,d=this.events;let p=0;return m;function m(_){return f===126&&d[d.length-1][1].type!=="characterEscape"?c(_):(o.enter("strikethroughSequenceTemporary"),g(_))}function g(_){const S=Jo(f);if(_===126)return p>1?c(_):(o.consume(_),p++,g);if(p<2&&!n)return c(_);const b=o.exit("strikethroughSequenceTemporary"),x=Jo(_);return b._open=!x||x===2&&!!S,b._close=!S||S===2&&!!x,l(_)}}}class $Y{constructor(){this.map=[]}add(t,n,r){DY(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function DY(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function IY(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function PY(){return{flow:{null:{name:"table",tokenize:zY,resolveAll:LY}}}}function zY(e,t,n){const r=this;let i=0,a=0,o;return l;function l(M){let q=r.events.length-1;for(;q>-1;){const I=r.events[q][1].type;if(I==="lineEnding"||I==="linePrefix")q--;else break}const F=q>-1?r.events[q][1].type:null,B=F==="tableHead"||F==="tableRow"?T:c;return B===T&&r.parser.lazy[r.now().line]?n(M):B(M)}function c(M){return e.enter("tableHead"),e.enter("tableRow"),f(M)}function f(M){return M===124||(o=!0,a+=1),d(M)}function d(M){return M===null?n(M):De(M)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),g):n(M):nt(M)?st(e,d,"whitespace")(M):(a+=1,o&&(o=!1,i+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),p(M)))}function p(M){return M===null||M===124||Rt(M)?(e.exit("data"),d(M)):(e.consume(M),M===92?m:p)}function m(M){return M===92||M===124?(e.consume(M),p):p(M)}function g(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),o=!1,nt(M)?st(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):_(M))}function _(M){return M===45||M===58?b(M):M===124?(o=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),S):C(M)}function S(M){return nt(M)?st(e,b,"whitespace")(M):b(M)}function b(M){return M===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),x):M===45?(a+=1,x(M)):M===null||De(M)?k(M):C(M)}function x(M){return M===45?(e.enter("tableDelimiterFiller"),w(M)):C(M)}function w(M){return M===45?(e.consume(M),w):M===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(M))}function v(M){return nt(M)?st(e,k,"whitespace")(M):k(M)}function k(M){return M===124?_(M):M===null||De(M)?!o||i!==a?C(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):C(M)}function C(M){return n(M)}function T(M){return e.enter("tableRow"),N(M)}function N(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),N):M===null||De(M)?(e.exit("tableRow"),t(M)):nt(M)?st(e,N,"whitespace")(M):(e.enter("data"),j(M))}function j(M){return M===null||M===124||Rt(M)?(e.exit("data"),N(M)):(e.consume(M),M===92?$:j)}function $(M){return M===92||M===124?(e.consume(M),j):j(M)}}function LY(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,f,d,p;const m=new $Y;for(;++n<e.length;){const g=e[n],_=g[1];g[0]==="enter"?_.type==="tableHead"?(l=!1,c!==0&&(_N(m,t,c,f,d),d=void 0,c=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},m.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,p=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},m.add(n,0,[["enter",d,t]])),i=_.type==="tableDelimiterRow"?2:d?3:1):i&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],p=Ed(m,t,a,i,void 0,p),a=[0,0,0,0]),o[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],p=Ed(m,t,a,i,void 0,p)),a=o,o=[a[1],n,0,0])):_.type==="tableHead"?(l=!0,c=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],p=Ed(m,t,a,i,n,p)):o[1]!==0&&(p=Ed(m,t,o,i,n,p)),i=0):i&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&_N(m,t,c,f,d),m.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=IY(t.events,n))}return e}function Ed(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Lo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=Lo(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=Lo(t.events,n[2]),d=Lo(t.events,n[3]),p={type:l,start:Object.assign({},f),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const m=t.events[n[2]],g=t.events[n[3]];if(m[1].end=Object.assign({},g[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,S=n[3]-n[2]-1;e.add(_,S,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(a.end=Object.assign({},Lo(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function _N(e,t,n,r,i){const a=[],o=Lo(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function Lo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const qY={name:"tasklistCheck",tokenize:BY};function FY(){return{text:{91:qY}}}function BY(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Rt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return De(c)?t(c):nt(c)?e.check({tokenize:UY},t,n)(c):n(c)}}function UY(e,t,n){return st(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function HY(e){return U5([mY(),kY(),MY(e),PY(),FY()])}const VY={};function $I(e){const t=this,n=e||VY,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(HY(n)),a.push(fY()),o.push(dY(n))}const GY=({message:e})=>O.jsxs("div",{className:"flex flex-col w-[80%] bg-white rounded-2xl px-5 py-4",children:[O.jsx("div",{className:"text-xs font-medium text-gray-500 mb-3",children:e.name}),O.jsx("div",{className:"markdown-body max-w-none",children:O.jsx(cI,{remarkPlugins:[$I],children:Vh(e.content)})}),O.jsx(lS,{response_metadata:e.response_metadata,usage_metadata:e.usage_metadata||{},spend_time:e.spend_time,id:e.id})]});let y0=(e,t)=>n=>{e.current!==n&&(e.current=n,t())};function DI(e,{keys:t,deps:n=[e,t]}={}){let r=ee.useRef();r.current=e.get();let i=ee.useCallback(o=>(y0(r,o)(e.value),t?.length>0?h7(e,t,y0(r,o)):e.listen(y0(r,o))),n),a=()=>r.current;return ee.useSyncExternalStore(i,a,a)}const II=ee.createContext(void 0),js=()=>{const e=ee.useContext(II);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},ZY=({children:e,defaultAgent:t="",apiUrl:n="http://localhost:8123",defaultHeaders:r,withCredentials:i=!1,showHistory:a=!1,showGraph:o=!1,onInitError:l})=>{const c=ee.useMemo(()=>r||{},[r]),f=ee.useRef(l);ee.useEffect(()=>{f.current=l},[l]);const d=ee.useMemo(()=>w7(t,{apiUrl:n,defaultHeaders:c,callerOptions:{fetch:i?(_,S)=>(S.credentials="include",fetch(_,S)):fetch,maxRetries:1}},{showHistory:a,showGraph:o}),[t,n,c,i,a,o]),p=SB(d,DI),m=ee.useRef(!1);return ee.useEffect(()=>{m.current||(m.current=!0,p.initClient().then(g=>{p.showHistory&&p.refreshHistoryList()}).catch(g=>{console.error(g),f.current&&f.current(g,p.currentAgent)}))},[p]),ee.createElement(II.Provider,{value:p},e)};function PI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=PI(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zI(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=PI(e))&&(r&&(r+=" "),r+=t);return r}var YY=Object.create,Ap=Object.defineProperty,KY=Object.defineProperties,XY=Object.getOwnPropertyDescriptor,WY=Object.getOwnPropertyDescriptors,LI=Object.getOwnPropertyNames,Xh=Object.getOwnPropertySymbols,QY=Object.getPrototypeOf,TS=Object.prototype.hasOwnProperty,qI=Object.prototype.propertyIsEnumerable,xN=(e,t,n)=>t in e?Ap(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wr=(e,t)=>{for(var n in t||(t={}))TS.call(t,n)&&xN(e,n,t[n]);if(Xh)for(var n of Xh(t))qI.call(t,n)&&xN(e,n,t[n]);return e},Tp=(e,t)=>KY(e,WY(t)),FI=(e,t)=>{var n={};for(var r in e)TS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xh)for(var r of Xh(e))t.indexOf(r)<0&&qI.call(e,r)&&(n[r]=e[r]);return n},JY=(e,t)=>function(){return t||(0,e[LI(e)[0]])((t={exports:{}}).exports,t),t.exports},eK=(e,t)=>{for(var n in t)Ap(e,n,{get:t[n],enumerable:!0})},tK=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of LI(t))!TS.call(e,i)&&i!==n&&Ap(e,i,{get:()=>t[i],enumerable:!(r=XY(t,i))||r.enumerable});return e},nK=(e,t,n)=>(n=e!=null?YY(QY(e)):{},tK(!e||!e.__esModule?Ap(n,"default",{value:e,enumerable:!0}):n,e)),rK=JY({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},o={util:{encode:function _(S){return S instanceof l?new l(S.type,_(S.content),S.alias):Array.isArray(S)?S.map(_):S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(_){return Object.prototype.toString.call(_).slice(8,-1)},objId:function(_){return _.__id||Object.defineProperty(_,"__id",{value:++i}),_.__id},clone:function _(S,b){b=b||{};var x,w;switch(o.util.type(S)){case"Object":if(w=o.util.objId(S),b[w])return b[w];x={},b[w]=x;for(var v in S)S.hasOwnProperty(v)&&(x[v]=_(S[v],b));return x;case"Array":return w=o.util.objId(S),b[w]?b[w]:(x=[],b[w]=x,S.forEach(function(k,C){x[C]=_(k,b)}),x);default:return S}},getLanguage:function(_){for(;_;){var S=r.exec(_.className);if(S)return S[1].toLowerCase();_=_.parentElement}return"none"},setLanguage:function(_,S){_.className=_.className.replace(RegExp(r,"gi"),""),_.classList.add("language-"+S)},isActive:function(_,S,b){for(var x="no-"+S;_;){var w=_.classList;if(w.contains(S))return!0;if(w.contains(x))return!1;_=_.parentElement}return!!b}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(_,S){var b=o.util.clone(o.languages[_]);for(var x in S)b[x]=S[x];return b},insertBefore:function(_,S,b,x){x=x||o.languages;var w=x[_],v={};for(var k in w)if(w.hasOwnProperty(k)){if(k==S)for(var C in b)b.hasOwnProperty(C)&&(v[C]=b[C]);b.hasOwnProperty(k)||(v[k]=w[k])}var T=x[_];return x[_]=v,o.languages.DFS(o.languages,function(N,j){j===T&&N!=_&&(this[N]=v)}),v},DFS:function _(S,b,x,w){w=w||{};var v=o.util.objId;for(var k in S)if(S.hasOwnProperty(k)){b.call(S,k,S[k],x||k);var C=S[k],T=o.util.type(C);T==="Object"&&!w[v(C)]?(w[v(C)]=!0,_(C,b,null,w)):T==="Array"&&!w[v(C)]&&(w[v(C)]=!0,_(C,b,k,w))}}},plugins:{},highlight:function(_,S,b){var x={code:_,grammar:S,language:b};if(o.hooks.run("before-tokenize",x),!x.grammar)throw new Error('The language "'+x.language+'" has no grammar.');return x.tokens=o.tokenize(x.code,x.grammar),o.hooks.run("after-tokenize",x),l.stringify(o.util.encode(x.tokens),x.language)},tokenize:function(_,S){var b=S.rest;if(b){for(var x in b)S[x]=b[x];delete S.rest}var w=new d;return p(w,w.head,_),f(_,w,S,w.head,0),g(w)},hooks:{all:{},add:function(_,S){var b=o.hooks.all;b[_]=b[_]||[],b[_].push(S)},run:function(_,S){var b=o.hooks.all[_];if(!(!b||!b.length))for(var x=0,w;w=b[x++];)w(S)}},Token:l};function l(_,S,b,x){this.type=_,this.content=S,this.alias=b,this.length=(x||"").length|0}l.stringify=function _(S,b){if(typeof S=="string")return S;if(Array.isArray(S)){var x="";return S.forEach(function(T){x+=_(T,b)}),x}var w={type:S.type,content:_(S.content,b),tag:"span",classes:["token",S.type],attributes:{},language:b},v=S.alias;v&&(Array.isArray(v)?Array.prototype.push.apply(w.classes,v):w.classes.push(v)),o.hooks.run("wrap",w);var k="";for(var C in w.attributes)k+=" "+C+'="'+(w.attributes[C]||"").replace(/"/g,"&quot;")+'"';return"<"+w.tag+' class="'+w.classes.join(" ")+'"'+k+">"+w.content+"</"+w.tag+">"};function c(_,S,b,x){_.lastIndex=S;var w=_.exec(b);if(w&&x&&w[1]){var v=w[1].length;w.index+=v,w[0]=w[0].slice(v)}return w}function f(_,S,b,x,w,v){for(var k in b)if(!(!b.hasOwnProperty(k)||!b[k])){var C=b[k];C=Array.isArray(C)?C:[C];for(var T=0;T<C.length;++T){if(v&&v.cause==k+","+T)return;var N=C[T],j=N.inside,$=!!N.lookbehind,M=!!N.greedy,q=N.alias;if(M&&!N.pattern.global){var F=N.pattern.toString().match(/[imsuy]*$/)[0];N.pattern=RegExp(N.pattern.source,F+"g")}for(var B=N.pattern||N,I=x.next,V=w;I!==S.tail&&!(v&&V>=v.reach);V+=I.value.length,I=I.next){var H=I.value;if(S.length>_.length)return;if(!(H instanceof l)){var G=1,X;if(M){if(X=c(B,V,_,$),!X||X.index>=_.length)break;var Z=X.index,W=X.index+X[0].length,L=V;for(L+=I.value.length;Z>=L;)I=I.next,L+=I.value.length;if(L-=I.value.length,V=L,I.value instanceof l)continue;for(var P=I;P!==S.tail&&(L<W||typeof P.value=="string");P=P.next)G++,L+=P.value.length;G--,H=_.slice(V,L),X.index-=V}else if(X=c(B,0,H,$),!X)continue;var Z=X.index,R=X[0],D=H.slice(0,Z),U=H.slice(Z+R.length),Y=V+H.length;v&&Y>v.reach&&(v.reach=Y);var ne=I.prev;D&&(ne=p(S,ne,D),V+=D.length),m(S,ne,G);var ae=new l(k,j?o.tokenize(R,j):R,q,R);if(I=p(S,ne,ae),U&&p(S,I,U),G>1){var re={cause:k+","+T,reach:Y};f(_,S,b,I.prev,V,re),v&&re.reach>v.reach&&(v.reach=re.reach)}}}}}}function d(){var _={value:null,prev:null,next:null},S={value:null,prev:_,next:null};_.next=S,this.head=_,this.tail=S,this.length=0}function p(_,S,b){var x=S.next,w={value:b,prev:S,next:x};return S.next=w,x.prev=w,_.length++,w}function m(_,S,b){for(var x=S.next,w=0;w<b&&x!==_.tail;w++)x=x.next;S.next=x,x.prev=S,_.length-=w}function g(_){for(var S=[],b=_.head.next;b!==_.tail;)S.push(b.value),b=b.next;return S}return o}();t.exports=n,n.default=n}}),ve=nK(rK());ve.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ve.languages.markup.tag.inside["attr-value"].inside.entity=ve.languages.markup.entity,ve.languages.markup.doctype.inside["internal-subset"].inside=ve.languages.markup,ve.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(ve.languages.markup.tag,"addInlined",{value:function(e,r){var n={},n=(n["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ve.languages[r]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),r=(n["language-"+r]={pattern:/[\s\S]+/,inside:ve.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},ve.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(ve.languages.markup.tag,"addAttribute",{value:function(e,t){ve.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:ve.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ve.languages.html=ve.languages.markup,ve.languages.mathml=ve.languages.markup,ve.languages.svg=ve.languages.markup,ve.languages.xml=ve.languages.extend("markup",{}),ve.languages.ssml=ve.languages.xml,ve.languages.atom=ve.languages.xml,ve.languages.rss=ve.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",r=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(ve),ve.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},ve.languages.javascript=ve.languages.extend("clike",{"class-name":[ve.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ve.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ve.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ve.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ve.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ve.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ve.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ve.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ve.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ve.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ve.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ve.languages.markup&&(ve.languages.markup.tag.addInlined("script","javascript"),ve.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),ve.languages.js=ve.languages.javascript,ve.languages.actionscript=ve.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),ve.languages.actionscript["class-name"].alias="function",delete ve.languages.actionscript.parameter,delete ve.languages.actionscript["literal-property"],ve.languages.markup&&ve.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:ve.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(ve),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(n,r){(n=typeof n=="string"?[n]:n).forEach(function(i){var a=function(p){p.inside||(p.inside={}),p.inside.rest=r},o="doc-comment";if(l=e.languages[i]){var l,c=l[o];if((c=c||(l=e.languages.insertBefore(i,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[o])instanceof RegExp&&(c=l[o]={pattern:c}),Array.isArray(c))for(var f=0,d=c.length;f<d;f++)c[f]instanceof RegExp&&(c[f]={pattern:c[f]}),a(c[f]);else a(c)}})}}),t.addSupport(["java","javascript","php"],t)}(ve),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(ve),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(ve),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(l,c){c=(c||"").replace(/m/g,"")+"m";var f=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return l});return RegExp(f,c)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(ve),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(f){return f=f.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+f+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,o=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(f){["url","bold","italic","strike","code-snippet"].forEach(function(d){f!==d&&(e.languages.markdown[f].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(f){f.language!=="markdown"&&f.language!=="md"||function d(p){if(p&&typeof p!="string")for(var m=0,g=p.length;m<g;m++){var _,S=p[m];S.type!=="code"?d(S.content):(_=S.content[1],S=S.content[3],_&&S&&_.type==="code-language"&&S.type==="code-block"&&typeof _.content=="string"&&(_=_.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),_="language-"+(_=(/[a-z][\w-]*/i.exec(_)||[""])[0].toLowerCase()),S.alias?typeof S.alias=="string"?S.alias=[S.alias,_]:S.alias.push(_):S.alias=[_]))}}(f.tokens)}),e.hooks.add("wrap",function(f){if(f.type==="code-block"){for(var d="",p=0,m=f.classes.length;p<m;p++){var g=f.classes[p],g=/language-(.+)/.exec(g);if(g){d=g[1];break}}var _,S=e.languages[d];S?f.content=e.highlight(function(b){return b=b.replace(o,""),b=b.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(x,w){var v;return(w=w.toLowerCase())[0]==="#"?(v=w[1]==="x"?parseInt(w.slice(2),16):Number(w.slice(1)),c(v)):l[w]||x})}(f.content),S,d):d&&d!=="none"&&e.plugins.autoloader&&(_="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),f.attributes.id=_,e.plugins.autoloader.loadLanguages(d,function(){var b=document.getElementById(_);b&&(b.innerHTML=e.highlight(b.textContent,e.languages[d],d))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),l={amp:"&",lt:"<",gt:">",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(ve),ve.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:ve.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},ve.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(_){return typeof _!="string"&&_.type!=="comment"&&_.type!=="scalar"}),n=0;n<t.length;){var r=t[n++];if(r.type==="keyword"&&r.content==="mutation"){var i=[];if(p(["definition-mutation","punctuation"])&&d(1).content==="("){n+=2;var a=m(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var o=d(0);o.type==="variable"&&(g(o,"variable-input"),i.push(o.content))}n=a+1}if(p(["punctuation","property-query"])&&d(0).content==="{"&&(n++,g(d(0),"property-mutation"),0<i.length)){var l=m(/^\{$/,/^\}$/);if(l!==-1)for(var c=n;c<l;c++){var f=t[c];f.type==="variable"&&0<=i.indexOf(f.content)&&g(f,"variable-input")}}}}function d(_){return t[n+_]}function p(_,S){S=S||0;for(var b=0;b<_.length;b++){var x=d(b+S);if(!x||x.type!==_[b])return}return 1}function m(_,S){for(var b=1,x=n;x<t.length;x++){var w=t[x],v=w.content;if(w.type==="punctuation"&&typeof v=="string"){if(_.test(v))b++;else if(S.test(v)&&--b===0)return x}}return-1}function g(_,S){var b=_.alias;b?Array.isArray(b)||(_.alias=b=[b]):_.alias=b=[],b.push(S)}}),ve.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,i=r.inside["interpolation-punctuation"],a=r.pattern.source;function o(p,m){if(e.languages[p])return{pattern:RegExp("((?:"+m+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:p}}}}function l(p,m,g){return p={code:p,grammar:m,language:g},e.hooks.run("before-tokenize",p),p.tokens=e.tokenize(p.code,p.grammar),e.hooks.run("after-tokenize",p),p.tokens}function c(p,m,g){var b=e.tokenize(p,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),_=0,S={},b=l(b.map(function(w){if(typeof w=="string")return w;for(var v,k,w=w.content;p.indexOf((k=_++,v="___"+g.toUpperCase()+"_"+k+"___"))!==-1;);return S[v]=w,v}).join(""),m,g),x=Object.keys(S);return _=0,function w(v){for(var k=0;k<v.length;k++){if(_>=x.length)return;var C,T,N,j,$,M,q,F=v[k];typeof F=="string"||typeof F.content=="string"?(C=x[_],(q=(M=typeof F=="string"?F:F.content).indexOf(C))!==-1&&(++_,T=M.substring(0,q),$=S[C],N=void 0,(j={})["interpolation-punctuation"]=i,(j=e.tokenize($,j)).length===3&&((N=[1,1]).push.apply(N,l(j[1],e.languages.javascript,"javascript")),j.splice.apply(j,N)),N=new e.Token("interpolation",j,r.alias,$),j=M.substring(q+C.length),$=[],T&&$.push(T),$.push(N),j&&(w(M=[j]),$.push.apply($,M)),typeof F=="string"?(v.splice.apply(v,[k,1].concat($)),k+=$.length-1):F.content=$)):(q=F.content,Array.isArray(q)?w(q):w([q]))}}(b),new e.Token(g,b,"language-"+g,p)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),t].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function d(p){return typeof p=="string"?p:Array.isArray(p)?p.map(d).join(""):d(p.content)}e.hooks.add("after-tokenize",function(p){p.language in f&&function m(g){for(var _=0,S=g.length;_<S;_++){var b,x,w,v=g[_];typeof v!="string"&&(b=v.content,Array.isArray(b)?v.type==="template-string"?(v=b[1],b.length===3&&typeof v!="string"&&v.type==="embedded-code"&&(x=d(v),v=v.alias,v=Array.isArray(v)?v[0]:v,w=e.languages[v])&&(b[1]=c(x,w,v))):m(b):typeof b!="string"&&m([b]))}}(p.tokens)})}(ve),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(ve),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(ve),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(ve),ve.languages.n4js=ve.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),ve.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),ve.languages.n4jsd=ve.languages.n4js,function(e){function t(o,l){return RegExp(o.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),l)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],i=e.languages.javascript[a],a=(i=e.util.type(i)==="RegExp"?e.languages.javascript[a]={pattern:i}:i).inside||{};(i.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(ve),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(c,f){return c=c.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(c,f)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function o(c){for(var f=[],d=0;d<c.length;d++){var p=c[d],m=!1;typeof p!="string"&&(p.type==="tag"&&p.content[0]&&p.content[0].type==="tag"?p.content[0].content[0].content==="</"?0<f.length&&f[f.length-1].tagName===l(p.content[0].content[1])&&f.pop():p.content[p.content.length-1].content!=="/>"&&f.push({tagName:l(p.content[0].content[1]),openedBraces:0}):0<f.length&&p.type==="punctuation"&&p.content==="{"?f[f.length-1].openedBraces++:0<f.length&&0<f[f.length-1].openedBraces&&p.type==="punctuation"&&p.content==="}"?f[f.length-1].openedBraces--:m=!0),(m||typeof p=="string")&&0<f.length&&f[f.length-1].openedBraces===0&&(m=l(p),d<c.length-1&&(typeof c[d+1]=="string"||c[d+1].type==="plain-text")&&(m+=l(c[d+1]),c.splice(d+1,1)),0<d&&(typeof c[d-1]=="string"||c[d-1].type==="plain-text")&&(m=l(c[d-1])+m,c.splice(d-1,1),d--),c[d]=new e.Token("plain-text",m,null,m)),p.content&&typeof p.content!="string"&&o(p.content)}}var l=function(c){return c?typeof c=="string"?c:typeof c.content=="string"?c.content:c.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(c){c.language!=="jsx"&&c.language!=="tsx"||o(c.tokens)})}(ve),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(ve),ve.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},ve.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=ve.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(ve),ve.languages.c=ve.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),ve.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),ve.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},ve.languages.c.string],char:ve.languages.c.char,comment:ve.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:ve.languages.c}}}}),ve.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete ve.languages.c.boolean,ve.languages.objectivec=ve.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete ve.languages.objectivec["class-name"],ve.languages.objc=ve.languages.objectivec,ve.languages.reason=ve.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),ve.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete ve.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(ve),ve.languages.go=ve.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),ve.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete ve.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(ve),ve.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},ve.languages.python["string-interpolation"].inside.interpolation.inside.rest=ve.languages.python,ve.languages.py=ve.languages.python,ve.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ve.languages.webmanifest=ve.languages.json;var BI={};eK(BI,{dracula:()=>aK,duotoneDark:()=>oK,duotoneLight:()=>uK,github:()=>fK,gruvboxMaterialDark:()=>qK,gruvboxMaterialLight:()=>BK,jettwaveDark:()=>jK,jettwaveLight:()=>$K,nightOwl:()=>hK,nightOwlLight:()=>mK,oceanicNext:()=>yK,okaidia:()=>vK,oneDark:()=>IK,oneLight:()=>zK,palenight:()=>xK,shadesOfPurple:()=>SK,synthwave84:()=>kK,ultramin:()=>AK,vsDark:()=>UI,vsLight:()=>OK});var iK={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},aK=iK,sK={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},oK=sK,lK={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},uK=lK,cK={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},fK=cK,dK={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},hK=dK,pK={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},mK=pK,Xn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},gK={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Xn.keyword}},{types:["attr-value"],style:{color:Xn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Xn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Xn.primitive}},{types:["boolean"],style:{color:Xn.boolean}},{types:["tag"],style:{color:Xn.tag}},{types:["string"],style:{color:Xn.string}},{types:["punctuation"],style:{color:Xn.string}},{types:["selector","char","builtin","inserted"],style:{color:Xn.char}},{types:["function"],style:{color:Xn.function}},{types:["operator","entity","url","variable"],style:{color:Xn.variable}},{types:["keyword"],style:{color:Xn.keyword}},{types:["atrule","class-name"],style:{color:Xn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},yK=gK,bK={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},vK=bK,_K={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},xK=_K,wK={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},SK=wK,EK={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},kK=EK,CK={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},AK=CK,TK={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},UI=TK,NK={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},OK=NK,RK={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},jK=RK,MK={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},$K=MK,DK={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},IK=DK,PK={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},zK=PK,LK={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},qK=LK,FK={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},BK=FK,UK=e=>ee.useCallback(t=>{var n=t,{className:r,style:i,line:a}=n,o=FI(n,["className","style","line"]);const l=Tp(Wr({},o),{className:zI("token-line",r)});return typeof e=="object"&&"plain"in e&&(l.style=e.plain),typeof i=="object"&&(l.style=Wr(Wr({},l.style||{}),i)),l},[e]),HK=e=>{const t=ee.useCallback(({types:n,empty:r})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return r!=null?{display:"inline-block"}:void 0;if(n.length===1&&r!=null)return e[n[0]]}return Object.assign(r!=null?{display:"inline-block"}:{},...n.map(i=>e[i]))}},[e]);return ee.useCallback(n=>{var r=n,{token:i,className:a,style:o}=r,l=FI(r,["token","className","style"]);const c=Tp(Wr({},l),{className:zI("token",...i.types,a),children:i.content,style:t(i)});return o!=null&&(c.style=Wr(Wr({},c.style||{}),o)),c},[t])},VK=/\r\n|\r|\n/,wN=e=>{e.length===0?e.push({types:["plain"],content:`
90
+ `,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
91
+ `,e[0].empty=!0)},SN=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},GK=e=>{const t=[[]],n=[e],r=[0],i=[e.length];let a=0,o=0,l=[];const c=[l];for(;o>-1;){for(;(a=r[o]++)<i[o];){let f,d=t[o];const m=n[o][a];if(typeof m=="string"?(d=o>0?d:["plain"],f=m):(d=SN(d,m.type),m.alias&&(d=SN(d,m.alias)),f=m.content),typeof f!="string"){o++,t.push(d),n.push(f),r.push(0),i.push(f.length);continue}const g=f.split(VK),_=g.length;l.push({types:d,content:g[0]});for(let S=1;S<_;S++)wN(l),c.push(l=[]),l.push({types:d,content:g[S]})}o--,t.pop(),n.pop(),r.pop(),i.pop()}return wN(l),c},EN=GK,ZK=({prism:e,code:t,grammar:n,language:r})=>ee.useMemo(()=>{if(n==null)return EN([t]);const i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",i),EN(i.tokens)},[t,n,r,e]),YK=(e,t)=>{const{plain:n}=e,r=e.styles.reduce((i,a)=>{const{languages:o,style:l}=a;return o&&!o.includes(t)||a.types.forEach(c=>{const f=Wr(Wr({},i[c]),l);i[c]=f}),i},{});return r.root=n,r.plain=Tp(Wr({},n),{backgroundColor:void 0}),r},KK=YK,XK=({children:e,language:t,code:n,theme:r,prism:i})=>{const a=t.toLowerCase(),o=KK(r,a),l=UK(o),c=HK(o),f=i.languages[a],d=ZK({prism:i,language:a,code:n,grammar:f});return e({tokens:d,className:`prism-code language-${a}`,style:o!=null?o.root:{},getLineProps:l,getTokenProps:c})},WK=e=>ee.createElement(XK,Tp(Wr({},e),{prism:e.prism||ve,theme:e.theme||UI,code:e.code,language:e.language}));/*! Bundled license information:
92
+
93
+ prismjs/prism.js:
94
+ (**
95
+ * Prism: Lightweight, robust, elegant syntax highlighting
96
+ *
97
+ * @license MIT <https://opensource.org/licenses/MIT>
98
+ * @author Lea Verou <https://lea.verou.me>
99
+ * @namespace
100
+ * @public
101
+ *)
102
+ */const kN=["bg-white","bg-white","bg-white","bg-white","bg-white","bg-white","bg-white"],QK=e=>{let t=0;for(let r=0;r<e.length;r++)t=e.charCodeAt(r)+((t<<5)-t);const n=Math.abs(t%kN.length);return kN[n]},JK=({message:e,client:t,getMessageContent:n,formatTokens:r,isCollapsed:i,onToggleCollapse:a})=>{const{getToolUIRender:o}=js(),l=o(e.name),c=QK(e.name);return O.jsxs("div",{className:"flex flex-col w-full",children:[l?l(e):O.jsxs("div",{className:`flex flex-col w-full ${c} rounded-2xl overflow-hidden`,children:[O.jsx("div",{className:"flex items-center justify-between px-5 py-3 cursor-pointer hover:bg-gray-100 transition-colors",onClick:a,children:O.jsxs("div",{className:"text-xs font-medium text-gray-600",onClick:()=>console.log(e),children:[e.node_name," | ",e.name]})}),!i&&O.jsxs("div",{className:"flex flex-col gap-4 px-5 pb-4",children:[O.jsx(CN,{content:e.tool_input||""}),O.jsx(CN,{content:n(e.content)}),O.jsx(lS,{response_metadata:e.response_metadata,usage_metadata:e.usage_metadata||{},spend_time:e.spend_time,id:e.id,tool_call_id:e.tool_call_id})]})]}),e.sub_agent_messages&&O.jsx("div",{className:"flex flex-col pl-6 py-3 ml-4 border-l-2 border-gray-200",children:O.jsx(HI,{renderMessages:e.sub_agent_messages,collapsedTools:[],toggleToolCollapse:f=>{},client:t})})]})},CN=({content:e})=>{const t=()=>{try{return JSON.parse(e),!0}catch{return!1}},n=e.startsWith("{")&&e.endsWith("}")&&t(),r=e.includes("#")||e.includes("```")||e.includes("*"),[i,a]=ee.useState(n),[o,l]=ee.useState(!1),c=()=>{navigator.clipboard.writeText(e)};return O.jsxs("div",{className:"flex flex-col",children:[O.jsxs("div",{className:"flex gap-2 mb-2",children:[O.jsx("button",{onClick:c,className:"px-3 py-1 text-xs font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:"copy"}),n&&O.jsx("button",{onClick:()=>a(!i),className:"px-3 py-1 text-xs font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:"json"}),r&&O.jsx("button",{onClick:()=>l(!o),className:"px-3 py-1 text-xs font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:"markdown"})]}),O.jsx("div",{className:"flex flex-col max-h-[300px] overflow-auto bg-white border border-gray-200 rounded-xl p-3 w-full text-xs font-mono whitespace-pre-wrap",children:i&&n?O.jsx(WK,{code:JSON.stringify(JSON.parse(e),null,2),language:"json",theme:BI.oneLight,children:({className:f,style:d,tokens:p,getLineProps:m,getTokenProps:g})=>O.jsx("pre",{style:d,children:p.map((_,S)=>O.jsx("div",{...m({line:_}),children:_.map((b,x)=>O.jsx("span",{...g({token:b})},x))},S))})}):o&&r?O.jsx("div",{className:"markdown-body",children:O.jsx(cI,{remarkPlugins:[$I],children:e})}):O.jsx("pre",{className:"whitespace-pre-wrap",children:e})})]})},eX=e=>O.jsx("andypf-json-viewer",{indent:"4",expanded:"4",theme:"default-light","show-data-types":"false","show-toolbar":"false","expand-icon-type":"circle","show-copy":"true","show-size":"true",data:JSON.stringify(e.data)}),HI=({renderMessages:e,collapsedTools:t,toggleToolCollapse:n,client:r})=>{const i=js(),[a,o]=ee.useState(new Map),l=ee.useRef(new Map),c=ee.useCallback((g,_)=>{o(S=>{const b=new Map(S),x=b.get(g)||{showDetail:!1,showContextMenu:!1,contextMenuPosition:{x:0,y:0}};return b.set(g,{...x,..._}),b})},[]),f=ee.useCallback((g,_)=>{g.preventDefault(),c(_,{contextMenuPosition:{x:g.clientX,y:g.clientY},showContextMenu:!0})},[c]),d=ee.useCallback(g=>{c(g,{showContextMenu:!1})},[c]),p=ee.useCallback((g,_)=>{navigator.clipboard.writeText(Vh(_)),d(g)},[d]),m=ee.useCallback(g=>{o(_=>{const S=new Map(_),b=S.get(g);return b?S.set(g,{...b,showDetail:!b.showDetail,showContextMenu:!1}):S.set(g,{showDetail:!0,showContextMenu:!1,contextMenuPosition:{x:0,y:0}}),S})},[]);return ee.useEffect(()=>{const g=_=>{a.forEach((S,b)=>{if(S.showContextMenu){const x=l.current.get(b);x&&!x.contains(_.target)&&d(b)}})};return Array.from(a.values()).some(_=>_.showContextMenu)&&document.addEventListener("click",g),()=>{document.removeEventListener("click",g)}},[a,d]),O.jsx("div",{className:"flex flex-col gap-5 w-full",children:e.map((g,_)=>{const S=g.unique_id||`message-${_}`,b=a.get(S)||{showDetail:!1,showContextMenu:!1,contextMenuPosition:{x:0,y:0}};return O.jsxs("div",{ref:x=>{x&&l.current.set(S,x)},onContextMenu:x=>f(x,S),children:[g.type==="human"?O.jsx(Pq,{content:g.content}):g.type==="tool"?O.jsx(JK,{message:g,client:r,getMessageContent:Vh,formatTokens:_7,isCollapsed:t.includes(g.id),onToggleCollapse:()=>n(g.id)}):O.jsx(GY,{message:g}),b.showDetail&&O.jsx(eX,{data:g}),b.showContextMenu&&O.jsxs("div",{className:"fixed bg-white/95 backdrop-blur-sm rounded-xl z-50 py-2 min-w-[150px] overflow-hidden",style:{left:b.contextMenuPosition.x,top:b.contextMenuPosition.y},onClick:x=>x.stopPropagation(),children:[O.jsx("button",{className:"w-full bg-transparent px-4 py-2.5 text-left hover:bg-gray-100/80 text-sm text-gray-700 transition-colors",onClick:()=>p(S,g.content),children:"复制消息内容"}),O.jsx("button",{className:"w-full bg-transparent px-4 py-2.5 text-left hover:bg-gray-100/80 text-sm text-gray-700 transition-colors",onClick:()=>m(S),children:b.showDetail?"隐藏详情":"显示详情"}),O.jsx("button",{className:"w-full bg-transparent px-4 py-2.5 text-left hover:bg-gray-100/80 text-sm text-gray-700 transition-colors",onClick:()=>i.revertChatTo(S),children:"回滚到消息"}),O.jsx("button",{className:"w-full bg-transparent px-4 py-2.5 text-left hover:bg-gray-100/80 text-sm text-gray-700 transition-colors",onClick:()=>i.revertChatTo(S,!0),children:"重发消息"})]})]},S)})})};/**
103
+ * @license lucide-react v0.544.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const tX=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nX=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),AN=e=>{const t=nX(e);return t.charAt(0).toUpperCase()+t.slice(1)},VI=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),rX=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
108
+ * @license lucide-react v0.544.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */var iX={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
113
+ * @license lucide-react v0.544.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const aX=ee.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},c)=>ee.createElement("svg",{ref:c,...iX,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:VI("lucide",i),...!a&&!rX(l)&&{"aria-hidden":"true"},...l},[...o.map(([f,d])=>ee.createElement(f,d)),...Array.isArray(a)?a:[a]]));/**
118
+ * @license lucide-react v0.544.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const wn=(e,t)=>{const n=ee.forwardRef(({className:r,...i},a)=>ee.createElement(aX,{ref:a,iconNode:t,className:VI(`lucide-${tX(AN(e))}`,`lucide-${e}`,r),...i}));return n.displayName=AN(e),n};/**
123
+ * @license lucide-react v0.544.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const sX=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],GI=wn("chevron-down",sX);/**
128
+ * @license lucide-react v0.544.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const oX=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],lX=wn("cloud-upload",oX);/**
133
+ * @license lucide-react v0.544.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const uX=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],cX=wn("eye-off",uX);/**
138
+ * @license lucide-react v0.544.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const fX=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],dX=wn("eye",fX);/**
143
+ * @license lucide-react v0.544.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const hX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],pX=wn("file-json",hX);/**
148
+ * @license lucide-react v0.544.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const mX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],gX=wn("file-text",mX);/**
153
+ * @license lucide-react v0.544.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const yX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],bX=wn("file",yX);/**
158
+ * @license lucide-react v0.544.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const vX=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],_X=wn("history",vX);/**
163
+ * @license lucide-react v0.544.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const xX=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],wX=wn("network",xX);/**
168
+ * @license lucide-react v0.544.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const SX=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],EX=wn("plus",SX);/**
173
+ * @license lucide-react v0.544.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const kX=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],CX=wn("refresh-cw",kX);/**
178
+ * @license lucide-react v0.544.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const AX=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],TX=wn("rotate-ccw",AX);/**
183
+ * @license lucide-react v0.544.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const NX=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],OX=wn("send",NX);/**
188
+ * @license lucide-react v0.544.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const RX=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],jX=wn("settings",RX);/**
193
+ * @license lucide-react v0.544.0 - ISC
194
+ *
195
+ * This source code is licensed under the ISC license.
196
+ * See the LICENSE file in the root directory of this source tree.
197
+ */const MX=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],$X=wn("trash-2",MX);/**
198
+ * @license lucide-react v0.544.0 - ISC
199
+ *
200
+ * This source code is licensed under the ISC license.
201
+ * See the LICENSE file in the root directory of this source tree.
202
+ */const DX=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ZI=wn("x",DX),IX=({onClose:e})=>{const{historyList:t,currentChatId:n,refreshHistoryList:r,createNewChat:i,deleteHistoryChat:a,toHistoryChat:o}=js();return O.jsxs("section",{className:"bg-white h-full flex flex-col rounded-2xl shadow-lg shadow-gray-200",children:[O.jsxs("div",{className:"px-5 flex justify-between items-center py-6",children:[O.jsx("div",{className:"flex items-center gap-3",children:O.jsx("h3",{className:"m-0 text-base font-semibold text-gray-700",children:"历史记录"})}),O.jsx("button",{className:"p-2 rounded-lg bg-gray-100 hover:bg-gray-300 transition-colors flex items-center justify-center group",onClick:r,title:"刷新列表",children:O.jsx(CX,{className:"w-4 h-4 text-gray-600 group-hover:rotate-180 transition-transform duration-300"})}),O.jsx("button",{className:"p-2 rounded-lg bg-gray-100 hover:bg-gray-300 transition-colors flex items-center justify-center group",onClick:e,title:"关闭",children:O.jsx(ZI,{className:"w-4 h-4 text-red-500"})})]}),O.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-2",children:[O.jsx("div",{className:"cursor-pointer mb-3",onClick:()=>{i()},children:O.jsx("div",{className:"flex justify-between items-center px-4 py-3 rounded-xl bg-blue-50/80 hover:bg-blue-200/80 transition-colors",children:O.jsx("div",{className:"text-sm text-gray-700 font-medium truncate",children:"New Chat"})})}),t.length===0?O.jsx("div",{className:"text-center text-gray-400 py-10 text-sm",children:"暂无历史记录"}):O.jsx("div",{className:"flex flex-col gap-2",children:t.sort((l,c)=>new Date(c.created_at).getTime()-new Date(l.created_at).getTime()).map(l=>O.jsxs("div",{className:`flex justify-between items-center px-4 py-3 rounded-xl transition-colors ${l.thread_id===n?"bg-blue-50/80":"bg-gray-50/60 hover:bg-gray-200/80"}`,children:[O.jsxs("div",{className:"flex-1 min-w-0 mr-2",onClick:()=>{o(l)},children:[O.jsx("div",{className:"text-sm text-gray-700 mb-1 truncate max-w-[180px]",children:x7(l)}),O.jsxs("div",{className:"flex gap-3 text-xs text-gray-400",children:[O.jsx("span",{className:"truncate max-w-[100px]",children:v7(new Date(l.created_at))}),O.jsx("span",{className:"truncate max-w-[60px]",children:l.status})]})]}),O.jsxs("div",{className:"flex gap-1.5 shrink-0",children:[O.jsx("button",{className:"p-2 rounded-lg bg-white/60 hover:bg-gray-200 transition-colors flex items-center justify-center group",onClick:()=>{o(l)},title:"恢复对话",children:O.jsx(TX,{className:"w-3.5 h-3.5 text-gray-600 group-hover:-rotate-180 transition-transform duration-300"})}),O.jsx("button",{className:"p-2 rounded-lg bg-white/60 hover:bg-gray-200 transition-colors flex items-center justify-center group",onClick:async()=>{await a(l)},title:"删除对话",children:O.jsx($X,{className:"w-3.5 h-3.5 text-red-500"})})]})]},l.thread_id))})]})]})},YI=ee.createContext(void 0),PX=({children:e})=>{const[t,n]=ee.useState(()=>{const i=localStorage.getItem("extraParams");try{return i?JSON.parse(i):{}}catch(a){return console.error("Failed to parse extraParams from localStorage",a),{}}});ee.useEffect(()=>{localStorage.setItem("extraParams",JSON.stringify(t))},[t]);const r=i=>{n(i)};return O.jsx(YI.Provider,{value:{extraParams:t,setExtraParams:r},children:e})},KI=()=>{const e=ee.useContext(YI);if(e===void 0)throw new Error("useExtraParams must be used within an ExtraParamsProvider");return e};class zX{apiUrl;constructor(t={}){this.apiUrl=t.apiUrl||""}createFormData(t,n){const r=new FormData;if(typeof t=="string"){const i=new Blob([t],{type:"text/plain"});r.append("file",i,n||"file.txt")}else r.append("file",t,n||(t instanceof File?t.name:"file"));return r}async upload(t,n={}){const i={method:"POST",body:this.createFormData(t,n.filename)};n.signal&&(i.signal=n.signal);try{const a=await fetch(`${this.apiUrl}${this.getUploadEndpoint()}`,i);if(!a.ok)throw new Error(`Upload failed with status: ${a.status}`);const o=await a.json();return this.processResponse(o)}catch(a){throw new Error(`File upload failed: ${a instanceof Error?a.message:String(a)}`)}}}class LX extends zX{constructor(t={}){super({apiUrl:t.apiUrl||"https://tmpfiles.org/api/v1"})}getUploadEndpoint(){return"/upload"}processResponse(t){return t.data?.url&&(t.data.url=t.data.url.replace("//tmpfiles.org/","//tmpfiles.org/dl/")),t}}const qX=e=>e.type.startsWith("image/")?"image":e.type==="video/mp4"?"video":e.type.startsWith("audio/")?"audio":"other",FX=({onFileUploaded:e,onFileRemoved:t})=>{const[n,r]=ee.useState([]),i=new LX,a=3,o=ee.useCallback(async c=>{const d=Array.from(c.target.files||[]);if(n.length+d.length>a){alert(`最多只能上传${a}个文件`),c.target.value="";return}for(const p of d)try{const m=await i.upload(p);if(m.data?.url){const g=qX(p);if(g){const _={file:p,url:m.data.url,type:g};r(S=>[...S,_]),e(m.data.url,g)}}}catch(m){console.error("Upload failed:",m)}c.target.value=""},[e,n.length]),l=ee.useCallback(c=>{const f=n[c];f&&(r(d=>d.filter((p,m)=>m!==c)),t(f.url,f.type))},[n,t]);return O.jsxs("div",{className:"flex gap-2 flex-1",children:[n.length<a&&O.jsxs("label",{className:`inline-flex items-center justify-center text-gray-700 bg-white border border-gray-200 rounded-xl cursor-pointer transition-colors hover:bg-gray-100 hover:border-gray-300 ${n.length===0?"w-10 h-10":"w-20 h-20"}`,children:[O.jsx(lX,{size:n.length===0?20:32}),O.jsx("input",{type:"file",accept:"*",multiple:!0,onChange:o,className:"hidden"})]}),O.jsx("div",{className:"flex flex-wrap gap-2",children:n.map((c,f)=>{const{file:d,type:p,url:m}=c;return O.jsxs("div",{className:"relative w-20 h-20 rounded-xl overflow-hidden border border-gray-200",children:[p==="image"?O.jsx("img",{src:URL.createObjectURL(d),alt:d.name,className:"w-full h-full object-cover"}):p==="video"?O.jsx("video",{src:URL.createObjectURL(d),className:"w-full h-full object-cover"}):p==="audio"?O.jsx("div",{className:"w-full h-full bg-gray-100 flex items-center justify-center",children:O.jsx("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",className:"text-gray-500",children:O.jsx("path",{d:"M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"})})}):p==="other"?O.jsx("div",{className:"w-full h-full bg-gray-100 flex items-center justify-center",children:O.jsx("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",className:"text-gray-500",children:O.jsx("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})})}):null,O.jsx("button",{className:"absolute top-1 right-1 w-5 h-5 bg-red-500/90 text-white rounded-full flex items-center justify-center text-sm leading-none hover:bg-red-600 transition-colors backdrop-blur-sm",onClick:()=>l(f),children:"×"})]},f)})})]})},TN="json-editor-presets",NN="json-editor-active-tab",BX=({isOpen:e,initialJson:t,onClose:n,onSave:r,title:i,description:a})=>{const[o,l]=ee.useState([]),[c,f]=ee.useState(0),[d,p]=ee.useState(""),[m,g]=ee.useState(null),[_,S]=ee.useState(null),[b,x]=ee.useState("");if(ee.useEffect(()=>{if(e){let N=[];try{const $=localStorage.getItem(TN);N=$?JSON.parse($):[]}catch($){console.error("Failed to parse presets from localStorage",$),N=[]}N.length===0&&(N=[{name:"Default",data:t}]),l(N);let j=0;try{const $=localStorage.getItem(NN);if($){const M=parseInt($,10);M>=0&&M<N.length&&(j=M)}}catch($){console.error("Failed to parse active tab from localStorage",$)}f(j),g(null)}},[e,t]),ee.useEffect(()=>{e&&o.length>0&&o[c]&&(p(JSON.stringify(o[c].data,null,2)),g(null))},[c,o,e]),ee.useEffect(()=>{e&&localStorage.setItem(NN,c.toString())},[c,e]),!e)return null;const w=N=>{l(N),localStorage.setItem(TN,JSON.stringify(N))},v=()=>{const N={name:`Preset ${o.length+1}`,data:{}},j=[...o,N];w(j),f(j.length-1)},k=N=>{let j=o.filter(($,M)=>M!==N);j.length===0&&(j=[{name:"Default",data:t}]),w(j),c>=N&&c>0?f(c-1):c>=j.length&&f(j.length-1)},C=()=>{try{const N=JSON.parse(d),j=o.map(($,M)=>M===c?{...$,data:N}:$);w(j),r(N),n()}catch(N){g("JSON 格式无效,请检查后重试。"),console.error("Invalid JSON format:",N)}},T=N=>{if(b.trim()!==""){const j=o.map(($,M)=>M===N?{...$,name:b.trim()}:$);w(j),S(null)}};return O.jsx("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-50",children:O.jsxs("div",{className:"bg-white rounded-2xl w-full max-w-2xl mx-4 flex flex-col overflow-hidden",style:{height:"80vh"},children:[O.jsx("div",{className:"px-6 py-5 bg-white/80 backdrop-blur-sm",children:O.jsx("h2",{className:"text-lg font-semibold text-gray-800",children:i})}),O.jsx("div",{className:"px-6 py-4 text-sm text-gray-500",children:a}),O.jsxs("nav",{className:"flex-grow px-6 py-4 overflow-y-auto",children:[O.jsxs("div",{className:"flex items-center mb-4 gap-2",children:[o.map((N,j)=>O.jsxs("div",{className:`flex items-center px-4 py-2 rounded-xl cursor-pointer text-sm font-medium transition-colors ${c===j?"bg-blue-50 text-blue-600":"bg-gray-50 text-gray-600 hover:bg-gray-100"}`,onDoubleClick:()=>{S(j),x(N.name)},onClick:()=>f(j),children:[_===j?O.jsx("input",{type:"text",value:b,onChange:$=>x($.target.value),onBlur:()=>T(j),onKeyDown:$=>$.key==="Enter"&&T(j),className:"text-sm p-0 border-none focus:ring-0 bg-transparent",autoFocus:!0}):O.jsx("span",{children:N.name}),O.jsx("button",{onClick:$=>{$.stopPropagation(),k(j)},className:"ml-2 text-gray-400 hover:text-gray-600 w-4 h-4 flex items-center justify-center transition-colors",children:"×"})]},j)),O.jsx("button",{onClick:v,className:"px-3 py-2 text-sm text-gray-500 hover:text-gray-700 bg-gray-50 rounded-xl hover:bg-gray-100 transition-colors",children:"+"})]}),O.jsx("textarea",{value:d,onChange:N=>{p(N.target.value),g(null)},className:"w-full h-full px-4 py-3 bg-gray-50 rounded-xl font-mono text-sm focus:outline-none focus:bg-gray-100 transition-colors"}),m&&O.jsx("p",{className:"mt-2 text-sm text-red-600",children:m})]}),O.jsxs("div",{className:"flex justify-end gap-3 px-6 py-5 bg-gray-50/50",children:[O.jsx("button",{onClick:n,className:"px-5 py-2.5 text-sm font-medium text-gray-700 bg-white rounded-xl hover:bg-gray-100 focus:outline-none transition-colors",children:"取消"}),O.jsx("button",{onClick:C,className:"px-5 py-2.5 text-sm font-medium text-white bg-blue-500 rounded-xl hover:bg-blue-600 focus:outline-none transition-colors",children:"保存并使用"})]})]})})};function nn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=nn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var UX={value:()=>{}};function Np(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Th(n)}function Th(e){this._=e}function HX(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Th.prototype=Np.prototype={constructor:Th,on:function(e,t){var n=this._,r=HX(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=VX(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=ON(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ON(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Th(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function VX(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ON(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=UX,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Aw="http://www.w3.org/1999/xhtml";const RN={svg:"http://www.w3.org/2000/svg",xhtml:Aw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Op(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),RN.hasOwnProperty(t)?{space:RN[t],local:e}:e}function GX(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Aw&&t.documentElement.namespaceURI===Aw?t.createElement(e):t.createElementNS(n,e)}}function ZX(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function XI(e){var t=Op(e);return(t.local?ZX:GX)(t)}function YX(){}function NS(e){return e==null?YX:function(){return this.querySelector(e)}}function KX(e){typeof e!="function"&&(e=NS(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=new Array(o),c,f,d=0;d<o;++d)(c=a[d])&&(f=e.call(c,c.__data__,d,a))&&("__data__"in c&&(f.__data__=c.__data__),l[d]=f);return new or(r,this._parents)}function XX(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function WX(){return[]}function WI(e){return e==null?WX:function(){return this.querySelectorAll(e)}}function QX(e){return function(){return XX(e.apply(this,arguments))}}function JX(e){typeof e=="function"?e=QX(e):e=WI(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],l=o.length,c,f=0;f<l;++f)(c=o[f])&&(r.push(e.call(c,c.__data__,f,o)),i.push(c));return new or(r,i)}function QI(e){return function(){return this.matches(e)}}function JI(e){return function(t){return t.matches(e)}}var eW=Array.prototype.find;function tW(e){return function(){return eW.call(this.children,e)}}function nW(){return this.firstElementChild}function rW(e){return this.select(e==null?nW:tW(typeof e=="function"?e:JI(e)))}var iW=Array.prototype.filter;function aW(){return Array.from(this.children)}function sW(e){return function(){return iW.call(this.children,e)}}function oW(e){return this.selectAll(e==null?aW:sW(typeof e=="function"?e:JI(e)))}function lW(e){typeof e!="function"&&(e=QI(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],c,f=0;f<o;++f)(c=a[f])&&e.call(c,c.__data__,f,a)&&l.push(c);return new or(r,this._parents)}function e9(e){return new Array(e.length)}function uW(){return new or(this._enter||this._groups.map(e9),this._parents)}function Wh(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wh.prototype={constructor:Wh,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function cW(e){return function(){return e}}function fW(e,t,n,r,i,a){for(var o=0,l,c=t.length,f=a.length;o<f;++o)(l=t[o])?(l.__data__=a[o],r[o]=l):n[o]=new Wh(e,a[o]);for(;o<c;++o)(l=t[o])&&(i[o]=l)}function dW(e,t,n,r,i,a,o){var l,c,f=new Map,d=t.length,p=a.length,m=new Array(d),g;for(l=0;l<d;++l)(c=t[l])&&(m[l]=g=o.call(c,c.__data__,l,t)+"",f.has(g)?i[l]=c:f.set(g,c));for(l=0;l<p;++l)g=o.call(e,a[l],l,a)+"",(c=f.get(g))?(r[l]=c,c.__data__=a[l],f.delete(g)):n[l]=new Wh(e,a[l]);for(l=0;l<d;++l)(c=t[l])&&f.get(m[l])===c&&(i[l]=c)}function hW(e){return e.__data__}function pW(e,t){if(!arguments.length)return Array.from(this,hW);var n=t?dW:fW,r=this._parents,i=this._groups;typeof e!="function"&&(e=cW(e));for(var a=i.length,o=new Array(a),l=new Array(a),c=new Array(a),f=0;f<a;++f){var d=r[f],p=i[f],m=p.length,g=mW(e.call(d,d&&d.__data__,f,r)),_=g.length,S=l[f]=new Array(_),b=o[f]=new Array(_),x=c[f]=new Array(m);n(d,p,S,b,x,g,t);for(var w=0,v=0,k,C;w<_;++w)if(k=S[w]){for(w>=v&&(v=w+1);!(C=b[v])&&++v<_;);k._next=C||null}}return o=new or(o,r),o._enter=l,o._exit=c,o}function mW(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function gW(){return new or(this._exit||this._groups.map(e9),this._parents)}function yW(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function bW(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),l=new Array(i),c=0;c<o;++c)for(var f=n[c],d=r[c],p=f.length,m=l[c]=new Array(p),g,_=0;_<p;++_)(g=f[_]||d[_])&&(m[_]=g);for(;c<i;++c)l[c]=n[c];return new or(l,this._parents)}function vW(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function _W(e){e||(e=xW);function t(p,m){return p&&m?e(p.__data__,m.__data__):!p-!m}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],l=o.length,c=i[a]=new Array(l),f,d=0;d<l;++d)(f=o[d])&&(c[d]=f);c.sort(t)}return new or(i,this._parents).order()}function xW(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function wW(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function SW(){return Array.from(this)}function EW(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function kW(){let e=0;for(const t of this)++e;return e}function CW(){return!this.node()}function AW(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,l;a<o;++a)(l=i[a])&&e.call(l,l.__data__,a,i);return this}function TW(e){return function(){this.removeAttribute(e)}}function NW(e){return function(){this.removeAttributeNS(e.space,e.local)}}function OW(e,t){return function(){this.setAttribute(e,t)}}function RW(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function jW(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function MW(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function $W(e,t){var n=Op(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?NW:TW:typeof t=="function"?n.local?MW:jW:n.local?RW:OW)(n,t))}function t9(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function DW(e){return function(){this.style.removeProperty(e)}}function IW(e,t,n){return function(){this.style.setProperty(e,t,n)}}function PW(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function zW(e,t,n){return arguments.length>1?this.each((t==null?DW:typeof t=="function"?PW:IW)(e,t,n??"")):el(this.node(),e)}function el(e,t){return e.style.getPropertyValue(t)||t9(e).getComputedStyle(e,null).getPropertyValue(t)}function LW(e){return function(){delete this[e]}}function qW(e,t){return function(){this[e]=t}}function FW(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function BW(e,t){return arguments.length>1?this.each((t==null?LW:typeof t=="function"?FW:qW)(e,t)):this.node()[e]}function n9(e){return e.trim().split(/^|\s+/)}function OS(e){return e.classList||new r9(e)}function r9(e){this._node=e,this._names=n9(e.getAttribute("class")||"")}r9.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function i9(e,t){for(var n=OS(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function a9(e,t){for(var n=OS(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function UW(e){return function(){i9(this,e)}}function HW(e){return function(){a9(this,e)}}function VW(e,t){return function(){(t.apply(this,arguments)?i9:a9)(this,e)}}function GW(e,t){var n=n9(e+"");if(arguments.length<2){for(var r=OS(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?VW:t?UW:HW)(n,t))}function ZW(){this.textContent=""}function YW(e){return function(){this.textContent=e}}function KW(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function XW(e){return arguments.length?this.each(e==null?ZW:(typeof e=="function"?KW:YW)(e)):this.node().textContent}function WW(){this.innerHTML=""}function QW(e){return function(){this.innerHTML=e}}function JW(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function eQ(e){return arguments.length?this.each(e==null?WW:(typeof e=="function"?JW:QW)(e)):this.node().innerHTML}function tQ(){this.nextSibling&&this.parentNode.appendChild(this)}function nQ(){return this.each(tQ)}function rQ(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function iQ(){return this.each(rQ)}function aQ(e){var t=typeof e=="function"?e:XI(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function sQ(){return null}function oQ(e,t){var n=typeof e=="function"?e:XI(e),r=t==null?sQ:typeof t=="function"?t:NS(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function lQ(){var e=this.parentNode;e&&e.removeChild(this)}function uQ(){return this.each(lQ)}function cQ(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function fQ(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function dQ(e){return this.select(e?fQ:cQ)}function hQ(e){return arguments.length?this.property("__data__",e):this.node().__data__}function pQ(e){return function(t){e.call(this,t,this.__data__)}}function mQ(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function gQ(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function yQ(e,t,n){return function(){var r=this.__on,i,a=pQ(t);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function bQ(e,t,n){var r=mQ(e+""),i,a=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,f=l.length,d;c<f;++c)for(i=0,d=l[c];i<a;++i)if((o=r[i]).type===d.type&&o.name===d.name)return d.value}return}for(l=t?yQ:gQ,i=0;i<a;++i)this.each(l(r[i],t,n));return this}function s9(e,t,n){var r=t9(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function vQ(e,t){return function(){return s9(this,e,t)}}function _Q(e,t){return function(){return s9(this,e,t.apply(this,arguments))}}function xQ(e,t){return this.each((typeof t=="function"?_Q:vQ)(e,t))}function*wQ(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var o9=[null];function or(e,t){this._groups=e,this._parents=t}function Tc(){return new or([[document.documentElement]],o9)}function SQ(){return this}or.prototype=Tc.prototype={constructor:or,select:KX,selectAll:JX,selectChild:rW,selectChildren:oW,filter:lW,data:pW,enter:uW,exit:gW,join:yW,merge:bW,selection:SQ,order:vW,sort:_W,call:wW,nodes:SW,node:EW,size:kW,empty:CW,each:AW,attr:$W,style:zW,property:BW,classed:GW,text:XW,html:eQ,raise:nQ,lower:iQ,append:aQ,insert:oQ,remove:uQ,clone:dQ,datum:hQ,on:bQ,dispatch:xQ,[Symbol.iterator]:wQ};function er(e){return typeof e=="string"?new or([[document.querySelector(e)]],[document.documentElement]):new or([[e]],o9)}function EQ(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Rr(e,t){if(e=EQ(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const kQ={passive:!1},ac={capture:!0,passive:!1};function b0(e){e.stopImmediatePropagation()}function Ho(e){e.preventDefault(),e.stopImmediatePropagation()}function l9(e){var t=e.document.documentElement,n=er(e).on("dragstart.drag",Ho,ac);"onselectstart"in t?n.on("selectstart.drag",Ho,ac):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function u9(e,t){var n=e.document.documentElement,r=er(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ho,ac),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const kd=e=>()=>e;function Tw(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:l,dx:c,dy:f,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:d}})}Tw.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function CQ(e){return!e.ctrlKey&&!e.button}function AQ(){return this.parentNode}function TQ(e,t){return t??{x:e.x,y:e.y}}function NQ(){return navigator.maxTouchPoints||"ontouchstart"in this}function c9(){var e=CQ,t=AQ,n=TQ,r=NQ,i={},a=Np("start","drag","end"),o=0,l,c,f,d,p=0;function m(k){k.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",x,kQ).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(k,C){if(!(d||!e.call(this,k,C))){var T=v(this,t.call(this,k,C),k,C,"mouse");T&&(er(k.view).on("mousemove.drag",_,ac).on("mouseup.drag",S,ac),l9(k.view),b0(k),f=!1,l=k.clientX,c=k.clientY,T("start",k))}}function _(k){if(Ho(k),!f){var C=k.clientX-l,T=k.clientY-c;f=C*C+T*T>p}i.mouse("drag",k)}function S(k){er(k.view).on("mousemove.drag mouseup.drag",null),u9(k.view,f),Ho(k),i.mouse("end",k)}function b(k,C){if(e.call(this,k,C)){var T=k.changedTouches,N=t.call(this,k,C),j=T.length,$,M;for($=0;$<j;++$)(M=v(this,N,k,C,T[$].identifier,T[$]))&&(b0(k),M("start",k,T[$]))}}function x(k){var C=k.changedTouches,T=C.length,N,j;for(N=0;N<T;++N)(j=i[C[N].identifier])&&(Ho(k),j("drag",k,C[N]))}function w(k){var C=k.changedTouches,T=C.length,N,j;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),N=0;N<T;++N)(j=i[C[N].identifier])&&(b0(k),j("end",k,C[N]))}function v(k,C,T,N,j,$){var M=a.copy(),q=Rr($||T,C),F,B,I;if((I=n.call(k,new Tw("beforestart",{sourceEvent:T,target:m,identifier:j,active:o,x:q[0],y:q[1],dx:0,dy:0,dispatch:M}),N))!=null)return F=I.x-q[0]||0,B=I.y-q[1]||0,function V(H,G,X){var W=q,L;switch(H){case"start":i[j]=V,L=o++;break;case"end":delete i[j],--o;case"drag":q=Rr(X||G,C),L=o;break}M.call(H,k,new Tw(H,{sourceEvent:G,subject:I,target:m,identifier:j,active:L,x:q[0]+F,y:q[1]+B,dx:q[0]-W[0],dy:q[1]-W[1],dispatch:M}),N)}}return m.filter=function(k){return arguments.length?(e=typeof k=="function"?k:kd(!!k),m):e},m.container=function(k){return arguments.length?(t=typeof k=="function"?k:kd(k),m):t},m.subject=function(k){return arguments.length?(n=typeof k=="function"?k:kd(k),m):n},m.touchable=function(k){return arguments.length?(r=typeof k=="function"?k:kd(!!k),m):r},m.on=function(){var k=a.on.apply(a,arguments);return k===a?m:k},m.clickDistance=function(k){return arguments.length?(p=(k=+k)*k,m):Math.sqrt(p)},m}function RS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function f9(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Nc(){}var sc=.7,Qh=1/sc,Vo="\\s*([+-]?\\d+)\\s*",oc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",OQ=/^#([0-9a-f]{3,8})$/,RQ=new RegExp(`^rgb\\(${Vo},${Vo},${Vo}\\)$`),jQ=new RegExp(`^rgb\\(${Qr},${Qr},${Qr}\\)$`),MQ=new RegExp(`^rgba\\(${Vo},${Vo},${Vo},${oc}\\)$`),$Q=new RegExp(`^rgba\\(${Qr},${Qr},${Qr},${oc}\\)$`),DQ=new RegExp(`^hsl\\(${oc},${Qr},${Qr}\\)$`),IQ=new RegExp(`^hsla\\(${oc},${Qr},${Qr},${oc}\\)$`),jN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};RS(Nc,lc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:MN,formatHex:MN,formatHex8:PQ,formatHsl:zQ,formatRgb:$N,toString:$N});function MN(){return this.rgb().formatHex()}function PQ(){return this.rgb().formatHex8()}function zQ(){return d9(this).formatHsl()}function $N(){return this.rgb().formatRgb()}function lc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=OQ.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?DN(t):n===3?new Ln(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Cd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Cd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=RQ.exec(e))?new Ln(t[1],t[2],t[3],1):(t=jQ.exec(e))?new Ln(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=MQ.exec(e))?Cd(t[1],t[2],t[3],t[4]):(t=$Q.exec(e))?Cd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=DQ.exec(e))?zN(t[1],t[2]/100,t[3]/100,1):(t=IQ.exec(e))?zN(t[1],t[2]/100,t[3]/100,t[4]):jN.hasOwnProperty(e)?DN(jN[e]):e==="transparent"?new Ln(NaN,NaN,NaN,0):null}function DN(e){return new Ln(e>>16&255,e>>8&255,e&255,1)}function Cd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ln(e,t,n,r)}function LQ(e){return e instanceof Nc||(e=lc(e)),e?(e=e.rgb(),new Ln(e.r,e.g,e.b,e.opacity)):new Ln}function Nw(e,t,n,r){return arguments.length===1?LQ(e):new Ln(e,t,n,r??1)}function Ln(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}RS(Ln,Nw,f9(Nc,{brighter(e){return e=e==null?Qh:Math.pow(Qh,e),new Ln(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sc:Math.pow(sc,e),new Ln(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ln(_s(this.r),_s(this.g),_s(this.b),Jh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:IN,formatHex:IN,formatHex8:qQ,formatRgb:PN,toString:PN}));function IN(){return`#${vs(this.r)}${vs(this.g)}${vs(this.b)}`}function qQ(){return`#${vs(this.r)}${vs(this.g)}${vs(this.b)}${vs((isNaN(this.opacity)?1:this.opacity)*255)}`}function PN(){const e=Jh(this.opacity);return`${e===1?"rgb(":"rgba("}${_s(this.r)}, ${_s(this.g)}, ${_s(this.b)}${e===1?")":`, ${e})`}`}function Jh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _s(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vs(e){return e=_s(e),(e<16?"0":"")+e.toString(16)}function zN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jr(e,t,n,r)}function d9(e){if(e instanceof jr)return new jr(e.h,e.s,e.l,e.opacity);if(e instanceof Nc||(e=lc(e)),!e)return new jr;if(e instanceof jr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,c=(a+i)/2;return l?(t===a?o=(n-r)/l+(n<r)*6:n===a?o=(r-t)/l+2:o=(t-n)/l+4,l/=c<.5?a+i:2-a-i,o*=60):l=c>0&&c<1?0:o,new jr(o,l,c,e.opacity)}function FQ(e,t,n,r){return arguments.length===1?d9(e):new jr(e,t,n,r??1)}function jr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}RS(jr,FQ,f9(Nc,{brighter(e){return e=e==null?Qh:Math.pow(Qh,e),new jr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sc:Math.pow(sc,e),new jr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ln(v0(e>=240?e-240:e+120,i,r),v0(e,i,r),v0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new jr(LN(this.h),Ad(this.s),Ad(this.l),Jh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Jh(this.opacity);return`${e===1?"hsl(":"hsla("}${LN(this.h)}, ${Ad(this.s)*100}%, ${Ad(this.l)*100}%${e===1?")":`, ${e})`}`}}));function LN(e){return e=(e||0)%360,e<0?e+360:e}function Ad(e){return Math.max(0,Math.min(1,e||0))}function v0(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const h9=e=>()=>e;function BQ(e,t){return function(n){return e+n*t}}function UQ(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function HQ(e){return(e=+e)==1?p9:function(t,n){return n-t?UQ(t,n,e):h9(isNaN(t)?n:t)}}function p9(e,t){var n=t-e;return n?BQ(e,n):h9(isNaN(e)?t:e)}const qN=function e(t){var n=HQ(t);function r(i,a){var o=n((i=Nw(i)).r,(a=Nw(a)).r),l=n(i.g,a.g),c=n(i.b,a.b),f=p9(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=l(d),i.b=c(d),i.opacity=f(d),i+""}}return r.gamma=e,r}(1);function Na(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Ow=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_0=new RegExp(Ow.source,"g");function VQ(e){return function(){return e}}function GQ(e){return function(t){return e(t)+""}}function ZQ(e,t){var n=Ow.lastIndex=_0.lastIndex=0,r,i,a,o=-1,l=[],c=[];for(e=e+"",t=t+"";(r=Ow.exec(e))&&(i=_0.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:Na(r,i)})),n=_0.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?c[0]?GQ(c[0].x):VQ(t):(t=c.length,function(f){for(var d=0,p;d<t;++d)l[(p=c[d]).i]=p.x(f);return l.join("")})}var FN=180/Math.PI,Rw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function m9(e,t,n,r,i,a){var o,l,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*FN,skewX:Math.atan(c)*FN,scaleX:o,scaleY:l}}var Td;function YQ(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Rw:m9(t.a,t.b,t.c,t.d,t.e,t.f)}function KQ(e){return e==null||(Td||(Td=document.createElementNS("http://www.w3.org/2000/svg","g")),Td.setAttribute("transform",e),!(e=Td.transform.baseVal.consolidate()))?Rw:(e=e.matrix,m9(e.a,e.b,e.c,e.d,e.e,e.f))}function g9(e,t,n,r){function i(f){return f.length?f.pop()+" ":""}function a(f,d,p,m,g,_){if(f!==p||d!==m){var S=g.push("translate(",null,t,null,n);_.push({i:S-4,x:Na(f,p)},{i:S-2,x:Na(d,m)})}else(p||m)&&g.push("translate("+p+t+m+n)}function o(f,d,p,m){f!==d?(f-d>180?d+=360:d-f>180&&(f+=360),m.push({i:p.push(i(p)+"rotate(",null,r)-2,x:Na(f,d)})):d&&p.push(i(p)+"rotate("+d+r)}function l(f,d,p,m){f!==d?m.push({i:p.push(i(p)+"skewX(",null,r)-2,x:Na(f,d)}):d&&p.push(i(p)+"skewX("+d+r)}function c(f,d,p,m,g,_){if(f!==p||d!==m){var S=g.push(i(g)+"scale(",null,",",null,")");_.push({i:S-4,x:Na(f,p)},{i:S-2,x:Na(d,m)})}else(p!==1||m!==1)&&g.push(i(g)+"scale("+p+","+m+")")}return function(f,d){var p=[],m=[];return f=e(f),d=e(d),a(f.translateX,f.translateY,d.translateX,d.translateY,p,m),o(f.rotate,d.rotate,p,m),l(f.skewX,d.skewX,p,m),c(f.scaleX,f.scaleY,d.scaleX,d.scaleY,p,m),f=d=null,function(g){for(var _=-1,S=m.length,b;++_<S;)p[(b=m[_]).i]=b.x(g);return p.join("")}}}var XQ=g9(YQ,"px, ","px)","deg)"),WQ=g9(KQ,", ",")",")"),QQ=1e-12;function BN(e){return((e=Math.exp(e))+1/e)/2}function JQ(e){return((e=Math.exp(e))-1/e)/2}function eJ(e){return((e=Math.exp(2*e))-1)/(e+1)}const tJ=function e(t,n,r){function i(a,o){var l=a[0],c=a[1],f=a[2],d=o[0],p=o[1],m=o[2],g=d-l,_=p-c,S=g*g+_*_,b,x;if(S<QQ)x=Math.log(m/f)/t,b=function(N){return[l+N*g,c+N*_,f*Math.exp(t*N*x)]};else{var w=Math.sqrt(S),v=(m*m-f*f+r*S)/(2*f*n*w),k=(m*m-f*f-r*S)/(2*m*n*w),C=Math.log(Math.sqrt(v*v+1)-v),T=Math.log(Math.sqrt(k*k+1)-k);x=(T-C)/t,b=function(N){var j=N*x,$=BN(C),M=f/(n*w)*($*eJ(t*j+C)-JQ(C));return[l+M*g,c+M*_,f*$/BN(t*j+C)]}}return b.duration=x*1e3*t/Math.SQRT2,b}return i.rho=function(a){var o=Math.max(.001,+a),l=o*o,c=l*l;return e(o,l,c)},i}(Math.SQRT2,2,4);var tl=0,Lu=0,Cu=0,y9=1e3,ep,qu,tp=0,Cs=0,Rp=0,uc=typeof performance=="object"&&performance.now?performance:Date,b9=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function jS(){return Cs||(b9(nJ),Cs=uc.now()+Rp)}function nJ(){Cs=0}function np(){this._call=this._time=this._next=null}np.prototype=v9.prototype={constructor:np,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?jS():+n)+(t==null?0:+t),!this._next&&qu!==this&&(qu?qu._next=this:ep=this,qu=this),this._call=e,this._time=n,jw()},stop:function(){this._call&&(this._call=null,this._time=1/0,jw())}};function v9(e,t,n){var r=new np;return r.restart(e,t,n),r}function rJ(){jS(),++tl;for(var e=ep,t;e;)(t=Cs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--tl}function UN(){Cs=(tp=uc.now())+Rp,tl=Lu=0;try{rJ()}finally{tl=0,aJ(),Cs=0}}function iJ(){var e=uc.now(),t=e-tp;t>y9&&(Rp-=t,tp=e)}function aJ(){for(var e,t=ep,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ep=n);qu=e,jw(r)}function jw(e){if(!tl){Lu&&(Lu=clearTimeout(Lu));var t=e-Cs;t>24?(e<1/0&&(Lu=setTimeout(UN,e-uc.now()-Rp)),Cu&&(Cu=clearInterval(Cu))):(Cu||(tp=uc.now(),Cu=setInterval(iJ,y9)),tl=1,b9(UN))}}function HN(e,t,n){var r=new np;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var sJ=Np("start","end","cancel","interrupt"),oJ=[],_9=0,VN=1,Mw=2,Nh=3,GN=4,$w=5,Oh=6;function jp(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;lJ(e,n,{name:t,index:r,group:i,on:sJ,tween:oJ,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:_9})}function MS(e,t){var n=zr(e,t);if(n.state>_9)throw new Error("too late; already scheduled");return n}function ni(e,t){var n=zr(e,t);if(n.state>Nh)throw new Error("too late; already running");return n}function zr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function lJ(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=v9(a,0,n.time);function a(f){n.state=VN,n.timer.restart(o,n.delay,n.time),n.delay<=f&&o(f-n.delay)}function o(f){var d,p,m,g;if(n.state!==VN)return c();for(d in r)if(g=r[d],g.name===n.name){if(g.state===Nh)return HN(o);g.state===GN?(g.state=Oh,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=Oh,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(HN(function(){n.state===Nh&&(n.state=GN,n.timer.restart(l,n.delay,n.time),l(f))}),n.state=Mw,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Mw){for(n.state=Nh,i=new Array(m=n.tween.length),d=0,p=-1;d<m;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++p]=g);i.length=p+1}}function l(f){for(var d=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(c),n.state=$w,1),p=-1,m=i.length;++p<m;)i[p].call(e,d);n.state===$w&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Oh,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Rh(e,t){var n=e.__transition,r,i,a=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>Mw&&r.state<$w,r.state=Oh,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function uJ(e){return this.each(function(){Rh(this,e)})}function cJ(e,t){var n,r;return function(){var i=ni(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,l=r.length;o<l;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function fJ(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=ni(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:t,value:n},c=0,f=i.length;c<f;++c)if(i[c].name===t){i[c]=l;break}c===f&&i.push(l)}a.tween=i}}function dJ(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=zr(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?cJ:fJ)(n,e,t))}function $S(e,t,n){var r=e._id;return e.each(function(){var i=ni(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return zr(i,r).value[t]}}function x9(e,t){var n;return(typeof t=="number"?Na:t instanceof lc?qN:(n=lc(t))?(t=n,qN):ZQ)(e,t)}function hJ(e){return function(){this.removeAttribute(e)}}function pJ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mJ(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function gJ(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function yJ(e,t,n){var r,i,a;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=l+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,l)))}}function bJ(e,t,n){var r,i,a;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=l+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,l)))}}function vJ(e,t){var n=Op(e),r=n==="transform"?WQ:x9;return this.attrTween(e,typeof t=="function"?(n.local?bJ:yJ)(n,r,$S(this,"attr."+e,t)):t==null?(n.local?pJ:hJ)(n):(n.local?gJ:mJ)(n,r,t))}function _J(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function xJ(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function wJ(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&xJ(e,a)),n}return i._value=t,i}function SJ(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&_J(e,a)),n}return i._value=t,i}function EJ(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Op(e);return this.tween(n,(r.local?wJ:SJ)(r,t))}function kJ(e,t){return function(){MS(this,e).delay=+t.apply(this,arguments)}}function CJ(e,t){return t=+t,function(){MS(this,e).delay=t}}function AJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?kJ:CJ)(t,e)):zr(this.node(),t).delay}function TJ(e,t){return function(){ni(this,e).duration=+t.apply(this,arguments)}}function NJ(e,t){return t=+t,function(){ni(this,e).duration=t}}function OJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?TJ:NJ)(t,e)):zr(this.node(),t).duration}function RJ(e,t){if(typeof t!="function")throw new Error;return function(){ni(this,e).ease=t}}function jJ(e){var t=this._id;return arguments.length?this.each(RJ(t,e)):zr(this.node(),t).ease}function MJ(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ni(this,e).ease=n}}function $J(e){if(typeof e!="function")throw new Error;return this.each(MJ(this._id,e))}function DJ(e){typeof e!="function"&&(e=QI(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],c,f=0;f<o;++f)(c=a[f])&&e.call(c,c.__data__,f,a)&&l.push(c);return new Li(r,this._parents,this._name,this._id)}function IJ(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var c=t[l],f=n[l],d=c.length,p=o[l]=new Array(d),m,g=0;g<d;++g)(m=c[g]||f[g])&&(p[g]=m);for(;l<r;++l)o[l]=t[l];return new Li(o,this._parents,this._name,this._id)}function PJ(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function zJ(e,t,n){var r,i,a=PJ(t)?MS:ni;return function(){var o=a(this,e),l=o.on;l!==r&&(i=(r=l).copy()).on(t,n),o.on=i}}function LJ(e,t){var n=this._id;return arguments.length<2?zr(this.node(),n).on.on(e):this.each(zJ(n,e,t))}function qJ(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function FJ(){return this.on("end.remove",qJ(this._id))}function BJ(e){var t=this._name,n=this._id;typeof e!="function"&&(e=NS(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l=r[o],c=l.length,f=a[o]=new Array(c),d,p,m=0;m<c;++m)(d=l[m])&&(p=e.call(d,d.__data__,m,l))&&("__data__"in d&&(p.__data__=d.__data__),f[m]=p,jp(f[m],t,n,m,f,zr(d,n)));return new Li(a,this._parents,t,n)}function UJ(e){var t=this._name,n=this._id;typeof e!="function"&&(e=WI(e));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var c=r[l],f=c.length,d,p=0;p<f;++p)if(d=c[p]){for(var m=e.call(d,d.__data__,p,c),g,_=zr(d,n),S=0,b=m.length;S<b;++S)(g=m[S])&&jp(g,t,n,S,m,_);a.push(m),o.push(d)}return new Li(a,o,t,n)}var HJ=Tc.prototype.constructor;function VJ(){return new HJ(this._groups,this._parents)}function GJ(e,t){var n,r,i;return function(){var a=el(this,e),o=(this.style.removeProperty(e),el(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function w9(e){return function(){this.style.removeProperty(e)}}function ZJ(e,t,n){var r,i=n+"",a;return function(){var o=el(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function YJ(e,t,n){var r,i,a;return function(){var o=el(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),el(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,l))}}function KJ(e,t){var n,r,i,a="style."+t,o="end."+a,l;return function(){var c=ni(this,e),f=c.on,d=c.value[a]==null?l||(l=w9(t)):void 0;(f!==n||i!==d)&&(r=(n=f).copy()).on(o,i=d),c.on=r}}function XJ(e,t,n){var r=(e+="")=="transform"?XQ:x9;return t==null?this.styleTween(e,GJ(e,r)).on("end.style."+e,w9(e)):typeof t=="function"?this.styleTween(e,YJ(e,r,$S(this,"style."+e,t))).each(KJ(this._id,e)):this.styleTween(e,ZJ(e,r,t),n).on("end.style."+e,null)}function WJ(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function QJ(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&WJ(e,o,n)),r}return a._value=t,a}function JJ(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,QJ(e,t,n??""))}function eee(e){return function(){this.textContent=e}}function tee(e){return function(){var t=e(this);this.textContent=t??""}}function nee(e){return this.tween("text",typeof e=="function"?tee($S(this,"text",e)):eee(e==null?"":e+""))}function ree(e){return function(t){this.textContent=e.call(this,t)}}function iee(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&ree(i)),t}return r._value=e,r}function aee(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,iee(e))}function see(){for(var e=this._name,t=this._id,n=S9(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,c,f=0;f<l;++f)if(c=o[f]){var d=zr(c,t);jp(c,e,n,f,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Li(r,this._parents,e,n)}function oee(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var l={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var f=ni(this,r),d=f.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),f.on=t}),i===0&&a()})}var lee=0;function Li(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function S9(){return++lee}var Ti=Tc.prototype;Li.prototype={constructor:Li,select:BJ,selectAll:UJ,selectChild:Ti.selectChild,selectChildren:Ti.selectChildren,filter:DJ,merge:IJ,selection:VJ,transition:see,call:Ti.call,nodes:Ti.nodes,node:Ti.node,size:Ti.size,empty:Ti.empty,each:Ti.each,on:LJ,attr:vJ,attrTween:EJ,style:XJ,styleTween:JJ,text:nee,textTween:aee,remove:FJ,tween:dJ,delay:AJ,duration:OJ,ease:jJ,easeVarying:$J,end:oee,[Symbol.iterator]:Ti[Symbol.iterator]};function uee(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var cee={time:null,delay:0,duration:250,ease:uee};function fee(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function dee(e){var t,n;e instanceof Li?(t=e._id,e=e._name):(t=S9(),(n=cee).time=jS(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,c,f=0;f<l;++f)(c=o[f])&&jp(c,e,t,f,o,n||fee(c,t));return new Li(r,this._parents,e,t)}Tc.prototype.interrupt=uJ;Tc.prototype.transition=dee;const Nd=e=>()=>e;function hee(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Mi(e,t,n){this.k=e,this.x=t,this.y=n}Mi.prototype={constructor:Mi,scale:function(e){return e===1?this:new Mi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Mi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mp=new Mi(1,0,0);E9.prototype=Mi.prototype;function E9(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Mp;return e.__zoom}function x0(e){e.stopImmediatePropagation()}function Au(e){e.preventDefault(),e.stopImmediatePropagation()}function pee(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function mee(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function ZN(){return this.__zoom||Mp}function gee(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function yee(){return navigator.maxTouchPoints||"ontouchstart"in this}function bee(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function k9(){var e=pee,t=mee,n=bee,r=gee,i=yee,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=tJ,f=Np("start","zoom","end"),d,p,m,g=500,_=150,S=0,b=10;function x(I){I.property("__zoom",ZN).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",M).filter(i).on("touchstart.zoom",q).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(I,V,H,G){var X=I.selection?I.selection():I;X.property("__zoom",ZN),I!==X?C(I,V,H,G):X.interrupt().each(function(){T(this,arguments).event(G).start().zoom(null,typeof V=="function"?V.apply(this,arguments):V).end()})},x.scaleBy=function(I,V,H,G){x.scaleTo(I,function(){var X=this.__zoom.k,W=typeof V=="function"?V.apply(this,arguments):V;return X*W},H,G)},x.scaleTo=function(I,V,H,G){x.transform(I,function(){var X=t.apply(this,arguments),W=this.__zoom,L=H==null?k(X):typeof H=="function"?H.apply(this,arguments):H,P=W.invert(L),Z=typeof V=="function"?V.apply(this,arguments):V;return n(v(w(W,Z),L,P),X,o)},H,G)},x.translateBy=function(I,V,H,G){x.transform(I,function(){return n(this.__zoom.translate(typeof V=="function"?V.apply(this,arguments):V,typeof H=="function"?H.apply(this,arguments):H),t.apply(this,arguments),o)},null,G)},x.translateTo=function(I,V,H,G,X){x.transform(I,function(){var W=t.apply(this,arguments),L=this.__zoom,P=G==null?k(W):typeof G=="function"?G.apply(this,arguments):G;return n(Mp.translate(P[0],P[1]).scale(L.k).translate(typeof V=="function"?-V.apply(this,arguments):-V,typeof H=="function"?-H.apply(this,arguments):-H),W,o)},G,X)};function w(I,V){return V=Math.max(a[0],Math.min(a[1],V)),V===I.k?I:new Mi(V,I.x,I.y)}function v(I,V,H){var G=V[0]-H[0]*I.k,X=V[1]-H[1]*I.k;return G===I.x&&X===I.y?I:new Mi(I.k,G,X)}function k(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function C(I,V,H,G){I.on("start.zoom",function(){T(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(G).end()}).tween("zoom",function(){var X=this,W=arguments,L=T(X,W).event(G),P=t.apply(X,W),Z=H==null?k(P):typeof H=="function"?H.apply(X,W):H,R=Math.max(P[1][0]-P[0][0],P[1][1]-P[0][1]),D=X.__zoom,U=typeof V=="function"?V.apply(X,W):V,Y=c(D.invert(Z).concat(R/D.k),U.invert(Z).concat(R/U.k));return function(ne){if(ne===1)ne=U;else{var ae=Y(ne),re=R/ae[2];ne=new Mi(re,Z[0]-ae[0]*re,Z[1]-ae[1]*re)}L.zoom(null,ne)}})}function T(I,V,H){return!H&&I.__zooming||new N(I,V)}function N(I,V){this.that=I,this.args=V,this.active=0,this.sourceEvent=null,this.extent=t.apply(I,V),this.taps=0}N.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,V){return this.mouse&&I!=="mouse"&&(this.mouse[1]=V.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=V.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=V.invert(this.touch1[0])),this.that.__zoom=V,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var V=er(this.that).datum();f.call(I,this.that,new hee(I,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:f}),V)}};function j(I,...V){if(!e.apply(this,arguments))return;var H=T(this,V).event(I),G=this.__zoom,X=Math.max(a[0],Math.min(a[1],G.k*Math.pow(2,r.apply(this,arguments)))),W=Rr(I);if(H.wheel)(H.mouse[0][0]!==W[0]||H.mouse[0][1]!==W[1])&&(H.mouse[1]=G.invert(H.mouse[0]=W)),clearTimeout(H.wheel);else{if(G.k===X)return;H.mouse=[W,G.invert(W)],Rh(this),H.start()}Au(I),H.wheel=setTimeout(L,_),H.zoom("mouse",n(v(w(G,X),H.mouse[0],H.mouse[1]),H.extent,o));function L(){H.wheel=null,H.end()}}function $(I,...V){if(m||!e.apply(this,arguments))return;var H=I.currentTarget,G=T(this,V,!0).event(I),X=er(I.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",R,!0),W=Rr(I,H),L=I.clientX,P=I.clientY;l9(I.view),x0(I),G.mouse=[W,this.__zoom.invert(W)],Rh(this),G.start();function Z(D){if(Au(D),!G.moved){var U=D.clientX-L,Y=D.clientY-P;G.moved=U*U+Y*Y>S}G.event(D).zoom("mouse",n(v(G.that.__zoom,G.mouse[0]=Rr(D,H),G.mouse[1]),G.extent,o))}function R(D){X.on("mousemove.zoom mouseup.zoom",null),u9(D.view,G.moved),Au(D),G.event(D).end()}}function M(I,...V){if(e.apply(this,arguments)){var H=this.__zoom,G=Rr(I.changedTouches?I.changedTouches[0]:I,this),X=H.invert(G),W=H.k*(I.shiftKey?.5:2),L=n(v(w(H,W),G,X),t.apply(this,V),o);Au(I),l>0?er(this).transition().duration(l).call(C,L,G,I):er(this).call(x.transform,L,G,I)}}function q(I,...V){if(e.apply(this,arguments)){var H=I.touches,G=H.length,X=T(this,V,I.changedTouches.length===G).event(I),W,L,P,Z;for(x0(I),L=0;L<G;++L)P=H[L],Z=Rr(P,this),Z=[Z,this.__zoom.invert(Z),P.identifier],X.touch0?!X.touch1&&X.touch0[2]!==Z[2]&&(X.touch1=Z,X.taps=0):(X.touch0=Z,W=!0,X.taps=1+!!d);d&&(d=clearTimeout(d)),W&&(X.taps<2&&(p=Z[0],d=setTimeout(function(){d=null},g)),Rh(this),X.start())}}function F(I,...V){if(this.__zooming){var H=T(this,V).event(I),G=I.changedTouches,X=G.length,W,L,P,Z;for(Au(I),W=0;W<X;++W)L=G[W],P=Rr(L,this),H.touch0&&H.touch0[2]===L.identifier?H.touch0[0]=P:H.touch1&&H.touch1[2]===L.identifier&&(H.touch1[0]=P);if(L=H.that.__zoom,H.touch1){var R=H.touch0[0],D=H.touch0[1],U=H.touch1[0],Y=H.touch1[1],ne=(ne=U[0]-R[0])*ne+(ne=U[1]-R[1])*ne,ae=(ae=Y[0]-D[0])*ae+(ae=Y[1]-D[1])*ae;L=w(L,Math.sqrt(ne/ae)),P=[(R[0]+U[0])/2,(R[1]+U[1])/2],Z=[(D[0]+Y[0])/2,(D[1]+Y[1])/2]}else if(H.touch0)P=H.touch0[0],Z=H.touch0[1];else return;H.zoom("touch",n(v(L,P,Z),H.extent,o))}}function B(I,...V){if(this.__zooming){var H=T(this,V).event(I),G=I.changedTouches,X=G.length,W,L;for(x0(I),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),W=0;W<X;++W)L=G[W],H.touch0&&H.touch0[2]===L.identifier?delete H.touch0:H.touch1&&H.touch1[2]===L.identifier&&delete H.touch1;if(H.touch1&&!H.touch0&&(H.touch0=H.touch1,delete H.touch1),H.touch0)H.touch0[1]=this.__zoom.invert(H.touch0[0]);else if(H.end(),H.taps===2&&(L=Rr(L,this),Math.hypot(p[0]-L[0],p[1]-L[1])<b)){var P=er(this).on("dblclick.zoom");P&&P.apply(this,arguments)}}}return x.wheelDelta=function(I){return arguments.length?(r=typeof I=="function"?I:Nd(+I),x):r},x.filter=function(I){return arguments.length?(e=typeof I=="function"?I:Nd(!!I),x):e},x.touchable=function(I){return arguments.length?(i=typeof I=="function"?I:Nd(!!I),x):i},x.extent=function(I){return arguments.length?(t=typeof I=="function"?I:Nd([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),x):t},x.scaleExtent=function(I){return arguments.length?(a[0]=+I[0],a[1]=+I[1],x):[a[0],a[1]]},x.translateExtent=function(I){return arguments.length?(o[0][0]=+I[0][0],o[1][0]=+I[1][0],o[0][1]=+I[0][1],o[1][1]=+I[1][1],x):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},x.constrain=function(I){return arguments.length?(n=I,x):n},x.duration=function(I){return arguments.length?(l=+I,x):l},x.interpolate=function(I){return arguments.length?(c=I,x):c},x.on=function(){var I=f.on.apply(f,arguments);return I===f?x:I},x.clickDistance=function(I){return arguments.length?(S=(I=+I)*I,x):Math.sqrt(S)},x.tapDistance=function(I){return arguments.length?(b=+I,x):b},x}const ei={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},cc=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],C9=["Enter"," ","Escape"];var nl;(function(e){e.Strict="strict",e.Loose="loose"})(nl||(nl={}));var xs;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(xs||(xs={}));var fc;(function(e){e.Partial="partial",e.Full="full"})(fc||(fc={}));const A9={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Oa;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Oa||(Oa={}));var rp;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(rp||(rp={}));var Ie;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ie||(Ie={}));const YN={[Ie.Left]:Ie.Right,[Ie.Right]:Ie.Left,[Ie.Top]:Ie.Bottom,[Ie.Bottom]:Ie.Top};function T9(e){return e===null?null:e?"valid":"invalid"}const N9=e=>"id"in e&&"source"in e&&"target"in e,vee=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),DS=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Oc=(e,t=[0,0])=>{const{width:n,height:r}=Hi(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},_ee=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const a=typeof i=="string";let o=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(o=a?t.nodeLookup.get(i):DS(i)?i:t.nodeLookup.get(i.id));const l=o?ip(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return $p(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Dp(n)},Rc=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(r=>{if(t.filter===void 0||t.filter(r)){const i=ip(r);n=$p(n,i)}}),Dp(n)},O9=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{const l={...jc(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];for(const f of e.values()){const{measured:d,selectable:p=!0,hidden:m=!1}=f;if(o&&!p||m)continue;const g=d.width??f.width??f.initialWidth??null,_=d.height??f.height??f.initialHeight??null,S=dc(l,il(f)),b=(g??0)*(_??0),x=a&&S>0;(!f.internals.handleBounds||x||S>=b||f.dragging)&&c.push(f)}return c},xee=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function wee(e,t){const n=new Map,r=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(t?.includeHiddenNodes||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function See({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);const l=wee(e,o),c=Rc(l),f=IS(c,t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(f,{duration:o?.duration}),Promise.resolve(!0)}function R9({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){const o=n.get(e),l=o.parentId?n.get(o.parentId):void 0,{x:c,y:f}=l?l.internals.positionAbsolute:{x:0,y:0},d=o.origin??r;let p=i;if(o.extent==="parent"&&!o.expandParent)if(!l)a?.("005",ei.error005());else{const g=l.measured.width,_=l.measured.height;g&&_&&(p=[[c,f],[c+g,f+_]])}else l&&al(o.extent)&&(p=[[o.extent[0][0]+c,o.extent[0][1]+f],[o.extent[1][0]+c,o.extent[1][1]+f]]);const m=al(p)?As(t,p,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.("015",ei.error015()),{position:{x:m.x-c+(o.measured.width??0)*d[0],y:m.y-f+(o.measured.height??0)*d[1]},positionAbsolute:m}}async function Eee({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const a=new Set(e.map(m=>m.id)),o=[];for(const m of n){if(m.deletable===!1)continue;const g=a.has(m.id),_=!g&&m.parentId&&o.find(S=>S.id===m.parentId);(g||_)&&o.push(m)}const l=new Set(t.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),d=xee(o,c);for(const m of c)l.has(m.id)&&!d.find(_=>_.id===m.id)&&d.push(m);if(!i)return{edges:d,nodes:o};const p=await i({nodes:o,edges:d});return typeof p=="boolean"?p?{edges:d,nodes:o}:{edges:[],nodes:[]}:p}const rl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),As=(e={x:0,y:0},t,n)=>({x:rl(e.x,t[0][0],t[1][0]-(n?.width??0)),y:rl(e.y,t[0][1],t[1][1]-(n?.height??0))});function j9(e,t,n){const{width:r,height:i}=Hi(n),{x:a,y:o}=n.internals.positionAbsolute;return As(e,[[a,o],[a+r,o+i]],t)}const KN=(e,t,n)=>e<t?rl(Math.abs(e-t),1,t)/t:e>n?-rl(Math.abs(e-n),1,t)/t:0,M9=(e,t,n=15,r=40)=>{const i=KN(e.x,r,t.width-r)*n,a=KN(e.y,r,t.height-r)*n;return[i,a]},$p=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Dw=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Dp=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),il=(e,t=[0,0])=>{const{x:n,y:r}=DS(e)?e.internals.positionAbsolute:Oc(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},ip=(e,t=[0,0])=>{const{x:n,y:r}=DS(e)?e.internals.positionAbsolute:Oc(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},$9=(e,t)=>Dp($p(Dw(e),Dw(t))),dc=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},XN=e=>Mr(e.width)&&Mr(e.height)&&Mr(e.x)&&Mr(e.y),Mr=e=>!isNaN(e)&&isFinite(e),kee=(e,t)=>{},Ip=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),jc=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{const l={x:(e-n)/i,y:(t-r)/i};return a?Ip(l,o):l},ap=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function Mo(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Cee(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Mo(e,n),i=Mo(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=Mo(e.top??e.y??0,n),i=Mo(e.bottom??e.y??0,n),a=Mo(e.left??e.x??0,t),o=Mo(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Aee(e,t,n,r,i,a){const{x:o,y:l}=ap(e,[t,n,r]),{x:c,y:f}=ap({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=i-c,p=a-f;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(p)}}const IS=(e,t,n,r,i,a)=>{const o=Cee(a,t,n),l=(t-o.x)/e.width,c=(n-o.y)/e.height,f=Math.min(l,c),d=rl(f,r,i),p=e.x+e.width/2,m=e.y+e.height/2,g=t/2-p*d,_=n/2-m*d,S=Aee(e,g,_,d,t,n),b={left:Math.min(S.left-o.left,0),top:Math.min(S.top-o.top,0),right:Math.min(S.right-o.right,0),bottom:Math.min(S.bottom-o.bottom,0)};return{x:g-b.left+b.right,y:_-b.top+b.bottom,zoom:d}},sp=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function al(e){return e!==void 0&&e!=="parent"}function Hi(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function D9(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function I9(e,t={width:0,height:0},n,r,i){const a={...e},o=r.get(n);if(o){const l=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*l[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*l[1]}return a}function WN(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Tee(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function Zu(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:a,y:o}=Ii(e),l=jc({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:f}=n?Ip(l,t):l;return{xSnapped:c,ySnapped:f,...l}}const PS=e=>({width:e.offsetWidth,height:e.offsetHeight}),P9=e=>e?.getRootNode?.()||window?.document,Nee=["INPUT","SELECT","TEXTAREA"];function z9(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Nee.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const L9=e=>"clientX"in e,Ii=(e,t)=>{const n=L9(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},QN=(e,t,n,r,i)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:i,position:o.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...PS(o)}})};function q9({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:l}){const c=e*.125+i*.375+o*.375+n*.125,f=t*.125+a*.375+l*.375+r*.125,d=Math.abs(c-e),p=Math.abs(f-t);return[c,f,d,p]}function Od(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function JN({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case Ie.Left:return[t-Od(t-r,a),n];case Ie.Right:return[t+Od(r-t,a),n];case Ie.Top:return[t,n-Od(n-i,a)];case Ie.Bottom:return[t,n+Od(i-n,a)]}}function F9({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top,curvature:o=.25}){const[l,c]=JN({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[f,d]=JN({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[p,m,g,_]=q9({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:c,targetControlX:f,targetControlY:d});return[`M${e},${t} C${l},${c} ${f},${d} ${r},${i}`,p,m,g,_]}function B9({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2,l=r<t?r+o:r-o;return[a,l,i,o]}function Oee({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1}){if(!i)return r;const a=n||t.selected||e.selected,o=Math.max(e.internals.z||0,t.internals.z||0,1e3);return r+(a?o:0)}function Ree({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const a=$p(ip(e),ip(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const o={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return dc(o,Dp(a))>0}const jee=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Mee=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),$ee=(e,t)=>{if(!e.source||!e.target)return t;let n;return N9(e)?n={...e}:n={...e,id:jee(e)},Mee(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function U9({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,a,o,l]=B9({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,l]}const eO={[Ie.Left]:{x:-1,y:0},[Ie.Right]:{x:1,y:0},[Ie.Top]:{x:0,y:-1},[Ie.Bottom]:{x:0,y:1}},Dee=({source:e,sourcePosition:t=Ie.Bottom,target:n})=>t===Ie.Left||t===Ie.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},tO=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Iee({source:e,sourcePosition:t=Ie.Bottom,target:n,targetPosition:r=Ie.Top,center:i,offset:a}){const o=eO[t],l=eO[r],c={x:e.x+o.x*a,y:e.y+o.y*a},f={x:n.x+l.x*a,y:n.y+l.y*a},d=Dee({source:c,sourcePosition:t,target:f}),p=d.x!==0?"x":"y",m=d[p];let g=[],_,S;const b={x:0,y:0},x={x:0,y:0},[w,v,k,C]=B9({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(o[p]*l[p]===-1){_=i.x??w,S=i.y??v;const N=[{x:_,y:c.y},{x:_,y:f.y}],j=[{x:c.x,y:S},{x:f.x,y:S}];o[p]===m?g=p==="x"?N:j:g=p==="x"?j:N}else{const N=[{x:c.x,y:f.y}],j=[{x:f.x,y:c.y}];if(p==="x"?g=o.x===m?j:N:g=o.y===m?N:j,t===r){const B=Math.abs(e[p]-n[p]);if(B<=a){const I=Math.min(a-1,a-B);o[p]===m?b[p]=(c[p]>e[p]?-1:1)*I:x[p]=(f[p]>n[p]?-1:1)*I}}if(t!==r){const B=p==="x"?"y":"x",I=o[p]===l[B],V=c[B]>f[B],H=c[B]<f[B];(o[p]===1&&(!I&&V||I&&H)||o[p]!==1&&(!I&&H||I&&V))&&(g=p==="x"?N:j)}const $={x:c.x+b.x,y:c.y+b.y},M={x:f.x+x.x,y:f.y+x.y},q=Math.max(Math.abs($.x-g[0].x),Math.abs(M.x-g[0].x)),F=Math.max(Math.abs($.y-g[0].y),Math.abs(M.y-g[0].y));q>=F?(_=($.x+M.x)/2,S=g[0].y):(_=g[0].x,S=($.y+M.y)/2)}return[[e,{x:c.x+b.x,y:c.y+b.y},...g,{x:f.x+x.x,y:f.y+x.y},n],_,S,k,C]}function Pee(e,t,n,r){const i=Math.min(tO(e,t)/2,tO(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){const f=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${a+i*f},${o}Q ${a},${o} ${a},${o+i*d}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${a},${o+i*c}Q ${a},${o} ${a+i*l},${o}`}function Iw({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top,borderRadius:o=5,centerX:l,centerY:c,offset:f=20}){const[d,p,m,g,_]=Iee({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:l,y:c},offset:f});return[d.reduce((b,x,w)=>{let v="";return w>0&&w<d.length-1?v=Pee(d[w-1],x,d[w+1],o):v=`${w===0?"M":"L"}${x.x} ${x.y}`,b+=v,b},""),p,m,g,_]}function nO(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function zee(e){const{sourceNode:t,targetNode:n}=e;if(!nO(t)||!nO(n))return null;const r=t.internals.handleBounds||rO(t.handles),i=n.internals.handleBounds||rO(n.handles),a=iO(r?.source??[],e.sourceHandle),o=iO(e.connectionMode===nl.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.("008",ei.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=a?.position||Ie.Bottom,c=o?.position||Ie.Top,f=hc(t,a,l),d=hc(n,o,c);return{sourceX:f.x,sourceY:f.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function rO(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function hc(e,t,n=Ie.Left,r=!1){const i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:l}=t??Hi(e);if(r)return{x:i+o/2,y:a+l/2};switch(t?.position??n){case Ie.Top:return{x:i+o/2,y:a};case Ie.Right:return{x:i+o,y:a+l/2};case Ie.Bottom:return{x:i+o/2,y:a+l};case Ie.Left:return{x:i,y:a+l/2}}}function iO(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Pw(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Lee(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const a=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const f=Pw(c,t);a.has(f)||(o.push({id:f,color:c.color||n,...c}),a.add(f))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const zS={nodeOrigin:[0,0],nodeExtent:cc,elevateNodesOnSelect:!0,defaults:{}},qee={...zS,checkEquality:!0};function LS(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function Fee(e,t,n){const r=LS(zS,n);for(const i of e.values())if(i.parentId)qS(i,e,t,r);else{const a=Oc(i,r.nodeOrigin),o=al(i.extent)?i.extent:r.nodeExtent,l=As(a,o,Hi(i));i.internals.positionAbsolute=l}}function zw(e,t,n,r){const i=LS(qee,r);let a=e.length>0;const o=new Map(t),l=i?.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const c of e){let f=o.get(c.id);if(i.checkEquality&&c===f?.internals.userNode)t.set(c.id,f);else{const d=Oc(c,i.nodeOrigin),p=al(c.extent)?c.extent:i.nodeExtent,m=As(d,p,Hi(c));f={...i.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:m,handleBounds:c.measured?f?.internals.handleBounds:void 0,z:H9(c,l),userNode:c}},t.set(c.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(a=!1),c.parentId&&qS(f,t,n,r)}return a}function Bee(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function qS(e,t,n,r){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o}=LS(zS,r),l=e.parentId,c=t.get(l);if(!c){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Bee(e,n);const f=i?1e3:0,{x:d,y:p,z:m}=Uee(e,c,a,o,f),{positionAbsolute:g}=e.internals,_=d!==g.x||p!==g.y;(_||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:_?{x:d,y:p}:g,z:m}})}function H9(e,t){return(Mr(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function Uee(e,t,n,r,i){const{x:a,y:o}=t.internals.positionAbsolute,l=Hi(e),c=Oc(e,n),f=al(e.extent)?As(c,e.extent,l):c;let d=As({x:a+f.x,y:o+f.y},r,l);e.extent==="parent"&&(d=j9(d,l,t));const p=H9(e,i),m=t.internals.z??0;return{x:d.x,y:d.y,z:m>p?m:p}}function FS(e,t,n,r=[0,0]){const i=[],a=new Map;for(const o of e){const l=t.get(o.parentId);if(!l)continue;const c=a.get(o.parentId)?.expandedRect??il(l),f=$9(c,o.rect);a.set(o.parentId,{expandedRect:f,parent:l})}return a.size>0&&a.forEach(({expandedRect:o,parent:l},c)=>{const f=l.internals.positionAbsolute,d=Hi(l),p=l.origin??r,m=o.x<f.x?Math.round(Math.abs(f.x-o.x)):0,g=o.y<f.y?Math.round(Math.abs(f.y-o.y)):0,_=Math.max(d.width,Math.round(o.width)),S=Math.max(d.height,Math.round(o.height)),b=(_-d.width)*p[0],x=(S-d.height)*p[1];(m>0||g>0||b||x)&&(i.push({id:c,type:"position",position:{x:l.position.x-m+b,y:l.position.y-g+x}}),n.get(c)?.forEach(w=>{e.some(v=>v.id===w.id)||i.push({id:w.id,type:"position",position:{x:w.position.x+m,y:w.position.y+g}})})),(d.width<o.width||d.height<o.height||m||g)&&i.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:_+(m?p[0]*m-b:0),height:S+(g?p[1]*g-x:0)}})}),i}function Hee(e,t,n,r,i,a){const o=r?.querySelector(".xyflow__viewport");let l=!1;if(!o)return{changes:[],updatedInternals:l};const c=[],f=window.getComputedStyle(o),{m22:d}=new window.DOMMatrixReadOnly(f.transform),p=[];for(const m of e.values()){const g=t.get(m.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),l=!0;continue}const _=PS(m.nodeElement),S=g.measured.width!==_.width||g.measured.height!==_.height;if(!!(_.width&&_.height&&(S||!g.internals.handleBounds||m.force))){const x=m.nodeElement.getBoundingClientRect(),w=al(g.extent)?g.extent:a;let{positionAbsolute:v}=g.internals;g.parentId&&g.extent==="parent"?v=j9(v,_,t.get(g.parentId)):w&&(v=As(v,w,_));const k={...g,measured:_,internals:{...g.internals,positionAbsolute:v,handleBounds:{source:QN("source",m.nodeElement,x,d,g.id),target:QN("target",m.nodeElement,x,d,g.id)}}};t.set(g.id,k),g.parentId&&qS(k,t,n,{nodeOrigin:i}),l=!0,S&&(c.push({id:g.id,type:"dimensions",dimensions:_}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:il(k,i)}))}}if(p.length>0){const m=FS(p,t,n,i);c.push(...m)}return{changes:c,updatedInternals:l}}async function Vee({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),l=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(l)}function aO(e,t,n,r,i,a){let o=i;const l=r.get(o)||new Map;r.set(o,l.set(n,t)),o=`${i}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;const f=r.get(o)||new Map;r.set(o,f.set(n,t))}}function V9(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:a,sourceHandle:o=null,targetHandle:l=null}=r,c={edgeId:r.id,source:i,target:a,sourceHandle:o,targetHandle:l},f=`${i}-${o}--${a}-${l}`,d=`${a}-${l}--${i}-${o}`;aO("source",c,d,e,i,o),aO("target",c,f,e,a,l),t.set(r.id,r)}}function G9(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:G9(n,t):!1}function sO(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function Gee(e,t,n,r){const i=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!G9(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const l=e.get(a);l&&i.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function w0({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){const i=[];for(const[o,l]of t){const c=n.get(o)?.internals.userNode;c&&i.push({...c,position:l.position,dragging:r})}if(!e)return[i[0],i];const a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function Zee({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,l=new Map,c=!1,f={x:0,y:0},d=null,p=!1,m=null,g=!1;function _({noDragClassName:b,handleSelector:x,domNode:w,isSelectable:v,nodeId:k,nodeClickDistance:C=0}){m=er(w);function T({x:M,y:q},F){const{nodeLookup:B,nodeExtent:I,snapGrid:V,snapToGrid:H,nodeOrigin:G,onNodeDrag:X,onSelectionDrag:W,onError:L,updateNodePositions:P}=t();a={x:M,y:q};let Z=!1,R={x:0,y:0,x2:0,y2:0};if(l.size>1&&I){const D=Rc(l);R=Dw(D)}for(const[D,U]of l){if(!B.has(D))continue;let Y={x:M-U.distance.x,y:q-U.distance.y};H&&(Y=Ip(Y,V));let ne=[[I[0][0],I[0][1]],[I[1][0],I[1][1]]];if(l.size>1&&I&&!U.extent){const{positionAbsolute:de}=U.internals,Q=de.x-R.x+I[0][0],J=de.x+U.measured.width-R.x2+I[1][0],oe=de.y-R.y+I[0][1],fe=de.y+U.measured.height-R.y2+I[1][1];ne=[[Q,oe],[J,fe]]}const{position:ae,positionAbsolute:re}=R9({nodeId:D,nextPosition:Y,nodeLookup:B,nodeExtent:ne,nodeOrigin:G,onError:L});Z=Z||U.position.x!==ae.x||U.position.y!==ae.y,U.position=ae,U.internals.positionAbsolute=re}if(Z&&(P(l,!0),F&&(r||X||!k&&W))){const[D,U]=w0({nodeId:k,dragItems:l,nodeLookup:B});r?.(F,l,D,U),X?.(F,D,U),k||W?.(F,U)}}async function N(){if(!d)return;const{transform:M,panBy:q,autoPanSpeed:F,autoPanOnNodeDrag:B}=t();if(!B){c=!1,cancelAnimationFrame(o);return}const[I,V]=M9(f,d,F);(I!==0||V!==0)&&(a.x=(a.x??0)-I/M[2],a.y=(a.y??0)-V/M[2],await q({x:I,y:V})&&T(a,null)),o=requestAnimationFrame(N)}function j(M){const{nodeLookup:q,multiSelectionActive:F,nodesDraggable:B,transform:I,snapGrid:V,snapToGrid:H,selectNodesOnDrag:G,onNodeDragStart:X,onSelectionDragStart:W,unselectNodesAndEdges:L}=t();p=!0,(!G||!v)&&!F&&k&&(q.get(k)?.selected||L()),v&&G&&k&&e?.(k);const P=Zu(M.sourceEvent,{transform:I,snapGrid:V,snapToGrid:H,containerBounds:d});if(a=P,l=Gee(q,B,P,k),l.size>0&&(n||X||!k&&W)){const[Z,R]=w0({nodeId:k,dragItems:l,nodeLookup:q});n?.(M.sourceEvent,l,Z,R),X?.(M.sourceEvent,Z,R),k||W?.(M.sourceEvent,R)}}const $=c9().clickDistance(C).on("start",M=>{const{domNode:q,nodeDragThreshold:F,transform:B,snapGrid:I,snapToGrid:V}=t();d=q?.getBoundingClientRect()||null,g=!1,F===0&&j(M),a=Zu(M.sourceEvent,{transform:B,snapGrid:I,snapToGrid:V,containerBounds:d}),f=Ii(M.sourceEvent,d)}).on("drag",M=>{const{autoPanOnNodeDrag:q,transform:F,snapGrid:B,snapToGrid:I,nodeDragThreshold:V,nodeLookup:H}=t(),G=Zu(M.sourceEvent,{transform:F,snapGrid:B,snapToGrid:I,containerBounds:d});if((M.sourceEvent.type==="touchmove"&&M.sourceEvent.touches.length>1||k&&!H.has(k))&&(g=!0),!g){if(!c&&q&&p&&(c=!0,N()),!p){const X=G.xSnapped-(a.x??0),W=G.ySnapped-(a.y??0);Math.sqrt(X*X+W*W)>V&&j(M)}(a.x!==G.xSnapped||a.y!==G.ySnapped)&&l&&p&&(f=Ii(M.sourceEvent,d),T(G,M.sourceEvent))}}).on("end",M=>{if(!(!p||g)&&(c=!1,p=!1,cancelAnimationFrame(o),l.size>0)){const{nodeLookup:q,updateNodePositions:F,onNodeDragStop:B,onSelectionDragStop:I}=t();if(F(l,!1),i||B||!k&&I){const[V,H]=w0({nodeId:k,dragItems:l,nodeLookup:q,dragging:!1});i?.(M.sourceEvent,l,V,H),B?.(M.sourceEvent,V,H),k||I?.(M.sourceEvent,H)}}}).filter(M=>{const q=M.target;return!M.button&&(!b||!sO(q,`.${b}`,w))&&(!x||sO(q,x,w))});m.call($)}function S(){m?.on(".drag",null)}return{update:_,destroy:S}}function Yee(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())dc(i,il(a))>0&&r.push(a);return r}const Kee=250;function Xee(e,t,n,r){let i=[],a=1/0;const o=Yee(e,n,t+Kee);for(const l of o){const c=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(const f of c){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:d,y:p}=hc(l,f,f.position,!0),m=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(p-e.y,2));m>t||(m<a?(i=[{...f,x:d,y:p}],a=m):m===a&&i.push({...f,x:d,y:p}))}}if(!i.length)return null;if(i.length>1){const l=r.type==="source"?"target":"source";return i.find(c=>c.type===l)??i[0]}return i[0]}function Z9(e,t,n,r,i,a=!1){const o=r.get(e);if(!o)return null;const l=i==="strict"?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?l?.find(f=>f.id===n):l?.[0])??null;return c&&a?{...c,...hc(o,c,c.position,!0)}:c}function Y9(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Wee(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const K9=()=>!0;function Qee(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:l,nodeLookup:c,lib:f,autoPanOnConnect:d,flowId:p,panBy:m,cancelConnection:g,onConnectStart:_,onConnect:S,onConnectEnd:b,isValidConnection:x=K9,onReconnectEnd:w,updateConnection:v,getTransform:k,getFromHandle:C,autoPanSpeed:T}){const N=P9(e.target);let j=0,$;const{x:M,y:q}=Ii(e),F=N?.elementFromPoint(M,q),B=Y9(a,F),I=l?.getBoundingClientRect();if(!I||!B)return;const V=Z9(i,B,r,c,t);if(!V)return;let H=Ii(e,I),G=!1,X=null,W=!1,L=null;function P(){if(!d||!I)return;const[re,de]=M9(H,I,T);m({x:re,y:de}),j=requestAnimationFrame(P)}const Z={...V,nodeId:i,type:B,position:V.position},R=c.get(i),U={inProgress:!0,isValid:null,from:hc(R,Z,Ie.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:R,to:H,toHandle:null,toPosition:YN[Z.position],toNode:null};v(U);let Y=U;_?.(e,{nodeId:i,handleId:r,handleType:B});function ne(re){if(!C()||!Z){ae(re);return}const de=k();H=Ii(re,I),$=Xee(jc(H,de,!1,[1,1]),n,c,Z),G||(P(),G=!0);const Q=X9(re,{handle:$,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:x,doc:N,lib:f,flowId:p,nodeLookup:c});L=Q.handleDomNode,X=Q.connection,W=Wee(!!$,Q.isValid);const J={...Y,isValid:W,to:Q.toHandle&&W?ap({x:Q.toHandle.x,y:Q.toHandle.y},de):H,toHandle:Q.toHandle,toPosition:W&&Q.toHandle?Q.toHandle.position:YN[Z.position],toNode:Q.toHandle?c.get(Q.toHandle.nodeId):null};W&&$&&Y.toHandle&&J.toHandle&&Y.toHandle.type===J.toHandle.type&&Y.toHandle.nodeId===J.toHandle.nodeId&&Y.toHandle.id===J.toHandle.id&&Y.to.x===J.to.x&&Y.to.y===J.to.y||(v(J),Y=J)}function ae(re){($||L)&&X&&W&&S?.(X);const{inProgress:de,...Q}=Y,J={...Q,toPosition:Y.toHandle?Y.toPosition:null};b?.(re,J),a&&w?.(re,J),g(),cancelAnimationFrame(j),G=!1,W=!1,X=null,L=null,N.removeEventListener("mousemove",ne),N.removeEventListener("mouseup",ae),N.removeEventListener("touchmove",ne),N.removeEventListener("touchend",ae)}N.addEventListener("mousemove",ne),N.addEventListener("mouseup",ae),N.addEventListener("touchmove",ne),N.addEventListener("touchend",ae)}function X9(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:l,flowId:c,isValidConnection:f=K9,nodeLookup:d}){const p=a==="target",m=t?o.querySelector(`.${l}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:_}=Ii(e),S=o.elementFromPoint(g,_),b=S?.classList.contains(`${l}-flow__handle`)?S:m,x={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const w=Y9(void 0,b),v=b.getAttribute("data-nodeid"),k=b.getAttribute("data-handleid"),C=b.classList.contains("connectable"),T=b.classList.contains("connectableend");if(!v||!w)return x;const N={source:p?v:r,sourceHandle:p?k:i,target:p?r:v,targetHandle:p?i:k};x.connection=N;const $=C&&T&&(n===nl.Strict?p&&w==="source"||!p&&w==="target":v!==r||k!==i);x.isValid=$&&f(N),x.toHandle=Z9(v,w,k,d,n,!0)}return x}const Lw={onPointerDown:Qee,isValid:X9};function Jee({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=er(e);function a({translateExtent:l,width:c,height:f,zoomStep:d=10,pannable:p=!0,zoomable:m=!0,inversePan:g=!1}){const _=v=>{const k=n();if(v.sourceEvent.type!=="wheel"||!t)return;const C=-v.sourceEvent.deltaY*(v.sourceEvent.deltaMode===1?.05:v.sourceEvent.deltaMode?1:.002)*d,T=k[2]*Math.pow(2,C);t.scaleTo(T)};let S=[0,0];const b=v=>{(v.sourceEvent.type==="mousedown"||v.sourceEvent.type==="touchstart")&&(S=[v.sourceEvent.clientX??v.sourceEvent.touches[0].clientX,v.sourceEvent.clientY??v.sourceEvent.touches[0].clientY])},x=v=>{const k=n();if(v.sourceEvent.type!=="mousemove"&&v.sourceEvent.type!=="touchmove"||!t)return;const C=[v.sourceEvent.clientX??v.sourceEvent.touches[0].clientX,v.sourceEvent.clientY??v.sourceEvent.touches[0].clientY],T=[C[0]-S[0],C[1]-S[1]];S=C;const N=r()*Math.max(k[2],Math.log(k[2]))*(g?-1:1),j={x:k[0]-T[0]*N,y:k[1]-T[1]*N},$=[[0,0],[c,f]];t.setViewportConstrained({x:j.x,y:j.y,zoom:k[2]},$,l)},w=k9().on("start",b).on("zoom",p?x:null).on("zoom.wheel",m?_:null);i.call(w,{})}function o(){i.on("zoom",null)}return{update:a,destroy:o,pointer:Rr}}const ete=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Pp=e=>({x:e.x,y:e.y,zoom:e.k}),S0=({x:e,y:t,zoom:n})=>Mp.translate(e,t).scale(n),Fo=(e,t)=>e.target.closest(`.${t}`),W9=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),E0=(e,t=0,n=()=>{})=>{const r=typeof t=="number"&&t>0;return r||n(),r?e.transition().duration(t).on("end",n):e},Q9=e=>{const t=e.ctrlKey&&sp()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function tte({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:f}){return d=>{if(Fo(d,t))return!1;d.preventDefault(),d.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(d.ctrlKey&&o){const b=Rr(d),x=Q9(d),w=p*Math.pow(2,x);r.scaleTo(n,w,b,d);return}const m=d.deltaMode===1?20:1;let g=i===xs.Vertical?0:d.deltaX*m,_=i===xs.Horizontal?0:d.deltaY*m;!sp()&&d.shiftKey&&i!==xs.Vertical&&(g=d.deltaY*m,_=0),r.translateBy(n,-(g/p)*a,-(_/p)*a,{internal:!0});const S=Pp(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,l?.(d,S)),e.isPanScrolling&&(c?.(d,S),e.panScrollTimeout=setTimeout(()=>{f?.(d,S),e.isPanScrolling=!1},150))}}function nte({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const a=r.type==="wheel",o=!t&&a&&!r.ctrlKey,l=Fo(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),n.call(this,r,i)}}function rte({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;const i=Pp(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,i)}}function ite({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&W9(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Pp(a.transform))}}function ate({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&W9(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i&&ete(e.prevViewport,o.transform))){const l=Pp(o.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,l)},n?150:0)}}}function ste({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:f}){return d=>{const p=e||t,m=n&&d.ctrlKey;if(d.button===1&&d.type==="mousedown"&&(Fo(d,`${f}-flow__node`)||Fo(d,`${f}-flow__edge`)))return!0;if(!r&&!p&&!i&&!a&&!n||o||Fo(d,l)&&d.type==="wheel"||Fo(d,c)&&(d.type!=="wheel"||i&&d.type==="wheel"&&!e)||!n&&d.ctrlKey&&d.type==="wheel")return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!p&&!i&&!m&&d.type==="wheel"||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const g=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||d.type==="wheel")&&g}}function ote({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:r,translateExtent:i,viewport:a,onPanZoom:o,onPanZoomStart:l,onPanZoomEnd:c,onDraggingChange:f}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=e.getBoundingClientRect(),m=k9().clickDistance(!Mr(r)||r<0?0:r).scaleExtent([t,n]).translateExtent(i),g=er(e).call(m);v({x:a.x,y:a.y,zoom:rl(a.zoom,t,n)},[[0,0],[p.width,p.height]],i);const _=g.on("wheel.zoom"),S=g.on("dblclick.zoom");m.wheelDelta(Q9);function b(F,B){return g?new Promise(I=>{m?.transform(E0(g,B?.duration,()=>I(!0)),F)}):Promise.resolve(!1)}function x({noWheelClassName:F,noPanClassName:B,onPaneContextMenu:I,userSelectionActive:V,panOnScroll:H,panOnDrag:G,panOnScrollMode:X,panOnScrollSpeed:W,preventScrolling:L,zoomOnPinch:P,zoomOnScroll:Z,zoomOnDoubleClick:R,zoomActivationKeyPressed:D,lib:U,onTransformChange:Y}){V&&!d.isZoomingOrPanning&&w();const ae=H&&!D&&!V?tte({zoomPanValues:d,noWheelClassName:F,d3Selection:g,d3Zoom:m,panOnScrollMode:X,panOnScrollSpeed:W,zoomOnPinch:P,onPanZoomStart:l,onPanZoom:o,onPanZoomEnd:c}):nte({noWheelClassName:F,preventScrolling:L,d3ZoomHandler:_});if(g.on("wheel.zoom",ae,{passive:!1}),!V){const de=rte({zoomPanValues:d,onDraggingChange:f,onPanZoomStart:l});m.on("start",de);const Q=ite({zoomPanValues:d,panOnDrag:G,onPaneContextMenu:!!I,onPanZoom:o,onTransformChange:Y});m.on("zoom",Q);const J=ate({zoomPanValues:d,panOnDrag:G,panOnScroll:H,onPaneContextMenu:I,onPanZoomEnd:c,onDraggingChange:f});m.on("end",J)}const re=ste({zoomActivationKeyPressed:D,panOnDrag:G,zoomOnScroll:Z,panOnScroll:H,zoomOnDoubleClick:R,zoomOnPinch:P,userSelectionActive:V,noPanClassName:B,noWheelClassName:F,lib:U});m.filter(re),R?g.on("dblclick.zoom",S):g.on("dblclick.zoom",null)}function w(){m.on("zoom",null)}async function v(F,B,I){const V=S0(F),H=m?.constrain()(V,B,I);return H&&await b(H),new Promise(G=>G(H))}async function k(F,B){const I=S0(F);return await b(I,B),new Promise(V=>V(I))}function C(F){if(g){const B=S0(F),I=g.property("__zoom");(I.k!==F.zoom||I.x!==F.x||I.y!==F.y)&&m?.transform(g,B,null,{sync:!0})}}function T(){const F=g?E9(g.node()):{x:0,y:0,k:1};return{x:F.x,y:F.y,zoom:F.k}}function N(F,B){return g?new Promise(I=>{m?.scaleTo(E0(g,B?.duration,()=>I(!0)),F)}):Promise.resolve(!1)}function j(F,B){return g?new Promise(I=>{m?.scaleBy(E0(g,B?.duration,()=>I(!0)),F)}):Promise.resolve(!1)}function $(F){m?.scaleExtent(F)}function M(F){m?.translateExtent(F)}function q(F){const B=!Mr(F)||F<0?0:F;m?.clickDistance(B)}return{update:x,destroy:w,setViewport:k,setViewportConstrained:v,getViewport:T,scaleTo:N,scaleBy:j,setScaleExtent:$,setTranslateExtent:M,syncViewport:C,setClickDistance:q}}var Yu;(function(e){e.Line="line",e.Handle="handle"})(Yu||(Yu={}));function lte({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){const o=e-t,l=n-r,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&i&&(c[0]=c[0]*-1),l&&a&&(c[1]=c[1]*-1),c}function ute(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function wa(e,t){return Math.max(0,t-e)}function Sa(e,t){return Math.max(0,e-t)}function Rd(e,t,n){return Math.max(0,t-e,e-n)}function oO(e,t){return e?!t:t}function cte(e,t,n,r,i,a,o,l){let{affectsX:c,affectsY:f}=t;const{isHorizontal:d,isVertical:p}=t,m=d&&p,{xSnapped:g,ySnapped:_}=n,{minWidth:S,maxWidth:b,minHeight:x,maxHeight:w}=r,{x:v,y:k,width:C,height:T,aspectRatio:N}=e;let j=Math.floor(d?g-e.pointerX:0),$=Math.floor(p?_-e.pointerY:0);const M=C+(c?-j:j),q=T+(f?-$:$),F=-a[0]*C,B=-a[1]*T;let I=Rd(M,S,b),V=Rd(q,x,w);if(o){let X=0,W=0;c&&j<0?X=wa(v+j+F,o[0][0]):!c&&j>0&&(X=Sa(v+M+F,o[1][0])),f&&$<0?W=wa(k+$+B,o[0][1]):!f&&$>0&&(W=Sa(k+q+B,o[1][1])),I=Math.max(I,X),V=Math.max(V,W)}if(l){let X=0,W=0;c&&j>0?X=Sa(v+j,l[0][0]):!c&&j<0&&(X=wa(v+M,l[1][0])),f&&$>0?W=Sa(k+$,l[0][1]):!f&&$<0&&(W=wa(k+q,l[1][1])),I=Math.max(I,X),V=Math.max(V,W)}if(i){if(d){const X=Rd(M/N,x,w)*N;if(I=Math.max(I,X),o){let W=0;!c&&!f||c&&!f&&m?W=Sa(k+B+M/N,o[1][1])*N:W=wa(k+B+(c?j:-j)/N,o[0][1])*N,I=Math.max(I,W)}if(l){let W=0;!c&&!f||c&&!f&&m?W=wa(k+M/N,l[1][1])*N:W=Sa(k+(c?j:-j)/N,l[0][1])*N,I=Math.max(I,W)}}if(p){const X=Rd(q*N,S,b)/N;if(V=Math.max(V,X),o){let W=0;!c&&!f||f&&!c&&m?W=Sa(v+q*N+F,o[1][0])/N:W=wa(v+(f?$:-$)*N+F,o[0][0])/N,V=Math.max(V,W)}if(l){let W=0;!c&&!f||f&&!c&&m?W=wa(v+q*N,l[1][0])/N:W=Sa(v+(f?$:-$)*N,l[0][0])/N,V=Math.max(V,W)}}}$=$+($<0?V:-V),j=j+(j<0?I:-I),i&&(m?M>q*N?$=(oO(c,f)?-j:j)/N:j=(oO(c,f)?-$:$)*N:d?($=j/N,f=c):(j=$*N,c=f));const H=c?v+j:v,G=f?k+$:k;return{width:C+(c?-j:j),height:T+(f?-$:$),x:a[0]*j*(c?-1:1)+H,y:a[1]*$*(f?-1:1)+G}}const J9={width:0,height:0,x:0,y:0},fte={...J9,pointerX:0,pointerY:0,aspectRatio:1};function dte(e){return[[0,0],[e.measured.width,e.measured.height]]}function hte(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,l=n[0]*a,c=n[1]*o;return[[r-l,i-c],[r+a-l,i+o-c]]}function pte({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const a=er(e);function o({controlPosition:c,boundaries:f,keepAspectRatio:d,resizeDirection:p,onResizeStart:m,onResize:g,onResizeEnd:_,shouldResize:S}){let b={...J9},x={...fte};const w=ute(c);let v,k=null,C=[],T,N,j;const $=c9().on("start",M=>{const{nodeLookup:q,transform:F,snapGrid:B,snapToGrid:I,nodeOrigin:V,paneDomNode:H}=n();if(v=q.get(t),!v)return;k=H?.getBoundingClientRect()??null;const{xSnapped:G,ySnapped:X}=Zu(M.sourceEvent,{transform:F,snapGrid:B,snapToGrid:I,containerBounds:k});b={width:v.measured.width??0,height:v.measured.height??0,x:v.position.x??0,y:v.position.y??0},x={...b,pointerX:G,pointerY:X,aspectRatio:b.width/b.height},T=void 0,v.parentId&&(v.extent==="parent"||v.expandParent)&&(T=q.get(v.parentId),N=T&&v.extent==="parent"?dte(T):void 0),C=[],j=void 0;for(const[W,L]of q)if(L.parentId===t&&(C.push({id:W,position:{...L.position},extent:L.extent}),L.extent==="parent"||L.expandParent)){const P=hte(L,v,L.origin??V);j?j=[[Math.min(P[0][0],j[0][0]),Math.min(P[0][1],j[0][1])],[Math.max(P[1][0],j[1][0]),Math.max(P[1][1],j[1][1])]]:j=P}m?.(M,{...b})}).on("drag",M=>{const{transform:q,snapGrid:F,snapToGrid:B,nodeOrigin:I}=n(),V=Zu(M.sourceEvent,{transform:q,snapGrid:F,snapToGrid:B,containerBounds:k}),H=[];if(!v)return;const{x:G,y:X,width:W,height:L}=b,P={},Z=v.origin??I,{width:R,height:D,x:U,y:Y}=cte(x,w,V,f,d,Z,N,j),ne=R!==W,ae=D!==L,re=U!==G&&ne,de=Y!==X&&ae;if(!re&&!de&&!ne&&!ae)return;if((re||de||Z[0]===1||Z[1]===1)&&(P.x=re?U:b.x,P.y=de?Y:b.y,b.x=P.x,b.y=P.y,C.length>0)){const fe=U-G,me=Y-X;for(const we of C)we.position={x:we.position.x-fe+Z[0]*(R-W),y:we.position.y-me+Z[1]*(D-L)},H.push(we)}if((ne||ae)&&(P.width=ne&&(!p||p==="horizontal")?R:b.width,P.height=ae&&(!p||p==="vertical")?D:b.height,b.width=P.width,b.height=P.height),T&&v.expandParent){const fe=Z[0]*(P.width??0);P.x&&P.x<fe&&(b.x=fe,x.x=x.x-(P.x-fe));const me=Z[1]*(P.height??0);P.y&&P.y<me&&(b.y=me,x.y=x.y-(P.y-me))}const Q=lte({width:b.width,prevWidth:W,height:b.height,prevHeight:L,affectsX:w.affectsX,affectsY:w.affectsY}),J={...b,direction:Q};S?.(M,J)!==!1&&(g?.(M,J),r(P,H))}).on("end",M=>{_?.(M,{...b}),i?.({...b})});a.call($)}function l(){a.on(".drag",null)}return{update:o,destroy:l}}var k0={exports:{}},C0={},A0={exports:{}},T0={};/**
203
+ * @license React
204
+ * use-sync-external-store-shim.production.js
205
+ *
206
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
207
+ *
208
+ * This source code is licensed under the MIT license found in the
209
+ * LICENSE file in the root directory of this source tree.
210
+ */var lO;function mte(){if(lO)return T0;lO=1;var e=Ec();function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(p,m){var g=m(),_=r({inst:{value:g,getSnapshot:m}}),S=_[0].inst,b=_[1];return a(function(){S.value=g,S.getSnapshot=m,c(S)&&b({inst:S})},[p,g,m]),i(function(){return c(S)&&b({inst:S}),p(function(){c(S)&&b({inst:S})})},[p]),o(g),g}function c(p){var m=p.getSnapshot;p=p.value;try{var g=m();return!n(p,g)}catch{return!0}}function f(p,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return T0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,T0}var uO;function gte(){return uO||(uO=1,A0.exports=mte()),A0.exports}/**
211
+ * @license React
212
+ * use-sync-external-store-shim/with-selector.production.js
213
+ *
214
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
215
+ *
216
+ * This source code is licensed under the MIT license found in the
217
+ * LICENSE file in the root directory of this source tree.
218
+ */var cO;function yte(){if(cO)return C0;cO=1;var e=Ec(),t=gte();function n(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return C0.useSyncExternalStoreWithSelector=function(f,d,p,m,g){var _=a(null);if(_.current===null){var S={hasValue:!1,value:null};_.current=S}else S=_.current;_=l(function(){function x(T){if(!w){if(w=!0,v=T,T=m(T),g!==void 0&&S.hasValue){var N=S.value;if(g(N,T))return k=N}return k=T}if(N=k,r(v,T))return N;var j=m(T);return g!==void 0&&g(N,j)?(v=T,N):(v=T,k=j)}var w=!1,v,k,C=p===void 0?null:p;return[function(){return x(d())},C===null?void 0:function(){return x(C())}]},[d,p,m,g]);var b=i(f,_[0],_[1]);return o(function(){S.hasValue=!0,S.value=b},[b]),c(b),b},C0}var fO;function bte(){return fO||(fO=1,k0.exports=yte()),k0.exports}var vte=bte();const _te=qn(vte),xte={},dO=e=>{let t;const n=new Set,r=(d,p)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const g=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(_=>_(t,g))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(xte?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,i,c);return c},wte=e=>e?dO(e):dO,{useDebugValue:Ste}=f5,{useSyncExternalStoreWithSelector:Ete}=_te,kte=e=>e;function e6(e,t=kte,n){const r=Ete(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ste(r),r}const hO=(e,t)=>{const n=wte(e),r=(i,a=t)=>e6(n,i,a);return Object.assign(r,n),r},Cte=(e,t)=>e?hO(e,t):hO;function Vt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}c5();const zp=ee.createContext(null),Ate=zp.Provider,t6=ei.error001();function ut(e,t){const n=ee.useContext(zp);if(n===null)throw new Error(t6);return e6(n,e,t)}function Ft(){const e=ee.useContext(zp);if(e===null)throw new Error(t6);return ee.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const pO={display:"none"},Tte={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},n6="react-flow__node-desc",r6="react-flow__edge-desc",Nte="react-flow__aria-live",Ote=e=>e.ariaLiveMessage;function Rte({rfId:e}){const t=ut(Ote);return O.jsx("div",{id:`${Nte}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Tte,children:t})}function jte({rfId:e,disableKeyboardA11y:t}){return O.jsxs(O.Fragment,{children:[O.jsxs("div",{id:`${n6}-${e}`,style:pO,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),O.jsx("div",{id:`${r6}-${e}`,style:pO,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&O.jsx(Rte,{rfId:e})]})}const Mte=e=>e.userSelectionActive?"none":"all",Mc=ee.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},a)=>{const o=ut(Mte),l=`${e}`.split("-");return O.jsx("div",{className:nn(["react-flow__panel",n,...l]),style:{...r,pointerEvents:o},ref:a,...i,children:t})});Mc.displayName="Panel";function $te({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:O.jsx(Mc,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:O.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Dte=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},jd=e=>e.id;function Ite(e,t){return Vt(e.selectedNodes.map(jd),t.selectedNodes.map(jd))&&Vt(e.selectedEdges.map(jd),t.selectedEdges.map(jd))}function Pte({onSelectionChange:e}){const t=Ft(),{selectedNodes:n,selectedEdges:r}=ut(Dte,Ite);return ee.useEffect(()=>{const i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,r,e]),null}const zte=e=>!!e.onSelectionChangeHandlers;function Lte({onSelectionChange:e}){const t=ut(zte);return e||t?O.jsx(Pte,{onSelectionChange:e}):null}const i6=[0,0],qte={x:0,y:0,zoom:1},Fte=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance"],mO=[...Fte,"rfId"],Bte=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),gO={translateExtent:cc,nodeOrigin:i6,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function Ute(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:c,setPaneClickDistance:f}=ut(Bte,Vt),d=Ft();ee.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{p.current=gO,l()}),[]);const p=ee.useRef(gO);return ee.useEffect(()=>{for(const m of mO){const g=e[m],_=p.current[m];g!==_&&(typeof e[m]>"u"||(m==="nodes"?t(g):m==="edges"?n(g):m==="minZoom"?r(g):m==="maxZoom"?i(g):m==="translateExtent"?a(g):m==="nodeExtent"?o(g):m==="paneClickDistance"?f(g):m==="fitView"?d.setState({fitViewQueued:g}):m==="fitViewOptions"?d.setState({fitViewOptions:g}):d.setState({[m]:g})))}p.current=e},mO.map(m=>e[m])),null}function yO(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Hte(e){const[t,n]=ee.useState(e==="system"?null:e);return ee.useEffect(()=>{if(e!=="system"){n(e);return}const r=yO(),i=()=>n(r?.matches?"dark":"light");return i(),r?.addEventListener("change",i),()=>{r?.removeEventListener("change",i)}},[e]),t!==null?t:yO()?.matches?"dark":"light"}const bO=typeof document<"u"?document:null;function pc(e=null,t={target:bO,actInsideInputWithModifier:!0}){const[n,r]=ee.useState(!1),i=ee.useRef(!1),a=ee.useRef(new Set([])),[o,l]=ee.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
219
+ `).replace(`
220
+
221
+ `,`
222
+ +`).split(`
223
+ `)),d=f.reduce((p,m)=>p.concat(...m),[]);return[f,d]}return[[],[]]},[e]);return ee.useEffect(()=>{const c=t?.target??bO,f=t?.actInsideInputWithModifier??!0;if(e!==null){const d=g=>{if(i.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!i.current||i.current&&!f)&&z9(g))return!1;const S=_O(g.code,l);if(a.current.add(g[S]),vO(o,a.current,!1)){const b=g.composedPath?.()?.[0]||g.target,x=b?.nodeName==="BUTTON"||b?.nodeName==="A";t.preventDefault!==!1&&(i.current||!x)&&g.preventDefault(),r(!0)}},p=g=>{const _=_O(g.code,l);vO(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[_]),g.key==="Meta"&&a.current.clear(),i.current=!1},m=()=>{a.current.clear(),r(!1)};return c?.addEventListener("keydown",d),c?.addEventListener("keyup",p),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c?.removeEventListener("keydown",d),c?.removeEventListener("keyup",p),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),n}function vO(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function _O(e,t){return t.includes(e)?"code":"key"}const Vte=()=>{const e=Ft();return ee.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},{duration:n?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>{const{width:i,height:a,maxZoom:o,panZoom:l}=e.getState(),c=typeof r?.zoom<"u"?r.zoom:o,f=i/2-t*c,d=a/2-n*c;return l?(await l.setViewport({x:f,y:d,zoom:c},{duration:r?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:a,maxZoom:o,panZoom:l}=e.getState(),c=IS(t,r,i,a,o,n?.padding??.1);return l?(await l.setViewport(c,{duration:n?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;const{x:l,y:c}=o.getBoundingClientRect(),f={x:t.x-l,y:t.y-c},d=n.snapGrid??i,p=n.snapToGrid??a;return jc(f,r,p,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:a}=r.getBoundingClientRect(),o=ap(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function a6(e,t){const n=[],r=new Map,i=[];for(const a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of t){const o=r.get(a.id);if(!o){n.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){n.push({...o[0].item});continue}const l={...a};for(const c of o)Gte(c,l);n.push(l)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function Gte(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??={},t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function s6(e,t){return a6(e,t)}function o6(e,t){return a6(e,t)}function hs(e,t){return{id:e,type:"select",selected:t}}function Bo(e,t=new Set,n=!1){const r=[];for(const[i,a]of e){const o=t.has(i);!(a.selected===void 0&&!o)&&a.selected!==o&&(n&&(a.selected=o),r.push(hs(a.id,o)))}return r}function xO({items:e=[],lookup:t}){const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,a]of e.entries()){const o=t.get(a.id),l=o?.internals?.userNode??o;l!==void 0&&l!==a&&n.push({id:a.id,item:a,type:"replace"}),l===void 0&&n.push({item:a,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function wO(e){return{id:e.id,type:"remove"}}const SO=e=>vee(e),Zte=e=>N9(e);function l6(e){return ee.forwardRef(e)}const Yte=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function EO(e){const[t,n]=ee.useState(BigInt(0)),[r]=ee.useState(()=>Kte(()=>n(i=>i+BigInt(1))));return Yte(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function Kte(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const u6=ee.createContext(null);function Xte({children:e}){const t=Ft(),n=ee.useCallback(l=>{const{nodes:c=[],setNodes:f,hasDefaultNodes:d,onNodesChange:p,nodeLookup:m,fitViewQueued:g}=t.getState();let _=c;for(const b of l)_=typeof b=="function"?b(_):b;const S=xO({items:_,lookup:m});d&&f(_),S.length>0?p?.(S):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:x,setNodes:w}=t.getState();b&&w(x)})},[]),r=EO(n),i=ee.useCallback(l=>{const{edges:c=[],setEdges:f,hasDefaultEdges:d,onEdgesChange:p,edgeLookup:m}=t.getState();let g=c;for(const _ of l)g=typeof _=="function"?_(g):_;d?f(g):p&&p(xO({items:g,lookup:m}))},[]),a=EO(i),o=ee.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return O.jsx(u6.Provider,{value:o,children:e})}function Wte(){const e=ee.useContext(u6);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Qte=e=>!!e.panZoom;function Lp(){const e=Vte(),t=Ft(),n=Wte(),r=ut(Qte),i=ee.useMemo(()=>{const a=p=>t.getState().nodeLookup.get(p),o=p=>{n.nodeQueue.push(p)},l=p=>{n.edgeQueue.push(p)},c=p=>{const{nodeLookup:m,nodeOrigin:g}=t.getState(),_=SO(p)?p:m.get(p.id),S=_.parentId?I9(_.position,_.measured,_.parentId,m,g):_.position,b={..._,position:S,width:_.measured?.width??_.width,height:_.measured?.height??_.height};return il(b)},f=(p,m,g={replace:!1})=>{o(_=>_.map(S=>{if(S.id===p){const b=typeof m=="function"?m(S):m;return g.replace&&SO(b)?b:{...S,...b}}return S}))},d=(p,m,g={replace:!1})=>{l(_=>_.map(S=>{if(S.id===p){const b=typeof m=="function"?m(S):m;return g.replace&&Zte(b)?b:{...S,...b}}return S}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>a(p)?.internals.userNode,getInternalNode:a,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(m=>({...m}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:o,setEdges:l,addNodes:p=>{const m=Array.isArray(p)?p:[p];n.nodeQueue.push(g=>[...g,...m])},addEdges:p=>{const m=Array.isArray(p)?p:[p];n.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:p=[],edges:m=[],transform:g}=t.getState(),[_,S,b]=g;return{nodes:p.map(x=>({...x})),edges:m.map(x=>({...x})),viewport:{x:_,y:S,zoom:b}}},deleteElements:async({nodes:p=[],edges:m=[]})=>{const{nodes:g,edges:_,onNodesDelete:S,onEdgesDelete:b,triggerNodeChanges:x,triggerEdgeChanges:w,onDelete:v,onBeforeDelete:k}=t.getState(),{nodes:C,edges:T}=await Eee({nodesToRemove:p,edgesToRemove:m,nodes:g,edges:_,onBeforeDelete:k}),N=T.length>0,j=C.length>0;if(N){const $=T.map(wO);b?.(T),w($)}if(j){const $=C.map(wO);S?.(C),x($)}return(j||N)&&v?.({nodes:C,edges:T}),{deletedNodes:C,deletedEdges:T}},getIntersectingNodes:(p,m=!0,g)=>{const _=XN(p),S=_?p:c(p),b=g!==void 0;return S?(g||t.getState().nodes).filter(x=>{const w=t.getState().nodeLookup.get(x.id);if(w&&!_&&(x.id===p.id||!w.internals.positionAbsolute))return!1;const v=il(b?x:w),k=dc(v,S);return m&&k>0||k>=S.width*S.height}):[]},isNodeIntersecting:(p,m,g=!0)=>{const S=XN(p)?p:c(p);if(!S)return!1;const b=dc(S,m);return g&&b>0||b>=S.width*S.height},updateNode:f,updateNodeData:(p,m,g={replace:!1})=>{f(p,_=>{const S=typeof m=="function"?m(_):m;return g.replace?{..._,data:S}:{..._,data:{..._.data,...S}}},g)},updateEdge:d,updateEdgeData:(p,m,g={replace:!1})=>{d(p,_=>{const S=typeof m=="function"?m(_):m;return g.replace?{..._,data:S}:{..._,data:{..._.data,...S}}},g)},getNodesBounds:p=>{const{nodeLookup:m,nodeOrigin:g}=t.getState();return _ee(p,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:p,id:m,nodeId:g})=>Array.from(t.getState().connectionLookup.get(`${g}-${p}${m?`-${m}`:""}`)?.values()??[]),getNodeConnections:({type:p,handleId:m,nodeId:g})=>Array.from(t.getState().connectionLookup.get(`${g}${p?m?`-${p}-${m}`:`-${p}`:""}`)?.values()??[]),fitView:async p=>{const m=t.getState().fitViewResolver??Tee();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:m}),n.nodeQueue.push(g=>[...g]),m.promise}}},[]);return ee.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const kO=e=>e.selected,Jte=typeof window<"u"?window:void 0;function ene({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Ft(),{deleteElements:r}=Lp(),i=pc(e,{actInsideInputWithModifier:!1}),a=pc(t,{target:Jte});ee.useEffect(()=>{if(i){const{edges:o,nodes:l}=n.getState();r({nodes:l.filter(kO),edges:o.filter(kO)}),n.setState({nodesSelectionActive:!1})}},[i]),ee.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function tne(e){const t=Ft();ee.useEffect(()=>{const n=()=>{if(!e.current)return!1;const r=PS(e.current);(r.height===0||r.width===0)&&t.getState().onError?.("004",ei.error004()),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const qp={position:"absolute",width:"100%",height:"100%",top:0,left:0},nne=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function rne({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=xs.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:f,minZoom:d,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:g=!0,children:_,noWheelClassName:S,noPanClassName:b,onViewportChange:x,isControlledViewport:w,paneClickDistance:v}){const k=Ft(),C=ee.useRef(null),{userSelectionActive:T,lib:N}=ut(nne,Vt),j=pc(m),$=ee.useRef();tne(C);const M=ee.useCallback(q=>{x?.({x:q[0],y:q[1],zoom:q[2]}),w||k.setState({transform:q})},[x,w]);return ee.useEffect(()=>{if(C.current){$.current=ote({domNode:C.current,minZoom:d,maxZoom:p,translateExtent:f,viewport:c,paneClickDistance:v,onDraggingChange:I=>k.setState({paneDragging:I}),onPanZoomStart:(I,V)=>{const{onViewportChangeStart:H,onMoveStart:G}=k.getState();G?.(I,V),H?.(V)},onPanZoom:(I,V)=>{const{onViewportChange:H,onMove:G}=k.getState();G?.(I,V),H?.(V)},onPanZoomEnd:(I,V)=>{const{onViewportChangeEnd:H,onMoveEnd:G}=k.getState();G?.(I,V),H?.(V)}});const{x:q,y:F,zoom:B}=$.current.getViewport();return k.setState({panZoom:$.current,transform:[q,F,B],domNode:C.current.closest(".react-flow")}),()=>{$.current?.destroy()}}},[]),ee.useEffect(()=>{$.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:j,preventScrolling:g,noPanClassName:b,userSelectionActive:T,noWheelClassName:S,lib:N,onTransformChange:M})},[e,t,n,r,i,a,o,l,j,g,b,T,S,N,M]),O.jsx("div",{className:"react-flow__renderer",ref:C,style:qp,children:_})}const ine=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function ane(){const{userSelectionActive:e,userSelectionRect:t}=ut(ine,Vt);return e&&t?O.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const N0=(e,t)=>n=>{n.target===t.current&&e?.(n)},sne=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function one({isSelecting:e,selectionKeyPressed:t,selectionMode:n=fc.Full,panOnDrag:r,selectionOnDrag:i,onSelectionStart:a,onSelectionEnd:o,onPaneClick:l,onPaneContextMenu:c,onPaneScroll:f,onPaneMouseEnter:d,onPaneMouseMove:p,onPaneMouseLeave:m,children:g}){const _=Ft(),{userSelectionActive:S,elementsSelectable:b,dragging:x,connectionInProgress:w}=ut(sne,Vt),v=b&&(e||S),k=ee.useRef(null),C=ee.useRef(),T=ee.useRef(new Set),N=ee.useRef(new Set),j=ee.useRef(!1),$=ee.useRef(!1),M=G=>{if(j.current||w){j.current=!1;return}l?.(G),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},q=G=>{if(Array.isArray(r)&&r?.includes(2)){G.preventDefault();return}c?.(G)},F=f?G=>f(G):void 0,B=G=>{const{resetSelectedElements:X,domNode:W}=_.getState();if(C.current=W?.getBoundingClientRect(),!b||!e||G.button!==0||G.target!==k.current||!C.current)return;G.target?.setPointerCapture?.(G.pointerId),$.current=!0,j.current=!1;const{x:L,y:P}=Ii(G.nativeEvent,C.current);X(),_.setState({userSelectionRect:{width:0,height:0,startX:L,startY:P,x:L,y:P}}),a?.(G)},I=G=>{const{userSelectionRect:X,transform:W,nodeLookup:L,edgeLookup:P,connectionLookup:Z,triggerNodeChanges:R,triggerEdgeChanges:D,defaultEdgeOptions:U}=_.getState();if(!C.current||!X)return;j.current=!0;const{x:Y,y:ne}=Ii(G.nativeEvent,C.current),{startX:ae,startY:re}=X,de={startX:ae,startY:re,x:Y<ae?Y:ae,y:ne<re?ne:re,width:Math.abs(Y-ae),height:Math.abs(ne-re)},Q=T.current,J=N.current;T.current=new Set(O9(L,de,W,n===fc.Partial,!0).map(fe=>fe.id)),N.current=new Set;const oe=U?.selectable??!0;for(const fe of T.current){const me=Z.get(fe);if(me)for(const{edgeId:we}of me.values()){const ke=P.get(we);ke&&(ke.selectable??oe)&&N.current.add(we)}}if(!WN(Q,T.current)){const fe=Bo(L,T.current,!0);R(fe)}if(!WN(J,N.current)){const fe=Bo(P,N.current);D(fe)}_.setState({userSelectionRect:de,userSelectionActive:!0,nodesSelectionActive:!1})},V=G=>{if(G.button!==0||!$.current)return;G.target?.releasePointerCapture?.(G.pointerId);const{userSelectionRect:X}=_.getState();!S&&X&&G.target===k.current&&M?.(G),_.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:T.current.size>0}),o?.(G),(t||i)&&(j.current=!1),$.current=!1},H=r===!0||Array.isArray(r)&&r.includes(0);return O.jsxs("div",{className:nn(["react-flow__pane",{draggable:H,dragging:x,selection:e}]),onClick:v?void 0:N0(M,k),onContextMenu:N0(q,k),onWheel:N0(F,k),onPointerEnter:v?void 0:d,onPointerDown:v?B:p,onPointerMove:v?I:p,onPointerUp:v?V:void 0,onPointerLeave:m,ref:k,style:qp,children:[g,O.jsx(ane,{})]})}function qw({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:l,onError:c}=t.getState(),f=l.get(e);if(!f){c?.("012",ei.error012(e));return}t.setState({nodesSelectionActive:!1}),f.selected?(n||f.selected&&o)&&(a({nodes:[f],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])}function c6({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){const l=Ft(),[c,f]=ee.useState(!1),d=ee.useRef();return ee.useEffect(()=>{d.current=Zee({getStoreItems:()=>l.getState(),onNodeMouseDown:p=>{qw({id:p,store:l,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),ee.useEffect(()=>{if(t)d.current?.destroy();else if(e.current)return d.current?.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{d.current?.destroy()}},[n,r,t,a,e,i]),c}const lne=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function f6(){const e=Ft();return ee.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:a,nodesDraggable:o,onError:l,updateNodePositions:c,nodeLookup:f,nodeOrigin:d}=e.getState(),p=new Map,m=lne(o),g=i?a[0]:5,_=i?a[1]:5,S=n.direction.x*g*n.factor,b=n.direction.y*_*n.factor;for(const[,x]of f){if(!m(x))continue;let w={x:x.internals.positionAbsolute.x+S,y:x.internals.positionAbsolute.y+b};i&&(w=Ip(w,a));const{position:v,positionAbsolute:k}=R9({nodeId:x.id,nextPosition:w,nodeLookup:f,nodeExtent:r,nodeOrigin:d,onError:l});x.position=v,x.internals.positionAbsolute=k,p.set(x.id,x)}c(p)},[])}const BS=ee.createContext(null),une=BS.Provider;BS.Consumer;const d6=()=>ee.useContext(BS),cne=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),fne=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:l,toHandle:c,isValid:f}=o,d=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:l?.nodeId===e&&l?.id===t&&l?.type===n,connectingTo:d,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===nl.Strict?l?.type!==n:e!==l?.nodeId||t!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:d&&f}};function dne({type:e="source",position:t=Ie.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:c,className:f,onMouseDown:d,onTouchStart:p,...m},g){const _=o||null,S=e==="target",b=Ft(),x=d6(),{connectOnClick:w,noPanClassName:v,rfId:k}=ut(cne,Vt),{connectingFrom:C,connectingTo:T,clickConnecting:N,isPossibleEndHandle:j,connectionInProcess:$,clickConnectionInProcess:M,valid:q}=ut(fne(x,_,e),Vt);x||b.getState().onError?.("010",ei.error010());const F=V=>{const{defaultEdgeOptions:H,onConnect:G,hasDefaultEdges:X}=b.getState(),W={...H,...V};if(X){const{edges:L,setEdges:P}=b.getState();P($ee(W,L))}G?.(W),l?.(W)},B=V=>{if(!x)return;const H=L9(V.nativeEvent);if(i&&(H&&V.button===0||!H)){const G=b.getState();Lw.onPointerDown(V.nativeEvent,{autoPanOnConnect:G.autoPanOnConnect,connectionMode:G.connectionMode,connectionRadius:G.connectionRadius,domNode:G.domNode,nodeLookup:G.nodeLookup,lib:G.lib,isTarget:S,handleId:_,nodeId:x,flowId:G.rfId,panBy:G.panBy,cancelConnection:G.cancelConnection,onConnectStart:G.onConnectStart,onConnectEnd:G.onConnectEnd,updateConnection:G.updateConnection,onConnect:F,isValidConnection:n||G.isValidConnection,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:G.autoPanSpeed})}H?d?.(V):p?.(V)},I=V=>{const{onClickConnectStart:H,onClickConnectEnd:G,connectionClickStartHandle:X,connectionMode:W,isValidConnection:L,lib:P,rfId:Z,nodeLookup:R,connection:D}=b.getState();if(!x||!X&&!i)return;if(!X){H?.(V.nativeEvent,{nodeId:x,handleId:_,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:x,type:e,id:_}});return}const U=P9(V.target),Y=n||L,{connection:ne,isValid:ae}=Lw.isValid(V.nativeEvent,{handle:{nodeId:x,id:_,type:e},connectionMode:W,fromNodeId:X.nodeId,fromHandleId:X.id||null,fromType:X.type,isValidConnection:Y,flowId:Z,doc:U,lib:P,nodeLookup:R});ae&&ne&&F(ne);const re=structuredClone(D);delete re.inProgress,re.toPosition=re.toHandle?re.toHandle.position:null,G?.(V,re),b.setState({connectionClickStartHandle:null})};return O.jsx("div",{"data-handleid":_,"data-nodeid":x,"data-handlepos":t,"data-id":`${k}-${x}-${_}-${e}`,className:nn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",v,f,{source:!S,target:S,connectable:r,connectablestart:i,connectableend:a,clickconnecting:N,connectingfrom:C,connectingto:T,valid:q,connectionindicator:r&&(!$||j)&&($||M?a:i)}]),onMouseDown:B,onTouchStart:B,onClick:w?I:void 0,ref:g,...m,children:c})}const op=ee.memo(l6(dne));function hne({data:e,isConnectable:t,sourcePosition:n=Ie.Bottom}){return O.jsxs(O.Fragment,{children:[e?.label,O.jsx(op,{type:"source",position:n,isConnectable:t})]})}function pne({data:e,isConnectable:t,targetPosition:n=Ie.Top,sourcePosition:r=Ie.Bottom}){return O.jsxs(O.Fragment,{children:[O.jsx(op,{type:"target",position:n,isConnectable:t}),e?.label,O.jsx(op,{type:"source",position:r,isConnectable:t})]})}function mne(){return null}function gne({data:e,isConnectable:t,targetPosition:n=Ie.Top}){return O.jsxs(O.Fragment,{children:[O.jsx(op,{type:"target",position:n,isConnectable:t}),e?.label]})}const lp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},CO={input:hne,default:pne,output:gne,group:mne};function yne(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const bne=e=>{const{width:t,height:n,x:r,y:i}=Rc(e.nodeLookup,{filter:a=>!!a.selected});return{width:Mr(t)?t:null,height:Mr(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function vne({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ft(),{width:i,height:a,transformString:o,userSelectionActive:l}=ut(bne,Vt),c=f6(),f=ee.useRef(null);if(ee.useEffect(()=>{n||f.current?.focus({preventScroll:!0})},[n]),c6({nodeRef:f}),l||!i||!a)return null;const d=e?m=>{const g=r.getState().nodes.filter(_=>_.selected);e(m,g)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(lp,m.key)&&(m.preventDefault(),c({direction:lp[m.key],factor:m.shiftKey?4:1}))};return O.jsx("div",{className:nn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:O.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:i,height:a}})})}const AO=typeof window<"u"?window:void 0,_ne=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function h6({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:f,selectionOnDrag:d,selectionMode:p,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:b,elementsSelectable:x,zoomOnScroll:w,zoomOnPinch:v,panOnScroll:k,panOnScrollSpeed:C,panOnScrollMode:T,zoomOnDoubleClick:N,panOnDrag:j,defaultViewport:$,translateExtent:M,minZoom:q,maxZoom:F,preventScrolling:B,onSelectionContextMenu:I,noWheelClassName:V,noPanClassName:H,disableKeyboardA11y:G,onViewportChange:X,isControlledViewport:W}){const{nodesSelectionActive:L,userSelectionActive:P}=ut(_ne),Z=pc(f,{target:AO}),R=pc(S,{target:AO}),D=R||j,U=R||k,Y=d&&D!==!0,ne=Z||P||Y;return ene({deleteKeyCode:c,multiSelectionKeyCode:_}),O.jsx(rne,{onPaneContextMenu:a,elementsSelectable:x,zoomOnScroll:w,zoomOnPinch:v,panOnScroll:U,panOnScrollSpeed:C,panOnScrollMode:T,zoomOnDoubleClick:N,panOnDrag:!Z&&D,defaultViewport:$,translateExtent:M,minZoom:q,maxZoom:F,zoomActivationKeyCode:b,preventScrolling:B,noWheelClassName:V,noPanClassName:H,onViewportChange:X,isControlledViewport:W,paneClickDistance:l,children:O.jsxs(one,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:D,isSelecting:!!ne,selectionMode:p,selectionKeyPressed:Z,selectionOnDrag:Y,children:[e,L&&O.jsx(vne,{onSelectionContextMenu:I,noPanClassName:H,disableKeyboardA11y:G})]})})}h6.displayName="FlowRenderer";const xne=ee.memo(h6),wne=e=>t=>e?O9(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Sne(e){return ut(ee.useCallback(wne(e),[e]),Vt)}const Ene=e=>e.updateNodeInternals;function kne(){const e=ut(Ene),[t]=ee.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const a=i.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:i.target,force:!0})}),e(r)}));return ee.useEffect(()=>()=>{t?.disconnect()},[t]),t}function Cne({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Ft(),a=ee.useRef(null),o=ee.useRef(null),l=ee.useRef(e.sourcePosition),c=ee.useRef(e.targetPosition),f=ee.useRef(t),d=n&&!!e.internals.handleBounds;return ee.useEffect(()=>{a.current&&!e.hidden&&(!d||o.current!==a.current)&&(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[d,e.hidden]),ee.useEffect(()=>()=>{o.current&&(r?.unobserve(o.current),o.current=null)},[]),ee.useEffect(()=>{if(a.current){const p=f.current!==t,m=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(p||m||g)&&(f.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function Ane({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:c,nodesConnectable:f,nodesFocusable:d,resizeObserver:p,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:_,rfId:S,nodeTypes:b,nodeClickDistance:x,onError:w}){const{node:v,internals:k,isParent:C}=ut(ne=>{const ae=ne.nodeLookup.get(e),re=ne.parentLookup.has(e);return{node:ae,internals:ae.internals,isParent:re}},Vt);let T=v.type||"default",N=b?.[T]||CO[T];N===void 0&&(w?.("003",ei.error003(T)),T="default",N=CO.default);const j=!!(v.draggable||l&&typeof v.draggable>"u"),$=!!(v.selectable||c&&typeof v.selectable>"u"),M=!!(v.connectable||f&&typeof v.connectable>"u"),q=!!(v.focusable||d&&typeof v.focusable>"u"),F=Ft(),B=D9(v),I=Cne({node:v,nodeType:T,hasDimensions:B,resizeObserver:p}),V=c6({nodeRef:I,disabled:v.hidden||!j,noDragClassName:m,handleSelector:v.dragHandle,nodeId:e,isSelectable:$,nodeClickDistance:x}),H=f6();if(v.hidden)return null;const G=Hi(v),X=yne(v),W=$||j||t||n||r||i,L=n?ne=>n(ne,{...k.userNode}):void 0,P=r?ne=>r(ne,{...k.userNode}):void 0,Z=i?ne=>i(ne,{...k.userNode}):void 0,R=a?ne=>a(ne,{...k.userNode}):void 0,D=o?ne=>o(ne,{...k.userNode}):void 0,U=ne=>{const{selectNodesOnDrag:ae,nodeDragThreshold:re}=F.getState();$&&(!ae||!j||re>0)&&qw({id:e,store:F,nodeRef:I}),t&&t(ne,{...k.userNode})},Y=ne=>{if(!(z9(ne.nativeEvent)||_))if(C9.includes(ne.key)&&$){const ae=ne.key==="Escape";qw({id:e,store:F,unselect:ae,nodeRef:I})}else j&&v.selected&&Object.prototype.hasOwnProperty.call(lp,ne.key)&&(ne.preventDefault(),F.setState({ariaLiveMessage:`Moved selected node ${ne.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~k.positionAbsolute.x}, y: ${~~k.positionAbsolute.y}`}),H({direction:lp[ne.key],factor:ne.shiftKey?4:1}))};return O.jsx("div",{className:nn(["react-flow__node",`react-flow__node-${T}`,{[g]:j},v.className,{selected:v.selected,selectable:$,parent:C,draggable:j,dragging:V}]),ref:I,style:{zIndex:k.z,transform:`translate(${k.positionAbsolute.x}px,${k.positionAbsolute.y}px)`,pointerEvents:W?"all":"none",visibility:B?"visible":"hidden",...v.style,...X},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:P,onMouseLeave:Z,onContextMenu:R,onClick:U,onDoubleClick:D,onKeyDown:q?Y:void 0,tabIndex:q?0:void 0,role:q?"button":void 0,"aria-describedby":_?void 0:`${n6}-${S}`,"aria-label":v.ariaLabel,children:O.jsx(une,{value:e,children:O.jsx(N,{id:e,data:v.data,type:T,positionAbsoluteX:k.positionAbsolute.x,positionAbsoluteY:k.positionAbsolute.y,selected:v.selected??!1,selectable:$,draggable:j,deletable:v.deletable??!0,isConnectable:M,sourcePosition:v.sourcePosition,targetPosition:v.targetPosition,dragging:V,dragHandle:v.dragHandle,zIndex:k.z,parentId:v.parentId,...G})})})}const Tne=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function p6(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=ut(Tne,Vt),o=Sne(e.onlyRenderVisibleElements),l=kne();return O.jsx("div",{className:"react-flow__nodes",style:qp,children:o.map(c=>O.jsx(Ane,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}p6.displayName="NodeRenderer";const Nne=ee.memo(p6);function One(e){return ut(ee.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const a=n.nodeLookup.get(i.source),o=n.nodeLookup.get(i.target);a&&o&&Ree({sourceNode:a,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Vt)}const Rne=({color:e="none",strokeWidth:t=1})=>O.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),jne=({color:e="none",strokeWidth:t=1})=>O.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),TO={[rp.Arrow]:Rne,[rp.ArrowClosed]:jne};function Mne(e){const t=Ft();return ee.useMemo(()=>Object.prototype.hasOwnProperty.call(TO,e)?TO[e]:(t.getState().onError?.("009",ei.error009(e)),null),[e])}const $ne=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const c=Mne(t);return c?O.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:O.jsx(c,{color:n,strokeWidth:o})}):null},m6=({defaultColor:e,rfId:t})=>{const n=ut(a=>a.edges),r=ut(a=>a.defaultEdgeOptions),i=ee.useMemo(()=>Lee(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?O.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:O.jsx("defs",{children:i.map(a=>O.jsx($ne,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};m6.displayName="MarkerDefinitions";var Dne=ee.memo(m6);function g6({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:c,className:f,...d}){const[p,m]=ee.useState({x:1,y:0,width:0,height:0}),g=nn(["react-flow__edge-textwrapper",f]),_=ee.useRef(null);return ee.useEffect(()=>{if(_.current){const S=_.current.getBBox();m({x:S.x,y:S.y,width:S.width,height:S.height})}},[n]),n?O.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:g,visibility:p.width?"visible":"hidden",...d,children:[i&&O.jsx("rect",{width:p.width+2*o[0],x:-o[0],y:-o[1],height:p.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),O.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:_,style:r,children:n}),c]}):null}g6.displayName="EdgeText";const Ine=ee.memo(g6);function Fp({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:f=20,...d}){return O.jsxs(O.Fragment,{children:[O.jsx("path",{...d,d:e,fill:"none",className:nn(["react-flow__edge-path",d.className])}),f&&O.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}),r&&Mr(t)&&Mr(n)?O.jsx(Ine,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function NO({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Ie.Left||e===Ie.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function y6({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top}){const[o,l]=NO({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,f]=NO({pos:a,x1:r,y1:i,x2:e,y2:t}),[d,p,m,g]=q9({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:f});return[`M${e},${t} C${o},${l} ${c},${f} ${r},${i}`,d,p,m,g]}function b6(e){return ee.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:l,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:_,markerEnd:S,markerStart:b,interactionWidth:x})=>{const[w,v,k]=y6({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l}),C=e.isInternal?void 0:t;return O.jsx(Fp,{id:C,path:w,labelX:v,labelY:k,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:_,markerEnd:S,markerStart:b,interactionWidth:x})})}const Pne=b6({isInternal:!1}),v6=b6({isInternal:!0});Pne.displayName="SimpleBezierEdge";v6.displayName="SimpleBezierEdgeInternal";function _6(e){return ee.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:p,style:m,sourcePosition:g=Ie.Bottom,targetPosition:_=Ie.Top,markerEnd:S,markerStart:b,pathOptions:x,interactionWidth:w})=>{const[v,k,C]=Iw({sourceX:n,sourceY:r,sourcePosition:g,targetX:i,targetY:a,targetPosition:_,borderRadius:x?.borderRadius,offset:x?.offset}),T=e.isInternal?void 0:t;return O.jsx(Fp,{id:T,path:v,labelX:k,labelY:C,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:S,markerStart:b,interactionWidth:w})})}const x6=_6({isInternal:!1}),w6=_6({isInternal:!0});x6.displayName="SmoothStepEdge";w6.displayName="SmoothStepEdgeInternal";function S6(e){return ee.memo(({id:t,...n})=>{const r=e.isInternal?void 0:t;return O.jsx(x6,{...n,id:r,pathOptions:ee.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}const zne=S6({isInternal:!1}),E6=S6({isInternal:!0});zne.displayName="StepEdge";E6.displayName="StepEdgeInternal";function k6(e){return ee.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:g,markerStart:_,interactionWidth:S})=>{const[b,x,w]=U9({sourceX:n,sourceY:r,targetX:i,targetY:a}),v=e.isInternal?void 0:t;return O.jsx(Fp,{id:v,path:b,labelX:x,labelY:w,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:p,style:m,markerEnd:g,markerStart:_,interactionWidth:S})})}const Lne=k6({isInternal:!1}),C6=k6({isInternal:!0});Lne.displayName="StraightEdge";C6.displayName="StraightEdgeInternal";function A6(e){return ee.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=Ie.Bottom,targetPosition:l=Ie.Top,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:_,markerEnd:S,markerStart:b,pathOptions:x,interactionWidth:w})=>{const[v,k,C]=F9({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l,curvature:x?.curvature}),T=e.isInternal?void 0:t;return O.jsx(Fp,{id:T,path:v,labelX:k,labelY:C,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:_,markerEnd:S,markerStart:b,interactionWidth:w})})}const qne=A6({isInternal:!1}),T6=A6({isInternal:!0});qne.displayName="BezierEdge";T6.displayName="BezierEdgeInternal";const OO={default:T6,straight:C6,step:E6,smoothstep:w6,simplebezier:v6},RO={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Fne=(e,t,n)=>n===Ie.Left?e-t:n===Ie.Right?e+t:e,Bne=(e,t,n)=>n===Ie.Top?e-t:n===Ie.Bottom?e+t:e,jO="react-flow__edgeupdater";function MO({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:l}){return O.jsx("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:nn([jO,`${jO}-${l}`]),cx:Fne(t,r,e),cy:Bne(n,r,e),r,stroke:"transparent",fill:"transparent"})}function Une({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:l,targetPosition:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:p,setReconnecting:m,setUpdateHover:g}){const _=Ft(),S=(k,C)=>{if(k.button!==0)return;const{autoPanOnConnect:T,domNode:N,isValidConnection:j,connectionMode:$,connectionRadius:M,lib:q,onConnectStart:F,onConnectEnd:B,cancelConnection:I,nodeLookup:V,rfId:H,panBy:G,updateConnection:X}=_.getState(),W=C.type==="target";m(!0),d?.(k,n,C.type);const L=(Z,R)=>{m(!1),p?.(Z,n,C.type,R)},P=Z=>f?.(n,Z);Lw.onPointerDown(k.nativeEvent,{autoPanOnConnect:T,connectionMode:$,connectionRadius:M,domNode:N,handleId:C.id,nodeId:C.nodeId,nodeLookup:V,isTarget:W,edgeUpdaterType:C.type,lib:q,flowId:H,cancelConnection:I,panBy:G,isValidConnection:j,onConnect:P,onConnectStart:F,onConnectEnd:B,onReconnectEnd:L,updateConnection:X,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle})},b=k=>S(k,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),x=k=>S(k,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),w=()=>g(!0),v=()=>g(!1);return O.jsxs(O.Fragment,{children:[(e===!0||e==="source")&&O.jsx(MO,{position:l,centerX:r,centerY:i,radius:t,onMouseDown:b,onMouseEnter:w,onMouseOut:v,type:"source"}),(e===!0||e==="target")&&O.jsx(MO,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:x,onMouseEnter:w,onMouseOut:v,type:"target"})]})}function Hne({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:f,reconnectRadius:d,onReconnect:p,onReconnectStart:m,onReconnectEnd:g,rfId:_,edgeTypes:S,noPanClassName:b,onError:x,disableKeyboardA11y:w}){let v=ut(J=>J.edgeLookup.get(e));const k=ut(J=>J.defaultEdgeOptions);v=k?{...k,...v}:v;let C=v.type||"default",T=S?.[C]||OO[C];T===void 0&&(x?.("011",ei.error011(C)),C="default",T=OO.default);const N=!!(v.focusable||t&&typeof v.focusable>"u"),j=typeof p<"u"&&(v.reconnectable||n&&typeof v.reconnectable>"u"),$=!!(v.selectable||r&&typeof v.selectable>"u"),M=ee.useRef(null),[q,F]=ee.useState(!1),[B,I]=ee.useState(!1),V=Ft(),{zIndex:H,sourceX:G,sourceY:X,targetX:W,targetY:L,sourcePosition:P,targetPosition:Z}=ut(ee.useCallback(J=>{const oe=J.nodeLookup.get(v.source),fe=J.nodeLookup.get(v.target);if(!oe||!fe)return{zIndex:v.zIndex,...RO};const me=zee({id:e,sourceNode:oe,targetNode:fe,sourceHandle:v.sourceHandle||null,targetHandle:v.targetHandle||null,connectionMode:J.connectionMode,onError:x});return{zIndex:Oee({selected:v.selected,zIndex:v.zIndex,sourceNode:oe,targetNode:fe,elevateOnSelect:J.elevateEdgesOnSelect}),...me||RO}},[v.source,v.target,v.sourceHandle,v.targetHandle,v.selected,v.zIndex]),Vt),R=ee.useMemo(()=>v.markerStart?`url('#${Pw(v.markerStart,_)}')`:void 0,[v.markerStart,_]),D=ee.useMemo(()=>v.markerEnd?`url('#${Pw(v.markerEnd,_)}')`:void 0,[v.markerEnd,_]);if(v.hidden||G===null||X===null||W===null||L===null)return null;const U=J=>{const{addSelectedEdges:oe,unselectNodesAndEdges:fe,multiSelectionActive:me}=V.getState();$&&(V.setState({nodesSelectionActive:!1}),v.selected&&me?(fe({nodes:[],edges:[v]}),M.current?.blur()):oe([e])),i&&i(J,v)},Y=a?J=>{a(J,{...v})}:void 0,ne=o?J=>{o(J,{...v})}:void 0,ae=l?J=>{l(J,{...v})}:void 0,re=c?J=>{c(J,{...v})}:void 0,de=f?J=>{f(J,{...v})}:void 0,Q=J=>{if(!w&&C9.includes(J.key)&&$){const{unselectNodesAndEdges:oe,addSelectedEdges:fe}=V.getState();J.key==="Escape"?(M.current?.blur(),oe({edges:[v]})):fe([e])}};return O.jsx("svg",{style:{zIndex:H},children:O.jsxs("g",{className:nn(["react-flow__edge",`react-flow__edge-${C}`,v.className,b,{selected:v.selected,animated:v.animated,inactive:!$&&!i,updating:q,selectable:$}]),onClick:U,onDoubleClick:Y,onContextMenu:ne,onMouseEnter:ae,onMouseMove:re,onMouseLeave:de,onKeyDown:N?Q:void 0,tabIndex:N?0:void 0,role:N?"button":"img","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":v.ariaLabel===null?void 0:v.ariaLabel||`Edge from ${v.source} to ${v.target}`,"aria-describedby":N?`${r6}-${_}`:void 0,ref:M,children:[!B&&O.jsx(T,{id:e,source:v.source,target:v.target,type:v.type,selected:v.selected,animated:v.animated,selectable:$,deletable:v.deletable??!0,label:v.label,labelStyle:v.labelStyle,labelShowBg:v.labelShowBg,labelBgStyle:v.labelBgStyle,labelBgPadding:v.labelBgPadding,labelBgBorderRadius:v.labelBgBorderRadius,sourceX:G,sourceY:X,targetX:W,targetY:L,sourcePosition:P,targetPosition:Z,data:v.data,style:v.style,sourceHandleId:v.sourceHandle,targetHandleId:v.targetHandle,markerStart:R,markerEnd:D,pathOptions:"pathOptions"in v?v.pathOptions:void 0,interactionWidth:v.interactionWidth}),j&&O.jsx(Une,{edge:v,isReconnectable:j,reconnectRadius:d,onReconnect:p,onReconnectStart:m,onReconnectEnd:g,sourceX:G,sourceY:X,targetX:W,targetY:L,sourcePosition:P,targetPosition:Z,setUpdateHover:F,setReconnecting:I})]})})}const Vne=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function N6({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:f,onEdgeClick:d,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:_,disableKeyboardA11y:S}){const{edgesFocusable:b,edgesReconnectable:x,elementsSelectable:w,onError:v}=ut(Vne,Vt),k=One(t);return O.jsxs("div",{className:"react-flow__edges",children:[O.jsx(Dne,{defaultColor:e,rfId:n}),k.map(C=>O.jsx(Hne,{id:C,edgesFocusable:b,edgesReconnectable:x,elementsSelectable:w,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:f,onClick:d,reconnectRadius:p,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:_,rfId:n,onError:v,edgeTypes:r,disableKeyboardA11y:S},C))]})}N6.displayName="EdgeRenderer";const Gne=ee.memo(N6),Zne=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Yne({children:e}){const t=ut(Zne);return O.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Kne(e){const t=Lp(),n=ee.useRef(!1);ee.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Xne=e=>e.panZoom?.syncViewport;function Wne(e){const t=ut(Xne),n=Ft();return ee.useEffect(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Qne(e){return e.connection.inProgress?{...e.connection,to:jc(e.connection.to,e.transform)}:{...e.connection}}function Jne(e){return Qne}function ere(e){const t=Jne();return ut(t,Vt)}const tre=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function nre({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:a,height:o,isValid:l,inProgress:c}=ut(tre,Vt);return!(a&&i&&c)?null:O.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:O.jsx("g",{className:nn(["react-flow__connection",T9(l)]),children:O.jsx(O6,{style:t,type:n,CustomComponent:r,isValid:l})})})}const O6=({style:e,type:t=Oa.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:a,fromNode:o,fromHandle:l,fromPosition:c,to:f,toNode:d,toHandle:p,toPosition:m}=ere();if(!i)return;if(n)return O.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:a.x,fromY:a.y,toX:f.x,toY:f.y,fromPosition:c,toPosition:m,connectionStatus:T9(r),toNode:d,toHandle:p});let g="";const _={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:f.x,targetY:f.y,targetPosition:m};switch(t){case Oa.Bezier:[g]=F9(_);break;case Oa.SimpleBezier:[g]=y6(_);break;case Oa.Step:[g]=Iw({..._,borderRadius:0});break;case Oa.SmoothStep:[g]=Iw(_);break;default:[g]=U9(_)}return O.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};O6.displayName="ConnectionLine";const rre={};function $O(e=rre){ee.useRef(e),Ft(),ee.useEffect(()=>{},[e])}function ire(){Ft(),ee.useRef(!1),ee.useEffect(()=>{},[])}function R6({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:d,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:g,connectionLineType:_,connectionLineStyle:S,connectionLineComponent:b,connectionLineContainerStyle:x,selectionKeyCode:w,selectionOnDrag:v,selectionMode:k,multiSelectionKeyCode:C,panActivationKeyCode:T,zoomActivationKeyCode:N,deleteKeyCode:j,onlyRenderVisibleElements:$,elementsSelectable:M,defaultViewport:q,translateExtent:F,minZoom:B,maxZoom:I,preventScrolling:V,defaultMarkerColor:H,zoomOnScroll:G,zoomOnPinch:X,panOnScroll:W,panOnScrollSpeed:L,panOnScrollMode:P,zoomOnDoubleClick:Z,panOnDrag:R,onPaneClick:D,onPaneMouseEnter:U,onPaneMouseMove:Y,onPaneMouseLeave:ne,onPaneScroll:ae,onPaneContextMenu:re,paneClickDistance:de,nodeClickDistance:Q,onEdgeContextMenu:J,onEdgeMouseEnter:oe,onEdgeMouseMove:fe,onEdgeMouseLeave:me,reconnectRadius:we,onReconnect:ke,onReconnectStart:Ze,onReconnectEnd:Le,noDragClassName:Ye,noWheelClassName:Ve,noPanClassName:$e,disableKeyboardA11y:qe,nodeExtent:We,rfId:Tt,viewport:pe,onViewportChange:_e}){return $O(e),$O(t),ire(),Kne(n),Wne(pe),O.jsx(xne,{onPaneClick:D,onPaneMouseEnter:U,onPaneMouseMove:Y,onPaneMouseLeave:ne,onPaneContextMenu:re,onPaneScroll:ae,paneClickDistance:de,deleteKeyCode:j,selectionKeyCode:w,selectionOnDrag:v,selectionMode:k,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:C,panActivationKeyCode:T,zoomActivationKeyCode:N,elementsSelectable:M,zoomOnScroll:G,zoomOnPinch:X,zoomOnDoubleClick:Z,panOnScroll:W,panOnScrollSpeed:L,panOnScrollMode:P,panOnDrag:R,defaultViewport:q,translateExtent:F,minZoom:B,maxZoom:I,onSelectionContextMenu:p,preventScrolling:V,noDragClassName:Ye,noWheelClassName:Ve,noPanClassName:$e,disableKeyboardA11y:qe,onViewportChange:_e,isControlledViewport:!!pe,children:O.jsxs(Yne,{children:[O.jsx(Gne,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:ke,onReconnectStart:Ze,onReconnectEnd:Le,onlyRenderVisibleElements:$,onEdgeContextMenu:J,onEdgeMouseEnter:oe,onEdgeMouseMove:fe,onEdgeMouseLeave:me,reconnectRadius:we,defaultMarkerColor:H,noPanClassName:$e,disableKeyboardA11y:qe,rfId:Tt}),O.jsx(nre,{style:S,type:_,component:b,containerStyle:x}),O.jsx("div",{className:"react-flow__edgelabel-renderer"}),O.jsx(Nne,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:d,nodeClickDistance:Q,onlyRenderVisibleElements:$,noPanClassName:$e,noDragClassName:Ye,disableKeyboardA11y:qe,nodeExtent:We,rfId:Tt}),O.jsx("div",{className:"react-flow__viewport-portal"})]})})}R6.displayName="GraphView";const are=ee.memo(R6),DO=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:c=.5,maxZoom:f=2,nodeOrigin:d,nodeExtent:p}={})=>{const m=new Map,g=new Map,_=new Map,S=new Map,b=r??t??[],x=n??e??[],w=d??[0,0],v=p??cc;V9(_,S,b);const k=zw(x,m,g,{nodeOrigin:w,nodeExtent:v,elevateNodesOnSelect:!1});let C=[0,0,1];if(o&&i&&a){const T=Rc(m,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:N,y:j,zoom:$}=IS(T,i,a,c,f,l?.padding??.1);C=[N,j,$]}return{rfId:"1",width:0,height:0,transform:C,nodes:x,nodesInitialized:k,nodeLookup:m,parentLookup:g,edges:b,edgeLookup:S,connectionLookup:_,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:f,translateExtent:cc,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:nl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...A9},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:kee,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},sre=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:f,nodeOrigin:d,nodeExtent:p})=>Cte((m,g)=>{async function _(){const{nodeLookup:S,panZoom:b,fitViewOptions:x,fitViewResolver:w,width:v,height:k,minZoom:C,maxZoom:T}=g();b&&(await See({nodes:S,width:v,height:k,panZoom:b,minZoom:C,maxZoom:T},x),w?.resolve(!0),m({fitViewResolver:null}))}return{...DO({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:f,nodeOrigin:d,nodeExtent:p,defaultNodes:n,defaultEdges:r}),setNodes:S=>{const{nodeLookup:b,parentLookup:x,nodeOrigin:w,elevateNodesOnSelect:v,fitViewQueued:k}=g(),C=zw(S,b,x,{nodeOrigin:w,nodeExtent:p,elevateNodesOnSelect:v,checkEquality:!0});k&&C?(_(),m({nodes:S,nodesInitialized:C,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:S,nodesInitialized:C})},setEdges:S=>{const{connectionLookup:b,edgeLookup:x}=g();V9(b,x,S),m({edges:S})},setDefaultNodesAndEdges:(S,b)=>{if(S){const{setNodes:x}=g();x(S),m({hasDefaultNodes:!0})}if(b){const{setEdges:x}=g();x(b),m({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:b,nodeLookup:x,parentLookup:w,domNode:v,nodeOrigin:k,nodeExtent:C,debug:T,fitViewQueued:N}=g(),{changes:j,updatedInternals:$}=Hee(S,x,w,v,k,C);$&&(Fee(x,w,{nodeOrigin:k,nodeExtent:C}),N?(_(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),j?.length>0&&(T&&console.log("React Flow: trigger node changes",j),b?.(j)))},updateNodePositions:(S,b=!1)=>{const x=[],w=[],{nodeLookup:v,triggerNodeChanges:k}=g();for(const[C,T]of S){const N=v.get(C),j=!!(N?.expandParent&&N?.parentId&&T?.position),$={id:C,type:"position",position:j?{x:Math.max(0,T.position.x),y:Math.max(0,T.position.y)}:T.position,dragging:b};j&&N.parentId&&x.push({id:C,parentId:N.parentId,rect:{...T.internals.positionAbsolute,width:T.measured.width??0,height:T.measured.height??0}}),w.push($)}if(x.length>0){const{parentLookup:C,nodeOrigin:T}=g(),N=FS(x,v,C,T);w.push(...N)}k(w)},triggerNodeChanges:S=>{const{onNodesChange:b,setNodes:x,nodes:w,hasDefaultNodes:v,debug:k}=g();if(S?.length){if(v){const C=s6(S,w);x(C)}k&&console.log("React Flow: trigger node changes",S),b?.(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:b,setEdges:x,edges:w,hasDefaultEdges:v,debug:k}=g();if(S?.length){if(v){const C=o6(S,w);x(C)}k&&console.log("React Flow: trigger edge changes",S),b?.(S)}},addSelectedNodes:S=>{const{multiSelectionActive:b,edgeLookup:x,nodeLookup:w,triggerNodeChanges:v,triggerEdgeChanges:k}=g();if(b){const C=S.map(T=>hs(T,!0));v(C);return}v(Bo(w,new Set([...S]),!0)),k(Bo(x))},addSelectedEdges:S=>{const{multiSelectionActive:b,edgeLookup:x,nodeLookup:w,triggerNodeChanges:v,triggerEdgeChanges:k}=g();if(b){const C=S.map(T=>hs(T,!0));k(C);return}k(Bo(x,new Set([...S]))),v(Bo(w,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:b}={})=>{const{edges:x,nodes:w,nodeLookup:v,triggerNodeChanges:k,triggerEdgeChanges:C}=g(),T=S||w,N=b||x,j=T.map(M=>{const q=v.get(M.id);return q&&(q.selected=!1),hs(M.id,!1)}),$=N.map(M=>hs(M.id,!1));k(j),C($)},setMinZoom:S=>{const{panZoom:b,maxZoom:x}=g();b?.setScaleExtent([S,x]),m({minZoom:S})},setMaxZoom:S=>{const{panZoom:b,minZoom:x}=g();b?.setScaleExtent([x,S]),m({maxZoom:S})},setTranslateExtent:S=>{g().panZoom?.setTranslateExtent(S),m({translateExtent:S})},setPaneClickDistance:S=>{g().panZoom?.setClickDistance(S)},resetSelectedElements:()=>{const{edges:S,nodes:b,triggerNodeChanges:x,triggerEdgeChanges:w,elementsSelectable:v}=g();if(!v)return;const k=b.reduce((T,N)=>N.selected?[...T,hs(N.id,!1)]:T,[]),C=S.reduce((T,N)=>N.selected?[...T,hs(N.id,!1)]:T,[]);x(k),w(C)},setNodeExtent:S=>{const{nodes:b,nodeLookup:x,parentLookup:w,nodeOrigin:v,elevateNodesOnSelect:k,nodeExtent:C}=g();S[0][0]===C[0][0]&&S[0][1]===C[0][1]&&S[1][0]===C[1][0]&&S[1][1]===C[1][1]||(zw(b,x,w,{nodeOrigin:v,nodeExtent:S,elevateNodesOnSelect:k,checkEquality:!1}),m({nodeExtent:S}))},panBy:S=>{const{transform:b,width:x,height:w,panZoom:v,translateExtent:k}=g();return Vee({delta:S,panZoom:v,transform:b,translateExtent:k,width:x,height:w})},cancelConnection:()=>{m({connection:{...A9}})},updateConnection:S=>{m({connection:S})},reset:()=>m({...DO()})}},Object.is);function j6({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:c,fitView:f,nodeOrigin:d,nodeExtent:p,children:m}){const[g]=ee.useState(()=>sre({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:f,minZoom:o,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:p}));return O.jsx(Ate,{value:g,children:O.jsx(Xte,{children:m})})}function ore({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:l,fitViewOptions:c,minZoom:f,maxZoom:d,nodeOrigin:p,nodeExtent:m}){return ee.useContext(zp)?O.jsx(O.Fragment,{children:e}):O.jsx(j6,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:l,initialFitViewOptions:c,initialMinZoom:f,initialMaxZoom:d,nodeOrigin:p,nodeExtent:m,children:e})}const lre={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function ure({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:l,onEdgeClick:c,onInit:f,onMove:d,onMoveStart:p,onMoveEnd:m,onConnect:g,onConnectStart:_,onConnectEnd:S,onClickConnectStart:b,onClickConnectEnd:x,onNodeMouseEnter:w,onNodeMouseMove:v,onNodeMouseLeave:k,onNodeContextMenu:C,onNodeDoubleClick:T,onNodeDragStart:N,onNodeDrag:j,onNodeDragStop:$,onNodesDelete:M,onEdgesDelete:q,onDelete:F,onSelectionChange:B,onSelectionDragStart:I,onSelectionDrag:V,onSelectionDragStop:H,onSelectionContextMenu:G,onSelectionStart:X,onSelectionEnd:W,onBeforeDelete:L,connectionMode:P,connectionLineType:Z=Oa.Bezier,connectionLineStyle:R,connectionLineComponent:D,connectionLineContainerStyle:U,deleteKeyCode:Y="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:ae=!1,selectionMode:re=fc.Full,panActivationKeyCode:de="Space",multiSelectionKeyCode:Q=sp()?"Meta":"Control",zoomActivationKeyCode:J=sp()?"Meta":"Control",snapToGrid:oe,snapGrid:fe,onlyRenderVisibleElements:me=!1,selectNodesOnDrag:we,nodesDraggable:ke,nodesConnectable:Ze,nodesFocusable:Le,nodeOrigin:Ye=i6,edgesFocusable:Ve,edgesReconnectable:$e,elementsSelectable:qe=!0,defaultViewport:We=qte,minZoom:Tt=.5,maxZoom:pe=2,translateExtent:_e=cc,preventScrolling:Te=!0,nodeExtent:ze,defaultMarkerColor:Je="#b1b1b7",zoomOnScroll:un=!0,zoomOnPinch:On=!0,panOnScroll:jt=!1,panOnScrollSpeed:vt=.5,panOnScrollMode:bn=xs.Free,zoomOnDoubleClick:_t=!0,panOnDrag:qr=!0,onPaneClick:Bn,onPaneMouseEnter:wm,onPaneMouseMove:Bs,onPaneMouseLeave:Us,onPaneScroll:Hs,onPaneContextMenu:oi,paneClickDistance:Fa=0,nodeClickDistance:Ba=0,children:Sm,onReconnect:Gc,onReconnectStart:El,onReconnectEnd:Ua,onEdgeContextMenu:Em,onEdgeDoubleClick:Zc,onEdgeMouseEnter:Yc,onEdgeMouseMove:Kc,onEdgeMouseLeave:kl,reconnectRadius:Cl=10,onNodesChange:Xc,onEdgesChange:Wc,noDragClassName:Fr="nodrag",noWheelClassName:rn="nowheel",noPanClassName:cn="nopan",fitView:li,fitViewOptions:Vs,connectOnClick:km,attributionPosition:Cm,proOptions:Qc,defaultEdgeOptions:Ha,elevateNodesOnSelect:Al,elevateEdgesOnSelect:Yi,disableKeyboardA11y:ui=!1,autoPanOnConnect:Va,autoPanOnNodeDrag:Ki,autoPanSpeed:Yt,connectionRadius:Jc,isValidConnection:ef,onError:ci,style:Xi,id:tf,nodeDragThreshold:nf,viewport:rf,onViewportChange:Am,width:Gs,height:Zs,colorMode:wr="light",debug:Rn,onScroll:Tl,...Tm},Nl){const Ys=tf||"1",Ks=Hte(wr),Nm=ee.useCallback(Sn=>{Sn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Tl?.(Sn)},[Tl]);return O.jsx("div",{"data-testid":"rf__wrapper",...Tm,onScroll:Nm,style:{...Xi,...lre},ref:Nl,className:nn(["react-flow",i,Ks]),id:tf,children:O.jsxs(ore,{nodes:e,edges:t,width:Gs,height:Zs,fitView:li,fitViewOptions:Vs,minZoom:Tt,maxZoom:pe,nodeOrigin:Ye,nodeExtent:ze,children:[O.jsx(are,{onInit:f,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:w,onNodeMouseMove:v,onNodeMouseLeave:k,onNodeContextMenu:C,onNodeDoubleClick:T,nodeTypes:a,edgeTypes:o,connectionLineType:Z,connectionLineStyle:R,connectionLineComponent:D,connectionLineContainerStyle:U,selectionKeyCode:ne,selectionOnDrag:ae,selectionMode:re,deleteKeyCode:Y,multiSelectionKeyCode:Q,panActivationKeyCode:de,zoomActivationKeyCode:J,onlyRenderVisibleElements:me,defaultViewport:We,translateExtent:_e,minZoom:Tt,maxZoom:pe,preventScrolling:Te,zoomOnScroll:un,zoomOnPinch:On,zoomOnDoubleClick:_t,panOnScroll:jt,panOnScrollSpeed:vt,panOnScrollMode:bn,panOnDrag:qr,onPaneClick:Bn,onPaneMouseEnter:wm,onPaneMouseMove:Bs,onPaneMouseLeave:Us,onPaneScroll:Hs,onPaneContextMenu:oi,paneClickDistance:Fa,nodeClickDistance:Ba,onSelectionContextMenu:G,onSelectionStart:X,onSelectionEnd:W,onReconnect:Gc,onReconnectStart:El,onReconnectEnd:Ua,onEdgeContextMenu:Em,onEdgeDoubleClick:Zc,onEdgeMouseEnter:Yc,onEdgeMouseMove:Kc,onEdgeMouseLeave:kl,reconnectRadius:Cl,defaultMarkerColor:Je,noDragClassName:Fr,noWheelClassName:rn,noPanClassName:cn,rfId:Ys,disableKeyboardA11y:ui,nodeExtent:ze,viewport:rf,onViewportChange:Am}),O.jsx(Ute,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:_,onConnectEnd:S,onClickConnectStart:b,onClickConnectEnd:x,nodesDraggable:ke,nodesConnectable:Ze,nodesFocusable:Le,edgesFocusable:Ve,edgesReconnectable:$e,elementsSelectable:qe,elevateNodesOnSelect:Al,elevateEdgesOnSelect:Yi,minZoom:Tt,maxZoom:pe,nodeExtent:ze,onNodesChange:Xc,onEdgesChange:Wc,snapToGrid:oe,snapGrid:fe,connectionMode:P,translateExtent:_e,connectOnClick:km,defaultEdgeOptions:Ha,fitView:li,fitViewOptions:Vs,onNodesDelete:M,onEdgesDelete:q,onDelete:F,onNodeDragStart:N,onNodeDrag:j,onNodeDragStop:$,onSelectionDrag:V,onSelectionDragStart:I,onSelectionDragStop:H,onMove:d,onMoveStart:p,onMoveEnd:m,noPanClassName:cn,nodeOrigin:Ye,rfId:Ys,autoPanOnConnect:Va,autoPanOnNodeDrag:Ki,autoPanSpeed:Yt,onError:ci,connectionRadius:Jc,isValidConnection:ef,selectNodesOnDrag:we,nodeDragThreshold:nf,onBeforeDelete:L,paneClickDistance:Fa,debug:Rn}),O.jsx(Lte,{onSelectionChange:B}),Sm,O.jsx($te,{proOptions:Qc,position:Cm}),O.jsx(jte,{rfId:Ys,disableKeyboardA11y:ui})]})})}var cre=l6(ure);function fre(e){const[t,n]=ee.useState(e),r=ee.useCallback(i=>n(a=>s6(i,a)),[]);return[t,n,r]}function dre(e){const[t,n]=ee.useState(e),r=ee.useCallback(i=>n(a=>o6(i,a)),[]);return[t,n,r]}function hre({dimensions:e,lineWidth:t,variant:n,className:r}){return O.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:nn(["react-flow__background-pattern",n,r])})}function pre({radius:e,className:t}){return O.jsx("circle",{cx:e,cy:e,r:e,className:nn(["react-flow__background-pattern","dots",t])})}var $a;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})($a||($a={}));const mre={[$a.Dots]:1,[$a.Lines]:1,[$a.Cross]:6},gre=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function M6({id:e,variant:t=$a.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:l,style:c,className:f,patternClassName:d}){const p=ee.useRef(null),{transform:m,patternId:g}=ut(gre,Vt),_=r||mre[t],S=t===$a.Dots,b=t===$a.Cross,x=Array.isArray(n)?n:[n,n],w=[x[0]*m[2]||1,x[1]*m[2]||1],v=_*m[2],k=Array.isArray(a)?a:[a,a],C=b?[v,v]:w,T=[k[0]*m[2]||1+C[0]/2,k[1]*m[2]||1+C[1]/2],N=`${g}${e||""}`;return O.jsxs("svg",{className:nn(["react-flow__background",f]),style:{...c,...qp,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:p,"data-testid":"rf__background",children:[O.jsx("pattern",{id:N,x:m[0]%w[0],y:m[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:S?O.jsx(pre,{radius:v/2,className:d}):O.jsx(hre,{dimensions:C,lineWidth:i,variant:t,className:d})}),O.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N})`})]})}M6.displayName="Background";const yre=ee.memo(M6);function bre(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:O.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function vre(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:O.jsx("path",{d:"M0 0h32v4.2H0z"})})}function _re(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:O.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function xre(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:O.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function wre(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:O.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Md({children:e,className:t,...n}){return O.jsx("button",{type:"button",className:nn(["react-flow__controls-button",t]),...n,children:e})}const Sre=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function $6({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:c,className:f,children:d,position:p="bottom-left",orientation:m="vertical","aria-label":g="React Flow controls"}){const _=Ft(),{isInteractive:S,minZoomReached:b,maxZoomReached:x}=ut(Sre,Vt),{zoomIn:w,zoomOut:v,fitView:k}=Lp(),C=()=>{w(),a?.()},T=()=>{v(),o?.()},N=()=>{k(i),l?.()},j=()=>{_.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),c?.(!S)},$=m==="horizontal"?"horizontal":"vertical";return O.jsxs(Mc,{className:nn(["react-flow__controls",$,f]),position:p,style:e,"data-testid":"rf__controls","aria-label":g,children:[t&&O.jsxs(O.Fragment,{children:[O.jsx(Md,{onClick:C,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:x,children:O.jsx(bre,{})}),O.jsx(Md,{onClick:T,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:b,children:O.jsx(vre,{})})]}),n&&O.jsx(Md,{className:"react-flow__controls-fitview",onClick:N,title:"fit view","aria-label":"fit view",children:O.jsx(_re,{})}),r&&O.jsx(Md,{className:"react-flow__controls-interactive",onClick:j,title:"toggle interactivity","aria-label":"toggle interactivity",children:S?O.jsx(wre,{}):O.jsx(xre,{})}),d]})}$6.displayName="Controls";const Ere=ee.memo($6);function kre({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:l,strokeWidth:c,className:f,borderRadius:d,shapeRendering:p,selected:m,onClick:g}){const{background:_,backgroundColor:S}=a||{},b=o||_||S;return O.jsx("rect",{className:nn(["react-flow__minimap-node",{selected:m},f]),x:t,y:n,rx:d,ry:d,width:r,height:i,style:{fill:b,stroke:l,strokeWidth:c},shapeRendering:p,onClick:g?x=>g(x,e):void 0})}const Cre=ee.memo(kre),Are=e=>e.nodes.map(t=>t.id),O0=e=>e instanceof Function?e:()=>e;function Tre({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=Cre,onClick:o}){const l=ut(Are,Vt),c=O0(t),f=O0(e),d=O0(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return O.jsx(O.Fragment,{children:l.map(m=>O.jsx(Ore,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:f,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:p},m))})}function Nre({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:l,onClick:c}){const{node:f,x:d,y:p,width:m,height:g}=ut(_=>{const{internals:S}=_.nodeLookup.get(e),b=S.userNode,{x,y:w}=S.positionAbsolute,{width:v,height:k}=Hi(b);return{node:b,x,y:w,width:v,height:k}},Vt);return!f||f.hidden||!D9(f)?null:O.jsx(l,{x:d,y:p,width:m,height:g,style:f.style,selected:!!f.selected,className:r(f),color:t(f),borderRadius:i,strokeColor:n(f),strokeWidth:a,shapeRendering:o,onClick:c,id:f.id})}const Ore=ee.memo(Nre);var Rre=ee.memo(Tre);const jre=200,Mre=150,$re=e=>!e.hidden,Dre=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?$9(Rc(e.nodeLookup,{filter:$re}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}},Ire="react-flow__minimap-desc";function D6({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:c,maskColor:f,maskStrokeColor:d,maskStrokeWidth:p,position:m="bottom-right",onClick:g,onNodeClick:_,pannable:S=!1,zoomable:b=!1,ariaLabel:x="React Flow mini map",inversePan:w,zoomStep:v=10,offsetScale:k=5}){const C=Ft(),T=ee.useRef(null),{boundingRect:N,viewBB:j,rfId:$,panZoom:M,translateExtent:q,flowWidth:F,flowHeight:B}=ut(Dre,Vt),I=e?.width??jre,V=e?.height??Mre,H=N.width/I,G=N.height/V,X=Math.max(H,G),W=X*I,L=X*V,P=k*X,Z=N.x-(W-N.width)/2-P,R=N.y-(L-N.height)/2-P,D=W+P*2,U=L+P*2,Y=`${Ire}-${$}`,ne=ee.useRef(0),ae=ee.useRef();ne.current=X,ee.useEffect(()=>{if(T.current&&M)return ae.current=Jee({domNode:T.current,panZoom:M,getTransform:()=>C.getState().transform,getViewScale:()=>ne.current}),()=>{ae.current?.destroy()}},[M]),ee.useEffect(()=>{ae.current?.update({translateExtent:q,width:F,height:B,inversePan:w,pannable:S,zoomStep:v,zoomable:b})},[S,b,w,v,q,F,B]);const re=g?Q=>{const[J,oe]=ae.current?.pointer(Q)||[0,0];g(Q,{x:J,y:oe})}:void 0,de=_?ee.useCallback((Q,J)=>{const oe=C.getState().nodeLookup.get(J).internals.userNode;_(Q,oe)},[]):void 0;return O.jsx(Mc,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*X:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:nn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:O.jsxs("svg",{width:I,height:V,viewBox:`${Z} ${R} ${D} ${U}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Y,ref:T,onClick:re,children:[x&&O.jsx("title",{id:Y,children:x}),O.jsx(Rre,{onClick:de,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:l}),O.jsx("path",{className:"react-flow__minimap-mask",d:`M${Z-P},${R-P}h${D+P*2}v${U+P*2}h${-D-P*2}z
224
+ M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}D6.displayName="MiniMap";ee.memo(D6);function Pre({nodeId:e,position:t,variant:n=Yu.Handle,className:r,style:i={},children:a,color:o,minWidth:l=10,minHeight:c=10,maxWidth:f=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:m,shouldResize:g,onResizeStart:_,onResize:S,onResizeEnd:b}){const x=d6(),w=typeof e=="string"?e:x,v=Ft(),k=ee.useRef(null),C=n===Yu.Line?"right":"bottom-right",T=t??C,N=ee.useRef(null);ee.useEffect(()=>{if(!(!k.current||!w))return N.current||(N.current=pte({domNode:k.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:q,transform:F,snapGrid:B,snapToGrid:I,nodeOrigin:V,domNode:H}=v.getState();return{nodeLookup:q,transform:F,snapGrid:B,snapToGrid:I,nodeOrigin:V,paneDomNode:H}},onChange:(q,F)=>{const{triggerNodeChanges:B,nodeLookup:I,parentLookup:V,nodeOrigin:H}=v.getState(),G=[],X={x:q.x,y:q.y},W=I.get(w);if(W&&W.expandParent&&W.parentId){const L=W.origin??H,P=q.width??W.measured.width??0,Z=q.height??W.measured.height??0,R={id:W.id,parentId:W.parentId,rect:{width:P,height:Z,...I9({x:q.x??W.position.x,y:q.y??W.position.y},{width:P,height:Z},W.parentId,I,L)}},D=FS([R],I,V,H);G.push(...D),X.x=q.x?Math.max(L[0]*P,q.x):void 0,X.y=q.y?Math.max(L[1]*Z,q.y):void 0}if(X.x!==void 0&&X.y!==void 0){const L={id:w,type:"position",position:{...X}};G.push(L)}if(q.width!==void 0&&q.height!==void 0){const P={id:w,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:q.width,height:q.height}};G.push(P)}for(const L of F){const P={...L,type:"position"};G.push(P)}B(G)},onEnd:({width:q,height:F})=>{const B={id:w,type:"dimensions",resizing:!1,dimensions:{width:q,height:F}};v.getState().triggerNodeChanges([B])}})),N.current.update({controlPosition:T,boundaries:{minWidth:l,minHeight:c,maxWidth:f,maxHeight:d},keepAspectRatio:p,resizeDirection:m,onResizeStart:_,onResize:S,onResizeEnd:b,shouldResize:g}),()=>{N.current?.destroy()}},[T,l,c,f,d,p,_,S,b,g]);const j=T.split("-"),$=n===Yu.Line?"borderColor":"backgroundColor",M=o?{...i,[$]:o}:i;return O.jsx("div",{className:nn(["react-flow__resize-control","nodrag",...j,n,r]),ref:k,style:M,children:a})}ee.memo(Pre);const zre=ee.createContext(void 0),Lre=()=>{const e=ee.useContext(zre);if(!e)throw new Error("useChat must be used within a ChatProvider");return e};var R0,IO;function US(){if(IO)return R0;IO=1;var e="\0",t="\0",n="";class r{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(d){d&&(this._isDirected=Object.hasOwn(d,"directed")?d.directed:!0,this._isMultigraph=Object.hasOwn(d,"multigraph")?d.multigraph:!1,this._isCompound=Object.hasOwn(d,"compound")?d.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(d){return this._label=d,this}graph(){return this._label}setDefaultNodeLabel(d){return this._defaultNodeLabelFn=d,typeof d!="function"&&(this._defaultNodeLabelFn=()=>d),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var d=this;return this.nodes().filter(p=>Object.keys(d._in[p]).length===0)}sinks(){var d=this;return this.nodes().filter(p=>Object.keys(d._out[p]).length===0)}setNodes(d,p){var m=arguments,g=this;return d.forEach(function(_){m.length>1?g.setNode(_,p):g.setNode(_)}),this}setNode(d,p){return Object.hasOwn(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=p),this):(this._nodes[d]=arguments.length>1?p:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=t,this._children[d]={},this._children[t][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)}node(d){return this._nodes[d]}hasNode(d){return Object.hasOwn(this._nodes,d)}removeNode(d){var p=this;if(Object.hasOwn(this._nodes,d)){var m=g=>p.removeEdge(p._edgeObjs[g]);delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],this.children(d).forEach(function(g){p.setParent(g)}),delete this._children[d]),Object.keys(this._in[d]).forEach(m),delete this._in[d],delete this._preds[d],Object.keys(this._out[d]).forEach(m),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this}setParent(d,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(p===void 0)p=t;else{p+="";for(var m=p;m!==void 0;m=this.parent(m))if(m===d)throw new Error("Setting "+p+" as parent of "+d+" would create a cycle");this.setNode(p)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=p,this._children[p][d]=!0,this}_removeFromParentsChildList(d){delete this._children[this._parent[d]][d]}parent(d){if(this._isCompound){var p=this._parent[d];if(p!==t)return p}}children(d=t){if(this._isCompound){var p=this._children[d];if(p)return Object.keys(p)}else{if(d===t)return this.nodes();if(this.hasNode(d))return[]}}predecessors(d){var p=this._preds[d];if(p)return Object.keys(p)}successors(d){var p=this._sucs[d];if(p)return Object.keys(p)}neighbors(d){var p=this.predecessors(d);if(p){const g=new Set(p);for(var m of this.successors(d))g.add(m);return Array.from(g.values())}}isLeaf(d){var p;return this.isDirected()?p=this.successors(d):p=this.neighbors(d),p.length===0}filterNodes(d){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var m=this;Object.entries(this._nodes).forEach(function([S,b]){d(S)&&p.setNode(S,b)}),Object.values(this._edgeObjs).forEach(function(S){p.hasNode(S.v)&&p.hasNode(S.w)&&p.setEdge(S,m.edge(S))});var g={};function _(S){var b=m.parent(S);return b===void 0||p.hasNode(b)?(g[S]=b,b):b in g?g[b]:_(b)}return this._isCompound&&p.nodes().forEach(S=>p.setParent(S,_(S))),p}setDefaultEdgeLabel(d){return this._defaultEdgeLabelFn=d,typeof d!="function"&&(this._defaultEdgeLabelFn=()=>d),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(d,p){var m=this,g=arguments;return d.reduce(function(_,S){return g.length>1?m.setEdge(_,S,p):m.setEdge(_,S),S}),this}setEdge(){var d,p,m,g,_=!1,S=arguments[0];typeof S=="object"&&S!==null&&"v"in S?(d=S.v,p=S.w,m=S.name,arguments.length===2&&(g=arguments[1],_=!0)):(d=S,p=arguments[1],m=arguments[3],arguments.length>2&&(g=arguments[2],_=!0)),d=""+d,p=""+p,m!==void 0&&(m=""+m);var b=o(this._isDirected,d,p,m);if(Object.hasOwn(this._edgeLabels,b))return _&&(this._edgeLabels[b]=g),this;if(m!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(p),this._edgeLabels[b]=_?g:this._defaultEdgeLabelFn(d,p,m);var x=l(this._isDirected,d,p,m);return d=x.v,p=x.w,Object.freeze(x),this._edgeObjs[b]=x,i(this._preds[p],d),i(this._sucs[d],p),this._in[p][b]=x,this._out[d][b]=x,this._edgeCount++,this}edge(d,p,m){var g=arguments.length===1?c(this._isDirected,arguments[0]):o(this._isDirected,d,p,m);return this._edgeLabels[g]}edgeAsObj(){const d=this.edge(...arguments);return typeof d!="object"?{label:d}:d}hasEdge(d,p,m){var g=arguments.length===1?c(this._isDirected,arguments[0]):o(this._isDirected,d,p,m);return Object.hasOwn(this._edgeLabels,g)}removeEdge(d,p,m){var g=arguments.length===1?c(this._isDirected,arguments[0]):o(this._isDirected,d,p,m),_=this._edgeObjs[g];return _&&(d=_.v,p=_.w,delete this._edgeLabels[g],delete this._edgeObjs[g],a(this._preds[p],d),a(this._sucs[d],p),delete this._in[p][g],delete this._out[d][g],this._edgeCount--),this}inEdges(d,p){var m=this._in[d];if(m){var g=Object.values(m);return p?g.filter(_=>_.v===p):g}}outEdges(d,p){var m=this._out[d];if(m){var g=Object.values(m);return p?g.filter(_=>_.w===p):g}}nodeEdges(d,p){var m=this.inEdges(d,p);if(m)return m.concat(this.outEdges(d,p))}}function i(f,d){f[d]?f[d]++:f[d]=1}function a(f,d){--f[d]||delete f[d]}function o(f,d,p,m){var g=""+d,_=""+p;if(!f&&g>_){var S=g;g=_,_=S}return g+n+_+n+(m===void 0?e:m)}function l(f,d,p,m){var g=""+d,_=""+p;if(!f&&g>_){var S=g;g=_,_=S}var b={v:g,w:_};return m&&(b.name=m),b}function c(f,d){return o(f,d.v,d.w,d.name)}return R0=r,R0}var j0,PO;function qre(){return PO||(PO=1,j0="2.2.4"),j0}var M0,zO;function Fre(){return zO||(zO=1,M0={Graph:US(),version:qre()}),M0}var $0,LO;function Bre(){if(LO)return $0;LO=1;var e=US();$0={write:t,read:i};function t(a){var o={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:r(a)};return a.graph()!==void 0&&(o.value=structuredClone(a.graph())),o}function n(a){return a.nodes().map(function(o){var l=a.node(o),c=a.parent(o),f={v:o};return l!==void 0&&(f.value=l),c!==void 0&&(f.parent=c),f})}function r(a){return a.edges().map(function(o){var l=a.edge(o),c={v:o.v,w:o.w};return o.name!==void 0&&(c.name=o.name),l!==void 0&&(c.value=l),c})}function i(a){var o=new e(a.options).setGraph(a.value);return a.nodes.forEach(function(l){o.setNode(l.v,l.value),l.parent&&o.setParent(l.v,l.parent)}),a.edges.forEach(function(l){o.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),o}return $0}var D0,qO;function Ure(){if(qO)return D0;qO=1,D0=e;function e(t){var n={},r=[],i;function a(o){Object.hasOwn(n,o)||(n[o]=!0,i.push(o),t.successors(o).forEach(a),t.predecessors(o).forEach(a))}return t.nodes().forEach(function(o){i=[],a(o),i.length&&r.push(i)}),r}return D0}var I0,FO;function I6(){if(FO)return I0;FO=1;class e{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,r){var i=this._keyIndices;if(n=String(n),!Object.hasOwn(i,n)){var a=this._arr,o=a.length;return i[n]=o,a.push({key:n,priority:r}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)}_heapify(n){var r=this._arr,i=2*n,a=i+1,o=n;i<r.length&&(o=r[i].priority<r[o].priority?i:o,a<r.length&&(o=r[a].priority<r[o].priority?a:o),o!==n&&(this._swap(n,o),this._heapify(o)))}_decrease(n){for(var r=this._arr,i=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<i));)this._swap(n,a),n=a}_swap(n,r){var i=this._arr,a=this._keyIndices,o=i[n],l=i[r];i[n]=l,i[r]=o,a[l.key]=n,a[o.key]=r}}return I0=e,I0}var P0,BO;function P6(){if(BO)return P0;BO=1;var e=I6();P0=n;var t=()=>1;function n(i,a,o,l){return r(i,String(a),o||t,l||function(c){return i.outEdges(c)})}function r(i,a,o,l){var c={},f=new e,d,p,m=function(g){var _=g.v!==d?g.v:g.w,S=c[_],b=o(g),x=p.distance+b;if(b<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+g+" Weight: "+b);x<S.distance&&(S.distance=x,S.predecessor=d,f.decrease(_,x))};for(i.nodes().forEach(function(g){var _=g===a?0:Number.POSITIVE_INFINITY;c[g]={distance:_},f.add(g,_)});f.size()>0&&(d=f.removeMin(),p=c[d],p.distance!==Number.POSITIVE_INFINITY);)l(d).forEach(m);return c}return P0}var z0,UO;function Hre(){if(UO)return z0;UO=1;var e=P6();z0=t;function t(n,r,i){return n.nodes().reduce(function(a,o){return a[o]=e(n,o,r,i),a},{})}return z0}var L0,HO;function z6(){if(HO)return L0;HO=1,L0=e;function e(t){var n=0,r=[],i={},a=[];function o(l){var c=i[l]={onStack:!0,lowlink:n,index:n++};if(r.push(l),t.successors(l).forEach(function(p){Object.hasOwn(i,p)?i[p].onStack&&(c.lowlink=Math.min(c.lowlink,i[p].index)):(o(p),c.lowlink=Math.min(c.lowlink,i[p].lowlink))}),c.lowlink===c.index){var f=[],d;do d=r.pop(),i[d].onStack=!1,f.push(d);while(l!==d);a.push(f)}}return t.nodes().forEach(function(l){Object.hasOwn(i,l)||o(l)}),a}return L0}var q0,VO;function Vre(){if(VO)return q0;VO=1;var e=z6();q0=t;function t(n){return e(n).filter(function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return q0}var F0,GO;function Gre(){if(GO)return F0;GO=1,F0=t;var e=()=>1;function t(r,i,a){return n(r,i||e,a||function(o){return r.outEdges(o)})}function n(r,i,a){var o={},l=r.nodes();return l.forEach(function(c){o[c]={},o[c][c]={distance:0},l.forEach(function(f){c!==f&&(o[c][f]={distance:Number.POSITIVE_INFINITY})}),a(c).forEach(function(f){var d=f.v===c?f.w:f.v,p=i(f);o[c][d]={distance:p,predecessor:c}})}),l.forEach(function(c){var f=o[c];l.forEach(function(d){var p=o[d];l.forEach(function(m){var g=p[c],_=f[m],S=p[m],b=g.distance+_.distance;b<S.distance&&(S.distance=b,S.predecessor=_.predecessor)})})}),o}return F0}var B0,ZO;function L6(){if(ZO)return B0;ZO=1;function e(n){var r={},i={},a=[];function o(l){if(Object.hasOwn(i,l))throw new t;Object.hasOwn(r,l)||(i[l]=!0,r[l]=!0,n.predecessors(l).forEach(o),delete i[l],a.push(l))}if(n.sinks().forEach(o),Object.keys(r).length!==n.nodeCount())throw new t;return a}class t extends Error{constructor(){super(...arguments)}}return B0=e,e.CycleException=t,B0}var U0,YO;function Zre(){if(YO)return U0;YO=1;var e=L6();U0=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return U0}var H0,KO;function q6(){if(KO)return H0;KO=1,H0=e;function e(i,a,o){Array.isArray(a)||(a=[a]);var l=i.isDirected()?p=>i.successors(p):p=>i.neighbors(p),c=o==="post"?t:n,f=[],d={};return a.forEach(p=>{if(!i.hasNode(p))throw new Error("Graph does not have node: "+p);c(p,l,d,f)}),f}function t(i,a,o,l){for(var c=[[i,!1]];c.length>0;){var f=c.pop();f[1]?l.push(f[0]):Object.hasOwn(o,f[0])||(o[f[0]]=!0,c.push([f[0],!0]),r(a(f[0]),d=>c.push([d,!1])))}}function n(i,a,o,l){for(var c=[i];c.length>0;){var f=c.pop();Object.hasOwn(o,f)||(o[f]=!0,l.push(f),r(a(f),d=>c.push(d)))}}function r(i,a){for(var o=i.length;o--;)a(i[o],o,i);return i}return H0}var V0,XO;function Yre(){if(XO)return V0;XO=1;var e=q6();V0=t;function t(n,r){return e(n,r,"post")}return V0}var G0,WO;function Kre(){if(WO)return G0;WO=1;var e=q6();G0=t;function t(n,r){return e(n,r,"pre")}return G0}var Z0,QO;function Xre(){if(QO)return Z0;QO=1;var e=US(),t=I6();Z0=n;function n(r,i){var a=new e,o={},l=new t,c;function f(p){var m=p.v===c?p.w:p.v,g=l.priority(m);if(g!==void 0){var _=i(p);_<g&&(o[m]=c,l.decrease(m,_))}}if(r.nodeCount()===0)return a;r.nodes().forEach(function(p){l.add(p,Number.POSITIVE_INFINITY),a.setNode(p)}),l.decrease(r.nodes()[0],0);for(var d=!1;l.size()>0;){if(c=l.removeMin(),Object.hasOwn(o,c))a.setEdge(c,o[c]);else{if(d)throw new Error("Input graph is not connected: "+r);d=!0}r.nodeEdges(c).forEach(f)}return a}return Z0}var Y0,JO;function Wre(){return JO||(JO=1,Y0={components:Ure(),dijkstra:P6(),dijkstraAll:Hre(),findCycles:Vre(),floydWarshall:Gre(),isAcyclic:Zre(),postorder:Yre(),preorder:Kre(),prim:Xre(),tarjan:z6(),topsort:L6()}),Y0}var K0,eR;function Pr(){if(eR)return K0;eR=1;var e=Fre();return K0={Graph:e.Graph,json:Bre(),alg:Wre(),version:e.version},K0}var X0,tR;function Qre(){if(tR)return X0;tR=1;class e{constructor(){let i={};i._next=i._prev=i,this._sentinel=i}dequeue(){let i=this._sentinel,a=i._prev;if(a!==i)return t(a),a}enqueue(i){let a=this._sentinel;i._prev&&i._next&&t(i),i._next=a._next,a._next._prev=i,a._next=i,i._prev=a}toString(){let i=[],a=this._sentinel,o=a._prev;for(;o!==a;)i.push(JSON.stringify(o,n)),o=o._prev;return"["+i.join(", ")+"]"}}function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,i){if(r!=="_next"&&r!=="_prev")return i}return X0=e,X0}var W0,nR;function Jre(){if(nR)return W0;nR=1;let e=Pr().Graph,t=Qre();W0=r;let n=()=>1;function r(f,d){if(f.nodeCount()<=1)return[];let p=o(f,d||n);return i(p.graph,p.buckets,p.zeroIdx).flatMap(g=>f.outEdges(g.v,g.w))}function i(f,d,p){let m=[],g=d[d.length-1],_=d[0],S;for(;f.nodeCount();){for(;S=_.dequeue();)a(f,d,p,S);for(;S=g.dequeue();)a(f,d,p,S);if(f.nodeCount()){for(let b=d.length-2;b>0;--b)if(S=d[b].dequeue(),S){m=m.concat(a(f,d,p,S,!0));break}}}return m}function a(f,d,p,m,g){let _=g?[]:void 0;return f.inEdges(m.v).forEach(S=>{let b=f.edge(S),x=f.node(S.v);g&&_.push({v:S.v,w:S.w}),x.out-=b,l(d,p,x)}),f.outEdges(m.v).forEach(S=>{let b=f.edge(S),x=S.w,w=f.node(x);w.in-=b,l(d,p,w)}),f.removeNode(m.v),_}function o(f,d){let p=new e,m=0,g=0;f.nodes().forEach(b=>{p.setNode(b,{v:b,in:0,out:0})}),f.edges().forEach(b=>{let x=p.edge(b.v,b.w)||0,w=d(b),v=x+w;p.setEdge(b.v,b.w,v),g=Math.max(g,p.node(b.v).out+=w),m=Math.max(m,p.node(b.w).in+=w)});let _=c(g+m+3).map(()=>new t),S=m+1;return p.nodes().forEach(b=>{l(_,S,p.node(b))}),{graph:p,buckets:_,zeroIdx:S}}function l(f,d,p){p.out?p.in?f[p.out-p.in+d].enqueue(p):f[f.length-1].enqueue(p):f[0].enqueue(p)}function c(f){const d=[];for(let p=0;p<f;p++)d.push(p);return d}return W0}var Q0,rR;function tn(){if(rR)return Q0;rR=1;let e=Pr().Graph;Q0={addBorderNode:d,addDummyNode:t,applyWithChunking:g,asNonCompoundGraph:r,buildLayerMatrix:l,intersectRect:o,mapValues:T,maxRank:_,normalizeRanks:c,notime:x,partition:S,pick:C,predecessorWeights:a,range:k,removeEmptyRanks:f,simplify:n,successorWeights:i,time:b,uniqueId:v,zipObject:N};function t(j,$,M,q){let F;do F=v(q);while(j.hasNode(F));return M.dummy=$,j.setNode(F,M),F}function n(j){let $=new e().setGraph(j.graph());return j.nodes().forEach(M=>$.setNode(M,j.node(M))),j.edges().forEach(M=>{let q=$.edge(M.v,M.w)||{weight:0,minlen:1},F=j.edge(M);$.setEdge(M.v,M.w,{weight:q.weight+F.weight,minlen:Math.max(q.minlen,F.minlen)})}),$}function r(j){let $=new e({multigraph:j.isMultigraph()}).setGraph(j.graph());return j.nodes().forEach(M=>{j.children(M).length||$.setNode(M,j.node(M))}),j.edges().forEach(M=>{$.setEdge(M,j.edge(M))}),$}function i(j){let $=j.nodes().map(M=>{let q={};return j.outEdges(M).forEach(F=>{q[F.w]=(q[F.w]||0)+j.edge(F).weight}),q});return N(j.nodes(),$)}function a(j){let $=j.nodes().map(M=>{let q={};return j.inEdges(M).forEach(F=>{q[F.v]=(q[F.v]||0)+j.edge(F).weight}),q});return N(j.nodes(),$)}function o(j,$){let M=j.x,q=j.y,F=$.x-M,B=$.y-q,I=j.width/2,V=j.height/2;if(!F&&!B)throw new Error("Not possible to find intersection inside of the rectangle");let H,G;return Math.abs(B)*I>Math.abs(F)*V?(B<0&&(V=-V),H=V*F/B,G=V):(F<0&&(I=-I),H=I,G=I*B/F),{x:M+H,y:q+G}}function l(j){let $=k(_(j)+1).map(()=>[]);return j.nodes().forEach(M=>{let q=j.node(M),F=q.rank;F!==void 0&&($[F][q.order]=M)}),$}function c(j){let $=j.nodes().map(q=>{let F=j.node(q).rank;return F===void 0?Number.MAX_VALUE:F}),M=g(Math.min,$);j.nodes().forEach(q=>{let F=j.node(q);Object.hasOwn(F,"rank")&&(F.rank-=M)})}function f(j){let $=j.nodes().map(I=>j.node(I).rank),M=g(Math.min,$),q=[];j.nodes().forEach(I=>{let V=j.node(I).rank-M;q[V]||(q[V]=[]),q[V].push(I)});let F=0,B=j.graph().nodeRankFactor;Array.from(q).forEach((I,V)=>{I===void 0&&V%B!==0?--F:I!==void 0&&F&&I.forEach(H=>j.node(H).rank+=F)})}function d(j,$,M,q){let F={width:0,height:0};return arguments.length>=4&&(F.rank=M,F.order=q),t(j,"border",F,$)}function p(j,$=m){const M=[];for(let q=0;q<j.length;q+=$){const F=j.slice(q,q+$);M.push(F)}return M}const m=65535;function g(j,$){if($.length>m){const M=p($);return j.apply(null,M.map(q=>j.apply(null,q)))}else return j.apply(null,$)}function _(j){const M=j.nodes().map(q=>{let F=j.node(q).rank;return F===void 0?Number.MIN_VALUE:F});return g(Math.max,M)}function S(j,$){let M={lhs:[],rhs:[]};return j.forEach(q=>{$(q)?M.lhs.push(q):M.rhs.push(q)}),M}function b(j,$){let M=Date.now();try{return $()}finally{console.log(j+" time: "+(Date.now()-M)+"ms")}}function x(j,$){return $()}let w=0;function v(j){var $=++w;return toString(j)+$}function k(j,$,M=1){$==null&&($=j,j=0);let q=B=>B<$;M<0&&(q=B=>$<B);const F=[];for(let B=j;q(B);B+=M)F.push(B);return F}function C(j,$){const M={};for(const q of $)j[q]!==void 0&&(M[q]=j[q]);return M}function T(j,$){let M=$;return typeof $=="string"&&(M=q=>q[$]),Object.entries(j).reduce((q,[F,B])=>(q[F]=M(B,F),q),{})}function N(j,$){return j.reduce((M,q,F)=>(M[q]=$[F],M),{})}return Q0}var J0,iR;function eie(){if(iR)return J0;iR=1;let e=Jre(),t=tn().uniqueId;J0={run:n,undo:i};function n(a){(a.graph().acyclicer==="greedy"?e(a,l(a)):r(a)).forEach(c=>{let f=a.edge(c);a.removeEdge(c),f.forwardName=c.name,f.reversed=!0,a.setEdge(c.w,c.v,f,t("rev"))});function l(c){return f=>c.edge(f).weight}}function r(a){let o=[],l={},c={};function f(d){Object.hasOwn(c,d)||(c[d]=!0,l[d]=!0,a.outEdges(d).forEach(p=>{Object.hasOwn(l,p.w)?o.push(p):f(p.w)}),delete l[d])}return a.nodes().forEach(f),o}function i(a){a.edges().forEach(o=>{let l=a.edge(o);if(l.reversed){a.removeEdge(o);let c=l.forwardName;delete l.reversed,delete l.forwardName,a.setEdge(o.w,o.v,l,c)}})}return J0}var eb,aR;function tie(){if(aR)return eb;aR=1;let e=tn();eb={run:t,undo:r};function t(i){i.graph().dummyChains=[],i.edges().forEach(a=>n(i,a))}function n(i,a){let o=a.v,l=i.node(o).rank,c=a.w,f=i.node(c).rank,d=a.name,p=i.edge(a),m=p.labelRank;if(f===l+1)return;i.removeEdge(a);let g,_,S;for(S=0,++l;l<f;++S,++l)p.points=[],_={width:0,height:0,edgeLabel:p,edgeObj:a,rank:l},g=e.addDummyNode(i,"edge",_,"_d"),l===m&&(_.width=p.width,_.height=p.height,_.dummy="edge-label",_.labelpos=p.labelpos),i.setEdge(o,g,{weight:p.weight},d),S===0&&i.graph().dummyChains.push(g),o=g;i.setEdge(o,c,{weight:p.weight},d)}function r(i){i.graph().dummyChains.forEach(a=>{let o=i.node(a),l=o.edgeLabel,c;for(i.setEdge(o.edgeObj,l);o.dummy;)c=i.successors(a)[0],i.removeNode(a),l.points.push({x:o.x,y:o.y}),o.dummy==="edge-label"&&(l.x=o.x,l.y=o.y,l.width=o.width,l.height=o.height),a=c,o=i.node(a)})}return eb}var tb,sR;function up(){if(sR)return tb;sR=1;const{applyWithChunking:e}=tn();tb={longestPath:t,slack:n};function t(r){var i={};function a(o){var l=r.node(o);if(Object.hasOwn(i,o))return l.rank;i[o]=!0;let c=r.outEdges(o).map(d=>d==null?Number.POSITIVE_INFINITY:a(d.w)-r.edge(d).minlen);var f=e(Math.min,c);return f===Number.POSITIVE_INFINITY&&(f=0),l.rank=f}r.sources().forEach(a)}function n(r,i){return r.node(i.w).rank-r.node(i.v).rank-r.edge(i).minlen}return tb}var nb,oR;function F6(){if(oR)return nb;oR=1;var e=Pr().Graph,t=up().slack;nb=n;function n(o){var l=new e({directed:!1}),c=o.nodes()[0],f=o.nodeCount();l.setNode(c,{});for(var d,p;r(l,o)<f;)d=i(l,o),p=l.hasNode(d.v)?t(o,d):-t(o,d),a(l,o,p);return l}function r(o,l){function c(f){l.nodeEdges(f).forEach(d=>{var p=d.v,m=f===p?d.w:p;!o.hasNode(m)&&!t(l,d)&&(o.setNode(m,{}),o.setEdge(f,m,{}),c(m))})}return o.nodes().forEach(c),o.nodeCount()}function i(o,l){return l.edges().reduce((f,d)=>{let p=Number.POSITIVE_INFINITY;return o.hasNode(d.v)!==o.hasNode(d.w)&&(p=t(l,d)),p<f[0]?[p,d]:f},[Number.POSITIVE_INFINITY,null])[1]}function a(o,l,c){o.nodes().forEach(f=>l.node(f).rank+=c)}return nb}var rb,lR;function nie(){if(lR)return rb;lR=1;var e=F6(),t=up().slack,n=up().longestPath,r=Pr().alg.preorder,i=Pr().alg.postorder,a=tn().simplify;rb=o,o.initLowLimValues=d,o.initCutValues=l,o.calcCutValue=f,o.leaveEdge=m,o.enterEdge=g,o.exchangeEdges=_;function o(w){w=a(w),n(w);var v=e(w);d(v),l(v,w);for(var k,C;k=m(v);)C=g(v,w,k),_(v,w,k,C)}function l(w,v){var k=i(w,w.nodes());k=k.slice(0,k.length-1),k.forEach(C=>c(w,v,C))}function c(w,v,k){var C=w.node(k),T=C.parent;w.edge(k,T).cutvalue=f(w,v,k)}function f(w,v,k){var C=w.node(k),T=C.parent,N=!0,j=v.edge(k,T),$=0;return j||(N=!1,j=v.edge(T,k)),$=j.weight,v.nodeEdges(k).forEach(M=>{var q=M.v===k,F=q?M.w:M.v;if(F!==T){var B=q===N,I=v.edge(M).weight;if($+=B?I:-I,b(w,k,F)){var V=w.edge(k,F).cutvalue;$+=B?-V:V}}}),$}function d(w,v){arguments.length<2&&(v=w.nodes()[0]),p(w,{},1,v)}function p(w,v,k,C,T){var N=k,j=w.node(C);return v[C]=!0,w.neighbors(C).forEach($=>{Object.hasOwn(v,$)||(k=p(w,v,k,$,C))}),j.low=N,j.lim=k++,T?j.parent=T:delete j.parent,k}function m(w){return w.edges().find(v=>w.edge(v).cutvalue<0)}function g(w,v,k){var C=k.v,T=k.w;v.hasEdge(C,T)||(C=k.w,T=k.v);var N=w.node(C),j=w.node(T),$=N,M=!1;N.lim>j.lim&&($=j,M=!0);var q=v.edges().filter(F=>M===x(w,w.node(F.v),$)&&M!==x(w,w.node(F.w),$));return q.reduce((F,B)=>t(v,B)<t(v,F)?B:F)}function _(w,v,k,C){var T=k.v,N=k.w;w.removeEdge(T,N),w.setEdge(C.v,C.w,{}),d(w),l(w,v),S(w,v)}function S(w,v){var k=w.nodes().find(T=>!v.node(T).parent),C=r(w,k);C=C.slice(1),C.forEach(T=>{var N=w.node(T).parent,j=v.edge(T,N),$=!1;j||(j=v.edge(N,T),$=!0),v.node(T).rank=v.node(N).rank+($?j.minlen:-j.minlen)})}function b(w,v,k){return w.hasEdge(v,k)}function x(w,v,k){return k.low<=v.lim&&v.lim<=k.lim}return rb}var ib,uR;function rie(){if(uR)return ib;uR=1;var e=up(),t=e.longestPath,n=F6(),r=nie();ib=i;function i(c){switch(c.graph().ranker){case"network-simplex":l(c);break;case"tight-tree":o(c);break;case"longest-path":a(c);break;default:l(c)}}var a=t;function o(c){t(c),n(c)}function l(c){r(c)}return ib}var ab,cR;function iie(){if(cR)return ab;cR=1,ab=e;function e(r){let i=n(r);r.graph().dummyChains.forEach(a=>{let o=r.node(a),l=o.edgeObj,c=t(r,i,l.v,l.w),f=c.path,d=c.lca,p=0,m=f[p],g=!0;for(;a!==l.w;){if(o=r.node(a),g){for(;(m=f[p])!==d&&r.node(m).maxRank<o.rank;)p++;m===d&&(g=!1)}if(!g){for(;p<f.length-1&&r.node(m=f[p+1]).minRank<=o.rank;)p++;m=f[p]}r.setParent(a,m),a=r.successors(a)[0]}})}function t(r,i,a,o){let l=[],c=[],f=Math.min(i[a].low,i[o].low),d=Math.max(i[a].lim,i[o].lim),p,m;p=a;do p=r.parent(p),l.push(p);while(p&&(i[p].low>f||d>i[p].lim));for(m=p,p=o;(p=r.parent(p))!==m;)c.push(p);return{path:l.concat(c.reverse()),lca:m}}function n(r){let i={},a=0;function o(l){let c=a;r.children(l).forEach(o),i[l]={low:c,lim:a++}}return r.children().forEach(o),i}return ab}var sb,fR;function aie(){if(fR)return sb;fR=1;let e=tn();sb={run:t,cleanup:a};function t(o){let l=e.addDummyNode(o,"root",{},"_root"),c=r(o),f=Object.values(c),d=e.applyWithChunking(Math.max,f)-1,p=2*d+1;o.graph().nestingRoot=l,o.edges().forEach(g=>o.edge(g).minlen*=p);let m=i(o)+1;o.children().forEach(g=>n(o,l,p,m,d,c,g)),o.graph().nodeRankFactor=p}function n(o,l,c,f,d,p,m){let g=o.children(m);if(!g.length){m!==l&&o.setEdge(l,m,{weight:0,minlen:c});return}let _=e.addBorderNode(o,"_bt"),S=e.addBorderNode(o,"_bb"),b=o.node(m);o.setParent(_,m),b.borderTop=_,o.setParent(S,m),b.borderBottom=S,g.forEach(x=>{n(o,l,c,f,d,p,x);let w=o.node(x),v=w.borderTop?w.borderTop:x,k=w.borderBottom?w.borderBottom:x,C=w.borderTop?f:2*f,T=v!==k?1:d-p[m]+1;o.setEdge(_,v,{weight:C,minlen:T,nestingEdge:!0}),o.setEdge(k,S,{weight:C,minlen:T,nestingEdge:!0})}),o.parent(m)||o.setEdge(l,_,{weight:0,minlen:d+p[m]})}function r(o){var l={};function c(f,d){var p=o.children(f);p&&p.length&&p.forEach(m=>c(m,d+1)),l[f]=d}return o.children().forEach(f=>c(f,1)),l}function i(o){return o.edges().reduce((l,c)=>l+o.edge(c).weight,0)}function a(o){var l=o.graph();o.removeNode(l.nestingRoot),delete l.nestingRoot,o.edges().forEach(c=>{var f=o.edge(c);f.nestingEdge&&o.removeEdge(c)})}return sb}var ob,dR;function sie(){if(dR)return ob;dR=1;let e=tn();ob=t;function t(r){function i(a){let o=r.children(a),l=r.node(a);if(o.length&&o.forEach(i),Object.hasOwn(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(let c=l.minRank,f=l.maxRank+1;c<f;++c)n(r,"borderLeft","_bl",a,l,c),n(r,"borderRight","_br",a,l,c)}}r.children().forEach(i)}function n(r,i,a,o,l,c){let f={width:0,height:0,rank:c,borderType:i},d=l[i][c-1],p=e.addDummyNode(r,"border",f,a);l[i][c]=p,r.setParent(p,o),d&&r.setEdge(d,p,{weight:1})}return ob}var lb,hR;function oie(){if(hR)return lb;hR=1,lb={adjust:e,undo:t};function e(c){let f=c.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&n(c)}function t(c){let f=c.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&i(c),(f==="lr"||f==="rl")&&(o(c),n(c))}function n(c){c.nodes().forEach(f=>r(c.node(f))),c.edges().forEach(f=>r(c.edge(f)))}function r(c){let f=c.width;c.width=c.height,c.height=f}function i(c){c.nodes().forEach(f=>a(c.node(f))),c.edges().forEach(f=>{let d=c.edge(f);d.points.forEach(a),Object.hasOwn(d,"y")&&a(d)})}function a(c){c.y=-c.y}function o(c){c.nodes().forEach(f=>l(c.node(f))),c.edges().forEach(f=>{let d=c.edge(f);d.points.forEach(l),Object.hasOwn(d,"x")&&l(d)})}function l(c){let f=c.x;c.x=c.y,c.y=f}return lb}var ub,pR;function lie(){if(pR)return ub;pR=1;let e=tn();ub=t;function t(n){let r={},i=n.nodes().filter(d=>!n.children(d).length),a=i.map(d=>n.node(d).rank),o=e.applyWithChunking(Math.max,a),l=e.range(o+1).map(()=>[]);function c(d){if(r[d])return;r[d]=!0;let p=n.node(d);l[p.rank].push(d),n.successors(d).forEach(c)}return i.sort((d,p)=>n.node(d).rank-n.node(p).rank).forEach(c),l}return ub}var cb,mR;function uie(){if(mR)return cb;mR=1;let e=tn().zipObject;cb=t;function t(r,i){let a=0;for(let o=1;o<i.length;++o)a+=n(r,i[o-1],i[o]);return a}function n(r,i,a){let o=e(a,a.map((m,g)=>g)),l=i.flatMap(m=>r.outEdges(m).map(g=>({pos:o[g.w],weight:r.edge(g).weight})).sort((g,_)=>g.pos-_.pos)),c=1;for(;c<a.length;)c<<=1;let f=2*c-1;c-=1;let d=new Array(f).fill(0),p=0;return l.forEach(m=>{let g=m.pos+c;d[g]+=m.weight;let _=0;for(;g>0;)g%2&&(_+=d[g+1]),g=g-1>>1,d[g]+=m.weight;p+=m.weight*_}),p}return cb}var fb,gR;function cie(){if(gR)return fb;gR=1,fb=e;function e(t,n=[]){return n.map(r=>{let i=t.inEdges(r);if(i.length){let a=i.reduce((o,l)=>{let c=t.edge(l),f=t.node(l.v);return{sum:o.sum+c.weight*f.order,weight:o.weight+c.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}return fb}var db,yR;function fie(){if(yR)return db;yR=1;let e=tn();db=t;function t(i,a){let o={};i.forEach((c,f)=>{let d=o[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:f};c.barycenter!==void 0&&(d.barycenter=c.barycenter,d.weight=c.weight)}),a.edges().forEach(c=>{let f=o[c.v],d=o[c.w];f!==void 0&&d!==void 0&&(d.indegree++,f.out.push(o[c.w]))});let l=Object.values(o).filter(c=>!c.indegree);return n(l)}function n(i){let a=[];function o(c){return f=>{f.merged||(f.barycenter===void 0||c.barycenter===void 0||f.barycenter>=c.barycenter)&&r(c,f)}}function l(c){return f=>{f.in.push(c),--f.indegree===0&&i.push(f)}}for(;i.length;){let c=i.pop();a.push(c),c.in.reverse().forEach(o(c)),c.out.forEach(l(c))}return a.filter(c=>!c.merged).map(c=>e.pick(c,["vs","i","barycenter","weight"]))}function r(i,a){let o=0,l=0;i.weight&&(o+=i.barycenter*i.weight,l+=i.weight),a.weight&&(o+=a.barycenter*a.weight,l+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=o/l,i.weight=l,i.i=Math.min(a.i,i.i),a.merged=!0}return db}var hb,bR;function die(){if(bR)return hb;bR=1;let e=tn();hb=t;function t(i,a){let o=e.partition(i,_=>Object.hasOwn(_,"barycenter")),l=o.lhs,c=o.rhs.sort((_,S)=>S.i-_.i),f=[],d=0,p=0,m=0;l.sort(r(!!a)),m=n(f,c,m),l.forEach(_=>{m+=_.vs.length,f.push(_.vs),d+=_.barycenter*_.weight,p+=_.weight,m=n(f,c,m)});let g={vs:f.flat(!0)};return p&&(g.barycenter=d/p,g.weight=p),g}function n(i,a,o){let l;for(;a.length&&(l=a[a.length-1]).i<=o;)a.pop(),i.push(l.vs),o++;return o}function r(i){return(a,o)=>a.barycenter<o.barycenter?-1:a.barycenter>o.barycenter?1:i?o.i-a.i:a.i-o.i}return hb}var pb,vR;function hie(){if(vR)return pb;vR=1;let e=cie(),t=fie(),n=die();pb=r;function r(o,l,c,f){let d=o.children(l),p=o.node(l),m=p?p.borderLeft:void 0,g=p?p.borderRight:void 0,_={};m&&(d=d.filter(w=>w!==m&&w!==g));let S=e(o,d);S.forEach(w=>{if(o.children(w.v).length){let v=r(o,w.v,c,f);_[w.v]=v,Object.hasOwn(v,"barycenter")&&a(w,v)}});let b=t(S,c);i(b,_);let x=n(b,f);if(m&&(x.vs=[m,x.vs,g].flat(!0),o.predecessors(m).length)){let w=o.node(o.predecessors(m)[0]),v=o.node(o.predecessors(g)[0]);Object.hasOwn(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+w.order+v.order)/(x.weight+2),x.weight+=2}return x}function i(o,l){o.forEach(c=>{c.vs=c.vs.flatMap(f=>l[f]?l[f].vs:f)})}function a(o,l){o.barycenter!==void 0?(o.barycenter=(o.barycenter*o.weight+l.barycenter*l.weight)/(o.weight+l.weight),o.weight+=l.weight):(o.barycenter=l.barycenter,o.weight=l.weight)}return pb}var mb,_R;function pie(){if(_R)return mb;_R=1;let e=Pr().Graph,t=tn();mb=n;function n(i,a,o){let l=r(i),c=new e({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(f=>i.node(f));return i.nodes().forEach(f=>{let d=i.node(f),p=i.parent(f);(d.rank===a||d.minRank<=a&&a<=d.maxRank)&&(c.setNode(f),c.setParent(f,p||l),i[o](f).forEach(m=>{let g=m.v===f?m.w:m.v,_=c.edge(g,f),S=_!==void 0?_.weight:0;c.setEdge(g,f,{weight:i.edge(m).weight+S})}),Object.hasOwn(d,"minRank")&&c.setNode(f,{borderLeft:d.borderLeft[a],borderRight:d.borderRight[a]}))}),c}function r(i){for(var a;i.hasNode(a=t.uniqueId("_root")););return a}return mb}var gb,xR;function mie(){if(xR)return gb;xR=1,gb=e;function e(t,n,r){let i={},a;r.forEach(o=>{let l=t.parent(o),c,f;for(;l;){if(c=t.parent(l),c?(f=i[c],i[c]=l):(f=a,a=l),f&&f!==l){n.setEdge(f,l);return}l=c}})}return gb}var yb,wR;function gie(){if(wR)return yb;wR=1;let e=lie(),t=uie(),n=hie(),r=pie(),i=mie(),a=Pr().Graph,o=tn();yb=l;function l(p,m){if(m&&typeof m.customOrder=="function"){m.customOrder(p,l);return}let g=o.maxRank(p),_=c(p,o.range(1,g+1),"inEdges"),S=c(p,o.range(g-1,-1,-1),"outEdges"),b=e(p);if(d(p,b),m&&m.disableOptimalOrderHeuristic)return;let x=Number.POSITIVE_INFINITY,w;for(let v=0,k=0;k<4;++v,++k){f(v%2?_:S,v%4>=2),b=o.buildLayerMatrix(p);let C=t(p,b);C<x&&(k=0,w=Object.assign({},b),x=C)}d(p,w)}function c(p,m,g){return m.map(function(_){return r(p,_,g)})}function f(p,m){let g=new a;p.forEach(function(_){let S=_.graph().root,b=n(_,S,g,m);b.vs.forEach((x,w)=>_.node(x).order=w),i(_,g,b.vs)})}function d(p,m){Object.values(m).forEach(g=>g.forEach((_,S)=>p.node(_).order=S))}return yb}var bb,SR;function yie(){if(SR)return bb;SR=1;let e=Pr().Graph,t=tn();bb={positionX:g,findType1Conflicts:n,findType2Conflicts:r,addConflict:a,hasConflict:o,verticalAlignment:l,horizontalCompaction:c,alignCoordinates:p,findSmallestWidthAlignment:d,balance:m};function n(b,x){let w={};function v(k,C){let T=0,N=0,j=k.length,$=C[C.length-1];return C.forEach((M,q)=>{let F=i(b,M),B=F?b.node(F).order:j;(F||M===$)&&(C.slice(N,q+1).forEach(I=>{b.predecessors(I).forEach(V=>{let H=b.node(V),G=H.order;(G<T||B<G)&&!(H.dummy&&b.node(I).dummy)&&a(w,V,I)})}),N=q+1,T=B)}),C}return x.length&&x.reduce(v),w}function r(b,x){let w={};function v(C,T,N,j,$){let M;t.range(T,N).forEach(q=>{M=C[q],b.node(M).dummy&&b.predecessors(M).forEach(F=>{let B=b.node(F);B.dummy&&(B.order<j||B.order>$)&&a(w,F,M)})})}function k(C,T){let N=-1,j,$=0;return T.forEach((M,q)=>{if(b.node(M).dummy==="border"){let F=b.predecessors(M);F.length&&(j=b.node(F[0]).order,v(T,$,q,N,j),$=q,N=j)}v(T,$,T.length,j,C.length)}),T}return x.length&&x.reduce(k),w}function i(b,x){if(b.node(x).dummy)return b.predecessors(x).find(w=>b.node(w).dummy)}function a(b,x,w){if(x>w){let k=x;x=w,w=k}let v=b[x];v||(b[x]=v={}),v[w]=!0}function o(b,x,w){if(x>w){let v=x;x=w,w=v}return!!b[x]&&Object.hasOwn(b[x],w)}function l(b,x,w,v){let k={},C={},T={};return x.forEach(N=>{N.forEach((j,$)=>{k[j]=j,C[j]=j,T[j]=$})}),x.forEach(N=>{let j=-1;N.forEach($=>{let M=v($);if(M.length){M=M.sort((F,B)=>T[F]-T[B]);let q=(M.length-1)/2;for(let F=Math.floor(q),B=Math.ceil(q);F<=B;++F){let I=M[F];C[$]===$&&j<T[I]&&!o(w,$,I)&&(C[I]=$,C[$]=k[$]=k[I],j=T[I])}}})}),{root:k,align:C}}function c(b,x,w,v,k){let C={},T=f(b,x,w,k),N=k?"borderLeft":"borderRight";function j(q,F){let B=T.nodes(),I=B.pop(),V={};for(;I;)V[I]?q(I):(V[I]=!0,B.push(I),B=B.concat(F(I))),I=B.pop()}function $(q){C[q]=T.inEdges(q).reduce((F,B)=>Math.max(F,C[B.v]+T.edge(B)),0)}function M(q){let F=T.outEdges(q).reduce((I,V)=>Math.min(I,C[V.w]-T.edge(V)),Number.POSITIVE_INFINITY),B=b.node(q);F!==Number.POSITIVE_INFINITY&&B.borderType!==N&&(C[q]=Math.max(C[q],F))}return j($,T.predecessors.bind(T)),j(M,T.successors.bind(T)),Object.keys(v).forEach(q=>C[q]=C[w[q]]),C}function f(b,x,w,v){let k=new e,C=b.graph(),T=_(C.nodesep,C.edgesep,v);return x.forEach(N=>{let j;N.forEach($=>{let M=w[$];if(k.setNode(M),j){var q=w[j],F=k.edge(q,M);k.setEdge(q,M,Math.max(T(b,$,j),F||0))}j=$})}),k}function d(b,x){return Object.values(x).reduce((w,v)=>{let k=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY;Object.entries(v).forEach(([N,j])=>{let $=S(b,N)/2;k=Math.max(j+$,k),C=Math.min(j-$,C)});const T=k-C;return T<w[0]&&(w=[T,v]),w},[Number.POSITIVE_INFINITY,null])[1]}function p(b,x){let w=Object.values(x),v=t.applyWithChunking(Math.min,w),k=t.applyWithChunking(Math.max,w);["u","d"].forEach(C=>{["l","r"].forEach(T=>{let N=C+T,j=b[N];if(j===x)return;let $=Object.values(j),M=v-t.applyWithChunking(Math.min,$);T!=="l"&&(M=k-t.applyWithChunking(Math.max,$)),M&&(b[N]=t.mapValues(j,q=>q+M))})})}function m(b,x){return t.mapValues(b.ul,(w,v)=>{if(x)return b[x.toLowerCase()][v];{let k=Object.values(b).map(C=>C[v]).sort((C,T)=>C-T);return(k[1]+k[2])/2}})}function g(b){let x=t.buildLayerMatrix(b),w=Object.assign(n(b,x),r(b,x)),v={},k;["u","d"].forEach(T=>{k=T==="u"?x:Object.values(x).reverse(),["l","r"].forEach(N=>{N==="r"&&(k=k.map(q=>Object.values(q).reverse()));let j=(T==="u"?b.predecessors:b.successors).bind(b),$=l(b,k,w,j),M=c(b,k,$.root,$.align,N==="r");N==="r"&&(M=t.mapValues(M,q=>-q)),v[T+N]=M})});let C=d(b,v);return p(v,C),m(v,b.graph().align)}function _(b,x,w){return(v,k,C)=>{let T=v.node(k),N=v.node(C),j=0,$;if(j+=T.width/2,Object.hasOwn(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":$=-T.width/2;break;case"r":$=T.width/2;break}if($&&(j+=w?$:-$),$=0,j+=(T.dummy?x:b)/2,j+=(N.dummy?x:b)/2,j+=N.width/2,Object.hasOwn(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":$=N.width/2;break;case"r":$=-N.width/2;break}return $&&(j+=w?$:-$),$=0,j}}function S(b,x){return b.node(x).width}return bb}var vb,ER;function bie(){if(ER)return vb;ER=1;let e=tn(),t=yie().positionX;vb=n;function n(i){i=e.asNonCompoundGraph(i),r(i),Object.entries(t(i)).forEach(([a,o])=>i.node(a).x=o)}function r(i){let a=e.buildLayerMatrix(i),o=i.graph().ranksep,l=0;a.forEach(c=>{const f=c.reduce((d,p)=>{const m=i.node(p).height;return d>m?d:m},0);c.forEach(d=>i.node(d).y=l+f/2),l+=f+o})}return vb}var _b,kR;function vie(){if(kR)return _b;kR=1;let e=eie(),t=tie(),n=rie(),r=tn().normalizeRanks,i=iie(),a=tn().removeEmptyRanks,o=aie(),l=sie(),c=oie(),f=gie(),d=bie(),p=tn(),m=Pr().Graph;_b=g;function g(R,D){let U=D&&D.debugTiming?p.time:p.notime;U("layout",()=>{let Y=U(" buildLayoutGraph",()=>j(R));U(" runLayout",()=>_(Y,U,D)),U(" updateInputGraph",()=>S(R,Y))})}function _(R,D,U){D(" makeSpaceForEdgeLabels",()=>$(R)),D(" removeSelfEdges",()=>X(R)),D(" acyclic",()=>e.run(R)),D(" nestingGraph.run",()=>o.run(R)),D(" rank",()=>n(p.asNonCompoundGraph(R))),D(" injectEdgeLabelProxies",()=>M(R)),D(" removeEmptyRanks",()=>a(R)),D(" nestingGraph.cleanup",()=>o.cleanup(R)),D(" normalizeRanks",()=>r(R)),D(" assignRankMinMax",()=>q(R)),D(" removeEdgeLabelProxies",()=>F(R)),D(" normalize.run",()=>t.run(R)),D(" parentDummyChains",()=>i(R)),D(" addBorderSegments",()=>l(R)),D(" order",()=>f(R,U)),D(" insertSelfEdges",()=>W(R)),D(" adjustCoordinateSystem",()=>c.adjust(R)),D(" position",()=>d(R)),D(" positionSelfEdges",()=>L(R)),D(" removeBorderNodes",()=>G(R)),D(" normalize.undo",()=>t.undo(R)),D(" fixupEdgeLabelCoords",()=>V(R)),D(" undoCoordinateSystem",()=>c.undo(R)),D(" translateGraph",()=>B(R)),D(" assignNodeIntersects",()=>I(R)),D(" reversePoints",()=>H(R)),D(" acyclic.undo",()=>e.undo(R))}function S(R,D){R.nodes().forEach(U=>{let Y=R.node(U),ne=D.node(U);Y&&(Y.x=ne.x,Y.y=ne.y,Y.rank=ne.rank,D.children(U).length&&(Y.width=ne.width,Y.height=ne.height))}),R.edges().forEach(U=>{let Y=R.edge(U),ne=D.edge(U);Y.points=ne.points,Object.hasOwn(ne,"x")&&(Y.x=ne.x,Y.y=ne.y)}),R.graph().width=D.graph().width,R.graph().height=D.graph().height}let b=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],v=["width","height"],k={width:0,height:0},C=["minlen","weight","width","height","labeloffset"],T={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},N=["labelpos"];function j(R){let D=new m({multigraph:!0,compound:!0}),U=Z(R.graph());return D.setGraph(Object.assign({},x,P(U,b),p.pick(U,w))),R.nodes().forEach(Y=>{let ne=Z(R.node(Y));const ae=P(ne,v);Object.keys(k).forEach(re=>{ae[re]===void 0&&(ae[re]=k[re])}),D.setNode(Y,ae),D.setParent(Y,R.parent(Y))}),R.edges().forEach(Y=>{let ne=Z(R.edge(Y));D.setEdge(Y,Object.assign({},T,P(ne,C),p.pick(ne,N)))}),D}function $(R){let D=R.graph();D.ranksep/=2,R.edges().forEach(U=>{let Y=R.edge(U);Y.minlen*=2,Y.labelpos.toLowerCase()!=="c"&&(D.rankdir==="TB"||D.rankdir==="BT"?Y.width+=Y.labeloffset:Y.height+=Y.labeloffset)})}function M(R){R.edges().forEach(D=>{let U=R.edge(D);if(U.width&&U.height){let Y=R.node(D.v),ae={rank:(R.node(D.w).rank-Y.rank)/2+Y.rank,e:D};p.addDummyNode(R,"edge-proxy",ae,"_ep")}})}function q(R){let D=0;R.nodes().forEach(U=>{let Y=R.node(U);Y.borderTop&&(Y.minRank=R.node(Y.borderTop).rank,Y.maxRank=R.node(Y.borderBottom).rank,D=Math.max(D,Y.maxRank))}),R.graph().maxRank=D}function F(R){R.nodes().forEach(D=>{let U=R.node(D);U.dummy==="edge-proxy"&&(R.edge(U.e).labelRank=U.rank,R.removeNode(D))})}function B(R){let D=Number.POSITIVE_INFINITY,U=0,Y=Number.POSITIVE_INFINITY,ne=0,ae=R.graph(),re=ae.marginx||0,de=ae.marginy||0;function Q(J){let oe=J.x,fe=J.y,me=J.width,we=J.height;D=Math.min(D,oe-me/2),U=Math.max(U,oe+me/2),Y=Math.min(Y,fe-we/2),ne=Math.max(ne,fe+we/2)}R.nodes().forEach(J=>Q(R.node(J))),R.edges().forEach(J=>{let oe=R.edge(J);Object.hasOwn(oe,"x")&&Q(oe)}),D-=re,Y-=de,R.nodes().forEach(J=>{let oe=R.node(J);oe.x-=D,oe.y-=Y}),R.edges().forEach(J=>{let oe=R.edge(J);oe.points.forEach(fe=>{fe.x-=D,fe.y-=Y}),Object.hasOwn(oe,"x")&&(oe.x-=D),Object.hasOwn(oe,"y")&&(oe.y-=Y)}),ae.width=U-D+re,ae.height=ne-Y+de}function I(R){R.edges().forEach(D=>{let U=R.edge(D),Y=R.node(D.v),ne=R.node(D.w),ae,re;U.points?(ae=U.points[0],re=U.points[U.points.length-1]):(U.points=[],ae=ne,re=Y),U.points.unshift(p.intersectRect(Y,ae)),U.points.push(p.intersectRect(ne,re))})}function V(R){R.edges().forEach(D=>{let U=R.edge(D);if(Object.hasOwn(U,"x"))switch((U.labelpos==="l"||U.labelpos==="r")&&(U.width-=U.labeloffset),U.labelpos){case"l":U.x-=U.width/2+U.labeloffset;break;case"r":U.x+=U.width/2+U.labeloffset;break}})}function H(R){R.edges().forEach(D=>{let U=R.edge(D);U.reversed&&U.points.reverse()})}function G(R){R.nodes().forEach(D=>{if(R.children(D).length){let U=R.node(D),Y=R.node(U.borderTop),ne=R.node(U.borderBottom),ae=R.node(U.borderLeft[U.borderLeft.length-1]),re=R.node(U.borderRight[U.borderRight.length-1]);U.width=Math.abs(re.x-ae.x),U.height=Math.abs(ne.y-Y.y),U.x=ae.x+U.width/2,U.y=Y.y+U.height/2}}),R.nodes().forEach(D=>{R.node(D).dummy==="border"&&R.removeNode(D)})}function X(R){R.edges().forEach(D=>{if(D.v===D.w){var U=R.node(D.v);U.selfEdges||(U.selfEdges=[]),U.selfEdges.push({e:D,label:R.edge(D)}),R.removeEdge(D)}})}function W(R){var D=p.buildLayerMatrix(R);D.forEach(U=>{var Y=0;U.forEach((ne,ae)=>{var re=R.node(ne);re.order=ae+Y,(re.selfEdges||[]).forEach(de=>{p.addDummyNode(R,"selfedge",{width:de.label.width,height:de.label.height,rank:re.rank,order:ae+ ++Y,e:de.e,label:de.label},"_se")}),delete re.selfEdges})})}function L(R){R.nodes().forEach(D=>{var U=R.node(D);if(U.dummy==="selfedge"){var Y=R.node(U.e.v),ne=Y.x+Y.width/2,ae=Y.y,re=U.x-ne,de=Y.height/2;R.setEdge(U.e,U.label),R.removeNode(D),U.label.points=[{x:ne+2*re/3,y:ae-de},{x:ne+5*re/6,y:ae-de},{x:ne+re,y:ae},{x:ne+5*re/6,y:ae+de},{x:ne+2*re/3,y:ae+de}],U.label.x=U.x,U.label.y=U.y}})}function P(R,D){return p.mapValues(p.pick(R,D),Number)}function Z(R){var D={};return R&&Object.entries(R).forEach(([U,Y])=>{typeof U=="string"&&(U=U.toLowerCase()),D[U]=Y}),D}return _b}var xb,CR;function _ie(){if(CR)return xb;CR=1;let e=tn(),t=Pr().Graph;xb={debugOrdering:n};function n(r){let i=e.buildLayerMatrix(r),a=new t({compound:!0,multigraph:!0}).setGraph({});return r.nodes().forEach(o=>{a.setNode(o,{label:o}),a.setParent(o,"layer"+r.node(o).rank)}),r.edges().forEach(o=>a.setEdge(o.v,o.w,{},o.name)),i.forEach((o,l)=>{let c="layer"+l;a.setNode(c,{rank:"same"}),o.reduce((f,d)=>(a.setEdge(f,d,{style:"invis"}),d))}),a}return xb}var wb,AR;function xie(){return AR||(AR=1,wb="1.1.4"),wb}var Sb,TR;function wie(){return TR||(TR=1,Sb={graphlib:Pr(),layout:vie(),debug:_ie(),util:{time:tn().time,notime:tn().notime},version:xie()}),Sb}var Sie=wie();const NR=qn(Sie);function Eie(e){const t=new Map,n=[],r=a=>{const o=a.id.split(":"),l=o.slice(0,-1).join(":");if(o.length!==1){if(!t.has(l)){const c={id:l,type:"group",data:{label:l.split(":").pop(),name:l.split(":").pop()},position:{x:0,y:0},style:{},parentId:void 0},f=r(c);f&&(c.parentId=f.id),t.set(l,c)}return t.get(l)}};return e.forEach(a=>{const o={...a,id:a.id.toString(),position:{x:0,y:0},data:{label:a.id.split(":").pop(),name:a.id.split(":").pop()}},l=r(o);l&&(o.parentId=l.id.toString()),n.push(o)}),[...Array.from(t.values()),...n]}const kie={group:({data:e})=>O.jsx("div",{className:"absolute bottom-full left-0",children:O.jsx("span",{children:e.name})})},Cie=(e,t)=>{const n=e.map(r=>{const i=t.find(c=>c.id===r.source.toString()),a=t.find(c=>c.id===r.target.toString()),o=i?.id,l=a?.id;return{id:`${o}=${l}`,source:o,target:l,animated:r.conditional,label:r.data,style:{stroke:r.conditional?"#2563eb":"#64748b"}}});if(!n.find(r=>r.target==="__end__")){const r=[...t].reverse().find(i=>i.id.endsWith(":__end__"));r&&n.push({id:`${r.id}=__end__`,source:r.id,target:"__end__",type:"smoothstep"})}return n},Aie=()=>{const{fitView:e}=Lp(),{graphVisualize:t,currentNodeName:n}=Lre(),r=t||{nodes:[],edges:[]},i=Eie(r.nodes.map(g=>({...g,type:"default"}))),a=Cie(r.edges,i),[o,l,c]=fre(i),[f,d,p]=dre(a),m=ee.useCallback(g=>{const _=OR(o,f,{direction:g});l([..._.nodes]),d([..._.edges]),e()},[o,f]);return ee.useEffect(()=>{if(r.nodes.length>0){const g=OR(i,a,{direction:"TB"});l([...g.nodes]),d([...g.edges]),e()}},[r]),ee.useEffect(()=>{const g=o.findIndex(_=>_.id.endsWith(n));if(g!==-1){const _=[...o].map(S=>({...S,selected:!1}));_[g]={..._[g],selected:!0},l(_),e()}},[n]),O.jsx("div",{className:"h-full relative overflow-hidden border-l",children:O.jsxs(cre,{nodes:o,edges:f,onNodesChange:c,onEdgesChange:p,fitView:!0,className:"w-full h-full",nodeTypes:kie,children:[O.jsx(yre,{}),O.jsx(Ere,{}),O.jsxs(Mc,{position:"top-right",className:"flex gap-2",children:[O.jsx("button",{onClick:()=>m("TB"),className:"px-3 py-1.5 bg-white border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors",children:"垂直布局"}),O.jsx("button",{onClick:()=>m("LR"),className:"px-3 py-1.5 bg-white border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors",children:"水平布局"})]})]})})},OR=(e,t,n)=>{const r=new NR.graphlib.Graph({compound:!0,multigraph:!0}).setDefaultEdgeLabel(()=>({}));r.setGraph({rankdir:n.direction,nodesep:40,ranksep:40,edgesep:20}),e.forEach(l=>{l.type!=="group"&&r.setNode(l.id,{...l,width:128,height:20})}),t.forEach(l=>r.setEdge(l.source,l.target)),NR.layout(r);const i=e.map(l=>{const c=r.node(l.id);if(!c)return{...l};let f=0,d=0;return f=c.x+(c?.width??0),d=c.y+(c?.height??0),{...l,position:{x:f,y:d},_p:c,width:c.width,height:c.height}}),a=new Map,o=15;return[...i].reverse().forEach(l=>{if(l.type==="group"){const c=a.get(l.id)||[],f=Math.min(...c.map(g=>g.position.x)),d=Math.min(...c.map(g=>g.position.y)),p=Math.max(...c.map(g=>g.position.x+(g.width??0))),m=Math.max(...c.map(g=>g.position.y+(g.height??0)));l.position.x=f-o,l.position.y=d-o,l.width=p-f+o*2,l.height=m-d+o*2,c.forEach(g=>{g.position.x=g.position.x-l.position.x,g.position.y=g.position.y-l.position.y})}l.parentId&&a.set(l.parentId,[...a.get(l.parentId)??[],l])}),{nodes:i,edges:t}};function Tie(){return O.jsx(j6,{children:O.jsx(Aie,{})})}const Nie=()=>O.jsx(Tie,{});function Oie(e){return"default"}function Rie(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null||Array.isArray(e)||typeof e=="object"?e:String(e)}const jie=e=>({manageMemory:uT({name:"manage_memory",description:`这是一个**结构化**工具,用于**管理跨对话的持久化记忆**,以保留上下文、用户偏好和学习到的见解。它支持**创建、更新、检索和删除记忆条目**,从而在互动中保持连续性和个性化。
225
+
226
+ ### 你需要记录记忆的场景
227
+
228
+ 1. 请你第一时间敏锐记录下用户的细节偏好,包括对话风格、习惯、内容、方式等。
229
+ 2. 记录下高价值的问答,比如用户对你的纠正、任务过程中的关键信息
230
+
231
+
232
+ ### 核心功能
233
+
234
+ 该工具具备以下关键能力:
235
+
236
+ * **记忆生命周期管理:** 对记忆条目进行**全生命周期管理**,包括创建、更新、检索和删除。
237
+ * **分段与标签支持:** 支持**分段或打标签的记忆条目**,方便分类和高效检索。
238
+ * **存储选项灵活:** 提供**临时和永久两种存储选项**,以适应不同类型信息的存储需求。
239
+ `,parameters:[{name:"path",type:"string",description:"记忆路径(创建时需要)"},{name:"tags",type:"string[]",description:"记忆标签(创建或更新时需要)"},{name:"content",type:"string",description:"记忆内容(创建或更新时需要)"},{name:"action",type:"string",enum:["create","update","delete"],description:"操作类型:create(创建)、update(更新)、delete(删除)"},{name:"id",type:"string",description:"记忆ID(更新或删除时需要,创建时会自动生成)",required:!1},{name:"referencePath",type:"string",description:"引用文档的 URL",required:!1}],handler:async t=>{const{content:n,action:r,id:i,tags:a,path:o,referencePath:l}=t;if((r==="delete"||r==="update")&&!i)throw new Error("删除或更新记忆时必须提供记忆ID");if((r==="create"||r==="update")&&!n)throw new Error("创建或更新记忆时必须提供内容");try{if(r==="delete")return await e.delete(Number(i)),`已删除记忆 ${i}`;const c={text:n,content:Rie(n),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),namespace:Oie(),tags:a,path:o,type:"document",referencePath:l};return r==="create"?`已创建记忆 ${await e.insert(c)}`:(await e.update(Number(i),c),`已更新记忆 ${i}`)}catch(c){throw new Error(`记忆操作失败: ${c}`)}}}),searchMemory:uT({name:"search_memory",description:"搜索长期记忆中的相关信息,帮助维护对话上下文",parameters:[{name:"query",type:"string",description:"请使用中文关键词进行搜索"},{name:"tags",type:"string[]",description:"记忆标签",required:!1},{name:"path",type:"string",description:"记忆路径,memory://user_id/path/to/memory_name",required:!1},{name:"limit",type:"number",description:"返回结果的最大数量(默认10)",required:!1}],handler:async t=>{const{query:n,limit:r=10,tags:i,path:a}=t;if(!n||typeof n=="string"&&n.trim().length===0)throw new Error("搜索查询不能为空");try{const o=await e.query(n.toString(),{limit:r});return{query:n.toString(),results:o,total:o.length,limit:Number(r)}}catch(o){throw new Error(`搜索记忆失败: ${o}`)}}})}),Fw=(e,t)=>t.some(n=>e instanceof n);let RR,jR;function Mie(){return RR||(RR=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function $ie(){return jR||(jR=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Bw=new WeakMap,Eb=new WeakMap,Bp=new WeakMap;function Die(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{n(ws(e.result)),i()},o=()=>{r(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return Bp.set(t,e),t}function Iie(e){if(Bw.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Bw.set(e,t)}let Uw={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bw.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ws(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function B6(e){Uw=e(Uw)}function Pie(e){return $ie().includes(e)?function(...t){return e.apply(Hw(this),t),ws(this.request)}:function(...t){return ws(e.apply(Hw(this),t))}}function zie(e){return typeof e=="function"?Pie(e):(e instanceof IDBTransaction&&Iie(e),Fw(e,Mie())?new Proxy(e,Uw):e)}function ws(e){if(e instanceof IDBRequest)return Die(e);if(Eb.has(e))return Eb.get(e);const t=zie(e);return t!==e&&(Eb.set(e,t),Bp.set(t,e)),t}const Hw=e=>Bp.get(e);function Lie(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),l=ws(o);return r&&o.addEventListener("upgradeneeded",c=>{r(ws(o.result),c.oldVersion,c.newVersion,ws(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),l.then(c=>{a&&c.addEventListener("close",()=>a()),i&&c.addEventListener("versionchange",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),l}const qie=["get","getKey","getAll","getAllKeys","count"],Fie=["put","add","delete","clear"],kb=new Map;function MR(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(kb.get(t))return kb.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Fie.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||qie.includes(n)))return;const a=async function(o,...l){const c=this.transaction(o,i?"readwrite":"readonly");let f=c.store;return r&&(f=f.index(l.shift())),(await Promise.all([f[n](...l),i&&c.done]))[0]};return kb.set(t,a),a}B6(e=>({...e,get:(t,n,r)=>MR(t,n)||e.get(t,n,r),has:(t,n)=>!!MR(t,n)||e.has(t,n)}));const Bie=["continue","continuePrimaryKey","advance"],$R={},Vw=new WeakMap,U6=new WeakMap,Uie={get(e,t){if(!Bie.includes(t))return e[t];let n=$R[t];return n||(n=$R[t]=function(...r){Vw.set(this,U6.get(this)[t](...r))}),n}};async function*Hie(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,Uie);for(U6.set(n,t),Bp.set(n,Hw(t));t;)yield n,t=await(Vw.get(n)||t.continue()),Vw.delete(n)}function DR(e,t){return t===Symbol.asyncIterator&&Fw(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Fw(e,[IDBIndex,IDBObjectStore])}B6(e=>({...e,get(t,n,r){return DR(t,n)?Hie:e.get(t,n,r)},has(t,n){return DR(t,n)||e.has(t,n)}}));class Vie{isInitialized=!1;config;constructor(t){this.config=t}}const Gie="ENTRIES",H6="KEYS",V6="VALUES",yn="";class Cb{constructor(t,n){const r=t._tree,i=Array.from(r.keys());this.set=t,this._type=n,this._path=i.length>0?[{node:r,keys:i}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:n}=$o(this._path);if($o(n)===yn)return{done:!1,value:this.result()};const r=t.get($o(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=$o(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>$o(t)).filter(t=>t!==yn).join("")}value(){return $o(this._path).node.get(yn)}result(){switch(this._type){case V6:return this.value();case H6:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const $o=e=>e[e.length-1],Zie=(e,t,n)=>{const r=new Map;if(t===void 0)return r;const i=t.length+1,a=i+n,o=new Uint8Array(a*i).fill(n+1);for(let l=0;l<i;++l)o[l]=l;for(let l=1;l<a;++l)o[l*i]=l;return G6(e,t,n,r,o,1,i,""),r},G6=(e,t,n,r,i,a,o,l)=>{const c=a*o;e:for(const f of e.keys())if(f===yn){const d=i[c-1];d<=n&&r.set(l,[e.get(f),d])}else{let d=a;for(let p=0;p<f.length;++p,++d){const m=f[p],g=o*d,_=g-o;let S=i[g];const b=Math.max(0,d-n-1),x=Math.min(o-1,d+n);for(let w=b;w<x;++w){const v=m!==t[w],k=i[_+w]+ +v,C=i[_+w+1]+1,T=i[g+w]+1,N=i[g+w+1]=Math.min(k,C,T);N<S&&(S=N)}if(S>n)continue e}G6(e.get(f),t,n,r,i,d,o,l+f)}};class ja{constructor(t=new Map,n=""){this._size=void 0,this._tree=t,this._prefix=n}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[n,r]=cp(this._tree,t.slice(this._prefix.length));if(n===void 0){const[i,a]=HS(r);for(const o of i.keys())if(o!==yn&&o.startsWith(a)){const l=new Map;return l.set(o.slice(a.length),i.get(o)),new ja(l,t)}}return new ja(n,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,Yie(this._tree,t)}entries(){return new Cb(this,Gie)}forEach(t){for(const[n,r]of this)t(n,r,this)}fuzzyGet(t,n){return Zie(this._tree,t,n)}get(t){const n=Gw(this._tree,t);return n!==void 0?n.get(yn):void 0}has(t){const n=Gw(this._tree,t);return n!==void 0&&n.has(yn)}keys(){return new Cb(this,H6)}set(t,n){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,Ab(this._tree,t).set(yn,n),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=Ab(this._tree,t);return r.set(yn,n(r.get(yn))),this}fetch(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=Ab(this._tree,t);let i=r.get(yn);return i===void 0&&r.set(yn,i=n()),i}values(){return new Cb(this,V6)}[Symbol.iterator](){return this.entries()}static from(t){const n=new ja;for(const[r,i]of t)n.set(r,i);return n}static fromObject(t){return ja.from(Object.entries(t))}}const cp=(e,t,n=[])=>{if(t.length===0||e==null)return[e,n];for(const r of e.keys())if(r!==yn&&t.startsWith(r))return n.push([e,r]),cp(e.get(r),t.slice(r.length),n);return n.push([e,t]),cp(void 0,"",n)},Gw=(e,t)=>{if(t.length===0||e==null)return e;for(const n of e.keys())if(n!==yn&&t.startsWith(n))return Gw(e.get(n),t.slice(n.length))},Ab=(e,t)=>{const n=t.length;e:for(let r=0;e&&r<n;){for(const a of e.keys())if(a!==yn&&t[r]===a[0]){const o=Math.min(n-r,a.length);let l=1;for(;l<o&&t[r+l]===a[l];)++l;const c=e.get(a);if(l===a.length)e=c;else{const f=new Map;f.set(a.slice(l),c),e.set(t.slice(r,r+l),f),e.delete(a),e=f}r+=l;continue e}const i=new Map;return e.set(t.slice(r),i),i}return e},Yie=(e,t)=>{const[n,r]=cp(e,t);if(n!==void 0){if(n.delete(yn),n.size===0)Z6(r);else if(n.size===1){const[i,a]=n.entries().next().value;Y6(r,i,a)}}},Z6=e=>{if(e.length===0)return;const[t,n]=HS(e);if(t.delete(n),t.size===0)Z6(e.slice(0,-1));else if(t.size===1){const[r,i]=t.entries().next().value;r!==yn&&Y6(e.slice(0,-1),r,i)}},Y6=(e,t,n)=>{if(e.length===0)return;const[r,i]=HS(e);r.set(i+t,n),r.delete(i)},HS=e=>e[e.length-1],VS="or",K6="and",Kie="and_not";class Ss{constructor(t){if(t?.fields==null)throw new Error('MiniSearch: option "fields" must be provided');const n=t.autoVacuum==null||t.autoVacuum===!0?Ob:t.autoVacuum;this._options={...Nb,...t,autoVacuum:n,searchOptions:{...IR,...t.searchOptions||{}},autoSuggestOptions:{...eae,...t.autoSuggestOptions||{}}},this._index=new ja,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Yw,this.addFields(this._options.fields)}add(t){const{extractField:n,tokenize:r,processTerm:i,fields:a,idField:o}=this._options,l=n(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,t);for(const f of a){const d=n(t,f);if(d==null)continue;const p=r(d.toString(),f),m=this._fieldIds[f],g=new Set(p).size;this.addFieldLength(c,m,this._documentCount-1,g);for(const _ of p){const S=i(_,f);if(Array.isArray(S))for(const b of S)this.addTerm(m,c,b);else S&&this.addTerm(m,c,S)}}}addAll(t){for(const n of t)this.add(n)}addAllAsync(t,n={}){const{chunkSize:r=10}=n,i={chunk:[],promise:Promise.resolve()},{chunk:a,promise:o}=t.reduce(({chunk:l,promise:c},f,d)=>(l.push(f),(d+1)%r===0?{chunk:[],promise:c.then(()=>new Promise(p=>setTimeout(p,0))).then(()=>this.addAll(l))}:{chunk:l,promise:c}),i);return o.then(()=>this.addAll(a))}remove(t){const{tokenize:n,processTerm:r,extractField:i,fields:a,idField:o}=this._options,l=i(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const f of a){const d=i(t,f);if(d==null)continue;const p=n(d.toString(),f),m=this._fieldIds[f],g=new Set(p).size;this.removeFieldLength(c,m,this._documentCount,g);for(const _ of p){const S=r(_,f);if(Array.isArray(S))for(const b of S)this.removeTerm(m,c,b);else S&&this.removeTerm(m,c,S)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),this._fieldLength.delete(c),this._documentCount-=1}removeAll(t){if(t)for(const n of t)this.remove(n);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new ja,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(t){const n=this._idToShortId.get(t);if(n==null)throw new Error(`MiniSearch: cannot discard document with ID ${t}: it is not in the index`);this._idToShortId.delete(t),this._documentIds.delete(n),this._storedFields.delete(n),(this._fieldLength.get(n)||[]).forEach((r,i)=>{this.removeFieldLength(n,i,this._documentCount,r)}),this._fieldLength.delete(n),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:t,minDirtCount:n,batchSize:r,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:i},{minDirtCount:n,minDirtFactor:t})}discardAll(t){const n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const r of t)this.discard(r)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(t){const{idField:n,extractField:r}=this._options,i=r(t,n);this.discard(i),this.add(t)}vacuum(t={}){return this.conditionalVacuum(t)}conditionalVacuum(t,n){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&n,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const r=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Yw,this.performVacuuming(t,r)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}async performVacuuming(t,n){const r=this._dirtCount;if(this.vacuumConditionsMet(n)){const i=t.batchSize||Zw.batchSize,a=t.batchWait||Zw.batchWait;let o=1;for(const[l,c]of this._index){for(const[f,d]of c)for(const[p]of d)this._documentIds.has(p)||(d.size<=1?c.delete(f):d.delete(p));this._index.get(l).size===0&&this._index.delete(l),o%i===0&&await new Promise(f=>setTimeout(f,a)),o+=1}this._dirtCount-=r}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:n,minDirtFactor:r}=t;return n=n||Ob.minDirtCount,r=r||Ob.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=r}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(t){return this._idToShortId.has(t)}getStoredFields(t){const n=this._idToShortId.get(t);if(n!=null)return this._storedFields.get(n)}search(t,n={}){const{searchOptions:r}=this._options,i={...r,...n},a=this.executeQuery(t,n),o=[];for(const[l,{score:c,terms:f,match:d}]of a){const p=f.length||1,m={id:this._documentIds.get(l),score:c*p,terms:Object.keys(d),queryTerms:f,match:d};Object.assign(m,this._storedFields.get(l)),(i.filter==null||i.filter(m))&&o.push(m)}return t===Ss.wildcard&&i.boostDocument==null||o.sort(zR),o}autoSuggest(t,n={}){n={...this._options.autoSuggestOptions,...n};const r=new Map;for(const{score:a,terms:o}of this.search(t,n)){const l=o.join(" "),c=r.get(l);c!=null?(c.score+=a,c.count+=1):r.set(l,{score:a,terms:o,count:1})}const i=[];for(const[a,{score:o,terms:l,count:c}]of r)i.push({suggestion:a,terms:l,score:o/c});return i.sort(zR),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),n)}static async loadJSONAsync(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(t),n)}static getDefault(t){if(Nb.hasOwnProperty(t))return Tb(Nb,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,n){const{index:r,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=$d(i),c._fieldLength=$d(a),c._storedFields=$d(o);for(const[f,d]of c._documentIds)c._idToShortId.set(d,f);for(const[f,d]of r){const p=new Map;for(const m of Object.keys(d)){let g=d[m];l===1&&(g=g.ds),p.set(parseInt(m,10),$d(g))}c._index.set(f,p)}return c}static async loadJSAsync(t,n){const{index:r,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=await Dd(i),c._fieldLength=await Dd(a),c._storedFields=await Dd(o);for(const[d,p]of c._documentIds)c._idToShortId.set(p,d);let f=0;for(const[d,p]of r){const m=new Map;for(const g of Object.keys(p)){let _=p[g];l===1&&(_=_.ds),m.set(parseInt(g,10),await Dd(_))}++f%1e3===0&&await X6(0),c._index.set(d,m)}return c}static instantiateMiniSearch(t,n){const{documentCount:r,nextId:i,fieldIds:a,averageFieldLength:o,dirtCount:l,serializationVersion:c}=t;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const f=new Ss(n);return f._documentCount=r,f._nextId=i,f._idToShortId=new Map,f._fieldIds=a,f._avgFieldLength=o,f._dirtCount=l||0,f._index=new ja,f}executeQuery(t,n={}){if(t===Ss.wildcard)return this.executeWildcardQuery(n);if(typeof t!="string"){const m={...n,...t,queries:void 0},g=t.queries.map(_=>this.executeQuery(_,m));return this.combineResults(g,m.combineWith)}const{tokenize:r,processTerm:i,searchOptions:a}=this._options,o={tokenize:r,processTerm:i,...a,...n},{tokenize:l,processTerm:c}=o,p=l(t).flatMap(m=>c(m)).filter(m=>!!m).map(Jie(o)).map(m=>this.executeQuerySpec(m,o));return this.combineResults(p,o.combineWith)}executeQuerySpec(t,n){const r={...this._options.searchOptions,...n},i=(r.fields||this._options.fields).reduce((S,b)=>({...S,[b]:Tb(r.boost,b)||1}),{}),{boostDocument:a,weights:o,maxFuzzy:l,bm25:c}=r,{fuzzy:f,prefix:d}={...IR.weights,...o},p=this._index.get(t.term),m=this.termResults(t.term,t.term,1,t.termBoost,p,i,a,c);let g,_;if(t.prefix&&(g=this._index.atPrefix(t.term)),t.fuzzy){const S=t.fuzzy===!0?.2:t.fuzzy,b=S<1?Math.min(l,Math.round(t.term.length*S)):S;b&&(_=this._index.fuzzyGet(t.term,b))}if(g)for(const[S,b]of g){const x=S.length-t.term.length;if(!x)continue;_?.delete(S);const w=d*S.length/(S.length+.3*x);this.termResults(t.term,S,w,t.termBoost,b,i,a,c,m)}if(_)for(const S of _.keys()){const[b,x]=_.get(S);if(!x)continue;const w=f*S.length/(S.length+x);this.termResults(t.term,S,w,t.termBoost,b,i,a,c,m)}return m}executeWildcardQuery(t){const n=new Map,r={...this._options.searchOptions,...t};for(const[i,a]of this._documentIds){const o=r.boostDocument?r.boostDocument(a,"",this._storedFields.get(i)):1;n.set(i,{score:o,terms:[],match:{}})}return n}combineResults(t,n=VS){if(t.length===0)return new Map;const r=n.toLowerCase(),i=Xie[r];if(!i)throw new Error(`Invalid combination operator: ${n}`);return t.reduce(i)||new Map}toJSON(){const t=[];for(const[n,r]of this._index){const i={};for(const[a,o]of r)i[a]=Object.fromEntries(o);t.push([n,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}termResults(t,n,r,i,a,o,l,c,f=new Map){if(a==null)return f;for(const d of Object.keys(o)){const p=o[d],m=this._fieldIds[d],g=a.get(m);if(g==null)continue;let _=g.size;const S=this._avgFieldLength[m];for(const b of g.keys()){if(!this._documentIds.has(b)){this.removeTerm(m,b,n),_-=1;continue}const x=l?l(this._documentIds.get(b),n,this._storedFields.get(b)):1;if(!x)continue;const w=g.get(b),v=this._fieldLength.get(b)[m],k=Qie(w,_,this._documentCount,v,S,c),C=r*i*p*x*k,T=f.get(b);if(T){T.score+=C,tae(T.terms,t);const N=Tb(T.match,n);N?N.push(d):T.match[n]=[d]}else f.set(b,{score:C,terms:[t],match:{[n]:[d]}})}}return f}addTerm(t,n,r){const i=this._index.fetch(r,LR);let a=i.get(t);if(a==null)a=new Map,a.set(n,1),i.set(t,a);else{const o=a.get(n);a.set(n,(o||0)+1)}}removeTerm(t,n,r){if(!this._index.has(r)){this.warnDocumentChanged(n,t,r);return}const i=this._index.fetch(r,LR),a=i.get(t);a==null||a.get(n)==null?this.warnDocumentChanged(n,t,r):a.get(n)<=1?a.size<=1?i.delete(t):a.delete(n):a.set(n,a.get(n)-1),this._index.get(r).size===0&&this._index.delete(r)}warnDocumentChanged(t,n,r){for(const i of Object.keys(this._fieldIds))if(this._fieldIds[i]===n){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${r}" was not present in field "${i}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(t){const n=this._nextId;return this._idToShortId.set(t,n),this._documentIds.set(n,t),this._documentCount+=1,this._nextId+=1,n}addFields(t){for(let n=0;n<t.length;n++)this._fieldIds[t[n]]=n}addFieldLength(t,n,r,i){let a=this._fieldLength.get(t);a==null&&this._fieldLength.set(t,a=[]),a[n]=i;const l=(this._avgFieldLength[n]||0)*r+i;this._avgFieldLength[n]=l/(r+1)}removeFieldLength(t,n,r,i){if(r===1){this._avgFieldLength[n]=0;return}const a=this._avgFieldLength[n]*r-i;this._avgFieldLength[n]=a/(r-1)}saveStoredFields(t,n){const{storeFields:r,extractField:i}=this._options;if(r==null||r.length===0)return;let a=this._storedFields.get(t);a==null&&this._storedFields.set(t,a={});for(const o of r){const l=i(n,o);l!==void 0&&(a[o]=l)}}}Ss.wildcard=Symbol("*");const Tb=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,Xie={[VS]:(e,t)=>{for(const n of t.keys()){const r=e.get(n);if(r==null)e.set(n,t.get(n));else{const{score:i,terms:a,match:o}=t.get(n);r.score=r.score+i,r.match=Object.assign(r.match,o),PR(r.terms,a)}}return e},[K6]:(e,t)=>{const n=new Map;for(const r of t.keys()){const i=e.get(r);if(i==null)continue;const{score:a,terms:o,match:l}=t.get(r);PR(i.terms,o),n.set(r,{score:i.score+a,terms:i.terms,match:Object.assign(i.match,l)})}return n},[Kie]:(e,t)=>{for(const n of t.keys())e.delete(n);return e}},Wie={k:1.2,b:.7,d:.5},Qie=(e,t,n,r,i,a)=>{const{k:o,b:l,d:c}=a;return Math.log(1+(n-t+.5)/(t+.5))*(c+e*(o+1)/(e+o*(1-l+l*r/i)))},Jie=e=>(t,n,r)=>{const i=typeof e.fuzzy=="function"?e.fuzzy(t,n,r):e.fuzzy||!1,a=typeof e.prefix=="function"?e.prefix(t,n,r):e.prefix===!0,o=typeof e.boostTerm=="function"?e.boostTerm(t,n,r):1;return{term:t,fuzzy:i,prefix:a,termBoost:o}},Nb={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(nae),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof console?.[e]=="function"&&console[e](t)},autoVacuum:!0},IR={combineWith:VS,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Wie},eae={combineWith:K6,prefix:(e,t,n)=>t===n.length-1},Zw={batchSize:1e3,batchWait:10},Yw={minDirtFactor:.1,minDirtCount:20},Ob={...Zw,...Yw},tae=(e,t)=>{e.includes(t)||e.push(t)},PR=(e,t)=>{for(const n of t)e.includes(n)||e.push(n)},zR=({score:e},{score:t})=>t-e,LR=()=>new Map,$d=e=>{const t=new Map;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]);return t},Dd=async e=>{const t=new Map;let n=0;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]),++n%1e3===0&&await X6(0);return t},X6=e=>new Promise(t=>setTimeout(t,e)),nae=/[\n\r\p{Z}\p{P}]+/u,qR={dbName:"minisearch_memory_db",dbVersion:1,storeName:"memory",miniSearchOptions:{fields:["text","path","tags","referencePath"],storeFields:["text","path","tags","referencePath"],tokenize:W6}};function W6(e){const t=e.replace(/ /g,""),n=new Intl.Segmenter("zh-CN",{granularity:"word"});return Array.from(n.segment(t)).map(i=>i.segment)}class rae extends Vie{miniSearch;config;db;constructor(t){const n={...qR,...t,miniSearchOptions:{...qR.miniSearchOptions,...t?.miniSearchOptions||{}}};super(n),this.config=n}async initialize(){if(this.isInitialized)return;const{storeName:t}=this.config;this.db=await Lie(this.config.dbName,this.config.dbVersion,{upgrade(r){r.objectStoreNames.contains(t)||r.createObjectStore(t,{keyPath:"id",autoIncrement:!0}),r.objectStoreNames.contains("minisearch_index")||r.createObjectStore("minisearch_index")}});const n={fields:this.config.miniSearchOptions.fields||["text"],storeFields:this.config.miniSearchOptions.storeFields||["text"],tokenize:this.config.miniSearchOptions.tokenize||W6};this.miniSearch=new Ss(n);try{const r=await this.loadMiniSearchIndex();if(r)console.log(r),this.miniSearch=await Ss.loadJSAsync(r,n),console.log("MiniSearch index loaded from IndexedDB.");else{console.log("No saved index found, building from documents...");const i=await this.getAll();i.length>0?(this.miniSearch.addAll(i),await this.saveMiniSearchIndex(this.miniSearch.toJSON()),console.log(`MiniSearch index built from ${i.length} documents and saved.`)):console.log("No documents found, index is empty.")}this.isInitialized=!0}catch(r){throw console.error("Failed to initialize FullTextSearchService:",r),r}}async insert(t){const n=this.db.transaction(this.config.storeName,"readwrite"),r=n.objectStore(this.config.storeName),i={...t},a=await r.add(i);return i.id=Number(a),await n.done,this.miniSearch.add(i),await this.saveMiniSearchIndex(this.miniSearch.toJSON()),i.id}async update(t,n){const i=this.db.transaction(this.config.storeName,"readwrite").objectStore(this.config.storeName),a={...n,id:t};await i.put(a);const o=await i.get(t);o&&this.miniSearch.remove(o),this.miniSearch.add(a),await this.saveMiniSearchIndex(this.miniSearch.toJSON())}async delete(t){const r=this.db.transaction(this.config.storeName,"readwrite").objectStore(this.config.storeName),i=await r.get(t);i&&this.miniSearch.remove(i),await r.delete(t),await this.saveMiniSearchIndex(this.miniSearch.toJSON())}async query(t,n){return this.miniSearch.search(t,n).slice(0,n?.limit??5).map(i=>{const{id:a,text:o,...l}=i;return{id:a,text:o,tags:l.tags,path:l.path,type:l.type,score:Math.round(i.score),referencePath:l.referencePath}})}async get(t){return this.db.transaction(this.config.storeName,"readonly").objectStore(this.config.storeName).get(t)}async getAll(){return this.db.transaction(this.config.storeName,"readonly").objectStore(this.config.storeName).getAll()}async loadMiniSearchIndex(){return this.db.transaction("minisearch_index","readonly").objectStore("minisearch_index").get("indexData")}async saveMiniSearchIndex(t){const n=this.db.transaction("minisearch_index","readwrite");await n.objectStore("minisearch_index").put(t,"indexData"),await n.done}}const GS=new rae({dbName:"memory_fulltext_db",dbVersion:1,storeName:"memory"});GS.initialize();console.log(GS);jie(GS);const FR=e=>{Object.entries(e).forEach(([t,n])=>{localStorage.setItem(t,n.toString())})};/**
240
+ * @license
241
+ * Copyright 2019 Google LLC
242
+ * SPDX-License-Identifier: Apache-2.0
243
+ */const Q6=Symbol("Comlink.proxy"),iae=Symbol("Comlink.endpoint"),aae=Symbol("Comlink.releaseProxy"),Rb=Symbol("Comlink.finalizer"),jh=Symbol("Comlink.thrown"),J6=e=>typeof e=="object"&&e!==null||typeof e=="function",sae={canHandle:e=>J6(e)&&e[Q6],serialize(e){const{port1:t,port2:n}=new MessageChannel;return t8(e,t),[n,[n]]},deserialize(e){return e.start(),r8(e)}},oae={canHandle:e=>J6(e)&&jh in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},e8=new Map([["proxy",sae],["throw",oae]]);function lae(e,t){for(const n of e)if(t===n||n==="*"||n instanceof RegExp&&n.test(t))return!0;return!1}function t8(e,t=globalThis,n=["*"]){t.addEventListener("message",function r(i){if(!i||!i.data)return;if(!lae(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:o,path:l}=Object.assign({path:[]},i.data),c=(i.data.argumentList||[]).map(gs);let f;try{const d=l.slice(0,-1).reduce((m,g)=>m[g],e),p=l.reduce((m,g)=>m[g],e);switch(o){case"GET":f=p;break;case"SET":d[l.slice(-1)[0]]=gs(i.data.value),f=!0;break;case"APPLY":f=p.apply(d,c);break;case"CONSTRUCT":{const m=new p(...c);f=pae(m)}break;case"ENDPOINT":{const{port1:m,port2:g}=new MessageChannel;t8(e,g),f=hae(m,[m])}break;case"RELEASE":f=void 0;break;default:return}}catch(d){f={value:d,[jh]:0}}Promise.resolve(f).catch(d=>({value:d,[jh]:0})).then(d=>{const[p,m]=hp(d);t.postMessage(Object.assign(Object.assign({},p),{id:a}),m),o==="RELEASE"&&(t.removeEventListener("message",r),n8(t),Rb in e&&typeof e[Rb]=="function"&&e[Rb]())}).catch(d=>{const[p,m]=hp({value:new TypeError("Unserializable return value"),[jh]:0});t.postMessage(Object.assign(Object.assign({},p),{id:a}),m)})}),t.start&&t.start()}function uae(e){return e.constructor.name==="MessagePort"}function n8(e){uae(e)&&e.close()}function r8(e,t){const n=new Map;return e.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const o=n.get(a.id);if(o)try{o(a)}finally{n.delete(a.id)}}),Kw(e,n,[],t)}function Id(e){if(e)throw new Error("Proxy has been released and is not useable")}function i8(e){return qo(e,new Map,{type:"RELEASE"}).then(()=>{n8(e)})}const fp=new WeakMap,dp="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(fp.get(e)||0)-1;fp.set(e,t),t===0&&i8(e)});function cae(e,t){const n=(fp.get(t)||0)+1;fp.set(t,n),dp&&dp.register(e,t,e)}function fae(e){dp&&dp.unregister(e)}function Kw(e,t,n=[],r=function(){}){let i=!1;const a=new Proxy(r,{get(o,l){if(Id(i),l===aae)return()=>{fae(a),i8(e),t.clear(),i=!0};if(l==="then"){if(n.length===0)return{then:()=>a};const c=qo(e,t,{type:"GET",path:n.map(f=>f.toString())}).then(gs);return c.then.bind(c)}return Kw(e,t,[...n,l])},set(o,l,c){Id(i);const[f,d]=hp(c);return qo(e,t,{type:"SET",path:[...n,l].map(p=>p.toString()),value:f},d).then(gs)},apply(o,l,c){Id(i);const f=n[n.length-1];if(f===iae)return qo(e,t,{type:"ENDPOINT"}).then(gs);if(f==="bind")return Kw(e,t,n.slice(0,-1));const[d,p]=BR(c);return qo(e,t,{type:"APPLY",path:n.map(m=>m.toString()),argumentList:d},p).then(gs)},construct(o,l){Id(i);const[c,f]=BR(l);return qo(e,t,{type:"CONSTRUCT",path:n.map(d=>d.toString()),argumentList:c},f).then(gs)}});return cae(a,e),a}function dae(e){return Array.prototype.concat.apply([],e)}function BR(e){const t=e.map(hp);return[t.map(n=>n[0]),dae(t.map(n=>n[1]))]}const a8=new WeakMap;function hae(e,t){return a8.set(e,t),e}function pae(e){return Object.assign(e,{[Q6]:!0})}function mae(e,t=globalThis,n="*"){return{postMessage:(r,i)=>e.postMessage(r,n,i),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function hp(e){for(const[t,n]of e8)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},a8.get(e)||[]]}function gs(e){switch(e.type){case"HANDLER":return e8.get(e.name).deserialize(e.value);case"RAW":return e.value}}function qo(e,t,n,r){return new Promise(i=>{const a=gae();t.set(a,i),e.start&&e.start(),e.postMessage(Object.assign({id:a},n),r)})}function gae(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const s8=ee.createContext({artifacts:[],currentArtifact:null,setCurrentArtifactById:()=>{},getArtifactVersions:()=>[],showArtifact:!1,setShowArtifact:()=>{}}),Up=()=>ee.useContext(s8),yae=({children:e})=>{const[t,n]=ee.useState([]),[r,i]=ee.useState(!1),{renderMessages:a}=js(),[o,l]=ee.useState(null),c=d=>t.filter(p=>p.filename===d).sort((p,m)=>p.version-m.version);ee.useEffect(()=>{if(!a)return;const d=a.filter(g=>g.type==="tool").filter(g=>g.name==="create_artifacts"),p=new Map,m=d.map(g=>{const _=JSON.parse(g.tool_input),S=_.filename,x=(p.get(S)||0)+1;return p.set(S,x),{id:g.id,code:_.code,filename:S,version:x,filetype:_.filetype}});n(m)},[a]);const f=d=>{i(!0),l(t.find(p=>p.id===d)||null)};return O.jsx(s8.Provider,{value:{artifacts:t,currentArtifact:o,setCurrentArtifactById:f,getArtifactVersions:c,showArtifact:r,setShowArtifact:i},children:e})},bae=()=>{const{currentArtifact:e}=Up();return e?O.jsx("div",{className:"h-full w-full overflow-auto",children:O.jsx("pre",{children:e.code})}):O.jsx("div",{className:"h-full w-full flex items-center justify-center text-gray-500",children:"请选择一个文件"})},vae=()=>{const e=ee.useRef(null),[t,n]=ee.useState(!1),{currentArtifact:r,getArtifactVersions:i,setCurrentArtifactById:a,artifacts:o}=Up(),[l,c]=ee.useState(0),[f,d]=ee.useState("preview"),[p,m]=ee.useState(!1),g=async w=>{const v=r8(mae(w.contentWindow));return await Promise.race(Array(100).fill(0).map((k,C)=>new Promise(T=>{setTimeout(async()=>{await v.init()&&T(C)},100*C)}))),v},_=async()=>{if(console.log(l),!!e.current){n(!0);try{await(await g(e.current)).run(r?.code,r?.filename,r?.filetype)}catch(w){console.error("Failed to run code:",w)}finally{n(!1)}}},S=()=>{c(w=>w+1)};if(ee.useEffect(()=>{e.current&&_()},[l]),!r)return O.jsx("div",{className:"h-full w-full flex items-center justify-center text-gray-500",children:"请选择一个文件"});const b=i(r.filename),x=Array.from(new Set(o.map(w=>w.filename)));return O.jsxs("div",{className:"h-full w-full flex flex-col",children:[O.jsxs("div",{className:"flex items-center justify-between p-2 border-b",children:[O.jsxs("div",{className:"flex items-center space-x-4",children:[O.jsxs("div",{className:"flex space-x-2",children:[O.jsx("button",{className:`px-3 py-1 rounded ${f==="preview"?"bg-blue-500 text-white":"bg-gray-100 text-gray-700"}`,onClick:()=>{d("preview"),S()},children:"预览"}),O.jsx("button",{className:`px-3 py-1 rounded ${f==="source"?"bg-blue-500 text-white":"bg-gray-100 text-gray-700"}`,onClick:()=>d("source"),children:"源代码"})]}),O.jsxs("div",{className:"relative",children:[O.jsxs("button",{className:"flex items-center space-x-2 px-3 py-1 bg-gray-100 rounded hover:bg-gray-200",onClick:()=>m(!p),children:[O.jsx("span",{children:r.filename}),O.jsx(GI,{className:"w-4 h-4"})]}),p&&O.jsx("div",{className:"absolute top-full left-0 mt-1 w-48 bg-white border rounded-md shadow-lg z-10",children:x.map(w=>{const v=i(w),k=v[v.length-1];return O.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100",onClick:()=>{a(k.id),m(!1)},children:w},w)})})]}),O.jsxs("div",{className:"flex items-center space-x-2",children:[O.jsx("span",{className:"text-sm text-gray-500",children:"版本:"}),O.jsx("div",{className:"flex space-x-1",children:b.map(w=>O.jsxs("button",{className:`px-2 py-1 text-sm rounded ${w.id===r.id?"bg-blue-500 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,onClick:()=>a(w.id),children:["v",w.version]},w.id))})]})]}),f==="preview"&&O.jsxs("div",{className:"flex space-x-2",children:[O.jsx("button",{disabled:t,className:"px-3 py-1 bg-gray-100 rounded hover:bg-gray-200 disabled:opacity-50",children:t?"Running...":"Run"}),O.jsx("button",{onClick:S,disabled:t,className:"px-3 py-1 bg-gray-100 rounded hover:bg-gray-200 disabled:opacity-50",children:"Refresh"})]})]}),O.jsx("div",{className:"flex-1 overflow-auto",children:f==="preview"?O.jsx("iframe",{ref:e,src:"https://langgraph-artifacts.netlify.app/index.html",className:"w-full h-full border border-gray-300"},l):O.jsx(bae,{})})]})};function lt(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function _ae(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),lt(e.additionalItems)}function UR(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const $c="__additional_property",Xw="additionalProperties",gl="allOf",$r="anyOf",qi="const",xae="default",Hp="dependencies",wae="enum",Jn="__errors",Ma="$id",Sae="if",Da="items",Eae="_$junk_option_schema_id$_",Mh="$name",tr="oneOf",Ht="properties",kae="required",pp="submitButtonOptions",sn="$ref",ZS="__rjsf_additionalProperties",o8="__rjsf_rootSchema",Cae="ui:field",YS="ui:widget",Ku="ui:options",Aae="ui:globalOptions";function ot(e={},t={}){return Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=e[r];return r===YS&&lt(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===Ku&&lt(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t})}function Tae(e,t={},n){if(!e.additionalProperties)return!1;const{expandable:r=!0}=ot(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}var l8=typeof global=="object"&&global&&global.Object===Object&&global,Nae=typeof self=="object"&&self&&self.Object===Object&&self,ri=l8||Nae||Function("return this")(),vr=ri.Symbol,u8=Object.prototype,Oae=u8.hasOwnProperty,Rae=u8.toString,Tu=vr?vr.toStringTag:void 0;function jae(e){var t=Oae.call(e,Tu),n=e[Tu];try{e[Tu]=void 0;var r=!0}catch{}var i=Rae.call(e);return r&&(t?e[Tu]=n:delete e[Tu]),i}var Mae=Object.prototype,$ae=Mae.toString;function Dae(e){return $ae.call(e)}var Iae="[object Null]",Pae="[object Undefined]",HR=vr?vr.toStringTag:void 0;function Vi(e){return e==null?e===void 0?Pae:Iae:HR&&HR in Object(e)?jae(e):Dae(e)}function c8(e,t){return function(n){return e(t(n))}}var Vp=c8(Object.getPrototypeOf,Object);function _r(e){return e!=null&&typeof e=="object"}var zae="[object Object]",Lae=Function.prototype,qae=Object.prototype,f8=Lae.toString,Fae=qae.hasOwnProperty,Bae=f8.call(Object);function Ts(e){if(!_r(e)||Vi(e)!=zae)return!1;var t=Vp(e);if(t===null)return!0;var n=Fae.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&f8.call(n)==Bae}function mp(e){const t={[Jn]:[],addError(n){this[Jn].push(n)}};if(Array.isArray(e))return e.reduce((n,r,i)=>({...n,[i]:mp(r)}),t);if(Ts(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:mp(n[i])}),t)}return t}function Uae(){this.__data__=[],this.size=0}function Dc(e,t){return e===t||e!==e&&t!==t}function Gp(e,t){for(var n=e.length;n--;)if(Dc(e[n][0],t))return n;return-1}var Hae=Array.prototype,Vae=Hae.splice;function Gae(e){var t=this.__data__,n=Gp(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Vae.call(t,n,1),--this.size,!0}function Zae(e){var t=this.__data__,n=Gp(t,e);return n<0?void 0:t[n][1]}function Yae(e){return Gp(this.__data__,e)>-1}function Kae(e,t){var n=this.__data__,r=Gp(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Gi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gi.prototype.clear=Uae;Gi.prototype.delete=Gae;Gi.prototype.get=Zae;Gi.prototype.has=Yae;Gi.prototype.set=Kae;function Xae(){this.__data__=new Gi,this.size=0}function Wae(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Qae(e){return this.__data__.get(e)}function Jae(e){return this.__data__.has(e)}function Dt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ese="[object AsyncFunction]",tse="[object Function]",nse="[object GeneratorFunction]",rse="[object Proxy]";function Zp(e){if(!Dt(e))return!1;var t=Vi(e);return t==tse||t==nse||t==ese||t==rse}var jb=ri["__core-js_shared__"],VR=function(){var e=/[^.]+$/.exec(jb&&jb.keys&&jb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ise(e){return!!VR&&VR in e}var ase=Function.prototype,sse=ase.toString;function Ms(e){if(e!=null){try{return sse.call(e)}catch{}try{return e+""}catch{}}return""}var ose=/[\\^$.*+?()[\]{}|]/g,lse=/^\[object .+?Constructor\]$/,use=Function.prototype,cse=Object.prototype,fse=use.toString,dse=cse.hasOwnProperty,hse=RegExp("^"+fse.call(dse).replace(ose,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pse(e){if(!Dt(e)||ise(e))return!1;var t=Zp(e)?hse:lse;return t.test(Ms(e))}function mse(e,t){return e?.[t]}function $s(e,t){var n=mse(e,t);return pse(n)?n:void 0}var mc=$s(ri,"Map"),gc=$s(Object,"create");function gse(){this.__data__=gc?gc(null):{},this.size=0}function yse(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var bse="__lodash_hash_undefined__",vse=Object.prototype,_se=vse.hasOwnProperty;function xse(e){var t=this.__data__;if(gc){var n=t[e];return n===bse?void 0:n}return _se.call(t,e)?t[e]:void 0}var wse=Object.prototype,Sse=wse.hasOwnProperty;function Ese(e){var t=this.__data__;return gc?t[e]!==void 0:Sse.call(t,e)}var kse="__lodash_hash_undefined__";function Cse(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gc&&t===void 0?kse:t,this}function Ns(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ns.prototype.clear=gse;Ns.prototype.delete=yse;Ns.prototype.get=xse;Ns.prototype.has=Ese;Ns.prototype.set=Cse;function Ase(){this.size=0,this.__data__={hash:new Ns,map:new(mc||Gi),string:new Ns}}function Tse(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Yp(e,t){var n=e.__data__;return Tse(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Nse(e){var t=Yp(this,e).delete(e);return this.size-=t?1:0,t}function Ose(e){return Yp(this,e).get(e)}function Rse(e){return Yp(this,e).has(e)}function jse(e,t){var n=Yp(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Zi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zi.prototype.clear=Ase;Zi.prototype.delete=Nse;Zi.prototype.get=Ose;Zi.prototype.has=Rse;Zi.prototype.set=jse;var Mse=200;function $se(e,t){var n=this.__data__;if(n instanceof Gi){var r=n.__data__;if(!mc||r.length<Mse-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Zi(r)}return n.set(e,t),this.size=n.size,this}function Ir(e){var t=this.__data__=new Gi(e);this.size=t.size}Ir.prototype.clear=Xae;Ir.prototype.delete=Wae;Ir.prototype.get=Qae;Ir.prototype.has=Jae;Ir.prototype.set=$se;var Dse="__lodash_hash_undefined__";function Ise(e){return this.__data__.set(e,Dse),this}function Pse(e){return this.__data__.has(e)}function sl(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Zi;++t<n;)this.add(e[t])}sl.prototype.add=sl.prototype.push=Ise;sl.prototype.has=Pse;function zse(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function KS(e,t){return e.has(t)}var Lse=1,qse=2;function d8(e,t,n,r,i,a){var o=n&Lse,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var p=-1,m=!0,g=n&qse?new sl:void 0;for(a.set(e,t),a.set(t,e);++p<l;){var _=e[p],S=t[p];if(r)var b=o?r(S,_,p,t,e,a):r(_,S,p,e,t,a);if(b!==void 0){if(b)continue;m=!1;break}if(g){if(!zse(t,function(x,w){if(!KS(g,w)&&(_===x||i(_,x,n,r,a)))return g.push(w)})){m=!1;break}}else if(!(_===S||i(_,S,n,r,a))){m=!1;break}}return a.delete(e),a.delete(t),m}var gp=ri.Uint8Array;function Fse(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function XS(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Bse=1,Use=2,Hse="[object Boolean]",Vse="[object Date]",Gse="[object Error]",Zse="[object Map]",Yse="[object Number]",Kse="[object RegExp]",Xse="[object Set]",Wse="[object String]",Qse="[object Symbol]",Jse="[object ArrayBuffer]",eoe="[object DataView]",GR=vr?vr.prototype:void 0,Mb=GR?GR.valueOf:void 0;function toe(e,t,n,r,i,a,o){switch(n){case eoe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Jse:return!(e.byteLength!=t.byteLength||!a(new gp(e),new gp(t)));case Hse:case Vse:case Yse:return Dc(+e,+t);case Gse:return e.name==t.name&&e.message==t.message;case Kse:case Wse:return e==t+"";case Zse:var l=Fse;case Xse:var c=r&Bse;if(l||(l=XS),e.size!=t.size&&!c)return!1;var f=o.get(e);if(f)return f==t;r|=Use,o.set(e,t);var d=d8(l(e),l(t),r,i,a,o);return o.delete(e),d;case Qse:if(Mb)return Mb.call(e)==Mb.call(t)}return!1}function WS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var on=Array.isArray;function h8(e,t,n){var r=t(e);return on(e)?r:WS(r,n(e))}function noe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function p8(){return[]}var roe=Object.prototype,ioe=roe.propertyIsEnumerable,ZR=Object.getOwnPropertySymbols,QS=ZR?function(e){return e==null?[]:(e=Object(e),noe(ZR(e),function(t){return ioe.call(e,t)}))}:p8;function m8(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var aoe="[object Arguments]";function YR(e){return _r(e)&&Vi(e)==aoe}var g8=Object.prototype,soe=g8.hasOwnProperty,ooe=g8.propertyIsEnumerable,ol=YR(function(){return arguments}())?YR:function(e){return _r(e)&&soe.call(e,"callee")&&!ooe.call(e,"callee")};function loe(){return!1}var y8=typeof rr=="object"&&rr&&!rr.nodeType&&rr,KR=y8&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,uoe=KR&&KR.exports===y8,XR=uoe?ri.Buffer:void 0,coe=XR?XR.isBuffer:void 0,Os=coe||loe,foe=9007199254740991,doe=/^(?:0|[1-9]\d*)$/;function Kp(e,t){var n=typeof e;return t=t??foe,!!t&&(n=="number"||n!="symbol"&&doe.test(e))&&e>-1&&e%1==0&&e<t}var hoe=9007199254740991;function JS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hoe}var poe="[object Arguments]",moe="[object Array]",goe="[object Boolean]",yoe="[object Date]",boe="[object Error]",voe="[object Function]",_oe="[object Map]",xoe="[object Number]",woe="[object Object]",Soe="[object RegExp]",Eoe="[object Set]",koe="[object String]",Coe="[object WeakMap]",Aoe="[object ArrayBuffer]",Toe="[object DataView]",Noe="[object Float32Array]",Ooe="[object Float64Array]",Roe="[object Int8Array]",joe="[object Int16Array]",Moe="[object Int32Array]",$oe="[object Uint8Array]",Doe="[object Uint8ClampedArray]",Ioe="[object Uint16Array]",Poe="[object Uint32Array]",zt={};zt[Noe]=zt[Ooe]=zt[Roe]=zt[joe]=zt[Moe]=zt[$oe]=zt[Doe]=zt[Ioe]=zt[Poe]=!0;zt[poe]=zt[moe]=zt[Aoe]=zt[goe]=zt[Toe]=zt[yoe]=zt[boe]=zt[voe]=zt[_oe]=zt[xoe]=zt[woe]=zt[Soe]=zt[Eoe]=zt[koe]=zt[Coe]=!1;function zoe(e){return _r(e)&&JS(e.length)&&!!zt[Vi(e)]}function eE(e){return function(t){return e(t)}}var b8=typeof rr=="object"&&rr&&!rr.nodeType&&rr,Xu=b8&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,Loe=Xu&&Xu.exports===b8,$b=Loe&&l8.process,ll=function(){try{var e=Xu&&Xu.require&&Xu.require("util").types;return e||$b&&$b.binding&&$b.binding("util")}catch{}}(),WR=ll&&ll.isTypedArray,Ic=WR?eE(WR):zoe,qoe=Object.prototype,Foe=qoe.hasOwnProperty;function v8(e,t){var n=on(e),r=!n&&ol(e),i=!n&&!r&&Os(e),a=!n&&!r&&!i&&Ic(e),o=n||r||i||a,l=o?m8(e.length,String):[],c=l.length;for(var f in e)(t||Foe.call(e,f))&&!(o&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Kp(f,c)))&&l.push(f);return l}var Boe=Object.prototype;function Xp(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Boe;return e===n}var Uoe=c8(Object.keys,Object),Hoe=Object.prototype,Voe=Hoe.hasOwnProperty;function _8(e){if(!Xp(e))return Uoe(e);var t=[];for(var n in Object(e))Voe.call(e,n)&&n!="constructor"&&t.push(n);return t}function yl(e){return e!=null&&JS(e.length)&&!Zp(e)}function Yr(e){return yl(e)?v8(e):_8(e)}function Ww(e){return h8(e,Yr,QS)}var Goe=1,Zoe=Object.prototype,Yoe=Zoe.hasOwnProperty;function Koe(e,t,n,r,i,a){var o=n&Goe,l=Ww(e),c=l.length,f=Ww(t),d=f.length;if(c!=d&&!o)return!1;for(var p=c;p--;){var m=l[p];if(!(o?m in t:Yoe.call(t,m)))return!1}var g=a.get(e),_=a.get(t);if(g&&_)return g==t&&_==e;var S=!0;a.set(e,t),a.set(t,e);for(var b=o;++p<c;){m=l[p];var x=e[m],w=t[m];if(r)var v=o?r(w,x,m,t,e,a):r(x,w,m,e,t,a);if(!(v===void 0?x===w||i(x,w,n,r,a):v)){S=!1;break}b||(b=m=="constructor")}if(S&&!b){var k=e.constructor,C=t.constructor;k!=C&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof C=="function"&&C instanceof C)&&(S=!1)}return a.delete(e),a.delete(t),S}var Qw=$s(ri,"DataView"),Jw=$s(ri,"Promise"),Go=$s(ri,"Set"),eS=$s(ri,"WeakMap"),QR="[object Map]",Xoe="[object Object]",JR="[object Promise]",ej="[object Set]",tj="[object WeakMap]",nj="[object DataView]",Woe=Ms(Qw),Qoe=Ms(mc),Joe=Ms(Jw),ele=Ms(Go),tle=Ms(eS),br=Vi;(Qw&&br(new Qw(new ArrayBuffer(1)))!=nj||mc&&br(new mc)!=QR||Jw&&br(Jw.resolve())!=JR||Go&&br(new Go)!=ej||eS&&br(new eS)!=tj)&&(br=function(e){var t=Vi(e),n=t==Xoe?e.constructor:void 0,r=n?Ms(n):"";if(r)switch(r){case Woe:return nj;case Qoe:return QR;case Joe:return JR;case ele:return ej;case tle:return tj}return t});var nle=1,rj="[object Arguments]",ij="[object Array]",Pd="[object Object]",rle=Object.prototype,aj=rle.hasOwnProperty;function ile(e,t,n,r,i,a){var o=on(e),l=on(t),c=o?ij:br(e),f=l?ij:br(t);c=c==rj?Pd:c,f=f==rj?Pd:f;var d=c==Pd,p=f==Pd,m=c==f;if(m&&Os(e)){if(!Os(t))return!1;o=!0,d=!1}if(m&&!d)return a||(a=new Ir),o||Ic(e)?d8(e,t,n,r,i,a):toe(e,t,c,n,r,i,a);if(!(n&nle)){var g=d&&aj.call(e,"__wrapped__"),_=p&&aj.call(t,"__wrapped__");if(g||_){var S=g?e.value():e,b=_?t.value():t;return a||(a=new Ir),i(S,b,n,r,a)}}return m?(a||(a=new Ir),Koe(e,t,n,r,i,a)):!1}function Wp(e,t,n,r,i){return e===t?!0:e==null||t==null||!_r(e)&&!_r(t)?e!==e&&t!==t:ile(e,t,n,r,Wp,i)}function ale(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?Wp(e,t,void 0,n):!!r}function Lt(e,t){return ale(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}var sle="[object Symbol]";function Pc(e){return typeof e=="symbol"||_r(e)&&Vi(e)==sle}var ole=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lle=/^\w*$/;function tE(e,t){if(on(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Pc(e)?!0:lle.test(e)||!ole.test(e)||t!=null&&e in Object(t)}var ule="Expected a function";function nE(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ule);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(nE.Cache||Zi),n}nE.Cache=Zi;var cle=500;function fle(e){var t=nE(e,function(r){return n.size===cle&&n.clear(),r}),n=t.cache;return t}var dle=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hle=/\\(\\)?/g,x8=fle(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dle,function(n,r,i,a){t.push(i?a.replace(hle,"$1"):r||n)}),t});function Qp(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var sj=vr?vr.prototype:void 0,oj=sj?sj.toString:void 0;function w8(e){if(typeof e=="string")return e;if(on(e))return Qp(e,w8)+"";if(Pc(e))return oj?oj.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function rE(e){return e==null?"":w8(e)}function bl(e,t){return on(e)?e:tE(e,t)?[e]:x8(rE(e))}function Ds(e){if(typeof e=="string"||Pc(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Jp(e,t){t=bl(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Ds(t[n++])];return n&&n==r?e:void 0}function Re(e,t,n){var r=e==null?void 0:Jp(e,t);return r===void 0?n:r}var ple="[object Map]",mle="[object Set]",gle=Object.prototype,yle=gle.hasOwnProperty;function ul(e){if(e==null)return!0;if(yl(e)&&(on(e)||typeof e=="string"||typeof e.splice=="function"||Os(e)||Ic(e)||ol(e)))return!e.length;var t=br(e);if(t==ple||t==mle)return!e.size;if(Xp(e))return!_8(e).length;for(var n in e)if(yle.call(e,n))return!1;return!0}var Nu={},lj;function ble(){if(lj)return Nu;lj=1;var e=/~/,t=/~[01]/g;function n(f){switch(f){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+f)}function r(f){return e.test(f)?f.replace(t,n):f}function i(f,d,p){for(var m,g,_=1,S=d.length;_<S;){if(d[_]==="constructor"||d[_]==="prototype"||d[_]==="__proto__")return f;if(m=r(d[_++]),g=S>_,typeof f[m]>"u"&&(Array.isArray(f)&&m==="-"&&(m=f.length),g&&(d[_]!==""&&d[_]<1/0||d[_]==="-"?f[m]=[]:f[m]={})),!g)break;f=f[m]}var b=f[m];return p===void 0?delete f[m]:f[m]=p,b}function a(f){if(typeof f=="string"){if(f=f.split("/"),f[0]==="")return f;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(f)){for(const d of f)if(typeof d!="string"&&typeof d!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return f}throw new Error("Invalid JSON pointer.")}function o(f,d){if(typeof f!="object")throw new Error("Invalid input object.");d=a(d);var p=d.length;if(p===1)return f;for(var m=1;m<p;){if(f=f[r(d[m++])],p===m)return f;if(typeof f!="object"||f===null)return}}function l(f,d,p){if(typeof f!="object")throw new Error("Invalid input object.");if(d=a(d),d.length===0)throw new Error("Invalid JSON pointer for set.");return i(f,d,p)}function c(f){var d=a(f);return{get:function(p){return o(p,d)},set:function(p,m){return l(p,d,m)}}}return Nu.get=o,Nu.set=l,Nu.compile=c,Nu}var vle=ble();const _le=qn(vle);function iE(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var yp=function(){try{var e=$s(Object,"defineProperty");return e({},"",{}),e}catch{}}();function aE(e,t,n){t=="__proto__"&&yp?yp(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var xle=Object.prototype,wle=xle.hasOwnProperty;function sE(e,t,n){var r=e[t];(!(wle.call(e,t)&&Dc(r,n))||n===void 0&&!(t in e))&&aE(e,t,n)}function vl(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var l=t[a],c=void 0;c===void 0&&(c=e[l]),i?aE(n,l,c):sE(n,l,c)}return n}function Sle(e,t){return e&&vl(t,Yr(t),e)}function Ele(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var kle=Object.prototype,Cle=kle.hasOwnProperty;function Ale(e){if(!Dt(e))return Ele(e);var t=Xp(e),n=[];for(var r in e)r=="constructor"&&(t||!Cle.call(e,r))||n.push(r);return n}function zc(e){return yl(e)?v8(e,!0):Ale(e)}function Tle(e,t){return e&&vl(t,zc(t),e)}var S8=typeof rr=="object"&&rr&&!rr.nodeType&&rr,uj=S8&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,Nle=uj&&uj.exports===S8,cj=Nle?ri.Buffer:void 0,fj=cj?cj.allocUnsafe:void 0;function E8(e,t){if(t)return e.slice();var n=e.length,r=fj?fj(n):new e.constructor(n);return e.copy(r),r}function oE(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Ole(e,t){return vl(e,QS(e),t)}var Rle=Object.getOwnPropertySymbols,k8=Rle?function(e){for(var t=[];e;)WS(t,QS(e)),e=Vp(e);return t}:p8;function jle(e,t){return vl(e,k8(e),t)}function lE(e){return h8(e,zc,k8)}var Mle=Object.prototype,$le=Mle.hasOwnProperty;function Dle(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&$le.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function uE(e){var t=new e.constructor(e.byteLength);return new gp(t).set(new gp(e)),t}function Ile(e,t){var n=t?uE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Ple=/\w*$/;function zle(e){var t=new e.constructor(e.source,Ple.exec(e));return t.lastIndex=e.lastIndex,t}var dj=vr?vr.prototype:void 0,hj=dj?dj.valueOf:void 0;function Lle(e){return hj?Object(hj.call(e)):{}}function C8(e,t){var n=t?uE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var qle="[object Boolean]",Fle="[object Date]",Ble="[object Map]",Ule="[object Number]",Hle="[object RegExp]",Vle="[object Set]",Gle="[object String]",Zle="[object Symbol]",Yle="[object ArrayBuffer]",Kle="[object DataView]",Xle="[object Float32Array]",Wle="[object Float64Array]",Qle="[object Int8Array]",Jle="[object Int16Array]",eue="[object Int32Array]",tue="[object Uint8Array]",nue="[object Uint8ClampedArray]",rue="[object Uint16Array]",iue="[object Uint32Array]";function aue(e,t,n){var r=e.constructor;switch(t){case Yle:return uE(e);case qle:case Fle:return new r(+e);case Kle:return Ile(e,n);case Xle:case Wle:case Qle:case Jle:case eue:case tue:case nue:case rue:case iue:return C8(e,n);case Ble:return new r;case Ule:case Gle:return new r(e);case Hle:return zle(e);case Vle:return new r;case Zle:return Lle(e)}}var pj=Object.create,A8=function(){function e(){}return function(t){if(!Dt(t))return{};if(pj)return pj(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function T8(e){return typeof e.constructor=="function"&&!Xp(e)?A8(Vp(e)):{}}var sue="[object Map]";function oue(e){return _r(e)&&br(e)==sue}var mj=ll&&ll.isMap,lue=mj?eE(mj):oue,uue="[object Set]";function cue(e){return _r(e)&&br(e)==uue}var gj=ll&&ll.isSet,fue=gj?eE(gj):cue,due=1,hue=2,pue=4,N8="[object Arguments]",mue="[object Array]",gue="[object Boolean]",yue="[object Date]",bue="[object Error]",O8="[object Function]",vue="[object GeneratorFunction]",_ue="[object Map]",xue="[object Number]",R8="[object Object]",wue="[object RegExp]",Sue="[object Set]",Eue="[object String]",kue="[object Symbol]",Cue="[object WeakMap]",Aue="[object ArrayBuffer]",Tue="[object DataView]",Nue="[object Float32Array]",Oue="[object Float64Array]",Rue="[object Int8Array]",jue="[object Int16Array]",Mue="[object Int32Array]",$ue="[object Uint8Array]",Due="[object Uint8ClampedArray]",Iue="[object Uint16Array]",Pue="[object Uint32Array]",Mt={};Mt[N8]=Mt[mue]=Mt[Aue]=Mt[Tue]=Mt[gue]=Mt[yue]=Mt[Nue]=Mt[Oue]=Mt[Rue]=Mt[jue]=Mt[Mue]=Mt[_ue]=Mt[xue]=Mt[R8]=Mt[wue]=Mt[Sue]=Mt[Eue]=Mt[kue]=Mt[$ue]=Mt[Due]=Mt[Iue]=Mt[Pue]=!0;Mt[bue]=Mt[O8]=Mt[Cue]=!1;function Wu(e,t,n,r,i,a){var o,l=t&due,c=t&hue,f=t&pue;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!Dt(e))return e;var d=on(e);if(d){if(o=Dle(e),!l)return oE(e,o)}else{var p=br(e),m=p==O8||p==vue;if(Os(e))return E8(e,l);if(p==R8||p==N8||m&&!i){if(o=c||m?{}:T8(e),!l)return c?jle(e,Tle(o,e)):Ole(e,Sle(o,e))}else{if(!Mt[p])return i?e:{};o=aue(e,p,l)}}a||(a=new Ir);var g=a.get(e);if(g)return g;a.set(e,o),fue(e)?e.forEach(function(b){o.add(Wu(b,t,n,b,e,a))}):lue(e)&&e.forEach(function(b,x){o.set(x,Wu(b,t,n,x,e,a))});var _=f?c?lE:Ww:c?zc:Yr,S=d?void 0:_(e);return iE(S||e,function(b,x){S&&(x=b,b=e[x]),sE(o,x,Wu(b,t,n,x,e,a))}),o}function zue(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Lue(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function que(e,t){return t.length<2?e:Jp(e,Lue(t,0,-1))}function j8(e,t){return t=bl(t,e),e=que(e,t),e==null||delete e[Ds(zue(t))]}function Fue(e){return Ts(e)?void 0:e}var yj=vr?vr.isConcatSpreadable:void 0;function Bue(e){return on(e)||ol(e)||!!(yj&&e&&e[yj])}function Lc(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=Bue),i||(i=[]);++a<o;){var l=e[a];t>0&&n(l)?t>1?Lc(l,t-1,n,r,i):WS(i,l):r||(i[i.length]=l)}return i}function Uue(e){var t=e==null?0:e.length;return t?Lc(e,1):[]}function Hue(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var bj=Math.max;function M8(e,t,n){return t=bj(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=bj(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=r[i];return l[t]=n(o),Hue(e,this,l)}}function Vue(e){return function(){return e}}function em(e){return e}var Gue=yp?function(e,t){return yp(e,"toString",{configurable:!0,enumerable:!1,value:Vue(t),writable:!0})}:em,Zue=800,Yue=16,Kue=Date.now;function Xue(e){var t=0,n=0;return function(){var r=Kue(),i=Yue-(r-n);if(n=r,i>0){if(++t>=Zue)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var $8=Xue(Gue);function D8(e){return $8(M8(e,void 0,Uue),e+"")}var Wue=1,Que=2,Jue=4,bp=D8(function(e,t){var n={};if(e==null)return n;var r=!1;t=Qp(t,function(a){return a=bl(a,e),r||(r=a.length>1),a}),vl(e,lE(e),n),r&&(n=Wu(n,Wue|Que|Jue,Fue));for(var i=t.length;i--;)j8(n,t[i]);return n});function cE(e,t){const n=t[e];return[bp(t,[e]),n]}function I8(e,t={},n=[]){const r=e||"";let i;if(r.startsWith("#"))i=decodeURIComponent(r.substring(1));else throw new Error(`Could not find a definition for ${e}.`);const a=_le.get(t,i);if(a===void 0)throw new Error(`Could not find a definition for ${e}.`);const o=a[sn];if(o){if(n.includes(o)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[d,...p]=n,m=[...p,r,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${m}`)}const[l,c]=cE(sn,a),f=I8(c,t,[...n,r]);return Object.keys(l).length>0?{...l,...f}:f}return a}function P8(e,t={}){return I8(e,t,[])}var ece=Object.prototype,tce=ece.hasOwnProperty;function nce(e,t){return e!=null&&tce.call(e,t)}function z8(e,t,n){t=bl(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Ds(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&JS(i)&&Kp(o,i)&&(on(e)||ol(e)))}function Tn(e,t){return e!=null&&z8(e,t,nce)}var rce="[object Number]";function L8(e){return typeof e=="number"||_r(e)&&Vi(e)==rce}var ice="[object String]";function tm(e){return typeof e=="string"||!on(e)&&_r(e)&&Vi(e)==ice}function ace(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function sce(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),l=o.length;l--;){var c=o[++i];if(n(a[c],c,a)===!1)break}return t}}var q8=sce();function F8(e,t){return e&&q8(e,t,Yr)}function oce(e,t){return function(n,r){if(n==null)return n;if(!yl(n))return e(n,r);for(var i=n.length,a=-1,o=Object(n);++a<i&&r(o[a],a,o)!==!1;);return n}}var B8=oce(F8),lce=1,uce=2;function cce(e,t,n,r){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var o=n[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){o=n[i];var l=o[0],c=e[l],f=o[1];if(o[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Ir,p;if(!(p===void 0?Wp(f,c,lce|uce,r,d):p))return!1}}return!0}function U8(e){return e===e&&!Dt(e)}function fce(e){for(var t=Yr(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,U8(i)]}return t}function H8(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function dce(e){var t=fce(e);return t.length==1&&t[0][2]?H8(t[0][0],t[0][1]):function(n){return n===e||cce(n,e,t)}}function hce(e,t){return e!=null&&t in Object(e)}function V8(e,t){return e!=null&&z8(e,t,hce)}var pce=1,mce=2;function gce(e,t){return tE(e)&&U8(t)?H8(Ds(e),t):function(n){var r=Re(n,e);return r===void 0&&r===t?V8(n,e):Wp(t,r,pce|mce)}}function yce(e){return function(t){return t?.[e]}}function bce(e){return function(t){return Jp(t,e)}}function vce(e){return tE(e)?yce(Ds(e)):bce(e)}function fE(e){return typeof e=="function"?e:e==null?em:typeof e=="object"?on(e)?gce(e[0],e[1]):dce(e):vce(e)}function _ce(e,t,n,r,i){return i(e,function(a,o,l){n=r?(r=!1,a):t(n,a,o,l)}),n}function xce(e,t,n){var r=on(e)?ace:_ce,i=arguments.length<3;return r(e,fE(t),n,i,B8)}function G8(e){return typeof e=="function"?e:em}var wce=/\s/;function Sce(e){for(var t=e.length;t--&&wce.test(e.charAt(t)););return t}var Ece=/^\s+/;function kce(e){return e&&e.slice(0,Sce(e)+1).replace(Ece,"")}var vj=NaN,Cce=/^[-+]0x[0-9a-f]+$/i,Ace=/^0b[01]+$/i,Tce=/^0o[0-7]+$/i,Nce=parseInt;function Oce(e){if(typeof e=="number")return e;if(Pc(e))return vj;if(Dt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=kce(e);var n=Ace.test(e);return n||Tce.test(e)?Nce(e.slice(2),n?2:8):Cce.test(e)?vj:+e}var _j=1/0,Rce=17976931348623157e292;function jce(e){if(!e)return e===0?e:0;if(e=Oce(e),e===_j||e===-_j){var t=e<0?-1:1;return t*Rce}return e===e?e:0}function Mce(e){var t=jce(e),n=t%1;return t===t?n?t-n:t:0}var $ce=9007199254740991,Db=4294967295,Dce=Math.min;function Z8(e,t){if(e=Mce(e),e<1||e>$ce)return[];var n=Db,r=Dce(e,Db);t=G8(t),e-=Db;for(var i=m8(r,t);++n<e;)t(n);return i}function Y8(e,t,n){var r;if(e&&n){const i=Re(e,n);if(i===void 0)return;for(let a=0;a<t.length;a++){const o=t[a],l=Re(o,[Ht,n],{});if(!(l.type==="object"||l.type==="array")&&(l.const===i||!((r=l.enum)===null||r===void 0)&&r.includes(i)))return a}}}function K8(e,t,n,r,i){if(t===void 0)return 0;const a=Y8(t,n,i);if(L8(a))return a;for(let o=0;o<n.length;o++){const l=n[o];if(i&&Tn(l,[Ht,i])){const c=Re(t,i),f=Re(l,[Ht,i],{});if(e.isValid(f,c,r))return o}else if(l[Ht]){const c={anyOf:Object.keys(l[Ht]).map(d=>({required:[d]}))};let f;if(l.anyOf){const{...d}=l;d.allOf?d.allOf=d.allOf.slice():d.allOf=[],d.allOf.push(c),f=d}else f=Object.assign({},l,c);if(delete f.required,e.isValid(f,t,r))return o}else if(e.isValid(l,t,r))return o}return 0}function dE(e,t,n,r,i){return K8(e,t,n,r,i)}function hE(e,t,n,r){if(!Dt(e))return e;t=bl(t,e);for(var i=-1,a=t.length,o=a-1,l=e;l!=null&&++i<a;){var c=Ds(t[i]),f=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var d=l[c];f=r?r(d,c,l):void 0,f===void 0&&(f=Dt(d)?d:Kp(t[i+1])?[]:{})}sE(l,c,f),l=l[c]}return e}function gn(e,t,n){return e==null?e:hE(e,t,n)}function Ice(e,t,n){var r=on(e),i=r||Os(e)||Ic(e);if(t=fE(t),n==null){var a=e&&e.constructor;i?n=r?new a:[]:Dt(e)?n=Zp(a)?A8(Vp(e)):{}:n={}}return(i?iE:F8)(e,function(o,l,c){return t(n,o,l,c)}),n}function tS(e,t,n){(n!==void 0&&!Dc(e[t],n)||n===void 0&&!(t in e))&&aE(e,t,n)}function vp(e){return _r(e)&&yl(e)}function nS(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Pce(e){return vl(e,zc(e))}function zce(e,t,n,r,i,a,o){var l=nS(e,n),c=nS(t,n),f=o.get(c);if(f){tS(e,n,f);return}var d=a?a(l,c,n+"",e,t,o):void 0,p=d===void 0;if(p){var m=on(c),g=!m&&Os(c),_=!m&&!g&&Ic(c);d=c,m||g||_?on(l)?d=l:vp(l)?d=oE(l):g?(p=!1,d=E8(c,!0)):_?(p=!1,d=C8(c,!0)):d=[]:Ts(c)||ol(c)?(d=l,ol(l)?d=Pce(l):(!Dt(l)||Zp(l))&&(d=T8(c))):p=!1}p&&(o.set(c,d),i(d,c,r,a,o),o.delete(c)),tS(e,n,d)}function X8(e,t,n,r,i){e!==t&&q8(t,function(a,o){if(i||(i=new Ir),Dt(a))zce(e,t,o,n,X8,r,i);else{var l=r?r(nS(e,o),a,o+"",e,t,i):void 0;l===void 0&&(l=a),tS(e,o,l)}},zc)}function pE(e,t){return $8(M8(e,t,em),e+"")}function Lce(e,t,n){if(!Dt(n))return!1;var r=typeof t;return(r=="number"?yl(n)&&Kp(t,n.length):r=="string"&&t in n)?Dc(n[t],e):!1}function qce(e){return pE(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&Lce(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var l=n[r];l&&e(t,l,r,a)}return t})}var Fce=qce(function(e,t,n){X8(e,t,n)}),Bce=1/0;function Uce(e){var t=e==null?0:e.length;return t?Lc(e,Bce):[]}function Hce(e,t,n,r){for(var i=e.length,a=n+-1;++a<i;)if(t(e[a],a,e))return a;return-1}function Vce(e){return e!==e}function Gce(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Zce(e,t,n){return t===t?Gce(e,t,n):Hce(e,Vce,n)}function W8(e,t){var n=e==null?0:e.length;return!!n&&Zce(e,t,0)>-1}function Yce(){}var Kce=1/0,Xce=Go&&1/XS(new Go([,-0]))[1]==Kce?function(e){return new Go(e)}:Yce,Wce=200;function Q8(e,t,n){var r=-1,i=W8,a=e.length,o=!0,l=[],c=l;if(a>=Wce){var f=Xce(e);if(f)return XS(f);o=!1,i=KS,c=new sl}else c=l;e:for(;++r<a;){var d=e[r],p=d;if(d=d!==0?d:0,o&&p===p){for(var m=c.length;m--;)if(c[m]===p)continue e;l.push(d)}else i(c,p,n)||(c!==l&&c.push(p),l.push(d))}return l}function Qce(e){return e&&e.length?Q8(e):[]}var Ib,xj;function Jce(){if(xj)return Ib;xj=1;function e(){this.__data__=[],this.size=0}return Ib=e,Ib}var Pb,wj;function _l(){if(wj)return Pb;wj=1;function e(t,n){return t===n||t!==t&&n!==n}return Pb=e,Pb}var zb,Sj;function nm(){if(Sj)return zb;Sj=1;var e=_l();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return zb=t,zb}var Lb,Ej;function efe(){if(Ej)return Lb;Ej=1;var e=nm(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var l=a.length-1;return o==l?a.pop():n.call(a,o,1),--this.size,!0}return Lb=r,Lb}var qb,kj;function tfe(){if(kj)return qb;kj=1;var e=nm();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return qb=t,qb}var Fb,Cj;function nfe(){if(Cj)return Fb;Cj=1;var e=nm();function t(n){return e(this.__data__,n)>-1}return Fb=t,Fb}var Bb,Aj;function rfe(){if(Aj)return Bb;Aj=1;var e=nm();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return Bb=t,Bb}var Ub,Tj;function rm(){if(Tj)return Ub;Tj=1;var e=Jce(),t=efe(),n=tfe(),r=nfe(),i=rfe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Ub=a,Ub}var Hb,Nj;function ife(){if(Nj)return Hb;Nj=1;var e=rm();function t(){this.__data__=new e,this.size=0}return Hb=t,Hb}var Vb,Oj;function afe(){if(Oj)return Vb;Oj=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Vb=e,Vb}var Gb,Rj;function sfe(){if(Rj)return Gb;Rj=1;function e(t){return this.__data__.get(t)}return Gb=e,Gb}var Zb,jj;function ofe(){if(jj)return Zb;jj=1;function e(t){return this.__data__.has(t)}return Zb=e,Zb}var Yb,Mj;function J8(){if(Mj)return Yb;Mj=1;var e=typeof pd=="object"&&pd&&pd.Object===Object&&pd;return Yb=e,Yb}var Kb,$j;function ii(){if($j)return Kb;$j=1;var e=J8(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Kb=n,Kb}var Xb,Dj;function xl(){if(Dj)return Xb;Dj=1;var e=ii(),t=e.Symbol;return Xb=t,Xb}var Wb,Ij;function lfe(){if(Ij)return Wb;Ij=1;var e=xl(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var l=n.call(o,i),c=o[i];try{o[i]=void 0;var f=!0}catch{}var d=r.call(o);return f&&(l?o[i]=c:delete o[i]),d}return Wb=a,Wb}var Qb,Pj;function ufe(){if(Pj)return Qb;Pj=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Qb=n,Qb}var Jb,zj;function Is(){if(zj)return Jb;zj=1;var e=xl(),t=lfe(),n=ufe(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:r:a&&a in Object(l)?t(l):n(l)}return Jb=o,Jb}var ev,Lj;function ai(){if(Lj)return ev;Lj=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return ev=e,ev}var tv,qj;function mE(){if(qj)return tv;qj=1;var e=Is(),t=ai(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==r||c==i||c==n||c==a}return tv=o,tv}var nv,Fj;function cfe(){if(Fj)return nv;Fj=1;var e=ii(),t=e["__core-js_shared__"];return nv=t,nv}var rv,Bj;function ffe(){if(Bj)return rv;Bj=1;var e=cfe(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return rv=n,rv}var iv,Uj;function eP(){if(Uj)return iv;Uj=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return iv=n,iv}var av,Hj;function dfe(){if(Hj)return av;Hj=1;var e=mE(),t=ffe(),n=ai(),r=eP(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,f=l.hasOwnProperty,d=RegExp("^"+c.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(m){if(!n(m)||t(m))return!1;var g=e(m)?d:a;return g.test(r(m))}return av=p,av}var sv,Vj;function hfe(){if(Vj)return sv;Vj=1;function e(t,n){return t?.[n]}return sv=e,sv}var ov,Gj;function Ps(){if(Gj)return ov;Gj=1;var e=dfe(),t=hfe();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return ov=n,ov}var lv,Zj;function gE(){if(Zj)return lv;Zj=1;var e=Ps(),t=ii(),n=e(t,"Map");return lv=n,lv}var uv,Yj;function im(){if(Yj)return uv;Yj=1;var e=Ps(),t=e(Object,"create");return uv=t,uv}var cv,Kj;function pfe(){if(Kj)return cv;Kj=1;var e=im();function t(){this.__data__=e?e(null):{},this.size=0}return cv=t,cv}var fv,Xj;function mfe(){if(Xj)return fv;Xj=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return fv=e,fv}var dv,Wj;function gfe(){if(Wj)return dv;Wj=1;var e=im(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var l=o[a];return l===t?void 0:l}return r.call(o,a)?o[a]:void 0}return dv=i,dv}var hv,Qj;function yfe(){if(Qj)return hv;Qj=1;var e=im(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return hv=r,hv}var pv,Jj;function bfe(){if(Jj)return pv;Jj=1;var e=im(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return pv=n,pv}var mv,eM;function vfe(){if(eM)return mv;eM=1;var e=pfe(),t=mfe(),n=gfe(),r=yfe(),i=bfe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,mv=a,mv}var gv,tM;function _fe(){if(tM)return gv;tM=1;var e=vfe(),t=rm(),n=gE();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return gv=r,gv}var yv,nM;function xfe(){if(nM)return yv;nM=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return yv=e,yv}var bv,rM;function am(){if(rM)return bv;rM=1;var e=xfe();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return bv=t,bv}var vv,iM;function wfe(){if(iM)return vv;iM=1;var e=am();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return vv=t,vv}var _v,aM;function Sfe(){if(aM)return _v;aM=1;var e=am();function t(n){return e(this,n).get(n)}return _v=t,_v}var xv,sM;function Efe(){if(sM)return xv;sM=1;var e=am();function t(n){return e(this,n).has(n)}return xv=t,xv}var wv,oM;function kfe(){if(oM)return wv;oM=1;var e=am();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return wv=t,wv}var Sv,lM;function yE(){if(lM)return Sv;lM=1;var e=_fe(),t=wfe(),n=Sfe(),r=Efe(),i=kfe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Sv=a,Sv}var Ev,uM;function Cfe(){if(uM)return Ev;uM=1;var e=rm(),t=gE(),n=yE(),r=200;function i(a,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<r-1)return c.push([a,o]),this.size=++l.size,this;l=this.__data__=new n(c)}return l.set(a,o),this.size=l.size,this}return Ev=i,Ev}var kv,cM;function sm(){if(cM)return kv;cM=1;var e=rm(),t=ife(),n=afe(),r=sfe(),i=ofe(),a=Cfe();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,kv=o,kv}var Cv,fM;function tP(){if(fM)return Cv;fM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return Cv=e,Cv}var Av,dM;function nP(){if(dM)return Av;dM=1;var e=Ps(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return Av=t,Av}var Tv,hM;function bE(){if(hM)return Tv;hM=1;var e=nP();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return Tv=t,Tv}var Nv,pM;function rP(){if(pM)return Nv;pM=1;var e=bE(),t=_l(),n=Object.prototype,r=n.hasOwnProperty;function i(a,o,l){var c=a[o];(!(r.call(a,o)&&t(c,l))||l===void 0&&!(o in a))&&e(a,o,l)}return Nv=i,Nv}var Ov,mM;function qc(){if(mM)return Ov;mM=1;var e=rP(),t=bE();function n(r,i,a,o){var l=!a;a||(a={});for(var c=-1,f=i.length;++c<f;){var d=i[c],p=o?o(a[d],r[d],d,a,r):void 0;p===void 0&&(p=r[d]),l?t(a,d,p):e(a,d,p)}return a}return Ov=n,Ov}var Rv,gM;function Afe(){if(gM)return Rv;gM=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Rv=e,Rv}var jv,yM;function si(){if(yM)return jv;yM=1;function e(t){return t!=null&&typeof t=="object"}return jv=e,jv}var Mv,bM;function Tfe(){if(bM)return Mv;bM=1;var e=Is(),t=si(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Mv=r,Mv}var $v,vM;function om(){if(vM)return $v;vM=1;var e=Tfe(),t=si(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return $v=a,$v}var Dv,_M;function lr(){if(_M)return Dv;_M=1;var e=Array.isArray;return Dv=e,Dv}var Fu={exports:{}},Iv,xM;function Nfe(){if(xM)return Iv;xM=1;function e(){return!1}return Iv=e,Iv}Fu.exports;var wM;function lm(){return wM||(wM=1,function(e,t){var n=ii(),r=Nfe(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?n.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||r;e.exports=f}(Fu,Fu.exports)),Fu.exports}var Pv,SM;function vE(){if(SM)return Pv;SM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Pv=n,Pv}var zv,EM;function _E(){if(EM)return zv;EM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return zv=t,zv}var Lv,kM;function Ofe(){if(kM)return Lv;kM=1;var e=Is(),t=_E(),n=si(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",f="[object Map]",d="[object Number]",p="[object Object]",m="[object RegExp]",g="[object Set]",_="[object String]",S="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",v="[object Float64Array]",k="[object Int8Array]",C="[object Int16Array]",T="[object Int32Array]",N="[object Uint8Array]",j="[object Uint8ClampedArray]",$="[object Uint16Array]",M="[object Uint32Array]",q={};q[w]=q[v]=q[k]=q[C]=q[T]=q[N]=q[j]=q[$]=q[M]=!0,q[r]=q[i]=q[b]=q[a]=q[x]=q[o]=q[l]=q[c]=q[f]=q[d]=q[p]=q[m]=q[g]=q[_]=q[S]=!1;function F(B){return n(B)&&t(B.length)&&!!q[e(B)]}return Lv=F,Lv}var qv,CM;function zs(){if(CM)return qv;CM=1;function e(t){return function(n){return t(n)}}return qv=e,qv}var Bu={exports:{}};Bu.exports;var AM;function xE(){return AM||(AM=1,function(e,t){var n=J8(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l}(Bu,Bu.exports)),Bu.exports}var Fv,TM;function wE(){if(TM)return Fv;TM=1;var e=Ofe(),t=zs(),n=xE(),r=n&&n.isTypedArray,i=r?t(r):e;return Fv=i,Fv}var Bv,NM;function iP(){if(NM)return Bv;NM=1;var e=Afe(),t=om(),n=lr(),r=lm(),i=vE(),a=wE(),o=Object.prototype,l=o.hasOwnProperty;function c(f,d){var p=n(f),m=!p&&t(f),g=!p&&!m&&r(f),_=!p&&!m&&!g&&a(f),S=p||m||g||_,b=S?e(f.length,String):[],x=b.length;for(var w in f)(d||l.call(f,w))&&!(S&&(w=="length"||g&&(w=="offset"||w=="parent")||_&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||i(w,x)))&&b.push(w);return b}return Bv=c,Bv}var Uv,OM;function SE(){if(OM)return Uv;OM=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Uv=t,Uv}var Hv,RM;function aP(){if(RM)return Hv;RM=1;function e(t,n){return function(r){return t(n(r))}}return Hv=e,Hv}var Vv,jM;function Rfe(){if(jM)return Vv;jM=1;var e=aP(),t=e(Object.keys,Object);return Vv=t,Vv}var Gv,MM;function jfe(){if(MM)return Gv;MM=1;var e=SE(),t=Rfe(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var l in Object(a))r.call(a,l)&&l!="constructor"&&o.push(l);return o}return Gv=i,Gv}var Zv,$M;function wl(){if($M)return Zv;$M=1;var e=mE(),t=_E();function n(r){return r!=null&&t(r.length)&&!e(r)}return Zv=n,Zv}var Yv,DM;function Fc(){if(DM)return Yv;DM=1;var e=iP(),t=jfe(),n=wl();function r(i){return n(i)?e(i):t(i)}return Yv=r,Yv}var Kv,IM;function Mfe(){if(IM)return Kv;IM=1;var e=qc(),t=Fc();function n(r,i){return r&&e(i,t(i),r)}return Kv=n,Kv}var Xv,PM;function $fe(){if(PM)return Xv;PM=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return Xv=e,Xv}var Wv,zM;function Dfe(){if(zM)return Wv;zM=1;var e=ai(),t=SE(),n=$fe(),r=Object.prototype,i=r.hasOwnProperty;function a(o){if(!e(o))return n(o);var l=t(o),c=[];for(var f in o)f=="constructor"&&(l||!i.call(o,f))||c.push(f);return c}return Wv=a,Wv}var Qv,LM;function Sl(){if(LM)return Qv;LM=1;var e=iP(),t=Dfe(),n=wl();function r(i){return n(i)?e(i,!0):t(i)}return Qv=r,Qv}var Jv,qM;function Ife(){if(qM)return Jv;qM=1;var e=qc(),t=Sl();function n(r,i){return r&&e(i,t(i),r)}return Jv=n,Jv}var Uu={exports:{}};Uu.exports;var FM;function sP(){return FM||(FM=1,function(e,t){var n=ii(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,l=o?o.allocUnsafe:void 0;function c(f,d){if(d)return f.slice();var p=f.length,m=l?l(p):new f.constructor(p);return f.copy(m),m}e.exports=c}(Uu,Uu.exports)),Uu.exports}var e1,BM;function EE(){if(BM)return e1;BM=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return e1=e,e1}var t1,UM;function Pfe(){if(UM)return t1;UM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var l=t[r];n(l,r,t)&&(o[a++]=l)}return o}return t1=e,t1}var n1,HM;function oP(){if(HM)return n1;HM=1;function e(){return[]}return n1=e,n1}var r1,VM;function kE(){if(VM)return r1;VM=1;var e=Pfe(),t=oP(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return r.call(o,l)}))}:t;return r1=a,r1}var i1,GM;function zfe(){if(GM)return i1;GM=1;var e=qc(),t=kE();function n(r,i){return e(r,t(r),i)}return i1=n,i1}var a1,ZM;function CE(){if(ZM)return a1;ZM=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return a1=e,a1}var s1,YM;function AE(){if(YM)return s1;YM=1;var e=aP(),t=e(Object.getPrototypeOf,Object);return s1=t,s1}var o1,KM;function lP(){if(KM)return o1;KM=1;var e=CE(),t=AE(),n=kE(),r=oP(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var l=[];o;)e(l,n(o)),o=t(o);return l}:r;return o1=a,o1}var l1,XM;function Lfe(){if(XM)return l1;XM=1;var e=qc(),t=lP();function n(r,i){return e(r,t(r),i)}return l1=n,l1}var u1,WM;function uP(){if(WM)return u1;WM=1;var e=CE(),t=lr();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return u1=n,u1}var c1,QM;function cP(){if(QM)return c1;QM=1;var e=uP(),t=kE(),n=Fc();function r(i){return e(i,n,t)}return c1=r,c1}var f1,JM;function qfe(){if(JM)return f1;JM=1;var e=uP(),t=lP(),n=Sl();function r(i){return e(i,n,t)}return f1=r,f1}var d1,e4;function Ffe(){if(e4)return d1;e4=1;var e=Ps(),t=ii(),n=e(t,"DataView");return d1=n,d1}var h1,t4;function Bfe(){if(t4)return h1;t4=1;var e=Ps(),t=ii(),n=e(t,"Promise");return h1=n,h1}var p1,n4;function fP(){if(n4)return p1;n4=1;var e=Ps(),t=ii(),n=e(t,"Set");return p1=n,p1}var m1,r4;function Ufe(){if(r4)return m1;r4=1;var e=Ps(),t=ii(),n=e(t,"WeakMap");return m1=n,m1}var g1,i4;function um(){if(i4)return g1;i4=1;var e=Ffe(),t=gE(),n=Bfe(),r=fP(),i=Ufe(),a=Is(),o=eP(),l="[object Map]",c="[object Object]",f="[object Promise]",d="[object Set]",p="[object WeakMap]",m="[object DataView]",g=o(e),_=o(t),S=o(n),b=o(r),x=o(i),w=a;return(e&&w(new e(new ArrayBuffer(1)))!=m||t&&w(new t)!=l||n&&w(n.resolve())!=f||r&&w(new r)!=d||i&&w(new i)!=p)&&(w=function(v){var k=a(v),C=k==c?v.constructor:void 0,T=C?o(C):"";if(T)switch(T){case g:return m;case _:return l;case S:return f;case b:return d;case x:return p}return k}),g1=w,g1}var y1,a4;function Hfe(){if(a4)return y1;a4=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,a=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(a.index=r.index,a.input=r.input),a}return y1=n,y1}var b1,s4;function dP(){if(s4)return b1;s4=1;var e=ii(),t=e.Uint8Array;return b1=t,b1}var v1,o4;function TE(){if(o4)return v1;o4=1;var e=dP();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return v1=t,v1}var _1,l4;function Vfe(){if(l4)return _1;l4=1;var e=TE();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return _1=t,_1}var x1,u4;function Gfe(){if(u4)return x1;u4=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return x1=t,x1}var w1,c4;function Zfe(){if(c4)return w1;c4=1;var e=xl(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return w1=r,w1}var S1,f4;function hP(){if(f4)return S1;f4=1;var e=TE();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return S1=t,S1}var E1,d4;function Yfe(){if(d4)return E1;d4=1;var e=TE(),t=Vfe(),n=Gfe(),r=Zfe(),i=hP(),a="[object Boolean]",o="[object Date]",l="[object Map]",c="[object Number]",f="[object RegExp]",d="[object Set]",p="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",_="[object DataView]",S="[object Float32Array]",b="[object Float64Array]",x="[object Int8Array]",w="[object Int16Array]",v="[object Int32Array]",k="[object Uint8Array]",C="[object Uint8ClampedArray]",T="[object Uint16Array]",N="[object Uint32Array]";function j($,M,q){var F=$.constructor;switch(M){case g:return e($);case a:case o:return new F(+$);case _:return t($,q);case S:case b:case x:case w:case v:case k:case C:case T:case N:return i($,q);case l:return new F;case c:case p:return new F($);case f:return n($);case d:return new F;case m:return r($)}}return E1=j,E1}var k1,h4;function Kfe(){if(h4)return k1;h4=1;var e=ai(),t=Object.create,n=function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var a=new r;return r.prototype=void 0,a}}();return k1=n,k1}var C1,p4;function pP(){if(p4)return C1;p4=1;var e=Kfe(),t=AE(),n=SE();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return C1=r,C1}var A1,m4;function Xfe(){if(m4)return A1;m4=1;var e=um(),t=si(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return A1=r,A1}var T1,g4;function Wfe(){if(g4)return T1;g4=1;var e=Xfe(),t=zs(),n=xE(),r=n&&n.isMap,i=r?t(r):e;return T1=i,T1}var N1,y4;function Qfe(){if(y4)return N1;y4=1;var e=um(),t=si(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return N1=r,N1}var O1,b4;function Jfe(){if(b4)return O1;b4=1;var e=Qfe(),t=zs(),n=xE(),r=n&&n.isSet,i=r?t(r):e;return O1=i,O1}var R1,v4;function ede(){if(v4)return R1;v4=1;var e=sm(),t=tP(),n=rP(),r=Mfe(),i=Ife(),a=sP(),o=EE(),l=zfe(),c=Lfe(),f=cP(),d=qfe(),p=um(),m=Hfe(),g=Yfe(),_=pP(),S=lr(),b=lm(),x=Wfe(),w=ai(),v=Jfe(),k=Fc(),C=Sl(),T=1,N=2,j=4,$="[object Arguments]",M="[object Array]",q="[object Boolean]",F="[object Date]",B="[object Error]",I="[object Function]",V="[object GeneratorFunction]",H="[object Map]",G="[object Number]",X="[object Object]",W="[object RegExp]",L="[object Set]",P="[object String]",Z="[object Symbol]",R="[object WeakMap]",D="[object ArrayBuffer]",U="[object DataView]",Y="[object Float32Array]",ne="[object Float64Array]",ae="[object Int8Array]",re="[object Int16Array]",de="[object Int32Array]",Q="[object Uint8Array]",J="[object Uint8ClampedArray]",oe="[object Uint16Array]",fe="[object Uint32Array]",me={};me[$]=me[M]=me[D]=me[U]=me[q]=me[F]=me[Y]=me[ne]=me[ae]=me[re]=me[de]=me[H]=me[G]=me[X]=me[W]=me[L]=me[P]=me[Z]=me[Q]=me[J]=me[oe]=me[fe]=!0,me[B]=me[I]=me[R]=!1;function we(ke,Ze,Le,Ye,Ve,$e){var qe,We=Ze&T,Tt=Ze&N,pe=Ze&j;if(Le&&(qe=Ve?Le(ke,Ye,Ve,$e):Le(ke)),qe!==void 0)return qe;if(!w(ke))return ke;var _e=S(ke);if(_e){if(qe=m(ke),!We)return o(ke,qe)}else{var Te=p(ke),ze=Te==I||Te==V;if(b(ke))return a(ke,We);if(Te==X||Te==$||ze&&!Ve){if(qe=Tt||ze?{}:_(ke),!We)return Tt?c(ke,i(qe,ke)):l(ke,r(qe,ke))}else{if(!me[Te])return Ve?ke:{};qe=g(ke,Te,We)}}$e||($e=new e);var Je=$e.get(ke);if(Je)return Je;$e.set(ke,qe),v(ke)?ke.forEach(function(jt){qe.add(we(jt,Ze,Le,jt,ke,$e))}):x(ke)&&ke.forEach(function(jt,vt){qe.set(vt,we(jt,Ze,Le,vt,ke,$e))});var un=pe?Tt?d:f:Tt?C:k,On=_e?void 0:un(ke);return t(On||ke,function(jt,vt){On&&(vt=jt,jt=ke[vt]),n(qe,vt,we(jt,Ze,Le,vt,ke,$e))}),qe}return R1=we,R1}var j1,_4;function tde(){if(_4)return j1;_4=1;var e=ede(),t=1,n=4;function r(i){return e(i,t|n)}return j1=r,j1}var M1,x4;function nde(){if(x4)return M1;x4=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return M1=t,M1}var $1,w4;function rde(){if(w4)return $1;w4=1;function e(t){return this.__data__.has(t)}return $1=e,$1}var D1,S4;function cm(){if(S4)return D1;S4=1;var e=yE(),t=nde(),n=rde();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,D1=r,D1}var I1,E4;function ide(){if(E4)return I1;E4=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return I1=e,I1}var P1,k4;function fm(){if(k4)return P1;k4=1;function e(t,n){return t.has(n)}return P1=e,P1}var z1,C4;function mP(){if(C4)return z1;C4=1;var e=cm(),t=ide(),n=fm(),r=1,i=2;function a(o,l,c,f,d,p){var m=c&r,g=o.length,_=l.length;if(g!=_&&!(m&&_>g))return!1;var S=p.get(o),b=p.get(l);if(S&&b)return S==l&&b==o;var x=-1,w=!0,v=c&i?new e:void 0;for(p.set(o,l),p.set(l,o);++x<g;){var k=o[x],C=l[x];if(f)var T=m?f(C,k,x,l,o,p):f(k,C,x,o,l,p);if(T!==void 0){if(T)continue;w=!1;break}if(v){if(!t(l,function(N,j){if(!n(v,j)&&(k===N||d(k,N,c,f,p)))return v.push(j)})){w=!1;break}}else if(!(k===C||d(k,C,c,f,p))){w=!1;break}}return p.delete(o),p.delete(l),w}return z1=a,z1}var L1,A4;function ade(){if(A4)return L1;A4=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return L1=e,L1}var q1,T4;function NE(){if(T4)return q1;T4=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return q1=e,q1}var F1,N4;function sde(){if(N4)return F1;N4=1;var e=xl(),t=dP(),n=_l(),r=mP(),i=ade(),a=NE(),o=1,l=2,c="[object Boolean]",f="[object Date]",d="[object Error]",p="[object Map]",m="[object Number]",g="[object RegExp]",_="[object Set]",S="[object String]",b="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",v=e?e.prototype:void 0,k=v?v.valueOf:void 0;function C(T,N,j,$,M,q,F){switch(j){case w:if(T.byteLength!=N.byteLength||T.byteOffset!=N.byteOffset)return!1;T=T.buffer,N=N.buffer;case x:return!(T.byteLength!=N.byteLength||!q(new t(T),new t(N)));case c:case f:case m:return n(+T,+N);case d:return T.name==N.name&&T.message==N.message;case g:case S:return T==N+"";case p:var B=i;case _:var I=$&o;if(B||(B=a),T.size!=N.size&&!I)return!1;var V=F.get(T);if(V)return V==N;$|=l,F.set(T,N);var H=r(B(T),B(N),$,M,q,F);return F.delete(T),H;case b:if(k)return k.call(T)==k.call(N)}return!1}return F1=C,F1}var B1,O4;function ode(){if(O4)return B1;O4=1;var e=cP(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,l,c,f,d){var p=l&t,m=e(a),g=m.length,_=e(o),S=_.length;if(g!=S&&!p)return!1;for(var b=g;b--;){var x=m[b];if(!(p?x in o:r.call(o,x)))return!1}var w=d.get(a),v=d.get(o);if(w&&v)return w==o&&v==a;var k=!0;d.set(a,o),d.set(o,a);for(var C=p;++b<g;){x=m[b];var T=a[x],N=o[x];if(c)var j=p?c(N,T,x,o,a,d):c(T,N,x,a,o,d);if(!(j===void 0?T===N||f(T,N,l,c,d):j)){k=!1;break}C||(C=x=="constructor")}if(k&&!C){var $=a.constructor,M=o.constructor;$!=M&&"constructor"in a&&"constructor"in o&&!(typeof $=="function"&&$ instanceof $&&typeof M=="function"&&M instanceof M)&&(k=!1)}return d.delete(a),d.delete(o),k}return B1=i,B1}var U1,R4;function lde(){if(R4)return U1;R4=1;var e=sm(),t=mP(),n=sde(),r=ode(),i=um(),a=lr(),o=lm(),l=wE(),c=1,f="[object Arguments]",d="[object Array]",p="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function _(S,b,x,w,v,k){var C=a(S),T=a(b),N=C?d:i(S),j=T?d:i(b);N=N==f?p:N,j=j==f?p:j;var $=N==p,M=j==p,q=N==j;if(q&&o(S)){if(!o(b))return!1;C=!0,$=!1}if(q&&!$)return k||(k=new e),C||l(S)?t(S,b,x,w,v,k):n(S,b,N,x,w,v,k);if(!(x&c)){var F=$&&g.call(S,"__wrapped__"),B=M&&g.call(b,"__wrapped__");if(F||B){var I=F?S.value():S,V=B?b.value():b;return k||(k=new e),v(I,V,x,w,k)}}return q?(k||(k=new e),r(S,b,x,w,v,k)):!1}return U1=_,U1}var H1,j4;function OE(){if(j4)return H1;j4=1;var e=lde(),t=si();function n(r,i,a,o,l){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,l)}return H1=n,H1}var V1,M4;function gP(){if(M4)return V1;M4=1;var e=OE();function t(n,r){return e(n,r)}return V1=t,V1}var G1,$4;function ude(){if($4)return G1;$4=1;var e=xl(),t=om(),n=lr(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return G1=i,G1}var Z1,D4;function RE(){if(D4)return Z1;D4=1;var e=CE(),t=ude();function n(r,i,a,o,l){var c=-1,f=r.length;for(a||(a=t),l||(l=[]);++c<f;){var d=r[c];i>0&&a(d)?i>1?n(d,i-1,a,o,l):e(l,d):o||(l[l.length]=d)}return l}return Z1=n,Z1}var Y1,I4;function Ls(){if(I4)return Y1;I4=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return Y1=e,Y1}var K1,P4;function dm(){if(P4)return K1;P4=1;var e=Is(),t=si(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return K1=r,K1}var X1,z4;function jE(){if(z4)return X1;z4=1;var e=lr(),t=dm(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return X1=i,X1}var W1,L4;function cde(){if(L4)return W1;L4=1;var e=yE(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,l=i?i.apply(this,o):o[0],c=a.cache;if(c.has(l))return c.get(l);var f=r.apply(this,o);return a.cache=c.set(l,f)||c,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,W1=n,W1}var Q1,q4;function fde(){if(q4)return Q1;q4=1;var e=cde(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return Q1=n,Q1}var J1,F4;function dde(){if(F4)return J1;F4=1;var e=fde(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,l,c,f){a.push(c?f.replace(n,"$1"):l||o)}),a});return J1=r,J1}var e_,B4;function hde(){if(B4)return e_;B4=1;var e=xl(),t=Ls(),n=lr(),r=dm(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return a?a.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return e_=o,e_}var t_,U4;function pde(){if(U4)return t_;U4=1;var e=hde();function t(n){return n==null?"":e(n)}return t_=t,t_}var n_,H4;function yP(){if(H4)return n_;H4=1;var e=lr(),t=jE(),n=dde(),r=pde();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return n_=i,n_}var r_,V4;function hm(){if(V4)return r_;V4=1;var e=dm();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return r_=t,r_}var i_,G4;function ME(){if(G4)return i_;G4=1;var e=yP(),t=hm();function n(r,i){i=e(i,r);for(var a=0,o=i.length;r!=null&&a<o;)r=r[t(i[a++])];return a&&a==o?r:void 0}return i_=n,i_}var a_,Z4;function mde(){if(Z4)return a_;Z4=1;var e=sm(),t=OE(),n=1,r=2;function i(a,o,l,c){var f=l.length,d=f,p=!c;if(a==null)return!d;for(a=Object(a);f--;){var m=l[f];if(p&&m[2]?m[1]!==a[m[0]]:!(m[0]in a))return!1}for(;++f<d;){m=l[f];var g=m[0],_=a[g],S=m[1];if(p&&m[2]){if(_===void 0&&!(g in a))return!1}else{var b=new e;if(c)var x=c(_,S,g,a,o,b);if(!(x===void 0?t(S,_,n|r,c,b):x))return!1}}return!0}return a_=i,a_}var s_,Y4;function bP(){if(Y4)return s_;Y4=1;var e=ai();function t(n){return n===n&&!e(n)}return s_=t,s_}var o_,K4;function gde(){if(K4)return o_;K4=1;var e=bP(),t=Fc();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],l=r[o];i[a]=[o,l,e(l)]}return i}return o_=n,o_}var l_,X4;function vP(){if(X4)return l_;X4=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return l_=e,l_}var u_,W4;function yde(){if(W4)return u_;W4=1;var e=mde(),t=gde(),n=vP();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return u_=r,u_}var c_,Q4;function bde(){if(Q4)return c_;Q4=1;var e=ME();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return c_=t,c_}var f_,J4;function vde(){if(J4)return f_;J4=1;function e(t,n){return t!=null&&n in Object(t)}return f_=e,f_}var d_,e3;function _de(){if(e3)return d_;e3=1;var e=yP(),t=om(),n=lr(),r=vE(),i=_E(),a=hm();function o(l,c,f){c=e(c,l);for(var d=-1,p=c.length,m=!1;++d<p;){var g=a(c[d]);if(!(m=l!=null&&f(l,g)))break;l=l[g]}return m||++d!=p?m:(p=l==null?0:l.length,!!p&&i(p)&&r(g,p)&&(n(l)||t(l)))}return d_=o,d_}var h_,t3;function xde(){if(t3)return h_;t3=1;var e=vde(),t=_de();function n(r,i){return r!=null&&t(r,i,e)}return h_=n,h_}var p_,n3;function wde(){if(n3)return p_;n3=1;var e=OE(),t=bde(),n=xde(),r=jE(),i=bP(),a=vP(),o=hm(),l=1,c=2;function f(d,p){return r(d)&&i(p)?a(o(d),p):function(m){var g=t(m,d);return g===void 0&&g===p?n(m,d):e(p,g,l|c)}}return p_=f,p_}var m_,r3;function Bc(){if(r3)return m_;r3=1;function e(t){return t}return m_=e,m_}var g_,i3;function Sde(){if(i3)return g_;i3=1;function e(t){return function(n){return n?.[t]}}return g_=e,g_}var y_,a3;function Ede(){if(a3)return y_;a3=1;var e=ME();function t(n){return function(r){return e(r,n)}}return y_=t,y_}var b_,s3;function kde(){if(s3)return b_;s3=1;var e=Sde(),t=Ede(),n=jE(),r=hm();function i(a){return n(a)?e(r(a)):t(a)}return b_=i,b_}var v_,o3;function Cde(){if(o3)return v_;o3=1;var e=yde(),t=wde(),n=Bc(),r=lr(),i=kde();function a(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return v_=a,v_}var __,l3;function Ade(){if(l3)return __;l3=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),l=i(n),c=l.length;c--;){var f=l[t?c:++a];if(r(o[f],f,o)===!1)break}return n}}return __=e,__}var x_,u3;function _P(){if(u3)return x_;u3=1;var e=Ade(),t=e();return x_=t,x_}var w_,c3;function Tde(){if(c3)return w_;c3=1;var e=_P(),t=Fc();function n(r,i){return r&&e(r,i,t)}return w_=n,w_}var S_,f3;function Nde(){if(f3)return S_;f3=1;var e=wl();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var o=i.length,l=r?o:-1,c=Object(i);(r?l--:++l<o)&&a(c[l],l,c)!==!1;);return i}}return S_=t,S_}var E_,d3;function xP(){if(d3)return E_;d3=1;var e=Tde(),t=Nde(),n=t(e);return E_=n,E_}var k_,h3;function Ode(){if(h3)return k_;h3=1;var e=xP(),t=wl();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(l,c,f){o[++a]=i(l,c,f)}),o}return k_=n,k_}var C_,p3;function Rde(){if(p3)return C_;p3=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return C_=e,C_}var A_,m3;function jde(){if(m3)return A_;m3=1;var e=dm();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,l=e(n),c=r!==void 0,f=r===null,d=r===r,p=e(r);if(!f&&!p&&!l&&n>r||l&&c&&d&&!f&&!p||a&&c&&d||!i&&d||!o)return 1;if(!a&&!l&&!p&&n<r||p&&i&&o&&!a&&!l||f&&i&&o||!c&&o||!d)return-1}return 0}return A_=t,A_}var T_,g3;function Mde(){if(g3)return T_;g3=1;var e=jde();function t(n,r,i){for(var a=-1,o=n.criteria,l=r.criteria,c=o.length,f=i.length;++a<c;){var d=e(o[a],l[a]);if(d){if(a>=f)return d;var p=i[a];return d*(p=="desc"?-1:1)}}return n.index-r.index}return T_=t,T_}var N_,y3;function $de(){if(y3)return N_;y3=1;var e=Ls(),t=ME(),n=Cde(),r=Ode(),i=Rde(),a=zs(),o=Mde(),l=Bc(),c=lr();function f(d,p,m){p.length?p=e(p,function(S){return c(S)?function(b){return t(b,S.length===1?S[0]:S)}:S}):p=[l];var g=-1;p=e(p,a(n));var _=r(d,function(S,b,x){var w=e(p,function(v){return v(S)});return{criteria:w,index:++g,value:S}});return i(_,function(S,b){return o(S,b,m)})}return N_=f,N_}var O_,b3;function wP(){if(b3)return O_;b3=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return O_=e,O_}var R_,v3;function Dde(){if(v3)return R_;v3=1;var e=wP(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,l=-1,c=t(o.length-i,0),f=Array(c);++l<c;)f[l]=o[i+l];l=-1;for(var d=Array(i+1);++l<i;)d[l]=o[l];return d[i]=a(f),e(r,this,d)}}return R_=n,R_}var j_,_3;function Ide(){if(_3)return j_;_3=1;function e(t){return function(){return t}}return j_=e,j_}var M_,x3;function Pde(){if(x3)return M_;x3=1;var e=Ide(),t=nP(),n=Bc(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return M_=r,M_}var $_,w3;function zde(){if(w3)return $_;w3=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var l=n(),c=t-(l-o);if(o=l,c>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return $_=r,$_}var D_,S3;function Lde(){if(S3)return D_;S3=1;var e=Pde(),t=zde(),n=t(e);return D_=n,D_}var I_,E3;function qs(){if(E3)return I_;E3=1;var e=Bc(),t=Dde(),n=Lde();function r(i,a){return n(t(i,a,e),i+"")}return I_=r,I_}var P_,k3;function $E(){if(k3)return P_;k3=1;var e=_l(),t=wl(),n=vE(),r=ai();function i(a,o,l){if(!r(l))return!1;var c=typeof o;return(c=="number"?t(l)&&n(o,l.length):c=="string"&&o in l)?e(l[o],a):!1}return P_=i,P_}var z_,C3;function SP(){if(C3)return z_;C3=1;var e=RE(),t=$de(),n=qs(),r=$E(),i=n(function(a,o){if(a==null)return[];var l=o.length;return l>1&&r(a,o[0],o[1])?o=[]:l>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return z_=i,z_}var L_,A3;function qde(){if(A3)return L_;A3=1;function e(t,n,r,i){for(var a=t.length,o=r+(i?1:-1);i?o--:++o<a;)if(n(t[o],o,t))return o;return-1}return L_=e,L_}var q_,T3;function Fde(){if(T3)return q_;T3=1;function e(t){return t!==t}return q_=e,q_}var F_,N3;function Bde(){if(N3)return F_;N3=1;function e(t,n,r){for(var i=r-1,a=t.length;++i<a;)if(t[i]===n)return i;return-1}return F_=e,F_}var B_,O3;function EP(){if(O3)return B_;O3=1;var e=qde(),t=Fde(),n=Bde();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return B_=r,B_}var U_,R3;function DE(){if(R3)return U_;R3=1;var e=EP();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return U_=t,U_}var H_,j3;function IE(){if(j3)return H_;j3=1;function e(t,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(n,t[i]))return!0;return!1}return H_=e,H_}var V_,M3;function Ude(){if(M3)return V_;M3=1;function e(){}return V_=e,V_}var G_,$3;function Hde(){if($3)return G_;$3=1;var e=fP(),t=Ude(),n=NE(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return G_=i,G_}var Z_,D3;function kP(){if(D3)return Z_;D3=1;var e=cm(),t=DE(),n=IE(),r=fm(),i=Hde(),a=NE(),o=200;function l(c,f,d){var p=-1,m=t,g=c.length,_=!0,S=[],b=S;if(d)_=!1,m=n;else if(g>=o){var x=f?null:i(c);if(x)return a(x);_=!1,m=r,b=new e}else b=f?[]:S;e:for(;++p<g;){var w=c[p],v=f?f(w):w;if(w=d||w!==0?w:0,_&&v===v){for(var k=b.length;k--;)if(b[k]===v)continue e;f&&b.push(v),S.push(w)}else m(b,v,d)||(b!==S&&b.push(v),S.push(w))}return S}return Z_=l,Z_}var Y_,I3;function PE(){if(I3)return Y_;I3=1;var e=kP();function t(n){return n&&n.length?e(n):[]}return Y_=t,Y_}var K_,P3;function zE(){if(P3)return K_;P3=1;var e=kP();function t(n,r){return r=typeof r=="function"?r:void 0,n&&n.length?e(n,void 0,r):[]}return K_=t,K_}var X_,z3;function Vde(){if(z3)return X_;z3=1;var e=qs(),t=_l(),n=$E(),r=Sl(),i=Object.prototype,a=i.hasOwnProperty,o=e(function(l,c){l=Object(l);var f=-1,d=c.length,p=d>2?c[2]:void 0;for(p&&n(c[0],c[1],p)&&(d=1);++f<d;)for(var m=c[f],g=r(m),_=-1,S=g.length;++_<S;){var b=g[_],x=l[b];(x===void 0||t(x,i[b])&&!a.call(l,b))&&(l[b]=m[b])}return l});return X_=o,X_}var W_,L3;function CP(){if(L3)return W_;L3=1;var e=cm(),t=DE(),n=IE(),r=Ls(),i=zs(),a=fm(),o=Math.min;function l(c,f,d){for(var p=d?n:t,m=c[0].length,g=c.length,_=g,S=Array(g),b=1/0,x=[];_--;){var w=c[_];_&&f&&(w=r(w,i(f))),b=o(w.length,b),S[_]=!d&&(f||m>=120&&w.length>=120)?new e(_&&w):void 0}w=c[0];var v=-1,k=S[0];e:for(;++v<m&&x.length<b;){var C=w[v],T=f?f(C):C;if(C=d||C!==0?C:0,!(k?a(k,T):p(x,T,d))){for(_=g;--_;){var N=S[_];if(!(N?a(N,T):p(c[_],T,d)))continue e}k&&k.push(T),x.push(C)}}return x}return W_=l,W_}var Q_,q3;function LE(){if(q3)return Q_;q3=1;var e=wl(),t=si();function n(r){return t(r)&&e(r)}return Q_=n,Q_}var J_,F3;function AP(){if(F3)return J_;F3=1;var e=LE();function t(n){return e(n)?n:[]}return J_=t,J_}var ex,B3;function Gde(){if(B3)return ex;B3=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return ex=e,ex}var tx,U3;function TP(){if(U3)return tx;U3=1;var e=Ls(),t=CP(),n=qs(),r=AP(),i=Gde(),a=n(function(o){var l=i(o),c=e(o,r);return l=typeof l=="function"?l:void 0,l&&c.pop(),c.length&&c[0]===o[0]?t(c,void 0,l):[]});return tx=a,tx}var nx,H3;function pm(){if(H3)return nx;H3=1;var e=Is(),t=AE(),n=si(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,l=a.hasOwnProperty,c=o.call(Object);function f(d){if(!n(d)||e(d)!=r)return!1;var p=t(d);if(p===null)return!0;var m=l.call(p,"constructor")&&p.constructor;return typeof m=="function"&&m instanceof m&&o.call(m)==c}return nx=f,nx}var rx,V3;function Zde(){if(V3)return rx;V3=1;var e=Is(),t=si(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return rx=r,rx}var ix,G3;function qE(){if(G3)return ix;G3=1;var e=gP(),t=SP(),n=PE(),r=zE(),i=Vde(),a=TP(),o=pm(),l=Zde(),c=B=>Array.isArray(B)?B:[B],f=B=>B===void 0,d=B=>o(B)||Array.isArray(B)?Object.keys(B):[],p=(B,I)=>B.hasOwnProperty(I),m=B=>t(n(B)),g=B=>f(B)||Array.isArray(B)&&B.length===0,_=(B,I,V,H)=>I&&p(I,V)&&B&&p(B,V)&&H(B[V],I[V]),S=(B,I)=>f(B)&&I===0||f(I)&&B===0||e(B,I),b=(B,I)=>f(B)&&I===!1||f(I)&&B===!1||e(B,I),x=B=>f(B)||e(B,{})||B===!0,w=B=>f(B)||e(B,{}),v=B=>f(B)||o(B)||B===!0||B===!1;function k(B,I){return g(B)&&g(I)?!0:e(m(B),m(I))}function C(B,I){return B=c(B),I=c(I),e(m(B),m(I))}function T(B,I,V,H){var G=n(d(B).concat(d(I)));return w(B)&&w(I)?!0:w(B)&&d(I).length||w(I)&&d(B).length?!1:G.every(function(X){var W=B[X],L=I[X];return Array.isArray(W)&&Array.isArray(L)?e(m(B),m(I)):Array.isArray(W)&&!Array.isArray(L)||Array.isArray(L)&&!Array.isArray(W)?!1:_(B,I,X,H)})}function N(B,I,V,H){return o(B)&&o(I)?H(B,I):Array.isArray(B)&&Array.isArray(I)?T(B,I,V,H):e(B,I)}function j(B,I,V,H){var G=r(B,H),X=r(I,H),W=a(G,X,H);return W.length===Math.max(G.length,X.length)}var $={title:e,uniqueItems:b,minLength:S,minItems:S,minProperties:S,required:k,enum:k,type:C,items:N,anyOf:j,allOf:j,oneOf:j,properties:T,patternProperties:T,dependencies:T},M=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],q=["additionalProperties","additionalItems","contains","propertyNames","not"];function F(B,I,V){if(V=i(V,{ignore:[]}),x(B)&&x(I))return!0;if(!v(B)||!v(I))throw new Error("Either of the values are not a JSON schema.");if(B===I)return!0;if(l(B)&&l(I))return B===I;if(B===void 0&&I===!1||I===void 0&&B===!1||f(B)&&!f(I)||!f(B)&&f(I))return!1;var H=n(Object.keys(B).concat(Object.keys(I)));if(V.ignore.length&&(H=H.filter(X=>V.ignore.indexOf(X)===-1)),!H.length)return!0;function G(X,W){return F(X,W,V)}return H.every(function(X){var W=B[X],L=I[X];if(q.indexOf(X)!==-1)return F(W,L,V);var P=$[X];if(P||(P=e),e(W,L))return!0;if(M.indexOf(X)===-1&&(!p(B,X)&&p(I,X)||p(B,X)&&!p(I,X)))return W===L;var Z=P(W,L,X,G);if(!l(Z))throw new Error("Comparer must return true or false");return Z})}return ix=F,ix}var ax,Z3;function FE(){if(Z3)return ax;Z3=1;function e(t){return Object.prototype.toString.call(t)==="[object Array]"}return ax=Array.isArray||e,ax}var sx,Y3;function Yde(){if(Y3)return sx;Y3=1;function e(t){return(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")&&t.valueOf()===t.valueOf()}return sx=e,sx}var ox,K3;function Kde(){if(K3)return ox;K3=1;var e=Yde();function t(n){return e(n)&&n%1===0}return ox=t,ox}var lx,X3;function NP(){if(X3)return lx;X3=1;var e=FE(),t=Kde();function n(r){var i;if(!e(r)||(i=r.length,!i))return!1;for(var a=0;a<i;a++)if(!t(r[a]))return!1;return!0}return lx=n,lx}var ux,W3;function OP(){if(W3)return ux;W3=1;function e(t){return typeof t=="function"}return ux=e,ux}var cx,Q3;function Xde(){if(Q3)return cx;Q3=1;var e=FE(),t=NP(),n=OP(),r=Math.pow(2,31)-1;function i(l,c){var f=1,d;if(l===0)return c;if(c===0)return l;for(;l%2===0&&c%2===0;)l=l/2,c=c/2,f=f*2;for(;l%2===0;)l=l/2;for(;c;){for(;c%2===0;)c=c/2;l>c&&(d=c,c=l,l=d),c=c-l}return f*l}function a(l,c){var f=0,d;if(l===0)return c;if(c===0)return l;for(;(l&1)===0&&(c&1)===0;)l>>>=1,c>>>=1,f++;for(;(l&1)===0;)l>>>=1;for(;c;){for(;(c&1)===0;)c>>>=1;l>c&&(d=c,c=l,l=d),c=c-l}return l<<f}function o(){var l=arguments.length,c,f,d,p,m,g,_;for(c=new Array(l),_=0;_<l;_++)c[_]=arguments[_];if(t(c)){if(l===2)return m=c[0],g=c[1],m<0&&(m=-m),g<0&&(g=-g),m<=r&&g<=r?a(m,g):i(m,g);d=c}else if(e(c[0]))if(l>1){if(d=c[0],f=c[1],!n(f))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+f+"`.")}else d=c[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+c[0]+"`.");if(p=d.length,p<2)return null;if(f){for(m=new Array(p),_=0;_<p;_++)m[_]=f(d[_],_);d=m}if(l<3&&!t(d))throw new TypeError("gcd()::invalid input argument. Accessed array values must be integers. Value: `"+d+"`.");for(_=0;_<p;_++)m=d[_],m<0&&(d[_]=-m);for(m=d[0],_=1;_<p;_++)g=d[_],g<=r&&m<=r?m=a(m,g):m=i(m,g);return m}return cx=o,cx}var fx,J3;function Wde(){if(J3)return fx;J3=1;var e=Xde(),t=FE(),n=NP(),r=OP();function i(){var a=arguments.length,o,l,c,f,d,p,m;for(o=new Array(a),m=0;m<a;m++)o[m]=arguments[m];if(n(o)){if(a===2)return d=o[0],p=o[1],d<0&&(d=-d),p<0&&(p=-p),d===0||p===0?0:d/e(d,p)*p;c=o}else if(t(o[0]))if(a>1){if(c=o[0],l=o[1],!r(l))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+l+"`.")}else c=o[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+o[0]+"`.");if(f=c.length,f<2)return null;if(l){for(d=new Array(f),m=0;m<f;m++)d[m]=l(c[m],m);c=d}if(a<3&&!n(c))throw new TypeError("lcm()::invalid input argument. Accessed array values must be integers. Value: `"+c+"`.");for(m=0;m<f;m++)d=c[m],d<0&&(c[m]=-d);for(d=c[0],m=1;m<f;m++){if(p=c[m],d===0||p===0)return 0;d=d/e(d,p)*p}return d}return fx=i,fx}var dx,e$;function RP(){if(e$)return dx;e$=1;var e=bE(),t=_l();function n(r,i,a){(a!==void 0&&!t(r[i],a)||a===void 0&&!(i in r))&&e(r,i,a)}return dx=n,dx}var hx,t$;function jP(){if(t$)return hx;t$=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return hx=e,hx}var px,n$;function Qde(){if(n$)return px;n$=1;var e=qc(),t=Sl();function n(r){return e(r,t(r))}return px=n,px}var mx,r$;function Jde(){if(r$)return mx;r$=1;var e=RP(),t=sP(),n=hP(),r=EE(),i=pP(),a=om(),o=lr(),l=LE(),c=lm(),f=mE(),d=ai(),p=pm(),m=wE(),g=jP(),_=Qde();function S(b,x,w,v,k,C,T){var N=g(b,w),j=g(x,w),$=T.get(j);if($){e(b,w,$);return}var M=C?C(N,j,w+"",b,x,T):void 0,q=M===void 0;if(q){var F=o(j),B=!F&&c(j),I=!F&&!B&&m(j);M=j,F||B||I?o(N)?M=N:l(N)?M=r(N):B?(q=!1,M=t(j,!0)):I?(q=!1,M=n(j,!0)):M=[]:p(j)||a(j)?(M=N,a(N)?M=_(N):(!d(N)||f(N))&&(M=i(j))):q=!1}q&&(T.set(j,M),k(M,j,v,C,T),T.delete(j)),e(b,w,M)}return mx=S,mx}var gx,i$;function MP(){if(i$)return gx;i$=1;var e=sm(),t=RP(),n=_P(),r=Jde(),i=ai(),a=Sl(),o=jP();function l(c,f,d,p,m){c!==f&&n(f,function(g,_){if(m||(m=new e),i(g))r(c,f,_,d,l,p,m);else{var S=p?p(o(c,_),g,_+"",c,f,m):void 0;S===void 0&&(S=g),t(c,_,S)}},a)}return gx=l,gx}var yx,a$;function ehe(){if(a$)return yx;a$=1;var e=MP(),t=ai();function n(r,i,a,o,l,c){return t(r)&&t(i)&&(c.set(i,r),e(r,i,void 0,n,c),c.delete(i)),r}return yx=n,yx}var bx,s$;function the(){if(s$)return bx;s$=1;var e=qs(),t=$E();function n(r){return e(function(i,a){var o=-1,l=a.length,c=l>1?a[l-1]:void 0,f=l>2?a[2]:void 0;for(c=r.length>3&&typeof c=="function"?(l--,c):void 0,f&&t(a[0],a[1],f)&&(c=l<3?void 0:c,l=1),i=Object(i);++o<l;){var d=a[o];d&&r(i,d,o,c)}return i})}return bx=n,bx}var vx,o$;function nhe(){if(o$)return vx;o$=1;var e=MP(),t=the(),n=t(function(r,i,a,o){e(r,i,a,o)});return vx=n,vx}var _x,l$;function rhe(){if(l$)return _x;l$=1;var e=wP(),t=qs(),n=ehe(),r=nhe(),i=t(function(a){return a.push(void 0,n),e(r,void 0,a)});return _x=i,_x}var xx,u$;function $P(){if(u$)return xx;u$=1;var e=RE();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return xx=t,xx}var wx,c$;function DP(){if(c$)return wx;c$=1;var e=RE(),t=1/0;function n(r){var i=r==null?0:r.length;return i?e(r,t):[]}return wx=n,wx}var Sx,f$;function ihe(){if(f$)return Sx;f$=1;var e=Ls(),t=CP(),n=qs(),r=AP(),i=n(function(a){var o=e(a,r);return o.length&&o[0]===a[0]?t(o):[]});return Sx=i,Sx}var Ex,d$;function ahe(){if(d$)return Ex;d$=1;function e(t,n,r,i){for(var a=r-1,o=t.length;++a<o;)if(i(t[a],n))return a;return-1}return Ex=e,Ex}var kx,h$;function she(){if(h$)return kx;h$=1;var e=Ls(),t=EP(),n=ahe(),r=zs(),i=EE(),a=Array.prototype,o=a.splice;function l(c,f,d,p){var m=p?n:t,g=-1,_=f.length,S=c;for(c===f&&(f=i(f)),d&&(S=e(c,r(d)));++g<_;)for(var b=0,x=f[g],w=d?d(x):x;(b=m(S,w,b,p))>-1;)S!==c&&o.call(S,b,1),o.call(c,b,1);return c}return kx=l,kx}var Cx,p$;function ohe(){if(p$)return Cx;p$=1;var e=she();function t(n,r){return n&&n.length&&r&&r.length?e(n,r):n}return Cx=t,Cx}var Ax,m$;function lhe(){if(m$)return Ax;m$=1;var e=Bc();function t(n){return typeof n=="function"?n:e}return Ax=t,Ax}var Tx,g$;function IP(){if(g$)return Tx;g$=1;var e=tP(),t=xP(),n=lhe(),r=lr();function i(a,o){var l=r(a)?e:t;return l(a,n(o))}return Tx=i,Tx}var Nx,y$;function uhe(){if(y$)return Nx;y$=1;var e=cm(),t=DE(),n=IE(),r=Ls(),i=zs(),a=fm(),o=200;function l(c,f,d,p){var m=-1,g=t,_=!0,S=c.length,b=[],x=f.length;if(!S)return b;d&&(f=r(f,i(d))),p?(g=n,_=!1):f.length>=o&&(g=a,_=!1,f=new e(f));e:for(;++m<S;){var w=c[m],v=d==null?w:d(w);if(w=p||w!==0?w:0,_&&v===v){for(var k=x;k--;)if(f[k]===v)continue e;b.push(w)}else g(f,v,p)||b.push(w)}return b}return Nx=l,Nx}var Ox,b$;function che(){if(b$)return Ox;b$=1;var e=uhe(),t=qs(),n=LE(),r=t(function(i,a){return n(i)?e(i,a):[]});return Ox=r,Ox}var Rx,v$;function PP(){if(v$)return Rx;v$=1;const e=$P(),t=DP(),n=pm(),r=PE(),i=zE(),a=che();function o(S){for(const b in S)f(S,b)&&g(S[b])&&delete S[b];return S}const l=S=>r(t(S.map(d))),c=(S,b)=>S.map(x=>x&&x[b]),f=(S,b)=>Object.prototype.hasOwnProperty.call(S,b),d=S=>n(S)||Array.isArray(S)?Object.keys(S):[],p=S=>S!==void 0,m=S=>n(S)||S===!0||S===!1,g=S=>!d(S).length&&S!==!1&&S!==!0;return Rx={allUniqueKeys:l,deleteUndefinedProps:o,getValues:c,has:f,isEmptySchema:g,isSchema:m,keys:d,notUndefined:p,uniqWith:i,withoutArr:(S,...b)=>a.apply(null,[S].concat(e(b)))},Rx}var jx,_$;function fhe(){if(_$)return jx;_$=1;const e=qE(),t=IP(),{allUniqueKeys:n,deleteUndefinedProps:r,getValues:i,keys:a,notUndefined:o,uniqWith:l,withoutArr:c}=PP();function f(p){t(p,function(m,g){m===!1&&delete p[g]})}function d(p,m){return n(p).reduce(function(_,S){const b=i(p,S),x=l(b.filter(o),e);return _[S]=m(x,S),_},{})}return jx={keywords:["properties","patternProperties","additionalProperties"],resolver(p,m,g,_){_.ignoreAdditionalProperties||(p.forEach(function(b){const x=p.filter(C=>C!==b),w=a(b.properties),k=a(b.patternProperties).map(C=>new RegExp(C));x.forEach(function(C){const T=a(C.properties),N=T.filter($=>k.some(M=>M.test($)));c(T,w,N).forEach(function($){C.properties[$]=g.properties([C.properties[$],b.additionalProperties],$)})})}),p.forEach(function(b){const x=p.filter(v=>v!==b),w=a(b.patternProperties);b.additionalProperties===!1&&x.forEach(function(v){const k=a(v.patternProperties);c(k,w).forEach(T=>delete v.patternProperties[T])})}));const S={additionalProperties:g.additionalProperties(p.map(b=>b.additionalProperties)),patternProperties:d(p.map(b=>b.patternProperties),g.patternProperties),properties:d(p.map(b=>b.properties),g.properties)};return S.additionalProperties===!1&&f(S.properties),r(S)}},jx}var Mx,x$;function dhe(){if(x$)return Mx;x$=1;const e=qE(),t=IP(),{allUniqueKeys:n,deleteUndefinedProps:r,has:i,isSchema:a,notUndefined:o,uniqWith:l}=PP();function c(m){t(m,function(g,_){g===!1&&m.splice(_,1)})}function f(m,g){return m.map(function(_){if(_)if(Array.isArray(_.items)){const S=_.items[g];if(a(S))return S;if(i(_,"additionalItems"))return _.additionalItems}else return _.items})}function d(m){return m.map(function(g){if(g)return Array.isArray(g.items)?g.additionalItems:g.items})}function p(m,g,_){return n(_).reduce(function(b,x){const w=f(m,x),v=l(w.filter(o),e);return b[x]=g(v,x),b},[])}return Mx={keywords:["items","additionalItems"],resolver(m,g,_){const S=m.map(v=>v.items),b=S.filter(o),x={};b.every(a)?x.items=_.items(S):x.items=p(m,_.items,S);let w;return b.every(Array.isArray)?w=m.map(v=>v.additionalItems):b.some(Array.isArray)&&(w=d(m)),w&&(x.additionalItems=_.additionalItems(w)),x.additionalItems===!1&&Array.isArray(x.items)&&c(x.items),r(x)}},Mx}var $x,w$;function hhe(){if(w$)return $x;w$=1;const e=tde(),t=qE(),n=Wde(),r=rhe(),i=$P(),a=DP(),o=ihe(),l=TP(),c=gP(),f=pm(),d=ohe(),p=SP(),m=PE(),g=zE(),_=fhe(),S=dhe(),b=(re,de)=>re.indexOf(de)!==-1,x=re=>f(re)||re===!0||re===!1,w=re=>re===!1,v=re=>re===!0,k=(re,de,Q)=>Q(re),C=re=>p(m(a(re))),T=re=>re!==void 0,N=re=>m(a(re.map(X))),j=re=>re[0],$=re=>C(re),M=re=>Math.max.apply(Math,re),q=re=>Math.min.apply(Math,re),F=re=>re.some(v),B=re=>g(i(re),c);function I(re){return function(de,Q){return t({[re]:de},{[re]:Q})}}function V(re){let{allOf:de=[],...Q}=re;return Q=f(re)?Q:re,[Q,...de.map(V)]}function H(re,de){return re.map(Q=>Q&&Q[de])}function G(re,de){return re.map(function(Q,J){try{return de(Q,J)}catch{return}}).filter(T)}function X(re){return f(re)||Array.isArray(re)?Object.keys(re):[]}function W(re,de){if(de=de||[],!re.length)return de;const Q=re.slice(0).shift(),J=re.slice(1);return de.length?W(J,i(de.map(oe=>Q.map(fe=>[fe].concat(oe))))):W(J,Q.map(oe=>oe))}function L(re,de){let Q;try{Q=re.map(function(J){return JSON.stringify(J,null,2)}).join(`
244
+ `)}catch{Q=re.join(", ")}throw new Error('Could not resolve values for path:"'+de.join(".")+`". They are probably incompatible. Values:
245
+ `+Q)}function P(re,de,Q,J,oe,fe){if(re.length){const me=oe.complexResolvers[de];if(!me||!me.resolver)throw new Error("No resolver found for "+de);const we=Q.map(Ye=>re.reduce((Ve,$e)=>(Ye[$e]!==void 0&&(Ve[$e]=Ye[$e]),Ve),{})),ke=g(we,t),Ze=me.keywords.reduce((Ye,Ve)=>({...Ye,[Ve]:($e,qe=[])=>J($e,null,fe.concat(Ve,qe))}),{}),Le=me.resolver(ke,fe.concat(de),Ze,oe);return f(Le)||L(ke,fe.concat(de)),Le}}function Z(re){return{required:re}}const R=["properties","patternProperties","definitions","dependencies"],D=["anyOf","oneOf"],U=["additionalProperties","additionalItems","contains","propertyNames","not","items"],Y={type(re){if(re.some(Array.isArray)){const de=re.map(function(J){return Array.isArray(J)?J:[J]}),Q=o.apply(null,de);if(Q.length===1)return Q[0];if(Q.length>1)return m(Q)}},dependencies(re,de,Q){return N(re).reduce(function(oe,fe){const me=H(re,fe);let we=g(me.filter(T),c);const ke=we.filter(Array.isArray);if(ke.length){if(ke.length===we.length)oe[fe]=C(we);else{const Ze=we.filter(x),Le=ke.map(Z);oe[fe]=Q(Ze.concat(Le),fe)}return oe}return we=g(we,t),oe[fe]=Q(we,fe),oe},{})},oneOf(re,de,Q){const J=W(e(re)),oe=G(J,Q),fe=g(oe,t);if(fe.length)return fe},not(re){return{anyOf:re}},pattern(re){return re.map(de=>"(?="+de+")").join("")},multipleOf(re){let de=re.slice(0),Q=1;for(;de.some(J=>!Number.isInteger(J));)de=de.map(J=>J*10),Q=Q*10;return n(de)/Q},enum(re){const de=l.apply(null,re.concat(c));if(de.length)return p(de)}};Y.$id=j,Y.$ref=j,Y.$schema=j,Y.additionalItems=k,Y.additionalProperties=k,Y.anyOf=Y.oneOf,Y.contains=k,Y.default=j,Y.definitions=Y.dependencies,Y.description=j,Y.examples=B,Y.exclusiveMaximum=q,Y.exclusiveMinimum=M,Y.items=S,Y.maximum=q,Y.maxItems=q,Y.maxLength=q,Y.maxProperties=q,Y.minimum=M,Y.minItems=M,Y.minLength=M,Y.minProperties=M,Y.properties=_,Y.propertyNames=k,Y.required=$,Y.title=j,Y.uniqueItems=F;const ne={properties:_,items:S};function ae(re,de,Q){de=r(de,{ignoreAdditionalProperties:!1,resolvers:Y,complexResolvers:ne,deep:!0});const J=Object.entries(de.complexResolvers);function oe(we,ke,Ze){we=e(we.filter(T)),Ze=Ze||[];const Le=f(ke)?ke:{};if(!we.length)return;if(we.some(w))return!1;if(we.every(v))return!0;we=we.filter(f);const Ye=N(we);if(de.deep&&b(Ye,"allOf"))return ae({allOf:we},de);const Ve=J.map(([$e,qe])=>Ye.filter(We=>qe.keywords.includes(We)));return Ve.forEach($e=>d(Ye,$e)),Ye.forEach(function($e){const qe=H(we,$e),We=g(qe.filter(T),I($e));if(We.length===1&&b(D,$e))Le[$e]=We[0].map(Tt=>oe([Tt],Tt));else if(We.length===1&&!b(R,$e)&&!b(U,$e))Le[$e]=We[0];else{const Tt=de.resolvers[$e]||de.resolvers.defaultResolver;if(!Tt)throw new Error("No resolver found for key "+$e+". You can provide a resolver for this keyword in the options, or provide a default resolver.");const pe=(_e,Te=[])=>oe(_e,null,Ze.concat($e,Te));Le[$e]=Tt(We,Ze.concat($e),pe,de),Le[$e]===void 0?L(We,Ze.concat($e)):Le[$e]===void 0&&delete Le[$e]}}),J.reduce(($e,[qe,We],Tt)=>({...$e,...P(Ve[Tt],qe,we,oe,de,Ze)}),Le)}const fe=a(V(re));return oe(fe)}return ae.options={resolvers:Y},$x=ae,$x}var phe=hhe();const mhe=qn(phe);function cl(e){let t;const n=Re(e,"discriminator.propertyName",void 0);return tm(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function yc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}var ghe=pE(function(e){return Q8(Lc(e,1,vp,!0))});function Fi(e){let{type:t}=e;return!t&&e.const?yc(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function Bi(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,i)=>{const a=e?e[i]:{},o=t[i];return e&&i in e&&lt(o)?r[i]=Bi(a,o):e&&t&&(Fi(e)==="object"||Fi(t)==="object")&&i===kae&&Array.isArray(a)&&Array.isArray(o)?r[i]=ghe(a,o):r[i]=o,r},n)}function nr(e,t,n={},r,i){return Kr(e,t,n,r,void 0,void 0,i)[0]}function yhe(e,t,n,r,i,a,o){const{if:l,then:c,else:f,...d}=t,p=e.isValid(l,a||{},n);let m=[d],g=[];if(r)c&&typeof c!="boolean"&&(g=g.concat(Kr(e,c,n,a,r,i,o))),f&&typeof f!="boolean"&&(g=g.concat(Kr(e,f,n,a,r,i,o)));else{const _=p?c:f;_&&typeof _!="boolean"&&(g=g.concat(Kr(e,_,n,a,r,i,o)))}return g.length&&(m=g.map(_=>Bi(d,_))),m.flatMap(_=>Kr(e,_,n,a,r,i,o))}function zP(e){return e.reduce((n,r)=>r.length>1?r.flatMap(i=>Z8(n.length,a=>[...n[a]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function bhe(e,t,n,r,i,a,o){const l=LP(e,t,n,r,i,a);if(l.length>1||l[0]!==t)return l;if(Hp in t)return qP(e,t,n,r,i,a).flatMap(f=>Kr(e,f,n,a,r,i,o));if(gl in t&&Array.isArray(t.allOf)){const c=t.allOf.map(d=>Kr(e,d,n,a,r,i,o));return zP(c).map(d=>({...t,allOf:d}))}return[t]}function LP(e,t,n,r,i,a,o){const l=bc(t,n,i);return l!==t?Kr(e,l,n,a,r,i,o):[t]}function bc(e,t,n){if(!lt(e))return e;let r=e;if(sn in r){const{$ref:i,...a}=r;if(n.includes(i))return r;n.push(i),r={...P8(i,t),...a}}if(Ht in r){const i=[],a=Ice(r[Ht],(o,l,c)=>{const f=[...n];o[c]=bc(l,t,f),i.push(f)},{});Fce(n,Qce(Uce(i))),r={...r,[Ht]:a}}return Da in r&&!Array.isArray(r.items)&&typeof r.items!="boolean"&&(r={...r,items:bc(r.items,t,n)}),Lt(e,r)?e:r}function vhe(e,t,n,r,i){const a={...t,properties:{...t.properties}},o=r&&lt(r)?r:{};return Object.keys(o).forEach(l=>{if(l in a.properties)return;let c={};typeof a.additionalProperties!="boolean"?sn in a.additionalProperties?c=nr(e,{$ref:Re(a.additionalProperties,[sn])},n,o,i):"type"in a.additionalProperties?c={...a.additionalProperties}:$r in a.additionalProperties||tr in a.additionalProperties?c={type:"object",...a.additionalProperties}:c={type:yc(Re(o,[l]))}:c={type:yc(Re(o,[l]))},a.properties[l]=c,gn(a.properties,[l,$c],!0)}),a}function Kr(e,t,n,r,i=!1,a=[],o){return lt(t)?bhe(e,t,n,i,a,r,o).flatMap(c=>{var f;let d=c;if(Sae in d)return yhe(e,d,n,i,a,r,o);if(gl in d){if(i){const{allOf:m,...g}=d;return[...m,g]}try{const m=[],g=[];(f=d.allOf)===null||f===void 0||f.forEach(_=>{typeof _=="object"&&_.contains?m.push(_):g.push(_)}),m.length&&(d={...d,allOf:g}),d=o?o(d):mhe(d,{deep:!1}),m.length&&(d.allOf=m)}catch(m){console.warn(`could not merge subschemas in allOf:
246
+ `,m);const{allOf:g,..._}=d;return _}}return Xw in d&&d.additionalProperties!==!1?vhe(e,d,n,r,o):d}):[{}]}function _he(e,t,n,r,i){let a;const{oneOf:o,anyOf:l,...c}=t;if(Array.isArray(o)?a=o:Array.isArray(l)&&(a=l),a){const f=i===void 0&&r?{}:i,d=cl(t);a=a.map(m=>bc(m,n,[]));const p=dE(e,f,a,n,d);if(r)return a.map(m=>Bi(c,m));t=Bi(c,a[p])}return[t]}function qP(e,t,n,r,i,a,o){const{dependencies:l,...c}=t;return _he(e,c,n,r,a).flatMap(d=>FP(e,l,d,n,r,i,a,o))}function FP(e,t,n,r,i,a,o,l){let c=[n];for(const f in t){if(!i&&Re(o,[f])===void 0||n.properties&&!(f in n.properties))continue;const[d,p]=cE(f,t);return Array.isArray(p)?c[0]=xhe(n,p):lt(p)&&(c=whe(e,n,r,f,p,i,a,o,l)),c.flatMap(m=>FP(e,d,m,r,i,a,o,l))}return c}function xhe(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function whe(e,t,n,r,i,a,o,l,c){return Kr(e,i,n,l,a,o,c).flatMap(d=>{const{oneOf:p,...m}=d;if(t=Bi(t,m),p===void 0)return t;const g=p.map(S=>typeof S=="boolean"||!(sn in S)?[S]:LP(e,S,n,a,o,l));return zP(g).flatMap(S=>She(e,t,n,r,S,a,o,l,c))})}function She(e,t,n,r,i,a,o,l,c){const f=i.filter(d=>{if(typeof d=="boolean"||!d||!d.properties)return!1;const{[r]:p}=d.properties;if(p){const m={type:"object",properties:{[r]:p}};return e.isValid(m,l,n)||a}return!1});return!a&&f.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):f.flatMap(d=>{const p=d,[m]=cE(r,p.properties),g={...p,properties:m};return Kr(e,g,n,l,a,o,c).map(S=>Bi(t,S))})}const Ehe={type:"object",$id:Eae,properties:{__not_really_there__:{type:"number"}}};function rS(e,t,n,r,i){let a=0;return n&&(Dt(n.properties)?a+=xce(n.properties,(o,l,c)=>{const f=Re(r,c);if(typeof l=="boolean")return o;if(Tn(l,sn)){const d=nr(e,l,t,f,i);return o+rS(e,t,d,f||{},i)}if((Tn(l,tr)||Tn(l,$r))&&f){const d=Tn(l,tr)?tr:$r,p=cl(l);return o+vc(e,t,f,Re(l,d),-1,p,i)}if(l.type==="object")return Dt(f)&&(o+=1),o+rS(e,t,l,f,i);if(l.type===yc(f)){let d=o+1;return l.default?d+=f===l.default?1:-1:l.const&&(d+=f===l.const?1:-1),d}return o},0):tm(n.type)&&n.type===yc(r)&&(a+=1)),a}function vc(e,t,n,r,i=-1,a,o){const l=r.map(m=>bc(m,t,[])),c=Y8(n,r,a);if(L8(c))return c;const f=l.reduce((m,g,_)=>(dE(e,n,[Ehe,g],t,a)===1&&m.push(_),m),[]);if(f.length===1)return f[0];f.length||Z8(l.length,m=>f.push(m));const d=new Set,{bestIndex:p}=f.reduce((m,g)=>{const{bestScore:_}=m,S=l[g],b=rS(e,t,S,n,o);return d.add(b),b>_?{bestIndex:g,bestScore:b}:m},{bestIndex:i,bestScore:0});return d.size===1&&i>=0?i:p}function iS(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>lt(t))}function Qu(e){return e==null}function _c(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){const a=Array.isArray(e)?e:[],o=i?a:t,l=i?t:a,c=o.map((f,d)=>l[d]!==void 0?_c(a[d],t[d],n,r,i):f);return(n||i)&&c.length<l.length&&c.push(...l.slice(c.length)),c}if(lt(t)){const a=Object.assign({},e);return Object.keys(t).reduce((o,l)=>{const c=Re(t,l),f=lt(e)&&l in e,d=l in t;return o[l]=_c(e?Re(e,l):{},c,n,r,i&&(f||!d)),o},a)}return r&&(!Qu(e)&&Qu(t)||typeof t=="number"&&isNaN(t))||i&&!Qu(t)?e:t}function $i(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{const a=e?e[i]:{},o=t[i];if(e&&i in e&&lt(o))r[i]=$i(a,o,n);else if(n&&Array.isArray(a)&&Array.isArray(o)){let l=o;n==="preventDuplicates"&&(l=o.reduce((c,f)=>(a.includes(f)||c.push(f),c),[])),r[i]=a.concat(l)}else r[i]=o;return r},Object.assign({},e))}function BP(e){return Array.isArray(e.enum)&&e.enum.length===1||qi in e}function BE(e,t,n={},r){const i=nr(e,t,n,void 0,r),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(o=>typeof o!="boolean"&&BP(o)):!1}function UE(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:BE(e,t.items,n,r)}function UP(e){const t=e[qi],n=Fi(e);return lt(t)&&tm(t?.$data)&&n!=="object"&&n!=="array"}function khe(e){if(wae in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(qi in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function xc(e,t){const n=e;if(e.enum){let a;if(t){const{enumNames:o}=ot(t);a=o}return!a&&n.enumNames&&(a=n.enumNames),e.enum.map((o,l)=>({label:a?.[l]||String(o),value:o}))}let r,i;return e.anyOf?(r=e.anyOf,i=t?.anyOf):e.oneOf&&(r=e.oneOf,i=t?.oneOf),r&&r.map((a,o)=>{const{title:l}=ot(i?.[o]),c=a,f=khe(c),d=l||c.title||String(f);return{schema:c,label:d,value:f}})}const Che=["string","number","integer","boolean","null"];var fl;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(fl||(fl={}));function Dx(e,t=fl.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==fl.Ignore&&lt(e.additionalItems)?e.additionalItems:{}}function S$(e,t,n,r,i,a=[],o={},l=!1){const{emptyObjectFields:c="populateAllDefaults"}=o;if(r||l)e[t]=n;else if(c!=="skipDefaults"){const f=i===void 0?a.includes(t):i;lt(n)?c==="skipEmptyDefaults"?ul(n)||(e[t]=n):(!ul(n)||a.includes(t))&&(f||c!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(c==="populateAllDefaults"||c==="skipEmptyDefaults"||f&&a.includes(t))&&(e[t]=n)}}function Ia(e,t,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:p=!1}=n;let m=lt(i)?i:{};const g=lt(t)?t:{};let _=r,S=null,b=c,x=l;if(g[qi]!==void 0&&c?.constAsDefaults!=="never"&&!UP(g))_=g[qi];else if(lt(_)&&lt(g.default))_=$i(_,g.default);else if(xae in g&&!g[$r]&&!g[tr])_=g.default;else if(sn in g){const k=g[sn];l.includes(k)||(x=l.concat(k),S=P8(k,a)),S&&!_&&(_=g.default),p&&S&&!lt(i)&&(m=i)}else if(Hp in g){const k={...E$(e,g,n,_),...m};S=qP(e,g,a,!1,[],k,f)[0]}else if(iS(g))_=g.items.map((k,C)=>Ia(e,k,{rootSchema:a,includeUndefinedValues:o,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,parentDefaults:Array.isArray(r)?r[C]:void 0,rawFormData:m,required:d,shouldMergeDefaultsIntoFormData:p}));else if(tr in g){const{oneOf:k,...C}=g;if(k.length===0)return;const T=cl(g),{type:N="null"}=C;!Array.isArray(N)&&Che.includes(N)&&b?.constAsDefaults==="skipOneOf"&&(b={...b,constAsDefaults:"never"}),S=k[vc(e,a,i??g.default,k,0,T,f)],S=Bi(C,S)}else if($r in g){const{anyOf:k,...C}=g;if(k.length===0)return;const T=cl(g);S=k[vc(e,a,i??g.default,k,0,T,f)],S=Bi(C,S)}if(S)return Ia(e,S,{rootSchema:a,includeUndefinedValues:o,_recurseList:x,experimental_defaultFormStateBehavior:b,experimental_customMergeAllOf:f,parentDefaults:_,rawFormData:i??m,required:d,shouldMergeDefaultsIntoFormData:p});_===void 0&&(_=g.default);const w=E$(e,g,n,_);let v=w??_;if(p){const{arrayMinItems:k={}}=c||{},{mergeExtraDefaults:C}=k,T=Ahe(e,g,a,i,c,f);(!lt(i)||gl in g)&&(v=_c(v,T,C,!0))}return v}function Ahe(e,t,n,r,i,a){const o=!BP(t)&&BE(e,t,n,a);let l=r;if(o){const f=xc(t);l=f?.some(p=>Lt(p.value,r))?r:void 0}return t[qi]&&i?.constAsDefaults==="always"&&(l=t.const),l}function The(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:l=void 0,required:c,shouldMergeDefaultsIntoFormData:f}={},d){{const p=lt(n)?n:{},m=t,g=o?.allOf==="populateDefaults"&&gl in m?nr(e,m,r,p,l):m,_=g[qi],S=Object.keys(g.properties||{}).reduce((b,x)=>{var w;const v=Re(g,[Ht,x]),k=lt(_)&&_[x]!==void 0,C=(lt(v)&&qi in v||k)&&o?.constAsDefaults!=="never"&&!UP(v),T=Ia(e,v,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:l,includeUndefinedValues:i===!0,parentDefaults:Re(d,[x]),rawFormData:Re(p,[x]),required:(w=g.required)===null||w===void 0?void 0:w.includes(x),shouldMergeDefaultsIntoFormData:f});return S$(b,x,T,i,c,g.required,o,C),b},{});if(g.additionalProperties){const b=lt(g.additionalProperties)?g.additionalProperties:{},x=new Set;lt(d)&&Object.keys(d).filter(v=>!g.properties||!g.properties[v]).forEach(v=>x.add(v));const w=[];Object.keys(p).filter(v=>!g.properties||!g.properties[v]).forEach(v=>{x.add(v),w.push(v)}),x.forEach(v=>{var k;const C=Ia(e,b,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:l,includeUndefinedValues:i===!0,parentDefaults:Re(d,[v]),rawFormData:Re(p,[v]),required:(k=g.required)===null||k===void 0?void 0:k.includes(v),shouldMergeDefaultsIntoFormData:f});S$(S,v,C,i,c,w)})}return S}}function Nhe(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:o=void 0,required:l,shouldMergeDefaultsIntoFormData:c}={},f){var d,p;const m=t,g=(d=a?.arrayMinItems)!==null&&d!==void 0?d:{},{populate:_,mergeExtraDefaults:S}=g,b=_==="never",x=_==="requiredOnly",w=_==="all"||!b&&!x,v=(p=g?.computeSkipPopulate)!==null&&p!==void 0?p:()=>!1,C=a?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((F,B)=>{const I=Dx(m,fl.Fallback,B);return Ia(e,I,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,parentDefaults:F,required:l,shouldMergeDefaultsIntoFormData:c})})),Array.isArray(n)){const F=Dx(m);if(b)f=n;else{const B=n.map((V,H)=>Ia(e,F,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:V,parentDefaults:Re(f,[H]),required:l,shouldMergeDefaultsIntoFormData:c}));f=_c(f,B,(x&&l||w)&&S)}}if((lt(m)&&qi in m&&a?.constAsDefaults!=="never")===!1){if(b)return f??C;if(x&&!l)return f||void 0}const N=Array.isArray(f)?f.length:0;if(!m.minItems||UE(e,m,r,o)||v(e,m,r)||m.minItems<=N)return f||C;const j=f||[],$=Dx(m,fl.Invert),M=$.default,q=new Array(m.minItems-N).fill(Ia(e,$,{parentDefaults:M,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:l,shouldMergeDefaultsIntoFormData:c}));return j.concat(q)}function E$(e,t,n={},r){switch(Fi(t)){case"object":return The(e,t,n,r);case"array":return Nhe(e,t,n,r)}}function HP(e,t,n,r,i=!1,a,o){if(!lt(t))throw new Error("Invalid schema: "+t);const l=nr(e,t,r,n,o),c=Ia(e,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0});if(lt(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:f}=a||{};return _c(c,n,!0,f==="useDefaultIfFormDataUndefined",!0)}return c}function VP(e={}){return"widget"in ot(e)&&ot(e).widget!=="hidden"}function GP(e,t,n={},r,i){if(n[YS]==="files")return!0;if(t.items){const a=nr(e,t.items,r,void 0,i);return a.type==="string"&&a.format==="data-url"}return!1}function Ohe(e,t,n={},r,i,a){const o=ot(n,i),{label:l=!0}=o;let c=!!l;const f=Fi(t);return f==="array"&&(c=UE(e,t,r,a)||GP(e,t,n,r,a)||VP(n)),f==="object"&&(c=!1),f==="boolean"&&!n[YS]&&(c=!1),n[Cae]&&(c=!1),c}function Rhe(e,t,n){if(!n)return t;const{errors:r,errorSchema:i}=t;let a=e.toErrorList(n),o=n;return ul(i)||(o=$i(i,n,!0),a=[...r].concat(a)),{errorSchema:o,errors:a}}const Do=Symbol("no Value");function aS(e,t,n,r,i={},a){let o;if(Tn(n,Ht)){const l={};if(Tn(r,Ht)){const d=Re(r,Ht,{});Object.keys(d).forEach(p=>{Tn(i,p)&&(l[p]=void 0)})}const c=Object.keys(Re(n,Ht,{})),f={};c.forEach(d=>{const p=Re(i,d);let m=Re(r,[Ht,d],{}),g=Re(n,[Ht,d],{});Tn(m,sn)&&(m=nr(e,m,t,p,a)),Tn(g,sn)&&(g=nr(e,g,t,p,a));const _=Re(m,"type"),S=Re(g,"type");if(!_||_===S)if(Tn(l,d)&&delete l[d],S==="object"||S==="array"&&Array.isArray(p)){const b=aS(e,t,g,m,p,a);(b!==void 0||S==="array")&&(f[d]=b)}else{const b=Re(g,"default",Do),x=Re(m,"default",Do);b!==Do&&b!==p&&(x===p?l[d]=b:Re(g,"readOnly")===!0&&(l[d]=void 0));const w=Re(g,"const",Do),v=Re(m,"const",Do);w!==Do&&w!==p&&(l[d]=v===p?w:void 0)}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...l,...f}}else if(Re(r,"type")==="array"&&Re(n,"type")==="array"&&Array.isArray(i)){let l=Re(r,"items"),c=Re(n,"items");if(typeof l=="object"&&typeof c=="object"&&!Array.isArray(l)&&!Array.isArray(c)){Tn(l,sn)&&(l=nr(e,l,t,i,a)),Tn(c,sn)&&(c=nr(e,c,t,i,a));const f=Re(l,"type"),d=Re(c,"type");if(!f||f===d){const p=Re(n,"maxItems",-1);d==="object"?o=i.reduce((m,g)=>{const _=aS(e,t,c,l,g,a);return _!==void 0&&(p<0||m.length<p)&&m.push(_),m},[]):o=p>0&&i.length>p?i.slice(0,p):i}}else typeof l=="boolean"&&typeof c=="boolean"&&l===c&&(o=i)}return o}function $h(e,t,n,r,i,a,o,l=[],c){if(sn in t||Hp in t||gl in t){const p=nr(e,t,a,o,c);if(l.findIndex(g=>Lt(g,p))===-1)return $h(e,p,n,r,i,a,o,l.concat(p),c)}if(Da in t&&!Re(t,[Da,sn]))return $h(e,Re(t,Da),n,r,i,a,o,l,c);const d={$id:i||n};if(Fi(t)==="object"&&Ht in t)for(const p in t.properties){const m=Re(t,[Ht,p]),g=d[Ma]+r+p;d[p]=$h(e,lt(m)?m:{},n,r,g,a,Re(o,[p]),l,c)}return d}function jhe(e,t,n,r,i,a="root",o="_",l){return $h(e,t,a,o,n,r,i,void 0,l)}function ps(e,t,n,r,i,a=[],o){if(sn in t||Hp in t||gl in t){const c=nr(e,t,r,i,o);if(a.findIndex(d=>Lt(d,c))===-1)return ps(e,c,n,r,i,a.concat(c),o)}let l={[Mh]:n.replace(/^\./,"")};if(tr in t||$r in t){const c=tr in t?t.oneOf:t.anyOf,f=cl(t),d=vc(e,r,i,c,0,f,o),p=c[d];l={...l,...ps(e,p,n,r,i,a,o)}}if(Xw in t&&t[Xw]!==!1&&gn(l,ZS,!0),Da in t&&Array.isArray(i)){const{items:c,additionalItems:f}=t;Array.isArray(c)?i.forEach((d,p)=>{c[p]?l[p]=ps(e,c[p],`${n}.${p}`,r,d,a,o):f?l[p]=ps(e,f,`${n}.${p}`,r,d,a,o):console.warn(`Unable to generate path schema for "${n}.${p}". No schema defined for it`)}):i.forEach((d,p)=>{l[p]=ps(e,c,`${n}.${p}`,r,d,a,o)})}else if(Ht in t)for(const c in t.properties){const f=Re(t,[Ht,c]);l[c]=ps(e,f,`${n}.${c}`,r,Re(i,[c]),a,o)}return l}function Mhe(e,t,n="",r,i,a){return ps(e,t,n,r,i,void 0,a)}class $he{constructor(t,n,r,i){this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},i){return!t||!n?!1:this.validator!==t||!Lt(this.rootSchema,n)||!Lt(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}getDefaultFormState(t,n,r=!1){return HP(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf)}getDisplayLabel(t,n,r){return Ohe(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,i){return vc(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return dE(this.validator,t,n,this.rootSchema,r)}getMatchingOption(t,n,r){return K8(this.validator,t,n,this.rootSchema,r)}isFilesArray(t,n){return GP(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return UE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return BE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}mergeValidationData(t,n){return Rhe(this.validator,t,n)}retrieveSchema(t,n){return nr(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf)}sanitizeDataForNewSchema(t,n,r){return aS(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toIdSchema(t,n,r,i="root",a="_"){return jhe(this.validator,t,n,this.rootSchema,r,i,a,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return Mhe(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function Dhe(e,t,n={},r){return new $he(e,t,n,r)}function Ihe(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,a]=r,[o,...l]=i.split(";"),c=o||"",f=decodeURI(((t=l.map(d=>d.split("=")).find(([d])=>d==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const d=atob(a),p=new Array(d.length);for(let g=0;g<d.length;g++)p[g]=d.charCodeAt(g);return{blob:new window.Blob([new Uint8Array(p)],{type:c}),name:f}}catch(d){throw new Error("File is invalid: "+d.message)}}function Aa(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function ZP(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return ZP(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:Aa(r,2)});return n}function Phe(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((i,a)=>{const o=r.findIndex(l=>l===`%${a+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function zhe(e,t){return Phe(e,t)}function Jr(e,t=[],n){if(Array.isArray(e))return e.map(a=>Jr(a,t)).filter(a=>a!==n);const r=e===""||e===null?-1:Number(e),i=t[r];return i?i.value:n}function Lhe(e,t,n=[]){const r=Jr(e,n);return Array.isArray(t)?t.filter(i=>!Lt(i,r)):Lt(r,t)?void 0:t}function HE(e,t){return Array.isArray(t)?t.some(n=>Lt(n,e)):Lt(t,e)}function qhe(e,t=[],n=!1){const r=t.map((i,a)=>HE(i.value,e)?String(a):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Fhe(e,t,n=[]){const r=Jr(e,n);if(!Qu(r)){const i=n.findIndex(l=>r===l.value),a=n.map(({value:l})=>l);return t.slice(0,i).concat(r,t.slice(i)).sort((l,c)=>+(a.indexOf(l)>a.indexOf(c)))}return t}var Bhe=1,Uhe=4;function YP(e){return Wu(e,Bhe|Uhe)}function Hhe(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:hE(e,t,n,r)}class Vhe{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?Re(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},Hhe(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?YP(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let i=Re(r,Jn);return Array.isArray(i)||(i=[],r[Jn]=i),Array.isArray(t)?gn(r,Jn,[...new Set([...i,...t])]):gn(r,Jn,[...new Set([...i,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(t)?[...new Set([...t])]:[t];return gn(r,Jn,i),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return gn(n,Jn,[]),this}}function Ghe(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:a,year:o,hour:l,minute:c,second:f}=e,d={type:"day",range:[1,31],value:i},p={type:"month",range:[1,12],value:a},m={type:"year",range:n,value:o},g=[];switch(r){case"MDY":g.push(p,d,m);break;case"DMY":g.push(d,p,m);break;case"YMD":default:g.push(m,p,d)}return t&&g.push({type:"hour",range:[0,23],value:l},{type:"minute",range:[0,59],value:c},{type:"second",range:[0,59],value:f}),g}function Zhe(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function Yhe(e,t,n={},r=!0){const i={type:t||"text",...Zhe(e)};return n.inputType?i.type=n.inputType:t||(e.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}const k$={props:{disabled:!1},submitText:"Submit",norender:!1};function Khe(e={}){const t=ot(e);if(t&&t[pp]){const n=t[pp];return{...k$,...n}}return k$}function bt(e,t,n={}){const{templates:r}=t;return e==="ButtonTemplates"?r[e]:n[e]||r[e]}var Ix={exports:{}},gt={};/**
247
+ * @license React
248
+ * react-is.production.min.js
249
+ *
250
+ * Copyright (c) Facebook, Inc. and its affiliates.
251
+ *
252
+ * This source code is licensed under the MIT license found in the
253
+ * LICENSE file in the root directory of this source tree.
254
+ */var C$;function Xhe(){if(C$)return gt;C$=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),_;_=Symbol.for("react.module.reference");function S(b){if(typeof b=="object"&&b!==null){var x=b.$$typeof;switch(x){case e:switch(b=b.type,b){case n:case i:case r:case f:case d:return b;default:switch(b=b&&b.$$typeof,b){case l:case o:case c:case m:case p:case a:return b;default:return x}}case t:return x}}}return gt.ContextConsumer=o,gt.ContextProvider=a,gt.Element=e,gt.ForwardRef=c,gt.Fragment=n,gt.Lazy=m,gt.Memo=p,gt.Portal=t,gt.Profiler=i,gt.StrictMode=r,gt.Suspense=f,gt.SuspenseList=d,gt.isAsyncMode=function(){return!1},gt.isConcurrentMode=function(){return!1},gt.isContextConsumer=function(b){return S(b)===o},gt.isContextProvider=function(b){return S(b)===a},gt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},gt.isForwardRef=function(b){return S(b)===c},gt.isFragment=function(b){return S(b)===n},gt.isLazy=function(b){return S(b)===m},gt.isMemo=function(b){return S(b)===p},gt.isPortal=function(b){return S(b)===t},gt.isProfiler=function(b){return S(b)===i},gt.isStrictMode=function(b){return S(b)===r},gt.isSuspense=function(b){return S(b)===f},gt.isSuspenseList=function(b){return S(b)===d},gt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===f||b===d||b===g||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===p||b.$$typeof===a||b.$$typeof===o||b.$$typeof===c||b.$$typeof===_||b.getModuleId!==void 0)},gt.typeOf=S,gt}var A$;function Whe(){return A$||(A$=1,Ix.exports=Xhe()),Ix.exports}var Qhe=Whe();const T$=qn(Qhe),Px={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function Jhe(e){let t=Re(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...i})=>O.jsx(e,{options:{...n,...r},...i}),gn(e,"MergedWidget",t)}return t}function Pi(e,t,n={}){const r=Fi(e);if(typeof t=="function"||t&&T$.isForwardRef(ee.createElement(t))||T$.isMemo(t))return Jhe(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t}`);if(t in n){const i=n[t];return Pi(e,i,n)}if(typeof r=="string"){if(!(r in Px))throw new Error(`No widget for type '${r}'`);if(t in Px[r]){const i=n[Px[r][t]];return Pi(e,i,n)}}throw new Error(`No widget '${t}' for type '${r}'`)}function epe(e){let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t.toString(16)}function tpe(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),epe(JSON.stringify(e,Array.from(t).sort()))}function npe(e,t,n={}){try{return Pi(e,t,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function Uc(e,t){return`${tm(e)?e:e[Ma]}__${t}`}function Hc(e){return Uc(e,"description")}function KP(e){return Uc(e,"error")}function sS(e){return Uc(e,"examples")}function XP(e){return Uc(e,"help")}function WP(e){return Uc(e,"title")}function Fs(e,t=!1){const n=t?` ${sS(e)}`:"";return`${KP(e)} ${Hc(e)} ${XP(e)}${n}`}function QP(e,t){return`${e}-${t}`}function rpe(e,t,n){return t?n:e}function ipe(e){return e?new Date(e).toJSON():void 0}function ape(e,t){if(!Array.isArray(t))return e;const n=d=>d.reduce((p,m)=>(p[m]=!0,p),{}),r=d=>d.length>1?`properties '${d.join("', '")}'`:`property '${d[0]}'`,i=n(e),a=t.filter(d=>d==="*"||i[d]),o=n(a),l=e.filter(d=>!o[d]),c=a.indexOf("*");if(c===-1){if(l.length)throw new Error(`uiSchema order list does not contain ${r(l)}`);return a}if(c!==a.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const f=[...a];return f.splice(c,1,...l),f}function zx(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function Dh(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Dh(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Dh(e.oneOf[0]);if(e.allOf){const t=n=>Dh(n);return e.allOf.some(t)}return!1}function spe(e,t,n){const{props:r,state:i}=e;return!Lt(r,t)||!Lt(i,n)}function N$(e,t=!0){const{year:n,month:r,day:i,hour:a=0,minute:o=0,second:l=0}=e,c=Date.UTC(n,r-1,i,a,o,l),f=new Date(c).toJSON();return t?f:f.slice(0,10)}function wc(e,t=[]){if(!e)return[];let n=[];return Jn in e&&(n=n.concat(e[Jn].map(r=>{const i=`.${t.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(e).reduce((r,i)=>{if(i!==Jn){const a=e[i];Ts(a)&&(r=r.concat(wc(a,[...t,i])))}return r},n)}function JP(e){return on(e)?Qp(e,Ds):Pc(e)?[e]:oE(x8(rE(e)))}function ope(e){const t=new Vhe;return e.length&&e.forEach(n=>{const{property:r,message:i}=n,a=r==="."?[]:JP(r);a.length>0&&a[0]===""&&a.splice(0,1),i&&t.addErrors(i,a)}),t.ErrorSchema}function VE(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return Ts(r)?{...t,[n]:VE(r)}:{...t,[n]:r}}},{})}function lpe(e){if(!e)return"";const t=new Date(e),n=Aa(t.getFullYear(),4),r=Aa(t.getMonth()+1,2),i=Aa(t.getDate(),2),a=Aa(t.getHours(),2),o=Aa(t.getMinutes(),2),l=Aa(t.getSeconds(),2),c=Aa(t.getMilliseconds(),3);return`${n}-${r}-${i}T${a}:${o}:${l}.${c}`}function Ih(e,t){if(!t)return e;const{errors:n,errorSchema:r}=e;let i=wc(t),a=t;return ul(r)||(a=$i(r,t,!0),i=[...n].concat(i)),{errorSchema:a,errors:i}}function upe(e){for(const t in e){const n=e,r=n[t];t===sn&&typeof r=="string"&&r.startsWith("#")?n[t]=o8+r:n[t]=GE(r)}return e}function cpe(e){for(let t=0;t<e.length;t++)e[t]=GE(e[t]);return e}function GE(e){return Array.isArray(e)?cpe([...e]):Dt(e)?upe({...e}):e}function ez(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],l=Jp(e,o);n(l,o)&&hE(a,bl(o,e),l)}return a}function fpe(e,t){if(e==null)return{};var n=Qp(lE(e),function(r){return[r]});return t=fE(t),ez(e,n,function(r,i){return t(r,i[0])})}var dpe=200;function hpe(e,t,n,r){var i=-1,a=W8,o=!0,l=e.length,c=[],f=t.length;if(!l)return c;t.length>=dpe&&(a=KS,o=!1,t=new sl(t));e:for(;++i<l;){var d=e[i],p=d;if(d=d!==0?d:0,o&&p===p){for(var m=f;m--;)if(t[m]===p)continue e;c.push(d)}else a(t,p,r)||c.push(d)}return c}var ppe=pE(function(e,t){return vp(e)?hpe(e,Lc(t,1,vp,!0)):[]});function mpe(e,t){const n=Ts(e),r=Ts(t);if(e===t||!n&&!r)return[];if(n&&!r)return Yr(e);if(!n&&r)return Yr(t);{const i=Yr(fpe(e,(o,l)=>!Lt(o,Re(t,l)))),a=ppe(Yr(t),Yr(e));return[...i,...a]}}var Ot;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(Ot||(Ot={}));function gpe(e,t){var n=on(e)?iE:B8;return n(e,G8(t))}function ype(e,t){return ez(e,t,function(n,r){return V8(e,r)})}var O$=D8(function(e,t){return e==null?{}:ype(e,t)}),bpe=0;function vpe(e){var t=++bpe;return rE(e)+t}function oS(){return vpe("rjsf-array-item-")}function R$(e){return Array.isArray(e)?e.map(t=>({key:oS(),item:t})):[]}function Ou(e){return Array.isArray(e)?e.map(t=>t.item):[]}class _pe extends ee.Component{constructor(t){super(t);const{formData:n=[]}=t,r=R$(n);this.state={keyedFormData:r,updatedKeyedFormData:!1}}static getDerivedStateFromProps(t,n){if(n.updatedKeyedFormData)return{updatedKeyedFormData:!1};const r=Array.isArray(t.formData)?t.formData:[],i=n.keyedFormData||[];return{keyedFormData:r.length===i.length?i.map((o,l)=>({key:o.key,item:r[l]})):R$(r)}}get itemTitle(){const{schema:t,registry:n}=this.props,{translateString:r}=n;return Re(t,[Da,"title"],Re(t,[Da,"description"],r(Ot.ArrayItemTitle)))}isItemRequired(t){return Array.isArray(t.type)?!t.type.includes("null"):t.type!=="null"}canAddItem(t){const{schema:n,uiSchema:r,registry:i}=this.props;let{addable:a}=ot(r,i.globalUiOptions);return a!==!1&&(n.maxItems!==void 0?a=t.length<n.maxItems:a=!0),a}_getNewFormDataRow=()=>{const{schema:t,registry:n}=this.props,{schemaUtils:r}=n;let i=t.items;return iS(t)&&_ae(t)&&(i=t.additionalItems),r.getDefaultFormState(i)};_handleAddClick(t,n){t&&t.preventDefault();const{onChange:r,errorSchema:i}=this.props,{keyedFormData:a}=this.state;let o;if(i){o={};for(const f in i){const d=parseInt(f);n===void 0||d<n?gn(o,[d],i[f]):d>=n&&gn(o,[d+1],i[f])}}const l={key:oS(),item:this._getNewFormDataRow()},c=[...a];n!==void 0?c.splice(n,0,l):c.push(l),this.setState({keyedFormData:c,updatedKeyedFormData:!0},()=>r(Ou(c),o))}onAddClick=t=>{this._handleAddClick(t)};onAddIndexClick=t=>n=>{this._handleAddClick(n,t)};onCopyIndexClick=t=>n=>{n&&n.preventDefault();const{onChange:r,errorSchema:i}=this.props,{keyedFormData:a}=this.state;let o;if(i){o={};for(const f in i){const d=parseInt(f);d<=t?gn(o,[d],i[f]):d>t&&gn(o,[d+1],i[f])}}const l={key:oS(),item:YP(a[t].item)},c=[...a];t!==void 0?c.splice(t+1,0,l):c.push(l),this.setState({keyedFormData:c,updatedKeyedFormData:!0},()=>r(Ou(c),o))};onDropIndexClick=t=>n=>{n&&n.preventDefault();const{onChange:r,errorSchema:i}=this.props,{keyedFormData:a}=this.state;let o;if(i){o={};for(const c in i){const f=parseInt(c);f<t?gn(o,[f],i[c]):f>t&&gn(o,[f-1],i[c])}}const l=a.filter((c,f)=>f!==t);this.setState({keyedFormData:l,updatedKeyedFormData:!0},()=>r(Ou(l),o))};onReorderClick=(t,n)=>r=>{r&&(r.preventDefault(),r.currentTarget.blur());const{onChange:i,errorSchema:a}=this.props;let o;if(a){o={};for(const d in a){const p=parseInt(d);p==t?gn(o,[n],a[t]):p==n?gn(o,[t],a[n]):gn(o,[d],a[p])}}const{keyedFormData:l}=this.state;function c(){const d=l.slice();return d.splice(t,1),d.splice(n,0,l[t]),d}const f=c();this.setState({keyedFormData:f},()=>i(Ou(f),o))};onChangeForIndex=t=>(n,r,i)=>{const{formData:a,onChange:o,errorSchema:l}=this.props,f=(Array.isArray(a)?a:[]).map((d,p)=>t===p?typeof n>"u"?null:n:d);o(f,l&&l&&{...l,[t]:r},i)};onSelectChange=t=>{const{onChange:n,idSchema:r}=this.props;n(t,void 0,r&&r.$id)};render(){const{schema:t,uiSchema:n,idSchema:r,registry:i}=this.props,{schemaUtils:a,translateString:o}=i;if(!(Da in t)){const l=ot(n),c=bt("UnsupportedFieldTemplate",i,l);return O.jsx(c,{schema:t,idSchema:r,reason:o(Ot.MissingItems),registry:i})}return a.isMultiSelect(t)?this.renderMultiSelect():VP(n)?this.renderCustomWidget():iS(t)?this.renderFixedArray():a.isFilesArray(t,n)?this.renderFiles():this.renderNormalArray()}renderNormalArray(){const{schema:t,uiSchema:n={},errorSchema:r,idSchema:i,name:a,title:o,disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,registry:p,onBlur:m,onFocus:g,idPrefix:_,idSeparator:S="_",rawErrors:b}=this.props,{keyedFormData:x}=this.state,w=t.title||o||a,{schemaUtils:v,formContext:k}=p,C=ot(n),T=Dt(t.items)?t.items:{},N=v.retrieveSchema(T),j=Ou(this.state.keyedFormData),$=this.canAddItem(j),M={canAdd:$,items:x.map((F,B)=>{const{key:I,item:V}=F,H=V,G=v.retrieveSchema(T,H),X=r?r[B]:void 0,W=i.$id+S+B,L=v.toIdSchema(G,W,H,_,S);return this.renderArrayFieldItem({key:I,index:B,name:a&&`${a}-${B}`,title:w?`${w}-${B+1}`:void 0,canAdd:$,canMoveUp:B>0,canMoveDown:B<j.length-1,itemSchema:G,itemIdSchema:L,itemErrorSchema:X,itemData:H,itemUiSchema:n.items,autofocus:f&&B===0,onBlur:m,onFocus:g,rawErrors:b,totalItems:x.length})}),className:`field field-array field-array-of-${N.type}`,disabled:l,idSchema:i,uiSchema:n,onAddClick:this.onAddClick,readonly:c,required:d,schema:t,title:w,formContext:k,formData:j,rawErrors:b,registry:p},q=bt("ArrayFieldTemplate",p,C);return O.jsx(q,{...M})}renderCustomWidget(){const{schema:t,idSchema:n,uiSchema:r,disabled:i=!1,readonly:a=!1,autofocus:o=!1,required:l=!1,hideError:c,placeholder:f,onBlur:d,onFocus:p,formData:m=[],registry:g,rawErrors:_,name:S}=this.props,{widgets:b,formContext:x,globalUiOptions:w,schemaUtils:v}=g,{widget:k,title:C,...T}=ot(r,w),N=Pi(t,k,b),j=C??t.title??S,$=v.getDisplayLabel(t,r,w);return O.jsx(N,{id:n.$id,name:S,multiple:!0,onChange:this.onSelectChange,onBlur:d,onFocus:p,options:T,schema:t,uiSchema:r,registry:g,value:m,disabled:i,readonly:a,hideError:c,required:l,label:j,hideLabel:!$,placeholder:f,formContext:x,autofocus:o,rawErrors:_})}renderMultiSelect(){const{schema:t,idSchema:n,uiSchema:r,formData:i=[],disabled:a=!1,readonly:o=!1,autofocus:l=!1,required:c=!1,placeholder:f,onBlur:d,onFocus:p,registry:m,rawErrors:g,name:_}=this.props,{widgets:S,schemaUtils:b,formContext:x,globalUiOptions:w}=m,v=b.retrieveSchema(t.items,i),k=xc(v,r),{widget:C="select",title:T,...N}=ot(r,w),j=Pi(t,C,S),$=T??t.title??_,M=b.getDisplayLabel(t,r,w);return O.jsx(j,{id:n.$id,name:_,multiple:!0,onChange:this.onSelectChange,onBlur:d,onFocus:p,options:{...N,enumOptions:k},schema:t,uiSchema:r,registry:m,value:i,disabled:a,readonly:o,required:c,label:$,hideLabel:!M,placeholder:f,formContext:x,autofocus:l,rawErrors:g})}renderFiles(){const{schema:t,uiSchema:n,idSchema:r,name:i,disabled:a=!1,readonly:o=!1,autofocus:l=!1,required:c=!1,onBlur:f,onFocus:d,registry:p,formData:m=[],rawErrors:g}=this.props,{widgets:_,formContext:S,globalUiOptions:b,schemaUtils:x}=p,{widget:w="files",title:v,...k}=ot(n,b),C=Pi(t,w,_),T=v??t.title??i,N=x.getDisplayLabel(t,n,b);return O.jsx(C,{options:k,id:r.$id,name:i,multiple:!0,onChange:this.onSelectChange,onBlur:f,onFocus:d,schema:t,uiSchema:n,value:m,disabled:a,readonly:o,required:c,registry:p,formContext:S,autofocus:l,rawErrors:g,label:T,hideLabel:!N})}renderFixedArray(){const{schema:t,uiSchema:n={},formData:r=[],errorSchema:i,idPrefix:a,idSeparator:o="_",idSchema:l,name:c,title:f,disabled:d=!1,readonly:p=!1,autofocus:m=!1,required:g=!1,registry:_,onBlur:S,onFocus:b,rawErrors:x}=this.props,{keyedFormData:w}=this.state;let{formData:v=[]}=this.props;const k=t.title||f||c,C=ot(n),{schemaUtils:T,formContext:N}=_,$=(Dt(t.items)?t.items:[]).map((I,V)=>T.retrieveSchema(I,r[V])),M=Dt(t.additionalItems)?T.retrieveSchema(t.additionalItems,r):null;(!v||v.length<$.length)&&(v=v||[],v=v.concat(new Array($.length-v.length)));const q=this.canAddItem(v)&&!!M,F={canAdd:q,className:"field field-array field-array-fixed-items",disabled:d,idSchema:l,formData:r,items:w.map((I,V)=>{const{key:H,item:G}=I,X=G,W=V>=$.length,L=(W&&Dt(t.additionalItems)?T.retrieveSchema(t.additionalItems,X):$[V])||{},P=l.$id+o+V,Z=T.toIdSchema(L,P,X,a,o),R=W?n.additionalItems||{}:Array.isArray(n.items)?n.items[V]:n.items||{},D=i?i[V]:void 0;return this.renderArrayFieldItem({key:H,index:V,name:c&&`${c}-${V}`,title:k?`${k}-${V+1}`:void 0,canAdd:q,canRemove:W,canMoveUp:V>=$.length+1,canMoveDown:W&&V<v.length-1,itemSchema:L,itemData:X,itemUiSchema:R,itemIdSchema:Z,itemErrorSchema:D,autofocus:m&&V===0,onBlur:S,onFocus:b,rawErrors:x,totalItems:w.length})}),onAddClick:this.onAddClick,readonly:p,required:g,registry:_,schema:t,uiSchema:n,title:k,formContext:N,errorSchema:i,rawErrors:x},B=bt("ArrayFieldTemplate",_,C);return O.jsx(B,{...F})}renderArrayFieldItem(t){const{key:n,index:r,name:i,canAdd:a,canRemove:o=!0,canMoveUp:l,canMoveDown:c,itemSchema:f,itemData:d,itemUiSchema:p,itemIdSchema:m,itemErrorSchema:g,autofocus:_,onBlur:S,onFocus:b,rawErrors:x,totalItems:w,title:v}=t,{disabled:k,hideError:C,idPrefix:T,idSeparator:N,readonly:j,uiSchema:$,registry:M,formContext:q}=this.props,{fields:{ArraySchemaField:F,SchemaField:B},globalUiOptions:I}=M,V=F||B,{orderable:H=!0,removable:G=!0,copyable:X=!1}=ot($,I),W={moveUp:H&&l,moveDown:H&&c,copy:X&&a,remove:G&&o,toolbar:!1};return W.toolbar=Object.keys(W).some(L=>W[L]),{children:O.jsx(V,{name:i,title:v,index:r,schema:f,uiSchema:p,formData:d,formContext:q,errorSchema:g,idPrefix:T,idSeparator:N,idSchema:m,required:this.isItemRequired(f),onChange:this.onChangeForIndex(r),onBlur:S,onFocus:b,registry:M,disabled:k,readonly:j,hideError:C,autofocus:_,rawErrors:x}),className:"array-item",disabled:k,canAdd:a,hasCopy:W.copy,hasToolbar:W.toolbar,hasMoveUp:W.moveUp,hasMoveDown:W.moveDown,hasRemove:W.remove,index:r,totalItems:w,key:n,onAddIndexClick:this.onAddIndexClick,onCopyIndexClick:this.onCopyIndexClick,onDropIndexClick:this.onDropIndexClick,onReorderClick:this.onReorderClick,readonly:j,registry:M,schema:f,uiSchema:p}}}function xpe(e){const{schema:t,name:n,uiSchema:r,idSchema:i,formData:a,registry:o,required:l,disabled:c,readonly:f,hideError:d,autofocus:p,title:m,onChange:g,onFocus:_,onBlur:S,rawErrors:b}=e,{title:x}=t,{widgets:w,formContext:v,translateString:k,globalUiOptions:C}=o,{widget:T="checkbox",title:N,label:j=!0,...$}=ot(r,C),M=Pi(t,T,w),q=k(Ot.YesLabel),F=k(Ot.NoLabel);let B;const I=N??x??m??n;if(Array.isArray(t.oneOf))B=xc({oneOf:t.oneOf.map(V=>{if(Dt(V))return{...V,title:V.title||(V.const===!0?q:F)}}).filter(V=>V)},r);else{const V=t,H=t.enum??[!0,!1];!V.enumNames&&H.length===2&&H.every(G=>typeof G=="boolean")?B=[{value:H[0],label:H[0]?q:F},{value:H[1],label:H[1]?q:F}]:B=xc({enum:H,enumNames:V.enumNames},r)}return O.jsx(M,{options:{...$,enumOptions:B},schema:t,uiSchema:r,id:i.$id,name:n,onChange:g,onFocus:_,onBlur:S,label:I,hideLabel:!j,value:a,required:l,disabled:c,readonly:f,hideError:d,registry:o,formContext:v,autofocus:p,rawErrors:b})}class j$ extends ee.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,a=r.map(o=>i.retrieveSchema(o,n));this.state={retrievedOptions:a,selectedOption:this.getMatchingOption(0,n,a)}}componentDidUpdate(t,n){const{formData:r,options:i,idSchema:a}=this.props,{selectedOption:o}=this.state;let l=this.state;if(!Lt(t.options,i)){const{registry:{schemaUtils:c}}=this.props,f=i.map(d=>c.retrieveSchema(d,r));l={selectedOption:o,retrievedOptions:f}}if(!Lt(r,t.formData)&&a.$id===t.idSchema.$id){const{retrievedOptions:c}=l,f=this.getMatchingOption(o,r,c);n&&f!==o&&(l={selectedOption:f,retrievedOptions:c})}l!==this.state&&this.setState(l)}getMatchingOption(t,n,r){const{schema:i,registry:{schemaUtils:a}}=this.props,o=cl(i);return a.getClosestMatchingOption(n,r,t,o)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:a,registry:o}=this.props,{schemaUtils:l}=o,c=t!==void 0?parseInt(t,10):-1;if(c===n)return;const f=c>=0?r[c]:void 0,d=n>=0?r[n]:void 0;let p=l.sanitizeDataForNewSchema(f,d,i);f&&(p=l.getDefaultFormState(f,p,"excludeObjectChildren")),this.setState({selectedOption:c},()=>{a(p,void 0,this.getFieldId())})};getFieldId(){const{idSchema:t,schema:n}=this.props;return`${t.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:n=!1,errorSchema:r={},formContext:i,onBlur:a,onFocus:o,readonly:l,registry:c,schema:f,uiSchema:d}=this.props,{widgets:p,fields:m,translateString:g,globalUiOptions:_,schemaUtils:S}=c,{SchemaField:b}=m,{selectedOption:x,retrievedOptions:w}=this.state,{widget:v="select",placeholder:k,autofocus:C,autocomplete:T,title:N=f.title,...j}=ot(d,_),$=Pi({type:"number"},v,p),M=Re(r,Jn,[]),q=bp(r,[Jn]),F=S.getDisplayLabel(f,d,_),B=x>=0&&w[x]||null;let I;if(B){const{required:L}=f;I=L?Bi({required:L},B):B}let V=[];tr in f&&d&&tr in d?Array.isArray(d[tr])?V=d[tr]:console.warn(`uiSchema.oneOf is not an array for "${N||t}"`):$r in f&&d&&$r in d&&(Array.isArray(d[$r])?V=d[$r]:console.warn(`uiSchema.anyOf is not an array for "${N||t}"`));let H=d;x>=0&&V.length>x&&(H=V[x]);const G=N?Ot.TitleOptionPrefix:Ot.OptionPrefix,X=N?[N]:[],W=w.map((L,P)=>{const{title:Z=L.title}=ot(V[P]);return{label:Z||g(G,X.concat(String(P+1))),value:P}});return O.jsxs("div",{className:"panel panel-default panel-body",children:[O.jsx("div",{className:"form-group",children:O.jsx($,{id:this.getFieldId(),name:`${t}${f.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:a,onFocus:o,disabled:n||ul(W),multiple:!1,rawErrors:M,errorSchema:q,value:x>=0?x:void 0,options:{enumOptions:W,...j},registry:c,formContext:i,placeholder:k,autocomplete:T,autofocus:C,label:N??t,hideLabel:!F,readonly:l})}),I&&I.type!=="null"&&O.jsx(b,{...this.props,schema:I,uiSchema:H})]})}}const wpe=/\.([0-9]*0)*$/,Spe=/[0.]0*$/;function Epe(e){const{registry:t,onChange:n,formData:r,value:i}=e,[a,o]=ee.useState(i),{StringField:l}=t.fields;let c=r;const f=ee.useCallback((d,p,m)=>{o(d),`${d}`.charAt(0)==="."&&(d=`0${d}`);const g=typeof d=="string"&&d.match(wpe)?UR(d.replace(Spe,"")):UR(d);n(g,p,m)},[n]);if(typeof a=="string"&&typeof c=="number"){const d=new RegExp(`^(${String(c).replace(".","\\.")})?\\.?0*$`);a.match(d)&&(c=a)}return O.jsx(l,{...e,formData:c,onChange:f})}function ys(){return ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ys.apply(this,arguments)}const kpe=["children","options"],M$=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),$$={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Cpe=["style","script","pre"],Ape=["src","href","data","formAction","srcDoc","action"],Tpe=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Npe=/mailto:/i,Ope=/\n{2,}$/,D$=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Rpe=/^ *> ?/gm,jpe=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Mpe=/^ {2,}\n/,$pe=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,I$=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,P$=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Dpe=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Ipe=/^(?:\n *)*\n/,Ppe=/\r\n?/g,zpe=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Lpe=/^\[\^([^\]]+)]/,qpe=/\f/g,Fpe=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Bpe=/^\s*?\[(x|\s)\]/,z$=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,L$=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,q$=/^([^\n]+)\n *(=|-){3,} *\n/,Lx=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,Upe=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,F$=/^<!--[\s\S]*?(?:-->)/,Hpe=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,qx=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Vpe=/^\{.*\}$/,Gpe=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Zpe=/^<([^ >]+@[^ >]+)>/,Ype=/^<([^ >]+:\/[^ >]+)>/,Kpe=/-([a-z])?/gi,B$=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Xpe=/^[^\n]+(?: \n|\n{2,})/,Wpe=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Qpe=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Jpe=/^\[([^\]]*)\] ?\[([^\]]*)\]/,eme=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,tme=/\t/g,nme=/(^ *\||\| *$)/g,rme=/^ *:-+: *$/,ime=/^ *:-+ *$/,ame=/^ *-+: *$/,mm=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,gm="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",sme=RegExp(`^([*_])\\1${mm(1)}${gm}\\1\\1(?!\\1)`),ome=RegExp(`^([*_])${mm(0)}${gm}\\1(?!\\1)`),lme=RegExp(`^(==)${mm(0)}${gm}\\1`),ume=RegExp(`^(~~)${mm(0)}${gm}\\1`),cme=/^(:[a-zA-Z0-9-_]+:)/,fme=/^\\([^0-9A-Za-z\s])/,dme=/\\([^0-9A-Za-z\s])/g,hme=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,pme=/^\n+/,mme=/^([ \t]*)/,gme=/(?:^|\n)( *)$/,ZE="(?:\\d+\\.)",YE="(?:[*+-])";function tz(e){return"( *)("+(e===1?ZE:YE)+") +"}const nz=tz(1),rz=tz(2);function iz(e){return RegExp("^"+(e===1?nz:rz))}const yme=iz(1),bme=iz(2);function az(e){return RegExp("^"+(e===1?nz:rz)+"[^\\n]*(?:\\n(?!\\1"+(e===1?ZE:YE)+" )[^\\n]*)*(\\n|$)","gm")}const vme=az(1),_me=az(2);function sz(e){const t=e===1?ZE:YE;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const oz=sz(1),lz=sz(2);function U$(e,t){const n=t===1,r=n?oz:lz,i=n?vme:_me,a=n?yme:bme;return{t:o=>a.test(o),o:dl(function(o,l){const c=gme.exec(l.prevCapture);return c&&(l.list||!l.inline&&!l.simple)?r.exec(o=c[1]+o):null}),i:1,u(o,l,c){const f=n?+o[2]:void 0,d=o[0].replace(Ope,`
255
+ `).match(i);let p=!1;return{items:d.map(function(m,g){const _=a.exec(m)[0].length,S=RegExp("^ {1,"+_+"}","gm"),b=m.replace(S,"").replace(a,""),x=g===d.length-1,w=b.indexOf(`
256
+
257
+ `)!==-1||x&&p;p=w;const v=c.inline,k=c.list;let C;c.list=!0,w?(c.inline=!1,C=Ju(b)+`
258
+
259
+ `):(c.inline=!0,C=Ju(b));const T=l(C,c);return c.inline=v,c.list=k,T}),ordered:n,start:f}},l:(o,l,c)=>e(o.ordered?"ol":"ul",{key:c.key,start:o.type==="20"?o.start:void 0},o.items.map(function(f,d){return e("li",{key:d},l(f,c))}))}}const xme=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),wme=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Ju(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function Ph(e,t){return e.startsWith(t)}function Sme(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(Ph(e,n[r]))return!0;return!1}return n(e,t)}function Ru(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Eme(e){return ame.test(e)?"right":rme.test(e)?"center":ime.test(e)?"left":null}function H$(e,t,n,r){const i=n.inTable;n.inTable=!0;let a=[[]],o="";function l(){if(!o)return;const c=a[a.length-1];c.push.apply(c,t(o,n)),o=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((c,f,d)=>{c.trim()==="|"&&(l(),r)?f!==0&&f!==d.length-1&&a.push([]):o+=c}),l(),n.inTable=i,a}function kme(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(nme,"").split("|").map(Eme):[],i=e[3]?function(o,l,c){return o.trim().split(`
260
+ `).map(function(f){return H$(f,l,c,!0)})}(e[3],t,n):[],a=H$(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:"25"}:{children:a,type:"21"}}function V$(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function dl(e){return e.inline=1,e}function Ea(e){return dl(function(t,n){return n.inline?e.exec(t):null})}function ka(e){return dl(function(t,n){return n.inline||n.simple?e.exec(t):null})}function Ni(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function zd(e){return dl(function(t){return e.exec(t)})}const Cme=/(javascript|vbscript|data(?!:image)):/i;function Ame(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(Cme.test(t))return null}catch{return null}return e}function Gr(e){return e&&e.replace(dme,"$1")}function zh(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const a=e(t,n);return n.inline=r,n.simple=i,a}function Tme(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const a=e(t,n);return n.inline=r,n.simple=i,a}function Nme(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const Fx=(e,t,n)=>({children:zh(t,e[2],n)});function Bx(){return{}}function Ux(){return null}function Ome(...e){return e.filter(Boolean).join(" ")}function Hx(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function Rme(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?ys({},$$,t.namedCodesToUnicode):$$;const n=t.slugify||Ru,r=t.sanitizer||Ame,i=t.createElement||ee.createElement,a=[D$,I$,P$,t.enforceAtxHeadings?L$:z$,q$,B$,oz,lz],o=[...a,Xpe,Lx,F$,qx];function l(x,w,...v){const k=Hx(t.overrides,x+".props",{});return i(function(C,T){const N=Hx(T,C);return N?typeof N=="function"||typeof N=="object"&&"render"in N?N:Hx(T,C+".component",C):C}(x,t.overrides),ys({},w,k,{className:Ome(w?.className,k.className)||void 0}),...v)}function c(x){x=x.replace(Fpe,"");let w=!1;t.forceInline?w=!0:t.forceBlock||(w=eme.test(x)===!1);const v=_(g(w?x:Ju(x).replace(pme,"")+`
261
+
262
+ `,{inline:w}));for(;typeof v[v.length-1]=="string"&&!v[v.length-1].trim();)v.pop();if(t.wrapper===null)return v;const k=t.wrapper||(w?"span":"div");let C;if(v.length>1||t.forceWrapper)C=v;else{if(v.length===1)return C=v[0],typeof C=="string"?l("span",{key:"outer"},C):C;C=null}return i(k,{key:"outer"},C)}function f(x,w){if(!w||!w.trim())return null;const v=w.match(Tpe);return v?v.reduce(function(k,C){const T=C.indexOf("=");if(T!==-1){const N=function(q){return q.indexOf("-")!==-1&&q.match(Hpe)===null&&(q=q.replace(Kpe,function(F,B){return B.toUpperCase()})),q}(C.slice(0,T)).trim(),j=function(q){const F=q[0];return(F==='"'||F==="'")&&q.length>=2&&q[q.length-1]===F?q.slice(1,-1):q}(C.slice(T+1).trim()),$=M$[N]||N;if($==="ref")return k;const M=k[$]=function(q,F,B,I){return F==="style"?function(V){const H=[];let G="",X=!1,W=!1,L="";if(!V)return H;for(let Z=0;Z<V.length;Z++){const R=V[Z];if(R!=='"'&&R!=="'"||X||(W?R===L&&(W=!1,L=""):(W=!0,L=R)),R==="("&&G.endsWith("url")?X=!0:R===")"&&X&&(X=!1),R!==";"||W||X)G+=R;else{const D=G.trim();if(D){const U=D.indexOf(":");if(U>0){const Y=D.slice(0,U).trim(),ne=D.slice(U+1).trim();H.push([Y,ne])}}G=""}}const P=G.trim();if(P){const Z=P.indexOf(":");if(Z>0){const R=P.slice(0,Z).trim(),D=P.slice(Z+1).trim();H.push([R,D])}}return H}(B).reduce(function(V,[H,G]){return V[H.replace(/(-[a-z])/g,X=>X[1].toUpperCase())]=I(G,q,H),V},{}):Ape.indexOf(F)!==-1?I(Gr(B),q,F):(B.match(Vpe)&&(B=Gr(B.slice(1,B.length-1))),B==="true"||B!=="false"&&B)}(x,N,j,r);typeof M=="string"&&(Lx.test(M)||qx.test(M))&&(k[$]=c(M.trim()))}else C!=="style"&&(k[M$[C]||C]=!0);return k},{}):null}const d=[],p={},m={0:{t:[">"],o:Ni(D$),i:1,u(x,w,v){const[,k,C]=x[0].replace(Rpe,"").match(jpe);return{alert:k,children:w(C,v)}},l(x,w,v){const k={key:v.key};return x.alert&&(k.className="markdown-alert-"+n(x.alert.toLowerCase(),Ru),x.children.unshift({attrs:{},children:[{type:"27",text:x.alert}],noInnerParse:!0,type:"11",tag:"header"})),l("blockquote",k,w(x.children,v))}},1:{o:zd(Mpe),i:1,u:Bx,l:(x,w,v)=>l("br",{key:v.key})},2:{t:x=>{const w=x[0];return w==="-"||w==="*"||w==="_"},o:Ni($pe),i:1,u:Bx,l:(x,w,v)=>l("hr",{key:v.key})},3:{t:[" "],o:Ni(P$),i:0,u:x=>({lang:void 0,text:Gr(Ju(x[0].replace(/^ {4}/gm,"")))}),l:(x,w,v)=>l("pre",{key:v.key},l("code",ys({},x.attrs,{className:x.lang?"lang-"+x.lang:""}),x.text))},4:{t:["```","~~~"],o:Ni(I$),i:0,u:x=>({attrs:f("code",x[3]||""),lang:x[2]||void 0,text:x[4],type:"3"})},5:{t:["`"],o:ka(Dpe),i:3,u:x=>({text:Gr(x[2])}),l:(x,w,v)=>l("code",{key:v.key},x.text)},6:{t:["[^"],o:Ni(zpe),i:0,u:x=>(d.push({footnote:x[2],identifier:x[1]}),{}),l:Ux},7:{t:["[^"],o:Ea(Lpe),i:1,u:x=>({target:"#"+n(x[1],Ru),text:x[1]}),l:(x,w,v)=>l("a",{key:v.key,href:r(x.target,"a","href")},l("sup",{key:v.key},x.text))},8:{t:["[ ]","[x]"],o:Ea(Bpe),i:1,u:x=>({completed:x[1].toLowerCase()==="x"}),l:(x,w,v)=>l("input",{checked:x.completed,key:v.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:Ni(t.enforceAtxHeadings?L$:z$),i:1,u:(x,w,v)=>({children:zh(w,x[2],v),id:n(x[2],Ru),level:x[1].length}),l:(x,w,v)=>l("h"+x.level,{id:x.id,key:v.key},w(x.children,v))},10:{o:Ni(q$),i:0,u:(x,w,v)=>({children:zh(w,x[1],v),level:x[2]==="="?1:2,type:"9"})},11:{t:["<"],o:zd(Lx),i:1,u(x,w,v){const[,k]=x[3].match(mme),C=RegExp("^"+k,"gm"),T=x[3].replace(C,""),N=(j=T,o.some(B=>B.test(j))?Nme:zh);var j;const $=x[1].toLowerCase(),M=Cpe.indexOf($)!==-1,q=(M?$:x[1]).trim(),F={attrs:f(q,x[2]),noInnerParse:M,tag:q};if(v.inAnchor=v.inAnchor||$==="a",M)F.text=x[3];else{const B=v.inHTML;v.inHTML=!0,F.children=N(w,T,v),v.inHTML=B}return v.inAnchor=!1,F},l:(x,w,v)=>l(x.tag,ys({key:v.key},x.attrs),x.text||(x.children?w(x.children,v):""))},13:{t:["<"],o:zd(qx),i:1,u(x){const w=x[1].trim();return{attrs:f(w,x[2]||""),tag:w}},l:(x,w,v)=>l(x.tag,ys({},x.attrs,{key:v.key}))},12:{t:["<!--"],o:zd(F$),i:1,u:()=>({}),l:Ux},14:{t:["!["],o:ka(wme),i:1,u:x=>({alt:Gr(x[1]),target:Gr(x[2]),title:Gr(x[3])}),l:(x,w,v)=>l("img",{key:v.key,alt:x.alt||void 0,title:x.title||void 0,src:r(x.target,"img","src")})},15:{t:["["],o:Ea(xme),i:3,u:(x,w,v)=>({children:Tme(w,x[1],v),target:Gr(x[2]),title:Gr(x[3])}),l:(x,w,v)=>l("a",{key:v.key,href:r(x.target,"a","href"),title:x.title},w(x.children,v))},16:{t:["<"],o:Ea(Ype),i:0,u:x=>({children:[{text:x[1],type:"27"}],target:x[1],type:"15"})},17:{t:(x,w)=>!w.inAnchor&&!t.disableAutoLink&&(Ph(x,"http://")||Ph(x,"https://")),o:Ea(Gpe),i:0,u:x=>({children:[{text:x[1],type:"27"}],target:x[1],title:void 0,type:"15"})},18:{t:["<"],o:Ea(Zpe),i:0,u(x){let w=x[1],v=x[1];return Npe.test(v)||(v="mailto:"+v),{children:[{text:w.replace("mailto:",""),type:"27"}],target:v,type:"15"}}},20:U$(l,1),33:U$(l,2),19:{o:Ni(Ipe),i:3,u:Bx,l:()=>`
263
+ `},21:{o:dl(function(x,w){if(w.inline||w.simple||w.inHTML&&x.indexOf(`
264
+
265
+ `)===-1&&w.prevCapture.indexOf(`
266
+
267
+ `)===-1)return null;let v="";x.split(`
268
+ `).every(C=>(C+=`
269
+ `,!a.some(T=>T.test(C))&&(v+=C,!!C.trim())));const k=Ju(v);return k===""?null:[v,,k]}),i:3,u:Fx,l:(x,w,v)=>l("p",{key:v.key},w(x.children,v))},22:{t:["["],o:Ea(Wpe),i:0,u:x=>(p[x[1]]={target:x[2],title:x[4]},{}),l:Ux},23:{t:["!["],o:ka(Qpe),i:0,u:x=>({alt:x[1]?Gr(x[1]):void 0,ref:x[2]}),l:(x,w,v)=>p[x.ref]?l("img",{key:v.key,alt:x.alt,src:r(p[x.ref].target,"img","src"),title:p[x.ref].title}):null},24:{t:x=>x[0]==="["&&x.indexOf("](")===-1,o:Ea(Jpe),i:0,u:(x,w,v)=>({children:w(x[1],v),fallbackChildren:x[0],ref:x[2]}),l:(x,w,v)=>p[x.ref]?l("a",{key:v.key,href:r(p[x.ref].target,"a","href"),title:p[x.ref].title},w(x.children,v)):l("span",{key:v.key},x.fallbackChildren)},25:{t:["|"],o:Ni(B$),i:1,u:kme,l(x,w,v){const k=x;return l("table",{key:v.key},l("thead",null,l("tr",null,k.header.map(function(C,T){return l("th",{key:T,style:V$(k,T)},w(C,v))}))),l("tbody",null,k.cells.map(function(C,T){return l("tr",{key:T},C.map(function(N,j){return l("td",{key:j,style:V$(k,j)},w(N,v))}))})))}},27:{o:dl(function(x,w){let v;return Ph(x,":")&&(v=cme.exec(x)),v||hme.exec(x)}),i:4,u(x){const w=x[0];return{text:w.indexOf("&")===-1?w:w.replace(Upe,(v,k)=>t.namedCodesToUnicode[k]||v)}},l:x=>x.text},28:{t:["**","__"],o:ka(sme),i:2,u:(x,w,v)=>({children:w(x[2],v)}),l:(x,w,v)=>l("strong",{key:v.key},w(x.children,v))},29:{t:x=>{const w=x[0];return(w==="*"||w==="_")&&x[1]!==w},o:ka(ome),i:3,u:(x,w,v)=>({children:w(x[2],v)}),l:(x,w,v)=>l("em",{key:v.key},w(x.children,v))},30:{t:["\\"],o:ka(fme),i:1,u:x=>({text:x[1],type:"27"})},31:{t:["=="],o:ka(lme),i:3,u:Fx,l:(x,w,v)=>l("mark",{key:v.key},w(x.children,v))},32:{t:["~~"],o:ka(ume),i:3,u:Fx,l:(x,w,v)=>l("del",{key:v.key},w(x.children,v))}};t.disableParsingRawHTML===!0&&(delete m[11],delete m[13]);const g=function(x){var w=Object.keys(x);function v(k,C){var T=[];if(C.prevCapture=C.prevCapture||"",k.trim())for(;k;)for(var N=0;N<w.length;){var j=w[N],$=x[j];if(!$.t||Sme(k,C,$.t)){var M=$.o(k,C);if(M&&M[0]){k=k.substring(M[0].length);var q=$.u(M,v,C);C.prevCapture+=M[0],q.type||(q.type=j),T.push(q);break}N++}else N++}return C.prevCapture="",T}return w.sort(function(k,C){return x[k].i-x[C].i||(k<C?-1:1)}),function(k,C){return v(function(T){return T.replace(Ppe,`
270
+ `).replace(qpe,"").replace(tme," ")}(k),C)}}(m),_=(S=function(x,w){return function(v,k,C){const T=x[v.type].l;return w?w(()=>T(v,k,C),v,k,C):T(v,k,C)}}(m,t.renderRule),function x(w,v={}){if(Array.isArray(w)){const k=v.key,C=[];let T=!1;for(let N=0;N<w.length;N++){v.key=N;const j=x(w[N],v),$=typeof j=="string";$&&T?C[C.length-1]+=j:j!==null&&C.push(j),T=$}return v.key=k,C}return S(w,x,v)});var S;const b=c(e);return d.length?l("div",null,b,l("footer",{key:"footer"},d.map(function(x){return l("div",{id:n(x.identifier,Ru),key:x.identifier},x.identifier,_(g(x.footnote,{inline:!0})))}))):b}const ym=e=>{let{children:t="",options:n}=e,r=function(i,a){if(i==null)return{};var o,l,c={},f=Object.keys(i);for(l=0;l<f.length;l++)a.indexOf(o=f[l])>=0||(c[o]=i[o]);return c}(e,kpe);return ee.cloneElement(Rme(t,n),r)};function jme(e,t){return e==null?!0:j8(e,t)}class Mme extends ee.Component{state={wasPropertyKeyModified:!1,additionalProperties:{}};isRequired(t){const{schema:n}=this.props;return Array.isArray(n.required)&&n.required.indexOf(t)!==-1}onPropertyChange=(t,n=!1)=>(r,i,a)=>{const{formData:o,onChange:l,errorSchema:c}=this.props;r===void 0&&n&&(r="");const f={...o,[t]:r};l(f,c&&c&&{...c,[t]:i},a)};onDropPropertyClick=t=>n=>{n.preventDefault();const{onChange:r,formData:i}=this.props,a={...i};jme(a,t),r(a)};getAvailableKey=(t,n)=>{const{uiSchema:r,registry:i}=this.props,{duplicateKeySuffixSeparator:a="-"}=ot(r,i.globalUiOptions);let o=0,l=t;for(;Tn(n,l);)l=`${t}${a}${++o}`;return l};onKeyChange=t=>(n,r)=>{if(t===n)return;const{formData:i,onChange:a,errorSchema:o}=this.props;n=this.getAvailableKey(n,i);const l={...i},c={[t]:n},f=Object.keys(l).map(p=>({[c[p]||p]:l[p]})),d=Object.assign({},...f);this.setState({wasPropertyKeyModified:!0}),a(d,o&&o&&{...o,[n]:r})};getDefaultValue(t){const{registry:{translateString:n}}=this.props;switch(t){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};case"string":default:return n(Ot.NewStringDefault)}}handleAddClick=t=>()=>{if(!t.additionalProperties)return;const{formData:n,onChange:r,registry:i}=this.props,a={...n};let o,l,c;if(Dt(t.additionalProperties)){o=t.additionalProperties.type,l=t.additionalProperties.const,c=t.additionalProperties.default;let p=t.additionalProperties;if(sn in p){const{schemaUtils:m}=i;p=m.retrieveSchema({$ref:p[sn]},n),o=p.type,l=p.const,c=p.default}!o&&($r in p||tr in p)&&(o="object")}const f=this.getAvailableKey("newKey",a),d=l??c??this.getDefaultValue(o);gn(a,f,d),r(a)};render(){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,idSchema:a,name:o,required:l=!1,disabled:c,readonly:f,hideError:d,idPrefix:p,idSeparator:m,onBlur:g,onFocus:_,registry:S,title:b}=this.props,{fields:x,formContext:w,schemaUtils:v,translateString:k,globalUiOptions:C}=S,{SchemaField:T}=x,N=v.retrieveSchema(t,r),j=ot(n,C),{properties:$={}}=N,M=j.title??N.title??b??o,q=j.description??N.description;let F;try{const V=Object.keys($);F=ape(V,j.order)}catch(V){return O.jsxs("div",{children:[O.jsx("p",{className:"config-error",style:{color:"red"},children:O.jsx(ym,{options:{disableParsingRawHTML:!0},children:k(Ot.InvalidObjectField,[o||"root",V.message])})}),O.jsx("pre",{children:JSON.stringify(N)})]})}const B=bt("ObjectFieldTemplate",S,j),I={title:j.label===!1?"":M,description:j.label===!1?void 0:q,properties:F.map(V=>{const H=Tn(N,[Ht,V,$c]),G=H?n.additionalProperties:n[V],X=ot(G).widget==="hidden",W=Re(a,[V],{});return{content:O.jsx(T,{name:V,required:this.isRequired(V),schema:Re(N,[Ht,V],{}),uiSchema:G,errorSchema:Re(i,V),idSchema:W,idPrefix:p,idSeparator:m,formData:Re(r,V),formContext:w,wasPropertyKeyModified:this.state.wasPropertyKeyModified,onKeyChange:this.onKeyChange(V),onChange:this.onPropertyChange(V,H),onBlur:g,onFocus:_,registry:S,disabled:c,readonly:f,hideError:d,onDropPropertyClick:this.onDropPropertyClick},V),name:V,readonly:f,disabled:c,required:l,hidden:X}}),readonly:f,disabled:c,required:l,idSchema:a,uiSchema:n,errorSchema:i,schema:N,formData:r,formContext:w,registry:S};return O.jsx(B,{...I,onAddClick:this.handleAddClick})}}const $me={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function Dme(e,t,n,r){const i=t.field,{fields:a,translateString:o}=r;if(typeof i=="function")return i;if(typeof i=="string"&&i in a)return a[i];const l=Fi(e),c=Array.isArray(l)?l[0]:l||"",f=e.$id;let d=$me[c];return f&&f in a&&(d=f),!d&&(e.anyOf||e.oneOf)?()=>null:d in a?a[d]:()=>{const p=bt("UnsupportedFieldTemplate",r,t);return O.jsx(p,{schema:e,idSchema:n,reason:o(Ot.UnknownFieldType,[String(e.type)]),registry:r})}}function Ime(e){const{schema:t,idSchema:n,uiSchema:r,formData:i,errorSchema:a,idPrefix:o,idSeparator:l,name:c,onChange:f,onKeyChange:d,onDropPropertyClick:p,required:m,registry:g,wasPropertyKeyModified:_=!1}=e,{formContext:S,schemaUtils:b,globalUiOptions:x}=g,w=ot(r,x),v=bt("FieldTemplate",g,w),k=bt("DescriptionFieldTemplate",g,w),C=bt("FieldHelpTemplate",g,w),T=bt("FieldErrorTemplate",g,w),N=b.retrieveSchema(t,i),j=n[Ma],$=$i(b.toIdSchema(N,j,i,o,l),n),M=ee.useCallback((me,we,ke)=>f(me,we,ke||j),[j,f]),q=Dme(N,w,$,g),F=!!(w.disabled??e.disabled),B=!!(w.readonly??(e.readonly||e.schema.readOnly||N.readOnly)),I=w.hideError,V=I===void 0?e.hideError:!!I,H=!!(w.autofocus??e.autofocus);if(Object.keys(N).length===0)return null;const G=b.getDisplayLabel(N,r,x),{__errors:X,...W}=a||{},L=bp(r,["ui:classNames","classNames","ui:style"]);Ku in L&&(L[Ku]=bp(L[Ku],["classNames","style"]));const P=O.jsx(q,{...e,onChange:M,idSchema:$,schema:N,uiSchema:L,disabled:F,readonly:B,hideError:V,autofocus:H,errorSchema:W,formContext:S,rawErrors:X}),Z=$[Ma];let R;_?R=c:R=$c in N?c:w.title||e.schema.title||N.title||e.title||c;const D=w.description||e.schema.description||N.description||"",U=w.enableMarkdownInDescription?O.jsx(ym,{options:{disableParsingRawHTML:!0},children:D}):D,Y=w.help,ne=w.widget==="hidden",ae=["form-group","field",`field-${Fi(N)}`];!V&&X&&X.length>0&&ae.push("field-error has-error has-danger"),r?.classNames&&ae.push(r.classNames),w.classNames&&ae.push(w.classNames);const re=O.jsx(C,{help:Y,idSchema:$,schema:N,uiSchema:r,hasErrors:!V&&X&&X.length>0,registry:g}),de=V||(N.anyOf||N.oneOf)&&!b.isSelect(N)?void 0:O.jsx(T,{errors:X,errorSchema:a,idSchema:$,schema:N,uiSchema:r,registry:g}),Q={description:O.jsx(k,{id:Hc(Z),description:U,schema:N,uiSchema:r,registry:g}),rawDescription:D,help:re,rawHelp:typeof Y=="string"?Y:void 0,errors:de,rawErrors:V?void 0:X,id:Z,label:R,hidden:ne,onChange:f,onKeyChange:d,onDropPropertyClick:p,required:m,disabled:F,readonly:B,hideError:V,displayLabel:G,classNames:ae.join(" ").trim(),style:w.style,formContext:S,formData:i,schema:N,uiSchema:r,registry:g},J=g.fields.AnyOfField,oe=g.fields.OneOfField,fe=r?.["ui:field"]&&r?.["ui:fieldReplacesAnyOrOneOf"]===!0;return O.jsx(v,{...Q,children:O.jsxs(O.Fragment,{children:[P,N.anyOf&&!fe&&!b.isSelect(N)&&O.jsx(J,{name:c,disabled:F,readonly:B,hideError:V,errorSchema:a,formData:i,formContext:S,idPrefix:o,idSchema:$,idSeparator:l,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:N.anyOf.map(me=>b.retrieveSchema(Dt(me)?me:{},i)),registry:g,required:m,schema:N,uiSchema:r}),N.oneOf&&!fe&&!b.isSelect(N)&&O.jsx(oe,{name:c,disabled:F,readonly:B,hideError:V,errorSchema:a,formData:i,formContext:S,idPrefix:o,idSchema:$,idSeparator:l,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:N.oneOf.map(me=>b.retrieveSchema(Dt(me)?me:{},i)),registry:g,required:m,schema:N,uiSchema:r})]})})}class Pme extends ee.Component{shouldComponentUpdate(t){return!Lt(this.props,t)}render(){return O.jsx(Ime,{...this.props})}}function zme(e){const{schema:t,name:n,uiSchema:r,idSchema:i,formData:a,required:o,disabled:l=!1,readonly:c=!1,autofocus:f=!1,onChange:d,onBlur:p,onFocus:m,registry:g,rawErrors:_,hideError:S}=e,{title:b,format:x}=t,{widgets:w,formContext:v,schemaUtils:k,globalUiOptions:C}=g,T=k.isSelect(t)?xc(t,r):void 0;let N=T?"select":"text";x&&npe(t,x,w)&&(N=x);const{widget:j=N,placeholder:$="",title:M,...q}=ot(r),F=k.getDisplayLabel(t,r,C),B=M??b??n,I=Pi(t,j,w);return O.jsx(I,{options:{...q,enumOptions:T},schema:t,uiSchema:r,id:i.$id,name:n,label:B,hideLabel:!F,hideError:S,value:a,onChange:d,onBlur:p,onFocus:m,required:o,disabled:l,readonly:c,formContext:v,autofocus:f,registry:g,placeholder:$,rawErrors:_})}function Lme(e){const{formData:t,onChange:n}=e;return ee.useEffect(()=>{t===void 0&&n(null)},[t,n]),null}function qme(){return{AnyOfField:j$,ArrayField:_pe,BooleanField:xpe,NumberField:Epe,ObjectField:Mme,OneOfField:j$,SchemaField:Pme,StringField:zme,NullField:Lme}}function Fme(e){const{idSchema:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=ot(a,r.globalUiOptions),{label:l=!0}=o;if(!n||!l)return null;const c=bt("DescriptionFieldTemplate",r,o);return O.jsx(c,{id:Hc(t),description:n,schema:i,uiSchema:a,registry:r})}function Bme(e){const{children:t,className:n,disabled:r,hasToolbar:i,hasMoveDown:a,hasMoveUp:o,hasRemove:l,hasCopy:c,index:f,onCopyIndexClick:d,onDropIndexClick:p,onReorderClick:m,readonly:g,registry:_,uiSchema:S}=e,{CopyButton:b,MoveDownButton:x,MoveUpButton:w,RemoveButton:v}=_.templates.ButtonTemplates,k={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};return O.jsxs("div",{className:n,children:[O.jsx("div",{className:i?"col-xs-9":"col-xs-12",children:t}),i&&O.jsx("div",{className:"col-xs-3 array-item-toolbox",children:O.jsxs("div",{className:"btn-group",style:{display:"flex",justifyContent:"space-around"},children:[(o||a)&&O.jsx(w,{style:k,disabled:r||g||!o,onClick:m(f,f-1),uiSchema:S,registry:_}),(o||a)&&O.jsx(x,{style:k,disabled:r||g||!a,onClick:m(f,f+1),uiSchema:S,registry:_}),c&&O.jsx(b,{style:k,disabled:r||g,onClick:d(f),uiSchema:S,registry:_}),l&&O.jsx(v,{style:k,disabled:r||g,onClick:p(f),uiSchema:S,registry:_})]})})]})}function Ume(e){const{canAdd:t,className:n,disabled:r,idSchema:i,uiSchema:a,items:o,onAddClick:l,readonly:c,registry:f,required:d,schema:p,title:m}=e,g=ot(a),_=bt("ArrayFieldDescriptionTemplate",f,g),S=bt("ArrayFieldItemTemplate",f,g),b=bt("ArrayFieldTitleTemplate",f,g),{ButtonTemplates:{AddButton:x}}=f.templates;return O.jsxs("fieldset",{className:n,id:i.$id,children:[O.jsx(b,{idSchema:i,title:g.title||m,required:d,schema:p,uiSchema:a,registry:f}),O.jsx(_,{idSchema:i,description:g.description||p.description,schema:p,uiSchema:a,registry:f}),O.jsx("div",{className:"row array-item-list",children:o&&o.map(({key:w,...v})=>O.jsx(S,{...v},w))}),t&&O.jsx(x,{className:"array-item-add",onClick:l,disabled:r||c,uiSchema:a,registry:f})]})}function Hme(e){const{idSchema:t,title:n,schema:r,uiSchema:i,required:a,registry:o}=e,l=ot(i,o.globalUiOptions),{label:c=!0}=l;if(!n||!c)return null;const f=bt("TitleFieldTemplate",o,l);return O.jsx(f,{id:WP(t),title:n,required:a,schema:r,uiSchema:i,registry:o})}function Vme(e){const{id:t,name:n,value:r,readonly:i,disabled:a,autofocus:o,onBlur:l,onFocus:c,onChange:f,onChangeOverride:d,options:p,schema:m,uiSchema:g,formContext:_,registry:S,rawErrors:b,type:x,hideLabel:w,hideError:v,...k}=e;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const C={...k,...Yhe(m,x,p)};let T;C.type==="number"||C.type==="integer"?T=r||r===0?r:"":T=r??"";const N=ee.useCallback(({target:{value:M}})=>f(M===""?p.emptyValue:M),[f,p]),j=ee.useCallback(({target:M})=>l(t,M&&M.value),[l,t]),$=ee.useCallback(({target:M})=>c(t,M&&M.value),[c,t]);return O.jsxs(O.Fragment,{children:[O.jsx("input",{id:t,name:t,className:"form-control",readOnly:i,disabled:a,autoFocus:o,value:T,...C,list:m.examples?sS(t):void 0,onChange:d||N,onBlur:j,onFocus:$,"aria-describedby":Fs(t,!!m.examples)}),Array.isArray(m.examples)&&O.jsx("datalist",{id:sS(t),children:m.examples.concat(m.default&&!m.examples.includes(m.default)?[m.default]:[]).map(M=>O.jsx("option",{value:M},M))},`datalist_${t}`)]})}function Gme({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=Khe(e);return n?null:O.jsx("div",{children:O.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:t})})}function Vc(e){const{iconType:t="default",icon:n,className:r,uiSchema:i,registry:a,...o}=e;return O.jsx("button",{type:"button",className:`btn btn-${t} ${r}`,...o,children:O.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function Zme(e){const{registry:{translateString:t}}=e;return O.jsx(Vc,{title:t(Ot.CopyButton),className:"array-item-copy",...e,icon:"copy"})}function Yme(e){const{registry:{translateString:t}}=e;return O.jsx(Vc,{title:t(Ot.MoveDownButton),className:"array-item-move-down",...e,icon:"arrow-down"})}function Kme(e){const{registry:{translateString:t}}=e;return O.jsx(Vc,{title:t(Ot.MoveUpButton),className:"array-item-move-up",...e,icon:"arrow-up"})}function Xme(e){const{registry:{translateString:t}}=e;return O.jsx(Vc,{title:t(Ot.RemoveButton),className:"array-item-remove",...e,iconType:"danger",icon:"remove"})}function Wme({className:e,onClick:t,disabled:n,registry:r}){const{translateString:i}=r;return O.jsx("div",{className:"row",children:O.jsx("p",{className:`col-xs-3 col-xs-offset-9 text-right ${e}`,children:O.jsx(Vc,{iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:i(Ot.AddButton),onClick:t,disabled:n,registry:r})})})}function Qme(){return{SubmitButton:Gme,AddButton:Wme,CopyButton:Zme,MoveDownButton:Yme,MoveUpButton:Kme,RemoveButton:Xme}}function Jme(e){const{id:t,description:n}=e;return n?typeof n=="string"?O.jsx("p",{id:t,className:"field-description",children:n}):O.jsx("div",{id:t,className:"field-description",children:n}):null}function ege({errors:e,registry:t}){const{translateString:n}=t;return O.jsxs("div",{className:"panel panel-danger errors",children:[O.jsx("div",{className:"panel-heading",children:O.jsx("h3",{className:"panel-title",children:n(Ot.ErrorsLabel)})}),O.jsx("ul",{className:"list-group",children:e.map((r,i)=>O.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}const tge="*";function uz(e){const{label:t,required:n,id:r}=e;return t?O.jsxs("label",{className:"control-label",htmlFor:r,children:[t,n&&O.jsx("span",{className:"required",children:tge})]}):null}function nge(e){const{id:t,label:n,children:r,errors:i,help:a,description:o,hidden:l,required:c,displayLabel:f,registry:d,uiSchema:p}=e,m=ot(p),g=bt("WrapIfAdditionalTemplate",d,m);return l?O.jsx("div",{className:"hidden",children:r}):O.jsxs(g,{...e,children:[f&&O.jsx(uz,{label:n,required:c,id:t}),f&&o?o:null,r,i,a]})}function rge(e){const{errors:t=[],idSchema:n}=e;if(t.length===0)return null;const r=KP(n);return O.jsx("div",{children:O.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:t.filter(i=>!!i).map((i,a)=>O.jsx("li",{className:"text-danger",children:i},a))})})}function ige(e){const{idSchema:t,help:n}=e;if(!n)return null;const r=XP(t);return typeof n=="string"?O.jsx("p",{id:r,className:"help-block",children:n}):O.jsx("div",{id:r,className:"help-block",children:n})}function age(e){const{description:t,disabled:n,formData:r,idSchema:i,onAddClick:a,properties:o,readonly:l,registry:c,required:f,schema:d,title:p,uiSchema:m}=e,g=ot(m),_=bt("TitleFieldTemplate",c,g),S=bt("DescriptionFieldTemplate",c,g),{ButtonTemplates:{AddButton:b}}=c.templates;return O.jsxs("fieldset",{id:i.$id,children:[p&&O.jsx(_,{id:WP(i),title:p,required:f,schema:d,uiSchema:m,registry:c}),t&&O.jsx(S,{id:Hc(i),description:t,schema:d,uiSchema:m,registry:c}),o.map(x=>x.content),Tae(d,m,r)&&O.jsx(b,{className:"object-property-expand",onClick:a(d),disabled:n||l,uiSchema:m,registry:c})]})}const sge="*";function oge(e){const{id:t,title:n,required:r}=e;return O.jsxs("legend",{id:t,children:[n,r&&O.jsx("span",{className:"required",children:sge})]})}function lge(e){const{schema:t,idSchema:n,reason:r,registry:i}=e,{translateString:a}=i;let o=Ot.UnsupportedField;const l=[];return n&&n.$id&&(o=Ot.UnsupportedFieldWithId,l.push(n.$id)),r&&(o=o===Ot.UnsupportedField?Ot.UnsupportedFieldWithReason:Ot.UnsupportedFieldWithIdAndReason,l.push(r)),O.jsxs("div",{className:"unsupported-field",children:[O.jsx("p",{children:O.jsx(ym,{options:{disableParsingRawHTML:!0},children:a(o,l)})}),t&&O.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function uge(e){const{id:t,classNames:n,style:r,disabled:i,label:a,onKeyChange:o,onDropPropertyClick:l,readonly:c,required:f,schema:d,children:p,uiSchema:m,registry:g}=e,{templates:_,translateString:S}=g,{RemoveButton:b}=_.ButtonTemplates,x=S(Ot.KeyLabel,[a]);return $c in d?O.jsx("div",{className:n,style:r,children:O.jsxs("div",{className:"row",children:[O.jsx("div",{className:"col-xs-5 form-additional",children:O.jsxs("div",{className:"form-group",children:[O.jsx(uz,{label:x,required:f,id:`${t}-key`}),O.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:({target:v})=>o(v&&v.value),defaultValue:a})]})}),O.jsx("div",{className:"form-additional form-group col-xs-5",children:p}),O.jsx("div",{className:"col-xs-2",children:O.jsx(b,{className:"array-item-remove btn-block",style:{border:"0"},disabled:i||c,onClick:l(a),uiSchema:m,registry:g})})]})}):O.jsx("div",{className:n,style:r,children:p})}function cge(){return{ArrayFieldDescriptionTemplate:Fme,ArrayFieldItemTemplate:Bme,ArrayFieldTemplate:Ume,ArrayFieldTitleTemplate:Hme,ButtonTemplates:Qme(),BaseInputTemplate:Vme,DescriptionFieldTemplate:Jme,ErrorListTemplate:ege,FieldTemplate:nge,FieldErrorTemplate:rge,FieldHelpTemplate:ige,ObjectFieldTemplate:age,TitleFieldTemplate:oge,UnsupportedFieldTemplate:lge,WrapIfAdditionalTemplate:uge}}function fge(e){return Object.values(e).every(t=>t!==-1)}function dge({type:e,range:t,value:n,select:r,rootId:i,name:a,disabled:o,readonly:l,autofocus:c,registry:f,onBlur:d,onFocus:p}){const m=i+"_"+e,{SelectWidget:g}=f.widgets;return O.jsx(g,{schema:{type:"integer"},id:m,name:a,className:"form-control",options:{enumOptions:ZP(t[0],t[1])},placeholder:e,value:n,disabled:o,readonly:l,autofocus:c,onChange:_=>r(e,_),onBlur:d,onFocus:p,registry:f,label:"","aria-describedby":Fs(i)})}function hge({time:e=!1,disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:a,name:o,registry:l,onBlur:c,onFocus:f,onChange:d,value:p}){const{translateString:m}=l,[g,_]=ee.useState(p),[S,b]=ee.useReducer((k,C)=>({...k,...C}),zx(p,e));ee.useEffect(()=>{const k=N$(S,e);fge(S)&&k!==p?d(k):g!==p&&(_(p),b(zx(p,e)))},[e,p,d,S,g]);const x=ee.useCallback((k,C)=>{b({[k]:C})},[]),w=ee.useCallback(k=>{if(k.preventDefault(),t||n)return;const C=zx(new Date().toJSON(),e);d(N$(C,e))},[t,n,e]),v=ee.useCallback(k=>{k.preventDefault(),!(t||n)&&d(void 0)},[t,n,d]);return O.jsxs("ul",{className:"list-inline",children:[Ghe(S,e,i.yearsRange,i.format).map((k,C)=>O.jsx("li",{className:"list-inline-item",children:O.jsx(dge,{rootId:a,name:o,select:x,...k,disabled:t,readonly:n,registry:l,onBlur:c,onFocus:f,autofocus:r&&C===0})},C)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&O.jsx("li",{className:"list-inline-item",children:O.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:w,children:m(Ot.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&O.jsx("li",{className:"list-inline-item",children:O.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:v,children:m(Ot.ClearLabel)})})]})}function pge({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return O.jsx(n,{time:e,...t})}function mge({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:a,readonly:o,label:l,hideLabel:c,autofocus:f=!1,onBlur:d,onFocus:p,onChange:m,registry:g}){const _=bt("DescriptionFieldTemplate",g,n),S=Dh(e),b=ee.useCallback(k=>m(k.target.checked),[m]),x=ee.useCallback(k=>d(r,k.target.checked),[d,r]),w=ee.useCallback(k=>p(r,k.target.checked),[p,r]),v=n.description??e.description;return O.jsxs("div",{className:`checkbox ${a||o?"disabled":""}`,children:[!c&&!!v&&O.jsx(_,{id:Hc(r),description:v,schema:e,uiSchema:t,registry:g}),O.jsxs("label",{children:[O.jsx("input",{type:"checkbox",id:r,name:r,checked:typeof i>"u"?!1:i,required:S,disabled:a||o,autoFocus:f,onChange:b,onBlur:x,onFocus:w,"aria-describedby":Fs(r)}),rpe(O.jsx("span",{children:l}),c)]})]})}function gge({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:i,emptyValue:a},value:o,autofocus:l=!1,readonly:c,onChange:f,onBlur:d,onFocus:p}){const m=Array.isArray(o)?o:[o],g=ee.useCallback(({target:S})=>d(e,Jr(S&&S.value,r,a)),[d,e]),_=ee.useCallback(({target:S})=>p(e,Jr(S&&S.value,r,a)),[p,e]);return O.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(r)&&r.map((S,b)=>{const x=HE(S.value,m),w=Array.isArray(i)&&i.indexOf(S.value)!==-1,v=t||w||c?"disabled":"",k=T=>{T.target.checked?f(Fhe(b,m,r)):f(Lhe(b,m,r))},C=O.jsxs("span",{children:[O.jsx("input",{type:"checkbox",id:QP(e,b),name:e,checked:x,value:String(b),disabled:t||w||c,autoFocus:l&&b===0,onChange:k,onBlur:g,onFocus:_,"aria-describedby":Fs(e)}),O.jsx("span",{children:S.label})]});return n?O.jsx("label",{className:`checkbox-inline ${v}`,children:C},b):O.jsx("div",{className:`checkbox ${v}`,children:O.jsx("label",{children:C})},b)})})}function yge(e){const{disabled:t,readonly:n,options:r,registry:i}=e,a=bt("BaseInputTemplate",i,r);return O.jsx(a,{type:"color",...e,disabled:t||n})}function bge(e){const{onChange:t,options:n,registry:r}=e,i=bt("BaseInputTemplate",r,n),a=ee.useCallback(o=>t(o||void 0),[t]);return O.jsx(i,{type:"date",...e,onChange:a})}function vge(e){const{onChange:t,value:n,options:r,registry:i}=e,a=bt("BaseInputTemplate",i,r);return O.jsx(a,{type:"datetime-local",...e,value:lpe(n),onChange:o=>t(ipe(o))})}function _ge(e){const{options:t,registry:n}=e,r=bt("BaseInputTemplate",n,t);return O.jsx(r,{type:"email",...e})}function xge(e,t){return e===null?null:e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function wge(e){const{name:t,size:n,type:r}=e;return new Promise((i,a)=>{const o=new window.FileReader;o.onerror=a,o.onload=l=>{typeof l.target?.result=="string"?i({dataURL:xge(l.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function Sge(e){return Promise.all(Array.from(e).map(wge))}function Ege({fileInfo:e,registry:t}){const{translateString:n}=t,{dataURL:r,type:i,name:a}=e;return r?["image/jpeg","image/png"].includes(i)?O.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):O.jsxs(O.Fragment,{children:[" ",O.jsx("a",{download:`preview-${a}`,href:r,className:"file-download",children:n(Ot.PreviewLabel)})]}):null}function kge({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;const{translateString:a}=t,{RemoveButton:o}=bt("ButtonTemplates",t,i);return O.jsx("ul",{className:"file-info",children:e.map((l,c)=>{const{name:f,size:d,type:p}=l,m=()=>r(c);return O.jsxs("li",{children:[O.jsx(ym,{children:a(Ot.FilesInfo,[f,p,String(d)])}),n&&O.jsx(Ege,{fileInfo:l,registry:t}),O.jsx(o,{onClick:m,registry:t})]},c)})})}function Cge(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:i}=Ihe(n);return[...t,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return t}},[])}function Age(e){const{disabled:t,readonly:n,required:r,multiple:i,onChange:a,value:o,options:l,registry:c}=e,f=bt("BaseInputTemplate",c,l),d=ee.useCallback(g=>{g.target.files&&Sge(g.target.files).then(_=>{const S=_.map(b=>b.dataURL);a(i?o.concat(S):S[0])})},[i,o,a]),p=ee.useMemo(()=>Cge(Array.isArray(o)?o:[o]),[o]),m=ee.useCallback(g=>{if(i){const _=o.filter((S,b)=>b!==g);a(_)}else a(void 0)},[i,o,a]);return O.jsxs("div",{children:[O.jsx(f,{...e,disabled:t||n,type:"file",required:o?!1:r,onChangeOverride:d,value:"",accept:l.accept?String(l.accept):void 0}),O.jsx(kge,{filesInfo:p,onRemove:m,registry:c,preview:l.filePreview,options:l})]})}function Tge({id:e,value:t}){return O.jsx("input",{type:"hidden",id:e,name:e,value:typeof t>"u"?"":t})}function Nge(e){const{options:t,registry:n}=e,r=bt("BaseInputTemplate",n,t);return O.jsx(r,{type:"password",...e})}function Oge({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:a=!1,onBlur:o,onFocus:l,onChange:c,id:f}){const{enumOptions:d,enumDisabled:p,inline:m,emptyValue:g}=e,_=ee.useCallback(({target:b})=>o(f,Jr(b&&b.value,d,g)),[o,f]),S=ee.useCallback(({target:b})=>l(f,Jr(b&&b.value,d,g)),[l,f]);return O.jsx("div",{className:"field-radio-group",id:f,children:Array.isArray(d)&&d.map((b,x)=>{const w=HE(b.value,t),v=Array.isArray(p)&&p.indexOf(b.value)!==-1,k=r||v||i?"disabled":"",C=()=>c(b.value),T=O.jsxs("span",{children:[O.jsx("input",{type:"radio",id:QP(f,x),checked:w,name:f,required:n,value:String(x),disabled:r||v||i,autoFocus:a&&x===0,onChange:C,onBlur:_,onFocus:S,"aria-describedby":Fs(f)}),O.jsx("span",{children:b.label})]});return m?O.jsx("label",{className:`radio-inline ${k}`,children:T},x):O.jsx("div",{className:`radio ${k}`,children:O.jsx("label",{children:T})},x)})})}function Rge(e){const{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return O.jsxs("div",{className:"field-range-wrapper",children:[O.jsx(n,{type:"range",...e}),O.jsx("span",{className:"range-view",children:t})]})}function Vx(e,t){return t?Array.from(e.target.options).slice().filter(n=>n.selected).map(n=>n.value):e.target.value}function jge({schema:e,id:t,options:n,value:r,required:i,disabled:a,readonly:o,multiple:l=!1,autofocus:c=!1,onChange:f,onBlur:d,onFocus:p,placeholder:m}){const{enumOptions:g,enumDisabled:_,emptyValue:S}=n,b=l?[]:"",x=ee.useCallback(T=>{const N=Vx(T,l);return p(t,Jr(N,g,S))},[p,t,e,l,g,S]),w=ee.useCallback(T=>{const N=Vx(T,l);return d(t,Jr(N,g,S))},[d,t,e,l,g,S]),v=ee.useCallback(T=>{const N=Vx(T,l);return f(Jr(N,g,S))},[f,e,l,g,S]),k=qhe(r,g,l),C=!l&&e.default===void 0;return O.jsxs("select",{id:t,name:t,multiple:l,className:"form-control",value:typeof k>"u"?b:k,required:i,disabled:a||o,autoFocus:c,onBlur:w,onFocus:x,onChange:v,"aria-describedby":Fs(t),children:[C&&O.jsx("option",{value:"",children:m}),Array.isArray(g)&&g.map(({value:T,label:N},j)=>{const $=_&&_.indexOf(T)!==-1;return O.jsx("option",{value:String(j),disabled:$,children:N},j)})]})}function cz({id:e,options:t={},placeholder:n,value:r,required:i,disabled:a,readonly:o,autofocus:l=!1,onChange:c,onBlur:f,onFocus:d}){const p=ee.useCallback(({target:{value:_}})=>c(_===""?t.emptyValue:_),[c,t.emptyValue]),m=ee.useCallback(({target:_})=>f(e,_&&_.value),[f,e]),g=ee.useCallback(({target:_})=>d(e,_&&_.value),[e,d]);return O.jsx("textarea",{id:e,name:e,className:"form-control",value:r||"",placeholder:n,required:i,disabled:a,readOnly:o,autoFocus:l,rows:t.rows,onBlur:m,onFocus:g,onChange:p,"aria-describedby":Fs(e)})}cz.defaultProps={autofocus:!1,options:{}};function Mge(e){const{options:t,registry:n}=e,r=bt("BaseInputTemplate",n,t);return O.jsx(r,{...e})}function $ge(e){const{onChange:t,options:n,registry:r}=e,i=bt("BaseInputTemplate",r,n),a=ee.useCallback(o=>t(o?`${o}:00`:void 0),[t]);return O.jsx(i,{type:"time",...e,onChange:a})}function Dge(e){const{options:t,registry:n}=e,r=bt("BaseInputTemplate",n,t);return O.jsx(r,{type:"url",...e})}function Ige(e){const{options:t,registry:n}=e,r=bt("BaseInputTemplate",n,t);return O.jsx(r,{type:"number",...e})}function Pge(){return{AltDateWidget:hge,AltDateTimeWidget:pge,CheckboxWidget:mge,CheckboxesWidget:gge,ColorWidget:yge,DateWidget:bge,DateTimeWidget:vge,EmailWidget:_ge,FileWidget:Age,HiddenWidget:Tge,PasswordWidget:Nge,RadioWidget:Oge,RangeWidget:Rge,SelectWidget:jge,TextWidget:Mge,TextareaWidget:cz,TimeWidget:$ge,UpDownWidget:Ige,URLWidget:Dge}}function zge(){return{fields:qme(),templates:cge(),widgets:Pge(),rootSchema:{},formContext:{},translateString:zhe}}class Lge extends ee.Component{formElement;constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");this.state=this.getStateFromProps(t,t.formData),this.props.onChange&&!Lt(this.state.formData,this.props.formData)&&this.props.onChange(this.state),this.formElement=ee.createRef()}getSnapshotBeforeUpdate(t,n){if(!Lt(this.props,t)){const r=mpe(this.props.formData,t.formData),i=!Lt(t.schema,this.props.schema),a=r.length>0||!Lt(t.formData,this.props.formData),o=this.getStateFromProps(this.props,this.props.formData,i||a?void 0:this.state.retrievedSchema,i,r),l=!Lt(o,n);return{nextState:o,shouldUpdate:l}}return{shouldUpdate:!1}}componentDidUpdate(t,n,r){if(r.shouldUpdate){const{nextState:i}=r;!Lt(i.formData,this.props.formData)&&!Lt(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(i),this.setState(i)}}getStateFromProps(t,n,r,i=!1,a=[]){const o=this.state||{},l="schema"in t?t.schema:this.props.schema,c=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},f=typeof n<"u",d="liveValidate"in t?t.liveValidate:this.props.liveValidate,p=f&&!t.noValidate&&d,m=l,g="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,_="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let S=o.schemaUtils;(!S||S.doesSchemaUtilsDiffer(t.validator,m,g,_))&&(S=Dhe(t.validator,m,g,_));const b=S.getDefaultFormState(l,n),x=this.updateRetrievedSchema(r??S.retrieveSchema(l,b)),w=()=>t.noValidate||i?{errors:[],errorSchema:{}}:t.liveValidate?{errors:o.errors||[],errorSchema:o.errorSchema||{}}:{errors:o.schemaValidationErrors||[],errorSchema:o.schemaValidationErrorSchema||{}};let v,k,C=o.schemaValidationErrors,T=o.schemaValidationErrorSchema;if(p){const $=this.validate(b,l,S,x);v=$.errors,r===void 0?k=$.errorSchema:k=$i(this.state?.errorSchema,$.errorSchema,"preventDuplicates"),C=v,T=k}else{const $=w();if(v=$.errors,k=$.errorSchema,a.length>0){const M=a.reduce((q,F)=>(q[F]=void 0,q),{});k=T=$i($.errorSchema,M,"preventDuplicates")}}if(t.extraErrors){const $=Ih({errorSchema:k,errors:v},t.extraErrors);k=$.errorSchema,v=$.errors}const N=S.toIdSchema(x,c["ui:rootFieldId"],b,t.idPrefix,t.idSeparator);return{schemaUtils:S,schema:l,uiSchema:c,idSchema:N,formData:b,edit:f,errors:v,errorSchema:k,schemaValidationErrors:C,schemaValidationErrorSchema:T,retrievedSchema:x}}shouldComponentUpdate(t,n){return spe(this,t,n)}getPreviousCustomValidateErrors(){const{customValidate:t,uiSchema:n}=this.props,r=this.state.formData;let i={};if(typeof t=="function"){const a=t(r,mp(r),n);i=VE(a)}return i}validate(t,n=this.props.schema,r,i){const a=r||this.state.schemaUtils,{customValidate:o,transformErrors:l,uiSchema:c}=this.props,f=i??a.retrieveSchema(n,t);return a.getValidator().validateFormData(t,f,o,l,c)}renderErrors(t){const{errors:n,errorSchema:r,schema:i,uiSchema:a}=this.state,{formContext:o}=this.props,l=ot(a),c=bt("ErrorListTemplate",t,l);return n&&n.length?O.jsx(c,{errors:n,errorSchema:r||{},schema:i,uiSchema:a,formContext:o,registry:t}):null}getUsedFormData=(t,n)=>{if(n.length===0&&typeof t!="object")return t;const r=O$(t,n);return Array.isArray(t)?Object.keys(r).map(i=>r[i]):r};getFieldNames=(t,n)=>{const r=(i,a=[],o=[[]])=>(Object.keys(i).forEach(l=>{if(typeof i[l]=="object"){const c=o.map(f=>[...f,l]);i[l][ZS]&&i[l][Mh]!==""?a.push(i[l][Mh]):r(i[l],a,c)}else l===Mh&&i[l]!==""&&o.forEach(c=>{const f=Re(n,c);(typeof f!="object"||ul(f)||Array.isArray(f)&&f.every(d=>typeof d!="object"))&&a.push(c)})}),a);return r(t)};omitExtraData=t=>{const{schema:n,schemaUtils:r}=this.state,i=r.retrieveSchema(n,t),a=r.toPathSchema(i,"",t),o=this.getFieldNames(a,t);return this.getUsedFormData(t,o)};filterErrorsBasedOnSchema(t,n,r){const{retrievedSchema:i,schemaUtils:a}=this.state,o=n??i,l=a.toPathSchema(o,"",r),c=this.getFieldNames(l,r),f=O$(t,c);n?.type!=="object"&&n?.type!=="array"&&(f.__errors=t.__errors);const d=this.getPreviousCustomValidateErrors(),p=(g=[],_)=>g.length===0?g:g.filter(S=>!_.includes(S)),m=(g,_={})=>(gpe(g,(S,b)=>{const x=_[b];Qu(S)||Array.isArray(S)&&S.length===0?delete g[b]:lt(S)&&lt(x)&&Array.isArray(x?.__errors)?g[b]=p(S.__errors,x.__errors):typeof S=="object"&&!Array.isArray(S.__errors)&&m(S,_[b])}),g);return m(f,d)}onChange=(t,n,r)=>{const{extraErrors:i,omitExtraData:a,liveOmit:o,noValidate:l,liveValidate:c,onChange:f}=this.props,{schemaUtils:d,schema:p}=this.state;let m=this.state.retrievedSchema;if(lt(t)||Array.isArray(t)){const b=this.getStateFromProps(this.props,t);t=b.formData,m=b.retrievedSchema}const g=!l&&c;let _={formData:t,schema:p},S=t;if(a===!0&&o===!0&&(S=this.omitExtraData(t),_={formData:S}),g){const b=this.validate(S,p,d,m);let x=b.errors,w=b.errorSchema;const v=x,k=w;if(i){const C=Ih(b,i);w=C.errorSchema,x=C.errors}if(n){const C=this.filterErrorsBasedOnSchema(n,m,S);w=$i(w,C,"preventDuplicates")}_={formData:S,errors:x,errorSchema:w,schemaValidationErrors:v,schemaValidationErrorSchema:k}}else if(!l&&n){const b=i?$i(n,i,"preventDuplicates"):n;_={formData:S,errorSchema:b,errors:wc(b)}}this.setState(_,()=>f&&f({...this.state,..._},r))};updateRetrievedSchema(t){return Lt(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{onChange:t}=this.props,i={formData:this.getStateFromProps(this.props,void 0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{}};this.setState(i,()=>t&&t({...this.state,...i}))};onBlur=(t,n)=>{const{onBlur:r}=this.props;r&&r(t,n)};onFocus=(t,n)=>{const{onFocus:r}=this.props;r&&r(t,n)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:n,extraErrors:r,noValidate:i,onSubmit:a}=this.props;let{formData:o}=this.state;if(n===!0&&(o=this.omitExtraData(o)),i||this.validateFormWithFormData(o)){const l=r||{},c=r?wc(r):[];this.setState({formData:o,errors:c,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{a&&a({...this.state,formData:o,status:"submitted"},t)})}};getRegistry(){const{translateString:t,uiSchema:n={}}=this.props,{schemaUtils:r}=this.state,{fields:i,templates:a,widgets:o,formContext:l,translateString:c}=zge();return{fields:{...i,...this.props.fields},templates:{...a,...this.props.templates,ButtonTemplates:{...a.ButtonTemplates,...this.props.templates?.ButtonTemplates}},widgets:{...o,...this.props.widgets},rootSchema:this.props.schema,formContext:this.props.formContext||l,schemaUtils:r,translateString:t||c,globalUiOptions:n[Aae]}}submit=()=>{if(this.formElement.current){const t=new CustomEvent("submit",{cancelable:!0});t.preventDefault(),this.formElement.current.dispatchEvent(t),this.formElement.current.requestSubmit()}};focusOnError(t){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=t,a=JP(i);a[0]===""?a[0]=n:a.unshift(n);const o=a.join(r);let l=this.formElement.current.elements[o];l||(l=this.formElement.current.querySelector(`input[id^="${o}"`)),l&&l.length&&(l=l[0]),l&&l.focus()}validateFormWithFormData=t=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:a}=this.props,{errors:o}=this.state,l=this.validate(t);let c=l.errors,f=l.errorSchema;const d=c,p=f,m=c.length>0||n&&r;if(m){if(n){const g=Ih(l,n);f=g.errorSchema,c=g.errors}i&&(typeof i=="function"?i(c[0]):this.focusOnError(c[0])),this.setState({errors:c,errorSchema:f,schemaValidationErrors:d,schemaValidationErrorSchema:p},()=>{a?a(c):console.error("Form validation failed",c)})}else o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!m};validateForm(){const{omitExtraData:t}=this.props;let{formData:n}=this.state;return t===!0&&(n=this.omitExtraData(n)),this.validateFormWithFormData(n)}render(){const{children:t,id:n,idPrefix:r,idSeparator:i,className:a="",tagName:o,name:l,method:c,target:f,action:d,autoComplete:p,enctype:m,acceptcharset:g,acceptCharset:_,noHtml5Validate:S=!1,disabled:b,readonly:x,formContext:w,showErrorList:v="top",_internalFormWrapper:k}=this.props,{schema:C,uiSchema:T,formData:N,errorSchema:j,idSchema:$}=this.state,M=this.getRegistry(),{SchemaField:q}=M.fields,{SubmitButton:F}=M.templates.ButtonTemplates,B=k?o:void 0,I=k||o||"form";let{[pp]:V={}}=ot(T);b&&(V={...V,props:{...V.props,disabled:!0}});const H={[Ku]:{[pp]:V}};return O.jsxs(I,{className:a||"rjsf",id:n,name:l,method:c,target:f,action:d,autoComplete:p,encType:m,acceptCharset:_||g,noValidate:S,onSubmit:this.onSubmit,as:B,ref:this.formElement,children:[v==="top"&&this.renderErrors(M),O.jsx(q,{name:"",schema:C,uiSchema:T,errorSchema:j,idSchema:$,idPrefix:r,idSeparator:i,formContext:w,formData:N,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:M,disabled:b,readonly:x}),t||O.jsx(F,{uiSchema:H,registry:M}),v==="bottom"&&this.renderErrors(M)]})}}class qge extends f5.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){console.error("Uncaught error:",t,n)}render(){return this.state.hasError?O.jsx("div",{className:"flex items-center justify-center h-full w-full",children:O.jsxs("div",{className:"bg-white rounded-2xl px-8 py-6 text-center",children:[O.jsx("h1",{className:"text-lg font-semibold text-red-500 mb-2",children:"出错了!"}),O.jsx("p",{className:"text-sm text-gray-600",children:"请稍后重试。"})]})}):this.props.children}}var Ld={exports:{}},Gx={},Oi={},cs={},Zx={},Yx={},Kx={},G$;function _p(){return G$||(G$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(w){if(super(),!e.IDENTIFIER.test(w))throw new Error("CodeGen: name must be a valid identifier");this.str=w}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(w){super(),this._items=typeof w=="string"?[w]:w}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const w=this._items[0];return w===""||w==='""'}get str(){var w;return(w=this._str)!==null&&w!==void 0?w:this._str=this._items.reduce((v,k)=>`${v}${k}`,"")}get names(){var w;return(w=this._names)!==null&&w!==void 0?w:this._names=this._items.reduce((v,k)=>(k instanceof n&&(v[k.str]=(v[k.str]||0)+1),v),{})}}e._Code=r,e.nil=new r("");function i(x,...w){const v=[x[0]];let k=0;for(;k<w.length;)l(v,w[k]),v.push(x[++k]);return new r(v)}e._=i;const a=new r("+");function o(x,...w){const v=[g(x[0])];let k=0;for(;k<w.length;)v.push(a),l(v,w[k]),v.push(a,g(x[++k]));return c(v),new r(v)}e.str=o;function l(x,w){w instanceof r?x.push(...w._items):w instanceof n?x.push(w):x.push(p(w))}e.addCodeArg=l;function c(x){let w=1;for(;w<x.length-1;){if(x[w]===a){const v=f(x[w-1],x[w+1]);if(v!==void 0){x.splice(w-1,3,v);continue}x[w++]="+"}w++}}function f(x,w){if(w==='""')return x;if(x==='""')return w;if(typeof x=="string")return w instanceof n||x[x.length-1]!=='"'?void 0:typeof w!="string"?`${x.slice(0,-1)}${w}"`:w[0]==='"'?x.slice(0,-1)+w.slice(1):void 0;if(typeof w=="string"&&w[0]==='"'&&!(x instanceof n))return`"${x}${w.slice(1)}`}function d(x,w){return w.emptyStr()?x:x.emptyStr()?w:o`${x}${w}`}e.strConcat=d;function p(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:g(Array.isArray(x)?x.join(","):x)}function m(x){return new r(g(x))}e.stringify=m;function g(x){return JSON.stringify(x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=g;function _(x){return typeof x=="string"&&e.IDENTIFIER.test(x)?new r(`.${x}`):i`[${x}]`}e.getProperty=_;function S(x){if(typeof x=="string"&&e.IDENTIFIER.test(x))return new r(`${x}`);throw new Error(`CodeGen: invalid export name: ${x}, use explicit $id name mapping`)}e.getEsmExportName=S;function b(x){return new r(x.toString())}e.regexpCode=b}(Kx)),Kx}var Xx={},Z$;function Y$(){return Z$||(Z$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=_p();class n extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var r;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:f,parent:d}={}){this._names={},this._prefixes=f,this._parent=d}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const d=this._names[f]||this._nameGroup(f);return`${f}${d.index++}`}_nameGroup(f){var d,p;if(!((p=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||p===void 0)&&p.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=i;class a extends t.Name{constructor(f,d){super(d),this.prefix=f}setValue(f,{property:d,itemIndex:p}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(d)}[${p}]`}}e.ValueScopeName=a;const o=(0,t._)`\n`;class l extends i{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?o:t.nil}}get(){return this._scope}name(f){return new a(f,this._newName(f))}value(f,d){var p;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(f),{prefix:g}=m,_=(p=d.key)!==null&&p!==void 0?p:d.ref;let S=this._values[g];if(S){const w=S.get(_);if(w)return w}else S=this._values[g]=new Map;S.set(_,m);const b=this._scope[g]||(this._scope[g]=[]),x=b.length;return b[x]=d.ref,m.setValue(d,{property:g,itemIndex:x}),m}getValue(f,d){const p=this._values[f];if(p)return p.get(d)}scopeRefs(f,d=this._values){return this._reduceValues(d,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${f}${p.scopePath}`})}scopeCode(f=this._values,d,p){return this._reduceValues(f,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},d,p)}_reduceValues(f,d,p={},m){let g=t.nil;for(const _ in f){const S=f[_];if(!S)continue;const b=p[_]=p[_]||new Map;S.forEach(x=>{if(b.has(x))return;b.set(x,r.Started);let w=d(x);if(w){const v=this.opts.es5?e.varKinds.var:e.varKinds.const;g=(0,t._)`${g}${v} ${x} = ${w};${this.opts._n}`}else if(w=m?.(x))g=(0,t._)`${g}${w}${this.opts._n}`;else throw new n(x);b.set(x,r.Completed)})}return g}}e.ValueScope=l}(Xx)),Xx}var K$;function Xe(){return K$||(K$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=_p(),n=Y$();var r=_p();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=Y$();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(D,U){return this}}class o extends a{constructor(D,U,Y){super(),this.varKind=D,this.name=U,this.rhs=Y}render({es5:D,_n:U}){const Y=D?n.varKinds.var:this.varKind,ne=this.rhs===void 0?"":` = ${this.rhs}`;return`${Y} ${this.name}${ne};`+U}optimizeNames(D,U){if(D[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,D,U)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class l extends a{constructor(D,U,Y){super(),this.lhs=D,this.rhs=U,this.sideEffects=Y}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,U){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=I(this.rhs,D,U),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return B(D,this.rhs)}}class c extends l{constructor(D,U,Y,ne){super(D,Y,ne),this.op=U}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class f extends a{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class d extends a{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class p extends a{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class m extends a{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,U){return this.code=I(this.code,D,U),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class g extends a{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((U,Y)=>U+Y.render(D),"")}optimizeNodes(){const{nodes:D}=this;let U=D.length;for(;U--;){const Y=D[U].optimizeNodes();Array.isArray(Y)?D.splice(U,1,...Y):Y?D[U]=Y:D.splice(U,1)}return D.length>0?this:void 0}optimizeNames(D,U){const{nodes:Y}=this;let ne=Y.length;for(;ne--;){const ae=Y[ne];ae.optimizeNames(D,U)||(V(D,ae.names),Y.splice(ne,1))}return Y.length>0?this:void 0}get names(){return this.nodes.reduce((D,U)=>F(D,U.names),{})}}class _ extends g{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class S extends g{}class b extends _{}b.kind="else";class x extends _{constructor(D,U){super(U),this.condition=D}render(D){let U=`if(${this.condition})`+super.render(D);return this.else&&(U+="else "+this.else.render(D)),U}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let U=this.else;if(U){const Y=U.optimizeNodes();U=this.else=Array.isArray(Y)?new b(Y):Y}if(U)return D===!1?U instanceof x?U:U.nodes:this.nodes.length?this:new x(H(D),U instanceof x?[U]:U.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,U){var Y;if(this.else=(Y=this.else)===null||Y===void 0?void 0:Y.optimizeNames(D,U),!!(super.optimizeNames(D,U)||this.else))return this.condition=I(this.condition,D,U),this}get names(){const D=super.names;return B(D,this.condition),this.else&&F(D,this.else.names),D}}x.kind="if";class w extends _{}w.kind="for";class v extends w{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,U){if(super.optimizeNames(D,U))return this.iteration=I(this.iteration,D,U),this}get names(){return F(super.names,this.iteration.names)}}class k extends w{constructor(D,U,Y,ne){super(),this.varKind=D,this.name=U,this.from=Y,this.to=ne}render(D){const U=D.es5?n.varKinds.var:this.varKind,{name:Y,from:ne,to:ae}=this;return`for(${U} ${Y}=${ne}; ${Y}<${ae}; ${Y}++)`+super.render(D)}get names(){const D=B(super.names,this.from);return B(D,this.to)}}class C extends w{constructor(D,U,Y,ne){super(),this.loop=D,this.varKind=U,this.name=Y,this.iterable=ne}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,U){if(super.optimizeNames(D,U))return this.iterable=I(this.iterable,D,U),this}get names(){return F(super.names,this.iterable.names)}}class T extends _{constructor(D,U,Y){super(),this.name=D,this.args=U,this.async=Y}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}T.kind="func";class N extends g{render(D){return"return "+super.render(D)}}N.kind="return";class j extends _{render(D){let U="try"+super.render(D);return this.catch&&(U+=this.catch.render(D)),this.finally&&(U+=this.finally.render(D)),U}optimizeNodes(){var D,U;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(U=this.finally)===null||U===void 0||U.optimizeNodes(),this}optimizeNames(D,U){var Y,ne;return super.optimizeNames(D,U),(Y=this.catch)===null||Y===void 0||Y.optimizeNames(D,U),(ne=this.finally)===null||ne===void 0||ne.optimizeNames(D,U),this}get names(){const D=super.names;return this.catch&&F(D,this.catch.names),this.finally&&F(D,this.finally.names),D}}class $ extends _{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}$.kind="catch";class M extends _{render(D){return"finally"+super.render(D)}}M.kind="finally";class q{constructor(D,U={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...U,_n:U.lines?`
271
+ `:""},this._extScope=D,this._scope=new n.Scope({parent:D}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,U){const Y=this._extScope.value(D,U);return(this._values[Y.prefix]||(this._values[Y.prefix]=new Set)).add(Y),Y}getScopeValue(D,U){return this._extScope.getValue(D,U)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,U,Y,ne){const ae=this._scope.toName(U);return Y!==void 0&&ne&&(this._constants[ae.str]=Y),this._leafNode(new o(D,ae,Y)),ae}const(D,U,Y){return this._def(n.varKinds.const,D,U,Y)}let(D,U,Y){return this._def(n.varKinds.let,D,U,Y)}var(D,U,Y){return this._def(n.varKinds.var,D,U,Y)}assign(D,U,Y){return this._leafNode(new l(D,U,Y))}add(D,U){return this._leafNode(new c(D,e.operators.ADD,U))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new m(D)),this}object(...D){const U=["{"];for(const[Y,ne]of D)U.length>1&&U.push(","),U.push(Y),(Y!==ne||this.opts.es5)&&(U.push(":"),(0,t.addCodeArg)(U,ne));return U.push("}"),new t._Code(U)}if(D,U,Y){if(this._blockNode(new x(D)),U&&Y)this.code(U).else().code(Y).endIf();else if(U)this.code(U).endIf();else if(Y)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new x(D))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(x,b)}_for(D,U){return this._blockNode(D),U&&this.code(U).endFor(),this}for(D,U){return this._for(new v(D),U)}forRange(D,U,Y,ne,ae=this.opts.es5?n.varKinds.var:n.varKinds.let){const re=this._scope.toName(D);return this._for(new k(ae,re,U,Y),()=>ne(re))}forOf(D,U,Y,ne=n.varKinds.const){const ae=this._scope.toName(D);if(this.opts.es5){const re=U instanceof t.Name?U:this.var("_arr",U);return this.forRange("_i",0,(0,t._)`${re}.length`,de=>{this.var(ae,(0,t._)`${re}[${de}]`),Y(ae)})}return this._for(new C("of",ne,ae,U),()=>Y(ae))}forIn(D,U,Y,ne=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${U})`,Y);const ae=this._scope.toName(D);return this._for(new C("in",ne,ae,U),()=>Y(ae))}endFor(){return this._endBlockNode(w)}label(D){return this._leafNode(new f(D))}break(D){return this._leafNode(new d(D))}return(D){const U=new N;if(this._blockNode(U),this.code(D),U.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(N)}try(D,U,Y){if(!U&&!Y)throw new Error('CodeGen: "try" without "catch" and "finally"');const ne=new j;if(this._blockNode(ne),this.code(D),U){const ae=this.name("e");this._currNode=ne.catch=new $(ae),U(ae)}return Y&&(this._currNode=ne.finally=new M,this.code(Y)),this._endBlockNode($,M)}throw(D){return this._leafNode(new p(D))}block(D,U){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(U),this}endBlock(D){const U=this._blockStarts.pop();if(U===void 0)throw new Error("CodeGen: not in self-balancing block");const Y=this._nodes.length-U;if(Y<0||D!==void 0&&Y!==D)throw new Error(`CodeGen: wrong number of nodes: ${Y} vs ${D} expected`);return this._nodes.length=U,this}func(D,U=t.nil,Y,ne){return this._blockNode(new T(D,U,Y)),ne&&this.code(ne).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,U){const Y=this._currNode;if(Y instanceof D||U&&Y instanceof U)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${U?`${D.kind}/${U.kind}`:D.kind}"`)}_elseNode(D){const U=this._currNode;if(!(U instanceof x))throw new Error('CodeGen: "else" without "if"');return this._currNode=U.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const U=this._nodes;U[U.length-1]=D}}e.CodeGen=q;function F(R,D){for(const U in D)R[U]=(R[U]||0)+(D[U]||0);return R}function B(R,D){return D instanceof t._CodeOrName?F(R,D.names):R}function I(R,D,U){if(R instanceof t.Name)return Y(R);if(!ne(R))return R;return new t._Code(R._items.reduce((ae,re)=>(re instanceof t.Name&&(re=Y(re)),re instanceof t._Code?ae.push(...re._items):ae.push(re),ae),[]));function Y(ae){const re=U[ae.str];return re===void 0||D[ae.str]!==1?ae:(delete D[ae.str],re)}function ne(ae){return ae instanceof t._Code&&ae._items.some(re=>re instanceof t.Name&&D[re.str]===1&&U[re.str]!==void 0)}}function V(R,D){for(const U in D)R[U]=(R[U]||0)-(D[U]||0)}function H(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,t._)`!${Z(R)}`}e.not=H;const G=P(e.operators.AND);function X(...R){return R.reduce(G)}e.and=X;const W=P(e.operators.OR);function L(...R){return R.reduce(W)}e.or=L;function P(R){return(D,U)=>D===t.nil?U:U===t.nil?D:(0,t._)`${Z(D)} ${R} ${Z(U)}`}function Z(R){return R instanceof t.Name?R:(0,t._)`(${R})`}}(Yx)),Yx}var Ke={},X$;function pt(){if(X$)return Ke;X$=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.checkStrictMode=Ke.getErrorPath=Ke.Type=Ke.useFunc=Ke.setEvaluated=Ke.evaluatedPropsToName=Ke.mergeEvaluated=Ke.eachItem=Ke.unescapeJsonPointer=Ke.escapeJsonPointer=Ke.escapeFragment=Ke.unescapeFragment=Ke.schemaRefOrVal=Ke.schemaHasRulesButRef=Ke.schemaHasRules=Ke.checkUnknownRules=Ke.alwaysValidSchema=Ke.toHash=void 0;const e=Xe(),t=_p();function n(C){const T={};for(const N of C)T[N]=!0;return T}Ke.toHash=n;function r(C,T){return typeof T=="boolean"?T:Object.keys(T).length===0?!0:(i(C,T),!a(T,C.self.RULES.all))}Ke.alwaysValidSchema=r;function i(C,T=C.schema){const{opts:N,self:j}=C;if(!N.strictSchema||typeof T=="boolean")return;const $=j.RULES.keywords;for(const M in T)$[M]||k(C,`unknown keyword: "${M}"`)}Ke.checkUnknownRules=i;function a(C,T){if(typeof C=="boolean")return!C;for(const N in C)if(T[N])return!0;return!1}Ke.schemaHasRules=a;function o(C,T){if(typeof C=="boolean")return!C;for(const N in C)if(N!=="$ref"&&T.all[N])return!0;return!1}Ke.schemaHasRulesButRef=o;function l({topSchemaRef:C,schemaPath:T},N,j,$){if(!$){if(typeof N=="number"||typeof N=="boolean")return N;if(typeof N=="string")return(0,e._)`${N}`}return(0,e._)`${C}${T}${(0,e.getProperty)(j)}`}Ke.schemaRefOrVal=l;function c(C){return p(decodeURIComponent(C))}Ke.unescapeFragment=c;function f(C){return encodeURIComponent(d(C))}Ke.escapeFragment=f;function d(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}Ke.escapeJsonPointer=d;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}Ke.unescapeJsonPointer=p;function m(C,T){if(Array.isArray(C))for(const N of C)T(N);else T(C)}Ke.eachItem=m;function g({mergeNames:C,mergeToName:T,mergeValues:N,resultToName:j}){return($,M,q,F)=>{const B=q===void 0?M:q instanceof e.Name?(M instanceof e.Name?C($,M,q):T($,M,q),q):M instanceof e.Name?(T($,q,M),M):N(M,q);return F===e.Name&&!(B instanceof e.Name)?j($,B):B}}Ke.mergeEvaluated={props:g({mergeNames:(C,T,N)=>C.if((0,e._)`${N} !== true && ${T} !== undefined`,()=>{C.if((0,e._)`${T} === true`,()=>C.assign(N,!0),()=>C.assign(N,(0,e._)`${N} || {}`).code((0,e._)`Object.assign(${N}, ${T})`))}),mergeToName:(C,T,N)=>C.if((0,e._)`${N} !== true`,()=>{T===!0?C.assign(N,!0):(C.assign(N,(0,e._)`${N} || {}`),S(C,N,T))}),mergeValues:(C,T)=>C===!0?!0:{...C,...T},resultToName:_}),items:g({mergeNames:(C,T,N)=>C.if((0,e._)`${N} !== true && ${T} !== undefined`,()=>C.assign(N,(0,e._)`${T} === true ? true : ${N} > ${T} ? ${N} : ${T}`)),mergeToName:(C,T,N)=>C.if((0,e._)`${N} !== true`,()=>C.assign(N,T===!0?!0:(0,e._)`${N} > ${T} ? ${N} : ${T}`)),mergeValues:(C,T)=>C===!0?!0:Math.max(C,T),resultToName:(C,T)=>C.var("items",T)})};function _(C,T){if(T===!0)return C.var("props",!0);const N=C.var("props",(0,e._)`{}`);return T!==void 0&&S(C,N,T),N}Ke.evaluatedPropsToName=_;function S(C,T,N){Object.keys(N).forEach(j=>C.assign((0,e._)`${T}${(0,e.getProperty)(j)}`,!0))}Ke.setEvaluated=S;const b={};function x(C,T){return C.scopeValue("func",{ref:T,code:b[T.code]||(b[T.code]=new t._Code(T.code))})}Ke.useFunc=x;var w;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(w||(Ke.Type=w={}));function v(C,T,N){if(C instanceof e.Name){const j=T===w.Num;return N?j?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:j?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return N?(0,e.getProperty)(C).toString():"/"+d(C)}Ke.getErrorPath=v;function k(C,T,N=C.opts.strictSchema){if(N){if(T=`strict mode: ${T}`,N===!0)throw new Error(T);C.self.logger.warn(T)}}return Ke.checkStrictMode=k,Ke}var qd={},W$;function qa(){if(W$)return qd;W$=1,Object.defineProperty(qd,"__esModule",{value:!0});const e=Xe(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return qd.default=t,qd}var Q$;function bm(){return Q$||(Q$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=Xe(),n=pt(),r=qa();e.keywordError={message:({keyword:b})=>(0,t.str)`must pass "${b}" keyword validation`},e.keyword$DataError={message:({keyword:b,schemaType:x})=>x?(0,t.str)`"${b}" keyword must be ${x} ($data)`:(0,t.str)`"${b}" keyword is invalid ($data)`};function i(b,x=e.keywordError,w,v){const{it:k}=b,{gen:C,compositeRule:T,allErrors:N}=k,j=p(b,x,w);v??(T||N)?c(C,j):f(k,(0,t._)`[${j}]`)}e.reportError=i;function a(b,x=e.keywordError,w){const{it:v}=b,{gen:k,compositeRule:C,allErrors:T}=v,N=p(b,x,w);c(k,N),C||T||f(v,r.default.vErrors)}e.reportExtraError=a;function o(b,x){b.assign(r.default.errors,x),b.if((0,t._)`${r.default.vErrors} !== null`,()=>b.if(x,()=>b.assign((0,t._)`${r.default.vErrors}.length`,x),()=>b.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function l({gen:b,keyword:x,schemaValue:w,data:v,errsCount:k,it:C}){if(k===void 0)throw new Error("ajv implementation error");const T=b.name("err");b.forRange("i",k,r.default.errors,N=>{b.const(T,(0,t._)`${r.default.vErrors}[${N}]`),b.if((0,t._)`${T}.instancePath === undefined`,()=>b.assign((0,t._)`${T}.instancePath`,(0,t.strConcat)(r.default.instancePath,C.errorPath))),b.assign((0,t._)`${T}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${x}`),C.opts.verbose&&(b.assign((0,t._)`${T}.schema`,w),b.assign((0,t._)`${T}.data`,v))})}e.extendErrors=l;function c(b,x){const w=b.const("err",x);b.if((0,t._)`${r.default.vErrors} === null`,()=>b.assign(r.default.vErrors,(0,t._)`[${w}]`),(0,t._)`${r.default.vErrors}.push(${w})`),b.code((0,t._)`${r.default.errors}++`)}function f(b,x){const{gen:w,validateName:v,schemaEnv:k}=b;k.$async?w.throw((0,t._)`new ${b.ValidationError}(${x})`):(w.assign((0,t._)`${v}.errors`,x),w.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(b,x,w){const{createErrors:v}=b.it;return v===!1?(0,t._)`{}`:m(b,x,w)}function m(b,x,w={}){const{gen:v,it:k}=b,C=[g(k,w),_(b,w)];return S(b,x,C),v.object(...C)}function g({errorPath:b},{instancePath:x}){const w=x?(0,t.str)`${b}${(0,n.getErrorPath)(x,n.Type.Str)}`:b;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,w)]}function _({keyword:b,it:{errSchemaPath:x}},{schemaPath:w,parentSchema:v}){let k=v?x:(0,t.str)`${x}/${b}`;return w&&(k=(0,t.str)`${k}${(0,n.getErrorPath)(w,n.Type.Str)}`),[d.schemaPath,k]}function S(b,{params:x,message:w},v){const{keyword:k,data:C,schemaValue:T,it:N}=b,{opts:j,propertyName:$,topSchemaRef:M,schemaPath:q}=N;v.push([d.keyword,k],[d.params,typeof x=="function"?x(b):x||(0,t._)`{}`]),j.messages&&v.push([d.message,typeof w=="function"?w(b):w]),j.verbose&&v.push([d.schema,T],[d.parentSchema,(0,t._)`${M}${q}`],[r.default.data,C]),$&&v.push([d.propertyName,$])}}(Zx)),Zx}var J$;function Fge(){if(J$)return cs;J$=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.boolOrEmptySchema=cs.topBoolOrEmptySchema=void 0;const e=bm(),t=Xe(),n=qa(),r={message:"boolean schema is false"};function i(l){const{gen:c,schema:f,validateName:d}=l;f===!1?o(l,!1):typeof f=="object"&&f.$async===!0?c.return(n.default.data):(c.assign((0,t._)`${d}.errors`,null),c.return(!0))}cs.topBoolOrEmptySchema=i;function a(l,c){const{gen:f,schema:d}=l;d===!1?(f.var(c,!1),o(l)):f.var(c,!0)}cs.boolOrEmptySchema=a;function o(l,c){const{gen:f,data:d}=l,p={gen:f,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,e.reportError)(p,r,void 0,c)}return cs}var mn={},fs={},eD;function fz(){if(eD)return fs;eD=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.getRules=fs.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(i){return typeof i=="string"&&t.has(i)}fs.isJSONType=n;function r(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return fs.getRules=r,fs}var Ri={},tD;function dz(){if(tD)return Ri;tD=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.shouldUseRule=Ri.shouldUseGroup=Ri.schemaHasRulesForType=void 0;function e({schema:r,self:i},a){const o=i.RULES.types[a];return o&&o!==!0&&t(r,o)}Ri.schemaHasRulesForType=e;function t(r,i){return i.rules.some(a=>n(r,a))}Ri.shouldUseGroup=t;function n(r,i){var a;return r[i.keyword]!==void 0||((a=i.definition.implements)===null||a===void 0?void 0:a.some(o=>r[o]!==void 0))}return Ri.shouldUseRule=n,Ri}var nD;function xp(){if(nD)return mn;nD=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.reportTypeError=mn.checkDataTypes=mn.checkDataType=mn.coerceAndCheckDataType=mn.getJSONTypes=mn.getSchemaTypes=mn.DataType=void 0;const e=fz(),t=dz(),n=bm(),r=Xe(),i=pt();var a;(function(w){w[w.Correct=0]="Correct",w[w.Wrong=1]="Wrong"})(a||(mn.DataType=a={}));function o(w){const v=l(w.type);if(v.includes("null")){if(w.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&w.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');w.nullable===!0&&v.push("null")}return v}mn.getSchemaTypes=o;function l(w){const v=Array.isArray(w)?w:w?[w]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}mn.getJSONTypes=l;function c(w,v){const{gen:k,data:C,opts:T}=w,N=d(v,T.coerceTypes),j=v.length>0&&!(N.length===0&&v.length===1&&(0,t.schemaHasRulesForType)(w,v[0]));if(j){const $=_(v,C,T.strictNumbers,a.Wrong);k.if($,()=>{N.length?p(w,v,N):b(w)})}return j}mn.coerceAndCheckDataType=c;const f=new Set(["string","number","integer","boolean","null"]);function d(w,v){return v?w.filter(k=>f.has(k)||v==="array"&&k==="array"):[]}function p(w,v,k){const{gen:C,data:T,opts:N}=w,j=C.let("dataType",(0,r._)`typeof ${T}`),$=C.let("coerced",(0,r._)`undefined`);N.coerceTypes==="array"&&C.if((0,r._)`${j} == 'object' && Array.isArray(${T}) && ${T}.length == 1`,()=>C.assign(T,(0,r._)`${T}[0]`).assign(j,(0,r._)`typeof ${T}`).if(_(v,T,N.strictNumbers),()=>C.assign($,T))),C.if((0,r._)`${$} !== undefined`);for(const q of k)(f.has(q)||q==="array"&&N.coerceTypes==="array")&&M(q);C.else(),b(w),C.endIf(),C.if((0,r._)`${$} !== undefined`,()=>{C.assign(T,$),m(w,$)});function M(q){switch(q){case"string":C.elseIf((0,r._)`${j} == "number" || ${j} == "boolean"`).assign($,(0,r._)`"" + ${T}`).elseIf((0,r._)`${T} === null`).assign($,(0,r._)`""`);return;case"number":C.elseIf((0,r._)`${j} == "boolean" || ${T} === null
272
+ || (${j} == "string" && ${T} && ${T} == +${T})`).assign($,(0,r._)`+${T}`);return;case"integer":C.elseIf((0,r._)`${j} === "boolean" || ${T} === null
273
+ || (${j} === "string" && ${T} && ${T} == +${T} && !(${T} % 1))`).assign($,(0,r._)`+${T}`);return;case"boolean":C.elseIf((0,r._)`${T} === "false" || ${T} === 0 || ${T} === null`).assign($,!1).elseIf((0,r._)`${T} === "true" || ${T} === 1`).assign($,!0);return;case"null":C.elseIf((0,r._)`${T} === "" || ${T} === 0 || ${T} === false`),C.assign($,null);return;case"array":C.elseIf((0,r._)`${j} === "string" || ${j} === "number"
274
+ || ${j} === "boolean" || ${T} === null`).assign($,(0,r._)`[${T}]`)}}}function m({gen:w,parentData:v,parentDataProperty:k},C){w.if((0,r._)`${v} !== undefined`,()=>w.assign((0,r._)`${v}[${k}]`,C))}function g(w,v,k,C=a.Correct){const T=C===a.Correct?r.operators.EQ:r.operators.NEQ;let N;switch(w){case"null":return(0,r._)`${v} ${T} null`;case"array":N=(0,r._)`Array.isArray(${v})`;break;case"object":N=(0,r._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":N=j((0,r._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":N=j();break;default:return(0,r._)`typeof ${v} ${T} ${w}`}return C===a.Correct?N:(0,r.not)(N);function j($=r.nil){return(0,r.and)((0,r._)`typeof ${v} == "number"`,$,k?(0,r._)`isFinite(${v})`:r.nil)}}mn.checkDataType=g;function _(w,v,k,C){if(w.length===1)return g(w[0],v,k,C);let T;const N=(0,i.toHash)(w);if(N.array&&N.object){const j=(0,r._)`typeof ${v} != "object"`;T=N.null?j:(0,r._)`!${v} || ${j}`,delete N.null,delete N.array,delete N.object}else T=r.nil;N.number&&delete N.integer;for(const j in N)T=(0,r.and)(T,g(j,v,k,C));return T}mn.checkDataTypes=_;const S={message:({schema:w})=>`must be ${w}`,params:({schema:w,schemaValue:v})=>typeof w=="string"?(0,r._)`{type: ${w}}`:(0,r._)`{type: ${v}}`};function b(w){const v=x(w);(0,n.reportError)(v,S)}mn.reportTypeError=b;function x(w){const{gen:v,data:k,schema:C}=w,T=(0,i.schemaRefOrVal)(w,C,"type");return{gen:v,keyword:"type",data:k,schema:C.type,schemaCode:T,schemaValue:T,parentSchema:C,params:{},it:w}}return mn}var ju={},rD;function Bge(){if(rD)return ju;rD=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.assignDefaults=void 0;const e=Xe(),t=pt();function n(i,a){const{properties:o,items:l}=i.schema;if(a==="object"&&o)for(const c in o)r(i,c,o[c].default);else a==="array"&&Array.isArray(l)&&l.forEach((c,f)=>r(i,f,c.default))}ju.assignDefaults=n;function r(i,a,o){const{gen:l,compositeRule:c,data:f,opts:d}=i;if(o===void 0)return;const p=(0,e._)`${f}${(0,e.getProperty)(a)}`;if(c){(0,t.checkStrictMode)(i,`default is ignored for: ${p}`);return}let m=(0,e._)`${p} === undefined`;d.useDefaults==="empty"&&(m=(0,e._)`${m} || ${p} === null || ${p} === ""`),l.if(m,(0,e._)`${p} = ${(0,e.stringify)(o)}`)}return ju}var Or={},St={},iD;function Lr(){if(iD)return St;iD=1,Object.defineProperty(St,"__esModule",{value:!0}),St.validateUnion=St.validateArray=St.usePattern=St.callValidateCode=St.schemaProperties=St.allSchemaProperties=St.noPropertyInData=St.propertyInData=St.isOwnProperty=St.hasPropFunc=St.reportMissingProp=St.checkMissingProp=St.checkReportMissingProp=void 0;const e=Xe(),t=pt(),n=qa(),r=pt();function i(w,v){const{gen:k,data:C,it:T}=w;k.if(d(k,C,v,T.opts.ownProperties),()=>{w.setParams({missingProperty:(0,e._)`${v}`},!0),w.error()})}St.checkReportMissingProp=i;function a({gen:w,data:v,it:{opts:k}},C,T){return(0,e.or)(...C.map(N=>(0,e.and)(d(w,v,N,k.ownProperties),(0,e._)`${T} = ${N}`)))}St.checkMissingProp=a;function o(w,v){w.setParams({missingProperty:v},!0),w.error()}St.reportMissingProp=o;function l(w){return w.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}St.hasPropFunc=l;function c(w,v,k){return(0,e._)`${l(w)}.call(${v}, ${k})`}St.isOwnProperty=c;function f(w,v,k,C){const T=(0,e._)`${v}${(0,e.getProperty)(k)} !== undefined`;return C?(0,e._)`${T} && ${c(w,v,k)}`:T}St.propertyInData=f;function d(w,v,k,C){const T=(0,e._)`${v}${(0,e.getProperty)(k)} === undefined`;return C?(0,e.or)(T,(0,e.not)(c(w,v,k))):T}St.noPropertyInData=d;function p(w){return w?Object.keys(w).filter(v=>v!=="__proto__"):[]}St.allSchemaProperties=p;function m(w,v){return p(v).filter(k=>!(0,t.alwaysValidSchema)(w,v[k]))}St.schemaProperties=m;function g({schemaCode:w,data:v,it:{gen:k,topSchemaRef:C,schemaPath:T,errorPath:N},it:j},$,M,q){const F=q?(0,e._)`${w}, ${v}, ${C}${T}`:v,B=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,N)],[n.default.parentData,j.parentData],[n.default.parentDataProperty,j.parentDataProperty],[n.default.rootData,n.default.rootData]];j.opts.dynamicRef&&B.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const I=(0,e._)`${F}, ${k.object(...B)}`;return M!==e.nil?(0,e._)`${$}.call(${M}, ${I})`:(0,e._)`${$}(${I})`}St.callValidateCode=g;const _=(0,e._)`new RegExp`;function S({gen:w,it:{opts:v}},k){const C=v.unicodeRegExp?"u":"",{regExp:T}=v.code,N=T(k,C);return w.scopeValue("pattern",{key:N.toString(),ref:N,code:(0,e._)`${T.code==="new RegExp"?_:(0,r.useFunc)(w,T)}(${k}, ${C})`})}St.usePattern=S;function b(w){const{gen:v,data:k,keyword:C,it:T}=w,N=v.name("valid");if(T.allErrors){const $=v.let("valid",!0);return j(()=>v.assign($,!1)),$}return v.var(N,!0),j(()=>v.break()),N;function j($){const M=v.const("len",(0,e._)`${k}.length`);v.forRange("i",0,M,q=>{w.subschema({keyword:C,dataProp:q,dataPropType:t.Type.Num},N),v.if((0,e.not)(N),$)})}}St.validateArray=b;function x(w){const{gen:v,schema:k,keyword:C,it:T}=w;if(!Array.isArray(k))throw new Error("ajv implementation error");if(k.some(M=>(0,t.alwaysValidSchema)(T,M))&&!T.opts.unevaluated)return;const j=v.let("valid",!1),$=v.name("_valid");v.block(()=>k.forEach((M,q)=>{const F=w.subschema({keyword:C,schemaProp:q,compositeRule:!0},$);v.assign(j,(0,e._)`${j} || ${$}`),w.mergeValidEvaluated(F,$)||v.if((0,e.not)(j))})),w.result(j,()=>w.reset(),()=>w.error(!0))}return St.validateUnion=x,St}var aD;function Uge(){if(aD)return Or;aD=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.validateKeywordUsage=Or.validSchemaType=Or.funcKeywordCode=Or.macroKeywordCode=void 0;const e=Xe(),t=qa(),n=Lr(),r=bm();function i(m,g){const{gen:_,keyword:S,schema:b,parentSchema:x,it:w}=m,v=g.macro.call(w.self,b,x,w),k=f(_,S,v);w.opts.validateSchema!==!1&&w.self.validateSchema(v,!0);const C=_.name("valid");m.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${w.errSchemaPath}/${S}`,topSchemaRef:k,compositeRule:!0},C),m.pass(C,()=>m.error(!0))}Or.macroKeywordCode=i;function a(m,g){var _;const{gen:S,keyword:b,schema:x,parentSchema:w,$data:v,it:k}=m;c(k,g);const C=!v&&g.compile?g.compile.call(k.self,x,w,k):g.validate,T=f(S,b,C),N=S.let("valid");m.block$data(N,j),m.ok((_=g.valid)!==null&&_!==void 0?_:N);function j(){if(g.errors===!1)q(),g.modifying&&o(m),F(()=>m.error());else{const B=g.async?$():M();g.modifying&&o(m),F(()=>l(m,B))}}function $(){const B=S.let("ruleErrs",null);return S.try(()=>q((0,e._)`await `),I=>S.assign(N,!1).if((0,e._)`${I} instanceof ${k.ValidationError}`,()=>S.assign(B,(0,e._)`${I}.errors`),()=>S.throw(I))),B}function M(){const B=(0,e._)`${T}.errors`;return S.assign(B,null),q(e.nil),B}function q(B=g.async?(0,e._)`await `:e.nil){const I=k.opts.passContext?t.default.this:t.default.self,V=!("compile"in g&&!v||g.schema===!1);S.assign(N,(0,e._)`${B}${(0,n.callValidateCode)(m,T,I,V)}`,g.modifying)}function F(B){var I;S.if((0,e.not)((I=g.valid)!==null&&I!==void 0?I:N),B)}}Or.funcKeywordCode=a;function o(m){const{gen:g,data:_,it:S}=m;g.if(S.parentData,()=>g.assign(_,(0,e._)`${S.parentData}[${S.parentDataProperty}]`))}function l(m,g){const{gen:_}=m;_.if((0,e._)`Array.isArray(${g})`,()=>{_.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${g} : ${t.default.vErrors}.concat(${g})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},g){if(g.async&&!m.$async)throw new Error("async keyword in sync schema")}function f(m,g,_){if(_===void 0)throw new Error(`keyword "${g}" failed to compile`);return m.scopeValue("keyword",typeof _=="function"?{ref:_}:{ref:_,code:(0,e.stringify)(_)})}function d(m,g,_=!1){return!g.length||g.some(S=>S==="array"?Array.isArray(m):S==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==S||_&&typeof m>"u")}Or.validSchemaType=d;function p({schema:m,opts:g,self:_,errSchemaPath:S},b,x){if(Array.isArray(b.keyword)?!b.keyword.includes(x):b.keyword!==x)throw new Error("ajv implementation error");const w=b.dependencies;if(w?.some(v=>!Object.prototype.hasOwnProperty.call(m,v)))throw new Error(`parent schema must have dependencies of ${x}: ${w.join(",")}`);if(b.validateSchema&&!b.validateSchema(m[x])){const k=`keyword "${x}" value is invalid at path "${S}": `+_.errorsText(b.validateSchema.errors);if(g.validateSchema==="log")_.logger.error(k);else throw new Error(k)}}return Or.validateKeywordUsage=p,Or}var ji={},sD;function Hge(){if(sD)return ji;sD=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.extendSubschemaMode=ji.extendSubschemaData=ji.getSubschema=void 0;const e=Xe(),t=pt();function n(a,{keyword:o,schemaProp:l,schema:c,schemaPath:f,errSchemaPath:d,topSchemaRef:p}){if(o!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const m=a.schema[o];return l===void 0?{schema:m,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${o}`}:{schema:m[l],schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(o)}${(0,e.getProperty)(l)}`,errSchemaPath:`${a.errSchemaPath}/${o}/${(0,t.escapeFragment)(l)}`}}if(c!==void 0){if(f===void 0||d===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:f,topSchemaRef:p,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}ji.getSubschema=n;function r(a,o,{dataProp:l,dataPropType:c,data:f,dataTypes:d,propertyName:p}){if(f!==void 0&&l!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=o;if(l!==void 0){const{errorPath:_,dataPathArr:S,opts:b}=o,x=m.let("data",(0,e._)`${o.data}${(0,e.getProperty)(l)}`,!0);g(x),a.errorPath=(0,e.str)`${_}${(0,t.getErrorPath)(l,c,b.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${l}`,a.dataPathArr=[...S,a.parentDataProperty]}if(f!==void 0){const _=f instanceof e.Name?f:m.let("data",f,!0);g(_),p!==void 0&&(a.propertyName=p)}d&&(a.dataTypes=d);function g(_){a.data=_,a.dataLevel=o.dataLevel+1,a.dataTypes=[],o.definedProperties=new Set,a.parentData=o.data,a.dataNames=[...o.dataNames,_]}}ji.extendSubschemaData=r;function i(a,{jtdDiscriminator:o,jtdMetadata:l,compositeRule:c,createErrors:f,allErrors:d}){c!==void 0&&(a.compositeRule=c),f!==void 0&&(a.createErrors=f),d!==void 0&&(a.allErrors=d),a.jtdDiscriminator=o,a.jtdMetadata=l}return ji.extendSubschemaMode=i,ji}var Cn={},Wx,oD;function hz(){return oD||(oD=1,Wx=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}),Wx}var Qx={exports:{}},lD;function Vge(){if(lD)return Qx.exports;lD=1;var e=Qx.exports=function(r,i,a){typeof i=="function"&&(a=i,i={}),a=i.cb||a;var o=typeof a=="function"?a:a.pre||function(){},l=a.post||function(){};t(i,o,l,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,i,a,o,l,c,f,d,p,m){if(o&&typeof o=="object"&&!Array.isArray(o)){i(o,l,c,f,d,p,m);for(var g in o){var _=o[g];if(Array.isArray(_)){if(g in e.arrayKeywords)for(var S=0;S<_.length;S++)t(r,i,a,_[S],l+"/"+g+"/"+S,c,l,g,o,S)}else if(g in e.propsKeywords){if(_&&typeof _=="object")for(var b in _)t(r,i,a,_[b],l+"/"+g+"/"+n(b),c,l,g,o,b)}else(g in e.keywords||r.allKeys&&!(g in e.skipKeywords))&&t(r,i,a,_,l+"/"+g,c,l,g,o)}a(o,l,c,f,d,p,m)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return Qx.exports}var uD;function vm(){if(uD)return Cn;uD=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.getSchemaRefs=Cn.resolveUrl=Cn.normalizeId=Cn._getFullPath=Cn.getFullPath=Cn.inlineRef=void 0;const e=pt(),t=hz(),n=Vge(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(S,b=!0){return typeof S=="boolean"?!0:b===!0?!o(S):b?l(S)<=b:!1}Cn.inlineRef=i;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(S){for(const b in S){if(a.has(b))return!0;const x=S[b];if(Array.isArray(x)&&x.some(o)||typeof x=="object"&&o(x))return!0}return!1}function l(S){let b=0;for(const x in S){if(x==="$ref")return 1/0;if(b++,!r.has(x)&&(typeof S[x]=="object"&&(0,e.eachItem)(S[x],w=>b+=l(w)),b===1/0))return 1/0}return b}function c(S,b="",x){x!==!1&&(b=p(b));const w=S.parse(b);return f(S,w)}Cn.getFullPath=c;function f(S,b){return S.serialize(b).split("#")[0]+"#"}Cn._getFullPath=f;const d=/#\/?$/;function p(S){return S?S.replace(d,""):""}Cn.normalizeId=p;function m(S,b,x){return x=p(x),S.resolve(b,x)}Cn.resolveUrl=m;const g=/^[a-z_][-a-z0-9._]*$/i;function _(S,b){if(typeof S=="boolean")return{};const{schemaId:x,uriResolver:w}=this.opts,v=p(S[x]||b),k={"":v},C=c(w,v,!1),T={},N=new Set;return n(S,{allKeys:!0},(M,q,F,B)=>{if(B===void 0)return;const I=C+q;let V=k[B];typeof M[x]=="string"&&(V=H.call(this,M[x])),G.call(this,M.$anchor),G.call(this,M.$dynamicAnchor),k[q]=V;function H(X){const W=this.opts.uriResolver.resolve;if(X=p(V?W(V,X):X),N.has(X))throw $(X);N.add(X);let L=this.refs[X];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?j(M,L.schema,X):X!==p(I)&&(X[0]==="#"?(j(M,T[X],X),T[X]=M):this.refs[X]=I),X}function G(X){if(typeof X=="string"){if(!g.test(X))throw new Error(`invalid anchor "${X}"`);H.call(this,`#${X}`)}}}),T;function j(M,q,F){if(q!==void 0&&!t(M,q))throw $(F)}function $(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return Cn.getSchemaRefs=_,Cn}var cD;function _m(){if(cD)return Oi;cD=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.getData=Oi.KeywordCxt=Oi.validateFunctionCode=void 0;const e=Fge(),t=xp(),n=dz(),r=xp(),i=Bge(),a=Uge(),o=Hge(),l=Xe(),c=qa(),f=vm(),d=pt(),p=bm();function m(Q){if(C(Q)&&(N(Q),k(Q))){b(Q);return}g(Q,()=>(0,e.topBoolOrEmptySchema)(Q))}Oi.validateFunctionCode=m;function g({gen:Q,validateName:J,schema:oe,schemaEnv:fe,opts:me},we){me.code.es5?Q.func(J,(0,l._)`${c.default.data}, ${c.default.valCxt}`,fe.$async,()=>{Q.code((0,l._)`"use strict"; ${w(oe,me)}`),S(Q,me),Q.code(we)}):Q.func(J,(0,l._)`${c.default.data}, ${_(me)}`,fe.$async,()=>Q.code(w(oe,me)).code(we))}function _(Q){return(0,l._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${Q.dynamicRef?(0,l._)`, ${c.default.dynamicAnchors}={}`:l.nil}}={}`}function S(Q,J){Q.if(c.default.valCxt,()=>{Q.var(c.default.instancePath,(0,l._)`${c.default.valCxt}.${c.default.instancePath}`),Q.var(c.default.parentData,(0,l._)`${c.default.valCxt}.${c.default.parentData}`),Q.var(c.default.parentDataProperty,(0,l._)`${c.default.valCxt}.${c.default.parentDataProperty}`),Q.var(c.default.rootData,(0,l._)`${c.default.valCxt}.${c.default.rootData}`),J.dynamicRef&&Q.var(c.default.dynamicAnchors,(0,l._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{Q.var(c.default.instancePath,(0,l._)`""`),Q.var(c.default.parentData,(0,l._)`undefined`),Q.var(c.default.parentDataProperty,(0,l._)`undefined`),Q.var(c.default.rootData,c.default.data),J.dynamicRef&&Q.var(c.default.dynamicAnchors,(0,l._)`{}`)})}function b(Q){const{schema:J,opts:oe,gen:fe}=Q;g(Q,()=>{oe.$comment&&J.$comment&&B(Q),M(Q),fe.let(c.default.vErrors,null),fe.let(c.default.errors,0),oe.unevaluated&&x(Q),j(Q),I(Q)})}function x(Q){const{gen:J,validateName:oe}=Q;Q.evaluated=J.const("evaluated",(0,l._)`${oe}.evaluated`),J.if((0,l._)`${Q.evaluated}.dynamicProps`,()=>J.assign((0,l._)`${Q.evaluated}.props`,(0,l._)`undefined`)),J.if((0,l._)`${Q.evaluated}.dynamicItems`,()=>J.assign((0,l._)`${Q.evaluated}.items`,(0,l._)`undefined`))}function w(Q,J){const oe=typeof Q=="object"&&Q[J.schemaId];return oe&&(J.code.source||J.code.process)?(0,l._)`/*# sourceURL=${oe} */`:l.nil}function v(Q,J){if(C(Q)&&(N(Q),k(Q))){T(Q,J);return}(0,e.boolOrEmptySchema)(Q,J)}function k({schema:Q,self:J}){if(typeof Q=="boolean")return!Q;for(const oe in Q)if(J.RULES.all[oe])return!0;return!1}function C(Q){return typeof Q.schema!="boolean"}function T(Q,J){const{schema:oe,gen:fe,opts:me}=Q;me.$comment&&oe.$comment&&B(Q),q(Q),F(Q);const we=fe.const("_errs",c.default.errors);j(Q,we),fe.var(J,(0,l._)`${we} === ${c.default.errors}`)}function N(Q){(0,d.checkUnknownRules)(Q),$(Q)}function j(Q,J){if(Q.opts.jtd)return H(Q,[],!1,J);const oe=(0,t.getSchemaTypes)(Q.schema),fe=(0,t.coerceAndCheckDataType)(Q,oe);H(Q,oe,!fe,J)}function $(Q){const{schema:J,errSchemaPath:oe,opts:fe,self:me}=Q;J.$ref&&fe.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(J,me.RULES)&&me.logger.warn(`$ref: keywords ignored in schema at path "${oe}"`)}function M(Q){const{schema:J,opts:oe}=Q;J.default!==void 0&&oe.useDefaults&&oe.strictSchema&&(0,d.checkStrictMode)(Q,"default is ignored in the schema root")}function q(Q){const J=Q.schema[Q.opts.schemaId];J&&(Q.baseId=(0,f.resolveUrl)(Q.opts.uriResolver,Q.baseId,J))}function F(Q){if(Q.schema.$async&&!Q.schemaEnv.$async)throw new Error("async schema in sync schema")}function B({gen:Q,schemaEnv:J,schema:oe,errSchemaPath:fe,opts:me}){const we=oe.$comment;if(me.$comment===!0)Q.code((0,l._)`${c.default.self}.logger.log(${we})`);else if(typeof me.$comment=="function"){const ke=(0,l.str)`${fe}/$comment`,Ze=Q.scopeValue("root",{ref:J.root});Q.code((0,l._)`${c.default.self}.opts.$comment(${we}, ${ke}, ${Ze}.schema)`)}}function I(Q){const{gen:J,schemaEnv:oe,validateName:fe,ValidationError:me,opts:we}=Q;oe.$async?J.if((0,l._)`${c.default.errors} === 0`,()=>J.return(c.default.data),()=>J.throw((0,l._)`new ${me}(${c.default.vErrors})`)):(J.assign((0,l._)`${fe}.errors`,c.default.vErrors),we.unevaluated&&V(Q),J.return((0,l._)`${c.default.errors} === 0`))}function V({gen:Q,evaluated:J,props:oe,items:fe}){oe instanceof l.Name&&Q.assign((0,l._)`${J}.props`,oe),fe instanceof l.Name&&Q.assign((0,l._)`${J}.items`,fe)}function H(Q,J,oe,fe){const{gen:me,schema:we,data:ke,allErrors:Ze,opts:Le,self:Ye}=Q,{RULES:Ve}=Ye;if(we.$ref&&(Le.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(we,Ve))){me.block(()=>ne(Q,"$ref",Ve.all.$ref.definition));return}Le.jtd||X(Q,J),me.block(()=>{for(const qe of Ve.rules)$e(qe);$e(Ve.post)});function $e(qe){(0,n.shouldUseGroup)(we,qe)&&(qe.type?(me.if((0,r.checkDataType)(qe.type,ke,Le.strictNumbers)),G(Q,qe),J.length===1&&J[0]===qe.type&&oe&&(me.else(),(0,r.reportTypeError)(Q)),me.endIf()):G(Q,qe),Ze||me.if((0,l._)`${c.default.errors} === ${fe||0}`))}}function G(Q,J){const{gen:oe,schema:fe,opts:{useDefaults:me}}=Q;me&&(0,i.assignDefaults)(Q,J.type),oe.block(()=>{for(const we of J.rules)(0,n.shouldUseRule)(fe,we)&&ne(Q,we.keyword,we.definition,J.type)})}function X(Q,J){Q.schemaEnv.meta||!Q.opts.strictTypes||(W(Q,J),Q.opts.allowUnionTypes||L(Q,J),P(Q,Q.dataTypes))}function W(Q,J){if(J.length){if(!Q.dataTypes.length){Q.dataTypes=J;return}J.forEach(oe=>{R(Q.dataTypes,oe)||U(Q,`type "${oe}" not allowed by context "${Q.dataTypes.join(",")}"`)}),D(Q,J)}}function L(Q,J){J.length>1&&!(J.length===2&&J.includes("null"))&&U(Q,"use allowUnionTypes to allow union type keyword")}function P(Q,J){const oe=Q.self.RULES.all;for(const fe in oe){const me=oe[fe];if(typeof me=="object"&&(0,n.shouldUseRule)(Q.schema,me)){const{type:we}=me.definition;we.length&&!we.some(ke=>Z(J,ke))&&U(Q,`missing type "${we.join(",")}" for keyword "${fe}"`)}}}function Z(Q,J){return Q.includes(J)||J==="number"&&Q.includes("integer")}function R(Q,J){return Q.includes(J)||J==="integer"&&Q.includes("number")}function D(Q,J){const oe=[];for(const fe of Q.dataTypes)R(J,fe)?oe.push(fe):J.includes("integer")&&fe==="number"&&oe.push("integer");Q.dataTypes=oe}function U(Q,J){const oe=Q.schemaEnv.baseId+Q.errSchemaPath;J+=` at "${oe}" (strictTypes)`,(0,d.checkStrictMode)(Q,J,Q.opts.strictTypes)}class Y{constructor(J,oe,fe){if((0,a.validateKeywordUsage)(J,oe,fe),this.gen=J.gen,this.allErrors=J.allErrors,this.keyword=fe,this.data=J.data,this.schema=J.schema[fe],this.$data=oe.$data&&J.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(J,this.schema,fe,this.$data),this.schemaType=oe.schemaType,this.parentSchema=J.schema,this.params={},this.it=J,this.def=oe,this.$data)this.schemaCode=J.gen.const("vSchema",de(this.$data,J));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,oe.schemaType,oe.allowUndefined))throw new Error(`${fe} value must be ${JSON.stringify(oe.schemaType)}`);("code"in oe?oe.trackErrors:oe.errors!==!1)&&(this.errsCount=J.gen.const("_errs",c.default.errors))}result(J,oe,fe){this.failResult((0,l.not)(J),oe,fe)}failResult(J,oe,fe){this.gen.if(J),fe?fe():this.error(),oe?(this.gen.else(),oe(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(J,oe){this.failResult((0,l.not)(J),void 0,oe)}fail(J){if(J===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(J),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(J){if(!this.$data)return this.fail(J);const{schemaCode:oe}=this;this.fail((0,l._)`${oe} !== undefined && (${(0,l.or)(this.invalid$data(),J)})`)}error(J,oe,fe){if(oe){this.setParams(oe),this._error(J,fe),this.setParams({});return}this._error(J,fe)}_error(J,oe){(J?p.reportExtraError:p.reportError)(this,this.def.error,oe)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(J){this.allErrors||this.gen.if(J)}setParams(J,oe){oe?Object.assign(this.params,J):this.params=J}block$data(J,oe,fe=l.nil){this.gen.block(()=>{this.check$data(J,fe),oe()})}check$data(J=l.nil,oe=l.nil){if(!this.$data)return;const{gen:fe,schemaCode:me,schemaType:we,def:ke}=this;fe.if((0,l.or)((0,l._)`${me} === undefined`,oe)),J!==l.nil&&fe.assign(J,!0),(we.length||ke.validateSchema)&&(fe.elseIf(this.invalid$data()),this.$dataError(),J!==l.nil&&fe.assign(J,!1)),fe.else()}invalid$data(){const{gen:J,schemaCode:oe,schemaType:fe,def:me,it:we}=this;return(0,l.or)(ke(),Ze());function ke(){if(fe.length){if(!(oe instanceof l.Name))throw new Error("ajv implementation error");const Le=Array.isArray(fe)?fe:[fe];return(0,l._)`${(0,r.checkDataTypes)(Le,oe,we.opts.strictNumbers,r.DataType.Wrong)}`}return l.nil}function Ze(){if(me.validateSchema){const Le=J.scopeValue("validate$data",{ref:me.validateSchema});return(0,l._)`!${Le}(${oe})`}return l.nil}}subschema(J,oe){const fe=(0,o.getSubschema)(this.it,J);(0,o.extendSubschemaData)(fe,this.it,J),(0,o.extendSubschemaMode)(fe,J);const me={...this.it,...fe,items:void 0,props:void 0};return v(me,oe),me}mergeEvaluated(J,oe){const{it:fe,gen:me}=this;fe.opts.unevaluated&&(fe.props!==!0&&J.props!==void 0&&(fe.props=d.mergeEvaluated.props(me,J.props,fe.props,oe)),fe.items!==!0&&J.items!==void 0&&(fe.items=d.mergeEvaluated.items(me,J.items,fe.items,oe)))}mergeValidEvaluated(J,oe){const{it:fe,gen:me}=this;if(fe.opts.unevaluated&&(fe.props!==!0||fe.items!==!0))return me.if(oe,()=>this.mergeEvaluated(J,l.Name)),!0}}Oi.KeywordCxt=Y;function ne(Q,J,oe,fe){const me=new Y(Q,oe,J);"code"in oe?oe.code(me,fe):me.$data&&oe.validate?(0,a.funcKeywordCode)(me,oe):"macro"in oe?(0,a.macroKeywordCode)(me,oe):(oe.compile||oe.validate)&&(0,a.funcKeywordCode)(me,oe)}const ae=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function de(Q,{dataLevel:J,dataNames:oe,dataPathArr:fe}){let me,we;if(Q==="")return c.default.rootData;if(Q[0]==="/"){if(!ae.test(Q))throw new Error(`Invalid JSON-pointer: ${Q}`);me=Q,we=c.default.rootData}else{const Ye=re.exec(Q);if(!Ye)throw new Error(`Invalid JSON-pointer: ${Q}`);const Ve=+Ye[1];if(me=Ye[2],me==="#"){if(Ve>=J)throw new Error(Le("property/index",Ve));return fe[J-Ve]}if(Ve>J)throw new Error(Le("data",Ve));if(we=oe[J-Ve],!me)return we}let ke=we;const Ze=me.split("/");for(const Ye of Ze)Ye&&(we=(0,l._)`${we}${(0,l.getProperty)((0,d.unescapeJsonPointer)(Ye))}`,ke=(0,l._)`${ke} && ${we}`);return ke;function Le(Ye,Ve){return`Cannot access ${Ye} ${Ve} levels up, current level is ${J}`}}return Oi.getData=de,Oi}var Fd={},fD;function KE(){if(fD)return Fd;fD=1,Object.defineProperty(Fd,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Fd.default=e,Fd}var Bd={},dD;function xm(){if(dD)return Bd;dD=1,Object.defineProperty(Bd,"__esModule",{value:!0});const e=vm();class t extends Error{constructor(r,i,a,o){super(o||`can't resolve reference ${a} from id ${i}`),this.missingRef=(0,e.resolveUrl)(r,i,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Bd.default=t,Bd}var Wn={},hD;function XE(){if(hD)return Wn;hD=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.resolveSchema=Wn.getCompilingSchema=Wn.resolveRef=Wn.compileSchema=Wn.SchemaEnv=void 0;const e=Xe(),t=KE(),n=qa(),r=vm(),i=pt(),a=_m();class o{constructor(x){var w;this.refs={},this.dynamicAnchors={};let v;typeof x.schema=="object"&&(v=x.schema),this.schema=x.schema,this.schemaId=x.schemaId,this.root=x.root||this,this.baseId=(w=x.baseId)!==null&&w!==void 0?w:(0,r.normalizeId)(v?.[x.schemaId||"$id"]),this.schemaPath=x.schemaPath,this.localRefs=x.localRefs,this.meta=x.meta,this.$async=v?.$async,this.refs={}}}Wn.SchemaEnv=o;function l(b){const x=d.call(this,b);if(x)return x;const w=(0,r.getFullPath)(this.opts.uriResolver,b.root.baseId),{es5:v,lines:k}=this.opts.code,{ownProperties:C}=this.opts,T=new e.CodeGen(this.scope,{es5:v,lines:k,ownProperties:C});let N;b.$async&&(N=T.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=T.scopeName("validate");b.validateName=j;const $={gen:T,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:T.scopeValue("schema",this.opts.code.source===!0?{ref:b.schema,code:(0,e.stringify)(b.schema)}:{ref:b.schema}),validateName:j,ValidationError:N,schema:b.schema,schemaEnv:b,rootId:w,baseId:b.baseId||w,schemaPath:e.nil,errSchemaPath:b.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(b),(0,a.validateFunctionCode)($),T.optimize(this.opts.code.optimize);const q=T.toString();M=`${T.scopeRefs(n.default.scope)}return ${q}`,this.opts.code.process&&(M=this.opts.code.process(M,b));const B=new Function(`${n.default.self}`,`${n.default.scope}`,M)(this,this.scope.get());if(this.scope.value(j,{ref:B}),B.errors=null,B.schema=b.schema,B.schemaEnv=b,b.$async&&(B.$async=!0),this.opts.code.source===!0&&(B.source={validateName:j,validateCode:q,scopeValues:T._values}),this.opts.unevaluated){const{props:I,items:V}=$;B.evaluated={props:I instanceof e.Name?void 0:I,items:V instanceof e.Name?void 0:V,dynamicProps:I instanceof e.Name,dynamicItems:V instanceof e.Name},B.source&&(B.source.evaluated=(0,e.stringify)(B.evaluated))}return b.validate=B,b}catch(q){throw delete b.validate,delete b.validateName,M&&this.logger.error("Error compiling schema, function code:",M),q}finally{this._compilations.delete(b)}}Wn.compileSchema=l;function c(b,x,w){var v;w=(0,r.resolveUrl)(this.opts.uriResolver,x,w);const k=b.refs[w];if(k)return k;let C=m.call(this,b,w);if(C===void 0){const T=(v=b.localRefs)===null||v===void 0?void 0:v[w],{schemaId:N}=this.opts;T&&(C=new o({schema:T,schemaId:N,root:b,baseId:x}))}if(C!==void 0)return b.refs[w]=f.call(this,C)}Wn.resolveRef=c;function f(b){return(0,r.inlineRef)(b.schema,this.opts.inlineRefs)?b.schema:b.validate?b:l.call(this,b)}function d(b){for(const x of this._compilations)if(p(x,b))return x}Wn.getCompilingSchema=d;function p(b,x){return b.schema===x.schema&&b.root===x.root&&b.baseId===x.baseId}function m(b,x){let w;for(;typeof(w=this.refs[x])=="string";)x=w;return w||this.schemas[x]||g.call(this,b,x)}function g(b,x){const w=this.opts.uriResolver.parse(x),v=(0,r._getFullPath)(this.opts.uriResolver,w);let k=(0,r.getFullPath)(this.opts.uriResolver,b.baseId,void 0);if(Object.keys(b.schema).length>0&&v===k)return S.call(this,w,b);const C=(0,r.normalizeId)(v),T=this.refs[C]||this.schemas[C];if(typeof T=="string"){const N=g.call(this,b,T);return typeof N?.schema!="object"?void 0:S.call(this,w,N)}if(typeof T?.schema=="object"){if(T.validate||l.call(this,T),C===(0,r.normalizeId)(x)){const{schema:N}=T,{schemaId:j}=this.opts,$=N[j];return $&&(k=(0,r.resolveUrl)(this.opts.uriResolver,k,$)),new o({schema:N,schemaId:j,root:b,baseId:k})}return S.call(this,w,T)}}Wn.resolveSchema=g;const _=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(b,{baseId:x,schema:w,root:v}){var k;if(((k=b.fragment)===null||k===void 0?void 0:k[0])!=="/")return;for(const N of b.fragment.slice(1).split("/")){if(typeof w=="boolean")return;const j=w[(0,i.unescapeFragment)(N)];if(j===void 0)return;w=j;const $=typeof w=="object"&&w[this.opts.schemaId];!_.has(N)&&$&&(x=(0,r.resolveUrl)(this.opts.uriResolver,x,$))}let C;if(typeof w!="boolean"&&w.$ref&&!(0,i.schemaHasRulesButRef)(w,this.RULES)){const N=(0,r.resolveUrl)(this.opts.uriResolver,x,w.$ref);C=g.call(this,v,N)}const{schemaId:T}=this.opts;if(C=C||new o({schema:w,schemaId:T,root:v,baseId:x}),C.schema!==C.root.schema)return C}return Wn}const Gge="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Zge="Meta-schema for $data reference (JSON AnySchema extension proposal)",Yge="object",Kge=["$data"],Xge={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Wge=!1,Qge={$id:Gge,description:Zge,type:Yge,required:Kge,properties:Xge,additionalProperties:Wge};var Ud={},Mu={exports:{}},Jx,pD;function pz(){if(pD)return Jx;pD=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(m){let g="",_=0,S=0;for(S=0;S<m.length;S++)if(_=m[S].charCodeAt(0),_!==48){if(!(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102))return"";g+=m[S];break}for(S+=1;S<m.length;S++){if(_=m[S].charCodeAt(0),!(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102))return"";g+=m[S]}return g}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(m){return m.length=0,!0}function a(m,g,_){if(m.length){const S=n(m);if(S!=="")g.push(S);else return _.error=!0,!1;m.length=0}return!0}function o(m){let g=0;const _={error:!1,address:"",zone:""},S=[],b=[];let x=!1,w=!1,v=a;for(let k=0;k<m.length;k++){const C=m[k];if(!(C==="["||C==="]"))if(C===":"){if(x===!0&&(w=!0),!v(b,S,_))break;if(++g>7){_.error=!0;break}k>0&&m[k-1]===":"&&(x=!0),S.push(":");continue}else if(C==="%"){if(!v(b,S,_))break;v=i}else{b.push(C);continue}}return b.length&&(v===i?_.zone=b.join(""):w?S.push(b.join("")):S.push(n(b))),_.address=S.join(""),_}function l(m){if(c(m,":")<2)return{host:m,isIPV6:!1};const g=o(m);if(g.error)return{host:m,isIPV6:!1};{let _=g.address,S=g.address;return g.zone&&(_+="%"+g.zone,S+="%25"+g.zone),{host:_,isIPV6:!0,escapedHost:S}}}function c(m,g){let _=0;for(let S=0;S<m.length;S++)m[S]===g&&_++;return _}function f(m){let g=m;const _=[];let S=-1,b=0;for(;b=g.length;){if(b===1){if(g===".")break;if(g==="/"){_.push("/");break}else{_.push(g);break}}else if(b===2){if(g[0]==="."){if(g[1]===".")break;if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&(g[1]==="."||g[1]==="/")){_.push("/");break}}else if(b===3&&g==="/.."){_.length!==0&&_.pop(),_.push("/");break}if(g[0]==="."){if(g[1]==="."){if(g[2]==="/"){g=g.slice(3);continue}}else if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&g[1]==="."){if(g[2]==="/"){g=g.slice(2);continue}else if(g[2]==="."&&g[3]==="/"){g=g.slice(3),_.length!==0&&_.pop();continue}}if((S=g.indexOf("/",1))===-1){_.push(g);break}else _.push(g.slice(0,S)),g=g.slice(S)}return _.join("")}function d(m,g){const _=g!==!0?escape:unescape;return m.scheme!==void 0&&(m.scheme=_(m.scheme)),m.userinfo!==void 0&&(m.userinfo=_(m.userinfo)),m.host!==void 0&&(m.host=_(m.host)),m.path!==void 0&&(m.path=_(m.path)),m.query!==void 0&&(m.query=_(m.query)),m.fragment!==void 0&&(m.fragment=_(m.fragment)),m}function p(m){const g=[];if(m.userinfo!==void 0&&(g.push(m.userinfo),g.push("@")),m.host!==void 0){let _=unescape(m.host);if(!t(_)){const S=l(_);S.isIPV6===!0?_=`[${S.escapedHost}]`:_=m.host}g.push(_)}return(typeof m.port=="number"||typeof m.port=="string")&&(g.push(":"),g.push(String(m.port))),g.length?g.join(""):void 0}return Jx={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:d,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:l,stringArrayToHexStripped:n},Jx}var ew,mD;function Jge(){if(mD)return ew;mD=1;const{isUUID:e}=pz(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(C){return n.indexOf(C)!==-1}function i(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function a(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function o(C){const T=String(C.scheme).toLowerCase()==="https";return(C.port===(T?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function l(C){return C.secure=i(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function c(C){if((C.port===(i(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[T,N]=C.resourceName.split("?");C.path=T&&T!=="/"?T:void 0,C.query=N,C.resourceName=void 0}return C.fragment=void 0,C}function f(C,T){if(!C.path)return C.error="URN can not be parsed",C;const N=C.path.match(t);if(N){const j=T.scheme||C.scheme||"urn";C.nid=N[1].toLowerCase(),C.nss=N[2];const $=`${j}:${T.nid||C.nid}`,M=k($);C.path=void 0,M&&(C=M.parse(C,T))}else C.error=C.error||"URN can not be parsed.";return C}function d(C,T){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const N=T.scheme||C.scheme||"urn",j=C.nid.toLowerCase(),$=`${N}:${T.nid||j}`,M=k($);M&&(C=M.serialize(C,T));const q=C,F=C.nss;return q.path=`${j||T.nid}:${F}`,T.skipEscape=!0,q}function p(C,T){const N=C;return N.uuid=N.nss,N.nss=void 0,!T.tolerant&&(!N.uuid||!e(N.uuid))&&(N.error=N.error||"UUID is not valid."),N}function m(C){const T=C;return T.nss=(C.uuid||"").toLowerCase(),T}const g={scheme:"http",domainHost:!0,parse:a,serialize:o},_={scheme:"https",domainHost:g.domainHost,parse:a,serialize:o},S={scheme:"ws",domainHost:!0,parse:l,serialize:c},b={scheme:"wss",domainHost:S.domainHost,parse:S.parse,serialize:S.serialize},v={http:g,https:_,ws:S,wss:b,urn:{scheme:"urn",parse:f,serialize:d,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function k(C){return C&&(v[C]||v[C.toLowerCase()])||void 0}return ew={wsIsSecure:i,SCHEMES:v,isValidSchemeName:r,getSchemeHandler:k},ew}var gD;function eye(){if(gD)return Mu.exports;gD=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:i,nonSimpleDomain:a}=pz(),{SCHEMES:o,getSchemeHandler:l}=Jge();function c(b,x){return typeof b=="string"?b=m(_(b,x),x):typeof b=="object"&&(b=_(m(b,x),x)),b}function f(b,x,w){const v=w?Object.assign({scheme:"null"},w):{scheme:"null"},k=d(_(b,v),_(x,v),v,!0);return v.skipEscape=!0,m(k,v)}function d(b,x,w,v){const k={};return v||(b=_(m(b,w),w),x=_(m(x,w),w)),w=w||{},!w.tolerant&&x.scheme?(k.scheme=x.scheme,k.userinfo=x.userinfo,k.host=x.host,k.port=x.port,k.path=t(x.path||""),k.query=x.query):(x.userinfo!==void 0||x.host!==void 0||x.port!==void 0?(k.userinfo=x.userinfo,k.host=x.host,k.port=x.port,k.path=t(x.path||""),k.query=x.query):(x.path?(x.path[0]==="/"?k.path=t(x.path):((b.userinfo!==void 0||b.host!==void 0||b.port!==void 0)&&!b.path?k.path="/"+x.path:b.path?k.path=b.path.slice(0,b.path.lastIndexOf("/")+1)+x.path:k.path=x.path,k.path=t(k.path)),k.query=x.query):(k.path=b.path,x.query!==void 0?k.query=x.query:k.query=b.query),k.userinfo=b.userinfo,k.host=b.host,k.port=b.port),k.scheme=b.scheme),k.fragment=x.fragment,k}function p(b,x,w){return typeof b=="string"?(b=unescape(b),b=m(r(_(b,w),!0),{...w,skipEscape:!0})):typeof b=="object"&&(b=m(r(b,!0),{...w,skipEscape:!0})),typeof x=="string"?(x=unescape(x),x=m(r(_(x,w),!0),{...w,skipEscape:!0})):typeof x=="object"&&(x=m(r(x,!0),{...w,skipEscape:!0})),b.toLowerCase()===x.toLowerCase()}function m(b,x){const w={host:b.host,scheme:b.scheme,userinfo:b.userinfo,port:b.port,path:b.path,query:b.query,nid:b.nid,nss:b.nss,uuid:b.uuid,fragment:b.fragment,reference:b.reference,resourceName:b.resourceName,secure:b.secure,error:""},v=Object.assign({},x),k=[],C=l(v.scheme||w.scheme);C&&C.serialize&&C.serialize(w,v),w.path!==void 0&&(v.skipEscape?w.path=unescape(w.path):(w.path=escape(w.path),w.scheme!==void 0&&(w.path=w.path.split("%3A").join(":")))),v.reference!=="suffix"&&w.scheme&&k.push(w.scheme,":");const T=n(w);if(T!==void 0&&(v.reference!=="suffix"&&k.push("//"),k.push(T),w.path&&w.path[0]!=="/"&&k.push("/")),w.path!==void 0){let N=w.path;!v.absolutePath&&(!C||!C.absolutePath)&&(N=t(N)),T===void 0&&N[0]==="/"&&N[1]==="/"&&(N="/%2F"+N.slice(2)),k.push(N)}return w.query!==void 0&&k.push("?",w.query),w.fragment!==void 0&&k.push("#",w.fragment),k.join("")}const g=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function _(b,x){const w=Object.assign({},x),v={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let k=!1;w.reference==="suffix"&&(w.scheme?b=w.scheme+":"+b:b="//"+b);const C=b.match(g);if(C){if(v.scheme=C[1],v.userinfo=C[3],v.host=C[4],v.port=parseInt(C[5],10),v.path=C[6]||"",v.query=C[7],v.fragment=C[8],isNaN(v.port)&&(v.port=C[5]),v.host)if(i(v.host)===!1){const j=e(v.host);v.host=j.host.toLowerCase(),k=j.isIPV6}else k=!0;v.scheme===void 0&&v.userinfo===void 0&&v.host===void 0&&v.port===void 0&&v.query===void 0&&!v.path?v.reference="same-document":v.scheme===void 0?v.reference="relative":v.fragment===void 0?v.reference="absolute":v.reference="uri",w.reference&&w.reference!=="suffix"&&w.reference!==v.reference&&(v.error=v.error||"URI is not a "+w.reference+" reference.");const T=l(w.scheme||v.scheme);if(!w.unicodeSupport&&(!T||!T.unicodeSupport)&&v.host&&(w.domainHost||T&&T.domainHost)&&k===!1&&a(v.host))try{v.host=URL.domainToASCII(v.host.toLowerCase())}catch(N){v.error=v.error||"Host's domain name can not be converted to ASCII: "+N}(!T||T&&!T.skipNormalize)&&(b.indexOf("%")!==-1&&(v.scheme!==void 0&&(v.scheme=unescape(v.scheme)),v.host!==void 0&&(v.host=unescape(v.host))),v.path&&(v.path=escape(unescape(v.path))),v.fragment&&(v.fragment=encodeURI(decodeURIComponent(v.fragment)))),T&&T.parse&&T.parse(v,w)}else v.error=v.error||"URI can not be parsed.";return v}const S={SCHEMES:o,normalize:c,resolve:f,resolveComponent:d,equal:p,serialize:m,parse:_};return Mu.exports=S,Mu.exports.default=S,Mu.exports.fastUri=S,Mu.exports}var yD;function tye(){if(yD)return Ud;yD=1,Object.defineProperty(Ud,"__esModule",{value:!0});const e=eye();return e.code='require("ajv/dist/runtime/uri").default',Ud.default=e,Ud}var bD;function nye(){return bD||(bD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=_m();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Xe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=KE(),i=xm(),a=fz(),o=XE(),l=Xe(),c=vm(),f=xp(),d=pt(),p=Qge,m=tye(),g=(L,P)=>new RegExp(L,P);g.code="new RegExp";const _=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},x={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},w=200;function v(L){var P,Z,R,D,U,Y,ne,ae,re,de,Q,J,oe,fe,me,we,ke,Ze,Le,Ye,Ve,$e,qe,We,Tt;const pe=L.strict,_e=(P=L.code)===null||P===void 0?void 0:P.optimize,Te=_e===!0||_e===void 0?1:_e||0,ze=(R=(Z=L.code)===null||Z===void 0?void 0:Z.regExp)!==null&&R!==void 0?R:g,Je=(D=L.uriResolver)!==null&&D!==void 0?D:m.default;return{strictSchema:(Y=(U=L.strictSchema)!==null&&U!==void 0?U:pe)!==null&&Y!==void 0?Y:!0,strictNumbers:(ae=(ne=L.strictNumbers)!==null&&ne!==void 0?ne:pe)!==null&&ae!==void 0?ae:!0,strictTypes:(de=(re=L.strictTypes)!==null&&re!==void 0?re:pe)!==null&&de!==void 0?de:"log",strictTuples:(J=(Q=L.strictTuples)!==null&&Q!==void 0?Q:pe)!==null&&J!==void 0?J:"log",strictRequired:(fe=(oe=L.strictRequired)!==null&&oe!==void 0?oe:pe)!==null&&fe!==void 0?fe:!1,code:L.code?{...L.code,optimize:Te,regExp:ze}:{optimize:Te,regExp:ze},loopRequired:(me=L.loopRequired)!==null&&me!==void 0?me:w,loopEnum:(we=L.loopEnum)!==null&&we!==void 0?we:w,meta:(ke=L.meta)!==null&&ke!==void 0?ke:!0,messages:(Ze=L.messages)!==null&&Ze!==void 0?Ze:!0,inlineRefs:(Le=L.inlineRefs)!==null&&Le!==void 0?Le:!0,schemaId:(Ye=L.schemaId)!==null&&Ye!==void 0?Ye:"$id",addUsedSchema:(Ve=L.addUsedSchema)!==null&&Ve!==void 0?Ve:!0,validateSchema:($e=L.validateSchema)!==null&&$e!==void 0?$e:!0,validateFormats:(qe=L.validateFormats)!==null&&qe!==void 0?qe:!0,unicodeRegExp:(We=L.unicodeRegExp)!==null&&We!==void 0?We:!0,int32range:(Tt=L.int32range)!==null&&Tt!==void 0?Tt:!0,uriResolver:Je}}class k{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,...v(P)};const{es5:Z,lines:R}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:S,es5:Z,lines:R}),this.logger=F(P.logger);const D=P.validateFormats;P.validateFormats=!1,this.RULES=(0,a.getRules)(),C.call(this,b,P,"NOT SUPPORTED"),C.call(this,x,P,"DEPRECATED","warn"),this._metaOpts=M.call(this),P.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&$.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),N.call(this),P.validateFormats=D}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:P,meta:Z,schemaId:R}=this.opts;let D=p;R==="id"&&(D={...p},D.id=D.$id,delete D.$id),Z&&P&&this.addMetaSchema(D,D[R],!1)}defaultMeta(){const{meta:P,schemaId:Z}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[Z]||P:void 0}validate(P,Z){let R;if(typeof P=="string"){if(R=this.getSchema(P),!R)throw new Error(`no schema with key or ref "${P}"`)}else R=this.compile(P);const D=R(Z);return"$async"in R||(this.errors=R.errors),D}compile(P,Z){const R=this._addSchema(P,Z);return R.validate||this._compileSchemaEnv(R)}compileAsync(P,Z){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return D.call(this,P,Z);async function D(de,Q){await U.call(this,de.$schema);const J=this._addSchema(de,Q);return J.validate||Y.call(this,J)}async function U(de){de&&!this.getSchema(de)&&await D.call(this,{$ref:de},!0)}async function Y(de){try{return this._compileSchemaEnv(de)}catch(Q){if(!(Q instanceof i.default))throw Q;return ne.call(this,Q),await ae.call(this,Q.missingSchema),Y.call(this,de)}}function ne({missingSchema:de,missingRef:Q}){if(this.refs[de])throw new Error(`AnySchema ${de} is loaded but ${Q} cannot be resolved`)}async function ae(de){const Q=await re.call(this,de);this.refs[de]||await U.call(this,Q.$schema),this.refs[de]||this.addSchema(Q,de,Z)}async function re(de){const Q=this._loading[de];if(Q)return Q;try{return await(this._loading[de]=R(de))}finally{delete this._loading[de]}}}addSchema(P,Z,R,D=this.opts.validateSchema){if(Array.isArray(P)){for(const Y of P)this.addSchema(Y,void 0,R,D);return this}let U;if(typeof P=="object"){const{schemaId:Y}=this.opts;if(U=P[Y],U!==void 0&&typeof U!="string")throw new Error(`schema ${Y} must be string`)}return Z=(0,c.normalizeId)(Z||U),this._checkUnique(Z),this.schemas[Z]=this._addSchema(P,R,Z,D,!0),this}addMetaSchema(P,Z,R=this.opts.validateSchema){return this.addSchema(P,Z,!0,R),this}validateSchema(P,Z){if(typeof P=="boolean")return!0;let R;if(R=P.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const D=this.validate(R,P);if(!D&&Z){const U="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(U);else throw new Error(U)}return D}getSchema(P){let Z;for(;typeof(Z=T.call(this,P))=="string";)P=Z;if(Z===void 0){const{schemaId:R}=this.opts,D=new o.SchemaEnv({schema:{},schemaId:R});if(Z=o.resolveSchema.call(this,D,P),!Z)return;this.refs[P]=Z}return Z.validate||this._compileSchemaEnv(Z)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const Z=T.call(this,P);return typeof Z=="object"&&this._cache.delete(Z.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{const Z=P;this._cache.delete(Z);let R=P[this.opts.schemaId];return R&&(R=(0,c.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(const Z of P)this.addKeyword(Z);return this}addKeyword(P,Z){let R;if(typeof P=="string")R=P,typeof Z=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),Z.keyword=R);else if(typeof P=="object"&&Z===void 0){if(Z=P,R=Z.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(I.call(this,R,Z),!Z)return(0,d.eachItem)(R,U=>V.call(this,U)),this;G.call(this,Z);const D={...Z,type:(0,f.getJSONTypes)(Z.type),schemaType:(0,f.getJSONTypes)(Z.schemaType)};return(0,d.eachItem)(R,D.type.length===0?U=>V.call(this,U,D):U=>D.type.forEach(Y=>V.call(this,U,D,Y))),this}getKeyword(P){const Z=this.RULES.all[P];return typeof Z=="object"?Z.definition:!!Z}removeKeyword(P){const{RULES:Z}=this;delete Z.keywords[P],delete Z.all[P];for(const R of Z.rules){const D=R.rules.findIndex(U=>U.keyword===P);D>=0&&R.rules.splice(D,1)}return this}addFormat(P,Z){return typeof Z=="string"&&(Z=new RegExp(Z)),this.formats[P]=Z,this}errorsText(P=this.errors,{separator:Z=", ",dataVar:R="data"}={}){return!P||P.length===0?"No errors":P.map(D=>`${R}${D.instancePath} ${D.message}`).reduce((D,U)=>D+Z+U)}$dataMetaSchema(P,Z){const R=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(const D of Z){const U=D.split("/").slice(1);let Y=P;for(const ne of U)Y=Y[ne];for(const ne in R){const ae=R[ne];if(typeof ae!="object")continue;const{$data:re}=ae.definition,de=Y[ne];re&&de&&(Y[ne]=W(de))}}return P}_removeAllSchemas(P,Z){for(const R in P){const D=P[R];(!Z||Z.test(R))&&(typeof D=="string"?delete P[R]:D&&!D.meta&&(this._cache.delete(D.schema),delete P[R]))}}_addSchema(P,Z,R,D=this.opts.validateSchema,U=this.opts.addUsedSchema){let Y;const{schemaId:ne}=this.opts;if(typeof P=="object")Y=P[ne];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let ae=this._cache.get(P);if(ae!==void 0)return ae;R=(0,c.normalizeId)(Y||R);const re=c.getSchemaRefs.call(this,P,R);return ae=new o.SchemaEnv({schema:P,schemaId:ne,meta:Z,baseId:R,localRefs:re}),this._cache.set(ae.schema,ae),U&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=ae),D&&this.validateSchema(P,!0),ae}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):o.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){const Z=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,P)}finally{this.opts=Z}}}k.ValidationError=r.default,k.MissingRefError=i.default,e.default=k;function C(L,P,Z,R="error"){for(const D in L){const U=D;U in P&&this.logger[R](`${Z}: option ${D}. ${L[U]}`)}}function T(L){return L=(0,c.normalizeId)(L),this.schemas[L]||this.refs[L]}function N(){const L=this.opts.schemas;if(L)if(Array.isArray(L))this.addSchema(L);else for(const P in L)this.addSchema(L[P],P)}function j(){for(const L in this.opts.formats){const P=this.opts.formats[L];P&&this.addFormat(L,P)}}function $(L){if(Array.isArray(L)){this.addVocabulary(L);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const P in L){const Z=L[P];Z.keyword||(Z.keyword=P),this.addKeyword(Z)}}function M(){const L={...this.opts};for(const P of _)delete L[P];return L}const q={log(){},warn(){},error(){}};function F(L){if(L===!1)return q;if(L===void 0)return console;if(L.log&&L.warn&&L.error)return L;throw new Error("logger must implement log, warn and error methods")}const B=/^[a-z_$][a-z0-9_$:-]*$/i;function I(L,P){const{RULES:Z}=this;if((0,d.eachItem)(L,R=>{if(Z.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!B.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!P&&P.$data&&!("code"in P||"validate"in P))throw new Error('$data keyword must have "code" or "validate" function')}function V(L,P,Z){var R;const D=P?.post;if(Z&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:U}=this;let Y=D?U.post:U.rules.find(({type:ae})=>ae===Z);if(Y||(Y={type:Z,rules:[]},U.rules.push(Y)),U.keywords[L]=!0,!P)return;const ne={keyword:L,definition:{...P,type:(0,f.getJSONTypes)(P.type),schemaType:(0,f.getJSONTypes)(P.schemaType)}};P.before?H.call(this,Y,ne,P.before):Y.rules.push(ne),U.all[L]=ne,(R=P.implements)===null||R===void 0||R.forEach(ae=>this.addKeyword(ae))}function H(L,P,Z){const R=L.rules.findIndex(D=>D.keyword===Z);R>=0?L.rules.splice(R,0,P):(L.rules.push(P),this.logger.warn(`rule ${Z} is not defined`))}function G(L){let{metaSchema:P}=L;P!==void 0&&(L.$data&&this.opts.$data&&(P=W(P)),L.validateSchema=this.compile(P,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function W(L){return{anyOf:[L,X]}}}(Gx)),Gx}var Hd={},Vd={},Gd={},vD;function rye(){if(vD)return Gd;vD=1,Object.defineProperty(Gd,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Gd.default=e,Gd}var Ca={},_D;function iye(){if(_D)return Ca;_D=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.callRef=Ca.getValidate=void 0;const e=xm(),t=Lr(),n=Xe(),r=qa(),i=XE(),a=pt(),o={keyword:"$ref",schemaType:"string",code(f){const{gen:d,schema:p,it:m}=f,{baseId:g,schemaEnv:_,validateName:S,opts:b,self:x}=m,{root:w}=_;if((p==="#"||p==="#/")&&g===w.baseId)return k();const v=i.resolveRef.call(x,w,g,p);if(v===void 0)throw new e.default(m.opts.uriResolver,g,p);if(v instanceof i.SchemaEnv)return C(v);return T(v);function k(){if(_===w)return c(f,S,_,_.$async);const N=d.scopeValue("root",{ref:w});return c(f,(0,n._)`${N}.validate`,w,w.$async)}function C(N){const j=l(f,N);c(f,j,N,N.$async)}function T(N){const j=d.scopeValue("schema",b.code.source===!0?{ref:N,code:(0,n.stringify)(N)}:{ref:N}),$=d.name("valid"),M=f.subschema({schema:N,dataTypes:[],schemaPath:n.nil,topSchemaRef:j,errSchemaPath:p},$);f.mergeEvaluated(M),f.ok($)}}};function l(f,d){const{gen:p}=f;return d.validate?p.scopeValue("validate",{ref:d.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:d})}.validate`}Ca.getValidate=l;function c(f,d,p,m){const{gen:g,it:_}=f,{allErrors:S,schemaEnv:b,opts:x}=_,w=x.passContext?r.default.this:n.nil;m?v():k();function v(){if(!b.$async)throw new Error("async schema referenced by sync schema");const N=g.let("valid");g.try(()=>{g.code((0,n._)`await ${(0,t.callValidateCode)(f,d,w)}`),T(d),S||g.assign(N,!0)},j=>{g.if((0,n._)`!(${j} instanceof ${_.ValidationError})`,()=>g.throw(j)),C(j),S||g.assign(N,!1)}),f.ok(N)}function k(){f.result((0,t.callValidateCode)(f,d,w),()=>T(d),()=>C(d))}function C(N){const j=(0,n._)`${N}.errors`;g.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${j} : ${r.default.vErrors}.concat(${j})`),g.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function T(N){var j;if(!_.opts.unevaluated)return;const $=(j=p?.validate)===null||j===void 0?void 0:j.evaluated;if(_.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(_.props=a.mergeEvaluated.props(g,$.props,_.props));else{const M=g.var("props",(0,n._)`${N}.evaluated.props`);_.props=a.mergeEvaluated.props(g,M,_.props,n.Name)}if(_.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(_.items=a.mergeEvaluated.items(g,$.items,_.items));else{const M=g.var("items",(0,n._)`${N}.evaluated.items`);_.items=a.mergeEvaluated.items(g,M,_.items,n.Name)}}}return Ca.callRef=c,Ca.default=o,Ca}var xD;function aye(){if(xD)return Vd;xD=1,Object.defineProperty(Vd,"__esModule",{value:!0});const e=rye(),t=iye(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Vd.default=n,Vd}var Zd={},Yd={},wD;function sye(){if(wD)return Yd;wD=1,Object.defineProperty(Yd,"__esModule",{value:!0});const e=Xe(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:a,schemaCode:o})=>(0,e.str)`must be ${n[a].okStr} ${o}`,params:({keyword:a,schemaCode:o})=>(0,e._)`{comparison: ${n[a].okStr}, limit: ${o}}`},i={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(a){const{keyword:o,data:l,schemaCode:c}=a;a.fail$data((0,e._)`${l} ${n[o].fail} ${c} || isNaN(${l})`)}};return Yd.default=i,Yd}var Kd={},SD;function oye(){if(SD)return Kd;SD=1,Object.defineProperty(Kd,"__esModule",{value:!0});const e=Xe(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:i,data:a,schemaCode:o,it:l}=r,c=l.opts.multipleOfPrecision,f=i.let("res"),d=c?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${c}`:(0,e._)`${f} !== parseInt(${f})`;r.fail$data((0,e._)`(${o} === 0 || (${f} = ${a}/${o}, ${d}))`)}};return Kd.default=n,Kd}var Xd={},Wd={},ED;function lye(){if(ED)return Wd;ED=1,Object.defineProperty(Wd,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,i=0,a;for(;i<n;)r++,a=t.charCodeAt(i++),a>=55296&&a<=56319&&i<n&&(a=t.charCodeAt(i),(a&64512)===56320&&i++);return r}return Wd.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Wd}var kD;function uye(){if(kD)return Xd;kD=1,Object.defineProperty(Xd,"__esModule",{value:!0});const e=Xe(),t=pt(),n=lye(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:o}){const l=a==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${o} characters`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},code(a){const{keyword:o,data:l,schemaCode:c,it:f}=a,d=o==="maxLength"?e.operators.GT:e.operators.LT,p=f.opts.unicode===!1?(0,e._)`${l}.length`:(0,e._)`${(0,t.useFunc)(a.gen,n.default)}(${l})`;a.fail$data((0,e._)`${p} ${d} ${c}`)}};return Xd.default=i,Xd}var Qd={},CD;function cye(){if(CD)return Qd;CD=1,Object.defineProperty(Qd,"__esModule",{value:!0});const e=Lr(),t=Xe(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:a,$data:o,schema:l,schemaCode:c,it:f}=i,d=f.opts.unicodeRegExp?"u":"",p=o?(0,t._)`(new RegExp(${c}, ${d}))`:(0,e.usePattern)(i,l);i.fail$data((0,t._)`!${p}.test(${a})`)}};return Qd.default=r,Qd}var Jd={},AD;function fye(){if(AD)return Jd;AD=1,Object.defineProperty(Jd,"__esModule",{value:!0});const e=Xe(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const a=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:a,schemaCode:o}=r,l=i==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${a}).length ${l} ${o}`)}};return Jd.default=n,Jd}var eh={},TD;function dye(){if(TD)return eh;TD=1,Object.defineProperty(eh,"__esModule",{value:!0});const e=Lr(),t=Xe(),n=pt(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,t.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,t._)`{missingProperty: ${a}}`},code(a){const{gen:o,schema:l,schemaCode:c,data:f,$data:d,it:p}=a,{opts:m}=p;if(!d&&l.length===0)return;const g=l.length>=m.loopRequired;if(p.allErrors?_():S(),m.strictRequired){const w=a.parentSchema.properties,{definedProperties:v}=a.it;for(const k of l)if(w?.[k]===void 0&&!v.has(k)){const C=p.schemaEnv.baseId+p.errSchemaPath,T=`required property "${k}" is not defined at "${C}" (strictRequired)`;(0,n.checkStrictMode)(p,T,p.opts.strictRequired)}}function _(){if(g||d)a.block$data(t.nil,b);else for(const w of l)(0,e.checkReportMissingProp)(a,w)}function S(){const w=o.let("missing");if(g||d){const v=o.let("valid",!0);a.block$data(v,()=>x(w,v)),a.ok(v)}else o.if((0,e.checkMissingProp)(a,l,w)),(0,e.reportMissingProp)(a,w),o.else()}function b(){o.forOf("prop",c,w=>{a.setParams({missingProperty:w}),o.if((0,e.noPropertyInData)(o,f,w,m.ownProperties),()=>a.error())})}function x(w,v){a.setParams({missingProperty:w}),o.forOf(w,c,()=>{o.assign(v,(0,e.propertyInData)(o,f,w,m.ownProperties)),o.if((0,t.not)(v),()=>{a.error(),o.break()})},t.nil)}}};return eh.default=i,eh}var th={},ND;function hye(){if(ND)return th;ND=1,Object.defineProperty(th,"__esModule",{value:!0});const e=Xe(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const a=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:a,schemaCode:o}=r,l=i==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${a}.length ${l} ${o}`)}};return th.default=n,th}var nh={},rh={},OD;function WE(){if(OD)return rh;OD=1,Object.defineProperty(rh,"__esModule",{value:!0});const e=hz();return e.code='require("ajv/dist/runtime/equal").default',rh.default=e,rh}var RD;function pye(){if(RD)return nh;RD=1,Object.defineProperty(nh,"__esModule",{value:!0});const e=xp(),t=Xe(),n=pt(),r=WE(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:l}})=>(0,t.str)`must NOT have duplicate items (items ## ${l} and ${o} are identical)`,params:({params:{i:o,j:l}})=>(0,t._)`{i: ${o}, j: ${l}}`},code(o){const{gen:l,data:c,$data:f,schema:d,parentSchema:p,schemaCode:m,it:g}=o;if(!f&&!d)return;const _=l.let("valid"),S=p.items?(0,e.getSchemaTypes)(p.items):[];o.block$data(_,b,(0,t._)`${m} === false`),o.ok(_);function b(){const k=l.let("i",(0,t._)`${c}.length`),C=l.let("j");o.setParams({i:k,j:C}),l.assign(_,!0),l.if((0,t._)`${k} > 1`,()=>(x()?w:v)(k,C))}function x(){return S.length>0&&!S.some(k=>k==="object"||k==="array")}function w(k,C){const T=l.name("item"),N=(0,e.checkDataTypes)(S,T,g.opts.strictNumbers,e.DataType.Wrong),j=l.const("indices",(0,t._)`{}`);l.for((0,t._)`;${k}--;`,()=>{l.let(T,(0,t._)`${c}[${k}]`),l.if(N,(0,t._)`continue`),S.length>1&&l.if((0,t._)`typeof ${T} == "string"`,(0,t._)`${T} += "_"`),l.if((0,t._)`typeof ${j}[${T}] == "number"`,()=>{l.assign(C,(0,t._)`${j}[${T}]`),o.error(),l.assign(_,!1).break()}).code((0,t._)`${j}[${T}] = ${k}`)})}function v(k,C){const T=(0,n.useFunc)(l,r.default),N=l.name("outer");l.label(N).for((0,t._)`;${k}--;`,()=>l.for((0,t._)`${C} = ${k}; ${C}--;`,()=>l.if((0,t._)`${T}(${c}[${k}], ${c}[${C}])`,()=>{o.error(),l.assign(_,!1).break(N)})))}}};return nh.default=a,nh}var ih={},jD;function mye(){if(jD)return ih;jD=1,Object.defineProperty(ih,"__esModule",{value:!0});const e=Xe(),t=pt(),n=WE(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:a})=>(0,e._)`{allowedValue: ${a}}`},code(a){const{gen:o,data:l,$data:c,schemaCode:f,schema:d}=a;c||d&&typeof d=="object"?a.fail$data((0,e._)`!${(0,t.useFunc)(o,n.default)}(${l}, ${f})`):a.fail((0,e._)`${d} !== ${l}`)}};return ih.default=i,ih}var ah={},MD;function gye(){if(MD)return ah;MD=1,Object.defineProperty(ah,"__esModule",{value:!0});const e=Xe(),t=pt(),n=WE(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,e._)`{allowedValues: ${a}}`},code(a){const{gen:o,data:l,$data:c,schema:f,schemaCode:d,it:p}=a;if(!c&&f.length===0)throw new Error("enum must have non-empty array");const m=f.length>=p.opts.loopEnum;let g;const _=()=>g??(g=(0,t.useFunc)(o,n.default));let S;if(m||c)S=o.let("valid"),a.block$data(S,b);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const w=o.const("vSchema",d);S=(0,e.or)(...f.map((v,k)=>x(w,k)))}a.pass(S);function b(){o.assign(S,!1),o.forOf("v",d,w=>o.if((0,e._)`${_()}(${l}, ${w})`,()=>o.assign(S,!0).break()))}function x(w,v){const k=f[v];return typeof k=="object"&&k!==null?(0,e._)`${_()}(${l}, ${w}[${v}])`:(0,e._)`${l} === ${k}`}}};return ah.default=i,ah}var $D;function yye(){if($D)return Zd;$D=1,Object.defineProperty(Zd,"__esModule",{value:!0});const e=sye(),t=oye(),n=uye(),r=cye(),i=fye(),a=dye(),o=hye(),l=pye(),c=mye(),f=gye(),d=[e.default,t.default,n.default,r.default,i.default,a.default,o.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,f.default];return Zd.default=d,Zd}var sh={},Io={},DD;function mz(){if(DD)return Io;DD=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.validateAdditionalItems=void 0;const e=Xe(),t=pt(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{parentSchema:o,it:l}=a,{items:c}=o;if(!Array.isArray(c)){(0,t.checkStrictMode)(l,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(a,c)}};function i(a,o){const{gen:l,schema:c,data:f,keyword:d,it:p}=a;p.items=!0;const m=l.const("len",(0,e._)`${f}.length`);if(c===!1)a.setParams({len:o.length}),a.pass((0,e._)`${m} <= ${o.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(p,c)){const _=l.var("valid",(0,e._)`${m} <= ${o.length}`);l.if((0,e.not)(_),()=>g(_)),a.ok(_)}function g(_){l.forRange("i",o.length,m,S=>{a.subschema({keyword:d,dataProp:S,dataPropType:t.Type.Num},_),p.allErrors||l.if((0,e.not)(_),()=>l.break())})}}return Io.validateAdditionalItems=i,Io.default=r,Io}var oh={},Po={},ID;function gz(){if(ID)return Po;ID=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.validateTuple=void 0;const e=Xe(),t=pt(),n=Lr(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:o,it:l}=a;if(Array.isArray(o))return i(a,"additionalItems",o);l.items=!0,!(0,t.alwaysValidSchema)(l,o)&&a.ok((0,n.validateArray)(a))}};function i(a,o,l=a.schema){const{gen:c,parentSchema:f,data:d,keyword:p,it:m}=a;S(f),m.opts.unevaluated&&l.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(c,l.length,m.items));const g=c.name("valid"),_=c.const("len",(0,e._)`${d}.length`);l.forEach((b,x)=>{(0,t.alwaysValidSchema)(m,b)||(c.if((0,e._)`${_} > ${x}`,()=>a.subschema({keyword:p,schemaProp:x,dataProp:x},g)),a.ok(g))});function S(b){const{opts:x,errSchemaPath:w}=m,v=l.length,k=v===b.minItems&&(v===b.maxItems||b[o]===!1);if(x.strictTuples&&!k){const C=`"${p}" is ${v}-tuple, but minItems or maxItems/${o} are not specified or different at path "${w}"`;(0,t.checkStrictMode)(m,C,x.strictTuples)}}}return Po.validateTuple=i,Po.default=r,Po}var PD;function bye(){if(PD)return oh;PD=1,Object.defineProperty(oh,"__esModule",{value:!0});const e=gz(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return oh.default=t,oh}var lh={},zD;function vye(){if(zD)return lh;zD=1,Object.defineProperty(lh,"__esModule",{value:!0});const e=Xe(),t=pt(),n=Lr(),r=mz(),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{schema:l,parentSchema:c,it:f}=o,{prefixItems:d}=c;f.items=!0,!(0,t.alwaysValidSchema)(f,l)&&(d?(0,r.validateAdditionalItems)(o,d):o.ok((0,n.validateArray)(o)))}};return lh.default=a,lh}var uh={},LD;function _ye(){if(LD)return uh;LD=1,Object.defineProperty(uh,"__esModule",{value:!0});const e=Xe(),t=pt(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:a}})=>a===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${a} valid item(s)`,params:({params:{min:i,max:a}})=>a===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${a}}`},code(i){const{gen:a,schema:o,parentSchema:l,data:c,it:f}=i;let d,p;const{minContains:m,maxContains:g}=l;f.opts.next?(d=m===void 0?1:m,p=g):d=1;const _=a.const("len",(0,e._)`${c}.length`);if(i.setParams({min:d,max:p}),p===void 0&&d===0){(0,t.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&d>p){(0,t.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(f,o)){let v=(0,e._)`${_} >= ${d}`;p!==void 0&&(v=(0,e._)`${v} && ${_} <= ${p}`),i.pass(v);return}f.items=!0;const S=a.name("valid");p===void 0&&d===1?x(S,()=>a.if(S,()=>a.break())):d===0?(a.let(S,!0),p!==void 0&&a.if((0,e._)`${c}.length > 0`,b)):(a.let(S,!1),b()),i.result(S,()=>i.reset());function b(){const v=a.name("_valid"),k=a.let("count",0);x(v,()=>a.if(v,()=>w(k)))}function x(v,k){a.forRange("i",0,_,C=>{i.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},v),k()})}function w(v){a.code((0,e._)`${v}++`),p===void 0?a.if((0,e._)`${v} >= ${d}`,()=>a.assign(S,!0).break()):(a.if((0,e._)`${v} > ${p}`,()=>a.assign(S,!1).break()),d===1?a.assign(S,!0):a.if((0,e._)`${v} >= ${d}`,()=>a.assign(S,!0)))}}};return uh.default=r,uh}var tw={},qD;function xye(){return qD||(qD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Xe(),n=pt(),r=Lr();e.error={message:({params:{property:c,depsCount:f,deps:d}})=>{const p=f===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${c} is present`},params:({params:{property:c,depsCount:f,deps:d,missingProperty:p}})=>(0,t._)`{property: ${c},
275
+ missingProperty: ${p},
276
+ depsCount: ${f},
277
+ deps: ${d}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[f,d]=a(c);o(c,f),l(c,d)}};function a({schema:c}){const f={},d={};for(const p in c){if(p==="__proto__")continue;const m=Array.isArray(c[p])?f:d;m[p]=c[p]}return[f,d]}function o(c,f=c.schema){const{gen:d,data:p,it:m}=c;if(Object.keys(f).length===0)return;const g=d.let("missing");for(const _ in f){const S=f[_];if(S.length===0)continue;const b=(0,r.propertyInData)(d,p,_,m.opts.ownProperties);c.setParams({property:_,depsCount:S.length,deps:S.join(", ")}),m.allErrors?d.if(b,()=>{for(const x of S)(0,r.checkReportMissingProp)(c,x)}):(d.if((0,t._)`${b} && (${(0,r.checkMissingProp)(c,S,g)})`),(0,r.reportMissingProp)(c,g),d.else())}}e.validatePropertyDeps=o;function l(c,f=c.schema){const{gen:d,data:p,keyword:m,it:g}=c,_=d.name("valid");for(const S in f)(0,n.alwaysValidSchema)(g,f[S])||(d.if((0,r.propertyInData)(d,p,S,g.opts.ownProperties),()=>{const b=c.subschema({keyword:m,schemaProp:S},_);c.mergeValidEvaluated(b,_)},()=>d.var(_,!0)),c.ok(_))}e.validateSchemaDeps=l,e.default=i}(tw)),tw}var ch={},FD;function wye(){if(FD)return ch;FD=1,Object.defineProperty(ch,"__esModule",{value:!0});const e=Xe(),t=pt(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:a,schema:o,data:l,it:c}=i;if((0,t.alwaysValidSchema)(c,o))return;const f=a.name("valid");a.forIn("key",l,d=>{i.setParams({propertyName:d}),i.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},f),a.if((0,e.not)(f),()=>{i.error(!0),c.allErrors||a.break()})}),i.ok(f)}};return ch.default=r,ch}var fh={},BD;function yz(){if(BD)return fh;BD=1,Object.defineProperty(fh,"__esModule",{value:!0});const e=Lr(),t=Xe(),n=qa(),r=pt(),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:o})=>(0,t._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:l,schema:c,parentSchema:f,data:d,errsCount:p,it:m}=o;if(!p)throw new Error("ajv implementation error");const{allErrors:g,opts:_}=m;if(m.props=!0,_.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(m,c))return;const S=(0,e.allSchemaProperties)(f.properties),b=(0,e.allSchemaProperties)(f.patternProperties);x(),o.ok((0,t._)`${p} === ${n.default.errors}`);function x(){l.forIn("key",d,T=>{!S.length&&!b.length?k(T):l.if(w(T),()=>k(T))})}function w(T){let N;if(S.length>8){const j=(0,r.schemaRefOrVal)(m,f.properties,"properties");N=(0,e.isOwnProperty)(l,j,T)}else S.length?N=(0,t.or)(...S.map(j=>(0,t._)`${T} === ${j}`)):N=t.nil;return b.length&&(N=(0,t.or)(N,...b.map(j=>(0,t._)`${(0,e.usePattern)(o,j)}.test(${T})`))),(0,t.not)(N)}function v(T){l.code((0,t._)`delete ${d}[${T}]`)}function k(T){if(_.removeAdditional==="all"||_.removeAdditional&&c===!1){v(T);return}if(c===!1){o.setParams({additionalProperty:T}),o.error(),g||l.break();return}if(typeof c=="object"&&!(0,r.alwaysValidSchema)(m,c)){const N=l.name("valid");_.removeAdditional==="failing"?(C(T,N,!1),l.if((0,t.not)(N),()=>{o.reset(),v(T)})):(C(T,N),g||l.if((0,t.not)(N),()=>l.break()))}}function C(T,N,j){const $={keyword:"additionalProperties",dataProp:T,dataPropType:r.Type.Str};j===!1&&Object.assign($,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema($,N)}}};return fh.default=a,fh}var dh={},UD;function Sye(){if(UD)return dh;UD=1,Object.defineProperty(dh,"__esModule",{value:!0});const e=_m(),t=Lr(),n=pt(),r=yz(),i={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:o,schema:l,parentSchema:c,data:f,it:d}=a;d.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(d,r.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(l);for(const b of p)d.definedProperties.add(b);d.opts.unevaluated&&p.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(o,(0,n.toHash)(p),d.props));const m=p.filter(b=>!(0,n.alwaysValidSchema)(d,l[b]));if(m.length===0)return;const g=o.name("valid");for(const b of m)_(b)?S(b):(o.if((0,t.propertyInData)(o,f,b,d.opts.ownProperties)),S(b),d.allErrors||o.else().var(g,!0),o.endIf()),a.it.definedProperties.add(b),a.ok(g);function _(b){return d.opts.useDefaults&&!d.compositeRule&&l[b].default!==void 0}function S(b){a.subschema({keyword:"properties",schemaProp:b,dataProp:b},g)}}};return dh.default=i,dh}var hh={},HD;function Eye(){if(HD)return hh;HD=1,Object.defineProperty(hh,"__esModule",{value:!0});const e=Lr(),t=Xe(),n=pt(),r=pt(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:o,schema:l,data:c,parentSchema:f,it:d}=a,{opts:p}=d,m=(0,e.allSchemaProperties)(l),g=m.filter(k=>(0,n.alwaysValidSchema)(d,l[k]));if(m.length===0||g.length===m.length&&(!d.opts.unevaluated||d.props===!0))return;const _=p.strictSchema&&!p.allowMatchingProperties&&f.properties,S=o.name("valid");d.props!==!0&&!(d.props instanceof t.Name)&&(d.props=(0,r.evaluatedPropsToName)(o,d.props));const{props:b}=d;x();function x(){for(const k of m)_&&w(k),d.allErrors?v(k):(o.var(S,!0),v(k),o.if(S))}function w(k){for(const C in _)new RegExp(k).test(C)&&(0,n.checkStrictMode)(d,`property ${C} matches pattern ${k} (use allowMatchingProperties)`)}function v(k){o.forIn("key",c,C=>{o.if((0,t._)`${(0,e.usePattern)(a,k)}.test(${C})`,()=>{const T=g.includes(k);T||a.subschema({keyword:"patternProperties",schemaProp:k,dataProp:C,dataPropType:r.Type.Str},S),d.opts.unevaluated&&b!==!0?o.assign((0,t._)`${b}[${C}]`,!0):!T&&!d.allErrors&&o.if((0,t.not)(S),()=>o.break())})})}}};return hh.default=i,hh}var ph={},VD;function kye(){if(VD)return ph;VD=1,Object.defineProperty(ph,"__esModule",{value:!0});const e=pt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:i,it:a}=n;if((0,e.alwaysValidSchema)(a,i)){n.fail();return}const o=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),n.failResult(o,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return ph.default=t,ph}var mh={},GD;function Cye(){if(GD)return mh;GD=1,Object.defineProperty(mh,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Lr().validateUnion,error:{message:"must match a schema in anyOf"}};return mh.default=t,mh}var gh={},ZD;function Aye(){if(ZD)return gh;ZD=1,Object.defineProperty(gh,"__esModule",{value:!0});const e=Xe(),t=pt(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:a,schema:o,parentSchema:l,it:c}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");if(c.opts.discriminator&&l.discriminator)return;const f=o,d=a.let("valid",!1),p=a.let("passing",null),m=a.name("_valid");i.setParams({passing:p}),a.block(g),i.result(d,()=>i.reset(),()=>i.error(!0));function g(){f.forEach((_,S)=>{let b;(0,t.alwaysValidSchema)(c,_)?a.var(m,!0):b=i.subschema({keyword:"oneOf",schemaProp:S,compositeRule:!0},m),S>0&&a.if((0,e._)`${m} && ${d}`).assign(d,!1).assign(p,(0,e._)`[${p}, ${S}]`).else(),a.if(m,()=>{a.assign(d,!0),a.assign(p,S),b&&i.mergeEvaluated(b,e.Name)})})}}};return gh.default=r,gh}var yh={},YD;function Tye(){if(YD)return yh;YD=1,Object.defineProperty(yh,"__esModule",{value:!0});const e=pt(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:i,it:a}=n;if(!Array.isArray(i))throw new Error("ajv implementation error");const o=r.name("valid");i.forEach((l,c)=>{if((0,e.alwaysValidSchema)(a,l))return;const f=n.subschema({keyword:"allOf",schemaProp:c},o);n.ok(o),n.mergeEvaluated(f)})}};return yh.default=t,yh}var bh={},KD;function Nye(){if(KD)return bh;KD=1,Object.defineProperty(bh,"__esModule",{value:!0});const e=Xe(),t=pt(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:a})=>(0,e.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,e._)`{failingKeyword: ${a.ifClause}}`},code(a){const{gen:o,parentSchema:l,it:c}=a;l.then===void 0&&l.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const f=i(c,"then"),d=i(c,"else");if(!f&&!d)return;const p=o.let("valid",!0),m=o.name("_valid");if(g(),a.reset(),f&&d){const S=o.let("ifClause");a.setParams({ifClause:S}),o.if(m,_("then",S),_("else",S))}else f?o.if(m,_("then")):o.if((0,e.not)(m),_("else"));a.pass(p,()=>a.error(!0));function g(){const S=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);a.mergeEvaluated(S)}function _(S,b){return()=>{const x=a.subschema({keyword:S},m);o.assign(p,m),a.mergeValidEvaluated(x,p),b?o.assign(b,(0,e._)`${S}`):a.setParams({ifClause:S})}}}};function i(a,o){const l=a.schema[o];return l!==void 0&&!(0,t.alwaysValidSchema)(a,l)}return bh.default=r,bh}var vh={},XD;function Oye(){if(XD)return vh;XD=1,Object.defineProperty(vh,"__esModule",{value:!0});const e=pt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:i}){r.if===void 0&&(0,e.checkStrictMode)(i,`"${n}" without "if" is ignored`)}};return vh.default=t,vh}var WD;function Rye(){if(WD)return sh;WD=1,Object.defineProperty(sh,"__esModule",{value:!0});const e=mz(),t=bye(),n=gz(),r=vye(),i=_ye(),a=xye(),o=wye(),l=yz(),c=Sye(),f=Eye(),d=kye(),p=Cye(),m=Aye(),g=Tye(),_=Nye(),S=Oye();function b(x=!1){const w=[d.default,p.default,m.default,g.default,_.default,S.default,o.default,l.default,a.default,c.default,f.default];return x?w.push(t.default,r.default):w.push(e.default,n.default),w.push(i.default),w}return sh.default=b,sh}var _h={},xh={},QD;function jye(){if(QD)return xh;QD=1,Object.defineProperty(xh,"__esModule",{value:!0});const e=Xe(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,i){const{gen:a,data:o,$data:l,schema:c,schemaCode:f,it:d}=r,{opts:p,errSchemaPath:m,schemaEnv:g,self:_}=d;if(!p.validateFormats)return;l?S():b();function S(){const x=a.scopeValue("formats",{ref:_.formats,code:p.code.formats}),w=a.const("fDef",(0,e._)`${x}[${f}]`),v=a.let("fType"),k=a.let("format");a.if((0,e._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>a.assign(v,(0,e._)`${w}.type || "string"`).assign(k,(0,e._)`${w}.validate`),()=>a.assign(v,(0,e._)`"string"`).assign(k,w)),r.fail$data((0,e.or)(C(),T()));function C(){return p.strictSchema===!1?e.nil:(0,e._)`${f} && !${k}`}function T(){const N=g.$async?(0,e._)`(${w}.async ? await ${k}(${o}) : ${k}(${o}))`:(0,e._)`${k}(${o})`,j=(0,e._)`(typeof ${k} == "function" ? ${N} : ${k}.test(${o}))`;return(0,e._)`${k} && ${k} !== true && ${v} === ${i} && !${j}`}}function b(){const x=_.formats[c];if(!x){C();return}if(x===!0)return;const[w,v,k]=T(x);w===i&&r.pass(N());function C(){if(p.strictSchema===!1){_.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${m}"`}}function T(j){const $=j instanceof RegExp?(0,e.regexpCode)(j):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(c)}`:void 0,M=a.scopeValue("formats",{key:c,ref:j,code:$});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${M}.validate`]:["string",j,M]}function N(){if(typeof x=="object"&&!(x instanceof RegExp)&&x.async){if(!g.$async)throw new Error("async format in sync schema");return(0,e._)`await ${k}(${o})`}return typeof v=="function"?(0,e._)`${k}(${o})`:(0,e._)`${k}.test(${o})`}}}};return xh.default=n,xh}var JD;function Mye(){if(JD)return _h;JD=1,Object.defineProperty(_h,"__esModule",{value:!0});const t=[jye().default];return _h.default=t,_h}var ds={},e5;function $ye(){return e5||(e5=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.contentVocabulary=ds.metadataVocabulary=void 0,ds.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ds.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ds}var t5;function Dye(){if(t5)return Hd;t5=1,Object.defineProperty(Hd,"__esModule",{value:!0});const e=aye(),t=yye(),n=Rye(),r=Mye(),i=$ye(),a=[e.default,t.default,(0,n.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];return Hd.default=a,Hd}var wh={},$u={},n5;function Iye(){if(n5)return $u;n5=1,Object.defineProperty($u,"__esModule",{value:!0}),$u.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||($u.DiscrError=e={})),$u}var r5;function Pye(){if(r5)return wh;r5=1,Object.defineProperty(wh,"__esModule",{value:!0});const e=Xe(),t=Iye(),n=XE(),r=xm(),i=pt(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:l,tagName:c}})=>l===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:l,tag:c,tagName:f}})=>(0,e._)`{error: ${l}, tag: ${f}, tagValue: ${c}}`},code(l){const{gen:c,data:f,schema:d,parentSchema:p,it:m}=l,{oneOf:g}=p;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const _=d.propertyName;if(typeof _!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!g)throw new Error("discriminator: requires oneOf keyword");const S=c.let("valid",!1),b=c.const("tag",(0,e._)`${f}${(0,e.getProperty)(_)}`);c.if((0,e._)`typeof ${b} == "string"`,()=>x(),()=>l.error(!1,{discrError:t.DiscrError.Tag,tag:b,tagName:_})),l.ok(S);function x(){const k=v();c.if(!1);for(const C in k)c.elseIf((0,e._)`${b} === ${C}`),c.assign(S,w(k[C]));c.else(),l.error(!1,{discrError:t.DiscrError.Mapping,tag:b,tagName:_}),c.endIf()}function w(k){const C=c.name("valid"),T=l.subschema({keyword:"oneOf",schemaProp:k},C);return l.mergeEvaluated(T,e.Name),C}function v(){var k;const C={},T=j(p);let N=!0;for(let q=0;q<g.length;q++){let F=g[q];if(F?.$ref&&!(0,i.schemaHasRulesButRef)(F,m.self.RULES)){const I=F.$ref;if(F=n.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,I),F instanceof n.SchemaEnv&&(F=F.schema),F===void 0)throw new r.default(m.opts.uriResolver,m.baseId,I)}const B=(k=F?.properties)===null||k===void 0?void 0:k[_];if(typeof B!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${_}"`);N=N&&(T||j(F)),$(B,q)}if(!N)throw new Error(`discriminator: "${_}" must be required`);return C;function j({required:q}){return Array.isArray(q)&&q.includes(_)}function $(q,F){if(q.const)M(q.const,F);else if(q.enum)for(const B of q.enum)M(B,F);else throw new Error(`discriminator: "properties/${_}" must have "const" or "enum"`)}function M(q,F){if(typeof q!="string"||q in C)throw new Error(`discriminator: "${_}" values must be unique strings`);C[q]=F}}}};return wh.default=o,wh}const zye="http://json-schema.org/draft-07/schema#",Lye="http://json-schema.org/draft-07/schema#",qye="Core schema meta-schema",Fye={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Bye=["object","boolean"],Uye={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Hye={$schema:zye,$id:Lye,title:qye,definitions:Fye,type:Bye,properties:Uye,default:!0};var i5;function bz(){return i5||(i5=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=nye(),r=Dye(),i=Pye(),a=Hye,o=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(_,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var f=_m();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var d=Xe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=KE();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=xm();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})}(Ld,Ld.exports)),Ld.exports}var Vye=bz();const Gye=qn(Vye);var Sh={exports:{}},nw={},a5;function Zye(){return a5||(a5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t($,M){return{validate:$,compare:M}}e.fullFormats={date:t(a,o),time:t(c,f),"date-time":t(p,m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:S,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:j,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:x,int32:{type:"number",validate:k},int64:{type:"number",validate:C},float:{type:"number",validate:T},double:{type:"number",validate:T},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n($){return $%4===0&&($%100!==0||$%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a($){const M=r.exec($);if(!M)return!1;const q=+M[1],F=+M[2],B=+M[3];return F>=1&&F<=12&&B>=1&&B<=(F===2&&n(q)?29:i[F])}function o($,M){if($&&M)return $>M?1:$<M?-1:0}const l=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function c($,M){const q=l.exec($);if(!q)return!1;const F=+q[1],B=+q[2],I=+q[3],V=q[5];return(F<=23&&B<=59&&I<=59||F===23&&B===59&&I===60)&&(!M||V!=="")}function f($,M){if(!($&&M))return;const q=l.exec($),F=l.exec(M);if(q&&F)return $=q[1]+q[2]+q[3]+(q[4]||""),M=F[1]+F[2]+F[3]+(F[4]||""),$>M?1:$<M?-1:0}const d=/t|\s/i;function p($){const M=$.split(d);return M.length===2&&a(M[0])&&c(M[1],!0)}function m($,M){if(!($&&M))return;const[q,F]=$.split(d),[B,I]=M.split(d),V=o(q,B);if(V!==void 0)return V||f(F,I)}const g=/\/|:/,_=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function S($){return g.test($)&&_.test($)}const b=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function x($){return b.lastIndex=0,b.test($)}const w=-2147483648,v=2**31-1;function k($){return Number.isInteger($)&&$<=v&&$>=w}function C($){return Number.isInteger($)}function T(){return!0}const N=/[^\\]\\Z/;function j($){if(N.test($))return!1;try{return new RegExp($),!0}catch{return!1}}}(nw)),nw}var rw={},s5;function Yye(){return s5||(s5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=bz(),n=Xe(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},a={message:({keyword:l,schemaCode:c})=>n.str`should be ${i[l].okStr} ${c}`,params:({keyword:l,schemaCode:c})=>n._`{comparison: ${i[l].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(l){const{gen:c,data:f,schemaCode:d,keyword:p,it:m}=l,{opts:g,self:_}=m;if(!g.validateFormats)return;const S=new t.KeywordCxt(m,_.RULES.all.format.definition,"format");S.$data?b():x();function b(){const v=c.scopeValue("formats",{ref:_.formats,code:g.code.formats}),k=c.const("fmt",n._`${v}[${S.schemaCode}]`);l.fail$data(n.or(n._`typeof ${k} != "object"`,n._`${k} instanceof RegExp`,n._`typeof ${k}.compare != "function"`,w(k)))}function x(){const v=S.schema,k=_.formats[v];if(!k||k===!0)return;if(typeof k!="object"||k instanceof RegExp||typeof k.compare!="function")throw new Error(`"${p}": format "${v}" does not define "compare" function`);const C=c.scopeValue("formats",{key:v,ref:k,code:g.code.formats?n._`${g.code.formats}${n.getProperty(v)}`:void 0});l.fail$data(w(C))}function w(v){return n._`${v}.compare(${f}, ${d}) ${i[p].fail} 0`}},dependencies:["format"]};const o=l=>(l.addKeyword(e.formatLimitDefinition),l);e.default=o}(rw)),rw}var o5;function Kye(){return o5||(o5=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=Zye(),r=Yye(),i=Xe(),a=new i.Name("fullFormats"),o=new i.Name("fastFormats"),l=(f,d={keywords:!0})=>{if(Array.isArray(d))return c(f,d,n.fullFormats,a),f;const[p,m]=d.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,a],g=d.formats||n.formatNames;return c(f,g,p,m),d.keywords&&r.default(f),f};l.get=(f,d="full")=>{const m=(d==="fast"?n.fastFormats:n.fullFormats)[f];if(!m)throw new Error(`Unknown format "${f}"`);return m};function c(f,d,p,m){var g,_;(g=(_=f.opts.code).formats)!==null&&g!==void 0||(_.formats=i._`require("ajv-formats/dist/formats").${m}`);for(const S of d)f.addFormat(S,p[S])}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l}(Sh,Sh.exports)),Sh.exports}var Xye=Kye();const l5=qn(Xye),Wye={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Qye=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,Jye=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function e0e(e,t,n={},r,i=Gye){const a=new i({...Wye,...n});return r?l5(a,r):r!==!1&&l5(a),a.addFormat("data-url",Jye),a.addFormat("color",Qye),a.addKeyword($c),a.addKeyword(ZS),Array.isArray(e)&&a.addMetaSchema(e),Dt(t)&&Object.keys(t).forEach(o=>{a.addFormat(o,t[o])}),a}function t0e(e=[],t){return e.map(n=>{var r;const{instancePath:i,keyword:a,params:o,schemaPath:l,parentSchema:c,...f}=n;let{message:d=""}=f,p=i.replace(/\//g,"."),m=`${p} ${d}`.trim();const g=[...((r=o.deps)===null||r===void 0?void 0:r.split(", "))||[],o.missingProperty,o.property].filter(_=>_);if(g.length>0)g.forEach(_=>{const S=p?`${p}.${_}`:_;let b=ot(Re(t,`${S.replace(/^\./,"")}`)).title;if(b===void 0){const x=l.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([_]);b=ot(Re(t,x)).title}if(b)d=d.replace(`'${_}'`,`'${b}'`);else{const x=Re(c,[Ht,_,"title"]);x&&(d=d.replace(`'${_}'`,`'${x}'`))}}),m=d;else{const _=ot(Re(t,`${p.replace(/^\./,"")}`)).title;if(_)m=`'${_}' ${d}`.trim();else{const S=c?.title;S&&(m=`'${S}' ${d}`.trim())}}return"missingProperty"in o&&(p=p?`${p}.${o.missingProperty}`:o.missingProperty),{name:a,property:p,message:d,params:o,stack:m,schemaPath:l}})}function n0e(e,t,n,r,i,a,o){const{validationError:l}=t;let c=t0e(t.errors,o);l&&(c=[...c,{stack:l.message}]),typeof a=="function"&&(c=a(c,o));let f=ope(c);if(l&&(f={...f,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:c,errorSchema:f};const d=HP(e,r,n,r,!0),p=i(d,mp(d),o),m=VE(p);return Ih({errors:c,errorSchema:f},m)}class r0e{constructor(t,n){const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:a,ajvFormatOptions:o,AjvClass:l}=t;this.ajv=e0e(r,i,a,o,l),this.localizer=n}reset(){this.ajv.removeSchema()}toErrorList(t,n=[]){return wc(t,n)}rawValidation(t,n){var r,i;let a,o;t[Ma]&&(o=this.ajv.getSchema(t[Ma]));try{o===void 0&&(o=this.ajv.compile(t)),o(n)}catch(c){a=c}let l;return o&&(typeof this.localizer=="function"&&(((r=o.errors)!==null&&r!==void 0?r:[]).forEach(c=>{var f;["missingProperty","property"].forEach(d=>{var p;!((p=c.params)===null||p===void 0)&&p[d]&&(c.params[d]=`'${c.params[d]}'`)}),!((f=c.params)===null||f===void 0)&&f.deps&&(c.params.deps=c.params.deps.split(", ").map(d=>`'${d}'`).join(", "))}),this.localizer(o.errors),((i=o.errors)!==null&&i!==void 0?i:[]).forEach(c=>{var f;["missingProperty","property"].forEach(d=>{var p;!((p=c.params)===null||p===void 0)&&p[d]&&(c.params[d]=c.params[d].slice(1,-1))}),!((f=c.params)===null||f===void 0)&&f.deps&&(c.params.deps=c.params.deps.split(", ").map(d=>d.slice(1,-1)).join(", "))})),l=o.errors||void 0,o.errors=null),{errors:l,validationError:a}}validateFormData(t,n,r,i,a){const o=this.rawValidation(n,t);return n0e(this,o,t,n,r,i,a)}handleSchemaUpdate(t){var n,r;const i=(n=t[Ma])!==null&&n!==void 0?n:o8;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(t,i):Lt(t,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(t,i))}isValid(t,n,r){var i;try{this.handleSchemaUpdate(r);const a=GE(t),o=(i=a[Ma])!==null&&i!==void 0?i:tpe(a);let l;return l=this.ajv.getSchema(o),l===void 0&&(l=this.ajv.addSchema(a,o).getSchema(o)||this.ajv.compile(a)),l(n)}catch(a){return console.warn("Error encountered compiling schema:",a),!1}}}function i0e(e={},t){return new r0e(e,t)}const a0e=i0e(),s0e=e=>{const t=e.options?.minLength,n=e.options?.maxLength,r=e.value?.length||0;return O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsx("input",{type:"text",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:i=>e.onChange(i.target.value),placeholder:e.placeholder,disabled:e.disabled,maxLength:n?e.options.maxLength:void 0}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description}),(t||n)&&O.jsx("div",{className:"flex justify-end mt-1",children:O.jsx("span",{className:`text-xs ${r>(e.options?.maxLength||0)?"text-red-500":"text-gray-400"}`,children:t&&n?`${r}/${e.options.maxLength} (最少${e.options.minLength})`:n?`${r}/${e.options.maxLength}`:`最少${e.options.minLength}字符`})})]})},o0e=e=>{const[t,n]=ee.useState(!1);return O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsxs("div",{className:"relative",children:[O.jsx("input",{type:t?"text":"password",className:"w-full px-3 py-2 pr-10 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:r=>e.onChange(r.target.value),placeholder:e.placeholder,disabled:e.disabled}),O.jsx("button",{type:"button",className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",onClick:()=>n(!t),children:t?O.jsx(cX,{size:16}):O.jsx(dX,{size:16})})]}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},l0e=e=>{const t=e.options?.minLength,n=e.options?.maxLength,r=e.value?.length||0;return O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsx("textarea",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors resize-vertical",value:e.value||"",onChange:i=>e.onChange(i.target.value),placeholder:e.placeholder,disabled:e.disabled,rows:e.options?.rows||4,maxLength:n?e.options.maxLength:void 0}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description}),(t||n)&&O.jsx("div",{className:"flex justify-end mt-1",children:O.jsx("span",{className:`text-xs ${r>(e.options?.maxLength||0)?"text-red-500":"text-gray-400"}`,children:t&&n?`${r}/${e.options.maxLength} (最少${e.options.minLength})`:n?`${r}/${e.options.maxLength}`:`最少${e.options.minLength}字符`})})]})},u0e=e=>O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsxs("div",{className:"relative",children:[O.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors appearance-none",value:e.value||"",onChange:t=>e.onChange(t.target.value),disabled:e.disabled,children:[e.placeholder&&O.jsx("option",{value:"",disabled:!0,children:e.placeholder}),e.options?.enumOptions?.map((t,n)=>O.jsx("option",{value:t.value,children:t.label},n))]}),O.jsx(GI,{size:16,className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"})]}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),c0e=e=>O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsx("div",{className:"space-y-2",children:e.options?.enumOptions?.map((t,n)=>O.jsxs("label",{className:"flex items-center",children:[O.jsx("input",{type:"checkbox",className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 focus:ring-2",checked:e.value?.includes(t.value)||!1,onChange:r=>{const i=e.value||[];r.target.checked?e.onChange([...i,t.value]):e.onChange(i.filter(a=>a!==t.value))},disabled:e.disabled}),O.jsx("span",{className:"ml-2 text-sm text-gray-700",children:t.label})]},n))}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),f0e=e=>O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsx("div",{className:"space-y-2",children:e.options?.enumOptions?.map((t,n)=>O.jsxs("label",{className:"flex items-center",children:[O.jsx("input",{type:"radio",name:e.id,className:"w-4 h-4 text-blue-600 border-gray-300 focus:ring-blue-500 focus:ring-2",value:t.value,checked:e.value===t.value,onChange:r=>e.onChange(r.target.value),disabled:e.disabled}),O.jsx("span",{className:"ml-2 text-sm text-gray-700",children:t.label})]},n))}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),d0e=e=>O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsx("input",{type:"number",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:t=>e.onChange(Number(t.target.value)),placeholder:e.placeholder,disabled:e.disabled,min:e.options?.min,max:e.options?.max,step:e.options?.step}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),h0e=e=>O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsxs("div",{className:"px-2",children:[O.jsx("input",{type:"range",className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer slider",value:e.value||e.options?.min||0,onChange:t=>e.onChange(Number(t.target.value)),disabled:e.disabled,min:e.options?.min||0,max:e.options?.max||100,step:e.options?.step||1}),O.jsxs("div",{className:"flex justify-between text-xs text-gray-500 mt-1",children:[O.jsx("span",{children:e.options?.min||0}),O.jsx("span",{className:"font-medium text-blue-600",children:e.value}),O.jsx("span",{children:e.options?.max||100})]})]}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),p0e=e=>O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsx("input",{type:"date",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:t=>e.onChange(t.target.value),disabled:e.disabled}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),m0e=e=>O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsx("input",{type:"datetime-local",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:t=>e.onChange(t.target.value),disabled:e.disabled}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),g0e=e=>O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"flex items-center",children:[O.jsx("input",{type:"checkbox",className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 focus:ring-2 mr-2",checked:e.value||!1,onChange:t=>e.onChange(t.target.checked),disabled:e.disabled}),O.jsxs("span",{className:"text-sm text-gray-700",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})]}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1 ml-6",children:e.description})]}),y0e=e=>{const t=n=>{const r=n.target.files;e.multiple?e.onChange(r):e.onChange(r?.[0]||null)};return O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsx("input",{type:"file",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors file:mr-3 file:py-1 file:px-3 file:border-0 file:bg-blue-50 file:text-blue-700 file:rounded file:font-medium",onChange:t,disabled:e.disabled,multiple:e.multiple,accept:e.accept}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},b0e=e=>O.jsxs("div",{className:"mb-4",children:[e.label&&O.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.label,e.required&&O.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),O.jsxs("div",{className:"space-y-2",children:[e.items.map((t,n)=>O.jsxs("div",{className:"flex items-start gap-2 p-3 border border-gray-200 rounded-lg",children:[O.jsx("div",{className:"flex-1",children:t.children}),O.jsx("button",{type:"button",className:"p-1 text-red-500 hover:text-red-700 hover:bg-red-50 rounded",onClick:()=>e.onDropIndexClick(n)(),children:O.jsx(ZI,{size:16})})]},n)),O.jsxs("button",{type:"button",className:"flex items-center gap-1 px-3 py-1 text-sm bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors",onClick:()=>e.onAddClick(),children:[O.jsx(EX,{size:14}),"添加项目"]})]}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),v0e=e=>O.jsx("div",{className:`${e.className} mb-4`,children:e.children}),_0e=e=>O.jsxs("div",{className:"mb-4",children:[e.title&&O.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:e.title}),O.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 pl-4 border-l-2 border-gray-200",children:e.properties.map(t=>O.jsx("div",{children:t.content},t.name))}),e.description&&O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),u5=e=>O.jsx("button",{type:"submit",className:"px-4 py-2 rounded-lg bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 text-white font-medium focus:outline-none focus:ring-2 focus:ring-blue-400 transition-colors disabled:cursor-not-allowed",disabled:e.disabled,children:e.submitText||"提交"}),x0e=x5({name:"show_form",description:"显示动态表单,等待用户填写",parameters:{schema:yF()},onlyRender:!1,handler:w5.waitForUIDone,render(e){const t=e.getInputRepaired(),n=e.getJSONOutputSafe(),r=t.schema,i=c=>{console.log("Form submitted:",c),e.response(c)},a={text:s0e,password:o0e,textarea:l0e,select:u0e,checkboxes:c0e,radio:f0e,number:d0e,range:h0e,date:p0e,datetime:m0e,file:y0e,boolean:g0e},o={array:b0e},l={FieldTemplate:v0e,ObjectFieldTemplate:_0e,ButtonTemplates:{SubmitButton:u5}};return O.jsxs("div",{className:"p-4 bg-white rounded-lg border border-gray-200",children:[O.jsxs("div",{className:"flex items-center gap-1.5 text-gray-700 mb-3 font-bold",children:[O.jsx(gX,{className:"w-4 h-4 text-blue-500"}),O.jsx("span",{children:"AI 表单"})]}),O.jsx(qge,{children:O.jsx(Lge,{readonly:e.state==="done",schema:r,formData:n,onSubmit:c=>i(c.formData),validator:a0e,onError:c=>{console.error("表单校验错误:",c),alert("表单填写有误,请检查后再提交。")},widgets:a,fields:o,templates:l,className:"custom-form",children:O.jsx("div",{className:"flex gap-2 mt-4",children:O.jsx(u5,{})})})})]})}}),w0e=x5({name:"create_artifacts",description:"创建并保存代码文件到 artifacts 目录",parameters:{},onlyRender:!0,render(e){const t=e.getInputRepaired(),{setCurrentArtifactById:n,currentArtifact:r}=Up(),i=()=>{n(e.message.id)};return O.jsxs("div",{className:"p-4 space-y-4",children:[O.jsxs("div",{className:"text-sm text-gray-500",children:["创建文件: ",t.filename,".",t.filetype]}),O.jsx("div",{className:"border rounded-lg p-2 hover:bg-gray-50",children:O.jsxs("div",{className:"flex items-center justify-between select-none cursor-pointer",onClick:i,children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(bX,{className:"w-4 h-4"}),O.jsx("span",{className:"font-xs",children:t.filename})]}),O.jsxs("span",{className:"text-gray-400",children:[t.filetype," ",r?.id===e.message.id?"▼":"▶"]})]})})]})}});let S0e=0;const Sc=An([]),Du=(e,t,n,r)=>{const i=`toast-${++S0e}`,a={id:i,type:e,title:t,description:n,duration:r?.duration??4e3,action:r?.action};return Sc.set([...Sc.get(),a]),a.duration&&a.duration>0&&setTimeout(()=>{vz(i)},a.duration),i},QE={success:(e,t,n)=>Du("success",e,t,n),error:(e,t,n)=>Du("error",e,t,n),warning:(e,t,n)=>Du("warning",e,t,n),info:(e,t,n)=>Du("info",e,t,n),custom:(e,t,n,r)=>Du(e,t,n,r)},vz=e=>{Sc.set(Sc.get().filter(t=>t.id!==e))},E0e=({toast:e})=>{const t=r=>{const i="flex items-start gap-3 p-4 rounded-2xl shadow-sm backdrop-blur-md border transition-all duration-300 max-w-sm";switch(r){case"success":return`${i} bg-white/90 dark:bg-gray-800/90 text-green-700 dark:text-green-300 border-green-200/50 dark:border-green-800/50`;case"error":return`${i} bg-white/90 dark:bg-gray-800/90 text-red-700 dark:text-red-300 border-red-200/50 dark:border-red-800/50`;case"warning":return`${i} bg-white/90 dark:bg-gray-800/90 text-orange-700 dark:text-orange-300 border-orange-200/50 dark:border-orange-800/50`;case"info":default:return`${i} bg-white/90 dark:bg-gray-800/90 text-blue-700 dark:text-blue-300 border-blue-200/50 dark:border-blue-800/50`}},n=r=>{const i="w-5 h-5 flex-shrink-0 mt-0.5 opacity-80";switch(r){case"success":return O.jsx("svg",{className:i,fill:"currentColor",viewBox:"0 0 20 20",children:O.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})});case"error":return O.jsx("svg",{className:i,fill:"currentColor",viewBox:"0 0 20 20",children:O.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})});case"warning":return O.jsx("svg",{className:i,fill:"currentColor",viewBox:"0 0 20 20",children:O.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})});case"info":default:return O.jsx("svg",{className:i,fill:"currentColor",viewBox:"0 0 20 20",children:O.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}};return O.jsxs("div",{className:t(e.type),children:[O.jsx("div",{className:"flex-shrink-0",children:n(e.type)}),O.jsxs("div",{className:"flex-1 min-w-0",children:[O.jsx("div",{className:"text-sm font-medium",children:e.title}),e.description&&O.jsx("div",{className:"text-sm opacity-90 mt-1",children:e.description}),e.action&&O.jsx("button",{onClick:e.action.onClick,className:"text-sm font-medium text-current/80 hover:text-current mt-2 px-2 py-1 rounded-md hover:bg-white/10 transition-colors focus:outline-none focus:ring-2 focus:ring-current/50",children:e.action.label})]}),O.jsx("button",{onClick:()=>vz(e.id),className:"flex-shrink-0 ml-2 p-1 rounded-full opacity-60 hover:opacity-100 hover:bg-black/10 dark:hover:bg-white/20 transition-all focus:outline-none focus:ring-2 focus:ring-current/50","aria-label":"关闭通知",children:O.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},k0e=()=>{const e=DI(Sc);return e.length===0?null:O.jsx("div",{className:"fixed top-4 right-4 z-50 space-y-2 pointer-events-none",children:e.map(t=>O.jsx("div",{className:"pointer-events-auto animate-in slide-in-from-right-2 fade-in duration-200",children:O.jsx(E0e,{toast:t})},t.id))})},Iu={headers:[{key:"authorization",value:""}],withCredentials:!1,apiUrl:"",defaultAgent:"assistant"},C0e=()=>{const[e,t]=ee.useState(()=>{try{const l=localStorage.getItem("code"),c=localStorage.getItem("withCredentials"),f=localStorage.getItem("apiUrl"),d=localStorage.getItem("defaultAgent");let p=Iu.headers;if(l){const m=JSON.parse(l);typeof m=="object"&&!Array.isArray(m)?p=Object.entries(m).map(([g,_])=>({key:g,value:_})):Array.isArray(m)&&(p=m)}return{headers:p,withCredentials:c?JSON.parse(c):Iu.withCredentials,apiUrl:f||Iu.apiUrl,defaultAgent:d||Iu.defaultAgent}}catch(l){return console.error("Error reading login settings from localStorage:",l),Iu}});ee.useEffect(()=>{try{localStorage.setItem("code",JSON.stringify(e.headers)),localStorage.setItem("withCredentials",JSON.stringify(e.withCredentials)),localStorage.setItem("apiUrl",e.apiUrl),localStorage.setItem("defaultAgent",e.defaultAgent)}catch(l){console.error("Error writing login settings to localStorage:",l)}},[e]);const n=ee.useCallback(()=>{t(l=>({...l,headers:[...l.headers,{key:"",value:""}]}))},[]),r=ee.useCallback(l=>{t(c=>({...c,headers:c.headers.filter((f,d)=>d!==l)}))},[]),i=ee.useCallback((l,c,f)=>{t(d=>{const p=[...d.headers];return p[l][c]=f,{...d,headers:p}})},[]),a=ee.useCallback(l=>{const{name:c,value:f,type:d,checked:p}=l.target;t(m=>({...m,[c]:d==="checkbox"?p:f}))},[]);ee.useCallback(l=>{const{name:c,value:f}=l.target;t(d=>({...d,[c]:f}))},[]);const o=()=>{QE.success("配置已保存!重启程序"),setTimeout(()=>{window.location.reload()},500)};return O.jsxs("form",{className:"space-y-6",children:[O.jsxs("div",{children:[O.jsx("label",{htmlFor:"default-agent",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"默认 Agent 名称"}),O.jsx("input",{type:"text",id:"defaultAgent",name:"defaultAgent",value:e.defaultAgent,onChange:a,placeholder:"例如: assistant",className:"w-full px-4 py-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"api-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"API URL"}),O.jsx("input",{type:"text",id:"apiUrl",name:"apiUrl",value:e.apiUrl,onChange:a,placeholder:"例如: http://localhost:8123",className:"w-full px-4 py-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),O.jsxs("div",{children:[O.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"请求头配置"}),O.jsx("div",{className:"space-y-3",children:e.headers.map((l,c)=>O.jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 rounded-lg p-4 shadow-sm",children:[O.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-3",children:[O.jsx("div",{children:O.jsx("input",{type:"text",id:`header-key-${c}`,value:l.key,onChange:f=>i(c,"key",f.target.value),placeholder:"例如: authorization",required:!0,className:"w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all bg-white dark:bg-gray-800 text-gray-900 dark:text-white"})}),O.jsx("div",{children:O.jsx("input",{type:"text",id:`header-value-${c}`,value:l.value,onChange:f=>i(c,"value",f.target.value),placeholder:"例如: Bearer token;无则填 1",required:!0,className:"w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all bg-white dark:bg-gray-800 text-gray-900 dark:text-white"})})]}),c>0&&O.jsxs("button",{type:"button",onClick:()=>r(c),className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-500 text-sm font-medium flex items-center space-x-1 transition-colors",children:[O.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),O.jsx("span",{children:"删除此请求头"})]})]},c))})]}),O.jsxs("div",{className:"flex items-center space-x-3",children:[O.jsx("input",{type:"checkbox",id:"withCredentials",name:"withCredentials",checked:e.withCredentials,onChange:a,className:"h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600"}),O.jsx("label",{htmlFor:"withCredentials",className:"text-sm text-gray-700 dark:text-gray-300",children:"启用 withCredentials(跨域请求时发送 Cookie)"})]}),O.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 pt-4",children:[O.jsxs("button",{type:"button",onClick:n,className:"flex-1 px-6 py-3 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-200 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors font-medium flex items-center justify-center space-x-2",children:[O.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),O.jsx("span",{children:"添加请求头"})]}),O.jsxs("button",{type:"button",onClick:o,className:"flex-1 px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium flex items-center justify-center space-x-2",children:[O.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),O.jsx("span",{children:"保存配置"})]})]})]})},A0e=({isOpen:e,onClose:t,tabs:n})=>{const r=[{id:"general",title:"通用",component:O.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"通用设置内容将在此显示"})},{id:"server-login",title:"服务器",component:O.jsx(C0e,{})}],i=n?[...r,...n]:r,[a,o]=ee.useState("general");return ee.useEffect(()=>{i.length>0&&!i.find(l=>l.id===a)&&o(i[0].id)},[i,a]),e?O.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 backdrop-blur-sm",children:O.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full max-w-2xl h-[80vh] flex flex-col relative overflow-hidden ring-1 ring-gray-900/5 dark:ring-white/10",children:[O.jsx("button",{className:"absolute top-3 right-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 z-10 p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",onClick:t,"aria-label":"关闭设置",children:O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),O.jsxs("div",{className:"flex flex-1",children:[O.jsxs("div",{className:"w-1/4 border-r border-gray-200 dark:border-gray-700 p-4 flex flex-col",children:[O.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-900 dark:text-white",children:"设置"}),O.jsx("nav",{className:"flex-1",children:O.jsx("ul",{children:i.map(l=>O.jsx("li",{children:O.jsx("button",{id:l.id+"-button",className:`flex items-center w-full text-left py-2 px-3 rounded-md mb-2 text-base
278
+ ${a===l.id?"bg-blue-500 text-white font-semibold shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}
279
+ transition-colors duration-200 ease-in-out`,onClick:()=>o(l.id),children:l.title})},l.id))})})]}),O.jsx("div",{className:"w-3/4 p-6 overflow-y-auto bg-gray-50 dark:bg-gray-900",children:O.jsxs("div",{className:"max-w-md mx-auto",children:[O.jsxs("h3",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-white",children:[i.find(l=>l.id===a)?.title," 设置"]}),i.find(l=>l.id===a)?.component]})})]})]})}):null},T0e=()=>{const{renderMessages:e,loading:t,inChatError:n,client:r,collapsedTools:i,toggleToolCollapse:a,isFELocking:o}=js(),l=ee.useRef(null),c=ee.useRef(null),f=()=>{if(!c.current)return!1;const p=c.current,m=p.scrollTop+p.clientHeight;return p.scrollHeight-m<=50},d=()=>{l.current?.scrollIntoView({behavior:"instant"})};return ee.useEffect(()=>{e.length>0&&c.current&&(t||d(),t&&f()&&d())},[e]),O.jsxs("div",{className:"flex-1 overflow-y-auto overflow-x-hidden p-6 bg-gray-100",ref:c,children:[O.jsx(HI,{renderMessages:e,collapsedTools:i,toggleToolCollapse:a,client:r}),t&&!o()&&O.jsxs("div",{className:"flex items-center justify-center py-6 text-gray-500",children:[O.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-blue-500 border-t-transparent mr-2"}),"正在思考中..."]}),n&&O.jsx("div",{className:"px-4 py-3 text-sm text-red-600 bg-white rounded-xl",children:JSON.stringify(n)}),O.jsx("div",{ref:l})]})},N0e=()=>{const{userInput:e,setUserInput:t,loading:n,sendMessage:r,stopGeneration:i,currentAgent:a,setCurrentAgent:o,client:l,currentChatId:c}=js(),{extraParams:f}=KI(),[d,p]=ee.useState([]),[m,g]=ee.useState({image:!1,video:!1,audio:!1,other:!0}),_=(v,k)=>{k==="image"?p(C=>[...C,{type:"image_url",image_url:{url:v},fileType:k}]):k==="video"?p(C=>[...C,{type:"video_url",video_url:{url:v},fileType:k}]):k==="audio"?p(C=>[...C,{type:"audio_url",audio_url:{url:v},fileType:k}]):k==="other"&&p(C=>[...C,{type:"file_url",file_url:{url:v},fileType:k}])},S=(v,k)=>{p(C=>C.filter(T=>(T.image_url?.url||T.video_url?.url||T.audio_url?.url||T.file_url?.url)!==v))},b=v=>{localStorage.setItem("defaultAgent",v),o(v)},x=()=>{const v=d.map(C=>{const T=C.fileType;if(m[T]){const N=C.image_url?.url||C.video_url?.url||C.audio_url?.url||C.file_url?.url;return{type:"text",text:`<file type="${T}" url="${N}"></file>`}}else return C}),k=[{type:"human",content:[{type:"text",text:e},...v]}];r(k,{extraParams:f})},w=v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),x())};return O.jsxs("div",{className:"bg-white rounded-2xl px-4 py-3 mb-4 shadow-lg shadow-gray-200",children:[O.jsx("div",{className:"flex items-center justify-between mb-4",children:O.jsx("div",{className:"flex items-center gap-4",children:O.jsx(FX,{onFileUploaded:_,onFileRemoved:S})})}),d.length>0&&O.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-3",title:"文本传输将会把多模态文件转为 XML + URL 的格式传递给大模型",children:[O.jsx("span",{children:"启动文本传输:"}),O.jsx("button",{onClick:()=>g(v=>({...v,image:!v.image})),className:`px-2 py-1 rounded ${m.image?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-500"}`,children:"图片"}),O.jsx("button",{onClick:()=>g(v=>({...v,video:!v.video})),className:`px-2 py-1 rounded ${m.video?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-500"}`,children:"视频"}),O.jsx("button",{onClick:()=>g(v=>({...v,audio:!v.audio})),className:`px-2 py-1 rounded ${m.audio?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-500"}`,children:"音频"}),O.jsx("button",{onClick:()=>g(v=>({...v,other:!v.other})),className:`px-2 py-1 rounded ${m.other?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-500"}`,children:"其他"})]}),O.jsxs("div",{className:"flex gap-3",children:[O.jsx("textarea",{className:"flex-1 px-5 py-4 text-sm bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-2xl placeholder:text-gray-400 dark:placeholder:text-gray-500 resize-none active:outline-none focus:outline-none",rows:3,value:e,onChange:v=>t(v.target.value),onKeyDown:w,placeholder:"请输入消息内容…",disabled:n,style:{minHeight:"3rem",maxHeight:"6rem",fontFamily:"inherit"}}),O.jsx("button",{className:`px-4 py-3 text-sm font-medium text-white rounded-xl focus:outline-none transition-colors flex items-center justify-center ${n?"bg-red-500 hover:bg-red-600":"bg-blue-500 hover:bg-blue-600 disabled:opacity-40 disabled:cursor-not-allowed"}`,onClick:()=>n?i():x(),disabled:!n&&!e.trim()&&d.length===0,children:n?O.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}):O.jsx(OX,{className:"w-5 h-5"})})]}),O.jsxs("div",{className:"flex mt-4 gap-2 justify-between items-center",children:[O.jsx(lS,{usage_metadata:l?.tokenCounter||{}}),O.jsxs("div",{className:"flex items-center gap-2",children:[!!c&&O.jsxs("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:["会话 ID: ",c]}),O.jsx("select",{value:a,onChange:v=>b(v.target.value),className:"px-4 py-2 text-sm bg-white/60 dark:bg-gray-800/60 rounded-xl focus:outline-none transition-colors",children:l?.availableAssistants.map(v=>O.jsx("option",{value:v.graph_id,children:v.name},v.graph_id))})]})]})]})},O0e=()=>{const[e,t]=ee.useState(!1),[n,r]=ee.useState(!1),{showHistory:i,toggleHistoryVisible:a,showGraph:o,toggleGraphVisible:l,renderMessages:c,setTools:f,client:d}=js(),{extraParams:p,setExtraParams:m}=KI(),{showArtifact:g,setShowArtifact:_}=Up();return ee.useEffect(()=>{f([x0e,w0e])},[]),O.jsxs("div",{className:"langgraph-chat-container flex h-full w-full overflow-hidden bg-gray-100",children:[i&&O.jsx("div",{className:"p-4",children:O.jsx(IX,{onClose:()=>a()})}),O.jsxs("section",{className:"flex-1 flex flex-col overflow-auto items-center ",children:[O.jsxs("header",{className:"flex items-center gap-2 px-6 py-4 bg-white/50 backdrop-blur-sm justify-end h-16 mt-4 rounded-2xl shadow-lg shadow-gray-200",children:[O.jsxs("button",{className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-50 rounded-xl hover:bg-gray-100 focus:outline-none transition-colors flex items-center gap-2",onClick:()=>{a(),FR({showHistory:!i})},children:[O.jsx(_X,{className:"w-4 h-4"}),"历史记录"]}),O.jsx("div",{className:"flex-1"}),O.jsxs("button",{onClick:()=>t(!0),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-50 rounded-xl hover:bg-gray-100 focus:outline-none transition-colors flex items-center gap-2",children:[O.jsx(pX,{className:"w-4 h-4"}),"额外参数"]}),O.jsxs("button",{id:"setting-button",onClick:()=>r(!0),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-50 rounded-xl hover:bg-gray-100 focus:outline-none transition-colors flex items-center gap-2",children:[O.jsx(jX,{className:"w-4 h-4"}),"设置"]}),O.jsx("button",{className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-50 rounded-xl hover:bg-gray-100 focus:outline-none transition-colors flex items-center gap-2",onClick:()=>{QE.info("数据已打印到控制台,请 F12 查看"),console.log(d?.graphState)},children:"打印 State"}),O.jsxs("button",{className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-50 rounded-xl hover:bg-gray-100 focus:outline-none transition-colors flex items-center gap-2",onClick:()=>{l(),FR({showGraph:!o})},children:[O.jsx(wX,{className:"w-4 h-4"}),"节点图"]})]}),O.jsxs("main",{className:"flex-1 overflow-y-auto overflow-x-hidden max-w-6xl w-full h-full flex flex-col",children:[O.jsx(T0e,{}),O.jsx(N0e,{})]}),O.jsx(BX,{isOpen:e,initialJson:p,onClose:()=>t(!1),onSave:m,title:"编辑额外参数",description:"额外参数用于在发送消息时附加到 LangGraph 的 State 中。"}),O.jsx(A0e,{isOpen:n,onClose:()=>r(!1)})]}),(o||g)&&O.jsxs("div",{className:"overflow-hidden flex-1",children:[o&&O.jsx(Nie,{}),g&&O.jsx(vae,{})]})]})},R0e=()=>{const t=(()=>{try{const n=localStorage.getItem("code"),r=localStorage.getItem("withCredentials"),i=localStorage.getItem("apiUrl"),a=localStorage.getItem("defaultAgent"),o=localStorage.getItem("showHistory"),l=localStorage.getItem("showGraph");let c={};if(n){const f=JSON.parse(n);Array.isArray(f)?c=Object.fromEntries(f.map(d=>[d.key,d.value])):typeof f=="object"&&(c=f)}return{defaultAgent:a||"",apiUrl:i||"http://localhost:8123",defaultHeaders:c,withCredentials:r==="true",showHistory:o==="true",showGraph:l==="true"}}catch(n){return console.error("Error reading config from localStorage:",n),{defaultAgent:"",apiUrl:"http://localhost:8123",defaultHeaders:{},withCredentials:!1,showHistory:!1,showGraph:!1}}})();return O.jsx(ZY,{defaultAgent:t.defaultAgent,apiUrl:t.apiUrl,defaultHeaders:t.defaultHeaders,withCredentials:t.withCredentials,showHistory:t.showHistory,showGraph:t.showGraph,onInitError:(n,r)=>{QE.error("请检查服务器配置: ","初始化客户端失败,"+r+`
280
+ `+n,{duration:1e4,action:{label:"去设置",onClick:()=>{document.getElementById("setting-button")?.click(),setTimeout(()=>{document.getElementById("server-login-button")?.click()},300)}}})},children:O.jsx(PX,{children:O.jsxs(yae,{children:[O.jsx(O0e,{}),O.jsx(k0e,{})]})})})};function j0e(){return O.jsx(R0e,{})}Dq.createRoot(document.getElementById("root")).render(O.jsx(j0e,{}))});export default M0e();