@coralai/sps-cli 0.49.1 → 0.49.2

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,486 @@
1
+ var Lk=Object.defineProperty;var nv=e=>{throw TypeError(e)};var jk=(e,t,i)=>t in e?Lk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var iv=(e,t,i)=>jk(e,typeof t!="symbol"?t+"":t,i),ep=(e,t,i)=>t.has(e)||nv("Cannot "+i);var B=(e,t,i)=>(ep(e,t,"read from private field"),i?i.call(e):t.get(e)),we=(e,t,i)=>t.has(e)?nv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),me=(e,t,i,r)=>(ep(e,t,"write to private field"),r?r.call(e,i):t.set(e,i),i),Ue=(e,t,i)=>(ep(e,t,"access private method"),i);var Pu=(e,t,i,r)=>({set _(l){me(e,t,l,i)},get _(){return B(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function Em(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tp={exports:{}},Uo={};/**
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 av;function Ik(){if(av)return Uo;av=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(r,l,o){var c=null;if(o!==void 0&&(c=""+o),l.key!==void 0&&(c=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:e,type:r,key:c,ref:l!==void 0?l:null,props:o}}return Uo.Fragment=t,Uo.jsx=i,Uo.jsxs=i,Uo}var rv;function zk(){return rv||(rv=1,tp.exports=Ik()),tp.exports}var g=zk(),np={exports:{}},Le={};/**
10
+ * @license React
11
+ * react.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 sv;function Bk(){if(sv)return Le;sv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),v=Symbol.iterator;function x(z){return z===null||typeof z!="object"?null:(z=v&&z[v]||z["@@iterator"],typeof z=="function"?z:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function k(z,W,C){this.props=z,this.context=W,this.refs=w,this.updater=C||S}k.prototype.isReactComponent={},k.prototype.setState=function(z,W){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,W,"setState")},k.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function O(){}O.prototype=k.prototype;function A(z,W,C){this.props=z,this.context=W,this.refs=w,this.updater=C||S}var I=A.prototype=new O;I.constructor=A,_(I,k.prototype),I.isPureReactComponent=!0;var q=Array.isArray;function T(){}var P={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function X(z,W,C){var he=C.ref;return{$$typeof:e,type:z,key:W,ref:he!==void 0?he:null,props:C}}function D(z,W){return X(z.type,W,z.props)}function $(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function Q(z){var W={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(C){return W[C]})}var se=/\/+/g;function ae(z,W){return typeof z=="object"&&z!==null&&z.key!=null?Q(""+z.key):W.toString(36)}function J(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(T,T):(z.status="pending",z.then(function(W){z.status==="pending"&&(z.status="fulfilled",z.value=W)},function(W){z.status==="pending"&&(z.status="rejected",z.reason=W)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function K(z,W,C,he,ke){var xe=typeof z;(xe==="undefined"||xe==="boolean")&&(z=null);var Pe=!1;if(z===null)Pe=!0;else switch(xe){case"bigint":case"string":case"number":Pe=!0;break;case"object":switch(z.$$typeof){case e:case t:Pe=!0;break;case y:return Pe=z._init,K(Pe(z._payload),W,C,he,ke)}}if(Pe)return ke=ke(z),Pe=he===""?"."+ae(z,0):he,q(ke)?(C="",Pe!=null&&(C=Pe.replace(se,"$&/")+"/"),K(ke,W,C,"",function(Zt){return Zt})):ke!=null&&($(ke)&&(ke=D(ke,C+(ke.key==null||z&&z.key===ke.key?"":(""+ke.key).replace(se,"$&/")+"/")+Pe)),W.push(ke)),1;Pe=0;var st=he===""?".":he+":";if(q(z))for(var it=0;it<z.length;it++)he=z[it],xe=st+ae(he,it),Pe+=K(he,W,C,xe,ke);else if(it=x(z),typeof it=="function")for(z=it.call(z),it=0;!(he=z.next()).done;)he=he.value,xe=st+ae(he,it++),Pe+=K(he,W,C,xe,ke);else if(xe==="object"){if(typeof z.then=="function")return K(J(z),W,C,he,ke);throw W=String(z),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return Pe}function le(z,W,C){if(z==null)return z;var he=[],ke=0;return K(z,he,"","",function(xe){return W.call(C,xe,ke++)}),he}function ce(z){if(z._status===-1){var W=z._result;W=W(),W.then(function(C){(z._status===0||z._status===-1)&&(z._status=1,z._result=C)},function(C){(z._status===0||z._status===-1)&&(z._status=2,z._result=C)}),z._status===-1&&(z._status=0,z._result=W)}if(z._status===1)return z._result.default;throw z._result}var Se=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},R={map:le,forEach:function(z,W,C){le(z,function(){W.apply(this,arguments)},C)},count:function(z){var W=0;return le(z,function(){W++}),W},toArray:function(z){return le(z,function(W){return W})||[]},only:function(z){if(!$(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Le.Activity=m,Le.Children=R,Le.Component=k,Le.Fragment=i,Le.Profiler=l,Le.PureComponent=A,Le.StrictMode=r,Le.Suspense=d,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Le.__COMPILER_RUNTIME={__proto__:null,c:function(z){return P.H.useMemoCache(z)}},Le.cache=function(z){return function(){return z.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(z,W,C){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var he=_({},z.props),ke=z.key;if(W!=null)for(xe in W.key!==void 0&&(ke=""+W.key),W)!j.call(W,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&W.ref===void 0||(he[xe]=W[xe]);var xe=arguments.length-2;if(xe===1)he.children=C;else if(1<xe){for(var Pe=Array(xe),st=0;st<xe;st++)Pe[st]=arguments[st+2];he.children=Pe}return X(z.type,ke,he)},Le.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:o,_context:z},z},Le.createElement=function(z,W,C){var he,ke={},xe=null;if(W!=null)for(he in W.key!==void 0&&(xe=""+W.key),W)j.call(W,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(ke[he]=W[he]);var Pe=arguments.length-2;if(Pe===1)ke.children=C;else if(1<Pe){for(var st=Array(Pe),it=0;it<Pe;it++)st[it]=arguments[it+2];ke.children=st}if(z&&z.defaultProps)for(he in Pe=z.defaultProps,Pe)ke[he]===void 0&&(ke[he]=Pe[he]);return X(z,xe,ke)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(z){return{$$typeof:f,render:z}},Le.isValidElement=$,Le.lazy=function(z){return{$$typeof:y,_payload:{_status:-1,_result:z},_init:ce}},Le.memo=function(z,W){return{$$typeof:h,type:z,compare:W===void 0?null:W}},Le.startTransition=function(z){var W=P.T,C={};P.T=C;try{var he=z(),ke=P.S;ke!==null&&ke(C,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(T,Se)}catch(xe){Se(xe)}finally{W!==null&&C.types!==null&&(W.types=C.types),P.T=W}},Le.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Le.use=function(z){return P.H.use(z)},Le.useActionState=function(z,W,C){return P.H.useActionState(z,W,C)},Le.useCallback=function(z,W){return P.H.useCallback(z,W)},Le.useContext=function(z){return P.H.useContext(z)},Le.useDebugValue=function(){},Le.useDeferredValue=function(z,W){return P.H.useDeferredValue(z,W)},Le.useEffect=function(z,W){return P.H.useEffect(z,W)},Le.useEffectEvent=function(z){return P.H.useEffectEvent(z)},Le.useId=function(){return P.H.useId()},Le.useImperativeHandle=function(z,W,C){return P.H.useImperativeHandle(z,W,C)},Le.useInsertionEffect=function(z,W){return P.H.useInsertionEffect(z,W)},Le.useLayoutEffect=function(z,W){return P.H.useLayoutEffect(z,W)},Le.useMemo=function(z,W){return P.H.useMemo(z,W)},Le.useOptimistic=function(z,W){return P.H.useOptimistic(z,W)},Le.useReducer=function(z,W,C){return P.H.useReducer(z,W,C)},Le.useRef=function(z){return P.H.useRef(z)},Le.useState=function(z){return P.H.useState(z)},Le.useSyncExternalStore=function(z,W,C){return P.H.useSyncExternalStore(z,W,C)},Le.useTransition=function(){return P.H.useTransition()},Le.version="19.2.5",Le}var lv;function Sm(){return lv||(lv=1,np.exports=Bk()),np.exports}var M=Sm(),ip={exports:{}},Fo={},ap={exports:{}},rp={};/**
18
+ * @license React
19
+ * scheduler.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 ov;function Uk(){return ov||(ov=1,(function(e){function t(K,le){var ce=K.length;K.push(le);e:for(;0<ce;){var Se=ce-1>>>1,R=K[Se];if(0<l(R,le))K[Se]=le,K[ce]=R,ce=Se;else break e}}function i(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var le=K[0],ce=K.pop();if(ce!==le){K[0]=ce;e:for(var Se=0,R=K.length,z=R>>>1;Se<z;){var W=2*(Se+1)-1,C=K[W],he=W+1,ke=K[he];if(0>l(C,ce))he<R&&0>l(ke,C)?(K[Se]=ke,K[he]=ce,Se=he):(K[Se]=C,K[W]=ce,Se=W);else if(he<R&&0>l(ke,ce))K[Se]=ke,K[he]=ce,Se=he;else break e}}return le}function l(K,le){var ce=K.sortIndex-le.sortIndex;return ce!==0?ce:K.id-le.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],y=1,m=null,v=3,x=!1,S=!1,_=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function I(K){for(var le=i(h);le!==null;){if(le.callback===null)r(h);else if(le.startTime<=K)r(h),le.sortIndex=le.expirationTime,t(d,le);else break;le=i(h)}}function q(K){if(_=!1,I(K),!S)if(i(d)!==null)S=!0,T||(T=!0,Q());else{var le=i(h);le!==null&&J(q,le.startTime-K)}}var T=!1,P=-1,j=5,X=-1;function D(){return w?!0:!(e.unstable_now()-X<j)}function $(){if(w=!1,T){var K=e.unstable_now();X=K;var le=!0;try{e:{S=!1,_&&(_=!1,O(P),P=-1),x=!0;var ce=v;try{t:{for(I(K),m=i(d);m!==null&&!(m.expirationTime>K&&D());){var Se=m.callback;if(typeof Se=="function"){m.callback=null,v=m.priorityLevel;var R=Se(m.expirationTime<=K);if(K=e.unstable_now(),typeof R=="function"){m.callback=R,I(K),le=!0;break t}m===i(d)&&r(d),I(K)}else r(d);m=i(d)}if(m!==null)le=!0;else{var z=i(h);z!==null&&J(q,z.startTime-K),le=!1}}break e}finally{m=null,v=ce,x=!1}le=void 0}}finally{le?Q():T=!1}}}var Q;if(typeof A=="function")Q=function(){A($)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,ae=se.port2;se.port1.onmessage=$,Q=function(){ae.postMessage(null)}}else Q=function(){k($,0)};function J(K,le){P=k(function(){K(e.unstable_now())},le)}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(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(K){switch(v){case 1:case 2:case 3:var le=3;break;default:le=v}var ce=v;v=le;try{return K()}finally{v=ce}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(K,le){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var ce=v;v=K;try{return le()}finally{v=ce}},e.unstable_scheduleCallback=function(K,le,ce){var Se=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?Se+ce:Se):ce=Se,K){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=ce+R,K={id:y++,callback:le,priorityLevel:K,startTime:ce,expirationTime:R,sortIndex:-1},ce>Se?(K.sortIndex=ce,t(h,K),i(d)===null&&K===i(h)&&(_?(O(P),P=-1):_=!0,J(q,ce-Se))):(K.sortIndex=R,t(d,K),S||x||(S=!0,T||(T=!0,Q()))),K},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(K){var le=v;return function(){var ce=v;v=le;try{return K.apply(this,arguments)}finally{v=ce}}}})(rp)),rp}var cv;function Fk(){return cv||(cv=1,ap.exports=Uk()),ap.exports}var sp={exports:{}},dn={};/**
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 uv;function Pk(){if(uv)return dn;uv=1;var e=Sm();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(d,h,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:m==null?null:""+m,children:d,containerInfo:h,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return dn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,dn.createPortal=function(d,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(d,h,null,y)},dn.flushSync=function(d){var h=c.T,y=r.p;try{if(c.T=null,r.p=2,d)return d()}finally{c.T=h,r.p=y,r.d.f()}},dn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},dn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},dn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var y=h.as,m=f(y,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:v,fetchPriority:x}):y==="script"&&r.d.X(d,{crossOrigin:m,integrity:v,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},dn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=f(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},dn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,m=f(y,h.crossOrigin);r.d.L(d,y,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},dn.preloadModule=function(d,h){if(typeof d=="string")if(h){var y=f(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},dn.requestFormReset=function(d){r.d.r(d)},dn.unstable_batchedUpdates=function(d,h){return d(h)},dn.useFormState=function(d,h,y){return c.H.useFormState(d,h,y)},dn.useFormStatus=function(){return c.H.useHostTransitionStatus()},dn.version="19.2.5",dn}var fv;function $k(){if(fv)return sp.exports;fv=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(),sp.exports=Pk(),sp.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 dv;function qk(){if(dv)return Fo;dv=1;var e=Fk(),t=Sm(),i=$k();function r(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var a=n,s=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(s=a.return),n=a.return;while(n)}return a.tag===3?s:null}function c(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(o(n)!==n)throw Error(r(188))}function h(n){var a=n.alternate;if(!a){if(a=o(n),a===null)throw Error(r(188));return a!==n?null:n}for(var s=n,u=a;;){var p=s.return;if(p===null)break;var b=p.alternate;if(b===null){if(u=p.return,u!==null){s=u;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===s)return d(p),n;if(b===u)return d(p),a;b=b.sibling}throw Error(r(188))}if(s.return!==u.return)s=p,u=b;else{for(var E=!1,N=p.child;N;){if(N===s){E=!0,s=p,u=b;break}if(N===u){E=!0,u=p,s=b;break}N=N.sibling}if(!E){for(N=b.child;N;){if(N===s){E=!0,s=b,u=p;break}if(N===u){E=!0,u=b,s=p;break}N=N.sibling}if(!E)throw Error(r(189))}}if(s.alternate!==u)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?n:a}function y(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=y(n),a!==null)return a;n=n.sibling}return null}var m=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function Q(n){return n===null||typeof n!="object"?null:(n=$&&n[$]||n["@@iterator"],typeof n=="function"?n:null)}var se=Symbol.for("react.client.reference");function ae(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===se?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _:return"Fragment";case k:return"Profiler";case w:return"StrictMode";case q:return"Suspense";case T:return"SuspenseList";case X:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case A:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case I:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case P:return a=n.displayName||null,a!==null?a:ae(n.type)||"Memo";case j:a=n._payload,n=n._init;try{return ae(n(a))}catch{}}return null}var J=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},Se=[],R=-1;function z(n){return{current:n}}function W(n){0>R||(n.current=Se[R],Se[R]=null,R--)}function C(n,a){R++,Se[R]=n.current,n.current=a}var he=z(null),ke=z(null),xe=z(null),Pe=z(null);function st(n,a){switch(C(xe,a),C(ke,n),C(he,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?kx(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=kx(a),n=Nx(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}W(he),C(he,n)}function it(){W(he),W(ke),W(xe)}function Zt(n){n.memoizedState!==null&&C(Pe,n);var a=he.current,s=Nx(a,n.type);a!==s&&(C(ke,n),C(he,s))}function Pn(n){ke.current===n&&(W(he),W(ke)),Pe.current===n&&(W(Pe),jo._currentValue=ce)}var Xi,Ca;function $n(n){if(Xi===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Xi=a&&a[1]||"",Ca=-1<s.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Xi+n+Ca}var Li=!1;function Xe(n,a){if(!n||Li)return"";Li=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(Z){var V=Z}Reflect.construct(n,[],re)}else{try{re.call()}catch(Z){V=Z}n.call(re.prototype)}}else{try{throw Error()}catch(Z){V=Z}(re=n())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(Z){if(Z&&V&&typeof Z.stack=="string")return[Z.stack,V.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),E=b[0],N=b[1];if(E&&N){var L=E.split(`
44
+ `),Y=N.split(`
45
+ `);for(p=u=0;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;for(;p<Y.length&&!Y[p].includes("DetermineComponentFrameRoot");)p++;if(u===L.length||p===Y.length)for(u=L.length-1,p=Y.length-1;1<=u&&0<=p&&L[u]!==Y[p];)p--;for(;1<=u&&0<=p;u--,p--)if(L[u]!==Y[p]){if(u!==1||p!==1)do if(u--,p--,0>p||L[u]!==Y[p]){var te=`
46
+ `+L[u].replace(" at new "," at ");return n.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",n.displayName)),te}while(1<=u&&0<=p);break}}}finally{Li=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?$n(s):""}function Si(n,a){switch(n.tag){case 26:case 27:case 5:return $n(n.type);case 16:return $n("Lazy");case 13:return n.child!==a&&a!==null?$n("Suspense Fallback"):$n("Suspense");case 19:return $n("SuspenseList");case 0:case 15:return Xe(n.type,!1);case 11:return Xe(n.type.render,!1);case 1:return Xe(n.type,!0);case 31:return $n("Activity");default:return""}}function ri(n){try{var a="",s=null;do a+=Si(n,s),s=n,n=n.return;while(n);return a}catch(u){return`
47
+ Error generating stack: `+u.message+`
48
+ `+u.stack}}var ji=Object.prototype.hasOwnProperty,Zi=e.unstable_scheduleCallback,wr=e.unstable_cancelCallback,Hl=e.unstable_shouldYield,gs=e.unstable_requestPaint,Ot=e.unstable_now,bs=e.unstable_getCurrentPriorityLevel,ee=e.unstable_ImmediatePriority,fe=e.unstable_UserBlockingPriority,Ce=e.unstable_NormalPriority,$e=e.unstable_LowPriority,et=e.unstable_IdlePriority,bn=e.log,_i=e.unstable_setDisableYieldValue,nn=null,Lt=null;function cn(n){if(typeof bn=="function"&&_i(n),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(nn,n)}catch{}}var lt=Math.clz32?Math.clz32:kc,Ii=Math.log,yn=Math.LN2;function kc(n){return n>>>=0,n===0?32:31-(Ii(n)/yn|0)|0}var kr=256,ys=262144,Nr=4194304;function Nn(n){var a=n&42;if(a!==0)return a;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function U(n,a,s){var u=n.pendingLanes;if(u===0)return 0;var p=0,b=n.suspendedLanes,E=n.pingedLanes;n=n.warmLanes;var N=u&134217727;return N!==0?(u=N&~b,u!==0?p=Nn(u):(E&=N,E!==0?p=Nn(E):s||(s=N&~n,s!==0&&(p=Nn(s))))):(N=u&~b,N!==0?p=Nn(N):E!==0?p=Nn(E):s||(s=u&~n,s!==0&&(p=Nn(s)))),p===0?0:a!==0&&a!==p&&(a&b)===0&&(b=p&-p,s=a&-a,b>=s||b===32&&(s&4194048)!==0)?a:p}function ne(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function pe(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Me(){var n=Nr;return Nr<<=1,(Nr&62914560)===0&&(Nr=4194304),n}function St(n){for(var a=[],s=0;31>s;s++)a.push(n);return a}function gt(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function ye(n,a,s,u,p,b){var E=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var N=n.entanglements,L=n.expirationTimes,Y=n.hiddenUpdates;for(s=E&~s;0<s;){var te=31-lt(s),re=1<<te;N[te]=0,L[te]=-1;var V=Y[te];if(V!==null)for(Y[te]=null,te=0;te<V.length;te++){var Z=V[te];Z!==null&&(Z.lane&=-536870913)}s&=~re}u!==0&&ge(n,u,0),b!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=b&~(E&~a))}function ge(n,a,s){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-lt(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|s&261930}function Re(n,a){var s=n.entangledLanes|=a;for(n=n.entanglements;s;){var u=31-lt(s),p=1<<u;p&a|n[u]&a&&(n[u]|=a),s&=~p}}function Bt(n,a){var s=a&-a;return s=(s&42)!==0?1:Nt(s),(s&(n.suspendedLanes|a))!==0?0:s}function Nt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Wi(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function xs(){var n=le.p;return n!==0?n:(n=window.event,n===void 0?32:Vx(n.type))}function vs(n,a){var s=le.p;try{return le.p=n,a()}finally{le.p=s}}var zi=Math.random().toString(36).slice(2),Ut="__reactFiber$"+zi,un="__reactProps$"+zi,Aa="__reactContainer$"+zi,Kl="__reactEvents$"+zi,Nc="__reactListeners$"+zi,Es="__reactHandles$"+zi,Tc="__reactResources$"+zi,Tr="__reactMarker$"+zi;function Gl(n){delete n[Ut],delete n[un],delete n[Kl],delete n[Nc],delete n[Es]}function xn(n){var a=n[Ut];if(a)return a;for(var s=n.parentNode;s;){if(a=s[Aa]||s[Ut]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(n=Dx(n);n!==null;){if(s=n[Ut])return s;n=Dx(n)}return a}n=s,s=n.parentNode}return null}function Ji(n){if(n=n[Ut]||n[Aa]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function Oa(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(r(33))}function Ra(n){var a=n[Tc];return a||(a=n[Tc]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ht(n){n[Tr]=!0}var Cc=new Set,Cr={};function ea(n,a){oe(n,a),oe(n+"Capture",a)}function oe(n,a){for(Cr[n]=a,n=0;n<a.length;n++)Cc.add(a[n])}var _e=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]*$"),qe={},ot={};function Ft(n){return ji.call(ot,n)?!0:ji.call(qe,n)?!1:_e.test(n)?ot[n]=!0:(qe[n]=!0,!1)}function fn(n,a,s){if(Ft(a))if(s===null)n.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+s)}}function qn(n,a,s){if(s===null)n.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+s)}}function Tn(n,a,s,u){if(u===null)n.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(a,s,""+u)}}function vt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Hn(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Ac(n,a,s){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,b=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return p.call(this)},set:function(E){s=""+E,b.call(this,E)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(E){s=""+E},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function Ss(n){if(!n._valueTracker){var a=Hn(n)?"checked":"value";n._valueTracker=Ac(n,a,""+n[a])}}function Yl(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var s=a.getValue(),u="";return n&&(u=Hn(n)?n.checked?"true":"false":n.value),n=u,n!==s?(a.setValue(n),!0):!1}function _s(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Jf=/[\n"\\]/g;function Cn(n){return n.replace(Jf,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Ql(n,a,s,u,p,b,E,N){n.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.type=E:n.removeAttribute("type"),a!=null?E==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+vt(a)):n.value!==""+vt(a)&&(n.value=""+vt(a)):E!=="submit"&&E!=="reset"||n.removeAttribute("value"),a!=null?ws(n,E,vt(a)):s!=null?ws(n,E,vt(s)):u!=null&&n.removeAttribute("value"),p==null&&b!=null&&(n.defaultChecked=!!b),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?n.name=""+vt(N):n.removeAttribute("name")}function Ar(n,a,s,u,p,b,E,N){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.type=b),a!=null||s!=null){if(!(b!=="submit"&&b!=="reset"||a!=null)){Ss(n);return}s=s!=null?""+vt(s):"",a=a!=null?""+vt(a):s,N||a===n.value||(n.value=a),n.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=N?n.checked:!!u,n.defaultChecked=!!u,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(n.name=E),Ss(n)}function ws(n,a,s){a==="number"&&_s(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function an(n,a,s,u){if(n=n.options,a){a={};for(var p=0;p<s.length;p++)a["$"+s[p]]=!0;for(s=0;s<n.length;s++)p=a.hasOwnProperty("$"+n[s].value),n[s].selected!==p&&(n[s].selected=p),p&&u&&(n[s].defaultSelected=!0)}else{for(s=""+vt(s),a=null,p=0;p<n.length;p++){if(n[p].value===s){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function Oc(n,a,s){if(a!=null&&(a=""+vt(a),a!==n.value&&(n.value=a),s==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=s!=null?""+vt(s):""}function ks(n,a,s,u){if(a==null){if(u!=null){if(s!=null)throw Error(r(92));if(J(u)){if(1<u.length)throw Error(r(93));u=u[0]}s=u}s==null&&(s=""),a=s}s=vt(a),n.defaultValue=s,u=n.textContent,u===s&&u!==""&&u!==null&&(n.value=u),Ss(n)}function Oe(n,a){if(a){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=a;return}}n.textContent=a}var Rc=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 Kt(n,a,s){var u=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,s):typeof s!="number"||s===0||Rc.has(a)?a==="float"?n.cssFloat=s:n[a]=(""+s).trim():n[a]=s+"px"}function ct(n,a,s){if(a!=null&&typeof a!="object")throw Error(r(62));if(n=n.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&s[p]!==u&&Kt(n,p,u)}else for(var b in a)a.hasOwnProperty(b)&&Kt(n,b,a[b])}function Ma(n){if(n.indexOf("-")===-1)return!1;switch(n){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 ta=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"]]),Vl=/^[\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 Da(n){return Vl.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function de(){}var ve=null;function Ie(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ye=null,Rt=null;function si(n){var a=Ji(n);if(a&&(n=a.stateNode)){var s=n[un]||null;e:switch(n=a.stateNode,a.type){case"input":if(Ql(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Cn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var u=s[a];if(u!==n&&u.form===n.form){var p=u[un]||null;if(!p)throw Error(r(90));Ql(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<s.length;a++)u=s[a],u.form===n.form&&Yl(u)}break e;case"textarea":Oc(n,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&an(n,!!s.multiple,a,!1)}}}var Xl=!1;function Mc(n,a,s){if(Xl)return n(a,s);Xl=!0;try{var u=n(a);return u}finally{if(Xl=!1,(Ye!==null||Rt!==null)&&(xu(),Ye&&(a=Ye,n=Rt,Rt=Ye=null,si(a),n)))for(a=0;a<n.length;a++)si(n[a])}}function Zl(n,a){var s=n.stateNode;if(s===null)return null;var u=s[un]||null;if(u===null)return null;s=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(r(231,a,typeof s));return s}var na=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ed=!1;if(na)try{var Wl={};Object.defineProperty(Wl,"passive",{get:function(){ed=!0}}),window.addEventListener("test",Wl,Wl),window.removeEventListener("test",Wl,Wl)}catch{ed=!1}var La=null,td=null,Dc=null;function Ng(){if(Dc)return Dc;var n,a=td,s=a.length,u,p="value"in La?La.value:La.textContent,b=p.length;for(n=0;n<s&&a[n]===p[n];n++);var E=s-n;for(u=1;u<=E&&a[s-u]===p[b-u];u++);return Dc=p.slice(n,1<u?1-u:void 0)}function Lc(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function jc(){return!0}function Tg(){return!1}function An(n){function a(s,u,p,b,E){this._reactName=s,this._targetInst=p,this.type=u,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var N in n)n.hasOwnProperty(N)&&(s=n[N],this[N]=s?s(b):b[N]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?jc:Tg,this.isPropagationStopped=Tg,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=jc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=jc)},persist:function(){},isPersistent:jc}),a}var Or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ic=An(Or),Jl=m({},Or,{view:0,detail:0}),M_=An(Jl),nd,id,eo,zc=m({},Jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rd,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==eo&&(eo&&n.type==="mousemove"?(nd=n.screenX-eo.screenX,id=n.screenY-eo.screenY):id=nd=0,eo=n),nd)},movementY:function(n){return"movementY"in n?n.movementY:id}}),Cg=An(zc),D_=m({},zc,{dataTransfer:0}),L_=An(D_),j_=m({},Jl,{relatedTarget:0}),ad=An(j_),I_=m({},Or,{animationName:0,elapsedTime:0,pseudoElement:0}),z_=An(I_),B_=m({},Or,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),U_=An(B_),F_=m({},Or,{data:0}),Ag=An(F_),P_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$_={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"},q_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function H_(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=q_[n])?!!a[n]:!1}function rd(){return H_}var K_=m({},Jl,{key:function(n){if(n.key){var a=P_[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Lc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?$_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rd,charCode:function(n){return n.type==="keypress"?Lc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Lc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),G_=An(K_),Y_=m({},zc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Og=An(Y_),Q_=m({},Jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rd}),V_=An(Q_),X_=m({},Or,{propertyName:0,elapsedTime:0,pseudoElement:0}),Z_=An(X_),W_=m({},zc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),J_=An(W_),ew=m({},Or,{newState:0,oldState:0}),tw=An(ew),nw=[9,13,27,32],sd=na&&"CompositionEvent"in window,to=null;na&&"documentMode"in document&&(to=document.documentMode);var iw=na&&"TextEvent"in window&&!to,Rg=na&&(!sd||to&&8<to&&11>=to),Mg=" ",Dg=!1;function Lg(n,a){switch(n){case"keyup":return nw.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ns=!1;function aw(n,a){switch(n){case"compositionend":return jg(a);case"keypress":return a.which!==32?null:(Dg=!0,Mg);case"textInput":return n=a.data,n===Mg&&Dg?null:n;default:return null}}function rw(n,a){if(Ns)return n==="compositionend"||!sd&&Lg(n,a)?(n=Ng(),Dc=td=La=null,Ns=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Rg&&a.locale!=="ko"?null:a.data;default:return null}}var sw={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 Ig(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!sw[n.type]:a==="textarea"}function zg(n,a,s,u){Ye?Rt?Rt.push(u):Rt=[u]:Ye=u,a=Nu(a,"onChange"),0<a.length&&(s=new Ic("onChange","change",null,s,u),n.push({event:s,listeners:a}))}var no=null,io=null;function lw(n){xx(n,0)}function Bc(n){var a=Oa(n);if(Yl(a))return n}function Bg(n,a){if(n==="change")return a}var Ug=!1;if(na){var ld;if(na){var od="oninput"in document;if(!od){var Fg=document.createElement("div");Fg.setAttribute("oninput","return;"),od=typeof Fg.oninput=="function"}ld=od}else ld=!1;Ug=ld&&(!document.documentMode||9<document.documentMode)}function Pg(){no&&(no.detachEvent("onpropertychange",$g),io=no=null)}function $g(n){if(n.propertyName==="value"&&Bc(io)){var a=[];zg(a,io,n,Ie(n)),Mc(lw,a)}}function ow(n,a,s){n==="focusin"?(Pg(),no=a,io=s,no.attachEvent("onpropertychange",$g)):n==="focusout"&&Pg()}function cw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Bc(io)}function uw(n,a){if(n==="click")return Bc(a)}function fw(n,a){if(n==="input"||n==="change")return Bc(a)}function dw(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var Kn=typeof Object.is=="function"?Object.is:dw;function ao(n,a){if(Kn(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var s=Object.keys(n),u=Object.keys(a);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var p=s[u];if(!ji.call(a,p)||!Kn(n[p],a[p]))return!1}return!0}function qg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Hg(n,a){var s=qg(n);n=0;for(var u;s;){if(s.nodeType===3){if(u=n+s.textContent.length,n<=a&&u>=a)return{node:s,offset:a-n};n=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=qg(s)}}function Kg(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Kg(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function Gg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=_s(n.document);a instanceof n.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)n=a.contentWindow;else break;a=_s(n.document)}return a}function cd(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var hw=na&&"documentMode"in document&&11>=document.documentMode,Ts=null,ud=null,ro=null,fd=!1;function Yg(n,a,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;fd||Ts==null||Ts!==_s(u)||(u=Ts,"selectionStart"in u&&cd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ro&&ao(ro,u)||(ro=u,u=Nu(ud,"onSelect"),0<u.length&&(a=new Ic("onSelect","select",null,a,s),n.push({event:a,listeners:u}),a.target=Ts)))}function Rr(n,a){var s={};return s[n.toLowerCase()]=a.toLowerCase(),s["Webkit"+n]="webkit"+a,s["Moz"+n]="moz"+a,s}var Cs={animationend:Rr("Animation","AnimationEnd"),animationiteration:Rr("Animation","AnimationIteration"),animationstart:Rr("Animation","AnimationStart"),transitionrun:Rr("Transition","TransitionRun"),transitionstart:Rr("Transition","TransitionStart"),transitioncancel:Rr("Transition","TransitionCancel"),transitionend:Rr("Transition","TransitionEnd")},dd={},Qg={};na&&(Qg=document.createElement("div").style,"AnimationEvent"in window||(delete Cs.animationend.animation,delete Cs.animationiteration.animation,delete Cs.animationstart.animation),"TransitionEvent"in window||delete Cs.transitionend.transition);function Mr(n){if(dd[n])return dd[n];if(!Cs[n])return n;var a=Cs[n],s;for(s in a)if(a.hasOwnProperty(s)&&s in Qg)return dd[n]=a[s];return n}var Vg=Mr("animationend"),Xg=Mr("animationiteration"),Zg=Mr("animationstart"),pw=Mr("transitionrun"),mw=Mr("transitionstart"),gw=Mr("transitioncancel"),Wg=Mr("transitionend"),Jg=new Map,hd="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(" ");hd.push("scrollEnd");function wi(n,a){Jg.set(n,a),ea(a,[n])}var Uc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},li=[],As=0,pd=0;function Fc(){for(var n=As,a=pd=As=0;a<n;){var s=li[a];li[a++]=null;var u=li[a];li[a++]=null;var p=li[a];li[a++]=null;var b=li[a];if(li[a++]=null,u!==null&&p!==null){var E=u.pending;E===null?p.next=p:(p.next=E.next,E.next=p),u.pending=p}b!==0&&eb(s,p,b)}}function Pc(n,a,s,u){li[As++]=n,li[As++]=a,li[As++]=s,li[As++]=u,pd|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function md(n,a,s,u){return Pc(n,a,s,u),$c(n)}function Dr(n,a){return Pc(n,null,null,a),$c(n)}function eb(n,a,s){n.lanes|=s;var u=n.alternate;u!==null&&(u.lanes|=s);for(var p=!1,b=n.return;b!==null;)b.childLanes|=s,u=b.alternate,u!==null&&(u.childLanes|=s),b.tag===22&&(n=b.stateNode,n===null||n._visibility&1||(p=!0)),n=b,b=b.return;return n.tag===3?(b=n.stateNode,p&&a!==null&&(p=31-lt(s),n=b.hiddenUpdates,u=n[p],u===null?n[p]=[a]:u.push(a),a.lane=s|536870912),b):null}function $c(n){if(50<Co)throw Co=0,wh=null,Error(r(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var Os={};function bw(n,a,s,u){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gn(n,a,s,u){return new bw(n,a,s,u)}function gd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ia(n,a){var s=n.alternate;return s===null?(s=Gn(n.tag,a,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=a,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,a=n.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function tb(n,a){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,a=s.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function qc(n,a,s,u,p,b){var E=0;if(u=n,typeof n=="function")gd(n)&&(E=1);else if(typeof n=="string")E=Sk(n,s,he.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case X:return n=Gn(31,s,a,p),n.elementType=X,n.lanes=b,n;case _:return Lr(s.children,p,b,a);case w:E=8,p|=24;break;case k:return n=Gn(12,s,a,p|2),n.elementType=k,n.lanes=b,n;case q:return n=Gn(13,s,a,p),n.elementType=q,n.lanes=b,n;case T:return n=Gn(19,s,a,p),n.elementType=T,n.lanes=b,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:E=10;break e;case O:E=9;break e;case I:E=11;break e;case P:E=14;break e;case j:E=16,u=null;break e}E=29,s=Error(r(130,n===null?"null":typeof n,"")),u=null}return a=Gn(E,s,a,p),a.elementType=n,a.type=u,a.lanes=b,a}function Lr(n,a,s,u){return n=Gn(7,n,u,a),n.lanes=s,n}function bd(n,a,s){return n=Gn(6,n,null,a),n.lanes=s,n}function nb(n){var a=Gn(18,null,null,0);return a.stateNode=n,a}function yd(n,a,s){return a=Gn(4,n.children!==null?n.children:[],n.key,a),a.lanes=s,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var ib=new WeakMap;function oi(n,a){if(typeof n=="object"&&n!==null){var s=ib.get(n);return s!==void 0?s:(a={value:n,source:a,stack:ri(a)},ib.set(n,a),a)}return{value:n,source:a,stack:ri(a)}}var Rs=[],Ms=0,Hc=null,so=0,ci=[],ui=0,ja=null,Bi=1,Ui="";function aa(n,a){Rs[Ms++]=so,Rs[Ms++]=Hc,Hc=n,so=a}function ab(n,a,s){ci[ui++]=Bi,ci[ui++]=Ui,ci[ui++]=ja,ja=n;var u=Bi;n=Ui;var p=32-lt(u)-1;u&=~(1<<p),s+=1;var b=32-lt(a)+p;if(30<b){var E=p-p%5;b=(u&(1<<E)-1).toString(32),u>>=E,p-=E,Bi=1<<32-lt(a)+p|s<<p|u,Ui=b+n}else Bi=1<<b|s<<p|u,Ui=n}function xd(n){n.return!==null&&(aa(n,1),ab(n,1,0))}function vd(n){for(;n===Hc;)Hc=Rs[--Ms],Rs[Ms]=null,so=Rs[--Ms],Rs[Ms]=null;for(;n===ja;)ja=ci[--ui],ci[ui]=null,Ui=ci[--ui],ci[ui]=null,Bi=ci[--ui],ci[ui]=null}function rb(n,a){ci[ui++]=Bi,ci[ui++]=Ui,ci[ui++]=ja,Bi=a.id,Ui=a.overflow,ja=n}var rn=null,_t=null,Ze=!1,Ia=null,fi=!1,Ed=Error(r(519));function za(n){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw lo(oi(a,n)),Ed}function sb(n){var a=n.stateNode,s=n.type,u=n.memoizedProps;switch(a[Ut]=n,a[un]=u,s){case"dialog":Ke("cancel",a),Ke("close",a);break;case"iframe":case"object":case"embed":Ke("load",a);break;case"video":case"audio":for(s=0;s<Oo.length;s++)Ke(Oo[s],a);break;case"source":Ke("error",a);break;case"img":case"image":case"link":Ke("error",a),Ke("load",a);break;case"details":Ke("toggle",a);break;case"input":Ke("invalid",a),Ar(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ke("invalid",a);break;case"textarea":Ke("invalid",a),ks(a,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||u.suppressHydrationWarning===!0||_x(a.textContent,s)?(u.popover!=null&&(Ke("beforetoggle",a),Ke("toggle",a)),u.onScroll!=null&&Ke("scroll",a),u.onScrollEnd!=null&&Ke("scrollend",a),u.onClick!=null&&(a.onclick=de),a=!0):a=!1,a||za(n,!0)}function lb(n){for(rn=n.return;rn;)switch(rn.tag){case 5:case 31:case 13:fi=!1;return;case 27:case 3:fi=!0;return;default:rn=rn.return}}function Ds(n){if(n!==rn)return!1;if(!Ze)return lb(n),Ze=!0,!1;var a=n.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||Uh(n.type,n.memoizedProps)),s=!s),s&&_t&&za(n),lb(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));_t=Mx(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));_t=Mx(n)}else a===27?(a=_t,Za(n.type)?(n=Hh,Hh=null,_t=n):_t=a):_t=rn?hi(n.stateNode.nextSibling):null;return!0}function jr(){_t=rn=null,Ze=!1}function Sd(){var n=Ia;return n!==null&&(Dn===null?Dn=n:Dn.push.apply(Dn,n),Ia=null),n}function lo(n){Ia===null?Ia=[n]:Ia.push(n)}var _d=z(null),Ir=null,ra=null;function Ba(n,a,s){C(_d,a._currentValue),a._currentValue=s}function sa(n){n._currentValue=_d.current,W(_d)}function wd(n,a,s){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===s)break;n=n.return}}function kd(n,a,s,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var b=p.dependencies;if(b!==null){var E=p.child;b=b.firstContext;e:for(;b!==null;){var N=b;b=p;for(var L=0;L<a.length;L++)if(N.context===a[L]){b.lanes|=s,N=b.alternate,N!==null&&(N.lanes|=s),wd(b.return,s,n),u||(E=null);break e}b=N.next}}else if(p.tag===18){if(E=p.return,E===null)throw Error(r(341));E.lanes|=s,b=E.alternate,b!==null&&(b.lanes|=s),wd(E,s,n),E=null}else E=p.child;if(E!==null)E.return=p;else for(E=p;E!==null;){if(E===n){E=null;break}if(p=E.sibling,p!==null){p.return=E.return,E=p;break}E=E.return}p=E}}function Ls(n,a,s,u){n=null;for(var p=a,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var E=p.alternate;if(E===null)throw Error(r(387));if(E=E.memoizedProps,E!==null){var N=p.type;Kn(p.pendingProps.value,E.value)||(n!==null?n.push(N):n=[N])}}else if(p===Pe.current){if(E=p.alternate,E===null)throw Error(r(387));E.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(jo):n=[jo])}p=p.return}n!==null&&kd(a,n,s,u),a.flags|=262144}function Kc(n){for(n=n.firstContext;n!==null;){if(!Kn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function zr(n){Ir=n,ra=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function sn(n){return ob(Ir,n)}function Gc(n,a){return Ir===null&&zr(n),ob(n,a)}function ob(n,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},ra===null){if(n===null)throw Error(r(308));ra=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ra=ra.next=a;return s}var yw=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(s,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(s){return s()})}},xw=e.unstable_scheduleCallback,vw=e.unstable_NormalPriority,Gt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nd(){return{controller:new yw,data:new Map,refCount:0}}function oo(n){n.refCount--,n.refCount===0&&xw(vw,function(){n.controller.abort()})}var co=null,Td=0,js=0,Is=null;function Ew(n,a){if(co===null){var s=co=[];Td=0,js=Oh(),Is={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Td++,a.then(cb,cb),a}function cb(){if(--Td===0&&co!==null){Is!==null&&(Is.status="fulfilled");var n=co;co=null,js=0,Is=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function Sw(n,a){var s=[],u={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<s.length;p++)(0,s[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),u}var ub=K.S;K.S=function(n,a){Yy=Ot(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Ew(n,a),ub!==null&&ub(n,a)};var Br=z(null);function Cd(){var n=Br.current;return n!==null?n:bt.pooledCache}function Yc(n,a){a===null?C(Br,Br.current):C(Br,a.pool)}function fb(){var n=Cd();return n===null?null:{parent:Gt._currentValue,pool:n}}var zs=Error(r(460)),Ad=Error(r(474)),Qc=Error(r(542)),Vc={then:function(){}};function db(n){return n=n.status,n==="fulfilled"||n==="rejected"}function hb(n,a,s){switch(s=n[s],s===void 0?n.push(a):s!==a&&(a.then(de,de),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,mb(n),n;default:if(typeof a.status=="string")a.then(de,de);else{if(n=bt,n!==null&&100<n.shellSuspendCounter)throw Error(r(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,mb(n),n}throw Fr=a,zs}}function Ur(n){try{var a=n._init;return a(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Fr=s,zs):s}}var Fr=null;function pb(){if(Fr===null)throw Error(r(459));var n=Fr;return Fr=null,n}function mb(n){if(n===zs||n===Qc)throw Error(r(483))}var Bs=null,uo=0;function Xc(n){var a=uo;return uo+=1,Bs===null&&(Bs=[]),hb(Bs,n,a)}function fo(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function Zc(n,a){throw a.$$typeof===v?Error(r(525)):(n=Object.prototype.toString.call(a),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function gb(n){function a(H,F){if(n){var G=H.deletions;G===null?(H.deletions=[F],H.flags|=16):G.push(F)}}function s(H,F){if(!n)return null;for(;F!==null;)a(H,F),F=F.sibling;return null}function u(H){for(var F=new Map;H!==null;)H.key!==null?F.set(H.key,H):F.set(H.index,H),H=H.sibling;return F}function p(H,F){return H=ia(H,F),H.index=0,H.sibling=null,H}function b(H,F,G){return H.index=G,n?(G=H.alternate,G!==null?(G=G.index,G<F?(H.flags|=67108866,F):G):(H.flags|=67108866,F)):(H.flags|=1048576,F)}function E(H){return n&&H.alternate===null&&(H.flags|=67108866),H}function N(H,F,G,ie){return F===null||F.tag!==6?(F=bd(G,H.mode,ie),F.return=H,F):(F=p(F,G),F.return=H,F)}function L(H,F,G,ie){var Ne=G.type;return Ne===_?te(H,F,G.props.children,ie,G.key):F!==null&&(F.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===j&&Ur(Ne)===F.type)?(F=p(F,G.props),fo(F,G),F.return=H,F):(F=qc(G.type,G.key,G.props,null,H.mode,ie),fo(F,G),F.return=H,F)}function Y(H,F,G,ie){return F===null||F.tag!==4||F.stateNode.containerInfo!==G.containerInfo||F.stateNode.implementation!==G.implementation?(F=yd(G,H.mode,ie),F.return=H,F):(F=p(F,G.children||[]),F.return=H,F)}function te(H,F,G,ie,Ne){return F===null||F.tag!==7?(F=Lr(G,H.mode,ie,Ne),F.return=H,F):(F=p(F,G),F.return=H,F)}function re(H,F,G){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=bd(""+F,H.mode,G),F.return=H,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case x:return G=qc(F.type,F.key,F.props,null,H.mode,G),fo(G,F),G.return=H,G;case S:return F=yd(F,H.mode,G),F.return=H,F;case j:return F=Ur(F),re(H,F,G)}if(J(F)||Q(F))return F=Lr(F,H.mode,G,null),F.return=H,F;if(typeof F.then=="function")return re(H,Xc(F),G);if(F.$$typeof===A)return re(H,Gc(H,F),G);Zc(H,F)}return null}function V(H,F,G,ie){var Ne=F!==null?F.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Ne!==null?null:N(H,F,""+G,ie);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case x:return G.key===Ne?L(H,F,G,ie):null;case S:return G.key===Ne?Y(H,F,G,ie):null;case j:return G=Ur(G),V(H,F,G,ie)}if(J(G)||Q(G))return Ne!==null?null:te(H,F,G,ie,null);if(typeof G.then=="function")return V(H,F,Xc(G),ie);if(G.$$typeof===A)return V(H,F,Gc(H,G),ie);Zc(H,G)}return null}function Z(H,F,G,ie,Ne){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return H=H.get(G)||null,N(F,H,""+ie,Ne);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:return H=H.get(ie.key===null?G:ie.key)||null,L(F,H,ie,Ne);case S:return H=H.get(ie.key===null?G:ie.key)||null,Y(F,H,ie,Ne);case j:return ie=Ur(ie),Z(H,F,G,ie,Ne)}if(J(ie)||Q(ie))return H=H.get(G)||null,te(F,H,ie,Ne,null);if(typeof ie.then=="function")return Z(H,F,G,Xc(ie),Ne);if(ie.$$typeof===A)return Z(H,F,G,Gc(F,ie),Ne);Zc(F,ie)}return null}function be(H,F,G,ie){for(var Ne=null,tt=null,Ee=F,Be=F=0,Ve=null;Ee!==null&&Be<G.length;Be++){Ee.index>Be?(Ve=Ee,Ee=null):Ve=Ee.sibling;var nt=V(H,Ee,G[Be],ie);if(nt===null){Ee===null&&(Ee=Ve);break}n&&Ee&&nt.alternate===null&&a(H,Ee),F=b(nt,F,Be),tt===null?Ne=nt:tt.sibling=nt,tt=nt,Ee=Ve}if(Be===G.length)return s(H,Ee),Ze&&aa(H,Be),Ne;if(Ee===null){for(;Be<G.length;Be++)Ee=re(H,G[Be],ie),Ee!==null&&(F=b(Ee,F,Be),tt===null?Ne=Ee:tt.sibling=Ee,tt=Ee);return Ze&&aa(H,Be),Ne}for(Ee=u(Ee);Be<G.length;Be++)Ve=Z(Ee,H,Be,G[Be],ie),Ve!==null&&(n&&Ve.alternate!==null&&Ee.delete(Ve.key===null?Be:Ve.key),F=b(Ve,F,Be),tt===null?Ne=Ve:tt.sibling=Ve,tt=Ve);return n&&Ee.forEach(function(nr){return a(H,nr)}),Ze&&aa(H,Be),Ne}function Ae(H,F,G,ie){if(G==null)throw Error(r(151));for(var Ne=null,tt=null,Ee=F,Be=F=0,Ve=null,nt=G.next();Ee!==null&&!nt.done;Be++,nt=G.next()){Ee.index>Be?(Ve=Ee,Ee=null):Ve=Ee.sibling;var nr=V(H,Ee,nt.value,ie);if(nr===null){Ee===null&&(Ee=Ve);break}n&&Ee&&nr.alternate===null&&a(H,Ee),F=b(nr,F,Be),tt===null?Ne=nr:tt.sibling=nr,tt=nr,Ee=Ve}if(nt.done)return s(H,Ee),Ze&&aa(H,Be),Ne;if(Ee===null){for(;!nt.done;Be++,nt=G.next())nt=re(H,nt.value,ie),nt!==null&&(F=b(nt,F,Be),tt===null?Ne=nt:tt.sibling=nt,tt=nt);return Ze&&aa(H,Be),Ne}for(Ee=u(Ee);!nt.done;Be++,nt=G.next())nt=Z(Ee,H,Be,nt.value,ie),nt!==null&&(n&&nt.alternate!==null&&Ee.delete(nt.key===null?Be:nt.key),F=b(nt,F,Be),tt===null?Ne=nt:tt.sibling=nt,tt=nt);return n&&Ee.forEach(function(Dk){return a(H,Dk)}),Ze&&aa(H,Be),Ne}function pt(H,F,G,ie){if(typeof G=="object"&&G!==null&&G.type===_&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case x:e:{for(var Ne=G.key;F!==null;){if(F.key===Ne){if(Ne=G.type,Ne===_){if(F.tag===7){s(H,F.sibling),ie=p(F,G.props.children),ie.return=H,H=ie;break e}}else if(F.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===j&&Ur(Ne)===F.type){s(H,F.sibling),ie=p(F,G.props),fo(ie,G),ie.return=H,H=ie;break e}s(H,F);break}else a(H,F);F=F.sibling}G.type===_?(ie=Lr(G.props.children,H.mode,ie,G.key),ie.return=H,H=ie):(ie=qc(G.type,G.key,G.props,null,H.mode,ie),fo(ie,G),ie.return=H,H=ie)}return E(H);case S:e:{for(Ne=G.key;F!==null;){if(F.key===Ne)if(F.tag===4&&F.stateNode.containerInfo===G.containerInfo&&F.stateNode.implementation===G.implementation){s(H,F.sibling),ie=p(F,G.children||[]),ie.return=H,H=ie;break e}else{s(H,F);break}else a(H,F);F=F.sibling}ie=yd(G,H.mode,ie),ie.return=H,H=ie}return E(H);case j:return G=Ur(G),pt(H,F,G,ie)}if(J(G))return be(H,F,G,ie);if(Q(G)){if(Ne=Q(G),typeof Ne!="function")throw Error(r(150));return G=Ne.call(G),Ae(H,F,G,ie)}if(typeof G.then=="function")return pt(H,F,Xc(G),ie);if(G.$$typeof===A)return pt(H,F,Gc(H,G),ie);Zc(H,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,F!==null&&F.tag===6?(s(H,F.sibling),ie=p(F,G),ie.return=H,H=ie):(s(H,F),ie=bd(G,H.mode,ie),ie.return=H,H=ie),E(H)):s(H,F)}return function(H,F,G,ie){try{uo=0;var Ne=pt(H,F,G,ie);return Bs=null,Ne}catch(Ee){if(Ee===zs||Ee===Qc)throw Ee;var tt=Gn(29,Ee,null,H.mode);return tt.lanes=ie,tt.return=H,tt}finally{}}}var Pr=gb(!0),bb=gb(!1),Ua=!1;function Od(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rd(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Fa(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Pa(n,a,s){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(at&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=$c(n),eb(n,null,s),a}return Pc(n,u,a,s),$c(n)}function ho(n,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,s|=u,a.lanes=s,Re(n,s)}}function Md(n,a){var s=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var p=null,b=null;if(s=s.firstBaseUpdate,s!==null){do{var E={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};b===null?p=b=E:b=b.next=E,s=s.next}while(s!==null);b===null?p=b=a:b=b.next=a}else p=b=a;s={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=a:n.next=a,s.lastBaseUpdate=a}var Dd=!1;function po(){if(Dd){var n=Is;if(n!==null)throw n}}function mo(n,a,s,u){Dd=!1;var p=n.updateQueue;Ua=!1;var b=p.firstBaseUpdate,E=p.lastBaseUpdate,N=p.shared.pending;if(N!==null){p.shared.pending=null;var L=N,Y=L.next;L.next=null,E===null?b=Y:E.next=Y,E=L;var te=n.alternate;te!==null&&(te=te.updateQueue,N=te.lastBaseUpdate,N!==E&&(N===null?te.firstBaseUpdate=Y:N.next=Y,te.lastBaseUpdate=L))}if(b!==null){var re=p.baseState;E=0,te=Y=L=null,N=b;do{var V=N.lane&-536870913,Z=V!==N.lane;if(Z?(Qe&V)===V:(u&V)===V){V!==0&&V===js&&(Dd=!0),te!==null&&(te=te.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var be=n,Ae=N;V=a;var pt=s;switch(Ae.tag){case 1:if(be=Ae.payload,typeof be=="function"){re=be.call(pt,re,V);break e}re=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Ae.payload,V=typeof be=="function"?be.call(pt,re,V):be,V==null)break e;re=m({},re,V);break e;case 2:Ua=!0}}V=N.callback,V!==null&&(n.flags|=64,Z&&(n.flags|=8192),Z=p.callbacks,Z===null?p.callbacks=[V]:Z.push(V))}else Z={lane:V,tag:N.tag,payload:N.payload,callback:N.callback,next:null},te===null?(Y=te=Z,L=re):te=te.next=Z,E|=V;if(N=N.next,N===null){if(N=p.shared.pending,N===null)break;Z=N,N=Z.next,Z.next=null,p.lastBaseUpdate=Z,p.shared.pending=null}}while(!0);te===null&&(L=re),p.baseState=L,p.firstBaseUpdate=Y,p.lastBaseUpdate=te,b===null&&(p.shared.lanes=0),Ga|=E,n.lanes=E,n.memoizedState=re}}function yb(n,a){if(typeof n!="function")throw Error(r(191,n));n.call(a)}function xb(n,a){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)yb(s[n],a)}var Us=z(null),Wc=z(0);function vb(n,a){n=ma,C(Wc,n),C(Us,a),ma=n|a.baseLanes}function Ld(){C(Wc,ma),C(Us,Us.current)}function jd(){ma=Wc.current,W(Us),W(Wc)}var Yn=z(null),di=null;function $a(n){var a=n.alternate;C(Pt,Pt.current&1),C(Yn,n),di===null&&(a===null||Us.current!==null||a.memoizedState!==null)&&(di=n)}function Id(n){C(Pt,Pt.current),C(Yn,n),di===null&&(di=n)}function Eb(n){n.tag===22?(C(Pt,Pt.current),C(Yn,n),di===null&&(di=n)):qa()}function qa(){C(Pt,Pt.current),C(Yn,Yn.current)}function Qn(n){W(Yn),di===n&&(di=null),W(Pt)}var Pt=z(0);function Jc(n){for(var a=n;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||$h(s)||qh(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var la=0,ze=null,dt=null,Yt=null,eu=!1,Fs=!1,$r=!1,tu=0,go=0,Ps=null,_w=0;function jt(){throw Error(r(321))}function zd(n,a){if(a===null)return!1;for(var s=0;s<a.length&&s<n.length;s++)if(!Kn(n[s],a[s]))return!1;return!0}function Bd(n,a,s,u,p,b){return la=b,ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,K.H=n===null||n.memoizedState===null?ay:Jd,$r=!1,b=s(u,p),$r=!1,Fs&&(b=_b(a,s,u,p)),Sb(n),b}function Sb(n){K.H=xo;var a=dt!==null&&dt.next!==null;if(la=0,Yt=dt=ze=null,eu=!1,go=0,Ps=null,a)throw Error(r(300));n===null||Qt||(n=n.dependencies,n!==null&&Kc(n)&&(Qt=!0))}function _b(n,a,s,u){ze=n;var p=0;do{if(Fs&&(Ps=null),go=0,Fs=!1,25<=p)throw Error(r(301));if(p+=1,Yt=dt=null,n.updateQueue!=null){var b=n.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}K.H=ry,b=a(s,u)}while(Fs);return b}function ww(){var n=K.H,a=n.useState()[0];return a=typeof a.then=="function"?bo(a):a,n=n.useState()[0],(dt!==null?dt.memoizedState:null)!==n&&(ze.flags|=1024),a}function Ud(){var n=tu!==0;return tu=0,n}function Fd(n,a,s){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~s}function Pd(n){if(eu){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}eu=!1}la=0,Yt=dt=ze=null,Fs=!1,go=tu=0,Ps=null}function vn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?ze.memoizedState=Yt=n:Yt=Yt.next=n,Yt}function $t(){if(dt===null){var n=ze.alternate;n=n!==null?n.memoizedState:null}else n=dt.next;var a=Yt===null?ze.memoizedState:Yt.next;if(a!==null)Yt=a,dt=n;else{if(n===null)throw ze.alternate===null?Error(r(467)):Error(r(310));dt=n,n={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Yt===null?ze.memoizedState=Yt=n:Yt=Yt.next=n}return Yt}function nu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bo(n){var a=go;return go+=1,Ps===null&&(Ps=[]),n=hb(Ps,n,a),a=ze,(Yt===null?a.memoizedState:Yt.next)===null&&(a=a.alternate,K.H=a===null||a.memoizedState===null?ay:Jd),n}function iu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return bo(n);if(n.$$typeof===A)return sn(n)}throw Error(r(438,String(n)))}function $d(n){var a=null,s=ze.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var u=ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=nu(),ze.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(n),u=0;u<n;u++)s[u]=D;return a.index++,s}function oa(n,a){return typeof a=="function"?a(n):a}function au(n){var a=$t();return qd(a,dt,n)}function qd(n,a,s){var u=n.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=s;var p=n.baseQueue,b=u.pending;if(b!==null){if(p!==null){var E=p.next;p.next=b.next,b.next=E}a.baseQueue=p=b,u.pending=null}if(b=n.baseState,p===null)n.memoizedState=b;else{a=p.next;var N=E=null,L=null,Y=a,te=!1;do{var re=Y.lane&-536870913;if(re!==Y.lane?(Qe&re)===re:(la&re)===re){var V=Y.revertLane;if(V===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),re===js&&(te=!0);else if((la&V)===V){Y=Y.next,V===js&&(te=!0);continue}else re={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},L===null?(N=L=re,E=b):L=L.next=re,ze.lanes|=V,Ga|=V;re=Y.action,$r&&s(b,re),b=Y.hasEagerState?Y.eagerState:s(b,re)}else V={lane:re,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},L===null?(N=L=V,E=b):L=L.next=V,ze.lanes|=re,Ga|=re;Y=Y.next}while(Y!==null&&Y!==a);if(L===null?E=b:L.next=N,!Kn(b,n.memoizedState)&&(Qt=!0,te&&(s=Is,s!==null)))throw s;n.memoizedState=b,n.baseState=E,n.baseQueue=L,u.lastRenderedState=b}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Hd(n){var a=$t(),s=a.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var u=s.dispatch,p=s.pending,b=a.memoizedState;if(p!==null){s.pending=null;var E=p=p.next;do b=n(b,E.action),E=E.next;while(E!==p);Kn(b,a.memoizedState)||(Qt=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),s.lastRenderedState=b}return[b,u]}function wb(n,a,s){var u=ze,p=$t(),b=Ze;if(b){if(s===void 0)throw Error(r(407));s=s()}else s=a();var E=!Kn((dt||p).memoizedState,s);if(E&&(p.memoizedState=s,Qt=!0),p=p.queue,Yd(Tb.bind(null,u,p,n),[n]),p.getSnapshot!==a||E||Yt!==null&&Yt.memoizedState.tag&1){if(u.flags|=2048,$s(9,{destroy:void 0},Nb.bind(null,u,p,s,a),null),bt===null)throw Error(r(349));b||(la&127)!==0||kb(u,a,s)}return s}function kb(n,a,s){n.flags|=16384,n={getSnapshot:a,value:s},a=ze.updateQueue,a===null?(a=nu(),ze.updateQueue=a,a.stores=[n]):(s=a.stores,s===null?a.stores=[n]:s.push(n))}function Nb(n,a,s,u){a.value=s,a.getSnapshot=u,Cb(a)&&Ab(n)}function Tb(n,a,s){return s(function(){Cb(a)&&Ab(n)})}function Cb(n){var a=n.getSnapshot;n=n.value;try{var s=a();return!Kn(n,s)}catch{return!0}}function Ab(n){var a=Dr(n,2);a!==null&&Ln(a,n,2)}function Kd(n){var a=vn();if(typeof n=="function"){var s=n;if(n=s(),$r){cn(!0);try{s()}finally{cn(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:n},a}function Ob(n,a,s,u){return n.baseState=s,qd(n,dt,typeof u=="function"?u:oa)}function kw(n,a,s,u,p){if(lu(n))throw Error(r(485));if(n=a.action,n!==null){var b={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){b.listeners.push(E)}};K.T!==null?s(!0):b.isTransition=!1,u(b),s=a.pending,s===null?(b.next=a.pending=b,Rb(a,b)):(b.next=s.next,a.pending=s.next=b)}}function Rb(n,a){var s=a.action,u=a.payload,p=n.state;if(a.isTransition){var b=K.T,E={};K.T=E;try{var N=s(p,u),L=K.S;L!==null&&L(E,N),Mb(n,a,N)}catch(Y){Gd(n,a,Y)}finally{b!==null&&E.types!==null&&(b.types=E.types),K.T=b}}else try{b=s(p,u),Mb(n,a,b)}catch(Y){Gd(n,a,Y)}}function Mb(n,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){Db(n,a,u)},function(u){return Gd(n,a,u)}):Db(n,a,s)}function Db(n,a,s){a.status="fulfilled",a.value=s,Lb(a),n.state=s,a=n.pending,a!==null&&(s=a.next,s===a?n.pending=null:(s=s.next,a.next=s,Rb(n,s)))}function Gd(n,a,s){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=s,Lb(a),a=a.next;while(a!==u)}n.action=null}function Lb(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function jb(n,a){return a}function Ib(n,a){if(Ze){var s=bt.formState;if(s!==null){e:{var u=ze;if(Ze){if(_t){t:{for(var p=_t,b=fi;p.nodeType!==8;){if(!b){p=null;break t}if(p=hi(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){_t=hi(p.nextSibling),u=p.data==="F!";break e}}za(u)}u=!1}u&&(a=s[0])}}return s=vn(),s.memoizedState=s.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jb,lastRenderedState:a},s.queue=u,s=ty.bind(null,ze,u),u.dispatch=s,u=Kd(!1),b=Wd.bind(null,ze,!1,u.queue),u=vn(),p={state:a,dispatch:null,action:n,pending:null},u.queue=p,s=kw.bind(null,ze,p,b,s),p.dispatch=s,u.memoizedState=n,[a,s,!1]}function zb(n){var a=$t();return Bb(a,dt,n)}function Bb(n,a,s){if(a=qd(n,a,jb)[0],n=au(oa)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=bo(a)}catch(E){throw E===zs?Qc:E}else u=a;a=$t();var p=a.queue,b=p.dispatch;return s!==a.memoizedState&&(ze.flags|=2048,$s(9,{destroy:void 0},Nw.bind(null,p,s),null)),[u,b,n]}function Nw(n,a){n.action=a}function Ub(n){var a=$t(),s=dt;if(s!==null)return Bb(a,s,n);$t(),a=a.memoizedState,s=$t();var u=s.queue.dispatch;return s.memoizedState=n,[a,u,!1]}function $s(n,a,s,u){return n={tag:n,create:s,deps:u,inst:a,next:null},a=ze.updateQueue,a===null&&(a=nu(),ze.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=n.next=n:(u=s.next,s.next=n,n.next=u,a.lastEffect=n),n}function Fb(){return $t().memoizedState}function ru(n,a,s,u){var p=vn();ze.flags|=n,p.memoizedState=$s(1|a,{destroy:void 0},s,u===void 0?null:u)}function su(n,a,s,u){var p=$t();u=u===void 0?null:u;var b=p.memoizedState.inst;dt!==null&&u!==null&&zd(u,dt.memoizedState.deps)?p.memoizedState=$s(a,b,s,u):(ze.flags|=n,p.memoizedState=$s(1|a,b,s,u))}function Pb(n,a){ru(8390656,8,n,a)}function Yd(n,a){su(2048,8,n,a)}function Tw(n){ze.flags|=4;var a=ze.updateQueue;if(a===null)a=nu(),ze.updateQueue=a,a.events=[n];else{var s=a.events;s===null?a.events=[n]:s.push(n)}}function $b(n){var a=$t().memoizedState;return Tw({ref:a,nextImpl:n}),function(){if((at&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function qb(n,a){return su(4,2,n,a)}function Hb(n,a){return su(4,4,n,a)}function Kb(n,a){if(typeof a=="function"){n=n();var s=a(n);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function Gb(n,a,s){s=s!=null?s.concat([n]):null,su(4,4,Kb.bind(null,a,n),s)}function Qd(){}function Yb(n,a){var s=$t();a=a===void 0?null:a;var u=s.memoizedState;return a!==null&&zd(a,u[1])?u[0]:(s.memoizedState=[n,a],n)}function Qb(n,a){var s=$t();a=a===void 0?null:a;var u=s.memoizedState;if(a!==null&&zd(a,u[1]))return u[0];if(u=n(),$r){cn(!0);try{n()}finally{cn(!1)}}return s.memoizedState=[u,a],u}function Vd(n,a,s){return s===void 0||(la&1073741824)!==0&&(Qe&261930)===0?n.memoizedState=a:(n.memoizedState=s,n=Vy(),ze.lanes|=n,Ga|=n,s)}function Vb(n,a,s,u){return Kn(s,a)?s:Us.current!==null?(n=Vd(n,s,u),Kn(n,a)||(Qt=!0),n):(la&42)===0||(la&1073741824)!==0&&(Qe&261930)===0?(Qt=!0,n.memoizedState=s):(n=Vy(),ze.lanes|=n,Ga|=n,a)}function Xb(n,a,s,u,p){var b=le.p;le.p=b!==0&&8>b?b:8;var E=K.T,N={};K.T=N,Wd(n,!1,a,s);try{var L=p(),Y=K.S;if(Y!==null&&Y(N,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var te=Sw(L,u);yo(n,a,te,Zn(n))}else yo(n,a,u,Zn(n))}catch(re){yo(n,a,{then:function(){},status:"rejected",reason:re},Zn())}finally{le.p=b,E!==null&&N.types!==null&&(E.types=N.types),K.T=E}}function Cw(){}function Xd(n,a,s,u){if(n.tag!==5)throw Error(r(476));var p=Zb(n).queue;Xb(n,p,a,ce,s===null?Cw:function(){return Wb(n),s(u)})}function Zb(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:ce},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:s},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function Wb(n){var a=Zb(n);a.next===null&&(a=n.alternate.memoizedState),yo(n,a.next.queue,{},Zn())}function Zd(){return sn(jo)}function Jb(){return $t().memoizedState}function ey(){return $t().memoizedState}function Aw(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var s=Zn();n=Fa(s);var u=Pa(a,n,s);u!==null&&(Ln(u,a,s),ho(u,a,s)),a={cache:Nd()},n.payload=a;return}a=a.return}}function Ow(n,a,s){var u=Zn();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},lu(n)?ny(a,s):(s=md(n,a,s,u),s!==null&&(Ln(s,n,u),iy(s,a,u)))}function ty(n,a,s){var u=Zn();yo(n,a,s,u)}function yo(n,a,s,u){var p={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(lu(n))ny(a,p);else{var b=n.alternate;if(n.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var E=a.lastRenderedState,N=b(E,s);if(p.hasEagerState=!0,p.eagerState=N,Kn(N,E))return Pc(n,a,p,0),bt===null&&Fc(),!1}catch{}finally{}if(s=md(n,a,p,u),s!==null)return Ln(s,n,u),iy(s,a,u),!0}return!1}function Wd(n,a,s,u){if(u={lane:2,revertLane:Oh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},lu(n)){if(a)throw Error(r(479))}else a=md(n,s,u,2),a!==null&&Ln(a,n,2)}function lu(n){var a=n.alternate;return n===ze||a!==null&&a===ze}function ny(n,a){Fs=eu=!0;var s=n.pending;s===null?a.next=a:(a.next=s.next,s.next=a),n.pending=a}function iy(n,a,s){if((s&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,s|=u,a.lanes=s,Re(n,s)}}var xo={readContext:sn,use:iu,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};xo.useEffectEvent=jt;var ay={readContext:sn,use:iu,useCallback:function(n,a){return vn().memoizedState=[n,a===void 0?null:a],n},useContext:sn,useEffect:Pb,useImperativeHandle:function(n,a,s){s=s!=null?s.concat([n]):null,ru(4194308,4,Kb.bind(null,a,n),s)},useLayoutEffect:function(n,a){return ru(4194308,4,n,a)},useInsertionEffect:function(n,a){ru(4,2,n,a)},useMemo:function(n,a){var s=vn();a=a===void 0?null:a;var u=n();if($r){cn(!0);try{n()}finally{cn(!1)}}return s.memoizedState=[u,a],u},useReducer:function(n,a,s){var u=vn();if(s!==void 0){var p=s(a);if($r){cn(!0);try{s(a)}finally{cn(!1)}}}else p=a;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=Ow.bind(null,ze,n),[u.memoizedState,n]},useRef:function(n){var a=vn();return n={current:n},a.memoizedState=n},useState:function(n){n=Kd(n);var a=n.queue,s=ty.bind(null,ze,a);return a.dispatch=s,[n.memoizedState,s]},useDebugValue:Qd,useDeferredValue:function(n,a){var s=vn();return Vd(s,n,a)},useTransition:function(){var n=Kd(!1);return n=Xb.bind(null,ze,n.queue,!0,!1),vn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,s){var u=ze,p=vn();if(Ze){if(s===void 0)throw Error(r(407));s=s()}else{if(s=a(),bt===null)throw Error(r(349));(Qe&127)!==0||kb(u,a,s)}p.memoizedState=s;var b={value:s,getSnapshot:a};return p.queue=b,Pb(Tb.bind(null,u,b,n),[n]),u.flags|=2048,$s(9,{destroy:void 0},Nb.bind(null,u,b,s,a),null),s},useId:function(){var n=vn(),a=bt.identifierPrefix;if(Ze){var s=Ui,u=Bi;s=(u&~(1<<32-lt(u)-1)).toString(32)+s,a="_"+a+"R_"+s,s=tu++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=_w++,a="_"+a+"r_"+s.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:Zd,useFormState:Ib,useActionState:Ib,useOptimistic:function(n){var a=vn();a.memoizedState=a.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Wd.bind(null,ze,!0,s),s.dispatch=a,[n,a]},useMemoCache:$d,useCacheRefresh:function(){return vn().memoizedState=Aw.bind(null,ze)},useEffectEvent:function(n){var a=vn(),s={impl:n};return a.memoizedState=s,function(){if((at&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},Jd={readContext:sn,use:iu,useCallback:Yb,useContext:sn,useEffect:Yd,useImperativeHandle:Gb,useInsertionEffect:qb,useLayoutEffect:Hb,useMemo:Qb,useReducer:au,useRef:Fb,useState:function(){return au(oa)},useDebugValue:Qd,useDeferredValue:function(n,a){var s=$t();return Vb(s,dt.memoizedState,n,a)},useTransition:function(){var n=au(oa)[0],a=$t().memoizedState;return[typeof n=="boolean"?n:bo(n),a]},useSyncExternalStore:wb,useId:Jb,useHostTransitionStatus:Zd,useFormState:zb,useActionState:zb,useOptimistic:function(n,a){var s=$t();return Ob(s,dt,n,a)},useMemoCache:$d,useCacheRefresh:ey};Jd.useEffectEvent=$b;var ry={readContext:sn,use:iu,useCallback:Yb,useContext:sn,useEffect:Yd,useImperativeHandle:Gb,useInsertionEffect:qb,useLayoutEffect:Hb,useMemo:Qb,useReducer:Hd,useRef:Fb,useState:function(){return Hd(oa)},useDebugValue:Qd,useDeferredValue:function(n,a){var s=$t();return dt===null?Vd(s,n,a):Vb(s,dt.memoizedState,n,a)},useTransition:function(){var n=Hd(oa)[0],a=$t().memoizedState;return[typeof n=="boolean"?n:bo(n),a]},useSyncExternalStore:wb,useId:Jb,useHostTransitionStatus:Zd,useFormState:Ub,useActionState:Ub,useOptimistic:function(n,a){var s=$t();return dt!==null?Ob(s,dt,n,a):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:$d,useCacheRefresh:ey};ry.useEffectEvent=$b;function eh(n,a,s,u){a=n.memoizedState,s=s(u,a),s=s==null?a:m({},a,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var th={enqueueSetState:function(n,a,s){n=n._reactInternals;var u=Zn(),p=Fa(u);p.payload=a,s!=null&&(p.callback=s),a=Pa(n,p,u),a!==null&&(Ln(a,n,u),ho(a,n,u))},enqueueReplaceState:function(n,a,s){n=n._reactInternals;var u=Zn(),p=Fa(u);p.tag=1,p.payload=a,s!=null&&(p.callback=s),a=Pa(n,p,u),a!==null&&(Ln(a,n,u),ho(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var s=Zn(),u=Fa(s);u.tag=2,a!=null&&(u.callback=a),a=Pa(n,u,s),a!==null&&(Ln(a,n,s),ho(a,n,s))}};function sy(n,a,s,u,p,b,E){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,b,E):a.prototype&&a.prototype.isPureReactComponent?!ao(s,u)||!ao(p,b):!0}function ly(n,a,s,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,u),a.state!==n&&th.enqueueReplaceState(a,a.state,null)}function qr(n,a){var s=a;if("ref"in a){s={};for(var u in a)u!=="ref"&&(s[u]=a[u])}if(n=n.defaultProps){s===a&&(s=m({},s));for(var p in n)s[p]===void 0&&(s[p]=n[p])}return s}function oy(n){Uc(n)}function cy(n){console.error(n)}function uy(n){Uc(n)}function ou(n,a){try{var s=n.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function fy(n,a,s){try{var u=n.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function nh(n,a,s){return s=Fa(s),s.tag=3,s.payload={element:null},s.callback=function(){ou(n,a)},s}function dy(n){return n=Fa(n),n.tag=3,n}function hy(n,a,s,u){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var b=u.value;n.payload=function(){return p(b)},n.callback=function(){fy(a,s,u)}}var E=s.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(n.callback=function(){fy(a,s,u),typeof p!="function"&&(Ya===null?Ya=new Set([this]):Ya.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})})}function Rw(n,a,s,u,p){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=s.alternate,a!==null&&Ls(a,s,p,!0),s=Yn.current,s!==null){switch(s.tag){case 31:case 13:return di===null?vu():s.alternate===null&&It===0&&(It=3),s.flags&=-257,s.flags|=65536,s.lanes=p,u===Vc?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([u]):a.add(u),Th(n,u,p)),!1;case 22:return s.flags|=65536,u===Vc?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([u]):s.add(u)),Th(n,u,p)),!1}throw Error(r(435,s.tag))}return Th(n,u,p),vu(),!1}if(Ze)return a=Yn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==Ed&&(n=Error(r(422),{cause:u}),lo(oi(n,s)))):(u!==Ed&&(a=Error(r(423),{cause:u}),lo(oi(a,s))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=oi(u,s),p=nh(n.stateNode,u,p),Md(n,p),It!==4&&(It=2)),!1;var b=Error(r(520),{cause:u});if(b=oi(b,s),To===null?To=[b]:To.push(b),It!==4&&(It=2),a===null)return!0;u=oi(u,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,n=p&-p,s.lanes|=n,n=nh(s.stateNode,u,n),Md(s,n),!1;case 1:if(a=s.type,b=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ya===null||!Ya.has(b))))return s.flags|=65536,p&=-p,s.lanes|=p,p=dy(p),hy(p,n,s,u),Md(s,p),!1}s=s.return}while(s!==null);return!1}var ih=Error(r(461)),Qt=!1;function ln(n,a,s,u){a.child=n===null?bb(a,null,s,u):Pr(a,n.child,s,u)}function py(n,a,s,u,p){s=s.render;var b=a.ref;if("ref"in u){var E={};for(var N in u)N!=="ref"&&(E[N]=u[N])}else E=u;return zr(a),u=Bd(n,a,s,E,b,p),N=Ud(),n!==null&&!Qt?(Fd(n,a,p),ca(n,a,p)):(Ze&&N&&xd(a),a.flags|=1,ln(n,a,u,p),a.child)}function my(n,a,s,u,p){if(n===null){var b=s.type;return typeof b=="function"&&!gd(b)&&b.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=b,gy(n,a,b,u,p)):(n=qc(s.type,null,u,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(b=n.child,!fh(n,p)){var E=b.memoizedProps;if(s=s.compare,s=s!==null?s:ao,s(E,u)&&n.ref===a.ref)return ca(n,a,p)}return a.flags|=1,n=ia(b,u),n.ref=a.ref,n.return=a,a.child=n}function gy(n,a,s,u,p){if(n!==null){var b=n.memoizedProps;if(ao(b,u)&&n.ref===a.ref)if(Qt=!1,a.pendingProps=u=b,fh(n,p))(n.flags&131072)!==0&&(Qt=!0);else return a.lanes=n.lanes,ca(n,a,p)}return ah(n,a,s,u,p)}function by(n,a,s,u){var p=u.children,b=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(b=b!==null?b.baseLanes|s:s,n!==null){for(u=a.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~b}else u=0,a.child=null;return yy(n,a,b,s,u)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&Yc(a,b!==null?b.cachePool:null),b!==null?vb(a,b):Ld(),Eb(a);else return u=a.lanes=536870912,yy(n,a,b!==null?b.baseLanes|s:s,s,u)}else b!==null?(Yc(a,b.cachePool),vb(a,b),qa(),a.memoizedState=null):(n!==null&&Yc(a,null),Ld(),qa());return ln(n,a,p,s),a.child}function vo(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function yy(n,a,s,u,p){var b=Cd();return b=b===null?null:{parent:Gt._currentValue,pool:b},a.memoizedState={baseLanes:s,cachePool:b},n!==null&&Yc(a,null),Ld(),Eb(a),n!==null&&Ls(n,a,u,!0),a.childLanes=p,null}function cu(n,a){return a=fu({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function xy(n,a,s){return Pr(a,n.child,null,s),n=cu(a,a.pendingProps),n.flags|=2,Qn(a),a.memoizedState=null,n}function Mw(n,a,s){var u=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(Ze){if(u.mode==="hidden")return n=cu(a,u),a.lanes=536870912,vo(null,n);if(Id(a),(n=_t)?(n=Rx(n,fi),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:ja!==null?{id:Bi,overflow:Ui}:null,retryLane:536870912,hydrationErrors:null},s=nb(n),s.return=a,a.child=s,rn=a,_t=null)):n=null,n===null)throw za(a);return a.lanes=536870912,null}return cu(a,u)}var b=n.memoizedState;if(b!==null){var E=b.dehydrated;if(Id(a),p)if(a.flags&256)a.flags&=-257,a=xy(n,a,s);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(r(558));else if(Qt||Ls(n,a,s,!1),p=(s&n.childLanes)!==0,Qt||p){if(u=bt,u!==null&&(E=Bt(u,s),E!==0&&E!==b.retryLane))throw b.retryLane=E,Dr(n,E),Ln(u,n,E),ih;vu(),a=xy(n,a,s)}else n=b.treeContext,_t=hi(E.nextSibling),rn=a,Ze=!0,Ia=null,fi=!1,n!==null&&rb(a,n),a=cu(a,u),a.flags|=4096;return a}return n=ia(n.child,{mode:u.mode,children:u.children}),n.ref=a.ref,a.child=n,n.return=a,n}function uu(n,a){var s=a.ref;if(s===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(n===null||n.ref!==s)&&(a.flags|=4194816)}}function ah(n,a,s,u,p){return zr(a),s=Bd(n,a,s,u,void 0,p),u=Ud(),n!==null&&!Qt?(Fd(n,a,p),ca(n,a,p)):(Ze&&u&&xd(a),a.flags|=1,ln(n,a,s,p),a.child)}function vy(n,a,s,u,p,b){return zr(a),a.updateQueue=null,s=_b(a,u,s,p),Sb(n),u=Ud(),n!==null&&!Qt?(Fd(n,a,b),ca(n,a,b)):(Ze&&u&&xd(a),a.flags|=1,ln(n,a,s,b),a.child)}function Ey(n,a,s,u,p){if(zr(a),a.stateNode===null){var b=Os,E=s.contextType;typeof E=="object"&&E!==null&&(b=sn(E)),b=new s(u,b),a.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=th,a.stateNode=b,b._reactInternals=a,b=a.stateNode,b.props=u,b.state=a.memoizedState,b.refs={},Od(a),E=s.contextType,b.context=typeof E=="object"&&E!==null?sn(E):Os,b.state=a.memoizedState,E=s.getDerivedStateFromProps,typeof E=="function"&&(eh(a,s,E,u),b.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(E=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),E!==b.state&&th.enqueueReplaceState(b,b.state,null),mo(a,u,b,p),po(),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){b=a.stateNode;var N=a.memoizedProps,L=qr(s,N);b.props=L;var Y=b.context,te=s.contextType;E=Os,typeof te=="object"&&te!==null&&(E=sn(te));var re=s.getDerivedStateFromProps;te=typeof re=="function"||typeof b.getSnapshotBeforeUpdate=="function",N=a.pendingProps!==N,te||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N||Y!==E)&&ly(a,b,u,E),Ua=!1;var V=a.memoizedState;b.state=V,mo(a,u,b,p),po(),Y=a.memoizedState,N||V!==Y||Ua?(typeof re=="function"&&(eh(a,s,re,u),Y=a.memoizedState),(L=Ua||sy(a,s,L,u,V,Y,E))?(te||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(a.flags|=4194308)):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=Y),b.props=u,b.state=Y,b.context=E,u=L):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{b=a.stateNode,Rd(n,a),E=a.memoizedProps,te=qr(s,E),b.props=te,re=a.pendingProps,V=b.context,Y=s.contextType,L=Os,typeof Y=="object"&&Y!==null&&(L=sn(Y)),N=s.getDerivedStateFromProps,(Y=typeof N=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==re||V!==L)&&ly(a,b,u,L),Ua=!1,V=a.memoizedState,b.state=V,mo(a,u,b,p),po();var Z=a.memoizedState;E!==re||V!==Z||Ua||n!==null&&n.dependencies!==null&&Kc(n.dependencies)?(typeof N=="function"&&(eh(a,s,N,u),Z=a.memoizedState),(te=Ua||sy(a,s,te,u,V,Z,L)||n!==null&&n.dependencies!==null&&Kc(n.dependencies))?(Y||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,Z,L),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,Z,L)),typeof b.componentDidUpdate=="function"&&(a.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===n.memoizedProps&&V===n.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===n.memoizedProps&&V===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=Z),b.props=u,b.state=Z,b.context=L,u=te):(typeof b.componentDidUpdate!="function"||E===n.memoizedProps&&V===n.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===n.memoizedProps&&V===n.memoizedState||(a.flags|=1024),u=!1)}return b=u,uu(n,a),u=(a.flags&128)!==0,b||u?(b=a.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:b.render(),a.flags|=1,n!==null&&u?(a.child=Pr(a,n.child,null,p),a.child=Pr(a,null,s,p)):ln(n,a,s,p),a.memoizedState=b.state,n=a.child):n=ca(n,a,p),n}function Sy(n,a,s,u){return jr(),a.flags|=256,ln(n,a,s,u),a.child}var rh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sh(n){return{baseLanes:n,cachePool:fb()}}function lh(n,a,s){return n=n!==null?n.childLanes&~s:0,a&&(n|=Xn),n}function _y(n,a,s){var u=a.pendingProps,p=!1,b=(a.flags&128)!==0,E;if((E=b)||(E=n!==null&&n.memoizedState===null?!1:(Pt.current&2)!==0),E&&(p=!0,a.flags&=-129),E=(a.flags&32)!==0,a.flags&=-33,n===null){if(Ze){if(p?$a(a):qa(),(n=_t)?(n=Rx(n,fi),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:ja!==null?{id:Bi,overflow:Ui}:null,retryLane:536870912,hydrationErrors:null},s=nb(n),s.return=a,a.child=s,rn=a,_t=null)):n=null,n===null)throw za(a);return qh(n)?a.lanes=32:a.lanes=536870912,null}var N=u.children;return u=u.fallback,p?(qa(),p=a.mode,N=fu({mode:"hidden",children:N},p),u=Lr(u,p,s,null),N.return=a,u.return=a,N.sibling=u,a.child=N,u=a.child,u.memoizedState=sh(s),u.childLanes=lh(n,E,s),a.memoizedState=rh,vo(null,u)):($a(a),oh(a,N))}var L=n.memoizedState;if(L!==null&&(N=L.dehydrated,N!==null)){if(b)a.flags&256?($a(a),a.flags&=-257,a=ch(n,a,s)):a.memoizedState!==null?(qa(),a.child=n.child,a.flags|=128,a=null):(qa(),N=u.fallback,p=a.mode,u=fu({mode:"visible",children:u.children},p),N=Lr(N,p,s,null),N.flags|=2,u.return=a,N.return=a,u.sibling=N,a.child=u,Pr(a,n.child,null,s),u=a.child,u.memoizedState=sh(s),u.childLanes=lh(n,E,s),a.memoizedState=rh,a=vo(null,u));else if($a(a),qh(N)){if(E=N.nextSibling&&N.nextSibling.dataset,E)var Y=E.dgst;E=Y,u=Error(r(419)),u.stack="",u.digest=E,lo({value:u,source:null,stack:null}),a=ch(n,a,s)}else if(Qt||Ls(n,a,s,!1),E=(s&n.childLanes)!==0,Qt||E){if(E=bt,E!==null&&(u=Bt(E,s),u!==0&&u!==L.retryLane))throw L.retryLane=u,Dr(n,u),Ln(E,n,u),ih;$h(N)||vu(),a=ch(n,a,s)}else $h(N)?(a.flags|=192,a.child=n.child,a=null):(n=L.treeContext,_t=hi(N.nextSibling),rn=a,Ze=!0,Ia=null,fi=!1,n!==null&&rb(a,n),a=oh(a,u.children),a.flags|=4096);return a}return p?(qa(),N=u.fallback,p=a.mode,L=n.child,Y=L.sibling,u=ia(L,{mode:"hidden",children:u.children}),u.subtreeFlags=L.subtreeFlags&65011712,Y!==null?N=ia(Y,N):(N=Lr(N,p,s,null),N.flags|=2),N.return=a,u.return=a,u.sibling=N,a.child=u,vo(null,u),u=a.child,N=n.child.memoizedState,N===null?N=sh(s):(p=N.cachePool,p!==null?(L=Gt._currentValue,p=p.parent!==L?{parent:L,pool:L}:p):p=fb(),N={baseLanes:N.baseLanes|s,cachePool:p}),u.memoizedState=N,u.childLanes=lh(n,E,s),a.memoizedState=rh,vo(n.child,u)):($a(a),s=n.child,n=s.sibling,s=ia(s,{mode:"visible",children:u.children}),s.return=a,s.sibling=null,n!==null&&(E=a.deletions,E===null?(a.deletions=[n],a.flags|=16):E.push(n)),a.child=s,a.memoizedState=null,s)}function oh(n,a){return a=fu({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function fu(n,a){return n=Gn(22,n,null,a),n.lanes=0,n}function ch(n,a,s){return Pr(a,n.child,null,s),n=oh(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function wy(n,a,s){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),wd(n.return,a,s)}function uh(n,a,s,u,p,b){var E=n.memoizedState;E===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:p,treeForkCount:b}:(E.isBackwards=a,E.rendering=null,E.renderingStartTime=0,E.last=u,E.tail=s,E.tailMode=p,E.treeForkCount=b)}function ky(n,a,s){var u=a.pendingProps,p=u.revealOrder,b=u.tail;u=u.children;var E=Pt.current,N=(E&2)!==0;if(N?(E=E&1|2,a.flags|=128):E&=1,C(Pt,E),ln(n,a,u,s),u=Ze?so:0,!N&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&wy(n,s,a);else if(n.tag===19)wy(n,s,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(s=a.child,p=null;s!==null;)n=s.alternate,n!==null&&Jc(n)===null&&(p=s),s=s.sibling;s=p,s===null?(p=a.child,a.child=null):(p=s.sibling,s.sibling=null),uh(a,!1,p,s,b,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&Jc(n)===null){a.child=p;break}n=p.sibling,p.sibling=s,s=p,p=n}uh(a,!0,s,null,b,u);break;case"together":uh(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function ca(n,a,s){if(n!==null&&(a.dependencies=n.dependencies),Ga|=a.lanes,(s&a.childLanes)===0)if(n!==null){if(Ls(n,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(r(153));if(a.child!==null){for(n=a.child,s=ia(n,n.pendingProps),a.child=s,s.return=a;n.sibling!==null;)n=n.sibling,s=s.sibling=ia(n,n.pendingProps),s.return=a;s.sibling=null}return a.child}function fh(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&Kc(n)))}function Dw(n,a,s){switch(a.tag){case 3:st(a,a.stateNode.containerInfo),Ba(a,Gt,n.memoizedState.cache),jr();break;case 27:case 5:Zt(a);break;case 4:st(a,a.stateNode.containerInfo);break;case 10:Ba(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Id(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?($a(a),a.flags|=128,null):(s&a.child.childLanes)!==0?_y(n,a,s):($a(a),n=ca(n,a,s),n!==null?n.sibling:null);$a(a);break;case 19:var p=(n.flags&128)!==0;if(u=(s&a.childLanes)!==0,u||(Ls(n,a,s,!1),u=(s&a.childLanes)!==0),p){if(u)return ky(n,a,s);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(Pt,Pt.current),u)break;return null;case 22:return a.lanes=0,by(n,a,s,a.pendingProps);case 24:Ba(a,Gt,n.memoizedState.cache)}return ca(n,a,s)}function Ny(n,a,s){if(n!==null)if(n.memoizedProps!==a.pendingProps)Qt=!0;else{if(!fh(n,s)&&(a.flags&128)===0)return Qt=!1,Dw(n,a,s);Qt=(n.flags&131072)!==0}else Qt=!1,Ze&&(a.flags&1048576)!==0&&ab(a,so,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(n=Ur(a.elementType),a.type=n,typeof n=="function")gd(n)?(u=qr(n,u),a.tag=1,a=Ey(null,a,n,u,s)):(a.tag=0,a=ah(null,a,n,u,s));else{if(n!=null){var p=n.$$typeof;if(p===I){a.tag=11,a=py(null,a,n,u,s);break e}else if(p===P){a.tag=14,a=my(null,a,n,u,s);break e}}throw a=ae(n)||n,Error(r(306,a,""))}}return a;case 0:return ah(n,a,a.type,a.pendingProps,s);case 1:return u=a.type,p=qr(u,a.pendingProps),Ey(n,a,u,p,s);case 3:e:{if(st(a,a.stateNode.containerInfo),n===null)throw Error(r(387));u=a.pendingProps;var b=a.memoizedState;p=b.element,Rd(n,a),mo(a,u,null,s);var E=a.memoizedState;if(u=E.cache,Ba(a,Gt,u),u!==b.cache&&kd(a,[Gt],s,!0),po(),u=E.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:E.cache},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){a=Sy(n,a,u,s);break e}else if(u!==p){p=oi(Error(r(424)),a),lo(p),a=Sy(n,a,u,s);break e}else{switch(n=a.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(_t=hi(n.firstChild),rn=a,Ze=!0,Ia=null,fi=!0,s=bb(a,null,u,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(jr(),u===p){a=ca(n,a,s);break e}ln(n,a,u,s)}a=a.child}return a;case 26:return uu(n,a),n===null?(s=zx(a.type,null,a.pendingProps,null))?a.memoizedState=s:Ze||(s=a.type,n=a.pendingProps,u=Tu(xe.current).createElement(s),u[Ut]=a,u[un]=n,on(u,s,n),Ht(u),a.stateNode=u):a.memoizedState=zx(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Zt(a),n===null&&Ze&&(u=a.stateNode=Lx(a.type,a.pendingProps,xe.current),rn=a,fi=!0,p=_t,Za(a.type)?(Hh=p,_t=hi(u.firstChild)):_t=p),ln(n,a,a.pendingProps.children,s),uu(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&Ze&&((p=u=_t)&&(u=ck(u,a.type,a.pendingProps,fi),u!==null?(a.stateNode=u,rn=a,_t=hi(u.firstChild),fi=!1,p=!0):p=!1),p||za(a)),Zt(a),p=a.type,b=a.pendingProps,E=n!==null?n.memoizedProps:null,u=b.children,Uh(p,b)?u=null:E!==null&&Uh(p,E)&&(a.flags|=32),a.memoizedState!==null&&(p=Bd(n,a,ww,null,null,s),jo._currentValue=p),uu(n,a),ln(n,a,u,s),a.child;case 6:return n===null&&Ze&&((n=s=_t)&&(s=uk(s,a.pendingProps,fi),s!==null?(a.stateNode=s,rn=a,_t=null,n=!0):n=!1),n||za(a)),null;case 13:return _y(n,a,s);case 4:return st(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=Pr(a,null,u,s):ln(n,a,u,s),a.child;case 11:return py(n,a,a.type,a.pendingProps,s);case 7:return ln(n,a,a.pendingProps,s),a.child;case 8:return ln(n,a,a.pendingProps.children,s),a.child;case 12:return ln(n,a,a.pendingProps.children,s),a.child;case 10:return u=a.pendingProps,Ba(a,a.type,u.value),ln(n,a,u.children,s),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,zr(a),p=sn(p),u=u(p),a.flags|=1,ln(n,a,u,s),a.child;case 14:return my(n,a,a.type,a.pendingProps,s);case 15:return gy(n,a,a.type,a.pendingProps,s);case 19:return ky(n,a,s);case 31:return Mw(n,a,s);case 22:return by(n,a,s,a.pendingProps);case 24:return zr(a),u=sn(Gt),n===null?(p=Cd(),p===null&&(p=bt,b=Nd(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=s),p=b),a.memoizedState={parent:u,cache:p},Od(a),Ba(a,Gt,p)):((n.lanes&s)!==0&&(Rd(n,a),mo(a,null,null,s),po()),p=n.memoizedState,b=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ba(a,Gt,u)):(u=b.cache,Ba(a,Gt,u),u!==p.cache&&kd(a,[Gt],s,!0))),ln(n,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function ua(n){n.flags|=4}function dh(n,a,s,u,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(Jy())n.flags|=8192;else throw Fr=Vc,Ad}else n.flags&=-16777217}function Ty(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!$x(a))if(Jy())n.flags|=8192;else throw Fr=Vc,Ad}function du(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?Me():536870912,n.lanes|=a,Gs|=a)}function Eo(n,a){if(!Ze)switch(n.tailMode){case"hidden":a=n.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function wt(n){var a=n.alternate!==null&&n.alternate.child===n.child,s=0,u=0;if(a)for(var p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=s,a}function Lw(n,a,s){var u=a.pendingProps;switch(vd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(a),null;case 1:return wt(a),null;case 3:return s=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),sa(Gt),it(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(Ds(a)?ua(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Sd())),wt(a),null;case 26:var p=a.type,b=a.memoizedState;return n===null?(ua(a),b!==null?(wt(a),Ty(a,b)):(wt(a),dh(a,p,null,u,s))):b?b!==n.memoizedState?(ua(a),wt(a),Ty(a,b)):(wt(a),a.flags&=-16777217):(n=n.memoizedProps,n!==u&&ua(a),wt(a),dh(a,p,n,u,s)),null;case 27:if(Pn(a),s=xe.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&ua(a);else{if(!u){if(a.stateNode===null)throw Error(r(166));return wt(a),null}n=he.current,Ds(a)?sb(a):(n=Lx(p,u,s),a.stateNode=n,ua(a))}return wt(a),null;case 5:if(Pn(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&ua(a);else{if(!u){if(a.stateNode===null)throw Error(r(166));return wt(a),null}if(b=he.current,Ds(a))sb(a);else{var E=Tu(xe.current);switch(b){case 1:b=E.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:b=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":b=E.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":b=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":b=E.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof u.is=="string"?E.createElement("select",{is:u.is}):E.createElement("select"),u.multiple?b.multiple=!0:u.size&&(b.size=u.size);break;default:b=typeof u.is=="string"?E.createElement(p,{is:u.is}):E.createElement(p)}}b[Ut]=a,b[un]=u;e:for(E=a.child;E!==null;){if(E.tag===5||E.tag===6)b.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===a)break e;for(;E.sibling===null;){if(E.return===null||E.return===a)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}a.stateNode=b;e:switch(on(b,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ua(a)}}return wt(a),dh(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,s),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&ua(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(r(166));if(n=xe.current,Ds(a)){if(n=a.stateNode,s=a.memoizedProps,u=null,p=rn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[Ut]=a,n=!!(n.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||_x(n.nodeValue,s)),n||za(a,!0)}else n=Tu(n).createTextNode(u),n[Ut]=a,a.stateNode=n}return wt(a),null;case 31:if(s=a.memoizedState,n===null||n.memoizedState!==null){if(u=Ds(a),s!==null){if(n===null){if(!u)throw Error(r(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(557));n[Ut]=a}else jr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;wt(a),n=!1}else s=Sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return a.flags&256?(Qn(a),a):(Qn(a),null);if((a.flags&128)!==0)throw Error(r(558))}return wt(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Ds(a),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(r(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[Ut]=a}else jr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;wt(a),p=!1}else p=Sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Qn(a),a):(Qn(a),null)}return Qn(a),(a.flags&128)!==0?(a.lanes=s,a):(s=u!==null,n=n!==null&&n.memoizedState!==null,s&&(u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==p&&(u.flags|=2048)),s!==n&&s&&(a.child.flags|=8192),du(a,a.updateQueue),wt(a),null);case 4:return it(),n===null&&Lh(a.stateNode.containerInfo),wt(a),null;case 10:return sa(a.type),wt(a),null;case 19:if(W(Pt),u=a.memoizedState,u===null)return wt(a),null;if(p=(a.flags&128)!==0,b=u.rendering,b===null)if(p)Eo(u,!1);else{if(It!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(b=Jc(n),b!==null){for(a.flags|=128,Eo(u,!1),n=b.updateQueue,a.updateQueue=n,du(a,n),a.subtreeFlags=0,n=s,s=a.child;s!==null;)tb(s,n),s=s.sibling;return C(Pt,Pt.current&1|2),Ze&&aa(a,u.treeForkCount),a.child}n=n.sibling}u.tail!==null&&Ot()>bu&&(a.flags|=128,p=!0,Eo(u,!1),a.lanes=4194304)}else{if(!p)if(n=Jc(b),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,du(a,n),Eo(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!Ze)return wt(a),null}else 2*Ot()-u.renderingStartTime>bu&&s!==536870912&&(a.flags|=128,p=!0,Eo(u,!1),a.lanes=4194304);u.isBackwards?(b.sibling=a.child,a.child=b):(n=u.last,n!==null?n.sibling=b:a.child=b,u.last=b)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Ot(),n.sibling=null,s=Pt.current,C(Pt,p?s&1|2:s&1),Ze&&aa(a,u.treeForkCount),n):(wt(a),null);case 22:case 23:return Qn(a),jd(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(s&536870912)!==0&&(a.flags&128)===0&&(wt(a),a.subtreeFlags&6&&(a.flags|=8192)):wt(a),s=a.updateQueue,s!==null&&du(a,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==s&&(a.flags|=2048),n!==null&&W(Br),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),sa(Gt),wt(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function jw(n,a){switch(vd(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return sa(Gt),it(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return Pn(a),null;case 31:if(a.memoizedState!==null){if(Qn(a),a.alternate===null)throw Error(r(340));jr()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(Qn(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(r(340));jr()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return W(Pt),null;case 4:return it(),null;case 10:return sa(a.type),null;case 22:case 23:return Qn(a),jd(),n!==null&&W(Br),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return sa(Gt),null;case 25:return null;default:return null}}function Cy(n,a){switch(vd(a),a.tag){case 3:sa(Gt),it();break;case 26:case 27:case 5:Pn(a);break;case 4:it();break;case 31:a.memoizedState!==null&&Qn(a);break;case 13:Qn(a);break;case 19:W(Pt);break;case 10:sa(a.type);break;case 22:case 23:Qn(a),jd(),n!==null&&W(Br);break;case 24:sa(Gt)}}function So(n,a){try{var s=a.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var p=u.next;s=p;do{if((s.tag&n)===n){u=void 0;var b=s.create,E=s.inst;u=b(),E.destroy=u}s=s.next}while(s!==p)}}catch(N){ft(a,a.return,N)}}function Ha(n,a,s){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&n)===n){var E=u.inst,N=E.destroy;if(N!==void 0){E.destroy=void 0,p=a;var L=s,Y=N;try{Y()}catch(te){ft(p,L,te)}}}u=u.next}while(u!==b)}}catch(te){ft(a,a.return,te)}}function Ay(n){var a=n.updateQueue;if(a!==null){var s=n.stateNode;try{xb(a,s)}catch(u){ft(n,n.return,u)}}}function Oy(n,a,s){s.props=qr(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(u){ft(n,a,u)}}function _o(n,a){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof s=="function"?n.refCleanup=s(u):s.current=u}}catch(p){ft(n,a,p)}}function Fi(n,a){var s=n.ref,u=n.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(p){ft(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){ft(n,a,p)}else s.current=null}function Ry(n){var a=n.type,s=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(p){ft(n,n.return,p)}}function hh(n,a,s){try{var u=n.stateNode;ik(u,n.type,s,a),u[un]=a}catch(p){ft(n,n.return,p)}}function My(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Za(n.type)||n.tag===4}function ph(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||My(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Za(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function mh(n,a,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(n),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=de));else if(u!==4&&(u===27&&Za(n.type)&&(s=n.stateNode,a=null),n=n.child,n!==null))for(mh(n,a,s),n=n.sibling;n!==null;)mh(n,a,s),n=n.sibling}function hu(n,a,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?s.insertBefore(n,a):s.appendChild(n);else if(u!==4&&(u===27&&Za(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(hu(n,a,s),n=n.sibling;n!==null;)hu(n,a,s),n=n.sibling}function Dy(n){var a=n.stateNode,s=n.memoizedProps;try{for(var u=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);on(a,u,s),a[Ut]=n,a[un]=s}catch(b){ft(n,n.return,b)}}var fa=!1,Vt=!1,gh=!1,Ly=typeof WeakSet=="function"?WeakSet:Set,en=null;function Iw(n,a){if(n=n.containerInfo,zh=Lu,n=Gg(n),cd(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var p=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{s.nodeType,b.nodeType}catch{s=null;break e}var E=0,N=-1,L=-1,Y=0,te=0,re=n,V=null;t:for(;;){for(var Z;re!==s||p!==0&&re.nodeType!==3||(N=E+p),re!==b||u!==0&&re.nodeType!==3||(L=E+u),re.nodeType===3&&(E+=re.nodeValue.length),(Z=re.firstChild)!==null;)V=re,re=Z;for(;;){if(re===n)break t;if(V===s&&++Y===p&&(N=E),V===b&&++te===u&&(L=E),(Z=re.nextSibling)!==null)break;re=V,V=re.parentNode}re=Z}s=N===-1||L===-1?null:{start:N,end:L}}else s=null}s=s||{start:0,end:0}}else s=null;for(Bh={focusedElem:n,selectionRange:s},Lu=!1,en=a;en!==null;)if(a=en,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,en=n;else for(;en!==null;){switch(a=en,b=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)p=n[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&b!==null){n=void 0,s=a,p=b.memoizedProps,b=b.memoizedState,u=s.stateNode;try{var be=qr(s.type,p);n=u.getSnapshotBeforeUpdate(be,b),u.__reactInternalSnapshotBeforeUpdate=n}catch(Ae){ft(s,s.return,Ae)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,s=n.nodeType,s===9)Ph(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Ph(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(r(163))}if(n=a.sibling,n!==null){n.return=a.return,en=n;break}en=a.return}}function jy(n,a,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:ha(n,s),u&4&&So(5,s);break;case 1:if(ha(n,s),u&4)if(n=s.stateNode,a===null)try{n.componentDidMount()}catch(E){ft(s,s.return,E)}else{var p=qr(s.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(E){ft(s,s.return,E)}}u&64&&Ay(s),u&512&&_o(s,s.return);break;case 3:if(ha(n,s),u&64&&(n=s.updateQueue,n!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{xb(n,a)}catch(E){ft(s,s.return,E)}}break;case 27:a===null&&u&4&&Dy(s);case 26:case 5:ha(n,s),a===null&&u&4&&Ry(s),u&512&&_o(s,s.return);break;case 12:ha(n,s);break;case 31:ha(n,s),u&4&&By(n,s);break;case 13:ha(n,s),u&4&&Uy(n,s),u&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=Kw.bind(null,s),fk(n,s))));break;case 22:if(u=s.memoizedState!==null||fa,!u){a=a!==null&&a.memoizedState!==null||Vt,p=fa;var b=Vt;fa=u,(Vt=a)&&!b?pa(n,s,(s.subtreeFlags&8772)!==0):ha(n,s),fa=p,Vt=b}break;case 30:break;default:ha(n,s)}}function Iy(n){var a=n.alternate;a!==null&&(n.alternate=null,Iy(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&Gl(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Tt=null,On=!1;function da(n,a,s){for(s=s.child;s!==null;)zy(n,a,s),s=s.sibling}function zy(n,a,s){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(nn,s)}catch{}switch(s.tag){case 26:Vt||Fi(s,a),da(n,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Vt||Fi(s,a);var u=Tt,p=On;Za(s.type)&&(Tt=s.stateNode,On=!1),da(n,a,s),Mo(s.stateNode),Tt=u,On=p;break;case 5:Vt||Fi(s,a);case 6:if(u=Tt,p=On,Tt=null,da(n,a,s),Tt=u,On=p,Tt!==null)if(On)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(s.stateNode)}catch(b){ft(s,a,b)}else try{Tt.removeChild(s.stateNode)}catch(b){ft(s,a,b)}break;case 18:Tt!==null&&(On?(n=Tt,Ax(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),el(n)):Ax(Tt,s.stateNode));break;case 4:u=Tt,p=On,Tt=s.stateNode.containerInfo,On=!0,da(n,a,s),Tt=u,On=p;break;case 0:case 11:case 14:case 15:Ha(2,s,a),Vt||Ha(4,s,a),da(n,a,s);break;case 1:Vt||(Fi(s,a),u=s.stateNode,typeof u.componentWillUnmount=="function"&&Oy(s,a,u)),da(n,a,s);break;case 21:da(n,a,s);break;case 22:Vt=(u=Vt)||s.memoizedState!==null,da(n,a,s),Vt=u;break;default:da(n,a,s)}}function By(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{el(n)}catch(s){ft(a,a.return,s)}}}function Uy(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{el(n)}catch(s){ft(a,a.return,s)}}function zw(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new Ly),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new Ly),a;default:throw Error(r(435,n.tag))}}function pu(n,a){var s=zw(n);a.forEach(function(u){if(!s.has(u)){s.add(u);var p=Gw.bind(null,n,u);u.then(p,p)}})}function Rn(n,a){var s=a.deletions;if(s!==null)for(var u=0;u<s.length;u++){var p=s[u],b=n,E=a,N=E;e:for(;N!==null;){switch(N.tag){case 27:if(Za(N.type)){Tt=N.stateNode,On=!1;break e}break;case 5:Tt=N.stateNode,On=!1;break e;case 3:case 4:Tt=N.stateNode.containerInfo,On=!0;break e}N=N.return}if(Tt===null)throw Error(r(160));zy(b,E,p),Tt=null,On=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Fy(a,n),a=a.sibling}var ki=null;function Fy(n,a){var s=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Rn(a,n),Mn(n),u&4&&(Ha(3,n,n.return),So(3,n),Ha(5,n,n.return));break;case 1:Rn(a,n),Mn(n),u&512&&(Vt||s===null||Fi(s,s.return)),u&64&&fa&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var p=ki;if(Rn(a,n),Mn(n),u&512&&(Vt||s===null||Fi(s,s.return)),u&4){var b=s!==null?s.memoizedState:null;if(u=n.memoizedState,s===null)if(u===null)if(n.stateNode===null){e:{u=n.type,s=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":b=p.getElementsByTagName("title")[0],(!b||b[Tr]||b[Ut]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(u),p.head.insertBefore(b,p.querySelector("head > title"))),on(b,u,s),b[Ut]=n,Ht(b),u=b;break e;case"link":var E=Fx("link","href",p).get(u+(s.href||""));if(E){for(var N=0;N<E.length;N++)if(b=E[N],b.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&b.getAttribute("rel")===(s.rel==null?null:s.rel)&&b.getAttribute("title")===(s.title==null?null:s.title)&&b.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){E.splice(N,1);break t}}b=p.createElement(u),on(b,u,s),p.head.appendChild(b);break;case"meta":if(E=Fx("meta","content",p).get(u+(s.content||""))){for(N=0;N<E.length;N++)if(b=E[N],b.getAttribute("content")===(s.content==null?null:""+s.content)&&b.getAttribute("name")===(s.name==null?null:s.name)&&b.getAttribute("property")===(s.property==null?null:s.property)&&b.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&b.getAttribute("charset")===(s.charSet==null?null:s.charSet)){E.splice(N,1);break t}}b=p.createElement(u),on(b,u,s),p.head.appendChild(b);break;default:throw Error(r(468,u))}b[Ut]=n,Ht(b),u=b}n.stateNode=u}else Px(p,n.type,n.stateNode);else n.stateNode=Ux(p,u,n.memoizedProps);else b!==u?(b===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):b.count--,u===null?Px(p,n.type,n.stateNode):Ux(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&hh(n,n.memoizedProps,s.memoizedProps)}break;case 27:Rn(a,n),Mn(n),u&512&&(Vt||s===null||Fi(s,s.return)),s!==null&&u&4&&hh(n,n.memoizedProps,s.memoizedProps);break;case 5:if(Rn(a,n),Mn(n),u&512&&(Vt||s===null||Fi(s,s.return)),n.flags&32){p=n.stateNode;try{Oe(p,"")}catch(be){ft(n,n.return,be)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,hh(n,p,s!==null?s.memoizedProps:p)),u&1024&&(gh=!0);break;case 6:if(Rn(a,n),Mn(n),u&4){if(n.stateNode===null)throw Error(r(162));u=n.memoizedProps,s=n.stateNode;try{s.nodeValue=u}catch(be){ft(n,n.return,be)}}break;case 3:if(Ou=null,p=ki,ki=Cu(a.containerInfo),Rn(a,n),ki=p,Mn(n),u&4&&s!==null&&s.memoizedState.isDehydrated)try{el(a.containerInfo)}catch(be){ft(n,n.return,be)}gh&&(gh=!1,Py(n));break;case 4:u=ki,ki=Cu(n.stateNode.containerInfo),Rn(a,n),Mn(n),ki=u;break;case 12:Rn(a,n),Mn(n);break;case 31:Rn(a,n),Mn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,pu(n,u)));break;case 13:Rn(a,n),Mn(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(gu=Ot()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,pu(n,u)));break;case 22:p=n.memoizedState!==null;var L=s!==null&&s.memoizedState!==null,Y=fa,te=Vt;if(fa=Y||p,Vt=te||L,Rn(a,n),Vt=te,fa=Y,Mn(n),u&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(s===null||L||fa||Vt||Hr(n)),s=null,a=n;;){if(a.tag===5||a.tag===26){if(s===null){L=s=a;try{if(b=L.stateNode,p)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{N=L.stateNode;var re=L.memoizedProps.style,V=re!=null&&re.hasOwnProperty("display")?re.display:null;N.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(be){ft(L,L.return,be)}}}else if(a.tag===6){if(s===null){L=a;try{L.stateNode.nodeValue=p?"":L.memoizedProps}catch(be){ft(L,L.return,be)}}}else if(a.tag===18){if(s===null){L=a;try{var Z=L.stateNode;p?Ox(Z,!0):Ox(L.stateNode,!1)}catch(be){ft(L,L.return,be)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,pu(n,s))));break;case 19:Rn(a,n),Mn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,pu(n,u)));break;case 30:break;case 21:break;default:Rn(a,n),Mn(n)}}function Mn(n){var a=n.flags;if(a&2){try{for(var s,u=n.return;u!==null;){if(My(u)){s=u;break}u=u.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var p=s.stateNode,b=ph(n);hu(n,b,p);break;case 5:var E=s.stateNode;s.flags&32&&(Oe(E,""),s.flags&=-33);var N=ph(n);hu(n,N,E);break;case 3:case 4:var L=s.stateNode.containerInfo,Y=ph(n);mh(n,Y,L);break;default:throw Error(r(161))}}catch(te){ft(n,n.return,te)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function Py(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;Py(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function ha(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)jy(n,a.alternate,a),a=a.sibling}function Hr(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Ha(4,a,a.return),Hr(a);break;case 1:Fi(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&Oy(a,a.return,s),Hr(a);break;case 27:Mo(a.stateNode);case 26:case 5:Fi(a,a.return),Hr(a);break;case 22:a.memoizedState===null&&Hr(a);break;case 30:Hr(a);break;default:Hr(a)}n=n.sibling}}function pa(n,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=n,b=a,E=b.flags;switch(b.tag){case 0:case 11:case 15:pa(p,b,s),So(4,b);break;case 1:if(pa(p,b,s),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Y){ft(u,u.return,Y)}if(u=b,p=u.updateQueue,p!==null){var N=u.stateNode;try{var L=p.shared.hiddenCallbacks;if(L!==null)for(p.shared.hiddenCallbacks=null,p=0;p<L.length;p++)yb(L[p],N)}catch(Y){ft(u,u.return,Y)}}s&&E&64&&Ay(b),_o(b,b.return);break;case 27:Dy(b);case 26:case 5:pa(p,b,s),s&&u===null&&E&4&&Ry(b),_o(b,b.return);break;case 12:pa(p,b,s);break;case 31:pa(p,b,s),s&&E&4&&By(p,b);break;case 13:pa(p,b,s),s&&E&4&&Uy(p,b);break;case 22:b.memoizedState===null&&pa(p,b,s),_o(b,b.return);break;case 30:break;default:pa(p,b,s)}a=a.sibling}}function bh(n,a){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&oo(s))}function yh(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&oo(n))}function Ni(n,a,s,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)$y(n,a,s,u),a=a.sibling}function $y(n,a,s,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Ni(n,a,s,u),p&2048&&So(9,a);break;case 1:Ni(n,a,s,u);break;case 3:Ni(n,a,s,u),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&oo(n)));break;case 12:if(p&2048){Ni(n,a,s,u),n=a.stateNode;try{var b=a.memoizedProps,E=b.id,N=b.onPostCommit;typeof N=="function"&&N(E,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(L){ft(a,a.return,L)}}else Ni(n,a,s,u);break;case 31:Ni(n,a,s,u);break;case 13:Ni(n,a,s,u);break;case 23:break;case 22:b=a.stateNode,E=a.alternate,a.memoizedState!==null?b._visibility&2?Ni(n,a,s,u):wo(n,a):b._visibility&2?Ni(n,a,s,u):(b._visibility|=2,qs(n,a,s,u,(a.subtreeFlags&10256)!==0||!1)),p&2048&&bh(E,a);break;case 24:Ni(n,a,s,u),p&2048&&yh(a.alternate,a);break;default:Ni(n,a,s,u)}}function qs(n,a,s,u,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var b=n,E=a,N=s,L=u,Y=E.flags;switch(E.tag){case 0:case 11:case 15:qs(b,E,N,L,p),So(8,E);break;case 23:break;case 22:var te=E.stateNode;E.memoizedState!==null?te._visibility&2?qs(b,E,N,L,p):wo(b,E):(te._visibility|=2,qs(b,E,N,L,p)),p&&Y&2048&&bh(E.alternate,E);break;case 24:qs(b,E,N,L,p),p&&Y&2048&&yh(E.alternate,E);break;default:qs(b,E,N,L,p)}a=a.sibling}}function wo(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=n,u=a,p=u.flags;switch(u.tag){case 22:wo(s,u),p&2048&&bh(u.alternate,u);break;case 24:wo(s,u),p&2048&&yh(u.alternate,u);break;default:wo(s,u)}a=a.sibling}}var ko=8192;function Hs(n,a,s){if(n.subtreeFlags&ko)for(n=n.child;n!==null;)qy(n,a,s),n=n.sibling}function qy(n,a,s){switch(n.tag){case 26:Hs(n,a,s),n.flags&ko&&n.memoizedState!==null&&_k(s,ki,n.memoizedState,n.memoizedProps);break;case 5:Hs(n,a,s);break;case 3:case 4:var u=ki;ki=Cu(n.stateNode.containerInfo),Hs(n,a,s),ki=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=ko,ko=16777216,Hs(n,a,s),ko=u):Hs(n,a,s));break;default:Hs(n,a,s)}}function Hy(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function No(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];en=u,Gy(u,n)}Hy(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ky(n),n=n.sibling}function Ky(n){switch(n.tag){case 0:case 11:case 15:No(n),n.flags&2048&&Ha(9,n,n.return);break;case 3:No(n);break;case 12:No(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,mu(n)):No(n);break;default:No(n)}}function mu(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];en=u,Gy(u,n)}Hy(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Ha(8,a,a.return),mu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,mu(a));break;default:mu(a)}n=n.sibling}}function Gy(n,a){for(;en!==null;){var s=en;switch(s.tag){case 0:case 11:case 15:Ha(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:oo(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,en=u;else e:for(s=n;en!==null;){u=en;var p=u.sibling,b=u.return;if(Iy(u),u===s){en=null;break e}if(p!==null){p.return=b,en=p;break e}en=b}}}var Bw={getCacheForType:function(n){var a=sn(Gt),s=a.data.get(n);return s===void 0&&(s=n(),a.data.set(n,s)),s},cacheSignal:function(){return sn(Gt).controller.signal}},Uw=typeof WeakMap=="function"?WeakMap:Map,at=0,bt=null,He=null,Qe=0,ut=0,Vn=null,Ka=!1,Ks=!1,xh=!1,ma=0,It=0,Ga=0,Kr=0,vh=0,Xn=0,Gs=0,To=null,Dn=null,Eh=!1,gu=0,Yy=0,bu=1/0,yu=null,Ya=null,Wt=0,Qa=null,Ys=null,ga=0,Sh=0,_h=null,Qy=null,Co=0,wh=null;function Zn(){return(at&2)!==0&&Qe!==0?Qe&-Qe:K.T!==null?Oh():xs()}function Vy(){if(Xn===0)if((Qe&536870912)===0||Ze){var n=ys;ys<<=1,(ys&3932160)===0&&(ys=262144),Xn=n}else Xn=536870912;return n=Yn.current,n!==null&&(n.flags|=32),Xn}function Ln(n,a,s){(n===bt&&(ut===2||ut===9)||n.cancelPendingCommit!==null)&&(Qs(n,0),Va(n,Qe,Xn,!1)),gt(n,s),((at&2)===0||n!==bt)&&(n===bt&&((at&2)===0&&(Kr|=s),It===4&&Va(n,Qe,Xn,!1)),Pi(n))}function Xy(n,a,s){if((at&6)!==0)throw Error(r(327));var u=!s&&(a&127)===0&&(a&n.expiredLanes)===0||ne(n,a),p=u?$w(n,a):Nh(n,a,!0),b=u;do{if(p===0){Ks&&!u&&Va(n,a,0,!1);break}else{if(s=n.current.alternate,b&&!Fw(s)){p=Nh(n,a,!1),b=!1;continue}if(p===2){if(b=a,n.errorRecoveryDisabledLanes&b)var E=0;else E=n.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){a=E;e:{var N=n;p=To;var L=N.current.memoizedState.isDehydrated;if(L&&(Qs(N,E).flags|=256),E=Nh(N,E,!1),E!==2){if(xh&&!L){N.errorRecoveryDisabledLanes|=b,Kr|=b,p=4;break e}b=Dn,Dn=p,b!==null&&(Dn===null?Dn=b:Dn.push.apply(Dn,b))}p=E}if(b=!1,p!==2)continue}}if(p===1){Qs(n,0),Va(n,a,0,!0);break}e:{switch(u=n,b=p,b){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Va(u,a,Xn,!Ka);break e;case 2:Dn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(p=gu+300-Ot(),10<p)){if(Va(u,a,Xn,!Ka),U(u,0,!0)!==0)break e;ga=a,u.timeoutHandle=Tx(Zy.bind(null,u,s,Dn,yu,Eh,a,Xn,Kr,Gs,Ka,b,"Throttled",-0,0),p);break e}Zy(u,s,Dn,yu,Eh,a,Xn,Kr,Gs,Ka,b,null,-0,0)}}break}while(!0);Pi(n)}function Zy(n,a,s,u,p,b,E,N,L,Y,te,re,V,Z){if(n.timeoutHandle=-1,re=a.subtreeFlags,re&8192||(re&16785408)===16785408){re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:de},qy(a,b,re);var be=(b&62914560)===b?gu-Ot():(b&4194048)===b?Yy-Ot():0;if(be=wk(re,be),be!==null){ga=b,n.cancelPendingCommit=be(rx.bind(null,n,a,b,s,u,p,E,N,L,te,re,null,V,Z)),Va(n,b,E,!Y);return}}rx(n,a,b,s,u,p,E,N,L)}function Fw(n){for(var a=n;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var p=s[u],b=p.getSnapshot;p=p.value;try{if(!Kn(b(),p))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Va(n,a,s,u){a&=~vh,a&=~Kr,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var p=a;0<p;){var b=31-lt(p),E=1<<b;u[b]=-1,p&=~E}s!==0&&ge(n,s,a)}function xu(){return(at&6)===0?(Ao(0),!1):!0}function kh(){if(He!==null){if(ut===0)var n=He.return;else n=He,ra=Ir=null,Pd(n),Bs=null,uo=0,n=He;for(;n!==null;)Cy(n.alternate,n),n=n.return;He=null}}function Qs(n,a){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,sk(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),ga=0,kh(),bt=n,He=s=ia(n.current,null),Qe=a,ut=0,Vn=null,Ka=!1,Ks=ne(n,a),xh=!1,Gs=Xn=vh=Kr=Ga=It=0,Dn=To=null,Eh=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var p=31-lt(u),b=1<<p;a|=n[p],u&=~b}return ma=a,Fc(),s}function Wy(n,a){ze=null,K.H=xo,a===zs||a===Qc?(a=pb(),ut=3):a===Ad?(a=pb(),ut=4):ut=a===ih?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Vn=a,He===null&&(It=1,ou(n,oi(a,n.current)))}function Jy(){var n=Yn.current;return n===null?!0:(Qe&4194048)===Qe?di===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?n===di:!1}function ex(){var n=K.H;return K.H=xo,n===null?xo:n}function tx(){var n=K.A;return K.A=Bw,n}function vu(){It=4,Ka||(Qe&4194048)!==Qe&&Yn.current!==null||(Ks=!0),(Ga&134217727)===0&&(Kr&134217727)===0||bt===null||Va(bt,Qe,Xn,!1)}function Nh(n,a,s){var u=at;at|=2;var p=ex(),b=tx();(bt!==n||Qe!==a)&&(yu=null,Qs(n,a)),a=!1;var E=It;e:do try{if(ut!==0&&He!==null){var N=He,L=Vn;switch(ut){case 8:kh(),E=6;break e;case 3:case 2:case 9:case 6:Yn.current===null&&(a=!0);var Y=ut;if(ut=0,Vn=null,Vs(n,N,L,Y),s&&Ks){E=0;break e}break;default:Y=ut,ut=0,Vn=null,Vs(n,N,L,Y)}}Pw(),E=It;break}catch(te){Wy(n,te)}while(!0);return a&&n.shellSuspendCounter++,ra=Ir=null,at=u,K.H=p,K.A=b,He===null&&(bt=null,Qe=0,Fc()),E}function Pw(){for(;He!==null;)nx(He)}function $w(n,a){var s=at;at|=2;var u=ex(),p=tx();bt!==n||Qe!==a?(yu=null,bu=Ot()+500,Qs(n,a)):Ks=ne(n,a);e:do try{if(ut!==0&&He!==null){a=He;var b=Vn;t:switch(ut){case 1:ut=0,Vn=null,Vs(n,a,b,1);break;case 2:case 9:if(db(b)){ut=0,Vn=null,ix(a);break}a=function(){ut!==2&&ut!==9||bt!==n||(ut=7),Pi(n)},b.then(a,a);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:db(b)?(ut=0,Vn=null,ix(a)):(ut=0,Vn=null,Vs(n,a,b,7));break;case 5:var E=null;switch(He.tag){case 26:E=He.memoizedState;case 5:case 27:var N=He;if(E?$x(E):N.stateNode.complete){ut=0,Vn=null;var L=N.sibling;if(L!==null)He=L;else{var Y=N.return;Y!==null?(He=Y,Eu(Y)):He=null}break t}}ut=0,Vn=null,Vs(n,a,b,5);break;case 6:ut=0,Vn=null,Vs(n,a,b,6);break;case 8:kh(),It=6;break e;default:throw Error(r(462))}}qw();break}catch(te){Wy(n,te)}while(!0);return ra=Ir=null,K.H=u,K.A=p,at=s,He!==null?0:(bt=null,Qe=0,Fc(),It)}function qw(){for(;He!==null&&!Hl();)nx(He)}function nx(n){var a=Ny(n.alternate,n,ma);n.memoizedProps=n.pendingProps,a===null?Eu(n):He=a}function ix(n){var a=n,s=a.alternate;switch(a.tag){case 15:case 0:a=vy(s,a,a.pendingProps,a.type,void 0,Qe);break;case 11:a=vy(s,a,a.pendingProps,a.type.render,a.ref,Qe);break;case 5:Pd(a);default:Cy(s,a),a=He=tb(a,ma),a=Ny(s,a,ma)}n.memoizedProps=n.pendingProps,a===null?Eu(n):He=a}function Vs(n,a,s,u){ra=Ir=null,Pd(a),Bs=null,uo=0;var p=a.return;try{if(Rw(n,p,a,s,Qe)){It=1,ou(n,oi(s,n.current)),He=null;return}}catch(b){if(p!==null)throw He=p,b;It=1,ou(n,oi(s,n.current)),He=null;return}a.flags&32768?(Ze||u===1?n=!0:Ks||(Qe&536870912)!==0?n=!1:(Ka=n=!0,(u===2||u===9||u===3||u===6)&&(u=Yn.current,u!==null&&u.tag===13&&(u.flags|=16384))),ax(a,n)):Eu(a)}function Eu(n){var a=n;do{if((a.flags&32768)!==0){ax(a,Ka);return}n=a.return;var s=Lw(a.alternate,a,ma);if(s!==null){He=s;return}if(a=a.sibling,a!==null){He=a;return}He=a=n}while(a!==null);It===0&&(It=5)}function ax(n,a){do{var s=jw(n.alternate,n);if(s!==null){s.flags&=32767,He=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(n=n.sibling,n!==null)){He=n;return}He=n=s}while(n!==null);It=6,He=null}function rx(n,a,s,u,p,b,E,N,L){n.cancelPendingCommit=null;do Su();while(Wt!==0);if((at&6)!==0)throw Error(r(327));if(a!==null){if(a===n.current)throw Error(r(177));if(b=a.lanes|a.childLanes,b|=pd,ye(n,s,b,E,N,L),n===bt&&(He=bt=null,Qe=0),Ys=a,Qa=n,ga=s,Sh=b,_h=p,Qy=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Yw(Ce,function(){return ux(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=K.T,K.T=null,p=le.p,le.p=2,E=at,at|=4;try{Iw(n,a,s)}finally{at=E,le.p=p,K.T=u}}Wt=1,sx(),lx(),ox()}}function sx(){if(Wt===1){Wt=0;var n=Qa,a=Ys,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=K.T,K.T=null;var u=le.p;le.p=2;var p=at;at|=4;try{Fy(a,n);var b=Bh,E=Gg(n.containerInfo),N=b.focusedElem,L=b.selectionRange;if(E!==N&&N&&N.ownerDocument&&Kg(N.ownerDocument.documentElement,N)){if(L!==null&&cd(N)){var Y=L.start,te=L.end;if(te===void 0&&(te=Y),"selectionStart"in N)N.selectionStart=Y,N.selectionEnd=Math.min(te,N.value.length);else{var re=N.ownerDocument||document,V=re&&re.defaultView||window;if(V.getSelection){var Z=V.getSelection(),be=N.textContent.length,Ae=Math.min(L.start,be),pt=L.end===void 0?Ae:Math.min(L.end,be);!Z.extend&&Ae>pt&&(E=pt,pt=Ae,Ae=E);var H=Hg(N,Ae),F=Hg(N,pt);if(H&&F&&(Z.rangeCount!==1||Z.anchorNode!==H.node||Z.anchorOffset!==H.offset||Z.focusNode!==F.node||Z.focusOffset!==F.offset)){var G=re.createRange();G.setStart(H.node,H.offset),Z.removeAllRanges(),Ae>pt?(Z.addRange(G),Z.extend(F.node,F.offset)):(G.setEnd(F.node,F.offset),Z.addRange(G))}}}}for(re=[],Z=N;Z=Z.parentNode;)Z.nodeType===1&&re.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<re.length;N++){var ie=re[N];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Lu=!!zh,Bh=zh=null}finally{at=p,le.p=u,K.T=s}}n.current=a,Wt=2}}function lx(){if(Wt===2){Wt=0;var n=Qa,a=Ys,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=K.T,K.T=null;var u=le.p;le.p=2;var p=at;at|=4;try{jy(n,a.alternate,a)}finally{at=p,le.p=u,K.T=s}}Wt=3}}function ox(){if(Wt===4||Wt===3){Wt=0,gs();var n=Qa,a=Ys,s=ga,u=Qy;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Wt=5:(Wt=0,Ys=Qa=null,cx(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Ya=null),Wi(s),a=a.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(nn,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=K.T,p=le.p,le.p=2,K.T=null;try{for(var b=n.onRecoverableError,E=0;E<u.length;E++){var N=u[E];b(N.value,{componentStack:N.stack})}}finally{K.T=a,le.p=p}}(ga&3)!==0&&Su(),Pi(n),p=n.pendingLanes,(s&261930)!==0&&(p&42)!==0?n===wh?Co++:(Co=0,wh=n):Co=0,Ao(0)}}function cx(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,oo(a)))}function Su(){return sx(),lx(),ox(),ux()}function ux(){if(Wt!==5)return!1;var n=Qa,a=Sh;Sh=0;var s=Wi(ga),u=K.T,p=le.p;try{le.p=32>s?32:s,K.T=null,s=_h,_h=null;var b=Qa,E=ga;if(Wt=0,Ys=Qa=null,ga=0,(at&6)!==0)throw Error(r(331));var N=at;if(at|=4,Ky(b.current),$y(b,b.current,E,s),at=N,Ao(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(nn,b)}catch{}return!0}finally{le.p=p,K.T=u,cx(n,a)}}function fx(n,a,s){a=oi(s,a),a=nh(n.stateNode,a,2),n=Pa(n,a,2),n!==null&&(gt(n,2),Pi(n))}function ft(n,a,s){if(n.tag===3)fx(n,n,s);else for(;a!==null;){if(a.tag===3){fx(a,n,s);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ya===null||!Ya.has(u))){n=oi(s,n),s=dy(2),u=Pa(a,s,2),u!==null&&(hy(s,u,a,n),gt(u,2),Pi(u));break}}a=a.return}}function Th(n,a,s){var u=n.pingCache;if(u===null){u=n.pingCache=new Uw;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(s)||(xh=!0,p.add(s),n=Hw.bind(null,n,a,s),a.then(n,n))}function Hw(n,a,s){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,bt===n&&(Qe&s)===s&&(It===4||It===3&&(Qe&62914560)===Qe&&300>Ot()-gu?(at&2)===0&&Qs(n,0):vh|=s,Gs===Qe&&(Gs=0)),Pi(n)}function dx(n,a){a===0&&(a=Me()),n=Dr(n,a),n!==null&&(gt(n,a),Pi(n))}function Kw(n){var a=n.memoizedState,s=0;a!==null&&(s=a.retryLane),dx(n,s)}function Gw(n,a){var s=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(s=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(a),dx(n,s)}function Yw(n,a){return Zi(n,a)}var _u=null,Xs=null,Ch=!1,wu=!1,Ah=!1,Xa=0;function Pi(n){n!==Xs&&n.next===null&&(Xs===null?_u=Xs=n:Xs=Xs.next=n),wu=!0,Ch||(Ch=!0,Vw())}function Ao(n,a){if(!Ah&&wu){Ah=!0;do for(var s=!1,u=_u;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var b=0;else{var E=u.suspendedLanes,N=u.pingedLanes;b=(1<<31-lt(42|n)+1)-1,b&=p&~(E&~N),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(s=!0,gx(u,b))}else b=Qe,b=U(u,u===bt?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||ne(u,b)||(s=!0,gx(u,b));u=u.next}while(s);Ah=!1}}function Qw(){hx()}function hx(){wu=Ch=!1;var n=0;Xa!==0&&rk()&&(n=Xa);for(var a=Ot(),s=null,u=_u;u!==null;){var p=u.next,b=px(u,a);b===0?(u.next=null,s===null?_u=p:s.next=p,p===null&&(Xs=s)):(s=u,(n!==0||(b&3)!==0)&&(wu=!0)),u=p}Wt!==0&&Wt!==5||Ao(n),Xa!==0&&(Xa=0)}function px(n,a){for(var s=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,b=n.pendingLanes&-62914561;0<b;){var E=31-lt(b),N=1<<E,L=p[E];L===-1?((N&s)===0||(N&u)!==0)&&(p[E]=pe(N,a)):L<=a&&(n.expiredLanes|=N),b&=~N}if(a=bt,s=Qe,s=U(n,n===a?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,s===0||n===a&&(ut===2||ut===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&wr(u),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||ne(n,s)){if(a=s&-s,a===n.callbackPriority)return a;switch(u!==null&&wr(u),Wi(s)){case 2:case 8:s=fe;break;case 32:s=Ce;break;case 268435456:s=et;break;default:s=Ce}return u=mx.bind(null,n),s=Zi(s,u),n.callbackPriority=a,n.callbackNode=s,a}return u!==null&&u!==null&&wr(u),n.callbackPriority=2,n.callbackNode=null,2}function mx(n,a){if(Wt!==0&&Wt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(Su()&&n.callbackNode!==s)return null;var u=Qe;return u=U(n,n===bt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(Xy(n,u,a),px(n,Ot()),n.callbackNode!=null&&n.callbackNode===s?mx.bind(null,n):null)}function gx(n,a){if(Su())return null;Xy(n,a,!0)}function Vw(){lk(function(){(at&6)!==0?Zi(ee,Qw):hx()})}function Oh(){if(Xa===0){var n=js;n===0&&(n=kr,kr<<=1,(kr&261888)===0&&(kr=256)),Xa=n}return Xa}function bx(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Da(""+n)}function yx(n,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,n.id&&s.setAttribute("form",n.id),a.parentNode.insertBefore(s,a),n=new FormData(n),s.parentNode.removeChild(s),n}function Xw(n,a,s,u,p){if(a==="submit"&&s&&s.stateNode===p){var b=bx((p[un]||null).action),E=u.submitter;E&&(a=(a=E[un]||null)?bx(a.formAction):E.getAttribute("formAction"),a!==null&&(b=a,E=null));var N=new Ic("action","action",null,u,p);n.push({event:N,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Xa!==0){var L=E?yx(p,E):new FormData(p);Xd(s,{pending:!0,data:L,method:p.method,action:b},null,L)}}else typeof b=="function"&&(N.preventDefault(),L=E?yx(p,E):new FormData(p),Xd(s,{pending:!0,data:L,method:p.method,action:b},b,L))},currentTarget:p}]})}}for(var Rh=0;Rh<hd.length;Rh++){var Mh=hd[Rh],Zw=Mh.toLowerCase(),Ww=Mh[0].toUpperCase()+Mh.slice(1);wi(Zw,"on"+Ww)}wi(Vg,"onAnimationEnd"),wi(Xg,"onAnimationIteration"),wi(Zg,"onAnimationStart"),wi("dblclick","onDoubleClick"),wi("focusin","onFocus"),wi("focusout","onBlur"),wi(pw,"onTransitionRun"),wi(mw,"onTransitionStart"),wi(gw,"onTransitionCancel"),wi(Wg,"onTransitionEnd"),oe("onMouseEnter",["mouseout","mouseover"]),oe("onMouseLeave",["mouseout","mouseover"]),oe("onPointerEnter",["pointerout","pointerover"]),oe("onPointerLeave",["pointerout","pointerover"]),ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oo="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(" "),Jw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Oo));function xx(n,a){a=(a&4)!==0;for(var s=0;s<n.length;s++){var u=n[s],p=u.event;u=u.listeners;e:{var b=void 0;if(a)for(var E=u.length-1;0<=E;E--){var N=u[E],L=N.instance,Y=N.currentTarget;if(N=N.listener,L!==b&&p.isPropagationStopped())break e;b=N,p.currentTarget=Y;try{b(p)}catch(te){Uc(te)}p.currentTarget=null,b=L}else for(E=0;E<u.length;E++){if(N=u[E],L=N.instance,Y=N.currentTarget,N=N.listener,L!==b&&p.isPropagationStopped())break e;b=N,p.currentTarget=Y;try{b(p)}catch(te){Uc(te)}p.currentTarget=null,b=L}}}}function Ke(n,a){var s=a[Kl];s===void 0&&(s=a[Kl]=new Set);var u=n+"__bubble";s.has(u)||(vx(a,n,2,!1),s.add(u))}function Dh(n,a,s){var u=0;a&&(u|=4),vx(s,n,u,a)}var ku="_reactListening"+Math.random().toString(36).slice(2);function Lh(n){if(!n[ku]){n[ku]=!0,Cc.forEach(function(s){s!=="selectionchange"&&(Jw.has(s)||Dh(s,!1,n),Dh(s,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[ku]||(a[ku]=!0,Dh("selectionchange",!1,a))}}function vx(n,a,s,u){switch(Vx(a)){case 2:var p=Tk;break;case 8:p=Ck;break;default:p=Vh}s=p.bind(null,a,s,n),p=void 0,!ed||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(a,s,{capture:!0,passive:p}):n.addEventListener(a,s,!0):p!==void 0?n.addEventListener(a,s,{passive:p}):n.addEventListener(a,s,!1)}function jh(n,a,s,u,p){var b=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var E=u.tag;if(E===3||E===4){var N=u.stateNode.containerInfo;if(N===p)break;if(E===4)for(E=u.return;E!==null;){var L=E.tag;if((L===3||L===4)&&E.stateNode.containerInfo===p)return;E=E.return}for(;N!==null;){if(E=xn(N),E===null)return;if(L=E.tag,L===5||L===6||L===26||L===27){u=b=E;continue e}N=N.parentNode}}u=u.return}Mc(function(){var Y=b,te=Ie(s),re=[];e:{var V=Jg.get(n);if(V!==void 0){var Z=Ic,be=n;switch(n){case"keypress":if(Lc(s)===0)break e;case"keydown":case"keyup":Z=G_;break;case"focusin":be="focus",Z=ad;break;case"focusout":be="blur",Z=ad;break;case"beforeblur":case"afterblur":Z=ad;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=Cg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=L_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=V_;break;case Vg:case Xg:case Zg:Z=z_;break;case Wg:Z=Z_;break;case"scroll":case"scrollend":Z=M_;break;case"wheel":Z=J_;break;case"copy":case"cut":case"paste":Z=U_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=Og;break;case"toggle":case"beforetoggle":Z=tw}var Ae=(a&4)!==0,pt=!Ae&&(n==="scroll"||n==="scrollend"),H=Ae?V!==null?V+"Capture":null:V;Ae=[];for(var F=Y,G;F!==null;){var ie=F;if(G=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||G===null||H===null||(ie=Zl(F,H),ie!=null&&Ae.push(Ro(F,ie,G))),pt)break;F=F.return}0<Ae.length&&(V=new Z(V,be,null,s,te),re.push({event:V,listeners:Ae}))}}if((a&7)===0){e:{if(V=n==="mouseover"||n==="pointerover",Z=n==="mouseout"||n==="pointerout",V&&s!==ve&&(be=s.relatedTarget||s.fromElement)&&(xn(be)||be[Aa]))break e;if((Z||V)&&(V=te.window===te?te:(V=te.ownerDocument)?V.defaultView||V.parentWindow:window,Z?(be=s.relatedTarget||s.toElement,Z=Y,be=be?xn(be):null,be!==null&&(pt=o(be),Ae=be.tag,be!==pt||Ae!==5&&Ae!==27&&Ae!==6)&&(be=null)):(Z=null,be=Y),Z!==be)){if(Ae=Cg,ie="onMouseLeave",H="onMouseEnter",F="mouse",(n==="pointerout"||n==="pointerover")&&(Ae=Og,ie="onPointerLeave",H="onPointerEnter",F="pointer"),pt=Z==null?V:Oa(Z),G=be==null?V:Oa(be),V=new Ae(ie,F+"leave",Z,s,te),V.target=pt,V.relatedTarget=G,ie=null,xn(te)===Y&&(Ae=new Ae(H,F+"enter",be,s,te),Ae.target=G,Ae.relatedTarget=pt,ie=Ae),pt=ie,Z&&be)t:{for(Ae=ek,H=Z,F=be,G=0,ie=H;ie;ie=Ae(ie))G++;ie=0;for(var Ne=F;Ne;Ne=Ae(Ne))ie++;for(;0<G-ie;)H=Ae(H),G--;for(;0<ie-G;)F=Ae(F),ie--;for(;G--;){if(H===F||F!==null&&H===F.alternate){Ae=H;break t}H=Ae(H),F=Ae(F)}Ae=null}else Ae=null;Z!==null&&Ex(re,V,Z,Ae,!1),be!==null&&pt!==null&&Ex(re,pt,be,Ae,!0)}}e:{if(V=Y?Oa(Y):window,Z=V.nodeName&&V.nodeName.toLowerCase(),Z==="select"||Z==="input"&&V.type==="file")var tt=Bg;else if(Ig(V))if(Ug)tt=fw;else{tt=cw;var Ee=ow}else Z=V.nodeName,!Z||Z.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?Y&&Ma(Y.elementType)&&(tt=Bg):tt=uw;if(tt&&(tt=tt(n,Y))){zg(re,tt,s,te);break e}Ee&&Ee(n,V,Y),n==="focusout"&&Y&&V.type==="number"&&Y.memoizedProps.value!=null&&ws(V,"number",V.value)}switch(Ee=Y?Oa(Y):window,n){case"focusin":(Ig(Ee)||Ee.contentEditable==="true")&&(Ts=Ee,ud=Y,ro=null);break;case"focusout":ro=ud=Ts=null;break;case"mousedown":fd=!0;break;case"contextmenu":case"mouseup":case"dragend":fd=!1,Yg(re,s,te);break;case"selectionchange":if(hw)break;case"keydown":case"keyup":Yg(re,s,te)}var Be;if(sd)e:{switch(n){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Ns?Lg(n,s)&&(Ve="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Ve="onCompositionStart");Ve&&(Rg&&s.locale!=="ko"&&(Ns||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Ns&&(Be=Ng()):(La=te,td="value"in La?La.value:La.textContent,Ns=!0)),Ee=Nu(Y,Ve),0<Ee.length&&(Ve=new Ag(Ve,n,null,s,te),re.push({event:Ve,listeners:Ee}),Be?Ve.data=Be:(Be=jg(s),Be!==null&&(Ve.data=Be)))),(Be=iw?aw(n,s):rw(n,s))&&(Ve=Nu(Y,"onBeforeInput"),0<Ve.length&&(Ee=new Ag("onBeforeInput","beforeinput",null,s,te),re.push({event:Ee,listeners:Ve}),Ee.data=Be)),Xw(re,n,Y,s,te)}xx(re,a)})}function Ro(n,a,s){return{instance:n,listener:a,currentTarget:s}}function Nu(n,a){for(var s=a+"Capture",u=[];n!==null;){var p=n,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=Zl(n,s),p!=null&&u.unshift(Ro(n,p,b)),p=Zl(n,a),p!=null&&u.push(Ro(n,p,b))),n.tag===3)return u;n=n.return}return[]}function ek(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Ex(n,a,s,u,p){for(var b=a._reactName,E=[];s!==null&&s!==u;){var N=s,L=N.alternate,Y=N.stateNode;if(N=N.tag,L!==null&&L===u)break;N!==5&&N!==26&&N!==27||Y===null||(L=Y,p?(Y=Zl(s,b),Y!=null&&E.unshift(Ro(s,Y,L))):p||(Y=Zl(s,b),Y!=null&&E.push(Ro(s,Y,L)))),s=s.return}E.length!==0&&n.push({event:a,listeners:E})}var tk=/\r\n?/g,nk=/\u0000|\uFFFD/g;function Sx(n){return(typeof n=="string"?n:""+n).replace(tk,`
49
+ `).replace(nk,"")}function _x(n,a){return a=Sx(a),Sx(n)===a}function ht(n,a,s,u,p,b){switch(s){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Oe(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Oe(n,""+u);break;case"className":qn(n,"class",u);break;case"tabIndex":qn(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":qn(n,s,u);break;case"style":ct(n,u,b);break;case"data":if(a!=="object"){qn(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||s!=="href")){n.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Da(""+u),n.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(s,"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 b=="function"&&(s==="formAction"?(a!=="input"&&ht(n,a,"name",p.name,p,null),ht(n,a,"formEncType",p.formEncType,p,null),ht(n,a,"formMethod",p.formMethod,p,null),ht(n,a,"formTarget",p.formTarget,p,null)):(ht(n,a,"encType",p.encType,p,null),ht(n,a,"method",p.method,p,null),ht(n,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Da(""+u),n.setAttribute(s,u);break;case"onClick":u!=null&&(n.onclick=de);break;case"onScroll":u!=null&&Ke("scroll",n);break;case"onScrollEnd":u!=null&&Ke("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(r(60));n.innerHTML=s}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}s=Da(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,""+u):n.removeAttribute(s);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":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":u===!0?n.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,u):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(s,u):n.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(s):n.setAttribute(s,u);break;case"popover":Ke("beforetoggle",n),Ke("toggle",n),fn(n,"popover",u);break;case"xlinkActuate":Tn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Tn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Tn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Tn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Tn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Tn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Tn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Tn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Tn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":fn(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ta.get(s)||s,fn(n,s,u))}}function Ih(n,a,s,u,p,b){switch(s){case"style":ct(n,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(r(60));n.innerHTML=s}}break;case"children":typeof u=="string"?Oe(n,u):(typeof u=="number"||typeof u=="bigint")&&Oe(n,""+u);break;case"onScroll":u!=null&&Ke("scroll",n);break;case"onScrollEnd":u!=null&&Ke("scrollend",n);break;case"onClick":u!=null&&(n.onclick=de);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cr.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),a=s.slice(2,p?s.length-7:void 0),b=n[un]||null,b=b!=null?b[s]:null,typeof b=="function"&&n.removeEventListener(a,b,p),typeof u=="function")){typeof b!="function"&&b!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(a,u,p);break e}s in n?n[s]=u:u===!0?n.setAttribute(s,""):fn(n,s,u)}}}function on(n,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",n),Ke("load",n);var u=!1,p=!1,b;for(b in s)if(s.hasOwnProperty(b)){var E=s[b];if(E!=null)switch(b){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:ht(n,a,b,E,s,null)}}p&&ht(n,a,"srcSet",s.srcSet,s,null),u&&ht(n,a,"src",s.src,s,null);return;case"input":Ke("invalid",n);var N=b=E=p=null,L=null,Y=null;for(u in s)if(s.hasOwnProperty(u)){var te=s[u];if(te!=null)switch(u){case"name":p=te;break;case"type":E=te;break;case"checked":L=te;break;case"defaultChecked":Y=te;break;case"value":b=te;break;case"defaultValue":N=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,a));break;default:ht(n,a,u,te,s,null)}}Ar(n,b,N,L,Y,E,p,!1);return;case"select":Ke("invalid",n),u=E=b=null;for(p in s)if(s.hasOwnProperty(p)&&(N=s[p],N!=null))switch(p){case"value":b=N;break;case"defaultValue":E=N;break;case"multiple":u=N;default:ht(n,a,p,N,s,null)}a=b,s=E,n.multiple=!!u,a!=null?an(n,!!u,a,!1):s!=null&&an(n,!!u,s,!0);return;case"textarea":Ke("invalid",n),b=p=u=null;for(E in s)if(s.hasOwnProperty(E)&&(N=s[E],N!=null))switch(E){case"value":u=N;break;case"defaultValue":p=N;break;case"children":b=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:ht(n,a,E,N,s,null)}ks(n,u,p,b);return;case"option":for(L in s)if(s.hasOwnProperty(L)&&(u=s[L],u!=null))switch(L){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:ht(n,a,L,u,s,null)}return;case"dialog":Ke("beforetoggle",n),Ke("toggle",n),Ke("cancel",n),Ke("close",n);break;case"iframe":case"object":Ke("load",n);break;case"video":case"audio":for(u=0;u<Oo.length;u++)Ke(Oo[u],n);break;case"image":Ke("error",n),Ke("load",n);break;case"details":Ke("toggle",n);break;case"embed":case"source":case"link":Ke("error",n),Ke("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in s)if(s.hasOwnProperty(Y)&&(u=s[Y],u!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:ht(n,a,Y,u,s,null)}return;default:if(Ma(a)){for(te in s)s.hasOwnProperty(te)&&(u=s[te],u!==void 0&&Ih(n,a,te,u,s,void 0));return}}for(N in s)s.hasOwnProperty(N)&&(u=s[N],u!=null&&ht(n,a,N,u,s,null))}function ik(n,a,s,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,E=null,N=null,L=null,Y=null,te=null;for(Z in s){var re=s[Z];if(s.hasOwnProperty(Z)&&re!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":L=re;default:u.hasOwnProperty(Z)||ht(n,a,Z,null,u,re)}}for(var V in u){var Z=u[V];if(re=s[V],u.hasOwnProperty(V)&&(Z!=null||re!=null))switch(V){case"type":b=Z;break;case"name":p=Z;break;case"checked":Y=Z;break;case"defaultChecked":te=Z;break;case"value":E=Z;break;case"defaultValue":N=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,a));break;default:Z!==re&&ht(n,a,V,Z,u,re)}}Ql(n,E,N,L,Y,te,b,p);return;case"select":Z=E=N=V=null;for(b in s)if(L=s[b],s.hasOwnProperty(b)&&L!=null)switch(b){case"value":break;case"multiple":Z=L;default:u.hasOwnProperty(b)||ht(n,a,b,null,u,L)}for(p in u)if(b=u[p],L=s[p],u.hasOwnProperty(p)&&(b!=null||L!=null))switch(p){case"value":V=b;break;case"defaultValue":N=b;break;case"multiple":E=b;default:b!==L&&ht(n,a,p,b,u,L)}a=N,s=E,u=Z,V!=null?an(n,!!s,V,!1):!!u!=!!s&&(a!=null?an(n,!!s,a,!0):an(n,!!s,s?[]:"",!1));return;case"textarea":Z=V=null;for(N in s)if(p=s[N],s.hasOwnProperty(N)&&p!=null&&!u.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:ht(n,a,N,null,u,p)}for(E in u)if(p=u[E],b=s[E],u.hasOwnProperty(E)&&(p!=null||b!=null))switch(E){case"value":V=p;break;case"defaultValue":Z=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==b&&ht(n,a,E,p,u,b)}Oc(n,V,Z);return;case"option":for(var be in s)if(V=s[be],s.hasOwnProperty(be)&&V!=null&&!u.hasOwnProperty(be))switch(be){case"selected":n.selected=!1;break;default:ht(n,a,be,null,u,V)}for(L in u)if(V=u[L],Z=s[L],u.hasOwnProperty(L)&&V!==Z&&(V!=null||Z!=null))switch(L){case"selected":n.selected=V&&typeof V!="function"&&typeof V!="symbol";break;default:ht(n,a,L,V,u,Z)}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 Ae in s)V=s[Ae],s.hasOwnProperty(Ae)&&V!=null&&!u.hasOwnProperty(Ae)&&ht(n,a,Ae,null,u,V);for(Y in u)if(V=u[Y],Z=s[Y],u.hasOwnProperty(Y)&&V!==Z&&(V!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,a));break;default:ht(n,a,Y,V,u,Z)}return;default:if(Ma(a)){for(var pt in s)V=s[pt],s.hasOwnProperty(pt)&&V!==void 0&&!u.hasOwnProperty(pt)&&Ih(n,a,pt,void 0,u,V);for(te in u)V=u[te],Z=s[te],!u.hasOwnProperty(te)||V===Z||V===void 0&&Z===void 0||Ih(n,a,te,V,u,Z);return}}for(var H in s)V=s[H],s.hasOwnProperty(H)&&V!=null&&!u.hasOwnProperty(H)&&ht(n,a,H,null,u,V);for(re in u)V=u[re],Z=s[re],!u.hasOwnProperty(re)||V===Z||V==null&&Z==null||ht(n,a,re,V,u,Z)}function wx(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ak(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var p=s[u],b=p.transferSize,E=p.initiatorType,N=p.duration;if(b&&N&&wx(E)){for(E=0,N=p.responseEnd,u+=1;u<s.length;u++){var L=s[u],Y=L.startTime;if(Y>N)break;var te=L.transferSize,re=L.initiatorType;te&&wx(re)&&(L=L.responseEnd,E+=te*(L<N?1:(N-Y)/(L-Y)))}if(--u,a+=8*(b+E)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var zh=null,Bh=null;function Tu(n){return n.nodeType===9?n:n.ownerDocument}function kx(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Nx(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function Uh(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Fh=null;function rk(){var n=window.event;return n&&n.type==="popstate"?n===Fh?!1:(Fh=n,!0):(Fh=null,!1)}var Tx=typeof setTimeout=="function"?setTimeout:void 0,sk=typeof clearTimeout=="function"?clearTimeout:void 0,Cx=typeof Promise=="function"?Promise:void 0,lk=typeof queueMicrotask=="function"?queueMicrotask:typeof Cx<"u"?function(n){return Cx.resolve(null).then(n).catch(ok)}:Tx;function ok(n){setTimeout(function(){throw n})}function Za(n){return n==="head"}function Ax(n,a){var s=a,u=0;do{var p=s.nextSibling;if(n.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(u===0){n.removeChild(p),el(a);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Mo(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,Mo(s);for(var b=s.firstChild;b;){var E=b.nextSibling,N=b.nodeName;b[Tr]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&b.rel.toLowerCase()==="stylesheet"||s.removeChild(b),b=E}}else s==="body"&&Mo(n.ownerDocument.body);s=p}while(s);el(a)}function Ox(n,a){var s=n;n=0;do{var u=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=u}while(s)}function Ph(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Ph(s),Gl(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function ck(n,a,s,u){for(;n.nodeType===1;){var p=s;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Tr])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(b=n.getAttribute("rel"),b==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(b!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(b=n.getAttribute("src"),(b!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===b)return n}else return n;if(n=hi(n.nextSibling),n===null)break}return null}function uk(n,a,s){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=hi(n.nextSibling),n===null))return null;return n}function Rx(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=hi(n.nextSibling),n===null))return null;return n}function $h(n){return n.data==="$?"||n.data==="$~"}function qh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function fk(n,a){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||s.readyState!=="loading")a();else{var u=function(){a(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function hi(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var Hh=null;function Mx(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(a===0)return hi(n.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}n=n.nextSibling}return null}function Dx(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return n;a--}else s!=="/$"&&s!=="/&"||a++}n=n.previousSibling}return null}function Lx(n,a,s){switch(a=Tu(s),n){case"html":if(n=a.documentElement,!n)throw Error(r(452));return n;case"head":if(n=a.head,!n)throw Error(r(453));return n;case"body":if(n=a.body,!n)throw Error(r(454));return n;default:throw Error(r(451))}}function Mo(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);Gl(n)}var pi=new Map,jx=new Set;function Cu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ba=le.d;le.d={f:dk,r:hk,D:pk,C:mk,L:gk,m:bk,X:xk,S:yk,M:vk};function dk(){var n=ba.f(),a=xu();return n||a}function hk(n){var a=Ji(n);a!==null&&a.tag===5&&a.type==="form"?Wb(a):ba.r(n)}var Zs=typeof document>"u"?null:document;function Ix(n,a,s){var u=Zs;if(u&&typeof a=="string"&&a){var p=Cn(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),jx.has(p)||(jx.add(p),n={rel:n,crossOrigin:s,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),on(a,"link",n),Ht(a),u.head.appendChild(a)))}}function pk(n){ba.D(n),Ix("dns-prefetch",n,null)}function mk(n,a){ba.C(n,a),Ix("preconnect",n,a)}function gk(n,a,s){ba.L(n,a,s);var u=Zs;if(u&&n&&a){var p='link[rel="preload"][as="'+Cn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+Cn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+Cn(s.imageSizes)+'"]')):p+='[href="'+Cn(n)+'"]';var b=p;switch(a){case"style":b=Ws(n);break;case"script":b=Js(n)}pi.has(b)||(n=m({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:n,as:a},s),pi.set(b,n),u.querySelector(p)!==null||a==="style"&&u.querySelector(Do(b))||a==="script"&&u.querySelector(Lo(b))||(a=u.createElement("link"),on(a,"link",n),Ht(a),u.head.appendChild(a)))}}function bk(n,a){ba.m(n,a);var s=Zs;if(s&&n){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Cn(u)+'"][href="'+Cn(n)+'"]',b=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Js(n)}if(!pi.has(b)&&(n=m({rel:"modulepreload",href:n},a),pi.set(b,n),s.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Lo(b)))return}u=s.createElement("link"),on(u,"link",n),Ht(u),s.head.appendChild(u)}}}function yk(n,a,s){ba.S(n,a,s);var u=Zs;if(u&&n){var p=Ra(u).hoistableStyles,b=Ws(n);a=a||"default";var E=p.get(b);if(!E){var N={loading:0,preload:null};if(E=u.querySelector(Do(b)))N.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":a},s),(s=pi.get(b))&&Kh(n,s);var L=E=u.createElement("link");Ht(L),on(L,"link",n),L._p=new Promise(function(Y,te){L.onload=Y,L.onerror=te}),L.addEventListener("load",function(){N.loading|=1}),L.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Au(E,a,u)}E={type:"stylesheet",instance:E,count:1,state:N},p.set(b,E)}}}function xk(n,a){ba.X(n,a);var s=Zs;if(s&&n){var u=Ra(s).hoistableScripts,p=Js(n),b=u.get(p);b||(b=s.querySelector(Lo(p)),b||(n=m({src:n,async:!0},a),(a=pi.get(p))&&Gh(n,a),b=s.createElement("script"),Ht(b),on(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function vk(n,a){ba.M(n,a);var s=Zs;if(s&&n){var u=Ra(s).hoistableScripts,p=Js(n),b=u.get(p);b||(b=s.querySelector(Lo(p)),b||(n=m({src:n,async:!0,type:"module"},a),(a=pi.get(p))&&Gh(n,a),b=s.createElement("script"),Ht(b),on(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function zx(n,a,s,u){var p=(p=xe.current)?Cu(p):null;if(!p)throw Error(r(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=Ws(s.href),s=Ra(p).hoistableStyles,u=s.get(a),u||(u={type:"style",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=Ws(s.href);var b=Ra(p).hoistableStyles,E=b.get(n);if(E||(p=p.ownerDocument||p,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(n,E),(b=p.querySelector(Do(n)))&&!b._p&&(E.instance=b,E.state.loading=5),pi.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},pi.set(n,s),b||Ek(p,n,s,E.state))),a&&u===null)throw Error(r(528,""));return E}if(a&&u!==null)throw Error(r(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Js(s),s=Ra(p).hoistableScripts,u=s.get(a),u||(u={type:"script",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,n))}}function Ws(n){return'href="'+Cn(n)+'"'}function Do(n){return'link[rel="stylesheet"]['+n+"]"}function Bx(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function Ek(n,a,s,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),on(a,"link",s),Ht(a),n.head.appendChild(a))}function Js(n){return'[src="'+Cn(n)+'"]'}function Lo(n){return"script[async]"+n}function Ux(n,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+Cn(s.href)+'"]');if(u)return a.instance=u,Ht(u),u;var p=m({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ht(u),on(u,"style",p),Au(u,s.precedence,n),a.instance=u;case"stylesheet":p=Ws(s.href);var b=n.querySelector(Do(p));if(b)return a.state.loading|=4,a.instance=b,Ht(b),b;u=Bx(s),(p=pi.get(p))&&Kh(u,p),b=(n.ownerDocument||n).createElement("link"),Ht(b);var E=b;return E._p=new Promise(function(N,L){E.onload=N,E.onerror=L}),on(b,"link",u),a.state.loading|=4,Au(b,s.precedence,n),a.instance=b;case"script":return b=Js(s.src),(p=n.querySelector(Lo(b)))?(a.instance=p,Ht(p),p):(u=s,(p=pi.get(b))&&(u=m({},s),Gh(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),Ht(p),on(p,"link",u),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Au(u,s.precedence,n));return a.instance}function Au(n,a,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,b=p,E=0;E<u.length;E++){var N=u[E];if(N.dataset.precedence===a)b=N;else if(b!==p)break}b?b.parentNode.insertBefore(n,b.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(n,a.firstChild))}function Kh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Gh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var Ou=null;function Fx(n,a,s){if(Ou===null){var u=new Map,p=Ou=new Map;p.set(s,u)}else p=Ou,u=p.get(s),u||(u=new Map,p.set(s,u));if(u.has(n))return u;for(u.set(n,null),s=s.getElementsByTagName(n),p=0;p<s.length;p++){var b=s[p];if(!(b[Tr]||b[Ut]||n==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var E=b.getAttribute(a)||"";E=n+E;var N=u.get(E);N?N.push(b):u.set(E,[b])}}return u}function Px(n,a,s){n=n.ownerDocument||n,n.head.insertBefore(s,a==="title"?n.querySelector("head > title"):null)}function Sk(n,a,s){if(s===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return n=a.disabled,typeof a.precedence=="string"&&n==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function $x(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function _k(n,a,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Ws(u.href),b=a.querySelector(Do(p));if(b){a=b._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Ru.bind(n),a.then(n,n)),s.state.loading|=4,s.instance=b,Ht(b);return}b=a.ownerDocument||a,u=Bx(u),(p=pi.get(p))&&Kh(u,p),b=b.createElement("link"),Ht(b);var E=b;E._p=new Promise(function(N,L){E.onload=N,E.onerror=L}),on(b,"link",u),s.instance=b}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=Ru.bind(n),a.addEventListener("load",s),a.addEventListener("error",s))}}var Yh=0;function wk(n,a){return n.stylesheets&&n.count===0&&Du(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var u=setTimeout(function(){if(n.stylesheets&&Du(n,n.stylesheets),n.unsuspend){var b=n.unsuspend;n.unsuspend=null,b()}},6e4+a);0<n.imgBytes&&Yh===0&&(Yh=62500*ak());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Du(n,n.stylesheets),n.unsuspend)){var b=n.unsuspend;n.unsuspend=null,b()}},(n.imgBytes>Yh?50:800)+a);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Ru(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Du(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Mu=null;function Du(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Mu=new Map,a.forEach(kk,n),Mu=null,Ru.call(n))}function kk(n,a){if(!(a.state.loading&4)){var s=Mu.get(n);if(s)var u=s.get(null);else{s=new Map,Mu.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var E=p[b];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(s.set(E.dataset.precedence,E),u=E)}u&&s.set(null,u)}p=a.instance,E=p.getAttribute("data-precedence"),b=s.get(E)||u,b===u&&s.set(null,p),s.set(E,p),this.count++,u=Ru.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),b?b.parentNode.insertBefore(p,b.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var jo={$$typeof:A,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function Nk(n,a,s,u,p,b,E,N,L){this.tag=1,this.containerInfo=n,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=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function qx(n,a,s,u,p,b,E,N,L,Y,te,re){return n=new Nk(n,a,s,E,L,Y,te,re,N),a=1,b===!0&&(a|=24),b=Gn(3,null,null,a),n.current=b,b.stateNode=n,a=Nd(),a.refCount++,n.pooledCache=a,a.refCount++,b.memoizedState={element:u,isDehydrated:s,cache:a},Od(b),n}function Hx(n){return n?(n=Os,n):Os}function Kx(n,a,s,u,p,b){p=Hx(p),u.context===null?u.context=p:u.pendingContext=p,u=Fa(a),u.payload={element:s},b=b===void 0?null:b,b!==null&&(u.callback=b),s=Pa(n,u,a),s!==null&&(Ln(s,n,a),ho(s,n,a))}function Gx(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<a?s:a}}function Qh(n,a){Gx(n,a),(n=n.alternate)&&Gx(n,a)}function Yx(n){if(n.tag===13||n.tag===31){var a=Dr(n,67108864);a!==null&&Ln(a,n,67108864),Qh(n,67108864)}}function Qx(n){if(n.tag===13||n.tag===31){var a=Zn();a=Nt(a);var s=Dr(n,a);s!==null&&Ln(s,n,a),Qh(n,a)}}var Lu=!0;function Tk(n,a,s,u){var p=K.T;K.T=null;var b=le.p;try{le.p=2,Vh(n,a,s,u)}finally{le.p=b,K.T=p}}function Ck(n,a,s,u){var p=K.T;K.T=null;var b=le.p;try{le.p=8,Vh(n,a,s,u)}finally{le.p=b,K.T=p}}function Vh(n,a,s,u){if(Lu){var p=Xh(u);if(p===null)jh(n,a,u,ju,s),Xx(n,u);else if(Ok(p,n,a,s,u))u.stopPropagation();else if(Xx(n,u),a&4&&-1<Ak.indexOf(n)){for(;p!==null;){var b=Ji(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=Nn(b.pendingLanes);if(E!==0){var N=b;for(N.pendingLanes|=2,N.entangledLanes|=2;E;){var L=1<<31-lt(E);N.entanglements[1]|=L,E&=~L}Pi(b),(at&6)===0&&(bu=Ot()+500,Ao(0))}}break;case 31:case 13:N=Dr(b,2),N!==null&&Ln(N,b,2),xu(),Qh(b,2)}if(b=Xh(u),b===null&&jh(n,a,u,ju,s),b===p)break;p=b}p!==null&&u.stopPropagation()}else jh(n,a,u,null,s)}}function Xh(n){return n=Ie(n),Zh(n)}var ju=null;function Zh(n){if(ju=null,n=xn(n),n!==null){var a=o(n);if(a===null)n=null;else{var s=a.tag;if(s===13){if(n=c(a),n!==null)return n;n=null}else if(s===31){if(n=f(a),n!==null)return n;n=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return ju=n,null}function Vx(n){switch(n){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(bs()){case ee:return 2;case fe:return 8;case Ce:case $e:return 32;case et:return 268435456;default:return 32}default:return 32}}var Wh=!1,Wa=null,Ja=null,er=null,Io=new Map,zo=new Map,tr=[],Ak="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 Xx(n,a){switch(n){case"focusin":case"focusout":Wa=null;break;case"dragenter":case"dragleave":Ja=null;break;case"mouseover":case"mouseout":er=null;break;case"pointerover":case"pointerout":Io.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(a.pointerId)}}function Bo(n,a,s,u,p,b){return n===null||n.nativeEvent!==b?(n={blockedOn:a,domEventName:s,eventSystemFlags:u,nativeEvent:b,targetContainers:[p]},a!==null&&(a=Ji(a),a!==null&&Yx(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function Ok(n,a,s,u,p){switch(a){case"focusin":return Wa=Bo(Wa,n,a,s,u,p),!0;case"dragenter":return Ja=Bo(Ja,n,a,s,u,p),!0;case"mouseover":return er=Bo(er,n,a,s,u,p),!0;case"pointerover":var b=p.pointerId;return Io.set(b,Bo(Io.get(b)||null,n,a,s,u,p)),!0;case"gotpointercapture":return b=p.pointerId,zo.set(b,Bo(zo.get(b)||null,n,a,s,u,p)),!0}return!1}function Zx(n){var a=xn(n.target);if(a!==null){var s=o(a);if(s!==null){if(a=s.tag,a===13){if(a=c(s),a!==null){n.blockedOn=a,vs(n.priority,function(){Qx(s)});return}}else if(a===31){if(a=f(s),a!==null){n.blockedOn=a,vs(n.priority,function(){Qx(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Iu(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var s=Xh(n.nativeEvent);if(s===null){s=n.nativeEvent;var u=new s.constructor(s.type,s);ve=u,s.target.dispatchEvent(u),ve=null}else return a=Ji(s),a!==null&&Yx(a),n.blockedOn=s,!1;a.shift()}return!0}function Wx(n,a,s){Iu(n)&&s.delete(a)}function Rk(){Wh=!1,Wa!==null&&Iu(Wa)&&(Wa=null),Ja!==null&&Iu(Ja)&&(Ja=null),er!==null&&Iu(er)&&(er=null),Io.forEach(Wx),zo.forEach(Wx)}function zu(n,a){n.blockedOn===a&&(n.blockedOn=null,Wh||(Wh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Rk)))}var Bu=null;function Jx(n){Bu!==n&&(Bu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Bu===n&&(Bu=null);for(var a=0;a<n.length;a+=3){var s=n[a],u=n[a+1],p=n[a+2];if(typeof u!="function"){if(Zh(u||s)===null)continue;break}var b=Ji(s);b!==null&&(n.splice(a,3),a-=3,Xd(b,{pending:!0,data:p,method:s.method,action:u},u,p))}}))}function el(n){function a(L){return zu(L,n)}Wa!==null&&zu(Wa,n),Ja!==null&&zu(Ja,n),er!==null&&zu(er,n),Io.forEach(a),zo.forEach(a);for(var s=0;s<tr.length;s++){var u=tr[s];u.blockedOn===n&&(u.blockedOn=null)}for(;0<tr.length&&(s=tr[0],s.blockedOn===null);)Zx(s),s.blockedOn===null&&tr.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var p=s[u],b=s[u+1],E=p[un]||null;if(typeof b=="function")E||Jx(s);else if(E){var N=null;if(b&&b.hasAttribute("formAction")){if(p=b,E=b[un]||null)N=E.formAction;else if(Zh(p)!==null)continue}else N=E.action;typeof N=="function"?s[u+1]=N:(s.splice(u,3),u-=3),Jx(s)}}}function ev(){function n(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(E){return p=E})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function Jh(n){this._internalRoot=n}Uu.prototype.render=Jh.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(r(409));var s=a.current,u=Zn();Kx(s,u,n,a,null,null)},Uu.prototype.unmount=Jh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;Kx(n.current,2,null,n,null,null),xu(),a[Aa]=null}};function Uu(n){this._internalRoot=n}Uu.prototype.unstable_scheduleHydration=function(n){if(n){var a=xs();n={blockedOn:null,target:n,priority:a};for(var s=0;s<tr.length&&a!==0&&a<tr[s].priority;s++);tr.splice(s,0,n),s===0&&Zx(n)}};var tv=t.version;if(tv!=="19.2.5")throw Error(r(527,tv,"19.2.5"));le.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=h(a),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var Mk={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{nn=Fu.inject(Mk),Lt=Fu}catch{}}return Fo.createRoot=function(n,a){if(!l(n))throw Error(r(299));var s=!1,u="",p=oy,b=cy,E=uy;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError)),a=qx(n,1,!1,null,null,s,u,null,p,b,E,ev),n[Aa]=a.current,Lh(n),new Jh(a)},Fo.hydrateRoot=function(n,a,s){if(!l(n))throw Error(r(299));var u=!1,p="",b=oy,E=cy,N=uy,L=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(E=s.onCaughtError),s.onRecoverableError!==void 0&&(N=s.onRecoverableError),s.formState!==void 0&&(L=s.formState)),a=qx(n,1,!0,a,s??null,u,p,L,b,E,N,ev),a.context=Hx(null),s=a.current,u=Zn(),u=Nt(u),p=Fa(u),p.callback=null,Pa(s,p,u),s=u,a.current.lanes=s,gt(a,s),Pi(a),n[Aa]=a.current,Lh(n),new Uu(a)},Fo.version="19.2.5",Fo}var hv;function Hk(){if(hv)return ip.exports;hv=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(),ip.exports=qk(),ip.exports}var Kk=Hk(),Ol=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Jr,lr,ml,X0,Gk=(X0=class extends Ol{constructor(){super();we(this,Jr);we(this,lr);we(this,ml);me(this,ml,t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){B(this,lr)||this.setEventListener(B(this,ml))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,lr))==null||t.call(this),me(this,lr,void 0))}setEventListener(t){var i;me(this,ml,t),(i=B(this,lr))==null||i.call(this),me(this,lr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){B(this,Jr)!==t&&(me(this,Jr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){var t;return typeof B(this,Jr)=="boolean"?B(this,Jr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Jr=new WeakMap,lr=new WeakMap,ml=new WeakMap,X0),_m=new Gk,Yk={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},or,vm,Z0,Qk=(Z0=class{constructor(){we(this,or,Yk);we(this,vm,!1)}setTimeoutProvider(e){me(this,or,e)}setTimeout(e,t){return B(this,or).setTimeout(e,t)}clearTimeout(e){B(this,or).clearTimeout(e)}setInterval(e,t){return B(this,or).setInterval(e,t)}clearInterval(e){B(this,or).clearInterval(e)}},or=new WeakMap,vm=new WeakMap,Z0),Vr=new Qk;function Vk(e){setTimeout(e,0)}var Xk=typeof window>"u"||"Deno"in globalThis;function _n(){}function Zk(e,t){return typeof e=="function"?e(t):e}function Bp(e){return typeof e=="number"&&e>=0&&e!==1/0}function lE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gr(e,t){return typeof e=="function"?e(t):e}function gi(e,t){return typeof e=="function"?e(t):e}function pv(e,t){const{type:i="all",exact:r,fetchStatus:l,predicate:o,queryKey:c,stale:f}=e;if(c){if(r){if(t.queryHash!==wm(c,t.options))return!1}else if(!ec(t.queryKey,c))return!1}if(i!=="all"){const d=t.isActive();if(i==="active"&&!d||i==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||l&&l!==t.state.fetchStatus||o&&!o(t))}function mv(e,t){const{exact:i,status:r,predicate:l,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(i){if(os(t.options.mutationKey)!==os(o))return!1}else if(!ec(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||l&&!l(t))}function wm(e,t){return((t==null?void 0:t.queryKeyHashFn)||os)(e)}function os(e){return JSON.stringify(e,(t,i)=>Up(i)?Object.keys(i).sort().reduce((r,l)=>(r[l]=i[l],r),{}):i)}function ec(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(i=>ec(e[i],t[i])):!1}var Wk=Object.prototype.hasOwnProperty;function oE(e,t,i=0){if(e===t)return e;if(i>500)return t;const r=gv(e)&&gv(t);if(!r&&!(Up(e)&&Up(t)))return t;const o=(r?e:Object.keys(e)).length,c=r?t:Object.keys(t),f=c.length,d=r?new Array(f):{};let h=0;for(let y=0;y<f;y++){const m=r?y:c[y],v=e[m],x=t[m];if(v===x){d[m]=v,(r?y<o:Wk.call(e,m))&&h++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){d[m]=x;continue}const S=oE(v,x,i+1);d[m]=S,S===v&&h++}return o===f&&h===o?e:d}function pf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}function gv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Up(e){if(!bv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const i=t.prototype;return!(!bv(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function bv(e){return Object.prototype.toString.call(e)==="[object Object]"}function Jk(e){return new Promise(t=>{Vr.setTimeout(t,e)})}function Fp(e,t,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,t):i.structuralSharing!==!1?oE(e,t):t}function eN(e,t,i=0){const r=[...e,t];return i&&r.length>i?r.slice(1):r}function tN(e,t,i=0){const r=[t,...e];return i&&r.length>i?r.slice(0,-1):r}var km=Symbol();function cE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===km?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Nm(e,t){return typeof e=="function"?e(...t):!!e}function nN(e,t,i){let r=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??(l=t()),r||(r=!0,l.aborted?i():l.addEventListener("abort",i,{once:!0})),l)}),e}var tc=(()=>{let e=()=>Xk;return{isServer(){return e()},setIsServer(t){e=t}}})();function Pp(){let e,t;const i=new Promise((l,o)=>{e=l,t=o});i.status="pending",i.catch(()=>{});function r(l){Object.assign(i,l),delete i.resolve,delete i.reject}return i.resolve=l=>{r({status:"fulfilled",value:l}),e(l)},i.reject=l=>{r({status:"rejected",reason:l}),t(l)},i}var iN=Vk;function aN(){let e=[],t=0,i=f=>{f()},r=f=>{f()},l=iN;const o=f=>{t?e.push(f):l(()=>{i(f)})},c=()=>{const f=e;e=[],f.length&&l(()=>{r(()=>{f.forEach(d=>{i(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||c()}return d},batchCalls:f=>(...d)=>{o(()=>{f(...d)})},schedule:o,setNotifyFunction:f=>{i=f},setBatchNotifyFunction:f=>{r=f},setScheduler:f=>{l=f}}}var Jt=aN(),gl,cr,bl,W0,rN=(W0=class extends Ol{constructor(){super();we(this,gl,!0);we(this,cr);we(this,bl);me(this,bl,t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){B(this,cr)||this.setEventListener(B(this,bl))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,cr))==null||t.call(this),me(this,cr,void 0))}setEventListener(t){var i;me(this,bl,t),(i=B(this,cr))==null||i.call(this),me(this,cr,t(this.setOnline.bind(this)))}setOnline(t){B(this,gl)!==t&&(me(this,gl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return B(this,gl)}},gl=new WeakMap,cr=new WeakMap,bl=new WeakMap,W0),mf=new rN;function sN(e){return Math.min(1e3*2**e,3e4)}function uE(e){return(e??"online")==="online"?mf.isOnline():!0}var $p=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function fE(e){let t=!1,i=0,r;const l=Pp(),o=()=>l.status!=="pending",c=_=>{var w;if(!o()){const k=new $p(_);v(k),(w=e.onCancel)==null||w.call(e,k)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>_m.isFocused()&&(e.networkMode==="always"||mf.isOnline())&&e.canRun(),y=()=>uE(e.networkMode)&&e.canRun(),m=_=>{o()||(r==null||r(),l.resolve(_))},v=_=>{o()||(r==null||r(),l.reject(_))},x=()=>new Promise(_=>{var w;r=k=>{(o()||h())&&_(k)},(w=e.onPause)==null||w.call(e)}).then(()=>{var _;r=void 0,o()||(_=e.onContinue)==null||_.call(e)}),S=()=>{if(o())return;let _;const w=i===0?e.initialPromise:void 0;try{_=w??e.fn()}catch(k){_=Promise.reject(k)}Promise.resolve(_).then(m).catch(k=>{var T;if(o())return;const O=e.retry??(tc.isServer()?0:3),A=e.retryDelay??sN,I=typeof A=="function"?A(i,k):A,q=O===!0||typeof O=="number"&&i<O||typeof O=="function"&&O(i,k);if(t||!q){v(k);return}i++,(T=e.onFail)==null||T.call(e,i,k),Jk(I).then(()=>h()?void 0:x()).then(()=>{t?v(k):S()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(r==null||r(),l),cancelRetry:f,continueRetry:d,canStart:y,start:()=>(y()?S():x().then(S),l)}}var es,J0,dE=(J0=class{constructor(){we(this,es)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Bp(this.gcTime)&&me(this,es,Vr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(tc.isServer()?1/0:300*1e3))}clearGcTimeout(){B(this,es)!==void 0&&(Vr.clearTimeout(B(this,es)),me(this,es,void 0))}},es=new WeakMap,J0),ts,yl,mi,ns,tn,oc,is,Jn,hE,ya,eE,lN=(eE=class extends dE{constructor(t){super();we(this,Jn);we(this,ts);we(this,yl);we(this,mi);we(this,ns);we(this,tn);we(this,oc);we(this,is);me(this,is,!1),me(this,oc,t.defaultOptions),this.setOptions(t.options),this.observers=[],me(this,ns,t.client),me(this,mi,B(this,ns).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,me(this,ts,xv(this.options)),this.state=t.state??B(this,ts),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,tn))==null?void 0:t.promise}setOptions(t){if(this.options={...B(this,oc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=xv(this.options);i.data!==void 0&&(this.setState(yv(i.data,i.dataUpdatedAt)),me(this,ts,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(this,mi).remove(this)}setData(t,i){const r=Fp(this.state.data,t,this.options);return Ue(this,Jn,ya).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(t,i){Ue(this,Jn,ya).call(this,{type:"setState",state:t,setStateOptions:i})}cancel(t){var r,l;const i=(r=B(this,tn))==null?void 0:r.promise;return(l=B(this,tn))==null||l.cancel(t),i?i.then(_n).catch(_n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return B(this,ts)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>gi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===km||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>gr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!lE(this.state.dataUpdatedAt,t)}onFocus(){var i;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(i=B(this,tn))==null||i.continue()}onOnline(){var i;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(i=B(this,tn))==null||i.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(this,mi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(i=>i!==t),this.observers.length||(B(this,tn)&&(B(this,is)||Ue(this,Jn,hE).call(this)?B(this,tn).cancel({revert:!0}):B(this,tn).cancelRetry()),this.scheduleGc()),B(this,mi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,Jn,ya).call(this,{type:"invalidate"})}async fetch(t,i){var d,h,y,m,v,x,S,_,w,k,O,A;if(this.state.fetchStatus!=="idle"&&((d=B(this,tn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(B(this,tn))return B(this,tn).continueRetry(),B(this,tn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const I=this.observers.find(q=>q.options.queryFn);I&&this.setOptions(I.options)}const r=new AbortController,l=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(me(this,is,!0),r.signal)})},o=()=>{const I=cE(this.options,i),T=(()=>{const P={client:B(this,ns),queryKey:this.queryKey,meta:this.meta};return l(P),P})();return me(this,is,!1),this.options.persister?this.options.persister(I,T,this):I(T)},f=(()=>{const I={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:B(this,ns),state:this.state,fetchFn:o};return l(I),I})();(h=this.options.behavior)==null||h.onFetch(f,this),me(this,yl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=f.fetchOptions)==null?void 0:y.meta))&&Ue(this,Jn,ya).call(this,{type:"fetch",meta:(m=f.fetchOptions)==null?void 0:m.meta}),me(this,tn,fE({initialPromise:i==null?void 0:i.initialPromise,fn:f.fetchFn,onCancel:I=>{I instanceof $p&&I.revert&&this.setState({...B(this,yl),fetchStatus:"idle"}),r.abort()},onFail:(I,q)=>{Ue(this,Jn,ya).call(this,{type:"failed",failureCount:I,error:q})},onPause:()=>{Ue(this,Jn,ya).call(this,{type:"pause"})},onContinue:()=>{Ue(this,Jn,ya).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const I=await B(this,tn).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(x=(v=B(this,mi).config).onSuccess)==null||x.call(v,I,this),(_=(S=B(this,mi).config).onSettled)==null||_.call(S,I,this.state.error,this),I}catch(I){if(I instanceof $p){if(I.silent)return B(this,tn).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw Ue(this,Jn,ya).call(this,{type:"error",error:I}),(k=(w=B(this,mi).config).onError)==null||k.call(w,I,this),(A=(O=B(this,mi).config).onSettled)==null||A.call(O,this.state.data,I,this),I}finally{this.scheduleGc()}}},ts=new WeakMap,yl=new WeakMap,mi=new WeakMap,ns=new WeakMap,tn=new WeakMap,oc=new WeakMap,is=new WeakMap,Jn=new WeakSet,hE=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ya=function(t){const i=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...pE(r.data,this.options),fetchMeta:t.meta??null};case"success":const l={...r,...yv(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return me(this,yl,t.manual?l:void 0),l;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=i(this.state),Jt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),B(this,mi).notify({query:this,type:"updated",action:t})})},eE);function pE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:uE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function yv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function xv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,i=t!==void 0,r=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var zn,We,cc,En,as,xl,xa,ur,uc,vl,El,rs,ss,fr,Sl,rt,Qo,qp,Hp,Kp,Gp,Yp,Qp,Vp,mE,tE,oN=(tE=class extends Ol{constructor(t,i){super();we(this,rt);we(this,zn);we(this,We);we(this,cc);we(this,En);we(this,as);we(this,xl);we(this,xa);we(this,ur);we(this,uc);we(this,vl);we(this,El);we(this,rs);we(this,ss);we(this,fr);we(this,Sl,new Set);this.options=i,me(this,zn,t),me(this,ur,null),me(this,xa,Pp()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(B(this,We).addObserver(this),vv(B(this,We),this.options)?Ue(this,rt,Qo).call(this):this.updateResult(),Ue(this,rt,Gp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xp(B(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xp(B(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,rt,Yp).call(this),Ue(this,rt,Qp).call(this),B(this,We).removeObserver(this)}setOptions(t){const i=this.options,r=B(this,We);if(this.options=B(this,zn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof gi(this.options.enabled,B(this,We))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,rt,Vp).call(this),B(this,We).setOptions(this.options),i._defaulted&&!pf(this.options,i)&&B(this,zn).getQueryCache().notify({type:"observerOptionsUpdated",query:B(this,We),observer:this});const l=this.hasListeners();l&&Ev(B(this,We),r,this.options,i)&&Ue(this,rt,Qo).call(this),this.updateResult(),l&&(B(this,We)!==r||gi(this.options.enabled,B(this,We))!==gi(i.enabled,B(this,We))||gr(this.options.staleTime,B(this,We))!==gr(i.staleTime,B(this,We)))&&Ue(this,rt,qp).call(this);const o=Ue(this,rt,Hp).call(this);l&&(B(this,We)!==r||gi(this.options.enabled,B(this,We))!==gi(i.enabled,B(this,We))||o!==B(this,fr))&&Ue(this,rt,Kp).call(this,o)}getOptimisticResult(t){const i=B(this,zn).getQueryCache().build(B(this,zn),t),r=this.createResult(i,t);return uN(this,r)&&(me(this,En,r),me(this,xl,this.options),me(this,as,B(this,We).state)),r}getCurrentResult(){return B(this,En)}trackResult(t,i){return new Proxy(t,{get:(r,l)=>(this.trackProp(l),i==null||i(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&B(this,xa).status==="pending"&&B(this,xa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,l))})}trackProp(t){B(this,Sl).add(t)}getCurrentQuery(){return B(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=B(this,zn).defaultQueryOptions(t),r=B(this,zn).getQueryCache().build(B(this,zn),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(t){return Ue(this,rt,Qo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),B(this,En)))}createResult(t,i){var X;const r=B(this,We),l=this.options,o=B(this,En),c=B(this,as),f=B(this,xl),h=t!==r?t.state:B(this,cc),{state:y}=t;let m={...y},v=!1,x;if(i._optimisticResults){const D=this.hasListeners(),$=!D&&vv(t,i),Q=D&&Ev(t,r,i,l);($||Q)&&(m={...m,...pE(y.data,t.options)}),i._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:_,status:w}=m;x=m.data;let k=!1;if(i.placeholderData!==void 0&&x===void 0&&w==="pending"){let D;o!=null&&o.isPlaceholderData&&i.placeholderData===(f==null?void 0:f.placeholderData)?(D=o.data,k=!0):D=typeof i.placeholderData=="function"?i.placeholderData((X=B(this,El))==null?void 0:X.state.data,B(this,El)):i.placeholderData,D!==void 0&&(w="success",x=Fp(o==null?void 0:o.data,D,i),v=!0)}if(i.select&&x!==void 0&&!k)if(o&&x===(c==null?void 0:c.data)&&i.select===B(this,uc))x=B(this,vl);else try{me(this,uc,i.select),x=i.select(x),x=Fp(o==null?void 0:o.data,x,i),me(this,vl,x),me(this,ur,null)}catch(D){me(this,ur,D)}B(this,ur)&&(S=B(this,ur),x=B(this,vl),_=Date.now(),w="error");const O=m.fetchStatus==="fetching",A=w==="pending",I=w==="error",q=A&&O,T=x!==void 0,j={status:w,fetchStatus:m.fetchStatus,isPending:A,isSuccess:w==="success",isError:I,isInitialLoading:q,isLoading:q,data:x,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:_,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:O,isRefetching:O&&!A,isLoadingError:I&&!T,isPaused:m.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:I&&T,isStale:Tm(t,i),refetch:this.refetch,promise:B(this,xa),isEnabled:gi(i.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=j.data!==void 0,$=j.status==="error"&&!D,Q=J=>{$?J.reject(j.error):D&&J.resolve(j.data)},se=()=>{const J=me(this,xa,j.promise=Pp());Q(J)},ae=B(this,xa);switch(ae.status){case"pending":t.queryHash===r.queryHash&&Q(ae);break;case"fulfilled":($||j.data!==ae.value)&&se();break;case"rejected":(!$||j.error!==ae.reason)&&se();break}}return j}updateResult(){const t=B(this,En),i=this.createResult(B(this,We),this.options);if(me(this,as,B(this,We).state),me(this,xl,this.options),B(this,as).data!==void 0&&me(this,El,B(this,We)),pf(i,t))return;me(this,En,i);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,o=typeof l=="function"?l():l;if(o==="all"||!o&&!B(this,Sl).size)return!0;const c=new Set(o??B(this,Sl));return this.options.throwOnError&&c.add("error"),Object.keys(B(this,En)).some(f=>{const d=f;return B(this,En)[d]!==t[d]&&c.has(d)})};Ue(this,rt,mE).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,rt,Gp).call(this)}},zn=new WeakMap,We=new WeakMap,cc=new WeakMap,En=new WeakMap,as=new WeakMap,xl=new WeakMap,xa=new WeakMap,ur=new WeakMap,uc=new WeakMap,vl=new WeakMap,El=new WeakMap,rs=new WeakMap,ss=new WeakMap,fr=new WeakMap,Sl=new WeakMap,rt=new WeakSet,Qo=function(t){Ue(this,rt,Vp).call(this);let i=B(this,We).fetch(this.options,t);return t!=null&&t.throwOnError||(i=i.catch(_n)),i},qp=function(){Ue(this,rt,Yp).call(this);const t=gr(this.options.staleTime,B(this,We));if(tc.isServer()||B(this,En).isStale||!Bp(t))return;const r=lE(B(this,En).dataUpdatedAt,t)+1;me(this,rs,Vr.setTimeout(()=>{B(this,En).isStale||this.updateResult()},r))},Hp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(B(this,We)):this.options.refetchInterval)??!1},Kp=function(t){Ue(this,rt,Qp).call(this),me(this,fr,t),!(tc.isServer()||gi(this.options.enabled,B(this,We))===!1||!Bp(B(this,fr))||B(this,fr)===0)&&me(this,ss,Vr.setInterval(()=>{(this.options.refetchIntervalInBackground||_m.isFocused())&&Ue(this,rt,Qo).call(this)},B(this,fr)))},Gp=function(){Ue(this,rt,qp).call(this),Ue(this,rt,Kp).call(this,Ue(this,rt,Hp).call(this))},Yp=function(){B(this,rs)!==void 0&&(Vr.clearTimeout(B(this,rs)),me(this,rs,void 0))},Qp=function(){B(this,ss)!==void 0&&(Vr.clearInterval(B(this,ss)),me(this,ss,void 0))},Vp=function(){const t=B(this,zn).getQueryCache().build(B(this,zn),this.options);if(t===B(this,We))return;const i=B(this,We);me(this,We,t),me(this,cc,t.state),this.hasListeners()&&(i==null||i.removeObserver(this),t.addObserver(this))},mE=function(t){Jt.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(B(this,En))}),B(this,zn).getQueryCache().notify({query:B(this,We),type:"observerResultsUpdated"})})},tE);function cN(e,t){return gi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function vv(e,t){return cN(e,t)||e.state.data!==void 0&&Xp(e,t,t.refetchOnMount)}function Xp(e,t,i){if(gi(t.enabled,e)!==!1&&gr(t.staleTime,e)!=="static"){const r=typeof i=="function"?i(e):i;return r==="always"||r!==!1&&Tm(e,t)}return!1}function Ev(e,t,i,r){return(e!==t||gi(r.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&Tm(e,i)}function Tm(e,t){return gi(t.enabled,e)!==!1&&e.isStaleByTime(gr(t.staleTime,e))}function uN(e,t){return!pf(e.getCurrentResult(),t)}function Sv(e){return{onFetch:(t,i)=>{var y,m,v,x,S;const r=t.options,l=(v=(m=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:m.fetchMore)==null?void 0:v.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],c=((S=t.state.data)==null?void 0:S.pageParams)||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let _=!1;const w=A=>{nN(A,()=>t.signal,()=>_=!0)},k=cE(t.options,t.fetchOptions),O=async(A,I,q)=>{if(_)return Promise.reject();if(I==null&&A.pages.length)return Promise.resolve(A);const P=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:I,direction:q?"backward":"forward",meta:t.options.meta};return w($),$})(),j=await k(P),{maxPages:X}=t.options,D=q?tN:eN;return{pages:D(A.pages,j,X),pageParams:D(A.pageParams,I,X)}};if(l&&o.length){const A=l==="backward",I=A?fN:_v,q={pages:o,pageParams:c},T=I(r,q);f=await O(q,T,A)}else{const A=e??o.length;do{const I=d===0?c[0]??r.initialPageParam:_v(r,f);if(d>0&&I==null)break;f=await O(f,I),d++}while(d<A)}return f};t.options.persister?t.fetchFn=()=>{var _,w;return(w=(_=t.options).persister)==null?void 0:w.call(_,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i)}:t.fetchFn=h}}}function _v(e,{pages:t,pageParams:i}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,i[r],i):void 0}function fN(e,{pages:t,pageParams:i}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,i[0],i):void 0}var fc,Hi,hn,ls,Ki,rr,nE,dN=(nE=class extends dE{constructor(t){super();we(this,Ki);we(this,fc);we(this,Hi);we(this,hn);we(this,ls);me(this,fc,t.client),this.mutationId=t.mutationId,me(this,hn,t.mutationCache),me(this,Hi,[]),this.state=t.state||gE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,Hi).includes(t)||(B(this,Hi).push(t),this.clearGcTimeout(),B(this,hn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){me(this,Hi,B(this,Hi).filter(i=>i!==t)),this.scheduleGc(),B(this,hn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,Hi).length||(this.state.status==="pending"?this.scheduleGc():B(this,hn).remove(this))}continue(){var t;return((t=B(this,ls))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,f,d,h,y,m,v,x,S,_,w,k,O,A,I,q,T,P;const i=()=>{Ue(this,Ki,rr).call(this,{type:"continue"})},r={client:B(this,fc),meta:this.options.meta,mutationKey:this.options.mutationKey};me(this,ls,fE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(j,X)=>{Ue(this,Ki,rr).call(this,{type:"failed",failureCount:j,error:X})},onPause:()=>{Ue(this,Ki,rr).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>B(this,hn).canRun(this)}));const l=this.state.status==="pending",o=!B(this,ls).canStart();try{if(l)i();else{Ue(this,Ki,rr).call(this,{type:"pending",variables:t,isPaused:o}),B(this,hn).config.onMutate&&await B(this,hn).config.onMutate(t,this,r);const X=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,r));X!==this.state.context&&Ue(this,Ki,rr).call(this,{type:"pending",context:X,variables:t,isPaused:o})}const j=await B(this,ls).start();return await((h=(d=B(this,hn).config).onSuccess)==null?void 0:h.call(d,j,t,this.state.context,this,r)),await((m=(y=this.options).onSuccess)==null?void 0:m.call(y,j,t,this.state.context,r)),await((x=(v=B(this,hn).config).onSettled)==null?void 0:x.call(v,j,null,this.state.variables,this.state.context,this,r)),await((_=(S=this.options).onSettled)==null?void 0:_.call(S,j,null,t,this.state.context,r)),Ue(this,Ki,rr).call(this,{type:"success",data:j}),j}catch(j){try{await((k=(w=B(this,hn).config).onError)==null?void 0:k.call(w,j,t,this.state.context,this,r))}catch(X){Promise.reject(X)}try{await((A=(O=this.options).onError)==null?void 0:A.call(O,j,t,this.state.context,r))}catch(X){Promise.reject(X)}try{await((q=(I=B(this,hn).config).onSettled)==null?void 0:q.call(I,void 0,j,this.state.variables,this.state.context,this,r))}catch(X){Promise.reject(X)}try{await((P=(T=this.options).onSettled)==null?void 0:P.call(T,void 0,j,t,this.state.context,r))}catch(X){Promise.reject(X)}throw Ue(this,Ki,rr).call(this,{type:"error",error:j}),j}finally{B(this,hn).runNext(this)}}},fc=new WeakMap,Hi=new WeakMap,hn=new WeakMap,ls=new WeakMap,Ki=new WeakSet,rr=function(t){const i=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Jt.batch(()=>{B(this,Hi).forEach(r=>{r.onMutationUpdate(t)}),B(this,hn).notify({mutation:this,type:"updated",action:t})})},nE);function gE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var va,Ci,dc,iE,hN=(iE=class extends Ol{constructor(t={}){super();we(this,va);we(this,Ci);we(this,dc);this.config=t,me(this,va,new Set),me(this,Ci,new Map),me(this,dc,0)}build(t,i,r){const l=new dN({client:t,mutationCache:this,mutationId:++Pu(this,dc)._,options:t.defaultMutationOptions(i),state:r});return this.add(l),l}add(t){B(this,va).add(t);const i=$u(t);if(typeof i=="string"){const r=B(this,Ci).get(i);r?r.push(t):B(this,Ci).set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(B(this,va).delete(t)){const i=$u(t);if(typeof i=="string"){const r=B(this,Ci).get(i);if(r)if(r.length>1){const l=r.indexOf(t);l!==-1&&r.splice(l,1)}else r[0]===t&&B(this,Ci).delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=$u(t);if(typeof i=="string"){const r=B(this,Ci).get(i),l=r==null?void 0:r.find(o=>o.state.status==="pending");return!l||l===t}else return!0}runNext(t){var r;const i=$u(t);if(typeof i=="string"){const l=(r=B(this,Ci).get(i))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Jt.batch(()=>{B(this,va).forEach(t=>{this.notify({type:"removed",mutation:t})}),B(this,va).clear(),B(this,Ci).clear()})}getAll(){return Array.from(B(this,va))}find(t){const i={exact:!0,...t};return this.getAll().find(r=>mv(i,r))}findAll(t={}){return this.getAll().filter(i=>mv(t,i))}notify(t){Jt.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return Jt.batch(()=>Promise.all(t.map(i=>i.continue().catch(_n))))}},va=new WeakMap,Ci=new WeakMap,dc=new WeakMap,iE);function $u(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ea,dr,Bn,Sa,ka,sf,Zp,aE,pN=(aE=class extends Ol{constructor(i,r){super();we(this,ka);we(this,Ea);we(this,dr);we(this,Bn);we(this,Sa);me(this,Ea,i),this.setOptions(r),this.bindMethods(),Ue(this,ka,sf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var l;const r=this.options;this.options=B(this,Ea).defaultMutationOptions(i),pf(this.options,r)||B(this,Ea).getMutationCache().notify({type:"observerOptionsUpdated",mutation:B(this,Bn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&os(r.mutationKey)!==os(this.options.mutationKey)?this.reset():((l=B(this,Bn))==null?void 0:l.state.status)==="pending"&&B(this,Bn).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=B(this,Bn))==null||i.removeObserver(this)}onMutationUpdate(i){Ue(this,ka,sf).call(this),Ue(this,ka,Zp).call(this,i)}getCurrentResult(){return B(this,dr)}reset(){var i;(i=B(this,Bn))==null||i.removeObserver(this),me(this,Bn,void 0),Ue(this,ka,sf).call(this),Ue(this,ka,Zp).call(this)}mutate(i,r){var l;return me(this,Sa,r),(l=B(this,Bn))==null||l.removeObserver(this),me(this,Bn,B(this,Ea).getMutationCache().build(B(this,Ea),this.options)),B(this,Bn).addObserver(this),B(this,Bn).execute(i)}},Ea=new WeakMap,dr=new WeakMap,Bn=new WeakMap,Sa=new WeakMap,ka=new WeakSet,sf=function(){var r;const i=((r=B(this,Bn))==null?void 0:r.state)??gE();me(this,dr,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Zp=function(i){Jt.batch(()=>{var r,l,o,c,f,d,h,y;if(B(this,Sa)&&this.hasListeners()){const m=B(this,dr).variables,v=B(this,dr).context,x={client:B(this,Ea),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(l=(r=B(this,Sa)).onSuccess)==null||l.call(r,i.data,m,v,x)}catch(S){Promise.reject(S)}try{(c=(o=B(this,Sa)).onSettled)==null||c.call(o,i.data,null,m,v,x)}catch(S){Promise.reject(S)}}else if((i==null?void 0:i.type)==="error"){try{(d=(f=B(this,Sa)).onError)==null||d.call(f,i.error,m,v,x)}catch(S){Promise.reject(S)}try{(y=(h=B(this,Sa)).onSettled)==null||y.call(h,void 0,i.error,m,v,x)}catch(S){Promise.reject(S)}}}this.listeners.forEach(m=>{m(B(this,dr))})})},aE),Gi,rE,mN=(rE=class extends Ol{constructor(t={}){super();we(this,Gi);this.config=t,me(this,Gi,new Map)}build(t,i,r){const l=i.queryKey,o=i.queryHash??wm(l,i);let c=this.get(o);return c||(c=new lN({client:t,queryKey:l,queryHash:o,options:t.defaultQueryOptions(i),state:r,defaultOptions:t.getQueryDefaults(l)}),this.add(c)),c}add(t){B(this,Gi).has(t.queryHash)||(B(this,Gi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=B(this,Gi).get(t.queryHash);i&&(t.destroy(),i===t&&B(this,Gi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,Gi).get(t)}getAll(){return[...B(this,Gi).values()]}find(t){const i={exact:!0,...t};return this.getAll().find(r=>pv(i,r))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(r=>pv(t,r)):i}notify(t){Jt.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gi=new WeakMap,rE),zt,hr,pr,_l,wl,mr,kl,Nl,sE,gN=(sE=class{constructor(e={}){we(this,zt);we(this,hr);we(this,pr);we(this,_l);we(this,wl);we(this,mr);we(this,kl);we(this,Nl);me(this,zt,e.queryCache||new mN),me(this,hr,e.mutationCache||new hN),me(this,pr,e.defaultOptions||{}),me(this,_l,new Map),me(this,wl,new Map),me(this,mr,0)}mount(){Pu(this,mr)._++,B(this,mr)===1&&(me(this,kl,_m.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,zt).onFocus())})),me(this,Nl,mf.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,zt).onOnline())})))}unmount(){var e,t;Pu(this,mr)._--,B(this,mr)===0&&((e=B(this,kl))==null||e.call(this),me(this,kl,void 0),(t=B(this,Nl))==null||t.call(this),me(this,Nl,void 0))}isFetching(e){return B(this,zt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,hr).findAll({...e,status:"pending"}).length}getQueryData(e){var i;const t=this.defaultQueryOptions({queryKey:e});return(i=B(this,zt).get(t.queryHash))==null?void 0:i.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),i=B(this,zt).build(this,t),r=i.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(gr(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return B(this,zt).findAll(e).map(({queryKey:t,state:i})=>{const r=i.data;return[t,r]})}setQueryData(e,t,i){const r=this.defaultQueryOptions({queryKey:e}),l=B(this,zt).get(r.queryHash),o=l==null?void 0:l.state.data,c=Zk(t,o);if(c!==void 0)return B(this,zt).build(this,r).setData(c,{...i,manual:!0})}setQueriesData(e,t,i){return Jt.batch(()=>B(this,zt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,i)]))}getQueryState(e){var i;const t=this.defaultQueryOptions({queryKey:e});return(i=B(this,zt).get(t.queryHash))==null?void 0:i.state}removeQueries(e){const t=B(this,zt);Jt.batch(()=>{t.findAll(e).forEach(i=>{t.remove(i)})})}resetQueries(e,t){const i=B(this,zt);return Jt.batch(()=>(i.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const i={revert:!0,...t},r=Jt.batch(()=>B(this,zt).findAll(e).map(l=>l.cancel(i)));return Promise.all(r).then(_n).catch(_n)}invalidateQueries(e,t={}){return Jt.batch(()=>(B(this,zt).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const i={...t,cancelRefetch:t.cancelRefetch??!0},r=Jt.batch(()=>B(this,zt).findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let o=l.fetch(void 0,i);return i.throwOnError||(o=o.catch(_n)),l.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(_n)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const i=B(this,zt).build(this,t);return i.isStaleByTime(gr(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_n).catch(_n)}fetchInfiniteQuery(e){return e.behavior=Sv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_n).catch(_n)}ensureInfiniteQueryData(e){return e.behavior=Sv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return mf.isOnline()?B(this,hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,zt)}getMutationCache(){return B(this,hr)}getDefaultOptions(){return B(this,pr)}setDefaultOptions(e){me(this,pr,e)}setQueryDefaults(e,t){B(this,_l).set(os(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,_l).values()],i={};return t.forEach(r=>{ec(e,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(e,t){B(this,wl).set(os(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,wl).values()],i={};return t.forEach(r=>{ec(e,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const t={...B(this,pr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===km&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...B(this,pr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,zt).clear(),B(this,hr).clear()}},zt=new WeakMap,hr=new WeakMap,pr=new WeakMap,_l=new WeakMap,wl=new WeakMap,mr=new WeakMap,kl=new WeakMap,Nl=new WeakMap,sE),bE=M.createContext(void 0),ni=e=>{const t=M.useContext(bE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},bN=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(bE.Provider,{value:e,children:t})),yE=M.createContext(!1),yN=()=>M.useContext(yE);yE.Provider;function xN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var vN=M.createContext(xN()),EN=()=>M.useContext(vN),SN=(e,t,i)=>{const r=i!=null&&i.state.error&&typeof e.throwOnError=="function"?Nm(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},_N=e=>{M.useEffect(()=>{e.clearReset()},[e])},wN=({result:e,errorResetBoundary:t,throwOnError:i,query:r,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(l&&e.data===void 0||Nm(i,[e.error,r])),kN=e=>{if(e.suspense){const i=l=>l==="static"?l:Math.max(l??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...l)=>i(r(...l)):i(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},NN=(e,t)=>e.isLoading&&e.isFetching&&!t,TN=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,wv=(e,t,i)=>t.fetchOptimistic(e).catch(()=>{i.clearReset()});function CN(e,t,i){var v,x,S,_;const r=yN(),l=EN(),o=ni(),c=o.defaultQueryOptions(e);(x=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||x.call(v,c);const f=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",kN(c),SN(c,l,f),_N(l);const d=!o.getQueryCache().get(c.queryHash),[h]=M.useState(()=>new t(o,c)),y=h.getOptimisticResult(c),m=!r&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(w=>{const k=m?h.subscribe(Jt.batchCalls(w)):_n;return h.updateResult(),k},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),M.useEffect(()=>{h.setOptions(c)},[c,h]),TN(c,y))throw wv(c,h,l);if(wN({result:y,errorResetBoundary:l,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw y.error;if((_=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||_.call(S,c,y),c.experimental_prefetchInRender&&!tc.isServer()&&NN(y,r)){const w=d?wv(c,h,l):f==null?void 0:f.promise;w==null||w.catch(_n).finally(()=>{h.updateResult()})}return c.notifyOnChangeProps?y:h.trackResult(y)}function kt(e,t){return CN(e,oN)}function br(e,t){const i=ni(),[r]=M.useState(()=>new pN(i,e));M.useEffect(()=>{r.setOptions(e)},[r,e]);const l=M.useSyncExternalStore(M.useCallback(c=>r.subscribe(Jt.batchCalls(c)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=M.useCallback((c,f)=>{r.mutate(c,f).catch(_n)},[r]);if(l.error&&Nm(r.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:o,mutateAsync:l.mutate}}/**
50
+ * react-router v7.14.2
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var kv="popstate";function Nv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function AN(e={}){function t(r,l){var h;let o=(h=l.state)==null?void 0:h.masked,{pathname:c,search:f,hash:d}=o||r.location;return Wp("",{pathname:c,search:f,hash:d},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function i(r,l){return typeof l=="string"?l:nc(l)}return RN(t,i,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function xi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ON(){return Math.random().toString(36).substring(2,10)}function Tv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Wp(e,t,i=null,r,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Rl(t):t,state:i,key:t&&t.key||r||ON(),unstable_mask:l}}function nc({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Rl(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function RN(e,t,i,r={}){let{window:l=document.defaultView,v5Compat:o=!1}=r,c=l.history,f="POP",d=null,h=y();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function y(){return(c.state||{idx:null}).idx}function m(){f="POP";let w=y(),k=w==null?null:w-h;h=w,d&&d({action:f,location:_.location,delta:k})}function v(w,k){f="PUSH";let O=Nv(w)?w:Wp(_.location,w,k);h=y()+1;let A=Tv(O,h),I=_.createHref(O.unstable_mask||O);try{c.pushState(A,"",I)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;l.location.assign(I)}o&&d&&d({action:f,location:_.location,delta:1})}function x(w,k){f="REPLACE";let O=Nv(w)?w:Wp(_.location,w,k);h=y();let A=Tv(O,h),I=_.createHref(O.unstable_mask||O);c.replaceState(A,"",I),o&&d&&d({action:f,location:_.location,delta:0})}function S(w){return MN(w)}let _={get action(){return f},get location(){return e(l,c)},listen(w){if(d)throw new Error("A history only accepts one active listener");return l.addEventListener(kv,m),d=w,()=>{l.removeEventListener(kv,m),d=null}},createHref(w){return t(l,w)},createURL:S,encodeLocation(w){let k=S(w);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:v,replace:x,go(w){return c.go(w)}};return _}function MN(e,t=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(i,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:nc(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=i+r),new URL(r,i)}function xE(e,t,i="/"){return DN(e,t,i,!1)}function DN(e,t,i,r){let l=typeof t=="string"?Rl(t):t,o=Na(l.pathname||"/",i);if(o==null)return null;let c=vE(e);LN(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=KN(o);f=qN(c[d],h,r)}return f}function vE(e,t=[],i=[],r="",l=!1){let o=(c,f,d=l,h)=>{let y={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&d)return;Ct(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let m=Ai([r,y.relativePath]),v=i.concat(y);c.children&&c.children.length>0&&(Ct(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),vE(c.children,t,v,m,d)),!(c.path==null&&!c.index)&&t.push({path:m,score:PN(m,c.index),routesMeta:v})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))o(c,f);else for(let h of EE(c.path))o(c,f,!0,h)}),t}function EE(e){let t=e.split("/");if(t.length===0)return[];let[i,...r]=t,l=i.endsWith("?"),o=i.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let c=EE(r.join("/")),f=[];return f.push(...c.map(d=>d===""?o:[o,d].join("/"))),l&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function LN(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:$N(t.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var jN=/^:[\w-]+$/,IN=3,zN=2,BN=1,UN=10,FN=-2,Cv=e=>e==="*";function PN(e,t){let i=e.split("/"),r=i.length;return i.some(Cv)&&(r+=FN),t&&(r+=zN),i.filter(l=>!Cv(l)).reduce((l,o)=>l+(jN.test(o)?IN:o===""?BN:UN),r)}function $N(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function qN(e,t,i=!1){let{routesMeta:r}=e,l={},o="/",c=[];for(let f=0;f<r.length;++f){let d=r[f],h=f===r.length-1,y=o==="/"?t:t.slice(o.length)||"/",m=gf({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},y),v=d.route;if(!m&&h&&i&&!r[r.length-1].route.index&&(m=gf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},y)),!m)return null;Object.assign(l,m.params),c.push({params:l,pathname:Ai([o,m.pathname]),pathnameBase:VN(Ai([o,m.pathnameBase])),route:v}),m.pathnameBase!=="/"&&(o=Ai([o,m.pathnameBase]))}return c}function gf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,r]=HN(e.path,e.caseSensitive,e.end),l=t.match(i);if(!l)return null;let o=l[0],c=o.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:r.reduce((h,{paramName:y,isOptional:m},v)=>{if(y==="*"){let S=f[v]||"";c=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const x=f[v];return m&&!x?h[y]=void 0:h[y]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:e}}function HN(e,t=!1,i=!0){xi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d,h,y)=>{if(r.push({paramName:f,isOptional:d!=null}),d){let m=y.charAt(h+c.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function KN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return xi(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Na(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,r=e.charAt(i);return r&&r!=="/"?null:e.slice(i)||"/"}var GN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function YN(e,t="/"){let{pathname:i,search:r="",hash:l=""}=typeof e=="string"?Rl(e):e,o;return i?(i=SE(i),i.startsWith("/")?o=Av(i.substring(1),"/"):o=Av(i,t)):o=t,{pathname:o,search:XN(r),hash:ZN(l)}}function Av(e,t){let i=bf(t).split("/");return e.split("/").forEach(l=>{l===".."?i.length>1&&i.pop():l!=="."&&i.push(l)}),i.length>1?i.join("/"):"/"}function lp(e,t,i,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function QN(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Cm(e){let t=QN(e);return t.map((i,r)=>r===t.length-1?i.pathname:i.pathnameBase)}function Of(e,t,i,r=!1){let l;typeof e=="string"?l=Rl(e):(l={...e},Ct(!l.pathname||!l.pathname.includes("?"),lp("?","pathname","search",l)),Ct(!l.pathname||!l.pathname.includes("#"),lp("#","pathname","hash",l)),Ct(!l.search||!l.search.includes("#"),lp("#","search","hash",l)));let o=e===""||l.pathname==="",c=o?"/":l.pathname,f;if(c==null)f=i;else{let m=t.length-1;if(!r&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),m-=1;l.pathname=v.join("/")}f=m>=0?t[m]:"/"}let d=YN(l,f),h=c&&c!=="/"&&c.endsWith("/"),y=(o||c===".")&&i.endsWith("/");return!d.pathname.endsWith("/")&&(h||y)&&(d.pathname+="/"),d}var SE=e=>e.replace(/\/\/+/g,"/"),Ai=e=>SE(e.join("/")),bf=e=>e.replace(/\/+$/,""),VN=e=>bf(e).replace(/^\/*/,"/"),XN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ZN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,WN=class{constructor(e,t,i,r=!1){this.status=e,this.statusText=t||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function JN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function eT(e){let t=e.map(i=>i.route.path).filter(Boolean);return Ai(t)||"/"}var _E=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wE(e,t){let i=e;if(typeof i!="string"||!GN.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let r=i,l=!1;if(_E)try{let o=new URL(window.location.href),c=i.startsWith("//")?new URL(o.protocol+i):new URL(i),f=Na(c.pathname,t);c.origin===o.origin&&f!=null?i=f+c.search+c.hash:l=!0}catch{xi(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:l,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var kE=["POST","PUT","PATCH","DELETE"];new Set(kE);var tT=["GET",...kE];new Set(tT);var Ml=M.createContext(null);Ml.displayName="DataRouter";var Rf=M.createContext(null);Rf.displayName="DataRouterState";var NE=M.createContext(!1);function nT(){return M.useContext(NE)}var TE=M.createContext({isTransitioning:!1});TE.displayName="ViewTransition";var iT=M.createContext(new Map);iT.displayName="Fetchers";var aT=M.createContext(null);aT.displayName="Await";var ii=M.createContext(null);ii.displayName="Navigation";var hc=M.createContext(null);hc.displayName="Location";var Ei=M.createContext({outlet:null,matches:[],isDataRoute:!1});Ei.displayName="Route";var Am=M.createContext(null);Am.displayName="RouteError";var CE="REACT_ROUTER_ERROR",rT="REDIRECT",sT="ROUTE_ERROR_RESPONSE";function lT(e){if(e.startsWith(`${CE}:${rT}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function oT(e){if(e.startsWith(`${CE}:${sT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new WN(t.status,t.statusText,t.data)}catch{}}function cT(e,{relative:t}={}){Ct(Dl(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=M.useContext(ii),{hash:l,pathname:o,search:c}=pc(e,{relative:t}),f=o;return i!=="/"&&(f=o==="/"?i:Ai([i,o])),r.createHref({pathname:f,search:c,hash:l})}function Dl(){return M.useContext(hc)!=null}function Mi(){return Ct(Dl(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(hc).location}var AE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function OE(e){M.useContext(ii).static||M.useLayoutEffect(e)}function vr(){let{isDataRoute:e}=M.useContext(Ei);return e?wT():uT()}function uT(){Ct(Dl(),"useNavigate() may be used only in the context of a <Router> component.");let e=M.useContext(Ml),{basename:t,navigator:i}=M.useContext(ii),{matches:r}=M.useContext(Ei),{pathname:l}=Mi(),o=JSON.stringify(Cm(r)),c=M.useRef(!1);return OE(()=>{c.current=!0}),M.useCallback((d,h={})=>{if(xi(c.current,AE),!c.current)return;if(typeof d=="number"){i.go(d);return}let y=Of(d,JSON.parse(o),l,h.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Ai([t,y.pathname])),(h.replace?i.replace:i.push)(y,h.state,h)},[t,i,o,l,e])}var fT=M.createContext(null);function dT(e){let t=M.useContext(Ei).outlet;return M.useMemo(()=>t&&M.createElement(fT.Provider,{value:e},t),[t,e])}function RE(){let{matches:e}=M.useContext(Ei),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function pc(e,{relative:t}={}){let{matches:i}=M.useContext(Ei),{pathname:r}=Mi(),l=JSON.stringify(Cm(i));return M.useMemo(()=>Of(e,JSON.parse(l),r,t==="path"),[e,l,r,t])}function hT(e,t){return ME(e,t)}function ME(e,t,i){var w;Ct(Dl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=M.useContext(ii),{matches:l}=M.useContext(Ei),o=l[l.length-1],c=o?o.params:{},f=o?o.pathname:"/",d=o?o.pathnameBase:"/",h=o&&o.route;{let k=h&&h.path||"";LE(f,!h||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let y=Mi(),m;if(t){let k=typeof t=="string"?Rl(t):t;Ct(d==="/"||((w=k.pathname)==null?void 0:w.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${k.pathname}" was given in the \`location\` prop.`),m=k}else m=y;let v=m.pathname||"/",x=v;if(d!=="/"){let k=d.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(k.length).join("/")}let S=xE(e,{pathname:x});xi(h||S!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),xi(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=yT(S&&S.map(k=>Object.assign({},k,{params:Object.assign({},c,k.params),pathname:Ai([d,r.encodeLocation?r.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?d:Ai([d,r.encodeLocation?r.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),l,i);return t&&_?M.createElement(hc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},_):_}function pT(){let e=_T(),t=JN(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:o},"ErrorBoundary")," or"," ",M.createElement("code",{style:o},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),i?M.createElement("pre",{style:l},i):null,c)}var mT=M.createElement(pT,null),DE=class extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=oT(e.digest);i&&(e=i)}let t=e!==void 0?M.createElement(Ei.Provider,{value:this.props.routeContext},M.createElement(Am.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?M.createElement(gT,{error:e},t):t}};DE.contextType=NE;var op=new WeakMap;function gT({children:e,error:t}){let{basename:i}=M.useContext(ii);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=lT(t.digest);if(r){let l=op.get(t);if(l)throw l;let o=wE(r.location,i);if(_E&&!op.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw op.set(t,c),c}return M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function bT({routeContext:e,match:t,children:i}){let r=M.useContext(Ml);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(Ei.Provider,{value:e},i)}function yT(e,t=[],i){let r=i==null?void 0:i.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let l=e,o=r==null?void 0:r.errors;if(o!=null){let y=l.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);Ct(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,y+1))}let c=!1,f=-1;if(i&&r){c=r.renderFallback;for(let y=0;y<l.length;y++){let m=l[y];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=y),m.route.id){let{loaderData:v,errors:x}=r,S=m.route.loader&&!v.hasOwnProperty(m.route.id)&&(!x||x[m.route.id]===void 0);if(m.route.lazy||S){i.isStatic&&(c=!0),f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}}let d=i==null?void 0:i.onError,h=r&&d?(y,m)=>{var v,x;d(y,{location:r.location,params:((x=(v=r.matches)==null?void 0:v[0])==null?void 0:x.params)??{},unstable_pattern:eT(r.matches),errorInfo:m})}:void 0;return l.reduceRight((y,m,v)=>{let x,S=!1,_=null,w=null;r&&(x=o&&m.route.id?o[m.route.id]:void 0,_=m.route.errorElement||mT,c&&(f<0&&v===0?(LE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,w=null):f===v&&(S=!0,w=m.route.hydrateFallbackElement||null)));let k=t.concat(l.slice(0,v+1)),O=()=>{let A;return x?A=_:S?A=w:m.route.Component?A=M.createElement(m.route.Component,null):m.route.element?A=m.route.element:A=y,M.createElement(bT,{match:m,routeContext:{outlet:y,matches:k,isDataRoute:r!=null},children:A})};return r&&(m.route.ErrorBoundary||m.route.errorElement||v===0)?M.createElement(DE,{location:r.location,revalidation:r.revalidation,component:_,error:x,children:O(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:h}):O()},null)}function Om(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xT(e){let t=M.useContext(Ml);return Ct(t,Om(e)),t}function vT(e){let t=M.useContext(Rf);return Ct(t,Om(e)),t}function ET(e){let t=M.useContext(Ei);return Ct(t,Om(e)),t}function Rm(e){let t=ET(e),i=t.matches[t.matches.length-1];return Ct(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function ST(){return Rm("useRouteId")}function _T(){var r;let e=M.useContext(Am),t=vT("useRouteError"),i=Rm("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[i]}function wT(){let{router:e}=xT("useNavigate"),t=Rm("useNavigate"),i=M.useRef(!1);return OE(()=>{i.current=!0}),M.useCallback(async(l,o={})=>{xi(i.current,AE),i.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...o}))},[e,t])}var Ov={};function LE(e,t,i){!t&&!Ov[e]&&(Ov[e]=!0,xi(!1,i))}M.memo(kT);function kT({routes:e,future:t,state:i,isStatic:r,onError:l}){return ME(e,void 0,{state:i,isStatic:r,onError:l})}function NT({to:e,replace:t,state:i,relative:r}){Ct(Dl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=M.useContext(ii);xi(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=M.useContext(Ei),{pathname:c}=Mi(),f=vr(),d=Of(e,Cm(o),c,r==="path"),h=JSON.stringify(d);return M.useEffect(()=>{f(JSON.parse(h),{replace:t,state:i,relative:r})},[f,h,r,t,i]),null}function TT(e){return dT(e.context)}function jn(e){Ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function CT({basename:e="/",children:t=null,location:i,navigationType:r="POP",navigator:l,static:o=!1,unstable_useTransitions:c}){Ct(!Dl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=M.useMemo(()=>({basename:f,navigator:l,static:o,unstable_useTransitions:c,future:{}}),[f,l,o,c]);typeof i=="string"&&(i=Rl(i));let{pathname:h="/",search:y="",hash:m="",state:v=null,key:x="default",unstable_mask:S}=i,_=M.useMemo(()=>{let w=Na(h,f);return w==null?null:{location:{pathname:w,search:y,hash:m,state:v,key:x,unstable_mask:S},navigationType:r}},[f,h,y,m,v,x,r,S]);return xi(_!=null,`<Router basename="${f}"> is not able to match the URL "${h}${y}${m}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:M.createElement(ii.Provider,{value:d},M.createElement(hc.Provider,{children:t,value:_}))}function AT({children:e,location:t}){return hT(Jp(e),t)}function Jp(e,t=[]){let i=[];return M.Children.forEach(e,(r,l)=>{if(!M.isValidElement(r))return;let o=[...t,l];if(r.type===M.Fragment){i.push.apply(i,Jp(r.props.children,o));return}Ct(r.type===jn,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ct(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(c.children=Jp(r.props.children,o)),i.push(c)}),i}var lf="get",of="application/x-www-form-urlencoded";function Mf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function OT(e){return Mf(e)&&e.tagName.toLowerCase()==="button"}function RT(e){return Mf(e)&&e.tagName.toLowerCase()==="form"}function MT(e){return Mf(e)&&e.tagName.toLowerCase()==="input"}function DT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LT(e,t){return e.button===0&&(!t||t==="_self")&&!DT(e)}function em(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,i)=>{let r=e[i];return t.concat(Array.isArray(r)?r.map(l=>[i,l]):[[i,r]])},[]))}function jT(e,t){let i=em(e);return t&&t.forEach((r,l)=>{i.has(l)||t.getAll(l).forEach(o=>{i.append(l,o)})}),i}var qu=null;function IT(){if(qu===null)try{new FormData(document.createElement("form"),0),qu=!1}catch{qu=!0}return qu}var zT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cp(e){return e!=null&&!zT.has(e)?(xi(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${of}"`),null):e}function BT(e,t){let i,r,l,o,c;if(RT(e)){let f=e.getAttribute("action");r=f?Na(f,t):null,i=e.getAttribute("method")||lf,l=cp(e.getAttribute("enctype"))||of,o=new FormData(e)}else if(OT(e)||MT(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(r=d?Na(d,t):null,i=e.getAttribute("formmethod")||f.getAttribute("method")||lf,l=cp(e.getAttribute("formenctype"))||cp(f.getAttribute("enctype"))||of,o=new FormData(f,e),!IT()){let{name:h,type:y,value:m}=e;if(y==="image"){let v=h?`${h}.`:"";o.append(`${v}x`,"0"),o.append(`${v}y`,"0")}else h&&o.append(h,m)}}else{if(Mf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=lf,r=null,l=of,c=e}return o&&l==="text/plain"&&(c=o,o=void 0),{action:r,method:i.toLowerCase(),encType:l,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Mm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jE(e,t,i,r){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${r}`:l.pathname=`${l.pathname}.${r}`:l.pathname==="/"?l.pathname=`_root.${r}`:t&&Na(l.pathname,t)==="/"?l.pathname=`${bf(t)}/_root.${r}`:l.pathname=`${bf(l.pathname)}.${r}`,l}async function UT(e,t){if(e.id in t)return t[e.id];try{let i=await import(e.module);return t[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function FT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function PT(e,t,i){let r=await Promise.all(e.map(async l=>{let o=t.routes[l.route.id];if(o){let c=await UT(o,i);return c.links?c.links():[]}return[]}));return KT(r.flat(1).filter(FT).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Rv(e,t,i,r,l,o){let c=(d,h)=>i[h]?d.route.id!==i[h].route.id:!0,f=(d,h)=>{var y;return i[h].pathname!==d.pathname||((y=i[h].route.path)==null?void 0:y.endsWith("*"))&&i[h].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,h)=>c(d,h)||f(d,h)):o==="data"?t.filter((d,h)=>{var m;let y=r.routes[d.route.id];if(!y||!y.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let v=d.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((m=i[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function $T(e,t,{includeHydrateFallback:i}={}){return qT(e.map(r=>{let l=t.routes[r.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),i&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function qT(e){return[...new Set(e)]}function HT(e){let t={},i=Object.keys(e).sort();for(let r of i)t[r]=e[r];return t}function KT(e,t){let i=new Set;return new Set(t),e.reduce((r,l)=>{let o=JSON.stringify(HT(l));return i.has(o)||(i.add(o),r.push({key:o,link:l})),r},[])}function Dm(){let e=M.useContext(Ml);return Mm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function GT(){let e=M.useContext(Rf);return Mm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Lm=M.createContext(void 0);Lm.displayName="FrameworkContext";function jm(){let e=M.useContext(Lm);return Mm(e,"You must render this element inside a <HydratedRouter> element"),e}function YT(e,t){let i=M.useContext(Lm),[r,l]=M.useState(!1),[o,c]=M.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:y,onTouchStart:m}=t,v=M.useRef(null);M.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let _=k=>{k.forEach(O=>{c(O.isIntersecting)})},w=new IntersectionObserver(_,{threshold:.5});return v.current&&w.observe(v.current),()=>{w.disconnect()}}},[e]),M.useEffect(()=>{if(r){let _=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(_)}}},[r]);let x=()=>{l(!0)},S=()=>{l(!1),c(!1)};return i?e!=="intent"?[o,v,{}]:[o,v,{onFocus:Po(f,x),onBlur:Po(d,S),onMouseEnter:Po(h,x),onMouseLeave:Po(y,S),onTouchStart:Po(m,x)}]:[!1,v,{}]}function Po(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function QT({page:e,...t}){let i=nT(),{router:r}=Dm(),l=M.useMemo(()=>xE(r.routes,e,r.basename),[r.routes,e,r.basename]);return l?i?M.createElement(XT,{page:e,matches:l,...t}):M.createElement(ZT,{page:e,matches:l,...t}):null}function VT(e){let{manifest:t,routeModules:i}=jm(),[r,l]=M.useState([]);return M.useEffect(()=>{let o=!1;return PT(e,t,i).then(c=>{o||l(c)}),()=>{o=!0}},[e,t,i]),r}function XT({page:e,matches:t,...i}){let r=Mi(),{future:l}=jm(),{basename:o}=Dm(),c=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let f=jE(e,o,l.unstable_trailingSlashAwareDataRequests,"rsc"),d=!1,h=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?d=!0:h.push(y.route.id);return d&&h.length>0&&f.searchParams.set("_routes",h.join(",")),[f.pathname+f.search]},[o,l.unstable_trailingSlashAwareDataRequests,e,r,t]);return M.createElement(M.Fragment,null,c.map(f=>M.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...i})))}function ZT({page:e,matches:t,...i}){let r=Mi(),{future:l,manifest:o,routeModules:c}=jm(),{basename:f}=Dm(),{loaderData:d,matches:h}=GT(),y=M.useMemo(()=>Rv(e,t,h,o,r,"data"),[e,t,h,o,r]),m=M.useMemo(()=>Rv(e,t,h,o,r,"assets"),[e,t,h,o,r]),v=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let _=new Set,w=!1;if(t.forEach(O=>{var I;let A=o.routes[O.route.id];!A||!A.hasLoader||(!y.some(q=>q.route.id===O.route.id)&&O.route.id in d&&((I=c[O.route.id])!=null&&I.shouldRevalidate)||A.hasClientLoader?w=!0:_.add(O.route.id))}),_.size===0)return[];let k=jE(e,f,l.unstable_trailingSlashAwareDataRequests,"data");return w&&_.size>0&&k.searchParams.set("_routes",t.filter(O=>_.has(O.route.id)).map(O=>O.route.id).join(",")),[k.pathname+k.search]},[f,l.unstable_trailingSlashAwareDataRequests,d,r,o,y,t,e,c]),x=M.useMemo(()=>$T(m,o),[m,o]),S=VT(m);return M.createElement(M.Fragment,null,v.map(_=>M.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...i})),x.map(_=>M.createElement("link",{key:_,rel:"modulepreload",href:_,...i})),S.map(({key:_,link:w})=>M.createElement("link",{key:_,nonce:i.nonce,...w,crossOrigin:w.crossOrigin??i.crossOrigin})))}function WT(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var JT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{JT&&(window.__reactRouterVersion="7.14.2")}catch{}function eC({basename:e,children:t,unstable_useTransitions:i,window:r}){let l=M.useRef();l.current==null&&(l.current=AN({window:r,v5Compat:!0}));let o=l.current,[c,f]=M.useState({action:o.action,location:o.location}),d=M.useCallback(h=>{i===!1?f(h):M.startTransition(()=>f(h))},[i]);return M.useLayoutEffect(()=>o.listen(d),[o,d]),M.createElement(CT,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:i})}var IE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Er=M.forwardRef(function({onClick:t,discover:i="render",prefetch:r="none",relative:l,reloadDocument:o,replace:c,unstable_mask:f,state:d,target:h,to:y,preventScrollReset:m,viewTransition:v,unstable_defaultShouldRevalidate:x,...S},_){let{basename:w,navigator:k,unstable_useTransitions:O}=M.useContext(ii),A=typeof y=="string"&&IE.test(y),I=wE(y,w);y=I.to;let q=cT(y,{relative:l}),T=Mi(),P=null;if(f){let J=Of(f,[],T.unstable_mask?T.unstable_mask.pathname:"/",!0);w!=="/"&&(J.pathname=J.pathname==="/"?w:Ai([w,J.pathname])),P=k.createHref(J)}let[j,X,D]=YT(r,S),$=iC(y,{replace:c,unstable_mask:f,state:d,target:h,preventScrollReset:m,relative:l,viewTransition:v,unstable_defaultShouldRevalidate:x,unstable_useTransitions:O});function Q(J){t&&t(J),J.defaultPrevented||$(J)}let se=!(I.isExternal||o),ae=M.createElement("a",{...S,...D,href:(se?P:void 0)||I.absoluteURL||q,onClick:se?Q:t,ref:WT(_,X),target:h,"data-discover":!A&&i==="render"?"true":void 0});return j&&!A?M.createElement(M.Fragment,null,ae,M.createElement(QT,{page:q})):ae});Er.displayName="Link";var zE=M.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:r="",end:l=!1,style:o,to:c,viewTransition:f,children:d,...h},y){let m=pc(c,{relative:h.relative}),v=Mi(),x=M.useContext(Rf),{navigator:S,basename:_}=M.useContext(ii),w=x!=null&&oC(m)&&f===!0,k=S.encodeLocation?S.encodeLocation(m).pathname:m.pathname,O=v.pathname,A=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(O=O.toLowerCase(),A=A?A.toLowerCase():null,k=k.toLowerCase()),A&&_&&(A=Na(A,_)||A);const I=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let q=O===k||!l&&O.startsWith(k)&&O.charAt(I)==="/",T=A!=null&&(A===k||!l&&A.startsWith(k)&&A.charAt(k.length)==="/"),P={isActive:q,isPending:T,isTransitioning:w},j=q?t:void 0,X;typeof r=="function"?X=r(P):X=[r,q?"active":null,T?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let D=typeof o=="function"?o(P):o;return M.createElement(Er,{...h,"aria-current":j,className:X,ref:y,style:D,to:c,viewTransition:f},typeof d=="function"?d(P):d)});zE.displayName="NavLink";var tC=M.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:r,replace:l,state:o,method:c=lf,action:f,onSubmit:d,relative:h,preventScrollReset:y,viewTransition:m,unstable_defaultShouldRevalidate:v,...x},S)=>{let{unstable_useTransitions:_}=M.useContext(ii),w=sC(),k=lC(f,{relative:h}),O=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&IE.test(f),I=q=>{if(d&&d(q),q.defaultPrevented)return;q.preventDefault();let T=q.nativeEvent.submitter,P=(T==null?void 0:T.getAttribute("formmethod"))||c,j=()=>w(T||q.currentTarget,{fetcherKey:t,method:P,navigate:i,replace:l,state:o,relative:h,preventScrollReset:y,viewTransition:m,unstable_defaultShouldRevalidate:v});_&&i!==!1?M.startTransition(()=>j()):j()};return M.createElement("form",{ref:S,method:O,action:k,onSubmit:r?d:I,...x,"data-discover":!A&&e==="render"?"true":void 0})});tC.displayName="Form";function nC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function BE(e){let t=M.useContext(Ml);return Ct(t,nC(e)),t}function iC(e,{target:t,replace:i,unstable_mask:r,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h}={}){let y=vr(),m=Mi(),v=pc(e,{relative:c});return M.useCallback(x=>{if(LT(x,t)){x.preventDefault();let S=i!==void 0?i:nc(m)===nc(v),_=()=>y(e,{replace:S,unstable_mask:r,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});h?M.startTransition(()=>_()):_()}},[m,y,v,i,r,l,t,e,o,c,f,d,h])}function Im(e){xi(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=M.useRef(em(e)),i=M.useRef(!1),r=Mi(),l=M.useMemo(()=>jT(r.search,i.current?null:t.current),[r.search]),o=vr(),c=M.useCallback((f,d)=>{const h=em(typeof f=="function"?f(new URLSearchParams(l)):f);i.current=!0,o("?"+h,d)},[o,l]);return[l,c]}var aC=0,rC=()=>`__${String(++aC)}__`;function sC(){let{router:e}=BE("useSubmit"),{basename:t}=M.useContext(ii),i=ST(),r=e.fetch,l=e.navigate;return M.useCallback(async(o,c={})=>{let{action:f,method:d,encType:h,formData:y,body:m}=BT(o,t);if(c.navigate===!1){let v=c.fetcherKey||rC();await r(v,i,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:m,formMethod:c.method||d,formEncType:c.encType||h,flushSync:c.flushSync})}else await l(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:m,formMethod:c.method||d,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,l,t,i])}function lC(e,{relative:t}={}){let{basename:i}=M.useContext(ii),r=M.useContext(Ei);Ct(r,"useFormAction must be used inside a RouteContext");let[l]=r.matches.slice(-1),o={...pc(e||".",{relative:t})},c=Mi();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),d=f.getAll("index");if(d.some(y=>y==="")){f.delete("index"),d.filter(m=>m).forEach(m=>f.append("index",m));let y=f.toString();o.search=y?`?${y}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(o.pathname=o.pathname==="/"?i:Ai([i,o.pathname])),nc(o)}function oC(e,{relative:t}={}){let i=M.useContext(TE);Ct(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=BE("useViewTransitionState"),l=pc(e,{relative:t});if(!i.isTransitioning)return!1;let o=Na(i.currentLocation.pathname,r)||i.currentLocation.pathname,c=Na(i.nextLocation.pathname,r)||i.nextLocation.pathname;return gf(l.pathname,c)!=null||gf(l.pathname,o)!=null}/**
61
+ * @license lucide-react v0.544.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const cC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),uC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,r)=>r?r.toUpperCase():i.toLowerCase()),Mv=e=>{const t=uC(e);return t.charAt(0).toUpperCase()+t.slice(1)},UE=(...e)=>e.filter((t,i,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===i).join(" ").trim(),fC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
66
+ * @license lucide-react v0.544.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */var dC={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"};/**
71
+ * @license lucide-react v0.544.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const hC=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:l="",children:o,iconNode:c,...f},d)=>M.createElement("svg",{ref:d,...dC,width:t,height:t,stroke:e,strokeWidth:r?Number(i)*24/Number(t):i,className:UE("lucide",l),...!o&&!fC(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,y])=>M.createElement(h,y)),...Array.isArray(o)?o:[o]]));/**
76
+ * @license lucide-react v0.544.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const De=(e,t)=>{const i=M.forwardRef(({className:r,...l},o)=>M.createElement(hC,{ref:o,iconNode:t,className:UE(`lucide-${cC(Mv(e))}`,`lucide-${e}`,r),...l}));return i.displayName=Mv(e),i};/**
81
+ * @license lucide-react v0.544.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const pC=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],FE=De("activity",pC);/**
86
+ * @license lucide-react v0.544.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const mC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],PE=De("arrow-left",mC);/**
91
+ * @license lucide-react v0.544.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const gC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],bC=De("check",gC);/**
96
+ * @license lucide-react v0.544.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const yC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zm=De("chevron-down",yC);/**
101
+ * @license lucide-react v0.544.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const xC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$E=De("chevron-right",xC);/**
106
+ * @license lucide-react v0.544.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const vC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],EC=De("chevron-up",vC);/**
111
+ * @license lucide-react v0.544.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const SC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Bm=De("circle-alert",SC);/**
116
+ * @license lucide-react v0.544.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const _C=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],wC=De("circle-check-big",_C);/**
121
+ * @license lucide-react v0.544.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const kC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],qE=De("circle-check",kC);/**
126
+ * @license lucide-react v0.544.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const NC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],TC=De("circle-x",NC);/**
131
+ * @license lucide-react v0.544.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const CC=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],HE=De("download",CC);/**
136
+ * @license lucide-react v0.544.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const AC=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Dv=De("file-code",AC);/**
141
+ * @license lucide-react v0.544.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const OC=[["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"}]],Um=De("file-text",OC);/**
146
+ * @license lucide-react v0.544.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const RC=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],MC=De("flame",RC);/**
151
+ * @license lucide-react v0.544.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const DC=[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],LC=De("folder-git-2",DC);/**
156
+ * @license lucide-react v0.544.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const jC=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],IC=De("funnel",jC);/**
161
+ * @license lucide-react v0.544.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const zC=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],BC=De("git-branch",zC);/**
166
+ * @license lucide-react v0.544.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const UC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],FC=De("globe",UC);/**
171
+ * @license lucide-react v0.544.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const PC=[["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"}]],$C=De("history",PC);/**
176
+ * @license lucide-react v0.544.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const qC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],HC=De("info",qC);/**
181
+ * @license lucide-react v0.544.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const KC=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],GC=De("kanban",KC);/**
186
+ * @license lucide-react v0.544.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const YC=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],QC=De("layout-grid",YC);/**
191
+ * @license lucide-react v0.544.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const VC=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],XC=De("link",VC);/**
196
+ * @license lucide-react v0.544.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const ZC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ri=De("loader-circle",ZC);/**
201
+ * @license lucide-react v0.544.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const WC=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Lv=De("message-circle",WC);/**
206
+ * @license lucide-react v0.544.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const JC=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],eA=De("message-square",JC);/**
211
+ * @license lucide-react v0.544.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const tA=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],nA=De("pause",tA);/**
216
+ * @license lucide-react v0.544.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const iA=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],KE=De("pen-line",iA);/**
221
+ * @license lucide-react v0.544.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const aA=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Fm=De("play",aA);/**
226
+ * @license lucide-react v0.544.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const rA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],fs=De("plus",rA);/**
231
+ * @license lucide-react v0.544.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const sA=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],GE=De("radio",sA);/**
236
+ * @license lucide-react v0.544.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const lA=[["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"}]],Ll=De("refresh-cw",lA);/**
241
+ * @license lucide-react v0.544.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const oA=[["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"}]],Df=De("rotate-ccw",oA);/**
246
+ * @license lucide-react v0.544.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const cA=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Pm=De("save",cA);/**
251
+ * @license lucide-react v0.544.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const uA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yf=De("search",uA);/**
256
+ * @license lucide-react v0.544.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const fA=[["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"}]],dA=De("send",fA);/**
261
+ * @license lucide-react v0.544.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const hA=[["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"}]],YE=De("settings",hA);/**
266
+ * @license lucide-react v0.544.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const pA=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],mA=De("snowflake",pA);/**
271
+ * @license lucide-react v0.544.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const gA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],QE=De("square",gA);/**
276
+ * @license lucide-react v0.544.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const bA=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],yA=De("terminal",bA);/**
281
+ * @license lucide-react v0.544.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const xA=[["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"}]],mc=De("trash-2",xA);/**
286
+ * @license lucide-react v0.544.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const vA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],VE=De("users",vA);/**
291
+ * @license lucide-react v0.544.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const EA=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],XE=De("workflow",EA);/**
296
+ * @license lucide-react v0.544.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const SA=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],_A=De("wrench",SA);/**
301
+ * @license lucide-react v0.544.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const wA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gc=De("x",wA);/**
306
+ * @license lucide-react v0.544.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const kA=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ZE=De("zap",kA),NA=[{to:"/chat",label:"对话",icon:eA},{to:"/projects",label:"项目",icon:QC},{to:"/board",label:"看板",icon:GC},{to:"/workers",label:"Workers",icon:VE},{to:"/logs",label:"Logs",icon:Um},{to:"/skills",label:"Skills",icon:FC},{to:"/system",label:"系统",icon:YE}];function TA(){return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"font-[family-name:var(--font-heading)] font-bold text-lg px-3 pt-2 pb-4 flex items-center gap-3 text-[var(--color-text)]",children:[g.jsx("span",{className:"w-5 h-5 rounded-md bg-[var(--color-accent-mint)] border-2 border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]"}),"SPS Console",g.jsx("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] font-normal",children:"v0.44"})]}),g.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":"主导航",children:NA.map(e=>{const t=e.icon;return g.jsxs(zE,{to:e.to,className:({isActive:i})=>["flex items-center gap-3 px-3 py-2.5 rounded-xl font-semibold text-sm cursor-pointer transition-transform duration-150","border-2 border-transparent",i?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"text-[var(--color-text)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)] hover:shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px"].join(" "),children:[g.jsx(t,{size:18,strokeWidth:2.5}),e.label]},e.to)})})]})}class CA extends Error{constructor(t,i,r){super(i),this.status=t,this.detail=r,this.name="ApiError"}}async function qt(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok){let i;try{i=await t.json()}catch{i=await t.text()}throw new CA(t.status,`${t.status} ${t.statusText}`,i)}return await t.json()}function WE(){return qt("/api/system/info")}function AA(){return qt("/api/system/env")}function OA(){return qt("/api/system/doctor/all")}function RA(){return qt("/api/system/env/raw")}async function MA(e,t){const i=await fetch("/api/system/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,etag:t})});if(!i.ok){const r=await i.text(),l=new Error(`${i.status}: ${r}`);throw l.status=i.status,l}return i.json()}function DA(){return qt("/api/system/latest-version")}async function LA(){const e=await fetch("/api/system/upgrade",{method:"POST"});if(!e.ok&&e.status!==409)throw new Error(`${e.status}: ${await e.text()}`);return e.json()}function bc(){return qt("/api/projects")}function jA(e){return qt(`/api/projects/${encodeURIComponent(e)}`)}async function IA(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const i=await t.text();throw new Error(`${t.status}: ${i}`)}return t.json()}function zA(e){return qt(`/api/projects/${encodeURIComponent(e)}/conf`)}async function BA(e,t,i){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/conf`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,etag:i})});if(!r.ok){const l=await r.text(),o=new Error(`${r.status}: ${l}`);throw o.status=r.status,o}return r.json()}async function UA(e,t={}){const i=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok){const r=await i.text();throw new Error(`${i.status}: ${r}`)}return i.json()}function FA(e){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function PA(e,t){const i=await fetch(`/api/projects/${encodeURIComponent(e)}/pipeline`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipeline:t})});if(!i.ok){const r=await i.text();throw new Error(`${i.status}: ${r}`)}return i.json()}function $A(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function qA(e,t,i,r){const l=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:i,etag:r})});if(!l.ok){const o=await l.text(),c=new Error(`${l.status}: ${o}`);throw c.status=l.status,c}return l.json()}async function HA(e,t,i="blank"){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,template:i})});if(!r.ok){const l=await r.text();throw new Error(`${r.status}: ${l}`)}return r.json()}async function KA(e,t){const i=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"DELETE"});if(!i.ok){const r=await i.text();throw new Error(`${i.status}: ${r}`)}}function GA(){var f;const e=kt({queryKey:["system-info"],queryFn:WE,refetchInterval:3e4}),t=kt({queryKey:["projects"],queryFn:bc,refetchInterval:1e4}),i=QA(),r=!e.isError,l=((f=t.data)==null?void 0:f.data)??[],o=l.filter(d=>d.pipelineStatus==="running").length,c=l.reduce((d,h)=>d+h.workers.active,0);return g.jsxs("div",{className:"h-10 flex items-center gap-3 px-6 font-[family-name:var(--font-mono)] text-[11px] text-[var(--color-text-muted)]",children:[g.jsx("span",{className:"nb-status",style:{background:r?"var(--color-running-bg)":"var(--color-crashed-bg)",color:r?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:r?"server":"offline"}),g.jsx(YA,{state:i}),g.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),g.jsxs("span",{className:"flex items-center gap-1",title:"活跃 pipeline 数",children:[g.jsx(FE,{size:10,strokeWidth:2.5}),g.jsx("span",{className:"font-bold text-[var(--color-text)]",children:o})," pipeline"]}),g.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),g.jsxs("span",{className:"flex items-center gap-1",title:"活跃 worker 数",children:[g.jsx(GE,{size:10,strokeWidth:2.5}),g.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," worker"]}),g.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),g.jsxs("span",{children:["localhost:",window.location.port]}),e.data&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),g.jsxs("span",{children:["v",e.data.version]}),g.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),g.jsxs("span",{children:["node ",e.data.nodeVersion]})]})]})}function YA({state:e}){return e==="open"?g.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:"SSE"}):e==="connecting"?g.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:"SSE·connect"}):g.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[g.jsx(Bm,{size:9,strokeWidth:2.5}),"SSE·down"]})}function QA(){const[e,t]=M.useState("connecting"),i=M.useRef(null);return M.useEffect(()=>{const r=new EventSource("/stream/heartbeat");return i.current=r,r.addEventListener("server.heartbeat",()=>t("open")),r.addEventListener("error",()=>t("closed")),r.addEventListener("open",()=>t("open")),()=>{r.close(),i.current=null}},[]),e}function VA(){return g.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] min-h-screen",children:[g.jsx("aside",{className:"row-span-1 row-start-1 border-r-[3px] border-[var(--color-text)] bg-[var(--color-bg)] p-4 flex flex-col",children:g.jsx(TA,{})}),g.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:g.jsx(TT,{})}),g.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:g.jsx(GA,{})})]})}function tm(e,t){try{const i=JSON.stringify({message:(e instanceof Error?e.message:String(e)).slice(0,1e3),stack:(e instanceof Error?e.stack??"":"").slice(0,4e3),url:typeof window<"u"?window.location.href:"",ua:typeof navigator<"u"?navigator.userAgent:"",ts:new Date().toISOString(),context:t==null?void 0:t.slice(0,200)});fetch("/api/system/client-errors",{method:"POST",headers:{"Content-Type":"application/json"},body:i,keepalive:!0}).catch(()=>{})}catch{}}function XA(){typeof window>"u"||(window.addEventListener("error",e=>{tm(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;tm(t instanceof Error?t:String(t),"unhandledrejection")}))}class ZA extends M.Component{constructor(){super(...arguments);iv(this,"state",{error:null})}static getDerivedStateFromError(i){return{error:i}}componentDidCatch(i,r){var l;tm(i,`ErrorBoundary: ${((l=r.componentStack)==null?void 0:l.slice(0,200))??""}`),console.error("[ErrorBoundary]",i,r)}render(){return this.state.error?g.jsx("div",{className:"p-6",children:g.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"💥 UI 崩了"}),g.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),g.jsxs("details",{className:"text-xs mb-4",children:[g.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),g.jsx("pre",{className:"mt-2 font-[family-name:var(--font-mono)] overflow-auto max-h-60 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md p-3",children:this.state.error.stack??"(no stack)"})]}),g.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:"刷新页面"})]})}):this.props.children}}function WA(){const e=vr(),{data:t,isLoading:i,isError:r,error:l,refetch:o}=kt({queryKey:["projects"],queryFn:bc});return g.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[g.jsxs("header",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"项目 🎯"}),g.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:t?`${t.data.length} 个本机项目`:i?"加载中…":"点击刷新重试"})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>o(),type:"button",children:[g.jsx(FE,{size:16,strokeWidth:2.5}),"刷新"]}),g.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>e("/projects/new"),"aria-label":"新建项目",children:[g.jsx(fs,{size:16,strokeWidth:3}),"新建项目"]})]})]}),i&&g.jsx(tO,{}),r&&g.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:"加载失败"}),g.jsx("p",{className:"text-sm text-[var(--color-text)]",children:l instanceof Error?l.message:String(l)}),g.jsx("button",{className:"nb-btn mt-4",onClick:()=>o(),type:"button",children:"重试"})]}),t&&t.data.length===0&&g.jsx(nO,{}),t&&t.data.length>0&&g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.data.map(c=>g.jsx(JA,{project:c},c.name))})]})}function JA({project:e}){const t=e.pipelineStatus==="running";return g.jsxs(Er,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[g.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),g.jsx(eO,{status:e.pipelineStatus})]}),e.repoDir&&g.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),g.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm mt-4 pt-3 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[g.jsx(up,{label:"cards",value:e.cards.total,accent:"purple"}),g.jsx(up,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),g.jsx(up,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function up({label:e,value:t,accent:i}){const r={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return g.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:r[i]},children:[g.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),g.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function eO({status:e}){const t={running:{bg:"var(--color-running-bg)",label:"running"},idle:{bg:"var(--color-idle-bg)",label:"idle"},stopping:{bg:"var(--color-stuck-bg)",label:"stopping"},error:{bg:"var(--color-crashed-bg)",label:"error"}},{bg:i,label:r}=t[e],l=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return g.jsx("span",{className:"nb-status",style:{background:i,color:l},children:r})}function tO(){return g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>g.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[g.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),g.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),g.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function nO(){return g.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[g.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center",children:g.jsx(VE,{size:32,strokeWidth:2.5})}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"还没有项目 ✨"}),g.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:["运行 ",g.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded-md font-[family-name:var(--font-mono)]",children:"sps project init <name>"})," 创建第一个项目。"]}),g.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[g.jsx(fs,{size:16,strokeWidth:3}),"新建项目"]})]})]})}function iO({title:e,body:t,confirm:i,onConfirm:r,onCancel:l,danger:o}){return M.useEffect(()=>{const c=f=>{f.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[l]),g.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:l,children:g.jsxs("div",{onClick:c=>c.stopPropagation(),className:"nb-card max-w-md w-full",children:[g.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),g.jsxs("div",{className:"flex gap-3 justify-end",children:[g.jsx("button",{className:"nb-btn",onClick:l,type:"button",children:"取消"}),g.jsx("button",{className:o?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await r()},type:"button",children:i})]})]})})}const JE=M.createContext(null);function aO({children:e}){const[t,i]=M.useState(null),r=M.useCallback(c=>new Promise(f=>{i({kind:"confirm",opts:c,resolve:d=>{i(null),f(d)}})}),[]),l=M.useCallback(c=>new Promise(f=>{i({kind:"alert",opts:c,resolve:()=>{i(null),f()}})}),[]),o=M.useCallback(c=>new Promise(f=>{i({kind:"prompt",opts:c,resolve:d=>{i(null),f(d)}})}),[]);return g.jsxs(JE.Provider,{value:{confirm:r,alert:l,prompt:o},children:[e,(t==null?void 0:t.kind)==="confirm"&&g.jsx(iO,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"确定",danger:t.opts.danger,onConfirm:()=>t.resolve(!0),onCancel:()=>t.resolve(!1)}),(t==null?void 0:t.kind)==="alert"&&g.jsx(rO,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"知道了",onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&g.jsx(sO,{title:t.opts.title,body:t.opts.body,placeholder:t.opts.placeholder,defaultValue:t.opts.defaultValue,confirm:t.opts.confirm??"确定",cancel:t.opts.cancel??"取消",onConfirm:c=>t.resolve(c),onCancel:()=>t.resolve(null)})]})}function ai(){const e=M.useContext(JE);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function rO({title:e,body:t,confirm:i,onClose:r}){return M.useEffect(()=>{const l=o=>{(o.key==="Escape"||o.key==="Enter")&&r()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[r]),g.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:r,children:g.jsxs("div",{onClick:l=>l.stopPropagation(),className:"nb-card max-w-md w-full",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),g.jsx("div",{className:"flex gap-3 justify-end",children:g.jsx("button",{className:"nb-btn nb-btn-primary",onClick:r,type:"button",autoFocus:!0,children:i})})]})})}function sO({title:e,body:t,placeholder:i,defaultValue:r,confirm:l,cancel:o,onConfirm:c,onCancel:f}){const[d,h]=M.useState(r??""),y=M.useRef(null);M.useEffect(()=>{var x,S;(x=y.current)==null||x.focus(),(S=y.current)==null||S.select();const v=_=>{_.key==="Escape"&&f()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[f]);const m=()=>{const v=d.trim();v&&c(v)};return g.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:f,children:g.jsxs("div",{onClick:v=>v.stopPropagation(),className:"nb-card max-w-md w-full",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),g.jsx("input",{ref:y,type:"text",className:"nb-input w-full mb-5",placeholder:i,value:d,onChange:v=>h(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&(v.preventDefault(),m())}}),g.jsxs("div",{className:"flex gap-3 justify-end",children:[g.jsx("button",{className:"nb-btn",onClick:f,type:"button",children:o}),g.jsx("button",{className:"nb-btn nb-btn-primary",onClick:m,type:"button",disabled:!d.trim(),children:l})]})]})})}function lO(){const e=vr(),t=ni(),{alert:i}=ai(),[r,l]=M.useState({name:"",projectDir:"",mergeBranch:"main",maxWorkers:"1"}),o=br({mutationFn:d=>IA(d),onSuccess:d=>{t.invalidateQueries({queryKey:["projects"]}),e(`/projects/${encodeURIComponent(d.name)}`)},onError:d=>{i({title:"创建失败",body:d instanceof Error?d.message:String(d)})}}),c=/^[a-zA-Z0-9_-]+$/.test(r.name),f=c&&r.projectDir.trim()!==""&&!o.isPending;return g.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[g.jsxs("header",{className:"flex items-center gap-3",children:[g.jsxs("button",{type:"button",onClick:()=>e("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[g.jsx(PE,{size:14,strokeWidth:3}),"返回"]}),g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:"新建项目"})]}),g.jsx("div",{className:"nb-card",children:g.jsxs("form",{onSubmit:d=>{d.preventDefault(),f&&o.mutate(r)},className:"flex flex-col gap-5",children:[g.jsxs(Gr,{label:"项目名",hint:"只能用字母、数字、下划线、连字符。例如 acme-web",children:[g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如: acme-web",value:r.name,onChange:d=>l({...r,name:d.target.value}),autoFocus:!0,required:!0}),r.name&&!c&&g.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:"名称只能包含 a-z A-Z 0-9 _ -"})]}),g.jsx(Gr,{label:"Git 仓库路径",hint:"本机绝对路径,如 /home/coral/code/acme",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"/home/coral/code/acme",value:r.projectDir,onChange:d=>l({...r,projectDir:d.target.value}),required:!0})}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsx(Gr,{label:"合并分支",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:r.mergeBranch,onChange:d=>l({...r,mergeBranch:d.target.value})})}),g.jsx(Gr,{label:"最大 Worker 数",children:g.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:r.maxWorkers,onChange:d=>l({...r,maxWorkers:d.target.value})})})]}),g.jsxs("div",{className:"pt-2 border-t-2 border-[var(--color-text)] border-dashed",children:[g.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:"可选配置"}),g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx(Gr,{label:"Git 远程项目路径",hint:"如 user/repo,空则跳过 Git API",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"user/repo",value:r.gitlabProject??"",onChange:d=>l({...r,gitlabProject:d.target.value})})}),r.gitlabProject&&g.jsx(Gr,{label:"GitLab 项目 ID",hint:"数字,GitHub 用户可留空",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"42",value:r.gitlabProjectId??"",onChange:d=>l({...r,gitlabProjectId:d.target.value})})}),g.jsx(Gr,{label:"Matrix 房间 ID",hint:"空则使用全局配置",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"!abc:matrix.example.com",value:r.matrixRoomId??"",onChange:d=>l({...r,matrixRoomId:d.target.value})})})]})]}),g.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[g.jsx("button",{type:"button",className:"nb-btn",onClick:()=>e("/projects"),disabled:o.isPending,children:"取消"}),g.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!f,"aria-label":"创建项目",children:o.isPending?g.jsxs(g.Fragment,{children:[g.jsx(Ri,{size:14,strokeWidth:3,className:"animate-spin"}),"创建中…"]}):g.jsxs(g.Fragment,{children:[g.jsx(fs,{size:14,strokeWidth:3}),"创建"]})})]})]})})]})}function Gr({label:e,hint:t,children:i}){return g.jsxs("label",{className:"flex flex-col gap-1.5",children:[g.jsx("span",{className:"text-sm font-bold",children:e}),i,t&&g.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const $m=Symbol.for("yaml.alias"),nm=Symbol.for("yaml.document"),yr=Symbol.for("yaml.map"),e1=Symbol.for("yaml.pair"),Qi=Symbol.for("yaml.scalar"),jl=Symbol.for("yaml.seq"),vi=Symbol.for("yaml.node.type"),Sr=e=>!!e&&typeof e=="object"&&e[vi]===$m,ds=e=>!!e&&typeof e=="object"&&e[vi]===nm,Il=e=>!!e&&typeof e=="object"&&e[vi]===yr,At=e=>!!e&&typeof e=="object"&&e[vi]===e1,xt=e=>!!e&&typeof e=="object"&&e[vi]===Qi,zl=e=>!!e&&typeof e=="object"&&e[vi]===jl;function Mt(e){if(e&&typeof e=="object")switch(e[vi]){case yr:case jl:return!0}return!1}function Dt(e){if(e&&typeof e=="object")switch(e[vi]){case $m:case yr:case Qi:case jl:return!0}return!1}const t1=e=>(xt(e)||Mt(e))&&!!e.anchor,Un=Symbol("break visit"),n1=Symbol("skip children"),Yi=Symbol("remove node");function hs(e,t){const i=i1(t);ds(e)?ol(null,e.contents,i,Object.freeze([e]))===Yi&&(e.contents=null):ol(null,e,i,Object.freeze([]))}hs.BREAK=Un;hs.SKIP=n1;hs.REMOVE=Yi;function ol(e,t,i,r){const l=a1(e,t,i,r);if(Dt(l)||At(l))return r1(e,r,l),ol(e,l,i,r);if(typeof l!="symbol"){if(Mt(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){const c=ol(o,t.items[o],i,r);if(typeof c=="number")o=c-1;else{if(c===Un)return Un;c===Yi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){r=Object.freeze(r.concat(t));const o=ol("key",t.key,i,r);if(o===Un)return Un;o===Yi&&(t.key=null);const c=ol("value",t.value,i,r);if(c===Un)return Un;c===Yi&&(t.value=null)}}return l}async function Lf(e,t){const i=i1(t);ds(e)?await cl(null,e.contents,i,Object.freeze([e]))===Yi&&(e.contents=null):await cl(null,e,i,Object.freeze([]))}Lf.BREAK=Un;Lf.SKIP=n1;Lf.REMOVE=Yi;async function cl(e,t,i,r){const l=await a1(e,t,i,r);if(Dt(l)||At(l))return r1(e,r,l),cl(e,l,i,r);if(typeof l!="symbol"){if(Mt(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){const c=await cl(o,t.items[o],i,r);if(typeof c=="number")o=c-1;else{if(c===Un)return Un;c===Yi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){r=Object.freeze(r.concat(t));const o=await cl("key",t.key,i,r);if(o===Un)return Un;o===Yi&&(t.key=null);const c=await cl("value",t.value,i,r);if(c===Un)return Un;c===Yi&&(t.value=null)}}return l}function i1(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function a1(e,t,i,r){var l,o,c,f,d;if(typeof i=="function")return i(e,t,r);if(Il(t))return(l=i.Map)==null?void 0:l.call(i,e,t,r);if(zl(t))return(o=i.Seq)==null?void 0:o.call(i,e,t,r);if(At(t))return(c=i.Pair)==null?void 0:c.call(i,e,t,r);if(xt(t))return(f=i.Scalar)==null?void 0:f.call(i,e,t,r);if(Sr(t))return(d=i.Alias)==null?void 0:d.call(i,e,t,r)}function r1(e,t,i){const r=t[t.length-1];if(Mt(r))r.items[e]=i;else if(At(r))e==="key"?r.key=i:r.value=i;else if(ds(r))r.contents=i;else{const l=Sr(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const oO={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},cO=e=>e.replace(/[!,[\]{}]/g,t=>oO[t]);class wn{constructor(t,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},wn.defaultYaml,t),this.tags=Object.assign({},wn.defaultTags,i)}clone(){const t=new wn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new wn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:wn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},wn.defaultTags);break}return t}add(t,i){this.atNextDocument&&(this.yaml={explicit:wn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},wn.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),l=r.shift();switch(l){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[o,c]=r;return this.tags[o]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const c=/^\d+\.\d+$/.test(o);return i(6,`Unsupported YAML version ${o}`,c),!1}}default:return i(0,`Unknown directive ${l}`,!0),!1}}tagName(t,i){if(t==="!")return"!";if(t[0]!=="!")return i(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const c=t.slice(2,-1);return c==="!"||c==="!!"?(i(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&i("Verbatim tags must end with a >"),c)}const[,r,l]=t.match(/^(.*!)([^!]*)$/s);l||i(`The ${t} tag has no suffix`);const o=this.tags[r];if(o)try{return o+decodeURIComponent(l)}catch(c){return i(String(c)),null}return r==="!"?t:(i(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[i,r]of Object.entries(this.tags))if(t.startsWith(r))return i+cO(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let l;if(t&&r.length>0&&Dt(t.contents)){const o={};hs(t.contents,(c,f)=>{Dt(f)&&f.tag&&(o[f.tag]=!0)}),l=Object.keys(o)}else l=[];for(const[o,c]of r)o==="!!"&&c==="tag:yaml.org,2002:"||(!t||l.some(f=>f.startsWith(c)))&&i.push(`%TAG ${o} ${c}`);return i.join(`
311
+ `)}}wn.defaultYaml={explicit:!1,version:"1.2"};wn.defaultTags={"!!":"tag:yaml.org,2002:"};function s1(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(i)}return!0}function l1(e){const t=new Set;return hs(e,{Value(i,r){r.anchor&&t.add(r.anchor)}}),t}function o1(e,t){for(let i=1;;++i){const r=`${e}${i}`;if(!t.has(r))return r}}function uO(e,t){const i=[],r=new Map;let l=null;return{onAnchor:o=>{i.push(o),l??(l=l1(e));const c=o1(t,l);return l.add(c),c},setAnchors:()=>{for(const o of i){const c=r.get(o);if(typeof c=="object"&&c.anchor&&(xt(c.node)||Mt(c.node)))c.node.anchor=c.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:r}}function ul(e,t,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let l=0,o=r.length;l<o;++l){const c=r[l],f=ul(e,r,String(l),c);f===void 0?delete r[l]:f!==c&&(r[l]=f)}else if(r instanceof Map)for(const l of Array.from(r.keys())){const o=r.get(l),c=ul(e,r,l,o);c===void 0?r.delete(l):c!==o&&r.set(l,c)}else if(r instanceof Set)for(const l of Array.from(r)){const o=ul(e,r,l,l);o===void 0?r.delete(l):o!==l&&(r.delete(l),r.add(o))}else for(const[l,o]of Object.entries(r)){const c=ul(e,r,l,o);c===void 0?delete r[l]:c!==o&&(r[l]=c)}return e.call(t,i,r)}function yi(e,t,i){if(Array.isArray(e))return e.map((r,l)=>yi(r,String(l),i));if(e&&typeof e.toJSON=="function"){if(!i||!t1(e))return e.toJSON(t,i);const r={aliasCount:0,count:1,res:void 0};i.anchors.set(e,r),i.onCreate=o=>{r.res=o,delete i.onCreate};const l=e.toJSON(t,i);return i.onCreate&&i.onCreate(l),l}return typeof e=="bigint"&&!(i!=null&&i.keep)?Number(e):e}class qm{constructor(t){Object.defineProperty(this,vi,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:i,maxAliasCount:r,onAnchor:l,reviver:o}={}){if(!ds(t))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:t,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},f=yi(this,"",c);if(typeof l=="function")for(const{count:d,res:h}of c.anchors.values())l(h,d);return typeof o=="function"?ul(o,{"":f},"",f):f}}class jf extends qm{constructor(t){super($m),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,i){let r;i!=null&&i.aliasResolveCache?r=i.aliasResolveCache:(r=[],hs(t,{Node:(o,c)=>{(Sr(c)||t1(c))&&r.push(c)}}),i&&(i.aliasResolveCache=r));let l;for(const o of r){if(o===this)break;o.anchor===this.source&&(l=o)}return l}toJSON(t,i){if(!i)return{source:this.source};const{anchors:r,doc:l,maxAliasCount:o}=i,c=this.resolve(l,i);if(!c){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=r.get(c);if(f||(yi(c,null,i),f=r.get(c)),(f==null?void 0:f.res)===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=cf(l,c,r)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(t,i,r){const l=`*${this.source}`;if(t){if(s1(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${l} `}return l}}function cf(e,t,i){if(Sr(t)){const r=t.resolve(e),l=i&&r&&i.get(r);return l?l.count*l.aliasCount:0}else if(Mt(t)){let r=0;for(const l of t.items){const o=cf(e,l,i);o>r&&(r=o)}return r}else if(At(t)){const r=cf(e,t.key,i),l=cf(e,t.value,i);return Math.max(r,l)}return 1}const c1=e=>!e||typeof e!="function"&&typeof e!="object";class je extends qm{constructor(t){super(Qi),this.value=t}toJSON(t,i){return i!=null&&i.keep?this.value:yi(this.value,t,i)}toString(){return String(this.value)}}je.BLOCK_FOLDED="BLOCK_FOLDED";je.BLOCK_LITERAL="BLOCK_LITERAL";je.PLAIN="PLAIN";je.QUOTE_DOUBLE="QUOTE_DOUBLE";je.QUOTE_SINGLE="QUOTE_SINGLE";const fO="tag:yaml.org,2002:";function dO(e,t,i){if(t){const r=i.filter(o=>o.tag===t),l=r.find(o=>!o.format)??r[0];if(!l)throw new Error(`Tag ${t} not found`);return l}return i.find(r=>{var l;return((l=r.identify)==null?void 0:l.call(r,e))&&!r.format})}function ic(e,t,i){var m,v,x;if(ds(e)&&(e=e.contents),Dt(e))return e;if(At(e)){const S=(v=(m=i.schema[yr]).createNode)==null?void 0:v.call(m,i.schema,null,i);return S.items.push(e),S}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:l,onTagObj:o,schema:c,sourceObjects:f}=i;let d;if(r&&e&&typeof e=="object"){if(d=f.get(e),d)return d.anchor??(d.anchor=l(e)),new jf(d.anchor);d={anchor:null,node:null},f.set(e,d)}t!=null&&t.startsWith("!!")&&(t=fO+t.slice(2));let h=dO(e,t,c.tags);if(!h){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const S=new je(e);return d&&(d.node=S),S}h=e instanceof Map?c[yr]:Symbol.iterator in Object(e)?c[jl]:c[yr]}o&&(o(h),delete i.onTagObj);const y=h!=null&&h.createNode?h.createNode(i.schema,e,i):typeof((x=h==null?void 0:h.nodeClass)==null?void 0:x.from)=="function"?h.nodeClass.from(i.schema,e,i):new je(e);return t?y.tag=t:h.default||(y.tag=h.tag),d&&(d.node=y),y}function xf(e,t,i){let r=i;for(let l=t.length-1;l>=0;--l){const o=t[l];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const c=[];c[o]=r,r=c}else r=new Map([[o,r]])}return ic(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Vo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class u1 extends qm{constructor(t,i){super(t),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(t){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(i.schema=t),i.items=i.items.map(r=>Dt(r)||At(r)?r.clone(t):r),this.range&&(i.range=this.range.slice()),i}addIn(t,i){if(Vo(t))this.add(i);else{const[r,...l]=t,o=this.get(r,!0);if(Mt(o))o.addIn(l,i);else if(o===void 0&&this.schema)this.set(r,xf(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}deleteIn(t){const[i,...r]=t;if(r.length===0)return this.delete(i);const l=this.get(i,!0);if(Mt(l))return l.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(t,i){const[r,...l]=t,o=this.get(r,!0);return l.length===0?!i&&xt(o)?o.value:o:Mt(o)?o.getIn(l,i):void 0}hasAllNullValues(t){return this.items.every(i=>{if(!At(i))return!1;const r=i.value;return r==null||t&&xt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[i,...r]=t;if(r.length===0)return this.has(i);const l=this.get(i,!0);return Mt(l)?l.hasIn(r):!1}setIn(t,i){const[r,...l]=t;if(l.length===0)this.set(r,i);else{const o=this.get(r,!0);if(Mt(o))o.setIn(l,i);else if(o===void 0&&this.schema)this.set(r,xf(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}}const hO=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function _a(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Xr=(e,t,i)=>e.endsWith(`
312
+ `)?_a(i,t):i.includes(`
313
+ `)?`
314
+ `+_a(i,t):(e.endsWith(" ")?"":" ")+i,f1="flow",im="block",uf="quoted";function If(e,t,i="flow",{indentAtStart:r,lineWidth:l=80,minContentWidth:o=20,onFold:c,onOverflow:f}={}){if(!l||l<0)return e;l<o&&(o=0);const d=Math.max(1+o,1+l-t.length);if(e.length<=d)return e;const h=[],y={};let m=l-t.length;typeof r=="number"&&(r>l-Math.max(2,o)?h.push(0):m=l-r);let v,x,S=!1,_=-1,w=-1,k=-1;i===im&&(_=jv(e,_,t.length),_!==-1&&(m=_+d));for(let A;A=e[_+=1];){if(i===uf&&A==="\\"){switch(w=_,e[_+1]){case"x":_+=3;break;case"u":_+=5;break;case"U":_+=9;break;default:_+=1}k=_}if(A===`
315
+ `)i===im&&(_=jv(e,_,t.length)),m=_+t.length+d,v=void 0;else{if(A===" "&&x&&x!==" "&&x!==`
316
+ `&&x!==" "){const I=e[_+1];I&&I!==" "&&I!==`
317
+ `&&I!==" "&&(v=_)}if(_>=m)if(v)h.push(v),m=v+d,v=void 0;else if(i===uf){for(;x===" "||x===" ";)x=A,A=e[_+=1],S=!0;const I=_>k+1?_-2:w-1;if(y[I])return e;h.push(I),y[I]=!0,m=I+d,v=void 0}else S=!0}x=A}if(S&&f&&f(),h.length===0)return e;c&&c();let O=e.slice(0,h[0]);for(let A=0;A<h.length;++A){const I=h[A],q=h[A+1]||e.length;I===0?O=`
318
+ ${t}${e.slice(0,q)}`:(i===uf&&y[I]&&(O+=`${e[I]}\\`),O+=`
319
+ ${t}${e.slice(I+1,q)}`)}return O}function jv(e,t,i){let r=t,l=t+1,o=e[l];for(;o===" "||o===" ";)if(t<l+i)o=e[++t];else{do o=e[++t];while(o&&o!==`
320
+ `);r=t,l=t+1,o=e[l]}return r}const zf=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Bf=e=>/^(%|---|\.\.\.)/m.test(e);function pO(e,t,i){if(!t||t<0)return!1;const r=t-i,l=e.length;if(l<=r)return!1;for(let o=0,c=0;o<l;++o)if(e[o]===`
321
+ `){if(o-c>r)return!0;if(c=o+1,l-c<=r)return!1}return!0}function Xo(e,t){const i=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return i;const{implicitKey:r}=t,l=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Bf(e)?" ":"");let c="",f=0;for(let d=0,h=i[d];h;h=i[++d])if(h===" "&&i[d+1]==="\\"&&i[d+2]==="n"&&(c+=i.slice(f,d)+"\\ ",d+=1,f=d,h="\\"),h==="\\")switch(i[d+1]){case"u":{c+=i.slice(f,d);const y=i.substr(d+2,4);switch(y){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:y.substr(0,2)==="00"?c+="\\x"+y.substr(2):c+=i.substr(d,6)}d+=5,f=d+1}break;case"n":if(r||i[d+2]==='"'||i.length<l)d+=1;else{for(c+=i.slice(f,d)+`
322
+
323
+ `;i[d+2]==="\\"&&i[d+3]==="n"&&i[d+4]!=='"';)c+=`
324
+ `,d+=2;c+=o,i[d+2]===" "&&(c+="\\"),d+=1,f=d+1}break;default:d+=1}return c=f?c+i.slice(f):i,r?c:If(c,o,uf,zf(t,!1))}function am(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
325
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Xo(e,t);const i=t.indent||(Bf(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
326
+ ${i}`)+"'";return t.implicitKey?r:If(r,i,f1,zf(t,!1))}function fl(e,t){const{singleQuote:i}=t.options;let r;if(i===!1)r=Xo;else{const l=e.includes('"'),o=e.includes("'");l&&!o?r=am:o&&!l?r=Xo:r=i?am:Xo}return r(e,t)}let rm;try{rm=new RegExp(`(^|(?<!
327
+ ))
328
+ +(?!
329
+ |$)`,"g")}catch{rm=/\n+(?!\n|$)/g}function ff({comment:e,type:t,value:i},r,l,o){const{blockQuote:c,commentString:f,lineWidth:d}=r.options;if(!c||/\n[\t ]+$/.test(i))return fl(i,r);const h=r.indent||(r.forceBlockIndent||Bf(i)?" ":""),y=c==="literal"?!0:c==="folded"||t===je.BLOCK_FOLDED?!1:t===je.BLOCK_LITERAL?!0:!pO(i,d,h.length);if(!i)return y?`|
330
+ `:`>
331
+ `;let m,v;for(v=i.length;v>0;--v){const q=i[v-1];if(q!==`
332
+ `&&q!==" "&&q!==" ")break}let x=i.substring(v);const S=x.indexOf(`
333
+ `);S===-1?m="-":i===x||S!==x.length-1?(m="+",o&&o()):m="",x&&(i=i.slice(0,-x.length),x[x.length-1]===`
334
+ `&&(x=x.slice(0,-1)),x=x.replace(rm,`$&${h}`));let _=!1,w,k=-1;for(w=0;w<i.length;++w){const q=i[w];if(q===" ")_=!0;else if(q===`
335
+ `)k=w;else break}let O=i.substring(0,k<w?k+1:w);O&&(i=i.substring(O.length),O=O.replace(/\n+/g,`$&${h}`));let I=(_?h?"2":"1":"")+m;if(e&&(I+=" "+f(e.replace(/ ?[\r\n]+/g," ")),l&&l()),!y){const q=i.replace(/\n+/g,`
336
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let T=!1;const P=zf(r,!0);c!=="folded"&&t!==je.BLOCK_FOLDED&&(P.onOverflow=()=>{T=!0});const j=If(`${O}${q}${x}`,h,im,P);if(!T)return`>${I}
337
+ ${h}${j}`}return i=i.replace(/\n+/g,`$&${h}`),`|${I}
338
+ ${h}${O}${i}${x}`}function mO(e,t,i,r){const{type:l,value:o}=e,{actualString:c,implicitKey:f,indent:d,indentStep:h,inFlow:y}=t;if(f&&o.includes(`
339
+ `)||y&&/[[\]{},]/.test(o))return fl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||y||!o.includes(`
340
+ `)?fl(o,t):ff(e,t,i,r);if(!f&&!y&&l!==je.PLAIN&&o.includes(`
341
+ `))return ff(e,t,i,r);if(Bf(o)){if(d==="")return t.forceBlockIndent=!0,ff(e,t,i,r);if(f&&d===h)return fl(o,t)}const m=o.replace(/\n+/g,`$&
342
+ ${d}`);if(c){const v=_=>{var w;return _.default&&_.tag!=="tag:yaml.org,2002:str"&&((w=_.test)==null?void 0:w.test(m))},{compat:x,tags:S}=t.doc.schema;if(S.some(v)||x!=null&&x.some(v))return fl(o,t)}return f?m:If(m,d,f1,zf(t,!1))}function yc(e,t,i,r){const{implicitKey:l,inFlow:o}=t,c=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:f}=e;f!==je.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(f=je.QUOTE_DOUBLE);const d=y=>{switch(y){case je.BLOCK_FOLDED:case je.BLOCK_LITERAL:return l||o?fl(c.value,t):ff(c,t,i,r);case je.QUOTE_DOUBLE:return Xo(c.value,t);case je.QUOTE_SINGLE:return am(c.value,t);case je.PLAIN:return mO(c,t,i,r);default:return null}};let h=d(f);if(h===null){const{defaultKeyType:y,defaultStringType:m}=t.options,v=l&&y||m;if(h=d(v),h===null)throw new Error(`Unsupported default string type ${v}`)}return h}function d1(e,t){const i=Object.assign({blockQuote:!0,commentString:hO,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function gO(e,t){var l;if(t.tag){const o=e.filter(c=>c.tag===t.tag);if(o.length>0)return o.find(c=>c.format===t.format)??o[0]}let i,r;if(xt(t)){r=t.value;let o=e.filter(c=>{var f;return(f=c.identify)==null?void 0:f.call(c,r)});if(o.length>1){const c=o.filter(f=>f.test);c.length>0&&(o=c)}i=o.find(c=>c.format===t.format)??o.find(c=>!c.format)}else r=t,i=e.find(o=>o.nodeClass&&r instanceof o.nodeClass);if(!i){const o=((l=r==null?void 0:r.constructor)==null?void 0:l.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${o} value`)}return i}function bO(e,t,{anchors:i,doc:r}){if(!r.directives)return"";const l=[],o=(xt(e)||Mt(e))&&e.anchor;o&&s1(o)&&(i.add(o),l.push(`&${o}`));const c=e.tag??(t.default?null:t.tag);return c&&l.push(r.directives.tagString(c)),l.join(" ")}function Tl(e,t,i,r){var d;if(At(e))return e.toString(t,i,r);if(Sr(e)){if(t.doc.directives)return e.toString(t);if((d=t.resolvedAliases)!=null&&d.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let l;const o=Dt(e)?e:t.doc.createNode(e,{onTagObj:h=>l=h});l??(l=gO(t.doc.schema.tags,o));const c=bO(o,l,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const f=typeof l.stringify=="function"?l.stringify(o,t,i,r):xt(o)?yc(o,t,i,r):o.toString(t,i,r);return c?xt(o)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
343
+ ${t.indent}${f}`:f}function yO({key:e,value:t},i,r,l){const{allNullValues:o,doc:c,indent:f,indentStep:d,options:{commentString:h,indentSeq:y,simpleKeys:m}}=i;let v=Dt(e)&&e.comment||null;if(m){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(Mt(e)||!Dt(e)&&typeof e=="object"){const P="With simple keys, collection cannot be used as a key value";throw new Error(P)}}let x=!m&&(!e||v&&t==null&&!i.inFlow||Mt(e)||(xt(e)?e.type===je.BLOCK_FOLDED||e.type===je.BLOCK_LITERAL:typeof e=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!x&&(m||!o),indent:f+d});let S=!1,_=!1,w=Tl(e,i,()=>S=!0,()=>_=!0);if(!x&&!i.inFlow&&w.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");x=!0}if(i.inFlow){if(o||t==null)return S&&r&&r(),w===""?"?":x?`? ${w}`:w}else if(o&&!m||t==null&&x)return w=`? ${w}`,v&&!S?w+=Xr(w,i.indent,h(v)):_&&l&&l(),w;S&&(v=null),x?(v&&(w+=Xr(w,i.indent,h(v))),w=`? ${w}
344
+ ${f}:`):(w=`${w}:`,v&&(w+=Xr(w,i.indent,h(v))));let k,O,A;Dt(t)?(k=!!t.spaceBefore,O=t.commentBefore,A=t.comment):(k=!1,O=null,A=null,t&&typeof t=="object"&&(t=c.createNode(t))),i.implicitKey=!1,!x&&!v&&xt(t)&&(i.indentAtStart=w.length+1),_=!1,!y&&d.length>=2&&!i.inFlow&&!x&&zl(t)&&!t.flow&&!t.tag&&!t.anchor&&(i.indent=i.indent.substring(2));let I=!1;const q=Tl(t,i,()=>I=!0,()=>_=!0);let T=" ";if(v||k||O){if(T=k?`
345
+ `:"",O){const P=h(O);T+=`
346
+ ${_a(P,i.indent)}`}q===""&&!i.inFlow?T===`
347
+ `&&A&&(T=`
348
+
349
+ `):T+=`
350
+ ${i.indent}`}else if(!x&&Mt(t)){const P=q[0],j=q.indexOf(`
351
+ `),X=j!==-1,D=i.inFlow??t.flow??t.items.length===0;if(X||!D){let $=!1;if(X&&(P==="&"||P==="!")){let Q=q.indexOf(" ");P==="&"&&Q!==-1&&Q<j&&q[Q+1]==="!"&&(Q=q.indexOf(" ",Q+1)),(Q===-1||j<Q)&&($=!0)}$||(T=`
352
+ ${i.indent}`)}}else(q===""||q[0]===`
353
+ `)&&(T="");return w+=T+q,i.inFlow?I&&r&&r():A&&!I?w+=Xr(w,i.indent,h(A)):_&&l&&l(),w}function h1(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Hu="<<",wa={identify:e=>e===Hu||typeof e=="symbol"&&e.description===Hu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new je(Symbol(Hu)),{addToJSMap:p1}),stringify:()=>Hu},xO=(e,t)=>(wa.identify(t)||xt(t)&&(!t.type||t.type===je.PLAIN)&&wa.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(i=>i.tag===wa.tag&&i.default));function p1(e,t,i){if(i=e&&Sr(i)?i.resolve(e.doc):i,zl(i))for(const r of i.items)fp(e,t,r);else if(Array.isArray(i))for(const r of i)fp(e,t,r);else fp(e,t,i)}function fp(e,t,i){const r=e&&Sr(i)?i.resolve(e.doc):i;if(!Il(r))throw new Error("Merge sources must be maps or map aliases");const l=r.toJSON(null,e,Map);for(const[o,c]of l)t instanceof Map?t.has(o)||t.set(o,c):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0});return t}function m1(e,t,{key:i,value:r}){if(Dt(i)&&i.addToJSMap)i.addToJSMap(e,t,r);else if(xO(e,i))p1(e,t,r);else{const l=yi(i,"",e);if(t instanceof Map)t.set(l,yi(r,l,e));else if(t instanceof Set)t.add(l);else{const o=vO(i,l,e),c=yi(r,o,e);o in t?Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[o]=c}}return t}function vO(e,t,i){if(t===null)return"";if(typeof t!="object")return String(t);if(Dt(e)&&(i!=null&&i.doc)){const r=d1(i.doc,{});r.anchors=new Set;for(const o of i.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;const l=e.toString(r);if(!i.mapKeyWarned){let o=JSON.stringify(l);o.length>40&&(o=o.substring(0,36)+'..."'),h1(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return l}return JSON.stringify(t)}function Hm(e,t,i){const r=ic(e,void 0,i),l=ic(t,void 0,i);return new mn(r,l)}class mn{constructor(t,i=null){Object.defineProperty(this,vi,{value:e1}),this.key=t,this.value=i}clone(t){let{key:i,value:r}=this;return Dt(i)&&(i=i.clone(t)),Dt(r)&&(r=r.clone(t)),new mn(i,r)}toJSON(t,i){const r=i!=null&&i.mapAsMap?new Map:{};return m1(i,r,this)}toString(t,i,r){return t!=null&&t.doc?yO(this,t,i,r):JSON.stringify(this)}}function g1(e,t,i){return(t.inFlow??e.flow?SO:EO)(e,t,i)}function EO({comment:e,items:t},i,{blockItemPrefix:r,flowChars:l,itemIndent:o,onChompKeep:c,onComment:f}){const{indent:d,options:{commentString:h}}=i,y=Object.assign({},i,{indent:o,type:null});let m=!1;const v=[];for(let S=0;S<t.length;++S){const _=t[S];let w=null;if(Dt(_))!m&&_.spaceBefore&&v.push(""),vf(i,v,_.commentBefore,m),_.comment&&(w=_.comment);else if(At(_)){const O=Dt(_.key)?_.key:null;O&&(!m&&O.spaceBefore&&v.push(""),vf(i,v,O.commentBefore,m))}m=!1;let k=Tl(_,y,()=>w=null,()=>m=!0);w&&(k+=Xr(k,o,h(w))),m&&w&&(m=!1),v.push(r+k)}let x;if(v.length===0)x=l.start+l.end;else{x=v[0];for(let S=1;S<v.length;++S){const _=v[S];x+=_?`
354
+ ${d}${_}`:`
355
+ `}}return e?(x+=`
356
+ `+_a(h(e),d),f&&f()):m&&c&&c(),x}function SO({items:e},t,{flowChars:i,itemIndent:r}){const{indent:l,indentStep:o,flowCollectionPadding:c,options:{commentString:f}}=t;r+=o;const d=Object.assign({},t,{indent:r,inFlow:!0,type:null});let h=!1,y=0;const m=[];for(let S=0;S<e.length;++S){const _=e[S];let w=null;if(Dt(_))_.spaceBefore&&m.push(""),vf(t,m,_.commentBefore,!1),_.comment&&(w=_.comment);else if(At(_)){const O=Dt(_.key)?_.key:null;O&&(O.spaceBefore&&m.push(""),vf(t,m,O.commentBefore,!1),O.comment&&(h=!0));const A=Dt(_.value)?_.value:null;A?(A.comment&&(w=A.comment),A.commentBefore&&(h=!0)):_.value==null&&(O!=null&&O.comment)&&(w=O.comment)}w&&(h=!0);let k=Tl(_,d,()=>w=null);h||(h=m.length>y||k.includes(`
357
+ `)),S<e.length-1?k+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=m.reduce((O,A)=>O+A.length+2,2)+(k.length+2)>t.options.lineWidth)),h&&(k+=",")),w&&(k+=Xr(k,r,f(w))),m.push(k),y=m.length}const{start:v,end:x}=i;if(m.length===0)return v+x;if(!h){const S=m.reduce((_,w)=>_+w.length+2,2);h=t.options.lineWidth>0&&S>t.options.lineWidth}if(h){let S=v;for(const _ of m)S+=_?`
358
+ ${o}${l}${_}`:`
359
+ `;return`${S}
360
+ ${l}${x}`}else return`${v}${c}${m.join(" ")}${c}${x}`}function vf({indent:e,options:{commentString:t}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const o=_a(t(r),e);i.push(o.trimStart())}}function Zr(e,t){const i=xt(t)?t.value:t;for(const r of e)if(At(r)&&(r.key===t||r.key===i||xt(r.key)&&r.key.value===i))return r}class ei extends u1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(yr,t),this.items=[]}static from(t,i,r){const{keepUndefined:l,replacer:o}=r,c=new this(t),f=(d,h)=>{if(typeof o=="function")h=o.call(i,d,h);else if(Array.isArray(o)&&!o.includes(d))return;(h!==void 0||l)&&c.items.push(Hm(d,h,r))};if(i instanceof Map)for(const[d,h]of i)f(d,h);else if(i&&typeof i=="object")for(const d of Object.keys(i))f(d,i[d]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,i){var c;let r;At(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new mn(t,t==null?void 0:t.value):r=new mn(t.key,t.value);const l=Zr(this.items,r.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(l){if(!i)throw new Error(`Key ${r.key} already set`);xt(l.value)&&c1(r.value)?l.value.value=r.value:l.value=r.value}else if(o){const f=this.items.findIndex(d=>o(r,d)<0);f===-1?this.items.push(r):this.items.splice(f,0,r)}else this.items.push(r)}delete(t){const i=Zr(this.items,t);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(t,i){const r=Zr(this.items,t),l=r==null?void 0:r.value;return(!i&&xt(l)?l.value:l)??void 0}has(t){return!!Zr(this.items,t)}set(t,i){this.add(new mn(t,i),!0)}toJSON(t,i,r){const l=r?new r:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(l);for(const o of this.items)m1(i,l,o);return l}toString(t,i,r){if(!t)return JSON.stringify(this);for(const l of this.items)if(!At(l))throw new Error(`Map items must all be pairs; found ${JSON.stringify(l)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),g1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:i})}}const Bl={collection:"map",default:!0,nodeClass:ei,tag:"tag:yaml.org,2002:map",resolve(e,t){return Il(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,i)=>ei.from(e,t,i)};class xr extends u1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(jl,t),this.items=[]}add(t){this.items.push(t)}delete(t){const i=Ku(t);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(t,i){const r=Ku(t);if(typeof r!="number")return;const l=this.items[r];return!i&&xt(l)?l.value:l}has(t){const i=Ku(t);return typeof i=="number"&&i<this.items.length}set(t,i){const r=Ku(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const l=this.items[r];xt(l)&&c1(i)?l.value=i:this.items[r]=i}toJSON(t,i){const r=[];i!=null&&i.onCreate&&i.onCreate(r);let l=0;for(const o of this.items)r.push(yi(o,String(l++),i));return r}toString(t,i,r){return t?g1(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(t,i,r){const{replacer:l}=r,o=new this(t);if(i&&Symbol.iterator in Object(i)){let c=0;for(let f of i){if(typeof l=="function"){const d=i instanceof Set?f:String(c++);f=l.call(i,d,f)}o.items.push(ic(f,void 0,r))}}return o}}function Ku(e){let t=xt(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const Ul={collection:"seq",default:!0,nodeClass:xr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return zl(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,i)=>xr.from(e,t,i)},Uf={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,i,r){return t=Object.assign({actualString:!0},t),yc(e,t,i,r)}},Ff={identify:e=>e==null,createNode:()=>new je(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new je(null),stringify:({source:e},t)=>typeof e=="string"&&Ff.test.test(e)?e:t.options.nullStr},Km={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new je(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},i){if(e&&Km.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?i.options.trueStr:i.options.falseStr}};function Di({format:e,minFractionDigits:t,tag:i,value:r}){if(typeof r=="bigint")return String(r);const l=typeof r=="number"?r:Number(r);if(!isFinite(l))return isNaN(l)?".nan":l<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let c=o.indexOf(".");c<0&&(c=o.length,o+=".");let f=t-(o.length-c-1);for(;f-- >0;)o+="0"}return o}const b1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Di},y1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Di(e)}},x1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new je(parseFloat(e)),i=e.indexOf(".");return i!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-i-1),t},stringify:Di},Pf=e=>typeof e=="bigint"||Number.isInteger(e),Gm=(e,t,i,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),i);function v1(e,t,i){const{value:r}=e;return Pf(r)&&r>=0?i+r.toString(t):Di(e)}const E1={identify:e=>Pf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,i)=>Gm(e,2,8,i),stringify:e=>v1(e,8,"0o")},S1={identify:Pf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,i)=>Gm(e,0,10,i),stringify:Di},_1={identify:e=>Pf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,i)=>Gm(e,2,16,i),stringify:e=>v1(e,16,"0x")},_O=[Bl,Ul,Uf,Ff,Km,E1,S1,_1,b1,y1,x1];function Iv(e){return typeof e=="bigint"||Number.isInteger(e)}const Gu=({value:e})=>JSON.stringify(e),wO=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Gu},{identify:e=>e==null,createNode:()=>new je(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Gu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Gu},{identify:Iv,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:i})=>i?BigInt(e):parseInt(e,10),stringify:({value:e})=>Iv(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Gu}],kO={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},NO=[Bl,Ul].concat(wO,kO),Ym={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const i=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(i.length);for(let l=0;l<i.length;++l)r[l]=i.charCodeAt(l);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:i},r,l,o){if(!i)return"";const c=i;let f;if(typeof btoa=="function"){let d="";for(let h=0;h<c.length;++h)d+=String.fromCharCode(c[h]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=je.BLOCK_LITERAL),t!==je.QUOTE_DOUBLE){const d=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),h=Math.ceil(f.length/d),y=new Array(h);for(let m=0,v=0;m<h;++m,v+=d)y[m]=f.substr(v,d);f=y.join(t===je.BLOCK_LITERAL?`
361
+ `:" ")}return yc({comment:e,type:t,value:f},r,l,o)}};function w1(e,t){if(zl(e))for(let i=0;i<e.items.length;++i){let r=e.items[i];if(!At(r)){if(Il(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");const l=r.items[0]||new mn(new je(null));if(r.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${r.commentBefore}
362
+ ${l.key.commentBefore}`:r.commentBefore),r.comment){const o=l.value??l.key;o.comment=o.comment?`${r.comment}
363
+ ${o.comment}`:r.comment}r=l}e.items[i]=At(r)?r:new mn(r)}}else t("Expected a sequence for this tag");return e}function k1(e,t,i){const{replacer:r}=i,l=new xr(e);l.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let c of t){typeof r=="function"&&(c=r.call(t,String(o++),c));let f,d;if(Array.isArray(c))if(c.length===2)f=c[0],d=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const h=Object.keys(c);if(h.length===1)f=h[0],d=c[f];else throw new TypeError(`Expected tuple with one key, not ${h.length} keys`)}else f=c;l.items.push(Hm(f,d,i))}return l}const Qm={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:w1,createNode:k1};class dl extends xr{constructor(){super(),this.add=ei.prototype.add.bind(this),this.delete=ei.prototype.delete.bind(this),this.get=ei.prototype.get.bind(this),this.has=ei.prototype.has.bind(this),this.set=ei.prototype.set.bind(this),this.tag=dl.tag}toJSON(t,i){if(!i)return super.toJSON(t);const r=new Map;i!=null&&i.onCreate&&i.onCreate(r);for(const l of this.items){let o,c;if(At(l)?(o=yi(l.key,"",i),c=yi(l.value,o,i)):o=yi(l,"",i),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,c)}return r}static from(t,i,r){const l=k1(t,i,r),o=new this;return o.items=l.items,o}}dl.tag="tag:yaml.org,2002:omap";const Vm={collection:"seq",identify:e=>e instanceof Map,nodeClass:dl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const i=w1(e,t),r=[];for(const{key:l}of i.items)xt(l)&&(r.includes(l.value)?t(`Ordered maps must not include duplicate keys: ${l.value}`):r.push(l.value));return Object.assign(new dl,i)},createNode:(e,t,i)=>dl.from(e,t,i)};function N1({value:e,source:t},i){return t&&(e?T1:C1).test.test(t)?t:e?i.options.trueStr:i.options.falseStr}const T1={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new je(!0),stringify:N1},C1={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new je(!1),stringify:N1},TO={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Di},CO={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Di(e)}},AO={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new je(parseFloat(e.replace(/_/g,""))),i=e.indexOf(".");if(i!==-1){const r=e.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:Di},xc=e=>typeof e=="bigint"||Number.isInteger(e);function $f(e,t,i,{intAsBigInt:r}){const l=e[0];if((l==="-"||l==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(i){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const c=BigInt(e);return l==="-"?BigInt(-1)*c:c}const o=parseInt(e,i);return l==="-"?-1*o:o}function Xm(e,t,i){const{value:r}=e;if(xc(r)){const l=r.toString(t);return r<0?"-"+i+l.substr(1):i+l}return Di(e)}const OO={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,i)=>$f(e,2,2,i),stringify:e=>Xm(e,2,"0b")},RO={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,i)=>$f(e,1,8,i),stringify:e=>Xm(e,8,"0")},MO={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,i)=>$f(e,0,10,i),stringify:Di},DO={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,i)=>$f(e,2,16,i),stringify:e=>Xm(e,16,"0x")};class hl extends ei{constructor(t){super(t),this.tag=hl.tag}add(t){let i;At(t)?i=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?i=new mn(t.key,null):i=new mn(t,null),Zr(this.items,i.key)||this.items.push(i)}get(t,i){const r=Zr(this.items,t);return!i&&At(r)?xt(r.key)?r.key.value:r.key:r}set(t,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const r=Zr(this.items,t);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new mn(t))}toJSON(t,i){return super.toJSON(t,i,Set)}toString(t,i,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(t,i,r){const{replacer:l}=r,o=new this(t);if(i&&Symbol.iterator in Object(i))for(let c of i)typeof l=="function"&&(c=l.call(i,c,c)),o.items.push(Hm(c,null,r));return o}}hl.tag="tag:yaml.org,2002:set";const Zm={collection:"map",identify:e=>e instanceof Set,nodeClass:hl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,i)=>hl.from(e,t,i),resolve(e,t){if(Il(e)){if(e.hasAllNullValues(!0))return Object.assign(new hl,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Wm(e,t){const i=e[0],r=i==="-"||i==="+"?e.substring(1):e,l=c=>t?BigInt(c):Number(c),o=r.replace(/_/g,"").split(":").reduce((c,f)=>c*l(60)+l(f),l(0));return i==="-"?l(-1)*o:o}function A1(e){let{value:t}=e,i=c=>c;if(typeof t=="bigint")i=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return Di(e);let r="";t<0&&(r="-",t*=i(-1));const l=i(60),o=[t%l];return t<60?o.unshift(0):(t=(t-o[0])/l,o.unshift(t%l),t>=60&&(t=(t-o[0])/l,o.unshift(t))),r+o.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const O1={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:i})=>Wm(e,i),stringify:A1},R1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Wm(e,!1),stringify:A1},qf={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(qf.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,r,l,o,c,f]=t.map(Number),d=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(i,r-1,l,o||0,c||0,f||0,d);const y=t[8];if(y&&y!=="Z"){let m=Wm(y,!1);Math.abs(m)<30&&(m*=60),h-=6e4*m}return new Date(h)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},zv=[Bl,Ul,Uf,Ff,T1,C1,OO,RO,MO,DO,TO,CO,AO,Ym,wa,Vm,Qm,Zm,O1,R1,qf],Bv=new Map([["core",_O],["failsafe",[Bl,Ul,Uf]],["json",NO],["yaml11",zv],["yaml-1.1",zv]]),Uv={binary:Ym,bool:Km,float:x1,floatExp:y1,floatNaN:b1,floatTime:R1,int:S1,intHex:_1,intOct:E1,intTime:O1,map:Bl,merge:wa,null:Ff,omap:Vm,pairs:Qm,seq:Ul,set:Zm,timestamp:qf},LO={"tag:yaml.org,2002:binary":Ym,"tag:yaml.org,2002:merge":wa,"tag:yaml.org,2002:omap":Vm,"tag:yaml.org,2002:pairs":Qm,"tag:yaml.org,2002:set":Zm,"tag:yaml.org,2002:timestamp":qf};function dp(e,t,i){const r=Bv.get(t);if(r&&!e)return i&&!r.includes(wa)?r.concat(wa):r.slice();let l=r;if(!l)if(Array.isArray(e))l=[];else{const o=Array.from(Bv.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)l=l.concat(o);else typeof e=="function"&&(l=e(l.slice()));return i&&(l=l.concat(wa)),l.reduce((o,c)=>{const f=typeof c=="string"?Uv[c]:c;if(!f){const d=JSON.stringify(c),h=Object.keys(Uv).map(y=>JSON.stringify(y)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${h}`)}return o.includes(f)||o.push(f),o},[])}const jO=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let M1=class D1{constructor({compat:t,customTags:i,merge:r,resolveKnownTags:l,schema:o,sortMapEntries:c,toStringDefaults:f}){this.compat=Array.isArray(t)?dp(t,"compat"):t?dp(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=l?LO:{},this.tags=dp(i,this.name,r),this.toStringOptions=f??null,Object.defineProperty(this,yr,{value:Bl}),Object.defineProperty(this,Qi,{value:Uf}),Object.defineProperty(this,jl,{value:Ul}),this.sortMapEntries=typeof c=="function"?c:c===!0?jO:null}clone(){const t=Object.create(D1.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function IO(e,t){var d;const i=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const h=e.directives.toString(e);h?(i.push(h),r=!0):e.directives.docStart&&(r=!0)}r&&i.push("---");const l=d1(e,t),{commentString:o}=l.options;if(e.commentBefore){i.length!==1&&i.unshift("");const h=o(e.commentBefore);i.unshift(_a(h,""))}let c=!1,f=null;if(e.contents){if(Dt(e.contents)){if(e.contents.spaceBefore&&r&&i.push(""),e.contents.commentBefore){const m=o(e.contents.commentBefore);i.push(_a(m,""))}l.forceBlockIndent=!!e.comment,f=e.contents.comment}const h=f?void 0:()=>c=!0;let y=Tl(e.contents,l,()=>f=null,h);f&&(y+=Xr(y,"",o(f))),(y[0]==="|"||y[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${y}`:i.push(y)}else i.push(Tl(e.contents,l));if((d=e.directives)!=null&&d.docEnd)if(e.comment){const h=o(e.comment);h.includes(`
364
+ `)?(i.push("..."),i.push(_a(h,""))):i.push(`... ${h}`)}else i.push("...");else{let h=e.comment;h&&c&&(h=h.replace(/^\n+/,"")),h&&((!c||f)&&i[i.length-1]!==""&&i.push(""),i.push(_a(o(h),"")))}return i.join(`
365
+ `)+`
366
+ `}class Fl{constructor(t,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,vi,{value:nm});let l=null;typeof i=="function"||Array.isArray(i)?l=i:r===void 0&&i&&(r=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:c}=o;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new wn({version:c}),this.setSchema(c,r),this.contents=t===void 0?null:this.createNode(t,l,r)}clone(){const t=Object.create(Fl.prototype,{[vi]:{value:nm}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Dt(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){tl(this.contents)&&this.contents.add(t)}addIn(t,i){tl(this.contents)&&this.contents.addIn(t,i)}createAlias(t,i){if(!t.anchor){const r=l1(this);t.anchor=!i||r.has(i)?o1(i||"a",r):i}return new jf(t.anchor)}createNode(t,i,r){let l;if(typeof i=="function")t=i.call({"":t},"",t),l=i;else if(Array.isArray(i)){const w=O=>typeof O=="number"||O instanceof String||O instanceof Number,k=i.filter(w).map(String);k.length>0&&(i=i.concat(k)),l=i}else r===void 0&&i&&(r=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:f,keepUndefined:d,onTagObj:h,tag:y}=r??{},{onAnchor:m,setAnchors:v,sourceObjects:x}=uO(this,c||"a"),S={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:m,onTagObj:h,replacer:l,schema:this.schema,sourceObjects:x},_=ic(t,y,S);return f&&Mt(_)&&(_.flow=!0),v(),_}createPair(t,i,r={}){const l=this.createNode(t,null,r),o=this.createNode(i,null,r);return new mn(l,o)}delete(t){return tl(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Vo(t)?this.contents==null?!1:(this.contents=null,!0):tl(this.contents)?this.contents.deleteIn(t):!1}get(t,i){return Mt(this.contents)?this.contents.get(t,i):void 0}getIn(t,i){return Vo(t)?!i&&xt(this.contents)?this.contents.value:this.contents:Mt(this.contents)?this.contents.getIn(t,i):void 0}has(t){return Mt(this.contents)?this.contents.has(t):!1}hasIn(t){return Vo(t)?this.contents!==void 0:Mt(this.contents)?this.contents.hasIn(t):!1}set(t,i){this.contents==null?this.contents=xf(this.schema,[t],i):tl(this.contents)&&this.contents.set(t,i)}setIn(t,i){Vo(t)?this.contents=i:this.contents==null?this.contents=xf(this.schema,Array.from(t),i):tl(this.contents)&&this.contents.setIn(t,i)}setSchema(t,i={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new wn({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new wn({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const l=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${l}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new M1(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:i,mapAsMap:r,maxAliasCount:l,onAnchor:o,reviver:c}={}){const f={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},d=yi(this.contents,i??"",f);if(typeof o=="function")for(const{count:h,res:y}of f.anchors.values())o(y,h);return typeof c=="function"?ul(c,{"":d},"",d):d}toJSON(t,i){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:i})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const i=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return IO(this,t)}}function tl(e){if(Mt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Jm extends Error{constructor(t,i,r,l){super(),this.name=t,this.code=r,this.message=l,this.pos=i}}class Wr extends Jm{constructor(t,i,r){super("YAMLParseError",t,i,r)}}class L1 extends Jm{constructor(t,i,r){super("YAMLWarning",t,i,r)}}const Ef=(e,t)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>t.linePos(f));const{line:r,col:l}=i.linePos[0];i.message+=` at line ${r}, column ${l}`;let o=l-1,c=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&c.length>80){const f=Math.min(o-39,c.length-79);c="…"+c.substring(f),o-=f-1}if(c.length>80&&(c=c.substring(0,79)+"…"),r>1&&/^ *$/.test(c.substring(0,o))){let f=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);f.length>80&&(f=f.substring(0,79)+`…
367
+ `),c=f+c}if(/[^ ]/.test(c)){let f=1;const d=i.linePos[1];(d==null?void 0:d.line)===r&&d.col>l&&(f=Math.max(1,Math.min(d.col-l,80-o)));const h=" ".repeat(o)+"^".repeat(f);i.message+=`:
368
+
369
+ ${c}
370
+ ${h}
371
+ `}};function Cl(e,{flow:t,indicator:i,next:r,offset:l,onError:o,parentIndent:c,startOnNewline:f}){let d=!1,h=f,y=f,m="",v="",x=!1,S=!1,_=null,w=null,k=null,O=null,A=null,I=null,q=null;for(const j of e)switch(S&&(j.type!=="space"&&j.type!=="newline"&&j.type!=="comma"&&o(j.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),_&&(h&&j.type!=="comment"&&j.type!=="newline"&&o(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),_=null),j.type){case"space":!t&&(i!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&j.source.includes(" ")&&(_=j),y=!0;break;case"comment":{y||o(j,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const X=j.source.substring(1)||" ";m?m+=v+X:m=X,v="",h=!1;break}case"newline":h?m?m+=j.source:(!I||i!=="seq-item-ind")&&(d=!0):v+=j.source,h=!0,x=!0,(w||k)&&(O=j),y=!0;break;case"anchor":w&&o(j,"MULTIPLE_ANCHORS","A node can have at most one anchor"),j.source.endsWith(":")&&o(j.offset+j.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),w=j,q??(q=j.offset),h=!1,y=!1,S=!0;break;case"tag":{k&&o(j,"MULTIPLE_TAGS","A node can have at most one tag"),k=j,q??(q=j.offset),h=!1,y=!1,S=!0;break}case i:(w||k)&&o(j,"BAD_PROP_ORDER",`Anchors and tags must be after the ${j.source} indicator`),I&&o(j,"UNEXPECTED_TOKEN",`Unexpected ${j.source} in ${t??"collection"}`),I=j,h=i==="seq-item-ind"||i==="explicit-key-ind",y=!1;break;case"comma":if(t){A&&o(j,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),A=j,h=!1,y=!1;break}default:o(j,"UNEXPECTED_TOKEN",`Unexpected ${j.type} token`),h=!1,y=!1}const T=e[e.length-1],P=T?T.offset+T.source.length:l;return S&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),_&&(h&&_.indent<=c||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&o(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:I,spaceBefore:d,comment:m,hasNewline:x,anchor:w,tag:k,newlineAfterProp:O,end:P,start:q??P}}function ac(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
372
+ `))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const i of t.start)if(i.type==="newline")return!0;if(t.sep){for(const i of t.sep)if(i.type==="newline")return!0}if(ac(t.key)||ac(t.value))return!0}return!1;default:return!0}}function sm(e,t,i){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&ac(t)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function j1(e,t,i){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const l=typeof r=="function"?r:(o,c)=>o===c||xt(o)&&xt(c)&&o.value===c.value;return t.some(o=>l(o.key,i))}const Fv="All mapping items must start at the same column";function zO({composeNode:e,composeEmptyNode:t},i,r,l,o){var y;const c=(o==null?void 0:o.nodeClass)??ei,f=new c(i.schema);i.atRoot&&(i.atRoot=!1);let d=r.offset,h=null;for(const m of r.items){const{start:v,key:x,sep:S,value:_}=m,w=Cl(v,{indicator:"explicit-key-ind",next:x??(S==null?void 0:S[0]),offset:d,onError:l,parentIndent:r.indent,startOnNewline:!0}),k=!w.found;if(k){if(x&&(x.type==="block-seq"?l(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==r.indent&&l(d,"BAD_INDENT",Fv)),!w.anchor&&!w.tag&&!S){h=w.end,w.comment&&(f.comment?f.comment+=`
373
+ `+w.comment:f.comment=w.comment);continue}(w.newlineAfterProp||ac(x))&&l(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=w.found)==null?void 0:y.indent)!==r.indent&&l(d,"BAD_INDENT",Fv);i.atKey=!0;const O=w.end,A=x?e(i,x,w,l):t(i,O,v,null,w,l);i.schema.compat&&sm(r.indent,x,l),i.atKey=!1,j1(i,f.items,A)&&l(O,"DUPLICATE_KEY","Map keys must be unique");const I=Cl(S??[],{indicator:"map-value-ind",next:_,offset:A.range[2],onError:l,parentIndent:r.indent,startOnNewline:!x||x.type==="block-scalar"});if(d=I.end,I.found){k&&((_==null?void 0:_.type)==="block-map"&&!I.hasNewline&&l(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&w.start<I.found.offset-1024&&l(A.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const q=_?e(i,_,I,l):t(i,d,S,null,I,l);i.schema.compat&&sm(r.indent,_,l),d=q.range[2];const T=new mn(A,q);i.options.keepSourceTokens&&(T.srcToken=m),f.items.push(T)}else{k&&l(A.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),I.comment&&(A.comment?A.comment+=`
374
+ `+I.comment:A.comment=I.comment);const q=new mn(A);i.options.keepSourceTokens&&(q.srcToken=m),f.items.push(q)}}return h&&h<d&&l(h,"IMPOSSIBLE","Map comment with trailing content"),f.range=[r.offset,d,h??d],f}function BO({composeNode:e,composeEmptyNode:t},i,r,l,o){const c=(o==null?void 0:o.nodeClass)??xr,f=new c(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=r.offset,h=null;for(const{start:y,value:m}of r.items){const v=Cl(y,{indicator:"seq-item-ind",next:m,offset:d,onError:l,parentIndent:r.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||m)(m==null?void 0:m.type)==="block-seq"?l(v.end,"BAD_INDENT","All sequence items must start at the same column"):l(d,"MISSING_CHAR","Sequence item without - indicator");else{h=v.end,v.comment&&(f.comment=v.comment);continue}const x=m?e(i,m,v,l):t(i,v.end,y,null,v,l);i.schema.compat&&sm(r.indent,m,l),d=x.range[2],f.items.push(x)}return f.range=[r.offset,d,h??d],f}function vc(e,t,i,r){let l="";if(e){let o=!1,c="";for(const f of e){const{source:d,type:h}=f;switch(h){case"space":o=!0;break;case"comment":{i&&!o&&r(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const y=d.substring(1)||" ";l?l+=c+y:l=y,c="";break}case"newline":l&&(c+=d),o=!0;break;default:r(f,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}t+=d.length}}return{comment:l,offset:t}}const hp="Block collections are not allowed within flow collections",pp=e=>e&&(e.type==="block-map"||e.type==="block-seq");function UO({composeNode:e,composeEmptyNode:t},i,r,l,o){var w;const c=r.start.source==="{",f=c?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(c?ei:xr),h=new d(i.schema);h.flow=!0;const y=i.atRoot;y&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let m=r.offset+r.start.source.length;for(let k=0;k<r.items.length;++k){const O=r.items[k],{start:A,key:I,sep:q,value:T}=O,P=Cl(A,{flow:f,indicator:"explicit-key-ind",next:I??(q==null?void 0:q[0]),offset:m,onError:l,parentIndent:r.indent,startOnNewline:!1});if(!P.found){if(!P.anchor&&!P.tag&&!q&&!T){k===0&&P.comma?l(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):k<r.items.length-1&&l(P.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),P.comment&&(h.comment?h.comment+=`
375
+ `+P.comment:h.comment=P.comment),m=P.end;continue}!c&&i.options.strict&&ac(I)&&l(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)P.comma&&l(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(P.comma||l(P.start,"MISSING_CHAR",`Missing , between ${f} items`),P.comment){let j="";e:for(const X of A)switch(X.type){case"comma":case"space":break;case"comment":j=X.source.substring(1);break e;default:break e}if(j){let X=h.items[h.items.length-1];At(X)&&(X=X.value??X.key),X.comment?X.comment+=`
376
+ `+j:X.comment=j,P.comment=P.comment.substring(j.length+1)}}if(!c&&!q&&!P.found){const j=T?e(i,T,P,l):t(i,P.end,q,null,P,l);h.items.push(j),m=j.range[2],pp(T)&&l(j.range,"BLOCK_IN_FLOW",hp)}else{i.atKey=!0;const j=P.end,X=I?e(i,I,P,l):t(i,j,A,null,P,l);pp(I)&&l(X.range,"BLOCK_IN_FLOW",hp),i.atKey=!1;const D=Cl(q??[],{flow:f,indicator:"map-value-ind",next:T,offset:X.range[2],onError:l,parentIndent:r.indent,startOnNewline:!1});if(D.found){if(!c&&!P.found&&i.options.strict){if(q)for(const se of q){if(se===D.found)break;if(se.type==="newline"){l(se,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}P.start<D.found.offset-1024&&l(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else T&&("source"in T&&((w=T.source)==null?void 0:w[0])===":"?l(T,"MISSING_CHAR",`Missing space after : in ${f}`):l(D.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const $=T?e(i,T,D,l):D.found?t(i,D.end,q,null,D,l):null;$?pp(T)&&l($.range,"BLOCK_IN_FLOW",hp):D.comment&&(X.comment?X.comment+=`
377
+ `+D.comment:X.comment=D.comment);const Q=new mn(X,$);if(i.options.keepSourceTokens&&(Q.srcToken=O),c){const se=h;j1(i,se.items,X)&&l(j,"DUPLICATE_KEY","Map keys must be unique"),se.items.push(Q)}else{const se=new ei(i.schema);se.flow=!0,se.items.push(Q);const ae=($??X).range;se.range=[X.range[0],ae[1],ae[2]],h.items.push(se)}m=$?$.range[2]:D.end}}const v=c?"}":"]",[x,...S]=r.end;let _=m;if((x==null?void 0:x.source)===v)_=x.offset+x.source.length;else{const k=f[0].toUpperCase()+f.substring(1),O=y?`${k} must end with a ${v}`:`${k} in block collection must be sufficiently indented and end with a ${v}`;l(m,y?"MISSING_CHAR":"BAD_INDENT",O),x&&x.source.length!==1&&S.unshift(x)}if(S.length>0){const k=vc(S,_,i.options.strict,l);k.comment&&(h.comment?h.comment+=`
378
+ `+k.comment:h.comment=k.comment),h.range=[r.offset,_,k.offset]}else h.range=[r.offset,_,_];return h}function mp(e,t,i,r,l,o){const c=i.type==="block-map"?zO(e,t,i,r,o):i.type==="block-seq"?BO(e,t,i,r,o):UO(e,t,i,r,o),f=c.constructor;return l==="!"||l===f.tagName?(c.tag=f.tagName,c):(l&&(c.tag=l),c)}function FO(e,t,i,r,l){var v;const o=r.tag,c=o?t.directives.tagName(o.source,x=>l(o,"TAG_RESOLVE_FAILED",x)):null;if(i.type==="block-seq"){const{anchor:x,newlineAfterProp:S}=r,_=x&&o?x.offset>o.offset?x:o:x??o;_&&(!S||S.offset<_.offset)&&l(_,"MISSING_CHAR","Missing newline after block sequence props")}const f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===ei.tagName&&f==="map"||c===xr.tagName&&f==="seq")return mp(e,t,i,l,c);let d=t.schema.tags.find(x=>x.tag===c&&x.collection===f);if(!d){const x=t.schema.knownTags[c];if((x==null?void 0:x.collection)===f)t.schema.tags.push(Object.assign({},x,{default:!1})),d=x;else return x?l(o,"BAD_COLLECTION_TYPE",`${x.tag} used for ${f} collection, but expects ${x.collection??"scalar"}`,!0):l(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),mp(e,t,i,l,c)}const h=mp(e,t,i,l,c,d),y=((v=d.resolve)==null?void 0:v.call(d,h,x=>l(o,"TAG_RESOLVE_FAILED",x),t.options))??h,m=Dt(y)?y:new je(y);return m.range=h.range,m.tag=c,d!=null&&d.format&&(m.format=d.format),m}function I1(e,t,i){const r=t.offset,l=PO(t,e.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[r,r,r]};const o=l.mode===">"?je.BLOCK_FOLDED:je.BLOCK_LITERAL,c=t.source?$O(t.source):[];let f=c.length;for(let _=c.length-1;_>=0;--_){const w=c[_][1];if(w===""||w==="\r")f=_;else break}if(f===0){const _=l.chomp==="+"&&c.length>0?`
379
+ `.repeat(Math.max(1,c.length-1)):"";let w=r+l.length;return t.source&&(w+=t.source.length),{value:_,type:o,comment:l.comment,range:[r,w,w]}}let d=t.indent+l.indent,h=t.offset+l.length,y=0;for(let _=0;_<f;++_){const[w,k]=c[_];if(k===""||k==="\r")l.indent===0&&w.length>d&&(d=w.length);else{w.length<d&&i(h+w.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(d=w.length),y=_,d===0&&!e.atRoot&&i(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=w.length+k.length+1}for(let _=c.length-1;_>=f;--_)c[_][0].length>d&&(f=_+1);let m="",v="",x=!1;for(let _=0;_<y;++_)m+=c[_][0].slice(d)+`
380
+ `;for(let _=y;_<f;++_){let[w,k]=c[_];h+=w.length+k.length+1;const O=k[k.length-1]==="\r";if(O&&(k=k.slice(0,-1)),k&&w.length<d){const I=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(h-k.length-(O?2:1),"BAD_INDENT",I),w=""}o===je.BLOCK_LITERAL?(m+=v+w.slice(d)+k,v=`
381
+ `):w.length>d||k[0]===" "?(v===" "?v=`
382
+ `:!x&&v===`
383
+ `&&(v=`
384
+
385
+ `),m+=v+w.slice(d)+k,v=`
386
+ `,x=!0):k===""?v===`
387
+ `?m+=`
388
+ `:v=`
389
+ `:(m+=v+k,v=" ",x=!1)}switch(l.chomp){case"-":break;case"+":for(let _=f;_<c.length;++_)m+=`
390
+ `+c[_][0].slice(d);m[m.length-1]!==`
391
+ `&&(m+=`
392
+ `);break;default:m+=`
393
+ `}const S=r+l.length+t.source.length;return{value:m,type:o,comment:l.comment,range:[r,S,S]}}function PO({offset:e,props:t},i,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:l}=t[0],o=l[0];let c=0,f="",d=-1;for(let v=1;v<l.length;++v){const x=l[v];if(!f&&(x==="-"||x==="+"))f=x;else{const S=Number(x);!c&&S?c=S:d===-1&&(d=e+v)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let h=!1,y="",m=l.length;for(let v=1;v<t.length;++v){const x=t[v];switch(x.type){case"space":h=!0;case"newline":m+=x.source.length;break;case"comment":i&&!h&&r(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=x.source.length,y=x.source.substring(1);break;case"error":r(x,"UNEXPECTED_TOKEN",x.message),m+=x.source.length;break;default:{const S=`Unexpected token in block scalar header: ${x.type}`;r(x,"UNEXPECTED_TOKEN",S);const _=x.source;_&&typeof _=="string"&&(m+=_.length)}}}return{mode:o,indent:c,chomp:f,comment:y,length:m}}function $O(e){const t=e.split(/\n( *)/),i=t[0],r=i.match(/^( *)/),o=[r!=null&&r[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let c=1;c<t.length;c+=2)o.push([t[c],t[c+1]]);return o}function z1(e,t,i){const{offset:r,type:l,source:o,end:c}=e;let f,d;const h=(v,x,S)=>i(r+v,x,S);switch(l){case"scalar":f=je.PLAIN,d=qO(o,h);break;case"single-quoted-scalar":f=je.QUOTE_SINGLE,d=HO(o,h);break;case"double-quoted-scalar":f=je.QUOTE_DOUBLE,d=KO(o,h);break;default:return i(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}const y=r+o.length,m=vc(c,y,t,i);return{value:d,type:f,comment:m.comment,range:[r,y,m.offset]}}function qO(e,t){let i="";switch(e[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${e[0]}`;break}case"@":case"`":{i=`reserved character ${e[0]}`;break}}return i&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),B1(e)}function HO(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),B1(e.slice(1,-1)).replace(/''/g,"'")}function B1(e){let t,i;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
394
+ `,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
395
+ `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let l=r[1],o=" ",c=t.lastIndex;for(i.lastIndex=c;r=i.exec(e);)r[1]===""?o===`
396
+ `?l+=o:o=`
397
+ `:(l+=o+r[1],o=" "),c=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=c,r=f.exec(e),l+o+((r==null?void 0:r[1])??"")}function KO(e,t){let i="";for(let r=1;r<e.length-1;++r){const l=e[r];if(!(l==="\r"&&e[r+1]===`
398
+ `))if(l===`
399
+ `){const{fold:o,offset:c}=GO(e,r);i+=o,r=c}else if(l==="\\"){let o=e[++r];const c=YO[o];if(c)i+=c;else if(o===`
400
+ `)for(o=e[r+1];o===" "||o===" ";)o=e[++r+1];else if(o==="\r"&&e[r+1]===`
401
+ `)for(o=e[++r+1];o===" "||o===" ";)o=e[++r+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=QO(e,r+1,f,t),r+=f}else{const f=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(l===" "||l===" "){const o=r;let c=e[r+1];for(;c===" "||c===" ";)c=e[++r+1];c!==`
402
+ `&&!(c==="\r"&&e[r+2]===`
403
+ `)&&(i+=r>o?e.slice(o,r+1):l)}else i+=l}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),i}function GO(e,t){let i="",r=e[t+1];for(;(r===" "||r===" "||r===`
404
+ `||r==="\r")&&!(r==="\r"&&e[t+2]!==`
405
+ `);)r===`
406
+ `&&(i+=`
407
+ `),t+=1,r=e[t+1];return i||(i=" "),{fold:i,offset:t}}const YO={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
408
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function QO(e,t,i,r){const l=e.substr(t,i),c=l.length===i&&/^[0-9a-fA-F]+$/.test(l)?parseInt(l,16):NaN;if(isNaN(c)){const f=e.substr(t-2,i+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(c)}function U1(e,t,i,r){const{value:l,type:o,comment:c,range:f}=t.type==="block-scalar"?I1(e,t,r):z1(t,e.options.strict,r),d=i?e.directives.tagName(i.source,m=>r(i,"TAG_RESOLVE_FAILED",m)):null;let h;e.options.stringKeys&&e.atKey?h=e.schema[Qi]:d?h=VO(e.schema,l,d,i,r):t.type==="scalar"?h=XO(e,l,t,r):h=e.schema[Qi];let y;try{const m=h.resolve(l,v=>r(i??t,"TAG_RESOLVE_FAILED",v),e.options);y=xt(m)?m:new je(m)}catch(m){const v=m instanceof Error?m.message:String(m);r(i??t,"TAG_RESOLVE_FAILED",v),y=new je(l)}return y.range=f,y.source=l,o&&(y.type=o),d&&(y.tag=d),h.format&&(y.format=h.format),c&&(y.comment=c),y}function VO(e,t,i,r,l){var f;if(i==="!")return e[Qi];const o=[];for(const d of e.tags)if(!d.collection&&d.tag===i)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((f=d.test)!=null&&f.test(t))return d;const c=e.knownTags[i];return c&&!c.collection?(e.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(l(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),e[Qi])}function XO({atKey:e,directives:t,schema:i},r,l,o){const c=i.tags.find(f=>{var d;return(f.default===!0||e&&f.default==="key")&&((d=f.test)==null?void 0:d.test(r))})||i[Qi];if(i.compat){const f=i.compat.find(d=>{var h;return d.default&&((h=d.test)==null?void 0:h.test(r))})??i[Qi];if(c.tag!==f.tag){const d=t.tagString(c.tag),h=t.tagString(f.tag),y=`Value may be parsed as either ${d} or ${h}`;o(l,"TAG_RESOLVE_FAILED",y,!0)}}return c}function ZO(e,t,i){if(t){i??(i=t.length);for(let r=i-1;r>=0;--r){let l=t[r];switch(l.type){case"space":case"comment":case"newline":e-=l.source.length;continue}for(l=t[++r];(l==null?void 0:l.type)==="space";)e+=l.source.length,l=t[++r];break}}return e}const WO={composeNode:F1,composeEmptyNode:eg};function F1(e,t,i,r){const l=e.atKey,{spaceBefore:o,comment:c,anchor:f,tag:d}=i;let h,y=!0;switch(t.type){case"alias":h=JO(e,t,r),(f||d)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":h=U1(e,t,d,r),f&&(h.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{h=FO(WO,e,t,i,r),f&&(h.anchor=f.source.substring(1))}catch(m){const v=m instanceof Error?m.message:String(m);r(t,"RESOURCE_EXHAUSTION",v)}break;default:{const m=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",m),y=!1}}return h??(h=eg(e,t.offset,void 0,null,i,r)),f&&h.anchor===""&&r(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&e.options.stringKeys&&(!xt(h)||typeof h.value!="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str")&&r(d??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(h.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?h.comment=c:h.commentBefore=c),e.options.keepSourceTokens&&y&&(h.srcToken=t),h}function eg(e,t,i,r,{spaceBefore:l,comment:o,anchor:c,tag:f,end:d},h){const y={type:"scalar",offset:ZO(t,i,r),indent:-1,source:""},m=U1(e,y,f,h);return c&&(m.anchor=c.source.substring(1),m.anchor===""&&h(c,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(m.spaceBefore=!0),o&&(m.comment=o,m.range[2]=d),m}function JO({options:e},{offset:t,source:i,end:r},l){const o=new jf(i.substring(1));o.source===""&&l(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&l(t+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+i.length,f=vc(r,c,e.strict,l);return o.range=[t,c,f.offset],f.comment&&(o.comment=f.comment),o}function e2(e,t,{offset:i,start:r,value:l,end:o},c){const f=Object.assign({_directives:t},e),d=new Fl(void 0,f),h={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},y=Cl(r,{indicator:"doc-start",next:l??(o==null?void 0:o[0]),offset:i,onError:c,parentIndent:0,startOnNewline:!0});y.found&&(d.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!y.hasNewline&&c(y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=l?F1(h,l,y,c):eg(h,y.end,r,null,y,c);const m=d.contents.range[2],v=vc(o,m,!1,c);return v.comment&&(d.comment=v.comment),d.range=[i,m,v.offset],d}function $o(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:i}=e;return[t,t+(typeof i=="string"?i.length:1)]}function Pv(e){var l;let t="",i=!1,r=!1;for(let o=0;o<e.length;++o){const c=e[o];switch(c[0]){case"#":t+=(t===""?"":r?`
409
+
410
+ `:`
411
+ `)+(c.substring(1)||" "),i=!0,r=!1;break;case"%":((l=e[o+1])==null?void 0:l[0])!=="#"&&(o+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:t,afterEmptyLine:r}}class tg{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,l,o)=>{const c=$o(i);o?this.warnings.push(new L1(c,r,l)):this.errors.push(new Wr(c,r,l))},this.directives=new wn({version:t.version||"1.2"}),this.options=t}decorate(t,i){const{comment:r,afterEmptyLine:l}=Pv(this.prelude);if(r){const o=t.contents;if(i)t.comment=t.comment?`${t.comment}
412
+ ${r}`:r;else if(l||t.directives.docStart||!o)t.commentBefore=r;else if(Mt(o)&&!o.flow&&o.items.length>0){let c=o.items[0];At(c)&&(c=c.key);const f=c.commentBefore;c.commentBefore=f?`${r}
413
+ ${f}`:r}else{const c=o.commentBefore;o.commentBefore=c?`${r}
414
+ ${c}`:r}}i?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Pv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,i=!1,r=-1){for(const l of t)yield*this.next(l);yield*this.end(i,r)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(i,r,l)=>{const o=$o(t);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",r,l)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const i=e2(this.options,this.directives,t,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const i=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new Wr($o(t),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Wr($o(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const i=vc(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
415
+ ${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new Wr($o(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),l=new Fl(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}function t2(e,t=!0,i){if(e){const r=(l,o,c)=>{const f=typeof l=="number"?l:Array.isArray(l)?l[0]:l.offset;if(i)i(f,o,c);else throw new Wr([f,f+1],o,c)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return z1(e,t,r);case"block-scalar":return I1({options:{strict:t}},e,r)}}return null}function n2(e,t){const{implicitKey:i=!1,indent:r,inFlow:l=!1,offset:o=-1,type:c="PLAIN"}=t,f=yc({type:c,value:e},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}}),d=t.end??[{type:"newline",offset:-1,indent:r,source:`
416
+ `}];switch(f[0]){case"|":case">":{const h=f.indexOf(`
417
+ `),y=f.substring(0,h),m=f.substring(h+1)+`
418
+ `,v=[{type:"block-scalar-header",offset:o,indent:r,source:y}];return P1(v,d)||v.push({type:"newline",offset:-1,indent:r,source:`
419
+ `}),{type:"block-scalar",offset:o,indent:r,props:v,source:m}}case'"':return{type:"double-quoted-scalar",offset:o,indent:r,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:r,source:f,end:d};default:return{type:"scalar",offset:o,indent:r,source:f,end:d}}}function i2(e,t,i={}){let{afterKey:r=!1,implicitKey:l=!1,inFlow:o=!1,type:c}=i,f="indent"in e?e.indent:null;if(r&&typeof f=="number"&&(f+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const h=e.props[0];if(h.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=h.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=yc({type:c,value:t},{implicitKey:l||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":a2(e,d);break;case'"':gp(e,d,"double-quoted-scalar");break;case"'":gp(e,d,"single-quoted-scalar");break;default:gp(e,d,"scalar")}}function a2(e,t){const i=t.indexOf(`
420
+ `),r=t.substring(0,i),l=t.substring(i+1)+`
421
+ `;if(e.type==="block-scalar"){const o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=r,e.source=l}else{const{offset:o}=e,c="indent"in e?e.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:c,source:r}];P1(f,"end"in e?e.end:void 0)||f.push({type:"newline",offset:-1,indent:c,source:`
422
+ `});for(const d of Object.keys(e))d!=="type"&&d!=="offset"&&delete e[d];Object.assign(e,{type:"block-scalar",indent:c,props:f,source:l})}}function P1(e,t){if(t)for(const i of t)switch(i.type){case"space":case"comment":e.push(i);break;case"newline":return e.push(i),!0}return!1}function gp(e,t,i){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=i,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let l=t.length;e.props[0].type==="block-scalar-header"&&(l-=e.props[0].source.length);for(const o of r)o.offset+=l;delete e.props,Object.assign(e,{type:i,source:t,end:r});break}case"block-map":case"block-seq":{const l={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
423
+ `};delete e.items,Object.assign(e,{type:i,source:t,end:[l]});break}default:{const r="indent"in e?e.indent:-1,l="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:i,indent:r,source:t,end:l})}}}const r2=e=>"type"in e?Sf(e):df(e);function Sf(e){switch(e.type){case"block-scalar":{let t="";for(const i of e.props)t+=Sf(i);return t+e.source}case"block-map":case"block-seq":{let t="";for(const i of e.items)t+=df(i);return t}case"flow-collection":{let t=e.start.source;for(const i of e.items)t+=df(i);for(const i of e.end)t+=i.source;return t}case"document":{let t=df(e);if(e.end)for(const i of e.end)t+=i.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const i of e.end)t+=i.source;return t}}}function df({start:e,key:t,sep:i,value:r}){let l="";for(const o of e)l+=o.source;if(t&&(l+=Sf(t)),i)for(const o of i)l+=o.source;return r&&(l+=Sf(r)),l}const lm=Symbol("break visit"),s2=Symbol("skip children"),$1=Symbol("remove item");function cs(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),q1(Object.freeze([]),e,t)}cs.BREAK=lm;cs.SKIP=s2;cs.REMOVE=$1;cs.itemAtPath=(e,t)=>{let i=e;for(const[r,l]of t){const o=i==null?void 0:i[r];if(o&&"items"in o)i=o.items[l];else return}return i};cs.parentCollection=(e,t)=>{const i=cs.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],l=i==null?void 0:i[r];if(l&&"items"in l)return l;throw new Error("Parent collection not found")};function q1(e,t,i){let r=i(t,e);if(typeof r=="symbol")return r;for(const l of["key","value"]){const o=t[l];if(o&&"items"in o){for(let c=0;c<o.items.length;++c){const f=q1(Object.freeze(e.concat([[l,c]])),o.items[c],i);if(typeof f=="number")c=f-1;else{if(f===lm)return lm;f===$1&&(o.items.splice(c,1),c-=1)}}typeof r=="function"&&l==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}const Hf="\uFEFF",Kf="",Gf="",rc="",l2=e=>!!e&&"items"in e,o2=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function c2(e){switch(e){case Hf:return"<BOM>";case Kf:return"<DOC>";case Gf:return"<FLOW_END>";case rc:return"<SCALAR>";default:return JSON.stringify(e)}}function H1(e){switch(e){case Hf:return"byte-order-mark";case Kf:return"doc-mode";case Gf:return"flow-error-end";case rc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
424
+ `:case`\r
425
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const u2=Object.freeze(Object.defineProperty({__proto__:null,BOM:Hf,DOCUMENT:Kf,FLOW_END:Gf,SCALAR:rc,createScalarToken:n2,isCollection:l2,isScalar:o2,prettyToken:c2,resolveAsScalar:t2,setScalarValue:i2,stringify:r2,tokenType:H1,visit:cs},Symbol.toStringTag,{value:"Module"}));function Ti(e){switch(e){case void 0:case" ":case`
426
+ `:case"\r":case" ":return!0;default:return!1}}const $v=new Set("0123456789ABCDEFabcdef"),f2=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Yu=new Set(",[]{}"),d2=new Set(` ,[]{}
427
+ \r `),bp=e=>!e||d2.has(e);class K1{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,i=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!i;let r=this.next??"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,i=this.buffer[t];for(;i===" "||i===" ";)i=this.buffer[++t];return!i||i==="#"||i===`
428
+ `?!0:i==="\r"?this.buffer[t+1]===`
429
+ `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let i=this.buffer[t];if(this.indentNext>0){let r=0;for(;i===" ";)i=this.buffer[++r+t];if(i==="\r"){const l=this.buffer[r+t+1];if(l===`
430
+ `||!l&&!this.atEnd)return t+r+1}return i===`
431
+ `||r>=this.indentNext||!i&&!this.atEnd?t+r:-1}if(i==="-"||i==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&Ti(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
432
+ `,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Hf&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let i=t.length,r=t.indexOf("#");for(;r!==-1;){const o=t[r-1];if(o===" "||o===" "){i=r-1;break}else r=t.indexOf("#",r+1)}for(;;){const o=t[i-1];if(o===" "||o===" ")i-=1;else break}const l=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-l),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-i),yield*this.pushNewline(),"stream"}return yield Kf,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const i=this.peek(3);if((i==="---"||i==="...")&&Ti(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ti(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Ti(i)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(t[i]){case"#":yield*this.pushCount(t.length-i);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(bp),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,i,r=-1;do t=yield*this.pushNewline(),t>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(t+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&l[0]!=="#"||r===0&&(l.startsWith("---")||l.startsWith("..."))&&Ti(l[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield Gf,yield*this.parseLineStart();let o=0;for(;l[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),l[o]){case void 0:return"flow";case"#":return yield*this.pushCount(l.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(bp),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||Ti(c)||c===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let i=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let o=0;for(;this.buffer[i-1-o]==="\\";)o+=1;if(o%2===0)break;i=this.buffer.indexOf('"',i+1)}const r=this.buffer.substring(0,i);let l=r.indexOf(`
433
+ `,this.pos);if(l!==-1){for(;l!==-1;){const o=this.continueScalar(l+1);if(o===-1)break;l=r.indexOf(`
434
+ `,o)}l!==-1&&(i=l-(r[l-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const i=this.buffer[++t];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>Ti(i)||i==="#")}*parseBlockScalar(){let t=this.pos-1,i=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){case" ":i+=1;break;case`
435
+ `:t=o,i=0;break;case"\r":{const c=this.buffer[o+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
436
+ `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
437
+ `,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let l=t+1;for(r=this.buffer[l];r===" ";)r=this.buffer[++l];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
438
+ `;)r=this.buffer[++l];t=l-1}else if(!this.blockScalarKeep)do{let o=t-1,c=this.buffer[o];c==="\r"&&(c=this.buffer[--o]);const f=o;for(;c===" ";)c=this.buffer[--o];if(c===`
439
+ `&&o>=this.pos&&o+1+i>f)t=o;else break}while(!0);return yield rc,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let i=this.pos-1,r=this.pos-1,l;for(;l=this.buffer[++r];)if(l===":"){const o=this.buffer[r+1];if(Ti(o)||t&&Yu.has(o))break;i=r}else if(Ti(l)){let o=this.buffer[r+1];if(l==="\r"&&(o===`
440
+ `?(r+=1,l=`
441
+ `,o=this.buffer[r+1]):i=r),o==="#"||t&&Yu.has(o))break;if(l===`
442
+ `){const c=this.continueScalar(r+1);if(c===-1)break;r=Math.max(r,c-2)}}else{if(t&&Yu.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield rc,yield*this.pushToIndex(i+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,i){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(bp))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,i=this.charAt(1);if(Ti(i)||t&&Yu.has(i))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,i=this.buffer[t];for(;!Ti(i)&&i!==">";)i=this.buffer[++t];return yield*this.pushToIndex(i===">"?t+1:t,!1)}else{let t=this.pos+1,i=this.buffer[t];for(;i;)if(f2.has(i))i=this.buffer[++t];else if(i==="%"&&$v.has(this.buffer[t+1])&&$v.has(this.buffer[t+2]))i=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
443
+ `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
444
+ `?yield*this.pushCount(2):0}*pushSpaces(t){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||t&&r===" ");const l=i-this.pos;return l>0&&(yield this.buffer.substr(this.pos,l),this.pos=i),l}*pushUntil(t){let i=this.pos,r=this.buffer[i];for(;!t(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class G1{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let i=0,r=this.lineStarts.length;for(;i<r;){const o=i+r>>1;this.lineStarts[o]<t?i=o+1:r=o}if(this.lineStarts[i]===t)return{line:i+1,col:1};if(i===0)return{line:0,col:t};const l=this.lineStarts[i-1];return{line:i,col:t-l+1}}}}function sr(e,t){for(let i=0;i<e.length;++i)if(e[i].type===t)return!0;return!1}function qv(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Y1(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Qu(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function nl(e){var i;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=e[++t])==null?void 0:i.type)==="space";);return e.splice(t,e.length)}function Hv(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!sr(t.start,"explicit-key-ind")&&!sr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,Y1(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class ng{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new K1,this.onNewLine=t}*parse(t,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,i))yield*this.next(r);i||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const i=H1(t);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const i=t??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&Hv(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{const l=r.items[r.items.length-1];if(l.value){r.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(l.sep)l.value=i;else{Object.assign(l,{key:i,sep:[]}),this.onKeyLine=!l.explicitKey;return}break}case"block-seq":{const l=r.items[r.items.length-1];l.value?r.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=r.items[r.items.length-1];!l||l.value?r.items.push({start:[],key:i,sep:[]}):l.sep?l.value=i:Object.assign(l,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const l=i.items[i.items.length-1];l&&!l.sep&&!l.value&&l.start.length>0&&qv(l.start)===-1&&(i.indent===0||l.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(r.type==="document"?r.end=l.start:r.items.push({start:l.start}),i.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{qv(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const i=this.startBlockValue(t);i?this.stack.push(i):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const i=Qu(this.peek(2)),r=nl(i);let l;t.end?(l=t.end,l.push(this.sourceToken),delete t.end):l=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:r,key:t,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let i=this.source.indexOf(`
445
+ `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
446
+ `,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var r;const i=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)t.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,t.indent)){const l=t.items[t.items.length-2],o=(r=l==null?void 0:l.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),t.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const l=!this.onKeyLine&&this.indent===t.indent,o=l&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(o&&i.sep&&!i.value){const f=[];for(let d=0;d<i.sep.length;++d){const h=i.sep[d];switch(h.type){case"newline":f.push(d);break;case"space":break;case"comment":h.indent>t.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(c=i.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(c.push(this.sourceToken),t.items.push({start:c}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.value?(c.push(this.sourceToken),t.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(i.explicitKey)if(i.sep)if(i.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(sr(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(Y1(i.key)&&!sr(i.sep,"newline")){const f=nl(i.start),d=i.key,h=i.sep;h.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:h}]})}else c.length>0?i.sep=i.sep.concat(c,this.sourceToken):i.sep.push(this.sourceToken);else if(sr(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=nl(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?t.items.push({start:c,key:null,sep:[this.sourceToken]}):sr(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||i.value?(t.items.push({start:c,key:f,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(f):(Object.assign(i,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(t);if(f){if(f.type==="block-seq"){if(!i.explicitKey&&i.sep&&!sr(i.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else l&&t.items.push({start:c});this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const i=t.items[t.items.length-1];switch(this.type){case"newline":if(i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,t.indent)){const l=t.items[t.items.length-2],o=(r=l==null?void 0:l.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),t.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=t.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;i.value||sr(i.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>t.indent){const l=this.startBlockValue(t);if(l){this.stack.push(l);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const i=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?t.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?t.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);!i||i.value?t.items.push({start:[],key:l,sep:[]}):i.sep?this.stack.push(l):Object.assign(i,{key:l,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const l=Qu(r),o=nl(l);Hv(t);const c=t.end.splice(1,t.end.length);c.push(this.sourceToken);const f={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let i=this.source.indexOf(`
447
+ `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
448
+ `,i)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const i=Qu(t),r=nl(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Qu(t),r=nl(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,i){return this.type!=="comment"||this.indent<=i?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Q1(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new G1||null,prettyErrors:t}}function h2(e,t={}){const{lineCounter:i,prettyErrors:r}=Q1(t),l=new ng(i==null?void 0:i.addNewLine),o=new tg(t),c=Array.from(o.compose(l.parse(e)));if(r&&i)for(const f of c)f.errors.forEach(Ef(e,i)),f.warnings.forEach(Ef(e,i));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function V1(e,t={}){const{lineCounter:i,prettyErrors:r}=Q1(t),l=new ng(i==null?void 0:i.addNewLine),o=new tg(t);let c=null;for(const f of o.compose(l.parse(e),!0,e.length))if(!c)c=f;else if(c.options.logLevel!=="silent"){c.errors.push(new Wr(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&i&&(c.errors.forEach(Ef(e,i)),c.warnings.forEach(Ef(e,i))),c}function p2(e,t,i){let r;typeof t=="function"?r=t:i===void 0&&t&&typeof t=="object"&&(i=t);const l=V1(e,i);if(!l)return null;if(l.warnings.forEach(o=>h1(l.options.logLevel,o)),l.errors.length>0){if(l.options.logLevel!=="silent")throw l.errors[0];l.errors=[]}return l.toJS(Object.assign({reviver:r},i))}function m2(e,t,i){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:i===void 0&&t&&(i=t),typeof i=="string"&&(i=i.length),typeof i=="number"){const l=Math.round(i);i=l<1?void 0:l>8?{indent:8}:{indent:l}}if(e===void 0){const{keepUndefined:l}=i??t??{};if(!l)return}return ds(e)&&!r?e.toString(i):new Fl(e,r,i).toString(i)}const Kv=Object.freeze(Object.defineProperty({__proto__:null,Alias:jf,CST:u2,Composer:tg,Document:Fl,Lexer:K1,LineCounter:G1,Pair:mn,Parser:ng,Scalar:je,Schema:M1,YAMLError:Jm,YAMLMap:ei,YAMLParseError:Wr,YAMLSeq:xr,YAMLWarning:L1,isAlias:Sr,isCollection:Mt,isDocument:ds,isMap:Il,isNode:Dt,isPair:At,isScalar:xt,isSeq:zl,parse:p2,parseAllDocuments:h2,parseDocument:V1,stringify:m2,visit:hs,visitAsync:Lf},Symbol.toStringTag,{value:"Module"}));function g2({projectName:e,file:t,onClose:i,onSaved:r}){const l=ni(),{alert:o}=ai(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=kt({queryKey:["pipeline-file",e,t],queryFn:()=>$A(e,t)}),[m,v]=M.useState("structured"),[x,S]=M.useState(null),[_,w]=M.useState(null);M.useEffect(()=>{c&&x===null&&(S(c.content),w(c.etag),c.parseError&&v("yaml"))},[c,x]),M.useEffect(()=>{const T=P=>{P.key==="Escape"&&i()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[i]);const k=br({mutationFn:()=>{if(x===null||_===null)throw new Error("no draft");return qA(e,t,x,_)},onSuccess:T=>{w(T.etag),l.invalidateQueries({queryKey:["pipeline-file",e,t]}),l.invalidateQueries({queryKey:["project-pipelines",e]}),r()},onError:T=>{const P=T.status;o({title:P===409?"文件已被其他地方修改":P===422?"YAML 语法错":"保存失败",body:T instanceof Error?T.message:String(T)})}}),O=x!==null&&c&&x!==c.content,{parsed:A,parseError:I}=M.useMemo(()=>{if(x===null)return{parsed:null,parseError:null};try{return{parsed:Kv.parse(x)??{},parseError:null}}catch(T){return{parsed:null,parseError:T instanceof Error?T.message:String(T)}}},[x]),q=T=>{try{const P=Kv.stringify(T,{lineWidth:0});S(P)}catch(P){o({title:"YAML 序列化失败",body:P instanceof Error?P.message:String(P)})}};return g.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:i,children:g.jsxs("div",{onClick:T=>T.stopPropagation(),className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[g.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[g.jsxs("div",{children:[g.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[g.jsx(Dv,{size:20,strokeWidth:2.5}),g.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(c==null?void 0:c.isActive)&&g.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:"active"})]}),g.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,_&&` · etag ${_}`]})]}),g.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:i,type:"button","aria-label":"关闭",children:g.jsx(gc,{size:14,strokeWidth:3})})]}),f&&g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&g.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",h instanceof Error?h.message:String(h)]}),c&&x!==null&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[g.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[g.jsxs("button",{type:"button",onClick:()=>v("structured"),"aria-pressed":m==="structured",disabled:!!I,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",m==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",I?"opacity-50 cursor-not-allowed":""].join(" "),title:I??void 0,children:[g.jsx(Um,{size:11,strokeWidth:2.5}),"结构化"]}),g.jsxs("button",{type:"button",onClick:()=>v("yaml"),"aria-pressed":m==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",m==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[g.jsx(Dv,{size:11,strokeWidth:2.5}),"原始 YAML"]})]}),I&&g.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[g.jsx(Bm,{size:12,strokeWidth:2.5}),"YAML parse: ",I]}),(c==null?void 0:c.isActive)&&g.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:"⚠ 这是当前激活的 pipeline,保存后下一轮 tick 生效"})]}),g.jsxs("div",{className:"flex-1 overflow-auto",children:[m==="structured"&&A&&g.jsx(b2,{parsed:A,onChange:q}),m==="yaml"&&g.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:x,onChange:T=>S(T.target.value),spellCheck:!1,"aria-label":"pipeline YAML 编辑器"})]}),g.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[g.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:O?g.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):k.isSuccess?g.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[g.jsx(qE,{size:12,strokeWidth:2.5})," 已保存"]}):"无变化"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{S(null),y()},disabled:k.isPending,type:"button",children:"重新加载"}),g.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>k.mutate(),disabled:!O||k.isPending,type:"button","aria-label":"保存 pipeline",children:[k.isPending?g.jsx(Ri,{size:13,strokeWidth:3,className:"animate-spin"}):g.jsx(Pm,{size:13,strokeWidth:3}),"保存"]})]})]})]})]})})}function b2({parsed:e,onChange:t}){const i=e.stages??[],r=d=>{t({...e,stages:d})},l=()=>{r([...i,{name:`stage-${i.length+1}`,on_complete:"move_card Done"}])},o=d=>{r(i.filter((h,y)=>y!==d))},c=(d,h)=>{const y=[...i],m=d+h;m<0||m>=y.length||([y[d],y[m]]=[y[m],y[d]],r(y))},f=(d,h)=>{r(i.map((y,m)=>m===d?{...y,...h}:y))};return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[g.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[g.jsx("span",{className:"font-bold",children:"mode:"}),g.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:d=>t({...e,mode:d.target.value}),children:[g.jsx("option",{value:"project",children:"project"}),g.jsx("option",{value:"steps",children:"steps"})]})]}),g.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"project = 事件驱动流水线(默认) · steps = 顺序脚本"})]}),g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-2",children:[g.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:["Stages (",i.length,")"]}),g.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:l,"aria-label":"添加 stage",children:[g.jsx(fs,{size:11,strokeWidth:3})," 添加 stage"]})]}),i.length===0?g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没 stage。点"添加 stage"开始。'}):g.jsx("div",{className:"flex flex-col gap-3",children:i.map((d,h)=>g.jsx(y2,{stage:d,index:h,total:i.length,onChange:y=>f(h,y),onRemove:()=>o(h),onMoveUp:()=>c(h,-1),onMoveDown:()=>c(h,1)},h))})]})]})}function y2({stage:e,index:t,total:i,onChange:r,onRemove:l,onMoveUp:o,onMoveDown:c}){const f=e.on_fail??{};return g.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[g.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&g.jsx("code",{className:"ml-2 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:e.name})]}),g.jsxs("div",{className:"flex gap-1",children:[g.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":"上移",children:g.jsx(EC,{size:12,strokeWidth:3})}),g.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===i-1,"aria-label":"下移",children:g.jsx(zm,{size:12,strokeWidth:3})}),g.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:l,"aria-label":"删除 stage",children:g.jsx(mc,{size:12,strokeWidth:3})})]})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[g.jsx(ir,{label:"name",hint:"stage 唯一名",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:d=>r({name:d.target.value}),placeholder:"develop"})}),g.jsx(ir,{label:"profile",hint:"skill 画像,可空",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:d=>r({profile:d.target.value||void 0}),placeholder:"fullstack"})}),g.jsx(ir,{label:"card_state",hint:"本 stage 期间卡片状态",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:d=>r({card_state:d.target.value||void 0}),placeholder:"Inprogress"})}),g.jsx(ir,{label:"timeout",hint:"可选,如 30m 2h",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:d=>r({timeout:d.target.value||void 0}),placeholder:"2h"})}),g.jsx(ir,{label:"trigger",hint:"触发条件,可空走默认",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:d=>r({trigger:d.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),g.jsx(ir,{label:"on_complete",hint:"成功后动作",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:d=>r({on_complete:d.target.value}),placeholder:"move_card Done"})})]}),g.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[g.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),g.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[g.jsx(ir,{label:"action",hint:"失败时动作,如 label NEEDS-FIX",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:d=>r({on_fail:{...f,action:d.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),g.jsx(ir,{label:"comment",hint:"写进卡片的注释",children:g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:d=>r({on_fail:{...f,comment:d.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),g.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:f.halt??!0,onChange:d=>r({on_fail:{...f,halt:d.target.checked}})}),g.jsx("span",{className:"font-bold",children:"halt"}),g.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(失败后停流水线;去掉则继续下一张卡)"})]})]})]})}function ir({label:e,hint:t,children:i}){return g.jsxs("label",{className:"flex flex-col gap-1",children:[g.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),i,t&&g.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function x2(){var o;const{name:e=""}=RE(),t=vr(),[i,r]=M.useState("overview"),l=kt({queryKey:["project",e],queryFn:()=>jA(e),enabled:!!e});return g.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[g.jsxs("header",{className:"flex items-center gap-3",children:[g.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[g.jsx(PE,{size:14,strokeWidth:3}),"返回"]}),g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:e}),g.jsx(Er,{to:`/board?project=${encodeURIComponent(e)}`,className:"nb-btn nb-btn-mint",children:"看板"})]}),g.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[g.jsx(Vu,{current:i,value:"overview",onSelect:r,icon:LC,children:"概览"}),g.jsx(Vu,{current:i,value:"config",onSelect:r,icon:YE,children:"配置"}),g.jsx(Vu,{current:i,value:"pipelines",onSelect:r,icon:XE,children:"Pipelines"}),g.jsx(Vu,{current:i,value:"danger",onSelect:r,icon:mc,children:"危险操作"})]}),i==="overview"&&g.jsx(v2,{name:e,data:l.data,loading:l.isLoading}),i==="config"&&g.jsx(E2,{name:e}),i==="pipelines"&&g.jsx(S2,{name:e}),i==="danger"&&g.jsx(_2,{name:e,repoDir:((o=l.data)==null?void 0:o.repoDir)??null})]})}function Vu({current:e,value:t,onSelect:i,icon:r,children:l}){const o=e===t;return g.jsxs("button",{type:"button",onClick:()=>i(t),"aria-current":o?"page":void 0,className:["nb-btn",o?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[g.jsx(r,{size:13,strokeWidth:2.5}),l]})}function v2({name:e,data:t,loading:i}){return i?g.jsx("div",{className:"nb-card",children:g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):t?g.jsx("div",{className:"nb-card",children:g.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[g.jsx("dt",{className:"font-bold",children:"仓库路径"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),g.jsx("dt",{className:"font-bold",children:"PM 后端"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),g.jsx("dt",{className:"font-bold",children:"Agent"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),g.jsx("dt",{className:"font-bold",children:"卡片"}),g.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.cards.total," 张 · ",t.cards.inprogress," 进行中 · ",t.cards.done," 完成"]}),g.jsx("dt",{className:"font-bold",children:"Worker"}),g.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.workers.total," 个(",t.workers.active," 活跃)"]}),g.jsx("dt",{className:"font-bold",children:"Pipeline"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),g.jsx("dt",{className:"font-bold",children:"最近活动"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):g.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:g.jsxs("p",{children:["项目 ",e," 不存在或无法读取。"]})})}function E2({name:e}){const t=ni(),{alert:i}=ai(),{data:r,isLoading:l,isError:o,error:c,refetch:f}=kt({queryKey:["project-conf",e],queryFn:()=>zA(e)}),[d,h]=M.useState(null),[y,m]=M.useState(null);M.useEffect(()=>{r&&d===null&&(h(r.content),m(r.etag))},[r,d]);const v=d!==null&&r!==void 0&&d!==r.content,x=br({mutationFn:()=>{if(d===null||y===null)throw new Error("no draft");return BA(e,d,y)},onSuccess:S=>{m(S.etag),t.invalidateQueries({queryKey:["project-conf",e]}),t.invalidateQueries({queryKey:["project",e]})},onError:S=>{const _=S.status;i({title:_===409?"配置已被其他地方修改":"保存失败",body:_===409?'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。':S instanceof Error?S.message:String(S)})}});return l?g.jsx("div",{className:"nb-card",children:g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):o?g.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:g.jsxs("p",{children:["加载失败: ",c instanceof Error?c.message:String(c)]})}):g.jsxs("div",{className:"nb-card",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:g.jsxs("code",{className:"font-[family-name:var(--font-mono)] text-sm bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:["~/.coral/projects/",e,"/conf"]})}),y&&g.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",y]})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{h(null),f()},disabled:x.isPending,"aria-label":"重新加载",children:[g.jsx(Ll,{size:13,strokeWidth:2.5}),"重新加载"]}),g.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>x.mutate(),disabled:!v||x.isPending,"aria-label":"保存配置",children:[x.isPending?g.jsx(Ri,{size:13,strokeWidth:3,className:"animate-spin"}):x.isSuccess&&!v?g.jsx(bC,{size:13,strokeWidth:3}):g.jsx(Pm,{size:13,strokeWidth:3}),"保存"]})]})]}),g.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:d??"",onChange:S=>h(S.target.value),spellCheck:!1,"aria-label":"conf 文件编辑器"}),v&&g.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:"● 未保存的修改"})]})}function S2({name:e}){const t=ni(),{confirm:i,alert:r,prompt:l}=ai(),{data:o,isLoading:c}=kt({queryKey:["project-pipelines",e],queryFn:()=>FA(e)}),[f,d]=M.useState(null),h=br({mutationFn:S=>PA(e,S),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:S=>{r({title:"切换失败",body:S instanceof Error?S.message:String(S)})}}),y=br({mutationFn:S=>KA(e,S),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:S=>{r({title:"删除失败",body:S instanceof Error?S.message:String(S)})}}),m=br({mutationFn:S=>HA(e,S.name,S.template),onSuccess:S=>{t.invalidateQueries({queryKey:["project-pipelines",e]}),d(S.name)},onError:S=>{r({title:"创建失败",body:S instanceof Error?S.message:String(S)})}}),v=async()=>{const S=await l({title:"新建 pipeline",body:"文件名(以 .yaml 结尾),如 ci.yaml",placeholder:"ci.yaml"});if(!S)return;const _=S.endsWith(".yaml")?S:`${S}.yaml`;m.mutate({name:_,template:"blank"})};if(c)return g.jsx("div",{className:"nb-card",children:g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})});const x=[];o!=null&&o.active&&x.push({name:o.active,isActive:!0});for(const S of(o==null?void 0:o.available)??[])x.push({name:S.name,isActive:!1});return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"nb-card",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:"Pipelines"}),g.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:v,disabled:m.isPending,"aria-label":"新建 pipeline",children:[g.jsx(fs,{size:12,strokeWidth:3}),"新建 pipeline"]})]}),x.length===0?g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没有 pipeline 文件。点"新建 pipeline"开始。'}):g.jsx("ul",{className:"flex flex-col gap-2",children:x.map(S=>g.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[g.jsx(XE,{size:16,strokeWidth:2.5}),g.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:S.name}),S.isActive&&g.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"active"}),g.jsxs("div",{className:"flex gap-1",children:[g.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>d(S.name),"aria-label":`编辑 ${S.name}`,children:[g.jsx(KE,{size:11,strokeWidth:2.5}),"编辑"]}),!S.isActive&&g.jsxs(g.Fragment,{children:[g.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await i({title:`切换到 ${S.name}`,body:`当前 project.yaml 会被 ${S.name} 的内容覆盖。继续?`,confirm:"切换"})&&h.mutate(S.name)},disabled:h.isPending,"aria-label":`切换到 ${S.name}`,children:"切换"}),g.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await i({title:`删除 ${S.name}`,body:"这个 pipeline 文件会被永久删除。",confirm:"删除",danger:!0})&&y.mutate(S.name)},disabled:y.isPending,"aria-label":`删除 ${S.name}`,children:g.jsx(mc,{size:11,strokeWidth:2.5})})]})]})]},S.name))})]}),f&&g.jsx(g2,{projectName:e,file:f,onClose:()=>d(null),onSaved:()=>{t.invalidateQueries({queryKey:["project-pipelines",e]})}})]})}function _2({name:e,repoDir:t}){const i=vr(),r=ni(),{alert:l}=ai(),[o,c]=M.useState(""),[f,d]=M.useState(!0),h=br({mutationFn:()=>UA(e,{includeClaudeDir:f}),onSuccess:y=>{r.invalidateQueries({queryKey:["projects"]});const m=y.claudeRemoved.filter(v=>v.ok).map(v=>v.path);l({title:"已删除",body:m.length>0?`项目已删除。同时清理了:
449
+ ${m.join(`
450
+ `)}`:"项目已删除。"}).then(()=>i("/projects"))},onError:y=>{l({title:"删除失败",body:y instanceof Error?y.message:String(y)})}});return g.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:"删除项目"}),g.jsxs("p",{className:"text-sm mb-4",children:["这会清理 ",g.jsxs("code",{className:"font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-1.5 py-0.5 rounded",children:["~/.coral/projects/",e,"/"]}),"(包括所有卡片、runtime、logs)。"]}),t&&g.jsxs("label",{className:"flex items-start gap-2 mb-4 p-3 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:f,onChange:y=>d(y.target.checked),className:"mt-0.5"}),g.jsxs("div",{className:"flex-1",children:[g.jsx("div",{className:"text-sm font-bold",children:"同时清理 repo 的 .claude/"}),g.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),g.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:"repo 本身不动,只清这个目录。"})]})]}),g.jsx("div",{className:"mb-4",children:g.jsxs("label",{className:"flex flex-col gap-1.5",children:[g.jsxs("span",{className:"text-sm font-bold",children:["输入项目名 ",g.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e})," 确认:"]}),g.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:o,onChange:y=>c(y.target.value),placeholder:e})]})}),g.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:o!==e||h.isPending,onClick:()=>h.mutate(),"aria-label":"永久删除项目",children:[h.isPending?g.jsx(Ri,{size:14,strokeWidth:3,className:"animate-spin"}):g.jsx(mc,{size:14,strokeWidth:3}),"永久删除"]})]})}function w2(e){return qt(`/api/projects/${encodeURIComponent(e)}/cards`)}function k2(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function Pl(e,t){const i=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!i.ok){const r=await i.text();throw new Error(`${i.status} ${i.statusText}: ${r}`)}return i.json().catch(()=>({}))}function N2(e,t){return Pl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}function T2(e,t){return Pl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function C2(e,t){return Pl(`/api/projects/${encodeURIComponent(e)}/cards`,{title:t})}function A2(e){return Pl(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function O2(e){return Pl(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function R2(e,t){return Pl(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function X1(e){const t=ni();M.useEffect(()=>{if(!e)return;const i=`/stream/projects/${encodeURIComponent(e)}`,r=new EventSource(i),l=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",d.project]}),d.card&&t.setQueryData(["card",d.project,d.seq],{...t.getQueryData(["card",d.project,d.seq])??{},...d.card}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["workers",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["pipeline-status",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return r.addEventListener("card.created",l),r.addEventListener("card.updated",l),r.addEventListener("card.deleted",l),r.addEventListener("worker.updated",o),r.addEventListener("worker.added",o),r.addEventListener("worker.deleted",o),r.addEventListener("pipeline.status",c),()=>r.close()},[e,t])}const M2=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),D2=new Set(["frontend","backend","mobile","database","devops"]),L2=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),j2=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function I2(e){return M2.has(e)?"lang":D2.has(e)?"end":L2.has(e)?"persona":j2.has(e)?"workflow":"other"}const z2={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function Z1({name:e}){const t=z2[I2(e)];return g.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function W1({label:e,kind:t="default"}){const i=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return g.jsx("span",{className:"nb-badge",style:{background:i},children:e})}function B2({card:e,onClick:t,done:i}){const r=e.labels.some(l=>l.startsWith("STARTED-"))&&!i;return g.jsxs("article",{onClick:t,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),t())},tabIndex:0,role:"button","aria-label":`Card #${e.seq}: ${e.title}`,className:["bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl p-3","shadow-[3px_3px_0_var(--color-text)] cursor-pointer","transition-[transform,box-shadow] duration-[180ms] ease-out","hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-[5px_5px_0_var(--color-text)]","focus:outline-none focus-visible:ring-[3px] focus-visible:ring-offset-2 focus-visible:ring-[var(--color-text)]",i?"opacity-60":""].join(" "),children:[g.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[g.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-[11px] px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),r&&g.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),g.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${i?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&g.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(l=>g.jsx(Z1,{name:l},l)),e.labels.filter(l=>l==="NEEDS-FIX").map(l=>g.jsx(W1,{label:l,kind:"warn"},l))]}),g.jsxs("div",{className:"pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)] flex items-center gap-2 text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-subtle)]",children:[g.jsx("span",{children:U2(e.updatedAt??e.createdAt)}),e.branch&&g.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function U2(e){if(!e)return"—";const t=new Date(e),i=Date.now()-t.getTime();return i<6e4?"刚才":i<36e5?`${Math.floor(i/6e4)}m ago`:i<864e5?`${Math.floor(i/36e5)}h ago`:t.toLocaleDateString()}function F2({label:e,bg:t,cards:i,onCardClick:r}){return g.jsxs("div",{className:"flex flex-col gap-2 p-3 rounded-2xl border-[3px] border-[var(--color-text)] min-h-[340px]",style:{background:t},children:[g.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 border-b-2 border-[var(--color-text)]",children:[g.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),g.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:i.length})]}),g.jsxs("div",{className:"flex flex-col gap-2",children:[i.length===0&&g.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),i.map(l=>g.jsx(B2,{card:l,onClick:()=>r(l),done:e==="Done"},l.seq))]})]})}function P2({project:e,seq:t,onClose:i,onChanged:r}){const{confirm:l}=ai(),{data:o,isLoading:c,isError:f,error:d}=kt({queryKey:["card",e,t],queryFn:()=>k2(e,t)});return M.useEffect(()=>{const h=y=>{y.key==="Escape"&&i()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[i]),g.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"card-modal-title",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:i,children:g.jsxs("div",{onClick:h=>h.stopPropagation(),className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[g.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[g.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",t]}),(o==null?void 0:o.state)&&g.jsx("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:o.state})]}),g.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:(o==null?void 0:o.title)??"加载中…"})]}),g.jsx("button",{onClick:i,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:g.jsx(gc,{size:16,strokeWidth:3})})]}),c&&g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),f&&g.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",d instanceof Error?d.message:String(d)]}),o&&g.jsxs("div",{className:"flex flex-col gap-4",children:[o.branch&&g.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[g.jsx(BC,{size:14}),g.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:o.branch})]}),(o.skills.length>0||o.labels.length>0)&&g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.skills.map(h=>g.jsx(Z1,{name:h},h)),o.labels.map(h=>g.jsx(W1,{label:h,kind:h==="NEEDS-FIX"?"warn":"default"},h))]}),o.checklist.total>0&&g.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[g.jsxs("div",{className:"flex items-center justify-between mb-2",children:[g.jsxs("span",{className:"font-bold text-sm",children:["检查清单 ",o.checklist.done,"/",o.checklist.total]}),g.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:g.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${o.checklist.percent}%`}})})]}),g.jsx("ul",{className:"text-sm space-y-1",children:o.checklist.items.map((h,y)=>g.jsxs("li",{className:`flex items-start gap-2 ${h.done?"opacity-60 line-through":""}`,children:[g.jsx("span",{children:h.done?"✓":"○"}),g.jsx("span",{children:h.text})]},y))})]}),o.body&&g.jsxs("div",{children:[g.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"正文"}),g.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:o.body.trim()||"(空)"})]}),g.jsxs("div",{className:"flex gap-3 pt-2 border-t-2 border-[var(--color-border-light)]",children:[g.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:async()=>{await T2(e,t),r()},children:[g.jsx(Fm,{size:14,strokeWidth:3}),"启动 worker"]}),g.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await l({title:`重置卡片 #${t}`,body:"卡片状态会回到初始,已做的 checklist 会清空。",confirm:"重置",danger:!0})&&(await N2(e,t),r(),i())},children:[g.jsx(Df,{size:14,strokeWidth:2.5}),"重置卡片"]})]})]})]})})}function ig({current:e,onChange:t}){const[i,r]=M.useState(!1),l=M.useRef(null),{data:o}=kt({queryKey:["projects"],queryFn:bc});return M.useEffect(()=>{const c=f=>{var d;(d=l.current)!=null&&d.contains(f.target)||r(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),g.jsxs("div",{className:"relative",ref:l,children:[g.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>r(c=>!c),children:[e,g.jsx(zm,{size:14,strokeWidth:2.5})]}),i&&o&&g.jsx("div",{className:"absolute right-0 mt-2 z-20 min-w-[200px] bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[5px_5px_0_var(--color-text)] overflow-hidden",children:o.data.map(c=>g.jsxs("button",{type:"button",onClick:()=>{t(c.name),r(!1)},className:["w-full text-left px-4 py-2 text-sm font-semibold",c.name===e?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[g.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),g.jsxs("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:[c.cards.total," cards"]})]},c.name))})]})}const $2=[{state:"Backlog",label:"Backlog",bg:"var(--color-accent-purple)"},{state:"Inprogress",label:"Inprogress",bg:"var(--color-accent-yellow)"},{state:"Review",label:"Review",bg:"var(--color-accent-pink)"},{state:"Done",label:"Done",bg:"var(--color-accent-mint)"}];function q2(){var j,X,D;const[e,t]=Im(),i=e.get("project"),[r,l]=M.useState(null),[o,c]=M.useState(""),[f,d]=M.useState(()=>new Set),[h,y]=M.useState(()=>new Set),{confirm:m,prompt:v}=ai();X1(i);const x=kt({queryKey:["projects"],queryFn:bc}),S=kt({queryKey:["cards",i],queryFn:()=>w2(i??""),enabled:!!i}),_=ni(),w=()=>{_.invalidateQueries({queryKey:["cards",i]}),_.invalidateQueries({queryKey:["projects"]}),_.invalidateQueries({queryKey:["pipeline-status",i]})},k=$=>{t({project:$})},O=((j=S.data)==null?void 0:j.data)??[],{allSkills:A,allLabels:I}=M.useMemo(()=>{const $=new Set,Q=new Set;for(const se of O){for(const ae of se.skills)$.add(ae);for(const ae of se.labels)Q.add(ae)}return{allSkills:[...$].sort(),allLabels:[...Q].sort()}},[O]);if(!i)return g.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"看板"}),g.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"选择一个项目 🎯"}),g.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:"看板按项目分。挑一个开始:"}),g.jsx("div",{className:"flex flex-wrap gap-2",children:(X=x.data)==null?void 0:X.data.map($=>g.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>k($.name),type:"button",children:$.name},$.name))})]})]});const q=O.filter($=>{if(o){const Q=o.toLowerCase();if(!($.title.toLowerCase().includes(Q)||$.skills.some(ae=>ae.toLowerCase().includes(Q))||$.labels.some(ae=>ae.toLowerCase().includes(Q))))return!1}return!(f.size>0&&!$.skills.some(se=>f.has(se))||h.size>0&&!$.labels.some(se=>h.has(se)))}),T=(D=x.data)==null?void 0:D.data.find($=>$.name===i),P=(T==null?void 0:T.pipelineStatus)==="running";return g.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[g.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"看板 ✨"}),g.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:T?`${T.name} · ${T.cards.total} cards · ${T.workers.active} workers 活跃`:"加载中…"})]}),g.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[g.jsx(ig,{current:i,onChange:k}),P?g.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:async()=>{await O2(i),w()},type:"button",children:[g.jsx(QE,{size:14,strokeWidth:3})," 停止"]}):g.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:async()=>{await A2(i),w()},type:"button",children:[g.jsx(Fm,{size:14,strokeWidth:3})," 启动 pipeline"]}),g.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await m({title:"重置整个流水线",body:"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。",confirm:"重置全部",danger:!0})&&(await R2(i,{all:!0}),w())},children:[g.jsx(Df,{size:14,strokeWidth:2.5})," 重置"]}),g.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:async()=>{const $=await v({title:"新建卡片",body:"输入卡片标题,会作为 markdown 文件的 title。",placeholder:"例如:接入 GitHub OAuth"});$&&(await C2(i,$),w())},children:[g.jsx(fs,{size:14,strokeWidth:3})," 新卡片"]})]})]}),g.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[g.jsxs("div",{className:"relative flex-1 max-w-md",children:[g.jsx(yf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),g.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索标题 / skill / label…",value:o,onChange:$=>c($.target.value),"aria-label":"搜索卡片"})]}),g.jsx(Gv,{label:"skill",options:A,selected:f,onChange:d}),g.jsx(Gv,{label:"label",options:I,selected:h,onChange:y}),(o||f.size>0||h.size>0)&&g.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{c(""),d(new Set),y(new Set)},type:"button","aria-label":"清空筛选",children:[g.jsx(gc,{size:11,strokeWidth:3}),"清空"]}),g.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[g.jsx(IC,{size:12}),q.length," / ",O.length]})]}),S.isError&&g.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[g.jsx("p",{className:"font-semibold",children:"加载卡片失败"}),g.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:S.error instanceof Error?S.error.message:String(S.error)})]}),!S.isError&&g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:$2.map($=>g.jsx(F2,{label:$.label,bg:$.bg,cards:q.filter(H2($.state)),onCardClick:Q=>l(Q.seq)},$.state))}),r!==null&&g.jsx(P2,{project:i,seq:r,onClose:()=>l(null),onChanged:w})]})}function H2(e){return t=>e==="Backlog"?t.state==="Backlog"||t.state==="Planning":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function Gv({label:e,options:t,selected:i,onChange:r}){const[l,o]=M.useState(!1),c=M.useRef(null);M.useEffect(()=>{if(!l)return;const y=v=>{var x;(x=c.current)!=null&&x.contains(v.target)||o(!1)},m=v=>{v.key==="Escape"&&o(!1)};return window.addEventListener("click",y),window.addEventListener("keydown",m),()=>{window.removeEventListener("click",y),window.removeEventListener("keydown",m)}},[l]);const f=y=>{const m=new Set(i);m.has(y)?m.delete(y):m.add(y),r(m)},d=t.length===0,h=i.size;return g.jsxs("div",{ref:c,className:"relative",children:[g.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!d&&o(y=>!y),disabled:d,"aria-haspopup":"listbox","aria-expanded":l,"aria-label":`按 ${e} 筛选`,children:[e,h>0&&g.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:h}),g.jsx(zm,{size:11,strokeWidth:3,className:["transition-transform",l?"rotate-180":""].join(" ")})]}),l&&g.jsxs("div",{role:"listbox",className:"absolute left-0 top-full mt-2 z-20 min-w-[200px] max-h-64 overflow-auto nb-card p-2",style:{padding:8},children:[t.map(y=>{const m=i.has(y);return g.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",m?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[g.jsx("input",{type:"checkbox",checked:m,onChange:()=>f(y),className:"flex-shrink-0"}),g.jsx("span",{className:"truncate",children:y})]},y)}),h>0&&g.jsx("button",{type:"button",className:"w-full mt-2 pt-2 border-t-2 border-dashed border-[var(--color-text)] text-xs font-bold text-[var(--color-crashed)] text-center",onClick:()=>r(new Set),children:"清空选择"})]})]})}function K2(e){return qt(`/api/projects/${encodeURIComponent(e)}/workers`)}function G2(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function J1(e,t){const i=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!i.ok)throw new Error(`${i.status}: ${await i.text()}`);return i.json().catch(()=>({}))}function _f(e,t){return J1(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function eS(e,t,i){return J1(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,i?{seq:i}:void 0)}function Y2(){const[e,t]=Im(),i=e.get("project");X1(i);const r=ni(),[l,o]=M.useState(null),{data:c,isLoading:f,isError:d,error:h,refetch:y}=kt({queryKey:["workers",i],queryFn:()=>K2(i??""),enabled:!!i,refetchInterval:5e3});if(!i)return g.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-accent-yellow)]",children:[g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"Workers 👷"}),g.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["在 URL 上加 ",g.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"?project=xx"}),",或从",g.jsx(Er,{to:"/projects",className:"underline font-semibold",children:" 项目列表"})," 打开看板后跳转。"]})]});const m=(c==null?void 0:c.data)??[],v=m.filter(_=>_.state==="running").length,x=m.filter(_=>_.state==="stuck").length,S=m.filter(_=>_.state==="crashed").length;return g.jsxs("div",{className:"flex flex-col gap-4 max-w-6xl",children:[g.jsxs("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),g.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[m.length," 个 slot · ",v," running · ",x," stuck · ",S," crashed"]})]}),g.jsxs("div",{className:"flex gap-3 items-center",children:[g.jsx(ig,{current:i,onChange:_=>t({project:_})}),g.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>y(),type:"button",children:[g.jsx(Df,{size:14,strokeWidth:2.5})," 刷新"]})]})]}),f&&g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&g.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:g.jsxs("p",{className:"font-semibold",children:["加载失败: ",h instanceof Error?h.message:String(h)]})}),!f&&m.length===0&&g.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"当前没有 worker slot。启动一次 pipeline 就会出现。"})}),m.length>0&&g.jsx("div",{className:"nb-card p-0 overflow-hidden",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[g.jsx(Yr,{w:"70px",children:"Slot"}),g.jsx(Yr,{children:"Card"}),g.jsx(Yr,{w:"110px",children:"Status"}),g.jsx(Yr,{w:"90px",children:"Stage"}),g.jsx(Yr,{w:"90px",children:"PID"}),g.jsx(Yr,{w:"120px",children:"Runtime"}),g.jsx(Yr,{w:"260px",right:!0,children:"Action"})]})}),g.jsx("tbody",{children:m.map(_=>g.jsx(Q2,{project:i,worker:_,onChange:()=>r.invalidateQueries({queryKey:["workers",i]}),onDetail:()=>o(_.slot)},_.slot))})]})}),l!==null&&g.jsx(V2,{project:i,slot:l,onClose:()=>o(null),onChange:()=>r.invalidateQueries({queryKey:["workers",i]})})]})}function Yr({children:e,w:t,right:i}){return g.jsx("th",{className:["px-4 py-3 text-left font-[family-name:var(--font-heading)] font-bold text-[12px] uppercase tracking-wider text-[var(--color-text-muted)]",i?"text-right":""].join(" "),style:t?{width:t}:void 0,children:e})}function Q2({project:e,worker:t,onChange:i,onDetail:r}){const{confirm:l,alert:o}=ai(),c=t.state==="idle",f=t.state==="crashed"||t.state==="stuck";return g.jsxs("tr",{className:"border-b border-dashed border-[var(--color-border-light)] last:border-0 hover:bg-[var(--color-accent-yellow)] transition-colors",children:[g.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] font-bold",children:t.slot}),g.jsx("td",{className:"px-4 py-3",children:t.card?g.jsxs("span",{className:"font-semibold",children:[g.jsxs("span",{className:"inline-block px-2 py-0.5 text-xs bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full font-[family-name:var(--font-mono)] mr-2",children:["#",t.card.seq]}),t.card.title]}):g.jsx("em",{className:"text-[var(--color-text-subtle)]",children:"— 空闲 —"})}),g.jsx("td",{className:"px-4 py-3",children:g.jsx(tS,{state:t.state})}),g.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:t.stage||"—"}),g.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:t.pid??"—"}),g.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:nS(t.runtimeMs)}),g.jsxs("td",{className:"px-4 py-3 text-right space-x-2",children:[g.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:r,type:"button","aria-label":`查看 worker-${t.slot} 详情`,children:[g.jsx(HC,{size:12,strokeWidth:2.5})," 详情"]}),f&&t.card&&g.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await l({title:`重启 worker-${t.slot}`,body:`先杀掉当前进程,然后重新 launch 到卡 #${t.card.seq}。`,confirm:"重启"})){try{await _f(e,t.slot)}catch{}try{await eS(e,t.slot,t.card.seq),i()}catch(h){o({title:"重启失败",body:h instanceof Error?h.message:String(h)})}}},type:"button",children:[g.jsx(Ll,{size:12,strokeWidth:2.5})," 重启"]}),!c&&g.jsxs(g.Fragment,{children:[g.jsxs(Er,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"nb-btn",style:{display:"inline-flex",padding:"4px 10px",fontSize:11},children:[g.jsx(yA,{size:12,strokeWidth:2.5})," log"]}),g.jsxs("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await l({title:`终止 worker-${t.slot}`,body:"当前任务会被强制中断,未保存的工作可能丢失。",confirm:"终止",danger:!0})&&(await _f(e,t.slot),i())},type:"button",children:[g.jsx(ZE,{size:12,strokeWidth:2.5})," 终止"]})]})]})]})}function V2({project:e,slot:t,onClose:i,onChange:r}){const{confirm:l,alert:o}=ai(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=kt({queryKey:["worker-detail",e,t],queryFn:()=>G2(e,t),refetchInterval:3e3});return g.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:i,children:g.jsxs("div",{onClick:m=>m.stopPropagation(),className:"nb-card mt-8 w-full max-w-3xl",children:[g.jsxs("header",{className:"flex items-center justify-between mb-3",children:[g.jsxs("div",{children:[g.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:["worker-",t]}),g.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-0.5",children:e})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>y(),type:"button","aria-label":"刷新",children:[g.jsx(Df,{size:12,strokeWidth:2.5})," 刷新"]}),g.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:i,type:"button","aria-label":"关闭",children:"✕"})]})]}),f&&g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&g.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",h instanceof Error?h.message:String(h)]}),c&&g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:g.jsxs("dl",{className:"grid grid-cols-[130px_1fr] gap-y-2 text-sm",children:[g.jsx("dt",{className:"font-bold",children:"状态"}),g.jsx("dd",{children:g.jsx(tS,{state:c.state})}),g.jsx("dt",{className:"font-bold",children:"PID"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:c.pid??"—"}),g.jsx("dt",{className:"font-bold",children:"Card"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:c.card?`#${c.card.seq} · ${c.card.title}`:"—"}),g.jsx("dt",{className:"font-bold",children:"Stage"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:c.stage??"—"}),g.jsx("dt",{className:"font-bold",children:"Runtime"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:nS(c.runtimeMs)}),g.jsx("dt",{className:"font-bold",children:"Marker"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs text-[var(--color-text-muted)] break-all",children:c.markerPath}),g.jsx("dt",{className:"font-bold",children:"Marker 更新"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:c.markerUpdatedAt?`${new Date(c.markerUpdatedAt).toLocaleString()} (${X2(c.markerUpdatedAt)})`:"—"})]})}),g.jsxs("div",{children:[g.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["最近 ",c.recentLogs.length," 行日志"]}),c.recentLogs.length===0?g.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:["没找到带 worker-",t," 标签的日志。去 Logs 页看全量。"]}):g.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-64 overflow-auto whitespace-pre-wrap break-words",children:c.recentLogs.map(m=>`${m.ts??""} [${m.level}] ${m.msg}`).join(`
451
+ `)}),g.jsx(Er,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t}`,className:"inline-block mt-2 text-xs underline text-[var(--color-running)]",children:"查看完整 log →"})]}),g.jsxs("div",{className:"flex gap-2 justify-end border-t-2 border-dashed border-[var(--color-text)] pt-3",children:[(c.state==="crashed"||c.state==="stuck")&&c.card&&g.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{if(await l({title:`重启 worker-${t}`,body:`先杀掉当前进程,重新 launch 到卡 #${c.card.seq}。`,confirm:"重启"})){try{await _f(e,t)}catch{}try{await eS(e,t,c.card.seq),r(),y()}catch(v){o({title:"重启失败",body:v instanceof Error?v.message:String(v)})}}},type:"button",children:[g.jsx(Ll,{size:14,strokeWidth:2.5})," 重启"]}),c.state!=="idle"&&g.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:async()=>{if(await l({title:`终止 worker-${t}`,body:"当前任务会被强制中断。",confirm:"终止",danger:!0}))try{await _f(e,t),r(),y()}catch(v){o({title:"终止失败",body:v instanceof Error?v.message:String(v)})}},type:"button",children:[g.jsx(ZE,{size:14,strokeWidth:3})," 终止"]}),c.state==="running"&&g.jsx(Ri,{size:14,strokeWidth:3,className:"animate-spin self-center text-[var(--color-running)]"})]})]})]})})}function X2(e){const t=Date.now()-new Date(e).getTime();return t<6e4?`${Math.floor(t/1e3)}s 前`:t<36e5?`${Math.floor(t/6e4)}m 前`:`${Math.floor(t/36e5)}h 前`}function tS({state:e}){const t={running:{bg:"var(--color-running-bg)",color:"var(--color-running)"},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)"},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)"}},{bg:i,color:r}=t[e];return g.jsx("span",{className:"nb-status",style:{background:i,color:r},children:e})}function nS(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),i=Math.floor(t/3600),r=Math.floor(t%3600/60),l=t%60,o=c=>c.toString().padStart(2,"0");return i>0?`${o(i)}:${o(r)}:${o(l)}`:`${o(r)}:${o(l)}`}function Z2(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),qt(`/api/logs?${t}`)}function W2(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const J2=["error","warn","info","debug"],eR=["error","warn","info"];function tR(){const[e,t]=Im(),i=e.get("project"),r=e.get("worker")??"",[l,o]=M.useState([]),[c,f]=M.useState(!1),[d,h]=M.useState(!0),[y,m]=M.useState(()=>new Set(eR)),[v,x]=M.useState(""),[S,_]=M.useState("live"),[w,k]=M.useState(()=>{const T=new Date(Date.now()-36e5),P=j=>String(j).padStart(2,"0");return`${T.getFullYear()}-${P(T.getMonth()+1)}-${P(T.getDate())}T${P(T.getHours())}:${P(T.getMinutes())}`}),O=M.useRef(null),{data:A,refetch:I}=kt({queryKey:["logs",i,r,S,S==="history"?w:"live"],queryFn:()=>Z2({project:i??"",worker:r||void 0,limit:S==="history"?2e3:500,since:S==="history"?new Date(w).toISOString():void 0}),enabled:!!i});M.useEffect(()=>{A!=null&&A.data&&o(A.data)},[A]),M.useEffect(()=>{if(!i||S!=="live")return;const T=W2({project:i,worker:r||void 0}),P=new EventSource(T);return P.addEventListener("log.line",j=>{if(!c)try{const X=JSON.parse(j.data);o(D=>{const $=[...D,X];return $.length>5e3&&$.splice(0,$.length-5e3),$})}catch{}}),()=>P.close()},[i,r,c,S]),M.useEffect(()=>{if(!d)return;const T=O.current;T&&(T.scrollTop=T.scrollHeight)},[l,d]);const q=M.useMemo(()=>{const T=v.toLowerCase();return l.filter(P=>!(!y.has(P.level)||T&&!P.msg.toLowerCase().includes(T)))},[l,y,v]);return i?g.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[g.jsxs("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),g.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[i,r&&` · worker-${r}`," · tail -f · ",l.length," lines",c&&g.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]}),g.jsx("div",{className:"flex gap-3 items-center",children:g.jsx(ig,{current:i,onChange:T=>t({project:T})})})]}),g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[g.jsxs("button",{type:"button",onClick:()=>_("live"),"aria-pressed":S==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",S==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[g.jsx(GE,{size:11,strokeWidth:2.5}),"实时"]}),g.jsxs("button",{type:"button",onClick:()=>_("history"),"aria-pressed":S==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",S==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[g.jsx($C,{size:11,strokeWidth:2.5}),"历史"]})]}),S==="history"&&g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:w,onChange:T=>k(T.target.value),"aria-label":"查询起始时间"}),g.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>I(),type:"button","aria-label":"查询",children:[g.jsx(yf,{size:11,strokeWidth:3}),"查询"]})]}),g.jsxs("div",{className:"relative flex-1 max-w-md",children:[g.jsx(yf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),g.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"过滤关键字…",value:v,onChange:T=>x(T.target.value),"aria-label":"过滤日志"})]}),g.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:J2.map(T=>g.jsx(nR,{level:T,enabled:y.has(T),onToggle:()=>{m(P=>{const j=new Set(P);return j.has(T)?j.delete(T):j.add(T),j})}},T))}),g.jsxs("div",{className:"ml-auto flex gap-2",children:[S==="live"&&g.jsxs(g.Fragment,{children:[g.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(T=>!T),type:"button",children:d?"✓ Auto-scroll":"Auto-scroll"}),g.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(T=>!T),type:"button",children:c?g.jsxs(g.Fragment,{children:[g.jsx(Fm,{size:12,strokeWidth:3})," Resume"]}):g.jsxs(g.Fragment,{children:[g.jsx(nA,{size:12,strokeWidth:3})," Pause"]})})]}),g.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const T=new Blob([q.map(X=>X.raw).join(`
452
+ `)],{type:"text/plain"}),P=URL.createObjectURL(T),j=document.createElement("a");j.href=P,j.download=`${i}-log-${Date.now()}.log`,j.click(),URL.revokeObjectURL(P)},type:"button",children:[g.jsx(HE,{size:12,strokeWidth:2.5})," Export"]})]})]}),g.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[g.jsxs("div",{className:"px-4 py-2 bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)] flex items-center justify-between font-[family-name:var(--font-mono)] text-xs",children:[g.jsx("span",{className:"text-[var(--color-text-muted)]",children:(A==null?void 0:A.file)??"~/.coral/projects/.../logs/*.log"}),S==="live"?g.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):g.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),g.jsxs("div",{ref:O,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:T=>{const P=T.currentTarget;!(P.scrollHeight-P.scrollTop-P.clientHeight<40)&&d&&h(!1)},children:[q.map((T,P)=>g.jsx(iR,{line:T},P)),q.length===0&&g.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]}):g.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-accent-yellow)]",children:[g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"Logs 📜"}),g.jsxs("p",{className:"text-sm",children:["需要 ",g.jsx("code",{children:"?project=xx"}),"。"]})]})}function nR({level:e,enabled:t,onToggle:i}){const r={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},l={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return g.jsx("button",{type:"button",onClick:i,"aria-pressed":t,className:["px-3 py-0.5 rounded-full font-[family-name:var(--font-mono)] text-[10px] font-bold tracking-widest cursor-pointer",t?"border-[1.5px] border-[var(--color-text)]":"text-[var(--color-text-subtle)]"].join(" "),style:t?{background:r[e],color:l[e]}:{},children:e.toUpperCase()})}function iR({line:e}){var i;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""};return g.jsxs("div",{className:"grid grid-cols-[100px_60px_1fr] gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",children:[g.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((i=e.ts.split("T")[1])==null?void 0:i.replace("Z",""))??e.ts:"--"}),g.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),g.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function aR(e){return qt("/api/skills")}function rR(e){return qt(`/api/skills/${encodeURIComponent(e)}`)}function sR(e,t){return qt(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function Yf(e,t){const i=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!i.ok)throw new Error(`${i.status}: ${await i.text()}`);return i.json().catch(()=>({}))}function lR(e,t){return Yf(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function oR(e,t){return fetch(`/api/skills/${encodeURIComponent(e)}/link?project=${encodeURIComponent(t)}`,{method:"DELETE"}).then(i=>{if(!i.ok)throw new Error(`${i.status}`);return i.json()})}function cR(e,t){return Yf(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function uR(e,t){return Yf(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function fR(){return Yf("/api/skills/sync")}function dR(e,t){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const hR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mR={};function Yv(e,t){return(mR.jsx?pR:hR).test(e)}const gR=/[ \t\n\f\r]/g;function bR(e){return typeof e=="object"?e.type==="text"?Qv(e.value):!1:Qv(e)}function Qv(e){return e.replace(gR,"")===""}class Ec{constructor(t,i,r){this.normal=i,this.property=t,r&&(this.space=r)}}Ec.prototype.normal={};Ec.prototype.property={};Ec.prototype.space=void 0;function iS(e,t){const i={},r={};for(const l of e)Object.assign(i,l.property),Object.assign(r,l.normal);return new Ec(i,r,t)}function om(e){return e.toLowerCase()}class Fn{constructor(t,i){this.attribute=i,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 yR=0;const Fe=ps(),Xt=ps(),cm=ps(),ue=ps(),Et=ps(),pl=ps(),Wn=ps();function ps(){return 2**++yR}const um=Object.freeze(Object.defineProperty({__proto__:null,boolean:Fe,booleanish:Xt,commaOrSpaceSeparated:Wn,commaSeparated:pl,number:ue,overloadedBoolean:cm,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),yp=Object.keys(um);class ag extends Fn{constructor(t,i,r,l){let o=-1;if(super(t,i),Vv(this,"space",l),typeof r=="number")for(;++o<yp.length;){const c=yp[o];Vv(this,yp[o],(r&um[c])===um[c])}}}ag.prototype.defined=!0;function Vv(e,t,i){i&&(e[t]=i)}function $l(e){const t={},i={};for(const[r,l]of Object.entries(e.properties)){const o=new ag(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,i[om(r)]=r,i[om(o.attribute)]=r}return new Ec(t,i,e.space)}const aS=$l({properties:{ariaActiveDescendant:null,ariaAtomic:Xt,ariaAutoComplete:null,ariaBusy:Xt,ariaChecked:Xt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:Xt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:Xt,ariaFlowTo:Et,ariaGrabbed:Xt,ariaHasPopup:null,ariaHidden:Xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:ue,ariaLive:null,ariaModal:Xt,ariaMultiLine:Xt,ariaMultiSelectable:Xt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:Xt,ariaReadOnly:Xt,ariaRelevant:null,ariaRequired:Xt,ariaRoleDescription:Et,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:Xt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rS(e,t){return t in e?e[t]:t}function sS(e,t){return rS(e,t.toLowerCase())}const xR=$l({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pl,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Fe,allowPaymentRequest:Fe,allowUserMedia:Fe,alt:null,as:null,async:Fe,autoCapitalize:null,autoComplete:Et,autoFocus:Fe,autoPlay:Fe,blocking:Et,capture:null,charSet:null,checked:Fe,cite:null,className:Et,cols:ue,colSpan:null,content:null,contentEditable:Xt,controls:Fe,controlsList:Et,coords:ue|pl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Fe,defer:Fe,dir:null,dirName:null,disabled:Fe,download:cm,draggable:Xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Fe,formTarget:null,headers:Et,height:ue,hidden:cm,high:ue,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Fe,inputMode:null,integrity:null,is:null,isMap:Fe,itemId:null,itemProp:Et,itemRef:Et,itemScope:Fe,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Fe,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Fe,muted:Fe,name:null,nonce:null,noModule:Fe,noValidate:Fe,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:Fe,optimum:ue,pattern:null,ping:Et,placeholder:null,playsInline:Fe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Fe,referrerPolicy:null,rel:Et,required:Fe,reversed:Fe,rows:ue,rowSpan:ue,sandbox:Et,scope:null,scoped:Fe,seamless:Fe,selected:Fe,shadowRootClonable:Fe,shadowRootDelegatesFocus:Fe,shadowRootMode:null,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:Xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Fe,useMap:null,value:Xt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Fe,declare:Fe,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Fe,noHref:Fe,noShade:Fe,noWrap:Fe,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:Xt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Fe,disableRemotePlayback:Fe,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:sS}),vR=$l({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:Wn,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:Et,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Fe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:pl,g2:pl,glyphName:pl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wn,rev:Wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wn,requiredFeatures:Wn,requiredFonts:Wn,requiredFormats:Wn,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wn,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rS}),lS=$l({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()}}),oS=$l({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:sS}),cS=$l({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ER={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"},SR=/[A-Z]/g,Xv=/-[a-z]/g,_R=/^data[-\w.:]+$/i;function wR(e,t){const i=om(t);let r=t,l=Fn;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&_R.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Xv,NR);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Xv.test(o)){let c=o.replace(SR,kR);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=ag}return new l(r,t)}function kR(e){return"-"+e.toLowerCase()}function NR(e){return e.charAt(1).toUpperCase()}const TR=iS([aS,xR,lS,oS,cS],"html"),rg=iS([aS,vR,lS,oS,cS],"svg");function CR(e){return e.join(" ").trim()}var il={},xp,Zv;function AR(){if(Zv)return xp;Zv=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
453
+ `,h="/",y="*",m="",v="comment",x="declaration";function S(w,k){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];k=k||{};var O=1,A=1;function I(ae){var J=ae.match(t);J&&(O+=J.length);var K=ae.lastIndexOf(d);A=~K?ae.length-K:A+ae.length}function q(){var ae={line:O,column:A};return function(J){return J.position=new T(ae),X(),J}}function T(ae){this.start=ae,this.end={line:O,column:A},this.source=k.source}T.prototype.content=w;function P(ae){var J=new Error(k.source+":"+O+":"+A+": "+ae);if(J.reason=ae,J.filename=k.source,J.line=O,J.column=A,J.source=w,!k.silent)throw J}function j(ae){var J=ae.exec(w);if(J){var K=J[0];return I(K),w=w.slice(K.length),J}}function X(){j(i)}function D(ae){var J;for(ae=ae||[];J=$();)J!==!1&&ae.push(J);return ae}function $(){var ae=q();if(!(h!=w.charAt(0)||y!=w.charAt(1))){for(var J=2;m!=w.charAt(J)&&(y!=w.charAt(J)||h!=w.charAt(J+1));)++J;if(J+=2,m===w.charAt(J-1))return P("End of comment missing");var K=w.slice(2,J-2);return A+=2,I(K),w=w.slice(J),A+=2,ae({type:v,comment:K})}}function Q(){var ae=q(),J=j(r);if(J){if($(),!j(l))return P("property missing ':'");var K=j(o),le=ae({type:x,property:_(J[0].replace(e,m)),value:K?_(K[0].replace(e,m)):m});return j(c),le}}function se(){var ae=[];D(ae);for(var J;J=Q();)J!==!1&&(ae.push(J),D(ae));return ae}return X(),se()}function _(w){return w?w.replace(f,m):m}return xp=S,xp}var Wv;function OR(){if(Wv)return il;Wv=1;var e=il&&il.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(il,"__esModule",{value:!0}),il.default=i;const t=e(AR());function i(r,l){let o=null;if(!r||typeof r!="string")return o;const c=(0,t.default)(r),f=typeof l=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:y}=d;f?l(h,y,d):y&&(o=o||{},o[h]=y)}),o}return il}var qo={},Jv;function RR(){if(Jv)return qo;Jv=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(h){return!h||i.test(h)||e.test(h)},c=function(h,y){return y.toUpperCase()},f=function(h,y){return"".concat(y,"-")},d=function(h,y){return y===void 0&&(y={}),o(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(l,f):h=h.replace(r,f),h.replace(t,c))};return qo.camelCase=d,qo}var Ho,e0;function MR(){if(e0)return Ho;e0=1;var e=Ho&&Ho.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(OR()),i=RR();function r(l,o){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(f,d){f&&d&&(c[(0,i.camelCase)(f,o)]=d)}),c}return r.default=r,Ho=r,Ho}var DR=MR();const LR=Em(DR),uS=fS("end"),sg=fS("start");function fS(e){return t;function t(i){const r=i&&i.position&&i.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 jR(e){const t=sg(e),i=uS(e);if(t&&i)return{start:t,end:i}}function Zo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?t0(e.position):"start"in e||"end"in e?t0(e):"line"in e||"column"in e?fm(e):""}function fm(e){return n0(e&&e.line)+":"+n0(e&&e.column)}function t0(e){return fm(e&&e.start)+"-"+fm(e&&e.end)}function n0(e){return e&&typeof e=="number"?e:1}class gn extends Error{constructor(t,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let l="",o={},c=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o={...i}),typeof t=="string"?l=t:!o.cause&&t&&(c=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=Zo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gn.prototype.file="";gn.prototype.name="";gn.prototype.reason="";gn.prototype.message="";gn.prototype.stack="";gn.prototype.column=void 0;gn.prototype.line=void 0;gn.prototype.ancestors=void 0;gn.prototype.cause=void 0;gn.prototype.fatal=void 0;gn.prototype.place=void 0;gn.prototype.ruleId=void 0;gn.prototype.source=void 0;const lg={}.hasOwnProperty,IR=new Map,zR=/[A-Z]/g,BR=new Set(["table","tbody","thead","tfoot","tr"]),UR=new Set(["td","th"]),dS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function FR(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=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=QR(i,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=YR(i,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?rg:TR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=hS(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function hS(e,t,i){if(t.type==="element")return PR(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return $R(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return HR(e,t,i);if(t.type==="mdxjsEsm")return qR(e,t);if(t.type==="root")return KR(e,t,i);if(t.type==="text")return GR(e,t)}function PR(e,t,i){const r=e.schema;let l=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(l=rg,e.schema=l),e.ancestors.push(t);const o=mS(e,t.tagName,!1),c=VR(e,t);let f=cg(e,t);return BR.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!bR(d):!0})),pS(e,c,o,t),og(c,f),e.ancestors.pop(),e.schema=r,e.create(t,o,c,i)}function $R(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)}sc(e,t.position)}function qR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sc(e,t.position)}function HR(e,t,i){const r=e.schema;let l=r;t.name==="svg"&&r.space==="html"&&(l=rg,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:mS(e,t.name,!0),c=XR(e,t),f=cg(e,t);return pS(e,c,o,t),og(c,f),e.ancestors.pop(),e.schema=r,e.create(t,o,c,i)}function KR(e,t,i){const r={};return og(r,cg(e,t)),e.create(t,e.Fragment,r,i)}function GR(e,t){return t.value}function pS(e,t,i,r){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=r)}function og(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function YR(e,t,i){return r;function r(l,o,c,f){const h=Array.isArray(c.children)?i:t;return f?h(o,c,f):h(o,c)}}function QR(e,t){return i;function i(r,l,o,c){const f=Array.isArray(o.children),d=sg(r);return t(l,o,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function VR(e,t){const i={};let r,l;for(l in t.properties)if(l!=="children"&&lg.call(t.properties,l)){const o=ZR(e,l,t.properties[l]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&UR.has(t.tagName)?r=f:i[c]=f}}if(r){const o=i.style||(i.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function XR(e,t){const i={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else sc(e,t.position);else{const l=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const f=r.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else sc(e,t.position);else o=r.value===null?!0:r.value;i[l]=o}return i}function cg(e,t){const i=[];let r=-1;const l=e.passKeys?new Map:IR;for(;++r<t.children.length;){const o=t.children[r];let c;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=l.get(d)||0;c=d+"-"+h,l.set(d,h+1)}}const f=hS(e,o,c);f!==void 0&&i.push(f)}return i}function ZR(e,t,i){const r=wR(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?dR(i):CR(i)),r.property==="style"){let l=typeof i=="object"?i:WR(e,String(i));return e.stylePropertyNameCase==="css"&&(l=JR(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&r.space?ER[r.property]||r.property:r.attribute,i]}}function WR(e,t){try{return LR(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const r=i,l=new gn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=dS+"#cannot-parse-style-attribute",l}}function mS(e,t,i){let r;if(!i)r={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,c;for(;++o<l.length;){const f=Yv(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}r=c}else r=Yv(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const l=r.value;return lg.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(r);sc(e)}function sc(e,t){const i=new gn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=dS+"#cannot-handle-mdx-estrees-without-createevaluater",i}function JR(e){const t={};let i;for(i in e)lg.call(e,i)&&(t[eM(i)]=e[i]);return t}function eM(e){let t=e.replace(zR,tM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function tM(e){return"-"+e.toLowerCase()}const vp={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"]},nM={};function ug(e,t){const i=nM,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,l=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return gS(e,r,l)}function gS(e,t,i){if(iM(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return i0(e.children,t,i)}return Array.isArray(e)?i0(e,t,i):""}function i0(e,t,i){const r=[];let l=-1;for(;++l<e.length;)r[l]=gS(e[l],t,i);return r.join("")}function iM(e){return!!(e&&typeof e=="object")}const a0=document.createElement("i");function fg(e){const t="&"+e+";";a0.innerHTML=t;const i=a0.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function ti(e,t,i,r){const l=e.length;let o=0,c;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,i=i>0?i:0,r.length<1e4)c=Array.from(r),c.unshift(t,i),e.splice(...c);else for(i&&e.splice(t,i);o<r.length;)c=r.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function bi(e,t){return e.length>0?(ti(e,e.length,0,t),e):t}const r0={}.hasOwnProperty;function bS(e){const t={};let i=-1;for(;++i<e.length;)aM(t,e[i]);return t}function aM(e,t){let i;for(i in t){const l=(r0.call(e,i)?e[i]:void 0)||(e[i]={}),o=t[i];let c;if(o)for(c in o){r0.call(l,c)||(l[c]=[]);const f=o[c];rM(l[c],Array.isArray(f)?f:f?[f]:[])}}}function rM(e,t){let i=-1;const r=[];for(;++i<t.length;)(t[i].add==="after"?e:r).push(t[i]);ti(e,0,0,r)}function yS(e,t){const i=Number.parseInt(e,t);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Oi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn=_r(/[A-Za-z]/),pn=_r(/[\dA-Za-z]/),sM=_r(/[#-'*+\--9=?A-Z^-~]/);function wf(e){return e!==null&&(e<32||e===127)}const dm=_r(/\d/),lM=_r(/[\dA-Fa-f]/),oM=_r(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Qf=_r(new RegExp("\\p{P}|\\p{S}","u")),us=_r(/\s/);function _r(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function ql(e){const t=[];let i=-1,r=0,l=0;for(;++i<e.length;){const o=e.charCodeAt(i);let c="";if(o===37&&pn(e.charCodeAt(i+1))&&pn(e.charCodeAt(i+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(i+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),l=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(r,i),encodeURIComponent(c)),r=i+l+1,c=""),l&&(i+=l,l=0)}return t.join("")+e.slice(r)}function Je(e,t,i,r){const l=r?r-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(d){return Ge(d)?(e.enter(i),f(d)):t(d)}function f(d){return Ge(d)&&o++<l?(e.consume(d),f):(e.exit(i),t(d))}}const cM={tokenize:uM};function uM(e){const t=e.attempt(this.parser.constructs.contentInitial,r,l);let i;return t;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Je(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),o(f)}function o(f){const d=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=d),i=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Te(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const fM={tokenize:dM},s0={tokenize:hM};function dM(e){const t=this,i=[];let r=0,l,o,c;return f;function f(A){if(r<i.length){const I=i[r];return t.containerState=I[1],e.attempt(I[0].continuation,d,h)(A)}return h(A)}function d(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&O();const I=t.events.length;let q=I,T;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){T=t.events[q][1].end;break}k(r);let P=I;for(;P<t.events.length;)t.events[P][1].end={...T},P++;return ti(t.events,q+1,0,t.events.slice(I)),t.events.length=P,h(A)}return f(A)}function h(A){if(r===i.length){if(!l)return v(A);if(l.currentConstruct&&l.currentConstruct.concrete)return S(A);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(s0,y,m)(A)}function y(A){return l&&O(),k(r),v(A)}function m(A){return t.parser.lazy[t.now().line]=r!==i.length,c=t.now().offset,S(A)}function v(A){return t.containerState={},e.attempt(s0,x,S)(A)}function x(A){return r++,i.push([t.currentConstruct,t.containerState]),v(A)}function S(A){if(A===null){l&&O(),k(0),e.consume(A);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),_(A)}function _(A){if(A===null){w(e.exit("chunkFlow"),!0),k(0),e.consume(A);return}return Te(A)?(e.consume(A),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,f):(e.consume(A),_)}function w(A,I){const q=t.sliceStream(A);if(I&&q.push(null),A.previous=o,o&&(o.next=A),o=A,l.defineSkip(A.start),l.write(q),t.parser.lazy[A.start.line]){let T=l.events.length;for(;T--;)if(l.events[T][1].start.offset<c&&(!l.events[T][1].end||l.events[T][1].end.offset>c))return;const P=t.events.length;let j=P,X,D;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(X){D=t.events[j][1].end;break}X=!0}for(k(r),T=P;T<t.events.length;)t.events[T][1].end={...D},T++;ti(t.events,j+1,0,t.events.slice(P)),t.events.length=T}}function k(A){let I=i.length;for(;I-- >A;){const q=i[I];t.containerState=q[1],q[0].exit.call(t,e)}i.length=A}function O(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function hM(e,t,i){return Je(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Al(e){if(e===null||yt(e)||us(e))return 1;if(Qf(e))return 2}function Vf(e,t,i){const r=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!r.includes(o)&&(t=o(t,i),r.push(o))}return t}const hm={name:"attention",resolveAll:pM,tokenize:mM};function pM(e,t){let i=-1,r,l,o,c,f,d,h,y;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(r=i;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[i][1]).charCodeAt(0)){if((e[r][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const m={...e[r][1].end},v={...e[i][1].start};l0(m,-d),l0(v,d),c={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:v},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[i][1].start}},l={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[r][1].end={...c.start},e[i][1].start={...f.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=bi(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=bi(h,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",o,t]]),h=bi(h,Vf(t.parser.constructs.insideSpan.null,e.slice(r+1,i),t)),h=bi(h,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,h=bi(h,[["enter",e[i][1],t],["exit",e[i][1],t]])):y=0,ti(e,r-1,i-r+3,h),i=r+h.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function mM(e,t){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,l=Al(r);let o;return c;function c(d){return o=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===o)return e.consume(d),f;const h=e.exit("attentionSequence"),y=Al(d),m=!y||y===2&&l||i.includes(d),v=!l||l===2&&y||i.includes(r);return h._open=!!(o===42?m:m&&(l||!v)),h._close=!!(o===42?v:v&&(y||!m)),t(d)}}function l0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const gM={name:"autolink",tokenize:bM};function bM(e,t,i){let r=0;return l;function l(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return kn(x)?(e.consume(x),c):x===64?i(x):h(x)}function c(x){return x===43||x===45||x===46||pn(x)?(r=1,f(x)):h(x)}function f(x){return x===58?(e.consume(x),r=0,d):(x===43||x===45||x===46||pn(x))&&r++<32?(e.consume(x),f):(r=0,h(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||wf(x)?i(x):(e.consume(x),d)}function h(x){return x===64?(e.consume(x),y):sM(x)?(e.consume(x),h):i(x)}function y(x){return pn(x)?m(x):i(x)}function m(x){return x===46?(e.consume(x),r=0,y):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):v(x)}function v(x){if((x===45||pn(x))&&r++<63){const S=x===45?v:m;return e.consume(x),S}return i(x)}}const Sc={partial:!0,tokenize:yM};function yM(e,t,i){return r;function r(o){return Ge(o)?Je(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||Te(o)?t(o):i(o)}}const xS={continuation:{tokenize:vM},exit:EM,name:"blockQuote",tokenize:xM};function xM(e,t,i){const r=this;return l;function l(c){if(c===62){const f=r.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return i(c)}function o(c){return Ge(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function vM(e,t,i){const r=this;return l;function l(c){return Ge(c)?Je(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(xS,t,i)(c)}}function EM(e){e.exit("blockQuote")}const vS={name:"characterEscape",tokenize:SM};function SM(e,t,i){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return oM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(o)}}const ES={name:"characterReference",tokenize:_M};function _M(e,t,i){const r=this;let l=0,o,c;return f;function f(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,c=pn,y(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=lM,y):(e.enter("characterReferenceValue"),o=7,c=dm,y(m))}function y(m){if(m===59&&l){const v=e.exit("characterReferenceValue");return c===pn&&!fg(r.sliceSerialize(v))?i(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(m)&&l++<o?(e.consume(m),y):i(m)}}const o0={partial:!0,tokenize:kM},c0={concrete:!0,name:"codeFenced",tokenize:wM};function wM(e,t,i){const r=this,l={partial:!0,tokenize:q};let o=0,c=0,f;return d;function d(T){return h(T)}function h(T){const P=r.events[r.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,f=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(T)}function y(T){return T===f?(c++,e.consume(T),y):c<3?i(T):(e.exit("codeFencedFenceSequence"),Ge(T)?Je(e,m,"whitespace")(T):m(T))}function m(T){return T===null||Te(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(o0,_,I)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(T))}function v(T){return T===null||Te(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(T)):Ge(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,x,"whitespace")(T)):T===96&&T===f?i(T):(e.consume(T),v)}function x(T){return T===null||Te(T)?m(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(T))}function S(T){return T===null||Te(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(T)):T===96&&T===f?i(T):(e.consume(T),S)}function _(T){return e.attempt(l,I,w)(T)}function w(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),k}function k(T){return o>0&&Ge(T)?Je(e,O,"linePrefix",o+1)(T):O(T)}function O(T){return T===null||Te(T)?e.check(o0,_,I)(T):(e.enter("codeFlowValue"),A(T))}function A(T){return T===null||Te(T)?(e.exit("codeFlowValue"),O(T)):(e.consume(T),A)}function I(T){return e.exit("codeFenced"),t(T)}function q(T,P,j){let X=0;return D;function D(J){return T.enter("lineEnding"),T.consume(J),T.exit("lineEnding"),$}function $(J){return T.enter("codeFencedFence"),Ge(J)?Je(T,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):Q(J)}function Q(J){return J===f?(T.enter("codeFencedFenceSequence"),se(J)):j(J)}function se(J){return J===f?(X++,T.consume(J),se):X>=c?(T.exit("codeFencedFenceSequence"),Ge(J)?Je(T,ae,"whitespace")(J):ae(J)):j(J)}function ae(J){return J===null||Te(J)?(T.exit("codeFencedFence"),P(J)):j(J)}}}function kM(e,t,i){const r=this;return l;function l(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return r.parser.lazy[r.now().line]?i(c):t(c)}}const Ep={name:"codeIndented",tokenize:TM},NM={partial:!0,tokenize:CM};function TM(e,t,i){const r=this;return l;function l(h){return e.enter("codeIndented"),Je(e,o,"linePrefix",5)(h)}function o(h){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?d(h):Te(h)?e.attempt(NM,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Te(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function CM(e,t,i){const r=this;return l;function l(c){return r.parser.lazy[r.now().line]?i(c):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):Je(e,o,"linePrefix",5)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Te(c)?l(c):i(c)}}const AM={name:"codeText",previous:RM,resolve:OM,tokenize:MM};function OM(e){let t=e.length-4,i=3,r,l;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=i;++r<t;)if(e[r][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[t][1].type="codeTextPadding",i+=2,t-=2;break}}for(r=i-1,t++;++r<=t;)l===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(l=r):(r===t||e[r][1].type==="lineEnding")&&(e[l][1].type="codeTextData",r!==l+2&&(e[l][1].end=e[r-1][1].end,e.splice(l+2,r-l-2),t-=r-l-2,r=l+2),l=void 0);return e}function RM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function MM(e,t,i){let r=0,l,o;return c;function c(m){return e.enter("codeText"),e.enter("codeTextSequence"),f(m)}function f(m){return m===96?(e.consume(m),r++,f):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?i(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(o=e.enter("codeTextSequence"),l=0,y(m)):Te(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Te(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function y(m){return m===96?(e.consume(m),l++,y):l===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class DM{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,i){const r=i??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,i,r){const l=i||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return r&&Ko(this.left,r),o.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),Ko(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ko(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 i=this.left.splice(t,Number.POSITIVE_INFINITY);Ko(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ko(this.left,i.reverse())}}}function Ko(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function SS(e){const t={};let i=-1,r,l,o,c,f,d,h;const y=new DM(e);for(;++i<y.length;){for(;i in t;)i=t[i];if(r=y.get(i),i&&r[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,LM(y,i)),i=t[i],h=!0);else if(r[1]._container){for(o=i,l=void 0;o--;)if(c=y.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(y.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(r[1].end={...y.get(l)[1].start},f=y.slice(l,i),f.unshift(r),y.splice(l,i-l+1,f))}}return ti(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function LM(e,t){const i=e.get(t)[1],r=e.get(t)[2];let l=t-1;const o=[];let c=i._tokenizer;c||(c=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],h={};let y,m,v=-1,x=i,S=0,_=0;const w=[_];for(;x;){for(;e.get(++l)[1]!==x;);o.push(l),x._tokenizer||(y=r.sliceStream(x),x.next||y.push(null),m&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),m=x,x=x.next}for(x=i;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(_=v+1,w.push(_),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):w.pop(),v=w.length;v--;){const k=f.slice(w[v],w[v+1]),O=o.pop();d.push([O,O+k.length-1]),e.splice(O,2,k)}for(d.reverse(),v=-1;++v<d.length;)h[S+d[v][0]]=S+d[v][1],S+=d[v][1]-d[v][0]-1;return h}const jM={resolve:zM,tokenize:BM},IM={partial:!0,tokenize:UM};function zM(e){return SS(e),e}function BM(e,t){let i;return r;function r(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?o(f):Te(f)?e.check(IM,c,o)(f):(e.consume(f),l)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,l}}function UM(e,t,i){const r=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Je(e,o,"linePrefix")}function o(c){if(c===null||Te(c))return i(c);const f=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(r.parser.constructs.flow,i,t)(c)}}function _S(e,t,i,r,l,o,c,f,d){const h=d||Number.POSITIVE_INFINITY;let y=0;return m;function m(k){return k===60?(e.enter(r),e.enter(l),e.enter(o),e.consume(k),e.exit(o),v):k===null||k===32||k===41||wf(k)?i(k):(e.enter(r),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),_(k))}function v(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(l),e.exit(r),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===62?(e.exit("chunkString"),e.exit(f),v(k)):k===null||k===60||Te(k)?i(k):(e.consume(k),k===92?S:x)}function S(k){return k===60||k===62||k===92?(e.consume(k),x):x(k)}function _(k){return!y&&(k===null||k===41||yt(k))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(r),t(k)):y<h&&k===40?(e.consume(k),y++,_):k===41?(e.consume(k),y--,_):k===null||k===32||k===40||wf(k)?i(k):(e.consume(k),k===92?w:_)}function w(k){return k===40||k===41||k===92?(e.consume(k),_):_(k)}}function wS(e,t,i,r,l,o){const c=this;let f=0,d;return h;function h(x){return e.enter(r),e.enter(l),e.consume(x),e.exit(l),e.enter(o),y}function y(x){return f>999||x===null||x===91||x===93&&!d||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(x):x===93?(e.exit(o),e.enter(l),e.consume(x),e.exit(l),e.exit(r),t):Te(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||x===91||x===93||Te(x)||f++>999?(e.exit("chunkString"),y(x)):(e.consume(x),d||(d=!Ge(x)),x===92?v:m)}function v(x){return x===91||x===92||x===93?(e.consume(x),f++,m):m(x)}}function kS(e,t,i,r,l,o){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(r),e.enter(l),e.consume(v),e.exit(l),c=v===40?41:v,d):i(v)}function d(v){return v===c?(e.enter(l),e.consume(v),e.exit(l),e.exit(r),t):(e.enter(o),h(v))}function h(v){return v===c?(e.exit(o),d(c)):v===null?i(v):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===c||v===null||Te(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?m:y)}function m(v){return v===c||v===92?(e.consume(v),y):y(v)}}function Wo(e,t){let i;return r;function r(l){return Te(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i=!0,r):Ge(l)?Je(e,r,i?"linePrefix":"lineSuffix")(l):t(l)}}const FM={name:"definition",tokenize:$M},PM={partial:!0,tokenize:qM};function $M(e,t,i){const r=this;let l;return o;function o(x){return e.enter("definition"),c(x)}function c(x){return wS.call(r,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return l=Oi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):i(x)}function d(x){return yt(x)?Wo(e,h)(x):h(x)}function h(x){return _S(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function y(x){return e.attempt(PM,m,m)(x)}function m(x){return Ge(x)?Je(e,v,"whitespace")(x):v(x)}function v(x){return x===null||Te(x)?(e.exit("definition"),r.parser.defined.push(l),t(x)):i(x)}}function qM(e,t,i){return r;function r(f){return yt(f)?Wo(e,l)(f):i(f)}function l(f){return kS(e,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Ge(f)?Je(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Te(f)?t(f):i(f)}}const HM={name:"hardBreakEscape",tokenize:KM};function KM(e,t,i){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return Te(o)?(e.exit("hardBreakEscape"),t(o)):i(o)}}const GM={name:"headingAtx",resolve:YM,tokenize:QM};function YM(e,t){let i=e.length-2,r=3,l,o;return e[r][1].type==="whitespace"&&(r+=2),i-2>r&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&e[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(l={type:"atxHeadingText",start:e[r][1].start,end:e[i][1].end},o={type:"chunkText",start:e[r][1].start,end:e[i][1].end,contentType:"text"},ti(e,r,i-r+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function QM(e,t,i){let r=0;return l;function l(y){return e.enter("atxHeading"),o(y)}function o(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&r++<6?(e.consume(y),c):y===null||yt(y)?(e.exit("atxHeadingSequence"),f(y)):i(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),d(y)):y===null||Te(y)?(e.exit("atxHeading"),t(y)):Ge(y)?Je(e,f,"whitespace")(y):(e.enter("atxHeadingText"),h(y))}function d(y){return y===35?(e.consume(y),d):(e.exit("atxHeadingSequence"),f(y))}function h(y){return y===null||y===35||yt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),h)}}const VM=["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"],u0=["pre","script","style","textarea"],XM={concrete:!0,name:"htmlFlow",resolveTo:JM,tokenize:eD},ZM={partial:!0,tokenize:nD},WM={partial:!0,tokenize:tD};function JM(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 eD(e,t,i){const r=this;let l,o,c,f,d;return h;function h(C){return y(C)}function y(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),m}function m(C){return C===33?(e.consume(C),v):C===47?(e.consume(C),o=!0,_):C===63?(e.consume(C),l=3,r.interrupt?t:R):kn(C)?(e.consume(C),c=String.fromCharCode(C),w):i(C)}function v(C){return C===45?(e.consume(C),l=2,x):C===91?(e.consume(C),l=5,f=0,S):kn(C)?(e.consume(C),l=4,r.interrupt?t:R):i(C)}function x(C){return C===45?(e.consume(C),r.interrupt?t:R):i(C)}function S(C){const he="CDATA[";return C===he.charCodeAt(f++)?(e.consume(C),f===he.length?r.interrupt?t:Q:S):i(C)}function _(C){return kn(C)?(e.consume(C),c=String.fromCharCode(C),w):i(C)}function w(C){if(C===null||C===47||C===62||yt(C)){const he=C===47,ke=c.toLowerCase();return!he&&!o&&u0.includes(ke)?(l=1,r.interrupt?t(C):Q(C)):VM.includes(c.toLowerCase())?(l=6,he?(e.consume(C),k):r.interrupt?t(C):Q(C)):(l=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(C):o?O(C):A(C))}return C===45||pn(C)?(e.consume(C),c+=String.fromCharCode(C),w):i(C)}function k(C){return C===62?(e.consume(C),r.interrupt?t:Q):i(C)}function O(C){return Ge(C)?(e.consume(C),O):D(C)}function A(C){return C===47?(e.consume(C),D):C===58||C===95||kn(C)?(e.consume(C),I):Ge(C)?(e.consume(C),A):D(C)}function I(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),I):q(C)}function q(C){return C===61?(e.consume(C),T):Ge(C)?(e.consume(C),q):A(C)}function T(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(e.consume(C),d=C,P):Ge(C)?(e.consume(C),T):j(C)}function P(C){return C===d?(e.consume(C),d=null,X):C===null||Te(C)?i(C):(e.consume(C),P)}function j(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||yt(C)?q(C):(e.consume(C),j)}function X(C){return C===47||C===62||Ge(C)?A(C):i(C)}function D(C){return C===62?(e.consume(C),$):i(C)}function $(C){return C===null||Te(C)?Q(C):Ge(C)?(e.consume(C),$):i(C)}function Q(C){return C===45&&l===2?(e.consume(C),K):C===60&&l===1?(e.consume(C),le):C===62&&l===4?(e.consume(C),z):C===63&&l===3?(e.consume(C),R):C===93&&l===5?(e.consume(C),Se):Te(C)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(ZM,W,se)(C)):C===null||Te(C)?(e.exit("htmlFlowData"),se(C)):(e.consume(C),Q)}function se(C){return e.check(WM,ae,W)(C)}function ae(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),J}function J(C){return C===null||Te(C)?se(C):(e.enter("htmlFlowData"),Q(C))}function K(C){return C===45?(e.consume(C),R):Q(C)}function le(C){return C===47?(e.consume(C),c="",ce):Q(C)}function ce(C){if(C===62){const he=c.toLowerCase();return u0.includes(he)?(e.consume(C),z):Q(C)}return kn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),ce):Q(C)}function Se(C){return C===93?(e.consume(C),R):Q(C)}function R(C){return C===62?(e.consume(C),z):C===45&&l===2?(e.consume(C),R):Q(C)}function z(C){return C===null||Te(C)?(e.exit("htmlFlowData"),W(C)):(e.consume(C),z)}function W(C){return e.exit("htmlFlow"),t(C)}}function tD(e,t,i){const r=this;return l;function l(c){return Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):i(c)}function o(c){return r.parser.lazy[r.now().line]?i(c):t(c)}}function nD(e,t,i){return r;function r(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Sc,t,i)}}const iD={name:"htmlText",tokenize:aD};function aD(e,t,i){const r=this;let l,o,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),d}function d(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),q):R===63?(e.consume(R),A):kn(R)?(e.consume(R),j):i(R)}function h(R){return R===45?(e.consume(R),y):R===91?(e.consume(R),o=0,S):kn(R)?(e.consume(R),O):i(R)}function y(R){return R===45?(e.consume(R),x):i(R)}function m(R){return R===null?i(R):R===45?(e.consume(R),v):Te(R)?(c=m,le(R)):(e.consume(R),m)}function v(R){return R===45?(e.consume(R),x):m(R)}function x(R){return R===62?K(R):R===45?v(R):m(R)}function S(R){const z="CDATA[";return R===z.charCodeAt(o++)?(e.consume(R),o===z.length?_:S):i(R)}function _(R){return R===null?i(R):R===93?(e.consume(R),w):Te(R)?(c=_,le(R)):(e.consume(R),_)}function w(R){return R===93?(e.consume(R),k):_(R)}function k(R){return R===62?K(R):R===93?(e.consume(R),k):_(R)}function O(R){return R===null||R===62?K(R):Te(R)?(c=O,le(R)):(e.consume(R),O)}function A(R){return R===null?i(R):R===63?(e.consume(R),I):Te(R)?(c=A,le(R)):(e.consume(R),A)}function I(R){return R===62?K(R):A(R)}function q(R){return kn(R)?(e.consume(R),T):i(R)}function T(R){return R===45||pn(R)?(e.consume(R),T):P(R)}function P(R){return Te(R)?(c=P,le(R)):Ge(R)?(e.consume(R),P):K(R)}function j(R){return R===45||pn(R)?(e.consume(R),j):R===47||R===62||yt(R)?X(R):i(R)}function X(R){return R===47?(e.consume(R),K):R===58||R===95||kn(R)?(e.consume(R),D):Te(R)?(c=X,le(R)):Ge(R)?(e.consume(R),X):K(R)}function D(R){return R===45||R===46||R===58||R===95||pn(R)?(e.consume(R),D):$(R)}function $(R){return R===61?(e.consume(R),Q):Te(R)?(c=$,le(R)):Ge(R)?(e.consume(R),$):X(R)}function Q(R){return R===null||R===60||R===61||R===62||R===96?i(R):R===34||R===39?(e.consume(R),l=R,se):Te(R)?(c=Q,le(R)):Ge(R)?(e.consume(R),Q):(e.consume(R),ae)}function se(R){return R===l?(e.consume(R),l=void 0,J):R===null?i(R):Te(R)?(c=se,le(R)):(e.consume(R),se)}function ae(R){return R===null||R===34||R===39||R===60||R===61||R===96?i(R):R===47||R===62||yt(R)?X(R):(e.consume(R),ae)}function J(R){return R===47||R===62||yt(R)?X(R):i(R)}function K(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):i(R)}function le(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),ce}function ce(R){return Ge(R)?Je(e,Se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):Se(R)}function Se(R){return e.enter("htmlTextData"),c(R)}}const dg={name:"labelEnd",resolveAll:oD,resolveTo:cD,tokenize:uD},rD={tokenize:fD},sD={tokenize:dD},lD={tokenize:hD};function oD(e){let t=-1;const i=[];for(;++t<e.length;){const r=e[t][1];if(i.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const l=r.type==="labelImage"?4:2;r.type="data",t+=l}}return e.length!==i.length&&ti(e,0,e.length,i),e}function cD(e,t){let i=e.length,r=0,l,o,c,f;for(;i--;)if(l=e[i][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[i][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=i,l.type!=="labelLink")){r=2;break}}else l.type==="labelEnd"&&(c=i);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=bi(f,e.slice(o+1,o+r+3)),f=bi(f,[["enter",y,t]]),f=bi(f,Vf(t.parser.constructs.insideSpan.null,e.slice(o+r+4,c-3),t)),f=bi(f,[["exit",y,t],e[c-2],e[c-1],["exit",h,t]]),f=bi(f,e.slice(c+1)),f=bi(f,[["exit",d,t]]),ti(e,o,e.length,f),e}function uD(e,t,i){const r=this;let l=r.events.length,o,c;for(;l--;)if((r.events[l][1].type==="labelImage"||r.events[l][1].type==="labelLink")&&!r.events[l][1]._balanced){o=r.events[l][1];break}return f;function f(v){return o?o._inactive?m(v):(c=r.parser.defined.includes(Oi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):i(v)}function d(v){return v===40?e.attempt(rD,y,c?y:m)(v):v===91?e.attempt(sD,y,c?h:m)(v):c?y(v):m(v)}function h(v){return e.attempt(lD,y,m)(v)}function y(v){return t(v)}function m(v){return o._balanced=!0,i(v)}}function fD(e,t,i){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),l}function l(m){return yt(m)?Wo(e,o)(m):o(m)}function o(m){return m===41?y(m):_S(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function c(m){return yt(m)?Wo(e,d)(m):y(m)}function f(m){return i(m)}function d(m){return m===34||m===39||m===40?kS(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):y(m)}function h(m){return yt(m)?Wo(e,y)(m):y(m)}function y(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):i(m)}}function dD(e,t,i){const r=this;return l;function l(f){return wS.call(r,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return r.parser.defined.includes(Oi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(f):i(f)}function c(f){return i(f)}}function hD(e,t,i){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):i(o)}}const pD={name:"labelStartImage",resolveAll:dg.resolveAll,tokenize:mD};function mD(e,t,i){const r=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(f):t(f)}}const gD={name:"labelStartLink",resolveAll:dg.resolveAll,tokenize:bD};function bD(e,t,i){const r=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(c):t(c)}}const Sp={name:"lineEnding",tokenize:yD};function yD(e,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const hf={name:"thematicBreak",tokenize:xD};function xD(e,t,i){let r=0,l;return o;function o(h){return e.enter("thematicBreak"),c(h)}function c(h){return l=h,f(h)}function f(h){return h===l?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Te(h))?(e.exit("thematicBreak"),t(h)):i(h)}function d(h){return h===l?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ge(h)?Je(e,f,"whitespace")(h):f(h))}}const In={continuation:{tokenize:_D},exit:kD,name:"list",tokenize:SD},vD={partial:!0,tokenize:ND},ED={partial:!0,tokenize:wD};function SD(e,t,i){const r=this,l=r.events[r.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(x){const S=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:dm(x)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(hf,i,h)(x):h(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return i(x)}function d(x){return dm(x)&&++c<10?(e.consume(x),d):(!r.interrupt||c<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):i(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(Sc,r.interrupt?i:y,e.attempt(vD,v,m))}function y(x){return r.containerState.initialBlankLine=!0,o++,v(x)}function m(x){return Ge(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):i(x)}function v(x){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function _D(e,t,i){const r=this;return r.containerState._closeFlow=void 0,e.check(Sc,l,o);function l(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(f)}function o(f){return r.containerState.furtherBlankLines||!Ge(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ED,t,c)(f))}function c(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(In,t,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function wD(e,t,i){const r=this;return Je(e,l,"listItemIndent",r.containerState.size+1);function l(o){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?t(o):i(o)}}function kD(e){e.exit(this.containerState.type)}function ND(e,t,i){const r=this;return Je(e,l,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const c=r.events[r.events.length-1];return!Ge(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):i(o)}}const f0={name:"setextUnderline",resolveTo:TD,tokenize:CD};function TD(e,t){let i=e.length,r,l,o;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){r=i;break}e[i][1].type==="paragraph"&&(l=i)}else e[i][1].type==="content"&&e.splice(i,1),!o&&e[i][1].type==="definition"&&(o=i);const c={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",c,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=c,e.push(["exit",c,t]),e}function CD(e,t,i){const r=this;let l;return o;function o(h){let y=r.events.length,m;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){m=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),l=h,c(h)):i(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===l?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ge(h)?Je(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Te(h)?(e.exit("setextHeadingLine"),t(h)):i(h)}}const AD={tokenize:OD};function OD(e){const t=this,i=e.attempt(Sc,r,e.attempt(this.parser.constructs.flowInitial,l,Je(e,e.attempt(this.parser.constructs.flow,l,e.attempt(jM,l)),"linePrefix")));return i;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,i}}const RD={resolveAll:TS()},MD=NS("string"),DD=NS("text");function NS(e){return{resolveAll:TS(e==="text"?LD:void 0),tokenize:t};function t(i){const r=this,l=this.parser.constructs[e],o=i.attempt(l,c,f);return c;function c(y){return h(y)?o(y):f(y)}function f(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),d}function d(y){return h(y)?(i.exit("data"),o(y)):(i.consume(y),d)}function h(y){if(y===null)return!0;const m=l[y];let v=-1;if(m)for(;++v<m.length;){const x=m[v];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function TS(e){return t;function t(i,r){let l=-1,o;for(;++l<=i.length;)o===void 0?i[l]&&i[l][1].type==="data"&&(o=l,l++):(!i[l]||i[l][1].type!=="data")&&(l!==o+2&&(i[o][1].end=i[l-1][1].end,i.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(i,r):i}}function LD(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const r=e[i-1][1],l=t.sliceStream(r);let o=l.length,c=-1,f=0,d;for(;o--;){const h=l[o];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(f=0),f){const h={type:i===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:r.start._bufferIndex+c,_index:r.start._index+o,line:r.end.line,column:r.end.column-f,offset:r.end.offset-f},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(i,0,["enter",h,t],["exit",h,t]),i+=2)}i++}return e}const jD={42:In,43:In,45:In,48:In,49:In,50:In,51:In,52:In,53:In,54:In,55:In,56:In,57:In,62:xS},ID={91:FM},zD={[-2]:Ep,[-1]:Ep,32:Ep},BD={35:GM,42:hf,45:[f0,hf],60:XM,61:f0,95:hf,96:c0,126:c0},UD={38:ES,92:vS},FD={[-5]:Sp,[-4]:Sp,[-3]:Sp,33:pD,38:ES,42:hm,60:[gM,iD],91:gD,92:[HM,vS],93:dg,95:hm,96:AM},PD={null:[hm,RD]},$D={null:[42,95]},qD={null:[]},HD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$D,contentInitial:ID,disable:qD,document:jD,flow:BD,flowInitial:zD,insideSpan:PD,string:UD,text:FD},Symbol.toStringTag,{value:"Module"}));function KD(e,t,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const l={},o=[];let c=[],f=[];const d={attempt:P(q),check:P(T),consume:O,enter:A,exit:I,interrupt:P(T,{interrupt:!0})},h={code:null,containerState:{},defineSkip:_,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:m};let y=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function m($){return c=bi(c,$),w(),c[c.length-1]!==null?[]:(j(t,0),h.events=Vf(o,h.events,h),h.events)}function v($,Q){return YD(x($),Q)}function x($){return GD(c,$)}function S(){const{_bufferIndex:$,_index:Q,line:se,column:ae,offset:J}=r;return{_bufferIndex:$,_index:Q,line:se,column:ae,offset:J}}function _($){l[$.line]=$.column,D()}function w(){let $;for(;r._index<c.length;){const Q=c[r._index];if(typeof Q=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<Q.length;)k(Q.charCodeAt(r._bufferIndex));else k(Q)}}function k($){y=y($)}function O($){Te($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,D()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=$}function A($,Q){const se=Q||{};return se.type=$,se.start=S(),h.events.push(["enter",se,h]),f.push(se),se}function I($){const Q=f.pop();return Q.end=S(),h.events.push(["exit",Q,h]),Q}function q($,Q){j($,Q.from)}function T($,Q){Q.restore()}function P($,Q){return se;function se(ae,J,K){let le,ce,Se,R;return Array.isArray(ae)?W(ae):"tokenize"in ae?W([ae]):z(ae);function z(xe){return Pe;function Pe(st){const it=st!==null&&xe[st],Zt=st!==null&&xe.null,Pn=[...Array.isArray(it)?it:it?[it]:[],...Array.isArray(Zt)?Zt:Zt?[Zt]:[]];return W(Pn)(st)}}function W(xe){return le=xe,ce=0,xe.length===0?K:C(xe[ce])}function C(xe){return Pe;function Pe(st){return R=X(),Se=xe,xe.partial||(h.currentConstruct=xe),xe.name&&h.parser.constructs.disable.null.includes(xe.name)?ke():xe.tokenize.call(Q?Object.assign(Object.create(h),Q):h,d,he,ke)(st)}}function he(xe){return $(Se,R),J}function ke(xe){return R.restore(),++ce<le.length?C(le[ce]):K}}}function j($,Q){$.resolveAll&&!o.includes($)&&o.push($),$.resolve&&ti(h.events,Q,h.events.length-Q,$.resolve(h.events.slice(Q),h)),$.resolveTo&&(h.events=$.resolveTo(h.events,h))}function X(){const $=S(),Q=h.previous,se=h.currentConstruct,ae=h.events.length,J=Array.from(f);return{from:ae,restore:K};function K(){r=$,h.previous=Q,h.currentConstruct=se,h.events.length=ae,f=J,D()}}function D(){r.line in l&&r.column<2&&(r.column=l[r.line],r.offset+=l[r.line]-1)}}function GD(e,t){const i=t.start._index,r=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let c;if(i===l)c=[e[i].slice(r,o)];else{if(c=e.slice(i,l),r>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(r):c.shift()}o>0&&c.push(e[l].slice(0,o))}return c}function YD(e,t){let i=-1;const r=[];let l;for(;++i<e.length;){const o=e[i];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
454
+ `;break}case-3:{c=`\r
455
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&l)continue;c=" ";break}default:c=String.fromCharCode(o)}l=o===-2,r.push(c)}return r.join("")}function QD(e){const r={constructs:bS([HD,...(e||{}).extensions||[]]),content:l(cM),defined:[],document:l(fM),flow:l(AD),lazy:{},string:l(MD),text:l(DD)};return r;function l(o){return c;function c(f){return KD(r,o,f)}}}function VD(e){for(;!SS(e););return e}const d0=/[\0\t\n\r]/g;function XD(){let e=1,t="",i=!0,r;return l;function l(o,c,f){const d=[];let h,y,m,v,x;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),m=0,t="",i&&(o.charCodeAt(0)===65279&&m++,i=void 0);m<o.length;){if(d0.lastIndex=m,h=d0.exec(o),v=h&&h.index!==void 0?h.index:o.length,x=o.charCodeAt(v),!h){t=o.slice(m);break}if(x===10&&m===v&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<v&&(d.push(o.slice(m,v)),e+=v-m),x){case 0:{d.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,d.push(-2);e++<y;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=v+1}return f&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const ZD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function WD(e){return e.replace(ZD,JD)}function JD(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const l=i.charCodeAt(1),o=l===120||l===88;return yS(i.slice(o?2:1),o?16:10)}return fg(i)||e}const CS={}.hasOwnProperty;function eL(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),tL(i)(VD(QD(i).document().write(XD()(e,t,!0))))}function tL(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ji),autolinkProtocol:X,autolinkEmail:X,atxHeading:o(Li),blockQuote:o(Zt),characterEscape:X,characterReference:X,codeFenced:o(Pn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Pn,c),codeText:o(Xi,c),codeTextData:X,data:X,codeFlowValue:X,definition:o(Ca),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o($n),hardBreakEscape:o(Xe),hardBreakTrailing:o(Xe),htmlFlow:o(Si,c),htmlFlowData:X,htmlText:o(Si,c),htmlTextData:X,image:o(ri),label:c,link:o(ji),listItem:o(wr),listItemValue:v,listOrdered:o(Zi,m),listUnordered:o(Zi),paragraph:o(Hl),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Li),strong:o(gs),thematicBreak:o(bs)},exit:{atxHeading:d(),atxHeadingSequence:q,autolink:d(),autolinkEmail:it,autolinkProtocol:st,blockQuote:d(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:xe,characterReference:Pe,codeFenced:d(w),codeFencedFence:_,codeFencedFenceInfo:x,codeFencedFenceMeta:S,codeFlowValue:D,codeIndented:d(k),codeText:d(J),codeTextData:D,data:D,definition:d(),definitionDestinationString:I,definitionLabelString:O,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(Q),hardBreakTrailing:d(Q),htmlFlow:d(se),htmlFlowData:D,htmlText:d(ae),htmlTextData:D,image:d(le),label:Se,labelText:ce,lineEnding:$,link:d(K),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:he,resourceDestinationString:R,resourceTitleString:z,resource:W,setextHeading:d(j),setextHeadingLineSequence:P,setextHeadingText:T,strong:d(),thematicBreak:d()}};AS(t,(e||{}).mdastExtensions||[]);const i={};return r;function r(ee){let fe={type:"root",children:[]};const Ce={stack:[fe],tokenStack:[],config:t,enter:f,exit:h,buffer:c,resume:y,data:i},$e=[];let et=-1;for(;++et<ee.length;)if(ee[et][1].type==="listOrdered"||ee[et][1].type==="listUnordered")if(ee[et][0]==="enter")$e.push(et);else{const bn=$e.pop();et=l(ee,bn,et)}for(et=-1;++et<ee.length;){const bn=t[ee[et][0]];CS.call(bn,ee[et][1].type)&&bn[ee[et][1].type].call(Object.assign({sliceSerialize:ee[et][2].sliceSerialize},Ce),ee[et][1])}if(Ce.tokenStack.length>0){const bn=Ce.tokenStack[Ce.tokenStack.length-1];(bn[1]||h0).call(Ce,void 0,bn[0])}for(fe.position={start:ar(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:ar(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et<t.transforms.length;)fe=t.transforms[et](fe)||fe;return fe}function l(ee,fe,Ce){let $e=fe-1,et=-1,bn=!1,_i,nn,Lt,cn;for(;++$e<=Ce;){const lt=ee[$e];switch(lt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{lt[0]==="enter"?et++:et--,cn=void 0;break}case"lineEndingBlank":{lt[0]==="enter"&&(_i&&!cn&&!et&&!Lt&&(Lt=$e),cn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:cn=void 0}if(!et&&lt[0]==="enter"&&lt[1].type==="listItemPrefix"||et===-1&&lt[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(_i){let Ii=$e;for(nn=void 0;Ii--;){const yn=ee[Ii];if(yn[1].type==="lineEnding"||yn[1].type==="lineEndingBlank"){if(yn[0]==="exit")continue;nn&&(ee[nn][1].type="lineEndingBlank",bn=!0),yn[1].type="lineEnding",nn=Ii}else if(!(yn[1].type==="linePrefix"||yn[1].type==="blockQuotePrefix"||yn[1].type==="blockQuotePrefixWhitespace"||yn[1].type==="blockQuoteMarker"||yn[1].type==="listItemIndent"))break}Lt&&(!nn||Lt<nn)&&(_i._spread=!0),_i.end=Object.assign({},nn?ee[nn][1].start:lt[1].end),ee.splice(nn||$e,0,["exit",_i,lt[2]]),$e++,Ce++}if(lt[1].type==="listItemPrefix"){const Ii={type:"listItem",_spread:!1,start:Object.assign({},lt[1].start),end:void 0};_i=Ii,ee.splice($e,0,["enter",Ii,lt[2]]),$e++,Ce++,Lt=void 0,cn=!0}}}return ee[fe][1]._spread=bn,Ce}function o(ee,fe){return Ce;function Ce($e){f.call(this,ee($e),$e),fe&&fe.call(this,$e)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ee,fe,Ce){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([fe,Ce||void 0]),ee.position={start:ar(fe.start),end:void 0}}function d(ee){return fe;function fe(Ce){ee&&ee.call(this,Ce),h.call(this,Ce)}}function h(ee,fe){const Ce=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==ee.type&&(fe?fe.call(this,ee,$e[0]):($e[1]||h0).call(this,ee,$e[0]));else throw new Error("Cannot close `"+ee.type+"` ("+Zo({start:ee.start,end:ee.end})+"): it’s not open");Ce.position.end=ar(ee.end)}function y(){return ug(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v(ee){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=ee}function S(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=ee}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/(\r?\n|\r)$/g,"")}function O(ee){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Oi(this.sliceSerialize(ee)).toLowerCase()}function A(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function I(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function q(ee){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ce=this.sliceSerialize(ee).length;fe.depth=Ce}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function P(ee){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function X(ee){const Ce=this.stack[this.stack.length-1].children;let $e=Ce[Ce.length-1];(!$e||$e.type!=="text")&&($e=Ot(),$e.position={start:ar(ee.start),end:void 0},Ce.push($e)),this.stack.push($e)}function D(ee){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ee),fe.position.end=ar(ee.end)}function $(ee){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=fe.children[fe.children.length-1];Ce.position.end=ar(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(X.call(this,ee),D.call(this,ee))}function Q(){this.data.atHardBreak=!0}function se(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function ae(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function J(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function K(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function le(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function ce(ee){const fe=this.sliceSerialize(ee),Ce=this.stack[this.stack.length-2];Ce.label=WD(fe),Ce.identifier=Oi(fe).toLowerCase()}function Se(){const ee=this.stack[this.stack.length-1],fe=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const $e=ee.children;Ce.children=$e}else Ce.alt=fe}function R(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function z(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function W(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function he(ee){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Oi(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function ke(ee){this.data.characterReferenceType=ee.type}function xe(ee){const fe=this.sliceSerialize(ee),Ce=this.data.characterReferenceType;let $e;Ce?($e=yS(fe,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=fg(fe);const et=this.stack[this.stack.length-1];et.value+=$e}function Pe(ee){const fe=this.stack.pop();fe.position.end=ar(ee.end)}function st(ee){D.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ee)}function it(ee){D.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ee)}function Zt(){return{type:"blockquote",children:[]}}function Pn(){return{type:"code",lang:null,meta:null,value:""}}function Xi(){return{type:"inlineCode",value:""}}function Ca(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $n(){return{type:"emphasis",children:[]}}function Li(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function Si(){return{type:"html",value:""}}function ri(){return{type:"image",title:null,url:"",alt:null}}function ji(){return{type:"link",title:null,url:"",children:[]}}function Zi(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function wr(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function Hl(){return{type:"paragraph",children:[]}}function gs(){return{type:"strong",children:[]}}function Ot(){return{type:"text",value:""}}function bs(){return{type:"thematicBreak"}}}function ar(e){return{line:e.line,column:e.column,offset:e.offset}}function AS(e,t){let i=-1;for(;++i<t.length;){const r=t[i];Array.isArray(r)?AS(e,r):nL(e,r)}}function nL(e,t){let i;for(i in t)if(CS.call(t,i))switch(i){case"canContainEols":{const r=t[i];r&&e[i].push(...r);break}case"transforms":{const r=t[i];r&&e[i].push(...r);break}case"enter":case"exit":{const r=t[i];r&&Object.assign(e[i],r);break}}}function h0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zo({start:t.start,end:t.end})+") is still open")}function iL(e){const t=this;t.parser=i;function i(r){return eL(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function aL(e,t){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,i),e.applyData(t,i)}function rL(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
456
+ `}]}function sL(e,t){const i=t.value?t.value+`
457
+ `:"",r={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(r.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function lL(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function oL(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function cL(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),l=ql(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let c,f=e.footnoteCounts.get(r);f===void 0?(f=0,e.footnoteOrder.push(r),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(r,f);const d={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+l,id:i+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function uL(e,t){const i={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function fL(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function OS(e,t){const i=t.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const l=e.all(t),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=r:l.push({type:"text",value:r}),l}function dL(e,t){const i=String(t.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return OS(e,t);const l={src:ql(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(l.title=r.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function hL(e,t){const i={src:ql(t.url)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),t.title!==null&&t.title!==void 0&&(i.title=t.title);const r={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,r),e.applyData(t,r)}function pL(e,t){const i={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(t,r),e.applyData(t,r)}function mL(e,t){const i=String(t.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return OS(e,t);const l={href:ql(r.url||"")};r.title!==null&&r.title!==void 0&&(l.title=r.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function gL(e,t){const i={href:ql(t.url)};t.title!==null&&t.title!==void 0&&(i.title=t.title);const r={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bL(e,t,i){const r=e.all(t),l=i?yL(i):RS(t),o={},c=[];if(typeof t.checked=="boolean"){const y=r[0];let m;y&&y.type==="element"&&y.tagName==="p"?m=y:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<r.length;){const y=r[f];(l||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
458
+ `}),y.type==="element"&&y.tagName==="p"&&!l?c.push(...y.children):c.push(y)}const d=r[r.length-1];d&&(l||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
459
+ `});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,h),e.applyData(t,h)}function yL(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const i=e.children;let r=-1;for(;!t&&++r<i.length;)t=RS(i[r])}return t}function RS(e){const t=e.spread;return t??e.children.length>1}function xL(e,t){const i={},r=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(i.start=t.start);++l<r.length;){const c=r[l];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:i,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function vL(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function EL(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function SL(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function _L(e,t){const i=e.all(t),r=i.shift(),l=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],c),l.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=sg(t.children[1]),d=uS(t.children[t.children.length-1]);f&&d&&(c.position={start:f,end:d}),l.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function wL(e,t,i){const r=i?i.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const m=t.children[d],v={},x=c?c[d]:void 0;x&&(v.align=x);let S={type:"element",tagName:o,properties:v,children:[]};m&&(S.children=e.all(m),e.patch(m,S),S=e.applyData(m,S)),h.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,y),e.applyData(t,y)}function kL(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const p0=9,m0=32;function NL(e){const t=String(e),i=/\r?\n|\r/g;let r=i.exec(t),l=0;const o=[];for(;r;)o.push(g0(t.slice(l,r.index),l>0,!0),r[0]),l=r.index+r[0].length,r=i.exec(t);return o.push(g0(t.slice(l),l>0,!1)),o.join("")}function g0(e,t,i){let r=0,l=e.length;if(t){let o=e.codePointAt(r);for(;o===p0||o===m0;)r++,o=e.codePointAt(r)}if(i){let o=e.codePointAt(l-1);for(;o===p0||o===m0;)l--,o=e.codePointAt(l-1)}return l>r?e.slice(r,l):""}function TL(e,t){const i={type:"text",value:NL(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function CL(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const AL={blockquote:aL,break:rL,code:sL,delete:lL,emphasis:oL,footnoteReference:cL,heading:uL,html:fL,imageReference:dL,image:hL,inlineCode:pL,linkReference:mL,link:gL,listItem:bL,list:xL,paragraph:vL,root:EL,strong:SL,table:_L,tableCell:kL,tableRow:wL,text:TL,thematicBreak:CL,toml:Xu,yaml:Xu,definition:Xu,footnoteDefinition:Xu};function Xu(){}const MS=-1,Xf=0,Jo=1,kf=2,hg=3,pg=4,mg=5,gg=6,DS=7,LS=8,b0=typeof self=="object"?self:globalThis,OL=(e,t)=>{const i=(l,o)=>(e.set(o,l),l),r=l=>{if(e.has(l))return e.get(l);const[o,c]=t[l];switch(o){case Xf:case MS:return i(c,l);case Jo:{const f=i([],l);for(const d of c)f.push(r(d));return f}case kf:{const f=i({},l);for(const[d,h]of c)f[r(d)]=r(h);return f}case hg:return i(new Date(c),l);case pg:{const{source:f,flags:d}=c;return i(new RegExp(f,d),l)}case mg:{const f=i(new Map,l);for(const[d,h]of c)f.set(r(d),r(h));return f}case gg:{const f=i(new Set,l);for(const d of c)f.add(r(d));return f}case DS:{const{name:f,message:d}=c;return i(new b0[f](d),l)}case LS:return i(BigInt(c),l);case"BigInt":return i(Object(BigInt(c)),l);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new b0[o](c),l)};return r},y0=e=>OL(new Map,e)(0),al="",{toString:RL}={},{keys:ML}=Object,Go=e=>{const t=typeof e;if(t!=="object"||!e)return[Xf,t];const i=RL.call(e).slice(8,-1);switch(i){case"Array":return[Jo,al];case"Object":return[kf,al];case"Date":return[hg,al];case"RegExp":return[pg,al];case"Map":return[mg,al];case"Set":return[gg,al];case"DataView":return[Jo,i]}return i.includes("Array")?[Jo,i]:i.includes("Error")?[DS,i]:[kf,i]},Zu=([e,t])=>e===Xf&&(t==="function"||t==="symbol"),DL=(e,t,i,r)=>{const l=(c,f)=>{const d=r.push(c)-1;return i.set(f,d),d},o=c=>{if(i.has(c))return i.get(c);let[f,d]=Go(c);switch(f){case Xf:{let y=c;switch(d){case"bigint":f=LS,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);y=null;break;case"undefined":return l([MS],c)}return l([f,y],c)}case Jo:{if(d){let v=c;return d==="DataView"?v=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(c)),l([d,[...v]],c)}const y=[],m=l([f,y],c);for(const v of c)y.push(o(v));return m}case kf:{if(d)switch(d){case"BigInt":return l([d,c.toString()],c);case"Boolean":case"Number":case"String":return l([d,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const y=[],m=l([f,y],c);for(const v of ML(c))(e||!Zu(Go(c[v])))&&y.push([o(v),o(c[v])]);return m}case hg:return l([f,c.toISOString()],c);case pg:{const{source:y,flags:m}=c;return l([f,{source:y,flags:m}],c)}case mg:{const y=[],m=l([f,y],c);for(const[v,x]of c)(e||!(Zu(Go(v))||Zu(Go(x))))&&y.push([o(v),o(x)]);return m}case gg:{const y=[],m=l([f,y],c);for(const v of c)(e||!Zu(Go(v)))&&y.push(o(v));return m}}const{message:h}=c;return l([f,{name:d,message:h}],c)};return o},x0=(e,{json:t,lossy:i}={})=>{const r=[];return DL(!(t||i),!!t,new Map,r)(e),r},Nf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?y0(x0(e,t)):structuredClone(e):(e,t)=>y0(x0(e,t));function LL(e,t){const i=[{type:"text",value:"↩"}];return t>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),i}function jL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function IL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||LL,r=e.options.footnoteBackLabel||jL,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const y=e.all(h),m=String(h.identifier).toUpperCase(),v=ql(m.toLowerCase());let x=0;const S=[],_=e.footnoteCounts.get(m);for(;_!==void 0&&++x<=_;){S.length>0&&S.push({type:"text",value:" "});let O=typeof i=="string"?i:i(d,x);typeof O=="string"&&(O={type:"text",value:O}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,x),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const w=y[y.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const O=w.children[w.children.length-1];O&&O.type==="text"?O.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...S)}else y.push(...S);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(y,!0)};e.patch(h,k),f.push(k)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Nf(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
460
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
461
+ `}]}}const _c=(function(e){if(e==null)return FL;if(typeof e=="function")return Zf(e);if(typeof e=="object")return Array.isArray(e)?zL(e):BL(e);if(typeof e=="string")return UL(e);throw new Error("Expected function, string, or object as test")});function zL(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=_c(e[i]);return Zf(r);function r(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function BL(e){const t=e;return Zf(i);function i(r){const l=r;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function UL(e){return Zf(t);function t(i){return i&&i.type===e}}function Zf(e){return t;function t(i,r,l){return!!(PL(i)&&e.call(this,i,typeof r=="number"?r:void 0,l||void 0))}}function FL(){return!0}function PL(e){return e!==null&&typeof e=="object"&&"type"in e}const jS=[],$L=!0,pm=!1,qL="skip";function IS(e,t,i,r){let l;typeof t=="function"&&typeof i!="function"?(r=i,i=t):l=t;const o=_c(l),c=r?-1:1;f(e,void 0,[])();function f(d,h,y){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const x=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=jS,S,_,w;if((!t||o(d,h,y[y.length-1]||void 0))&&(x=HL(i(d,y)),x[0]===pm))return x;if("children"in d&&d.children){const k=d;if(k.children&&x[0]!==qL)for(_=(r?k.children.length:-1)+c,w=y.concat(k);_>-1&&_<k.children.length;){const O=k.children[_];if(S=f(O,_,w)(),S[0]===pm)return S;_=typeof S[1]=="number"?S[1]:_+c}}return x}}}function HL(e){return Array.isArray(e)?e:typeof e=="number"?[$L,e]:e==null?jS:[e]}function Wf(e,t,i,r){let l,o,c;typeof t=="function"&&typeof i!="function"?(o=void 0,c=t,l=i):(o=t,c=i,l=r),IS(e,o,f,l);function f(d,h){const y=h[h.length-1],m=y?y.children.indexOf(d):void 0;return c(d,m,y)}}const mm={}.hasOwnProperty,KL={};function GL(e,t){const i=t||KL,r=new Map,l=new Map,o=new Map,c={...AL,...i.handlers},f={all:h,applyData:QL,definitionById:r,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:c,one:d,options:i,patch:YL,wrap:XL};return Wf(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const m=y.type==="definition"?r:l,v=String(y.identifier).toUpperCase();m.has(v)||m.set(v,y)}}),f;function d(y,m){const v=y.type,x=f.handlers[v];if(mm.call(f.handlers,v)&&x)return x(f,y,m);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in y){const{children:_,...w}=y,k=Nf(w);return k.children=f.all(y),k}return Nf(y)}return(f.options.unknownHandler||VL)(f,y,m)}function h(y){const m=[];if("children"in y){const v=y.children;let x=-1;for(;++x<v.length;){const S=f.one(v[x],y);if(S){if(x&&v[x-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=v0(S.value)),!Array.isArray(S)&&S.type==="element")){const _=S.children[0];_&&_.type==="text"&&(_.value=v0(_.value))}Array.isArray(S)?m.push(...S):m.push(S)}}}return m}}function YL(e,t){e.position&&(t.position=jR(e))}function QL(e,t){let i=t;if(e&&e.data){const r=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const c="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:c}}i.type==="element"&&o&&Object.assign(i.properties,Nf(o)),"children"in i&&i.children&&l!==null&&l!==void 0&&(i.children=l)}return i}function VL(e,t){const i=t.data||{},r="value"in t&&!(mm.call(i,"hProperties")||mm.call(i,"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 XL(e,t){const i=[];let r=-1;for(t&&i.push({type:"text",value:`
462
+ `});++r<e.length;)r&&i.push({type:"text",value:`
463
+ `}),i.push(e[r]);return t&&e.length>0&&i.push({type:"text",value:`
464
+ `}),i}function v0(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function E0(e,t){const i=GL(e,t),r=i.one(e,void 0),l=IL(i),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
465
+ `},l),o}function ZL(e,t){return e&&"run"in e?async function(i,r){const l=E0(i,{file:r,...t});await e.run(l,r)}:function(i,r){return E0(i,{file:r,...e||t})}}function S0(e){if(e)throw e}var _p,_0;function WL(){if(_0)return _p;_0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,l=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var y=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!m)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},c=function(h,y){i&&y.name==="__proto__"?i(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(e.call(h,y)){if(r)return r(h,y).value}else return;return h[y]};return _p=function d(){var h,y,m,v,x,S,_=arguments[0],w=1,k=arguments.length,O=!1;for(typeof _=="boolean"&&(O=_,_=arguments[1]||{},w=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});w<k;++w)if(h=arguments[w],h!=null)for(y in h)m=f(_,y),v=f(h,y),_!==v&&(O&&v&&(o(v)||(x=l(v)))?(x?(x=!1,S=m&&l(m)?m:[]):S=m&&o(m)?m:{},c(_,{name:y,newValue:d(O,S,v)})):typeof v<"u"&&c(_,{name:y,newValue:v}));return _},_p}var JL=WL();const wp=Em(JL);function gm(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 ej(){const e=[],t={run:i,use:r};return t;function i(...l){let o=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(d,...h){const y=e[++o];let m=-1;if(d){c(d);return}for(;++m<l.length;)(h[m]===null||h[m]===void 0)&&(h[m]=l[m]);l=h,y?tj(y,f)(...h):c(null,...h)}}function r(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function tj(e,t){let i;return r;function r(...c){const f=e.length>c.length;let d;f&&c.push(l);try{d=e.apply(this,c)}catch(h){const y=h;if(f&&i)throw y;return l(y)}f||(d&&d.then&&typeof d.then=="function"?d.then(o,l):d instanceof Error?l(d):o(d))}function l(c,...f){i||(i=!0,t(c,...f))}function o(c){l(null,c)}}const qi={basename:nj,dirname:ij,extname:aj,join:rj,sep:"/"};function nj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wc(e);let i=0,r=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){i=l+1;break}}else r<0&&(o=!0,r=l+1);return r<0?"":e.slice(i,r)}if(t===e)return"";let c=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){i=l+1;break}}else c<0&&(o=!0,c=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(r=l):(f=-1,r=c));return i===r?r=c:r<0&&(r=e.length),e.slice(i,r)}function ij(e){if(wc(e),e.length===0)return".";let t=-1,i=e.length,r;for(;--i;)if(e.codePointAt(i)===47){if(r){t=i;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function aj(e){wc(e);let t=e.length,i=-1,r=0,l=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){r=t+1;break}continue}i<0&&(c=!0,i=t+1),f===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||i<0||o===0||o===1&&l===i-1&&l===r+1?"":e.slice(l,i)}function rj(...e){let t=-1,i;for(;++t<e.length;)wc(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":sj(i)}function sj(e){wc(e);const t=e.codePointAt(0)===47;let i=lj(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function lj(e,t){let i="",r=0,l=-1,o=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||o===1))if(l!==c-1&&o===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(d=i.lastIndexOf("/"),d!==i.length-1){d<0?(i="",r=0):(i=i.slice(0,d),r=i.length-1-i.lastIndexOf("/")),l=c,o=0;continue}}else if(i.length>0){i="",r=0,l=c,o=0;continue}}t&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+e.slice(l+1,c):i=e.slice(l+1,c),r=c-l-1;l=c,o=0}else f===46&&o>-1?o++:o=-1}return i}function wc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const oj={cwd:cj};function cj(){return"/"}function bm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uj(e){if(typeof e=="string")e=new URL(e);else if(!bm(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 fj(e)}function fj(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 i=-1;for(;++i<t.length;)if(t.codePointAt(i)===37&&t.codePointAt(i+1)===50){const r=t.codePointAt(i+2);if(r===70||r===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const kp=["history","path","basename","stem","extname","dirname"];class zS{constructor(t){let i;t?bm(t)?i={path:t}:typeof t=="string"||dj(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":oj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<kp.length;){const o=kp[r];o in i&&i[o]!==void 0&&i[o]!==null&&(this[o]=o==="history"?[...i[o]]:i[o])}let l;for(l in i)kp.includes(l)||(this[l]=i[l])}get basename(){return typeof this.path=="string"?qi.basename(this.path):void 0}set basename(t){Tp(t,"basename"),Np(t,"basename"),this.path=qi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?qi.dirname(this.path):void 0}set dirname(t){w0(this.basename,"dirname"),this.path=qi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?qi.extname(this.path):void 0}set extname(t){if(Np(t,"extname"),w0(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=qi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){bm(t)&&(t=uj(t)),Tp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?qi.basename(this.path,this.extname):void 0}set stem(t){Tp(t,"stem"),Np(t,"stem"),this.path=qi.join(this.dirname||"",t+(this.extname||""))}fail(t,i,r){const l=this.message(t,i,r);throw l.fatal=!0,l}info(t,i,r){const l=this.message(t,i,r);return l.fatal=void 0,l}message(t,i,r){const l=new gn(t,i,r);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Np(e,t){if(e&&e.includes(qi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qi.sep+"`")}function Tp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function w0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function dj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hj=(function(e){const r=this.constructor.prototype,l=r[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),pj={}.hasOwnProperty;class bg extends hj{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=ej()}copy(){const t=new bg;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];t.use(...r)}return t.data(wp(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(Op("data",this.frozen),this.namespace[t]=i,this):pj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Op("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[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const l=i.call(t,...r);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const i=Wu(t),r=this.parser||this.Parser;return Cp("parse",r),r(String(i),i)}process(t,i){const r=this;return this.freeze(),Cp("process",this.parser||this.Parser),Ap("process",this.compiler||this.Compiler),i?l(void 0,i):new Promise(l);function l(o,c){const f=Wu(t),d=r.parse(f);r.run(d,f,function(y,m,v){if(y||!m||!v)return h(y);const x=m,S=r.stringify(x,v);bj(S)?v.value=S:v.result=S,h(y,v)});function h(y,m){y||!m?c(y):o?o(m):i(void 0,m)}}}processSync(t){let i=!1,r;return this.freeze(),Cp("processSync",this.parser||this.Parser),Ap("processSync",this.compiler||this.Compiler),this.process(t,l),N0("processSync","process",i),r;function l(o,c){i=!0,S0(o),r=c}}run(t,i,r){k0(t),this.freeze();const l=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?o(void 0,r):new Promise(o);function o(c,f){const d=Wu(i);l.run(t,d,h);function h(y,m,v){const x=m||t;y?f(y):c?c(x):r(void 0,x,v)}}}runSync(t,i){let r=!1,l;return this.run(t,i,o),N0("runSync","run",r),l;function o(c,f){S0(c),l=f,r=!0}}stringify(t,i){this.freeze();const r=Wu(i),l=this.compiler||this.Compiler;return Ap("stringify",l),k0(t),l(t,r)}use(t,...i){const r=this.attachers,l=this.namespace;if(Op("use",this.frozen),t!=null)if(typeof t=="function")d(t,i);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...m]=h;d(y,m)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))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");f(h.plugins),h.settings&&(l.settings=wp(!0,l.settings,h.settings))}function f(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const m=h[y];o(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,y){let m=-1,v=-1;for(;++m<r.length;)if(r[m][0]===h){v=m;break}if(v===-1)r.push([h,...y]);else if(y.length>0){let[x,...S]=y;const _=r[v][1];gm(_)&&gm(x)&&(x=wp(!0,_,x)),r[v]=[h,x,...S]}}}}const mj=new bg().freeze();function Cp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ap(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Op(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 k0(e){if(!gm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function N0(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wu(e){return gj(e)?e:new zS(e)}function gj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function bj(e){return typeof e=="string"||yj(e)}function yj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",T0=[],C0={allowDangerousHtml:!0},vj=/^(https?|ircs?|mailto|xmpp)$/i,Ej=[{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 yg(e){const t=Sj(e),i=_j(e);return wj(t.runSync(t.parse(i),i),e)}function Sj(e){const t=e.rehypePlugins||T0,i=e.remarkPlugins||T0,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...C0}:C0;return mj().use(iL).use(i).use(ZL,r).use(t)}function _j(e){const t=e.children||"",i=new zS;return typeof t=="string"&&(i.value=t),i}function wj(e,t){const i=t.allowedElements,r=t.allowElement,l=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||kj;for(const y of Ej)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+xj+y.id,void 0);return Wf(e,h),FR(e,{Fragment:g.Fragment,components:l,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function h(y,m,v){if(y.type==="raw"&&v&&typeof m=="number")return c?v.children.splice(m,1):v.children[m]={type:"text",value:y.value},m;if(y.type==="element"){let x;for(x in vp)if(Object.hasOwn(vp,x)&&Object.hasOwn(y.properties,x)){const S=y.properties[x],_=vp[x];(_===null||_.includes(y.tagName))&&(y.properties[x]=d(String(S||""),x,y))}}if(y.type==="element"){let x=i?!i.includes(y.tagName):o?o.includes(y.tagName):!1;if(!x&&r&&typeof m=="number"&&(x=!r(y,m,v)),x&&v&&typeof m=="number")return f&&y.children?v.children.splice(m,1,...y.children):v.children.splice(m,1),m}}}function kj(e){const t=e.indexOf(":"),i=e.indexOf("?"),r=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||i!==-1&&t>i||r!==-1&&t>r||vj.test(e.slice(0,t))?e:""}function A0(e,t){const i=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,l=i.indexOf(t);for(;l!==-1;)r++,l=i.indexOf(t,l+t.length);return r}function Nj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Tj(e,t,i){const l=_c((i||{}).ignore||[]),o=Cj(t);let c=-1;for(;++c<o.length;)IS(e,"text",f);function f(h,y){let m=-1,v;for(;++m<y.length;){const x=y[m],S=v?v.children:void 0;if(l(x,S?S.indexOf(x):void 0,v))return;v=x}if(v)return d(h,y)}function d(h,y){const m=y[y.length-1],v=o[c][0],x=o[c][1];let S=0;const w=m.children.indexOf(h);let k=!1,O=[];v.lastIndex=0;let A=v.exec(h.value);for(;A;){const I=A.index,q={index:A.index,input:A.input,stack:[...y,h]};let T=x(...A,q);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?v.lastIndex=I+1:(S!==I&&O.push({type:"text",value:h.value.slice(S,I)}),Array.isArray(T)?O.push(...T):T&&O.push(T),S=I+A[0].length,k=!0),!v.global)break;A=v.exec(h.value)}return k?(S<h.value.length&&O.push({type:"text",value:h.value.slice(S)}),m.children.splice(w,1,...O)):O=[h],w+O.length}}function Cj(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<i.length;){const l=i[r];t.push([Aj(l[0]),Oj(l[1])])}return t}function Aj(e){return typeof e=="string"?new RegExp(Nj(e),"g"):e}function Oj(e){return typeof e=="function"?e:function(){return e}}const Rp="phrasing",Mp=["autolink","link","image","label"];function Rj(){return{transforms:[Bj],enter:{literalAutolink:Dj,literalAutolinkEmail:Dp,literalAutolinkHttp:Dp,literalAutolinkWww:Dp},exit:{literalAutolink:zj,literalAutolinkEmail:Ij,literalAutolinkHttp:Lj,literalAutolinkWww:jj}}}function Mj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Rp,notInConstruct:Mp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Rp,notInConstruct:Mp},{character:":",before:"[ps]",after:"\\/",inConstruct:Rp,notInConstruct:Mp}]}}function Dj(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Dp(e){this.config.enter.autolinkProtocol.call(this,e)}function Lj(e){this.config.exit.autolinkProtocol.call(this,e)}function jj(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 Ij(e){this.config.exit.autolinkEmail.call(this,e)}function zj(e){this.exit(e)}function Bj(e){Tj(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Uj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Fj]],{ignore:["link","linkReference"]})}function Uj(e,t,i,r,l){let o="";if(!BS(l)||(/^w/i.test(t)&&(i=t+i,t="",o="http://"),!Pj(i)))return!1;const c=$j(i+r);if(!c[0])return!1;const f={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function Fj(e,t,i,r){return!BS(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+i,children:[{type:"text",value:t+"@"+i}]}}function Pj(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 $j(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let i=t[0],r=i.indexOf(")");const l=A0(e,"(");let o=A0(e,")");for(;r!==-1&&l>o;)e+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),o++;return[e,i]}function BS(e,t){const i=e.input.charCodeAt(e.index-1);return(e.index===0||us(i)||Qf(i))&&(!t||i!==47)}US.peek=Zj;function qj(){this.buffer()}function Hj(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Kj(){this.buffer()}function Gj(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Yj(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Oi(this.sliceSerialize(e)).toLowerCase(),i.label=t}function Qj(e){this.exit(e)}function Vj(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Oi(this.sliceSerialize(e)).toLowerCase(),i.label=t}function Xj(e){this.exit(e)}function Zj(){return"["}function US(e,t,i,r){const l=i.createTracker(r);let o=l.move("[^");const c=i.enter("footnoteReference"),f=i.enter("reference");return o+=l.move(i.safe(i.associationId(e),{after:"]",before:o})),f(),c(),o+=l.move("]"),o}function Wj(){return{enter:{gfmFootnoteCallString:qj,gfmFootnoteCall:Hj,gfmFootnoteDefinitionLabelString:Kj,gfmFootnoteDefinition:Gj},exit:{gfmFootnoteCallString:Yj,gfmFootnoteCall:Qj,gfmFootnoteDefinitionLabelString:Vj,gfmFootnoteDefinition:Xj}}}function Jj(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:i,footnoteReference:US},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,l,o,c){const f=o.createTracker(c);let d=f.move("[^");const h=o.enter("footnoteDefinition"),y=o.enter("label");return d+=f.move(o.safe(o.associationId(r),{before:d,after:"]"})),y(),d+=f.move("]:"),r.children&&r.children.length>0&&(f.shift(4),d+=f.move((t?`
466
+ `:" ")+o.indentLines(o.containerFlow(r,f.current()),t?FS:eI))),h(),d}}function eI(e,t,i){return t===0?e:FS(e,t,i)}function FS(e,t,i){return(i?"":" ")+e}const tI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];PS.peek=sI;function nI(){return{canContainEols:["delete"],enter:{strikethrough:aI},exit:{strikethrough:rI}}}function iI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:tI}],handlers:{delete:PS}}}function aI(e){this.enter({type:"delete",children:[]},e)}function rI(e){this.exit(e)}function PS(e,t,i,r){const l=i.createTracker(r),o=i.enter("strikethrough");let c=l.move("~~");return c+=i.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),o(),c}function sI(){return"~"}function lI(e){return e.length}function oI(e,t){const i=t||{},r=(i.align||[]).concat(),l=i.stringLength||lI,o=[],c=[],f=[],d=[];let h=0,y=-1;for(;++y<e.length;){const _=[],w=[];let k=-1;for(e[y].length>h&&(h=e[y].length);++k<e[y].length;){const O=cI(e[y][k]);if(i.alignDelimiters!==!1){const A=l(O);w[k]=A,(d[k]===void 0||A>d[k])&&(d[k]=A)}_.push(O)}c[y]=_,f[y]=w}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<h;)o[m]=O0(r[m]);else{const _=O0(r);for(;++m<h;)o[m]=_}m=-1;const v=[],x=[];for(;++m<h;){const _=o[m];let w="",k="";_===99?(w=":",k=":"):_===108?w=":":_===114&&(k=":");let O=i.alignDelimiters===!1?1:Math.max(1,d[m]-w.length-k.length);const A=w+"-".repeat(O)+k;i.alignDelimiters!==!1&&(O=w.length+O+k.length,O>d[m]&&(d[m]=O),x[m]=O),v[m]=A}c.splice(1,0,v),f.splice(1,0,x),y=-1;const S=[];for(;++y<c.length;){const _=c[y],w=f[y];m=-1;const k=[];for(;++m<h;){const O=_[m]||"";let A="",I="";if(i.alignDelimiters!==!1){const q=d[m]-(w[m]||0),T=o[m];T===114?A=" ".repeat(q):T===99?q%2?(A=" ".repeat(q/2+.5),I=" ".repeat(q/2-.5)):(A=" ".repeat(q/2),I=A):I=" ".repeat(q)}i.delimiterStart!==!1&&!m&&k.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&O==="")&&(i.delimiterStart!==!1||m)&&k.push(" "),i.alignDelimiters!==!1&&k.push(A),k.push(O),i.alignDelimiters!==!1&&k.push(I),i.padding!==!1&&k.push(" "),(i.delimiterEnd!==!1||m!==h-1)&&k.push("|")}S.push(i.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return S.join(`
467
+ `)}function cI(e){return e==null?"":String(e)}function O0(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 uI(e,t,i,r){const l=i.enter("blockquote"),o=i.createTracker(r);o.move("> "),o.shift(2);const c=i.indentLines(i.containerFlow(e,o.current()),fI);return l(),c}function fI(e,t,i){return">"+(i?"":" ")+e}function dI(e,t){return R0(e,t.inConstruct,!0)&&!R0(e,t.notInConstruct,!1)}function R0(e,t,i){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return i;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function M0(e,t,i,r){let l=-1;for(;++l<i.unsafe.length;)if(i.unsafe[l].character===`
468
+ `&&dI(i.stack,i.unsafe[l]))return/[ \t]/.test(r.before)?"":" ";return`\\
469
+ `}function hI(e,t){const i=String(e);let r=i.indexOf(t),l=r,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===l?++o>c&&(c=o):o=1,l=r+t.length,r=i.indexOf(t,l);return c}function pI(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 mI(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 gI(e,t,i,r){const l=mI(i),o=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(pI(e,i)){const m=i.enter("codeIndented"),v=i.indentLines(o,bI);return m(),v}const f=i.createTracker(r),d=l.repeat(Math.max(hI(o,l)+1,3)),h=i.enter("codeFenced");let y=f.move(d);if(e.lang){const m=i.enter(`codeFencedLang${c}`);y+=f.move(i.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),m()}if(e.lang&&e.meta){const m=i.enter(`codeFencedMeta${c}`);y+=f.move(" "),y+=f.move(i.safe(e.meta,{before:y,after:`
470
+ `,encode:["`"],...f.current()})),m()}return y+=f.move(`
471
+ `),o&&(y+=f.move(o+`
472
+ `)),y+=f.move(d),h(),y}function bI(e,t,i){return(i?"":" ")+e}function xg(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 yI(e,t,i,r){const l=xg(i),o=l==='"'?"Quote":"Apostrophe",c=i.enter("definition");let f=i.enter("label");const d=i.createTracker(r);let h=d.move("[");return h+=d.move(i.safe(i.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(i.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=i.enter("destinationRaw"),h+=d.move(i.safe(e.url,{before:h,after:e.title?" ":`
473
+ `,...d.current()}))),f(),e.title&&(f=i.enter(`title${o}`),h+=d.move(" "+l),h+=d.move(i.safe(e.title,{before:h,after:l,...d.current()})),h+=d.move(l),f()),c(),h}function xI(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 lc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Tf(e,t,i){const r=Al(e),l=Al(t);return r===void 0?l===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}$S.peek=vI;function $S(e,t,i,r){const l=xI(i),o=i.enter("emphasis"),c=i.createTracker(r),f=c.move(l);let d=c.move(i.containerPhrasing(e,{after:l,before:f,...c.current()}));const h=d.charCodeAt(0),y=Tf(r.before.charCodeAt(r.before.length-1),h,l);y.inside&&(d=lc(h)+d.slice(1));const m=d.charCodeAt(d.length-1),v=Tf(r.after.charCodeAt(0),m,l);v.inside&&(d=d.slice(0,-1)+lc(m));const x=c.move(l);return o(),i.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},f+d+x}function vI(e,t,i){return i.options.emphasis||"*"}function EI(e,t){let i=!1;return Wf(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,pm}),!!((!e.depth||e.depth<3)&&ug(e)&&(t.options.setext||i))}function SI(e,t,i,r){const l=Math.max(Math.min(6,e.depth||1),1),o=i.createTracker(r);if(EI(e,i)){const y=i.enter("headingSetext"),m=i.enter("phrasing"),v=i.containerPhrasing(e,{...o.current(),before:`
474
+ `,after:`
475
+ `});return m(),y(),v+`
476
+ `+(l===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
477
+ `))+1))}const c="#".repeat(l),f=i.enter("headingAtx"),d=i.enter("phrasing");o.move(c+" ");let h=i.containerPhrasing(e,{before:"# ",after:`
478
+ `,...o.current()});return/^[\t ]/.test(h)&&(h=lc(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,i.options.closeAtx&&(h+=" "+c),d(),f(),h}qS.peek=_I;function qS(e){return e.value||""}function _I(){return"<"}HS.peek=wI;function HS(e,t,i,r){const l=xg(i),o=l==='"'?"Quote":"Apostrophe",c=i.enter("image");let f=i.enter("label");const d=i.createTracker(r);let h=d.move("![");return h+=d.move(i.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(i.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=i.enter("destinationRaw"),h+=d.move(i.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=i.enter(`title${o}`),h+=d.move(" "+l),h+=d.move(i.safe(e.title,{before:h,after:l,...d.current()})),h+=d.move(l),f()),h+=d.move(")"),c(),h}function wI(){return"!"}KS.peek=kI;function KS(e,t,i,r){const l=e.referenceType,o=i.enter("imageReference");let c=i.enter("label");const f=i.createTracker(r);let d=f.move("![");const h=i.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const m=i.safe(i.associationId(e),{before:d,after:"]",...f.current()});return c(),i.stack=y,o(),l==="full"||!h||h!==m?d+=f.move(m+"]"):l==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function kI(){return"!"}GS.peek=NI;function GS(e,t,i){let r=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(r);)l+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<i.unsafe.length;){const c=i.unsafe[o],f=i.compilePattern(c);let d;if(c.atBreak)for(;d=f.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return l+r+l}function NI(){return"`"}function YS(e,t){const i=ug(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}QS.peek=TI;function QS(e,t,i,r){const l=xg(i),o=l==='"'?"Quote":"Apostrophe",c=i.createTracker(r);let f,d;if(YS(e,i)){const y=i.stack;i.stack=[],f=i.enter("autolink");let m=c.move("<");return m+=c.move(i.containerPhrasing(e,{before:m,after:">",...c.current()})),m+=c.move(">"),f(),i.stack=y,m}f=i.enter("link"),d=i.enter("label");let h=c.move("[");return h+=c.move(i.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=i.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(i.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(d=i.enter("destinationRaw"),h+=c.move(i.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=i.enter(`title${o}`),h+=c.move(" "+l),h+=c.move(i.safe(e.title,{before:h,after:l,...c.current()})),h+=c.move(l),d()),h+=c.move(")"),f(),h}function TI(e,t,i){return YS(e,i)?"<":"["}VS.peek=CI;function VS(e,t,i,r){const l=e.referenceType,o=i.enter("linkReference");let c=i.enter("label");const f=i.createTracker(r);let d=f.move("[");const h=i.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const m=i.safe(i.associationId(e),{before:d,after:"]",...f.current()});return c(),i.stack=y,o(),l==="full"||!h||h!==m?d+=f.move(m+"]"):l==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function CI(){return"["}function vg(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 AI(e){const t=vg(e),i=e.options.bulletOther;if(!i)return t==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+i+"`) to be different");return i}function OI(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 XS(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 RI(e,t,i,r){const l=i.enter("list"),o=i.bulletCurrent;let c=e.ordered?OI(i):vg(i);const f=e.ordered?c==="."?")":".":AI(i);let d=t&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(d=!0),XS(i)===c&&y){let m=-1;for(;++m<e.children.length;){const v=e.children[m];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=f),i.bulletCurrent=c;const h=i.containerFlow(e,r);return i.bulletLastUsed=c,i.bulletCurrent=o,l(),h}function MI(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 DI(e,t,i,r){const l=MI(i);let o=i.bulletCurrent||vg(i);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(i.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=i.createTracker(r);f.move(o+" ".repeat(c-o.length)),f.shift(c);const d=i.enter("listItem"),h=i.indentLines(i.containerFlow(e,f.current()),y);return d(),h;function y(m,v,x){return v?(x?"":" ".repeat(c))+m:(x?o:o+" ".repeat(c-o.length))+m}}function LI(e,t,i,r){const l=i.enter("paragraph"),o=i.enter("phrasing"),c=i.containerPhrasing(e,r);return o(),l(),c}const jI=_c(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function II(e,t,i,r){return(e.children.some(function(c){return jI(c)})?i.containerPhrasing:i.containerFlow).call(i,e,r)}function zI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ZS.peek=BI;function ZS(e,t,i,r){const l=zI(i),o=i.enter("strong"),c=i.createTracker(r),f=c.move(l+l);let d=c.move(i.containerPhrasing(e,{after:l,before:f,...c.current()}));const h=d.charCodeAt(0),y=Tf(r.before.charCodeAt(r.before.length-1),h,l);y.inside&&(d=lc(h)+d.slice(1));const m=d.charCodeAt(d.length-1),v=Tf(r.after.charCodeAt(0),m,l);v.inside&&(d=d.slice(0,-1)+lc(m));const x=c.move(l+l);return o(),i.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},f+d+x}function BI(e,t,i){return i.options.strong||"*"}function UI(e,t,i,r){return i.safe(e.value,r)}function FI(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 PI(e,t,i){const r=(XS(i)+(i.options.ruleSpaces?" ":"")).repeat(FI(i));return i.options.ruleSpaces?r.slice(0,-1):r}const WS={blockquote:uI,break:M0,code:gI,definition:yI,emphasis:$S,hardBreak:M0,heading:SI,html:qS,image:HS,imageReference:KS,inlineCode:GS,link:QS,linkReference:VS,list:RI,listItem:DI,paragraph:LI,root:II,strong:ZS,text:UI,thematicBreak:PI};function $I(){return{enter:{table:qI,tableData:D0,tableHeader:D0,tableRow:KI},exit:{codeText:GI,table:HI,tableData:Lp,tableHeader:Lp,tableRow:Lp}}}function qI(e){const t=e._align;this.enter({type:"table",align:t.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function HI(e){this.exit(e),this.data.inTable=void 0}function KI(e){this.enter({type:"tableRow",children:[]},e)}function Lp(e){this.exit(e)}function D0(e){this.enter({type:"tableCell",children:[]},e)}function GI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,YI));const i=this.stack[this.stack.length-1];i.type,i.value=t,this.exit(e)}function YI(e,t){return t==="|"?t:e}function QI(e){const t=e||{},i=t.tableCellPadding,r=t.tablePipeAlign,l=t.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
479
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:d,tableRow:f}};function c(x,S,_,w){return h(y(x,_,w),x.align)}function f(x,S,_,w){const k=m(x,_,w),O=h([k]);return O.slice(0,O.indexOf(`
480
+ `))}function d(x,S,_,w){const k=_.enter("tableCell"),O=_.enter("phrasing"),A=_.containerPhrasing(x,{...w,before:o,after:o});return O(),k(),A}function h(x,S){return oI(x,{align:S,alignDelimiters:r,padding:i,stringLength:l})}function y(x,S,_){const w=x.children;let k=-1;const O=[],A=S.enter("table");for(;++k<w.length;)O[k]=m(w[k],S,_);return A(),O}function m(x,S,_){const w=x.children;let k=-1;const O=[],A=S.enter("tableRow");for(;++k<w.length;)O[k]=d(w[k],x,S,_);return A(),O}function v(x,S,_){let w=WS.inlineCode(x,S,_);return _.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function VI(){return{exit:{taskListCheckValueChecked:L0,taskListCheckValueUnchecked:L0,paragraph:ZI}}}function XI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:WI}}}function L0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ZI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const l=t.children;let o=-1,c;for(;++o<l.length;){const f=l[o];if(f.type==="paragraph"){c=f;break}}c===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function WI(e,t,i,r){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=i.createTracker(r);o&&f.move(c);let d=WS.listItem(e,t,i,{...r,...f.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(y){return y+c}}function JI(){return[Rj(),Wj(),nI(),$I(),VI()]}function e3(e){return{extensions:[Mj(),Jj(e),iI(),QI(e),XI()]}}const t3={tokenize:l3,partial:!0},JS={tokenize:o3,partial:!0},e_={tokenize:c3,partial:!0},t_={tokenize:u3,partial:!0},n3={tokenize:f3,partial:!0},n_={name:"wwwAutolink",tokenize:r3,previous:a_},i_={name:"protocolAutolink",tokenize:s3,previous:r_},Ta={name:"emailAutolink",tokenize:a3,previous:s_},Vi={};function i3(){return{text:Vi}}let Qr=48;for(;Qr<123;)Vi[Qr]=Ta,Qr++,Qr===58?Qr=65:Qr===91&&(Qr=97);Vi[43]=Ta;Vi[45]=Ta;Vi[46]=Ta;Vi[95]=Ta;Vi[72]=[Ta,i_];Vi[104]=[Ta,i_];Vi[87]=[Ta,n_];Vi[119]=[Ta,n_];function a3(e,t,i){const r=this;let l,o;return c;function c(m){return!ym(m)||!s_.call(r,r.previous)||Eg(r.events)?i(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(m))}function f(m){return ym(m)?(e.consume(m),f):m===64?(e.consume(m),d):i(m)}function d(m){return m===46?e.check(n3,y,h)(m):m===45||m===95||pn(m)?(o=!0,e.consume(m),d):y(m)}function h(m){return e.consume(m),l=!0,d}function y(m){return o&&l&&kn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):i(m)}}function r3(e,t,i){const r=this;return l;function l(c){return c!==87&&c!==119||!a_.call(r,r.previous)||Eg(r.events)?i(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(t3,e.attempt(JS,e.attempt(e_,o),i),i)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function s3(e,t,i){const r=this;let l="",o=!1;return c;function c(m){return(m===72||m===104)&&r_.call(r,r.previous)&&!Eg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(m),e.consume(m),f):i(m)}function f(m){if(kn(m)&&l.length<5)return l+=String.fromCodePoint(m),e.consume(m),f;if(m===58){const v=l.toLowerCase();if(v==="http"||v==="https")return e.consume(m),d}return i(m)}function d(m){return m===47?(e.consume(m),o?h:(o=!0,d)):i(m)}function h(m){return m===null||wf(m)||yt(m)||us(m)||Qf(m)?i(m):e.attempt(JS,e.attempt(e_,y),i)(m)}function y(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function l3(e,t,i){let r=0;return l;function l(c){return(c===87||c===119)&&r<3?(r++,e.consume(c),l):c===46&&r===3?(e.consume(c),o):i(c)}function o(c){return c===null?i(c):t(c)}}function o3(e,t,i){let r,l,o;return c;function c(h){return h===46||h===95?e.check(t_,d,f)(h):h===null||yt(h)||us(h)||h!==45&&Qf(h)?d(h):(o=!0,e.consume(h),c)}function f(h){return h===95?r=!0:(l=r,r=void 0),e.consume(h),c}function d(h){return l||r||!o?i(h):t(h)}}function c3(e,t){let i=0,r=0;return l;function l(c){return c===40?(i++,e.consume(c),l):c===41&&r<i?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(t_,t,o)(c):c===null||yt(c)||us(c)?t(c):(e.consume(c),l)}function o(c){return c===41&&r++,e.consume(c),l}}function u3(e,t,i){return r;function r(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),r):f===38?(e.consume(f),o):f===93?(e.consume(f),l):f===60||f===null||yt(f)||us(f)?t(f):i(f)}function l(f){return f===null||f===40||f===91||yt(f)||us(f)?t(f):r(f)}function o(f){return kn(f)?c(f):i(f)}function c(f){return f===59?(e.consume(f),r):kn(f)?(e.consume(f),c):i(f)}}function f3(e,t,i){return r;function r(o){return e.consume(o),l}function l(o){return pn(o)?i(o):t(o)}}function a_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function r_(e){return!kn(e)}function s_(e){return!(e===47||ym(e))}function ym(e){return e===43||e===45||e===46||e===95||pn(e)}function Eg(e){let t=e.length,i=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const d3={tokenize:v3,partial:!0};function h3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:b3,continuation:{tokenize:y3},exit:x3}},text:{91:{name:"gfmFootnoteCall",tokenize:g3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:p3,resolveTo:m3}}}}function p3(e,t,i){const r=this;let l=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;l--;){const d=r.events[l][1];if(d.type==="labelImage"){c=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!c||!c._balanced)return i(d);const h=Oi(r.sliceSerialize({start:c.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?i(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function m3(e,t){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[i+1],e[i+2],["enter",r,t],e[i+3],e[i+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(i,e.length-i+1,...f),e}function g3(e,t,i){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,c;return f;function f(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?i(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(o>999||m===93&&!c||m===null||m===91||yt(m))return i(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return l.includes(Oi(r.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):i(m)}return yt(m)||(c=!0),o++,e.consume(m),m===92?y:h}function y(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}}function b3(e,t,i){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,c=0,f;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):i(S)}function y(S){if(c>999||S===93&&!f||S===null||S===91||yt(S))return i(S);if(S===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return o=Oi(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return yt(S)||(f=!0),c++,e.consume(S),S===92?m:y}function m(S){return S===91||S===92||S===93?(e.consume(S),c++,y):y(S)}function v(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),l.includes(o)||l.push(o),Je(e,x,"gfmFootnoteDefinitionWhitespace")):i(S)}function x(S){return t(S)}}function y3(e,t,i){return e.check(Sc,t,e.attempt(d3,t,i))}function x3(e){e.exit("gfmFootnoteDefinition")}function v3(e,t,i){const r=this;return Je(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):i(o)}}function E3(e){let i=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:l};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function l(c,f){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let h=d;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[d][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[d][1].end)},m={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[d][1].start)},v=[["enter",y,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",m,f]],x=f.parser.constructs.insideSpan.null;x&&ti(v,v.length,0,Vf(x,c.slice(h+1,d),f)),ti(v,v.length,0,[["exit",m,f],["enter",c[d][1],f],["exit",c[d][1],f],["exit",y,f]]),ti(c,h-1,d-h+3,v),d=h+v.length-2;break}}for(d=-1;++d<c.length;)c[d][1].type==="strikethroughSequenceTemporary"&&(c[d][1].type="data");return c}function o(c,f,d){const h=this.previous,y=this.events;let m=0;return v;function v(S){return h===126&&y[y.length-1][1].type!=="characterEscape"?d(S):(c.enter("strikethroughSequenceTemporary"),x(S))}function x(S){const _=Al(h);if(S===126)return m>1?d(S):(c.consume(S),m++,x);if(m<2&&!i)return d(S);const w=c.exit("strikethroughSequenceTemporary"),k=Al(S);return w._open=!k||k===2&&!!_,w._close=!_||_===2&&!!k,f(S)}}}class S3{constructor(){this.map=[]}add(t,i,r){_3(this,t,i,r)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(t.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),t.length=this.map[i][0];r.push(t.slice()),t.length=0;let l=r.pop();for(;l;){for(const o of l)t.push(o);l=r.pop()}this.map.length=0}}function _3(e,t,i,r){let l=0;if(!(i===0&&r.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=i,e.map[l][2].push(...r);return}l+=1}e.map.push([t,i,r])}}function w3(e,t){let i=!1;const r=[];for(;t<e.length;){const l=e[t];if(i){if(l[0]==="enter")l[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(i=!0);t+=1}return r}function k3(){return{flow:{null:{name:"table",tokenize:N3,resolveAll:T3}}}}function N3(e,t,i){const r=this;let l=0,o=0,c;return f;function f(D){let $=r.events.length-1;for(;$>-1;){const ae=r.events[$][1].type;if(ae==="lineEnding"||ae==="linePrefix")$--;else break}const Q=$>-1?r.events[$][1].type:null,se=Q==="tableHead"||Q==="tableRow"?T:d;return se===T&&r.parser.lazy[r.now().line]?i(D):se(D)}function d(D){return e.enter("tableHead"),e.enter("tableRow"),h(D)}function h(D){return D===124||(c=!0,o+=1),y(D)}function y(D){return D===null?i(D):Te(D)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),x):i(D):Ge(D)?Je(e,y,"whitespace")(D):(o+=1,c&&(c=!1,l+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),m(D)))}function m(D){return D===null||D===124||yt(D)?(e.exit("data"),y(D)):(e.consume(D),D===92?v:m)}function v(D){return D===92||D===124?(e.consume(D),m):m(D)}function x(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(D):(e.enter("tableDelimiterRow"),c=!1,Ge(D)?Je(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):S(D))}function S(D){return D===45||D===58?w(D):D===124?(c=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),_):q(D)}function _(D){return Ge(D)?Je(e,w,"whitespace")(D):w(D)}function w(D){return D===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),k):D===45?(o+=1,k(D)):D===null||Te(D)?I(D):q(D)}function k(D){return D===45?(e.enter("tableDelimiterFiller"),O(D)):q(D)}function O(D){return D===45?(e.consume(D),O):D===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(D))}function A(D){return Ge(D)?Je(e,I,"whitespace")(D):I(D)}function I(D){return D===124?S(D):D===null||Te(D)?!c||l!==o?q(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):q(D)}function q(D){return i(D)}function T(D){return e.enter("tableRow"),P(D)}function P(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),P):D===null||Te(D)?(e.exit("tableRow"),t(D)):Ge(D)?Je(e,P,"whitespace")(D):(e.enter("data"),j(D))}function j(D){return D===null||D===124||yt(D)?(e.exit("data"),P(D)):(e.consume(D),D===92?X:j)}function X(D){return D===92||D===124?(e.consume(D),j):j(D)}}function T3(e,t){let i=-1,r=!0,l=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,d=0,h,y,m;const v=new S3;for(;++i<e.length;){const x=e[i],S=x[1];x[0]==="enter"?S.type==="tableHead"?(f=!1,d!==0&&(j0(v,t,d,h,y),y=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(i,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],c=[0,i+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(i,0,[["enter",y,t]])),l=S.type==="tableDelimiterRow"?2:y?3:1):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],m=Ju(v,t,o,l,void 0,m),o=[0,0,0,0]),c[2]=i)):S.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(c[0]=c[1],m=Ju(v,t,o,l,void 0,m)),o=c,c=[o[1],i,0,0])):S.type==="tableHead"?(f=!0,d=i):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=i,o[1]!==0?(c[0]=c[1],m=Ju(v,t,o,l,i,m)):c[1]!==0&&(m=Ju(v,t,c,l,i,m)),l=0):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=i)}for(d!==0&&j0(v,t,d,h,y),v.consume(t.events),i=-1;++i<t.events.length;){const x=t.events[i];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=w3(t.events,i))}return e}function Ju(e,t,i,r,l,o){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(o.end=Object.assign({},rl(t.events,i[0])),e.add(i[0],0,[["exit",o,t]]));const d=rl(t.events,i[1]);if(o={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(i[1],0,[["enter",o,t]]),i[2]!==0){const h=rl(t.events,i[2]),y=rl(t.events,i[3]),m={type:f,start:Object.assign({},h),end:Object.assign({},y)};if(e.add(i[2],0,[["enter",m,t]]),r!==2){const v=t.events[i[2]],x=t.events[i[3]];if(v[1].end=Object.assign({},x[1].end),v[1].type="chunkText",v[1].contentType="text",i[3]>i[2]+1){const S=i[2]+1,_=i[3]-i[2]-1;e.add(S,_,[])}}e.add(i[3]+1,0,[["exit",m,t]])}return l!==void 0&&(o.end=Object.assign({},rl(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function j0(e,t,i,r,l){const o=[],c=rl(t.events,i);l&&(l.end=Object.assign({},c),o.push(["exit",l,t])),r.end=Object.assign({},c),o.push(["exit",r,t]),e.add(i+1,0,o)}function rl(e,t){const i=e[t],r=i[0]==="enter"?"start":"end";return i[1][r]}const C3={name:"tasklistCheck",tokenize:O3};function A3(){return{text:{91:C3}}}function O3(e,t,i){const r=this;return l;function l(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return yt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),c):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),c):i(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(d)}function f(d){return Te(d)?t(d):Ge(d)?e.check({tokenize:R3},t,i)(d):i(d)}}function R3(e,t,i){return Je(e,r,"whitespace");function r(l){return l===null?i(l):t(l)}}function M3(e){return bS([i3(),h3(),E3(e),k3(),A3()])}const D3={};function Sg(e){const t=this,i=e||D3,r=t.data(),l=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);l.push(M3(i)),o.push(JI()),c.push(e3(i))}const I0=(function(e,t,i){const r=_c(i);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),ms=(function(e){if(e==null)return I3;if(typeof e=="string")return j3(e);if(typeof e=="object")return L3(e);if(typeof e=="function")return _g(e);throw new Error("Expected function, string, or array as `test`")});function L3(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=ms(e[i]);return _g(r);function r(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function j3(e){return _g(t);function t(i){return i.tagName===e}}function _g(e){return t;function t(i,r,l){return!!(z3(i)&&e.call(this,i,typeof r=="number"?r:void 0,l||void 0))}}function I3(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function z3(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const z0=/\n/g,B0=/[\t ]+/g,xm=ms("br"),U0=ms(K3),B3=ms("p"),F0=ms("tr"),U3=ms(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",H3,G3]),l_=ms(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function F3(e,t){const i=t||{},r="children"in e?e.children:[],l=l_(e),o=u_(e,{whitespace:i.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...c_(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<r.length;)c.push(...o_(r[f],e,{whitespace:o,breakBefore:f?void 0:l,breakAfter:f<r.length-1?xm(r[f+1]):l}));const d=[];let h;for(f=-1;++f<c.length;){const y=c[f];typeof y=="number"?h!==void 0&&y>h&&(h=y):y&&(h!==void 0&&h>-1&&d.push(`
481
+ `.repeat(h)||" "),h=-1,d.push(y))}return d.join("")}function o_(e,t,i){return e.type==="element"?P3(e,t,i):e.type==="text"?i.whitespace==="normal"?c_(e,i):$3(e):[]}function P3(e,t,i){const r=u_(e,i),l=e.children||[];let o=-1,c=[];if(U3(e))return c;let f,d;for(xm(e)||F0(e)&&I0(t,e,F0)?d=`
482
+ `:B3(e)?(f=2,d=2):l_(e)&&(f=1,d=1);++o<l.length;)c=c.concat(o_(l[o],e,{whitespace:r,breakBefore:o?void 0:f,breakAfter:o<l.length-1?xm(l[o+1]):d}));return U0(e)&&I0(t,e,U0)&&c.push(" "),f&&c.unshift(f),d&&c.push(d),c}function c_(e,t){const i=String(e.value),r=[],l=[];let o=0;for(;o<=i.length;){z0.lastIndex=o;const d=z0.exec(i),h=d&&"index"in d?d.index:i.length;r.push(q3(i.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,h===i.length?t.breakAfter:!0)),o=h+1}let c=-1,f;for(;++c<r.length;)r[c].charCodeAt(r[c].length-1)===8203||c<r.length-1&&r[c+1].charCodeAt(0)===8203?(l.push(r[c]),f=void 0):r[c]?(typeof f=="number"&&l.push(f),l.push(r[c]),f=0):(c===0||c===r.length-1)&&l.push(0);return l}function $3(e){return[String(e.value)]}function q3(e,t,i){const r=[];let l=0,o;for(;l<e.length;){B0.lastIndex=l;const c=B0.exec(e);o=c?c.index:e.length,!l&&!o&&c&&!t&&r.push(""),l!==o&&r.push(e.slice(l,o)),l=c?o+c[0].length:o}return l!==o&&!i&&r.push(""),r.join(" ")}function u_(e,t){if(e.type==="element"){const i=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return i.wrap?"pre-wrap":"pre";case"td":case"th":return i.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function H3(e){return!!(e.properties||{}).hidden}function K3(e){return e.tagName==="td"||e.tagName==="th"}function G3(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Y3(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+r+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},y={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},x=t.optional(l)+e.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],I={type:_,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},q={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[q,m,f,i,e.C_BLOCK_COMMENT_MODE,y,h],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:I,contains:T.concat([{begin:/\(/,end:/\)/,keywords:I,contains:T.concat(["self"]),relevance:0}]),relevance:0},j={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:I,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:I,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,i,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:I,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,j,q,T,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:I,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:I},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Q3(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},i=Y3(e),r=i.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,i.name="Arduino",i.aliases=["ino"],i.supersetOf="cpp",i}function V3(e){const t=e.regex,i={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,l]};l.contains.push(f);const d={match:/\\"/},h={className:"string",begin:/'/,end:/'/},y={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,i]},v=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],x=e.SHEBANG({binary:`(${v.join("|")})`,relevance:10}),S={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},_=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],w=["true","false"],k={match:/(\/[a-z._-]+)+/},O=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],I=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],q=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:_,literal:w,built_in:[...O,...A,"set","shopt",...I,...q]},contains:[x,e.SHEBANG(),S,m,o,c,k,f,d,h,y,i]}}function X3(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="("+r+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},y={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},x=t.optional(l)+e.IDENT_RE+"\\s*\\(",w={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},k=[m,f,i,e.C_BLOCK_COMMENT_MODE,y,h],O={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:k.concat([{begin:/\(/,end:/\)/,keywords:w,contains:k.concat(["self"]),relevance:0}]),relevance:0},A={begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:w,relevance:0},{begin:x,returnBegin:!0,contains:[e.inherit(v,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,i,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:w,disableAutodetect:!0,illegal:"</",contains:[].concat(O,A,k,[m,{begin:e.IDENT_RE+"::",keywords:w},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:h,keywords:w}}}function Z3(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+r+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},y={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},x=t.optional(l)+e.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],I={type:_,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},q={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[q,m,f,i,e.C_BLOCK_COMMENT_MODE,y,h],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:I,contains:T.concat([{begin:/\(/,end:/\)/,keywords:I,contains:T.concat(["self"]),relevance:0}]),relevance:0},j={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:I,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:I,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,i,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:I,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,j,q,T,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:I,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:I},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function W3(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],i=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],l=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:l.concat(o),built_in:t,literal:r},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},h={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},y={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(y,{illegal:/\n/}),v={className:"subst",begin:/\{/,end:/\}/,keywords:c},x=e.inherit(v,{illegal:/\n/}),S={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,x]},_={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]},w=e.inherit(_,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]});v.contains=[_,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],x.contains=[w,S,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const k={variants:[h,_,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},O={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},A=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",I={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},k,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+A+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:i.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,O],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[k,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},I]}}const J3=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),ez=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],tz=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],nz=[...ez,...tz],iz=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),az=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),rz=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),sz=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function lz(e){const t=e.regex,i=J3(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[i.BLOCK_COMMENT,r,i.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+az.join("|")+")"},{begin:":(:)?("+rz.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+sz.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},i.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:iz.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+nz.join("|")+")\\b"}]}}function oz(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function cz(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function uz(e){const t=e.regex,i=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(i,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function fz(e){const t=e.regex,i={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[r,o,l,c,i,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,y=/'[^']*'/,m=t.either(d,h,y),v=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:v,className:"attr",starts:{end:/$/,contains:[r,f,o,l,c,i]}}]}}var sl="[0-9](_*[0-9])*",ef=`\\.(${sl})`,tf="[0-9a-fA-F](_*[0-9a-fA-F])*",P0={className:"number",variants:[{begin:`(\\b(${sl})((${ef})|\\.)?|(${ef}))[eE][+-]?(${sl})[fFdD]?\\b`},{begin:`\\b(${sl})((${ef})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ef})[fFdD]?\\b`},{begin:`\\b(${sl})[fFdD]\\b`},{begin:`\\b0[xX]((${tf})\\.?|(${tf})?\\.(${tf}))[pP][+-]?(${sl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${tf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function f_(e,t,i){return i===-1?"":e.replace(t,r=>f_(e,t,i-1))}function dz(e){const t=e.regex,i="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=i+f_("(?:<"+i+"~~~(?:\\s*,\\s*"+i+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},h={className:"meta",begin:"@"+i,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},y={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,i),/\s+/,i,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,i],className:{1:"keyword",3:"title.class"},contains:[y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,P0,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},P0,h]}}const $0="[A-Za-z$_][0-9A-Za-z$_]*",hz=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],pz=["true","false","null","undefined","NaN","Infinity"],d_=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],h_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],p_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],mz=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],gz=[].concat(p_,d_,h_);function bz(e){const t=e.regex,i=(ce,{after:Se})=>{const R="</"+ce[0].slice(1);return ce.input.indexOf(R,Se)!==-1},r=$0,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ce,Se)=>{const R=ce[0].length+ce.index,z=ce.input[R];if(z==="<"||z===","){Se.ignoreMatch();return}z===">"&&(i(ce,{after:R})||Se.ignoreMatch());let W;const C=ce.input.substring(R);if(W=C.match(/^\s*=/)){Se.ignoreMatch();return}if((W=C.match(/^\s+extends\s+/))&&W.index===0){Se.ignoreMatch();return}}},f={$pattern:$0,keyword:hz,literal:pz,built_in:gz,"variable.language":mz},d="[0-9](_?[0-9])*",h=`\\.(${d})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${y})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${y})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},O={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,S,_,w,{match:/\$\d+/},m];v.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const I=[].concat(O,v.contains),q=I.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(I)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:q},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},j={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...d_,...h_]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},$={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Q(ce){return t.concat("(?!",ce.join("|"),")")}const se={match:t.concat(/\b/,Q([...p_,"super","import"].map(ce=>`${ce}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ae={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},J={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},K="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",le={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(K)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:q,CLASS_REFERENCE:j},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,S,_,w,O,{match:/\$\d+/},m,j,{scope:"attr",match:r+t.lookahead(":"),relevance:0},le,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,e.REGEXP_MODE,{className:"function",begin:K,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:q}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ae,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},se,$,P,J,{match:/\$[(.]/}]}}function yz(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},i={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],l={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,i,e.QUOTE_STRING_MODE,l,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var ll="[0-9](_*[0-9])*",nf=`\\.(${ll})`,af="[0-9a-fA-F](_*[0-9a-fA-F])*",xz={className:"number",variants:[{begin:`(\\b(${ll})((${nf})|\\.)?|(${nf}))[eE][+-]?(${ll})[fFdD]?\\b`},{begin:`\\b(${ll})((${nf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${nf})[fFdD]?\\b`},{begin:`\\b(${ll})[fFdD]\\b`},{begin:`\\b0[xX]((${af})\\.?|(${af})?\\.(${af}))[pP][+-]?(${ll})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${af})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function vz(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},i={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},l={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,l]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,l]}]};l.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},h=xz,y=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},v=m;return v.variants[1].contains=[m],m.variants[1].contains=[v],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,y,i,r,f,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,y],relevance:0},e.C_LINE_COMMENT_MODE,y,f,d,c,e.C_NUMBER_MODE]},y]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,d]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
483
+ `},h]}}const Ez=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Sz=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],_z=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],wz=[...Sz,..._z],kz=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),m_=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),g_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Nz=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),Tz=m_.concat(g_).sort().reverse();function Cz(e){const t=Ez(e),i=Tz,r="and or not only",l="[\\w-]+",o="("+l+"|@\\{"+l+"\\})",c=[],f=[],d=function(A){return{className:"string",begin:"~?"+A+".*?"+A}},h=function(A,I,q){return{className:A,begin:I,relevance:q}},y={$pattern:/[a-z-]+/,keyword:r,attribute:kz.join(" ")},m={begin:"\\(",end:"\\)",contains:f,keywords:y,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,h("variable","@@?"+l,10),h("variable","@\\{"+l+"\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:l+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const v=f.concat({begin:/\{/,end:/\}/,contains:c}),x={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},S={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Nz.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},_={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:y,returnEnd:!0,contains:f,relevance:0}},w={className:"variable",variants:[{begin:"@"+l+"\\s*:",relevance:15},{begin:"@"+l}],starts:{end:"[;}]",returnEnd:!0,contains:v}},k={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,x,h("keyword","all\\b"),h("variable","@\\{"+l+"\\}"),{begin:"\\b("+wz.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,h("selector-tag",o,0),h("selector-id","#"+o),h("selector-class","\\."+o,0),h("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+m_.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+g_.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:v},{begin:"!important"},t.FUNCTION_DISPATCH]},O={begin:l+`:(:)?(${i.join("|")})`,returnBegin:!0,contains:[k]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,_,w,O,S,k,x,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function Az(e){const t="\\[=*\\[",i="\\]=*\\]",r={begin:t,end:i,contains:["self"]},l=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,i,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:l.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:l}].concat(l)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:i,contains:[r],relevance:5}])}}function Oz(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},i={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,i]},l={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,i,r,l,o,c]}}function Rz(e){const t=e.regex,i={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},h={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},y={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(h,{contains:[]}),v=e.inherit(y,{contains:[]});h.contains.push(v),y.contains.push(m);let x=[i,d];return[h,y,m,v].forEach(k=>{k.contains=k.contains.concat(x)}),x=x.concat(h,y),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:x},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:x}]}]},i,o,h,y,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},l,r,d,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Mz(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:i,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:i,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function Dz(e){const t=e.regex,i=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,l={$pattern:/[\w.]+/,keyword:i.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:l},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},h={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},y=[e.BACKSLASH_ESCAPE,o,d],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],v=(_,w,k="\\1")=>{const O=k==="\\1"?k:t.concat(k,w);return t.concat(t.concat("(?:",_,")"),w,/(?:\\.|[^\\\/])*?/,O,/(?:\\.|[^\\\/])*?/,k,r)},x=(_,w,k)=>t.concat(t.concat("(?:",_,")"),w,/(?:\\.|[^\\\/])*?/,k,r),S=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:y,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},h,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:v("s|tr|y",t.either(...m,{capture:!0}))},{begin:v("s|tr|y","\\(","\\)")},{begin:v("s|tr|y","\\[","\\]")},{begin:v("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:x("(?:m|qr)?",/\//,/\//)},{begin:x("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:x("m|qr",/\(/,/\)/)},{begin:x("m|qr",/\[/,/\]/)},{begin:x("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,h]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=S,c.contains=S,{name:"Perl",aliases:["pl","pm"],keywords:l,contains:S}}function Lz(e){const t=e.regex,i=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,i),l=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,i),o=t.concat(/[A-Z]+/,i),c={scope:"variable",match:"\\$+"+r},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=e.inherit(e.APOS_STRING_MODE,{illegal:null}),y=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(ae,J)=>{J.data._beginMatch=ae[1]||ae[2]},"on:end":(ae,J)=>{J.data._beginMatch!==ae[1]&&J.ignoreMatch()}},v=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),x=`[
484
+ ]`,S={scope:"string",variants:[y,h,m,v]},_={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},w=["false","null","true"],k=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],O=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],I={keyword:k,literal:(ae=>{const J=[];return ae.forEach(K=>{J.push(K),K.toLowerCase()===K?J.push(K.toUpperCase()):J.push(K.toLowerCase())}),J})(w),built_in:O},q=ae=>ae.map(J=>J.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,t.concat(x,"+"),t.concat("(?!",q(O).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},P=t.concat(r,"\\b(?!\\()"),j={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{1:"title.class",3:"variable.constant"}},{match:[l,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},X={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},D={relevance:0,begin:/\(/,end:/\)/,keywords:I,contains:[X,c,j,e.C_BLOCK_COMMENT_MODE,S,_,T]},$={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",q(k).join("\\b|"),"|",q(O).join("\\b|"),"\\b)"),r,t.concat(x,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[D]};D.contains.push($);const Q=[X,j,e.C_BLOCK_COMMENT_MODE,S,_,T],se={begin:t.concat(/#\[\s*\\?/,t.either(l,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:w,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:w,keyword:["new","array"]},contains:["self",...Q]},...Q,{scope:"meta",variants:[{match:l},{match:o}]}]};return{case_insensitive:!1,keywords:I,contains:[se,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,$,j,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},T,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:I,contains:["self",se,c,j,e.C_BLOCK_COMMENT_MODE,S,_]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},S,_]}}function jz(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Iz(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function zz(e){const t=e.regex,i=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},y={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,y,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,y,h]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,y,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,y,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},v="[0-9](_?[0-9])*",x=`(\\b(${v}))?\\.(${v})|\\b(${v})\\.`,S=`\\b|${r.join("|")}`,_={className:"number",relevance:0,variants:[{begin:`(\\b(${v})|(${x}))[eE][+-]?(${v})[jJ]?(?=${S})`},{begin:`(${x})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${S})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${S})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${S})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${S})`},{begin:`\\b(${v})[jJ](?=${S})`}]},w={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},k={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",d,_,m,e.HASH_COMMENT_MODE]}]};return h.contains=[m,_,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[d,_,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,w,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[k]},{variants:[{match:[/\bclass/,/\s+/,i,/\s*/,/\(\s*/,i,/\s*\)/]},{match:[/\bclass/,/\s+/,i]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[_,k,m]}]}}function Bz(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Uz(e){const t=e.regex,i=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),l=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:i,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:i},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[l,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[i,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:l},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Fz(e){const t=e.regex,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=t.concat(r,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},h=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],y={className:"subst",begin:/#\{/,end:/\}/,keywords:c},m={className:"string",contains:[e.BACKSLASH_ESCAPE,y],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,y]})]}]},v="[1-9](_?[0-9])*|0",x="[0-9](_?[0-9])*",S={className:"number",relevance:0,variants:[{begin:`\\b(${v})(\\.(${x}))?([eE][+-]?(${x})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},_={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},T=[m,{variants:[{match:[/class\s+/,l,/\s+<\s+/,l]},{match:[/\b(class|module)\s+/,l]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:c},{relevance:0,match:[l,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[_]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:i}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,y],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,h),relevance:0}].concat(d,h);y.contains=T,_.contains=T;const D=[{begin:/^\s*=>/,starts:{end:"$",contains:T}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:T}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(D).concat(h).concat(T)}}function Pz(e){const t=e.regex,i=/(r#)?/,r=t.concat(i,e.UNDERSCORE_IDENT_RE),l=t.concat(i,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],h=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],y=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:y,keyword:f,literal:d,built_in:h},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:h,type:y}},{className:"punctuation",begin:"->"},o]}}const $z=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),qz=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Hz=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Kz=[...qz,...Hz],Gz=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Yz=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Qz=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Vz=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Xz(e){const t=$z(e),i=Qz,r=Yz,l="@[a-z-]+",o="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Kz.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+i.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Vz.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:l,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:Gz.join(" ")},contains:[{begin:l,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function Zz(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Wz(e){const t=e.regex,i=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],h=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],y=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],m=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],v=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],x=y,S=[...h,...d].filter(q=>!y.includes(q)),_={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},w={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},k={match:t.concat(/\b/,t.either(...x),/\s*\(/),relevance:0,keywords:{built_in:x}};function O(q){return t.concat(/\b/,t.either(...q.map(T=>T.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:O(v),relevance:0};function I(q,{exceptions:T,when:P}={}){const j=P;return T=T||[],q.map(X=>X.match(/\|\d+$/)||T.includes(X)?X:j(X)?`${X}|0`:X)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:I(S,{when:q=>q.length<3}),literal:o,type:f,built_in:m},contains:[{scope:"type",match:O(c)},A,k,_,r,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,i,w]}}function b_(e){return e?typeof e=="string"?e:e.source:null}function Yo(e){return mt("(?=",e,")")}function mt(...e){return e.map(i=>b_(i)).join("")}function Jz(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Sn(...e){return"("+(Jz(e).capture?"":"?:")+e.map(r=>b_(r)).join("|")+")"}const wg=e=>mt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),eB=["Protocol","Type"].map(wg),q0=["init","self"].map(wg),tB=["Any","Self"],jp=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],H0=["false","nil","true"],nB=["assignment","associativity","higherThan","left","lowerThan","none","right"],iB=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],K0=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],y_=Sn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),x_=Sn(y_,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Ip=mt(y_,x_,"*"),v_=Sn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Cf=Sn(v_,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),$i=mt(v_,Cf,"*"),rf=mt(/[A-Z]/,Cf,"*"),aB=["attached","autoclosure",mt(/convention\(/,Sn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",mt(/objc\(/,$i,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],rB=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function sB(e){const t={match:/\s+/,relevance:0},i=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,i],l={match:[/\./,Sn(...eB,...q0)],className:{2:"keyword"}},o={match:mt(/\./,Sn(...jp)),relevance:0},c=jp.filter(Xe=>typeof Xe=="string").concat(["_|0"]),f=jp.filter(Xe=>typeof Xe!="string").concat(tB).map(wg),d={variants:[{className:"keyword",match:Sn(...f,...q0)}]},h={$pattern:Sn(/\b\w+/,/#\w+/),keyword:c.concat(iB),literal:H0},y=[l,o,d],m={match:mt(/\./,Sn(...K0)),relevance:0},v={className:"built_in",match:mt(/\b/,Sn(...K0),/(?=\()/)},x=[m,v],S={match:/->/,relevance:0},_={className:"operator",relevance:0,variants:[{match:Ip},{match:`\\.(\\.|${x_})+`}]},w=[S,_],k="([0-9]_*)+",O="([0-9a-fA-F]_*)+",A={className:"number",relevance:0,variants:[{match:`\\b(${k})(\\.(${k}))?([eE][+-]?(${k}))?\\b`},{match:`\\b0x(${O})(\\.(${O}))?([pP][+-]?(${k}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},I=(Xe="")=>({className:"subst",variants:[{match:mt(/\\/,Xe,/[0\\tnr"']/)},{match:mt(/\\/,Xe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),q=(Xe="")=>({className:"subst",match:mt(/\\/,Xe,/[\t ]*(?:[\r\n]|\r\n)/)}),T=(Xe="")=>({className:"subst",label:"interpol",begin:mt(/\\/,Xe,/\(/),end:/\)/}),P=(Xe="")=>({begin:mt(Xe,/"""/),end:mt(/"""/,Xe),contains:[I(Xe),q(Xe),T(Xe)]}),j=(Xe="")=>({begin:mt(Xe,/"/),end:mt(/"/,Xe),contains:[I(Xe),T(Xe)]}),X={className:"string",variants:[P(),P("#"),P("##"),P("###"),j(),j("#"),j("##"),j("###")]},D=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],$={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:D},Q=Xe=>{const Si=mt(Xe,/\//),ri=mt(/\//,Xe);return{begin:Si,end:ri,contains:[...D,{scope:"comment",begin:`#(?!.*${ri})`,end:/$/}]}},se={scope:"regexp",variants:[Q("###"),Q("##"),Q("#"),$]},ae={match:mt(/`/,$i,/`/)},J={className:"variable",match:/\$\d+/},K={className:"variable",match:`\\$${Cf}+`},le=[ae,J,K],ce={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:rB,contains:[...w,A,X]}]}},Se={scope:"keyword",match:mt(/@/,Sn(...aB),Yo(Sn(/\(/,/\s+/)))},R={scope:"meta",match:mt(/@/,$i)},z=[ce,Se,R],W={match:Yo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:mt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Cf,"+")},{className:"type",match:rf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:mt(/\s+&\s+/,Yo(rf)),relevance:0}]},C={begin:/</,end:/>/,keywords:h,contains:[...r,...y,...z,S,W]};W.contains.push(C);const he={match:mt($i,/\s*:/),keywords:"_|0",relevance:0},ke={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",he,...r,se,...y,...x,...w,A,X,...le,...z,W]},xe={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,W]},Pe={begin:Sn(Yo(mt($i,/\s*:/)),Yo(mt($i,/\s+/,$i,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:$i}]},st={begin:/\(/,end:/\)/,keywords:h,contains:[Pe,...r,...y,...w,A,X,...z,W,ke],endsParent:!0,illegal:/["']/},it={match:[/(func|macro)/,/\s+/,Sn(ae.match,$i,Ip)],className:{1:"keyword",3:"title.function"},contains:[xe,st,t],illegal:[/\[/,/%/]},Zt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[xe,st,t],illegal:/\[|%/},Pn={match:[/operator/,/\s+/,Ip],className:{1:"keyword",3:"title"}},Xi={begin:[/precedencegroup/,/\s+/,rf],className:{1:"keyword",3:"title"},contains:[W],keywords:[...nB,...H0],end:/}/},Ca={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},$n={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Li={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,$i,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[xe,...y,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:rf},...y],relevance:0}]};for(const Xe of X.variants){const Si=Xe.contains.find(ji=>ji.label==="interpol");Si.keywords=h;const ri=[...y,...x,...w,A,X,...le];Si.contains=[...ri,{begin:/\(/,end:/\)/,contains:["self",...ri]}]}return{name:"Swift",keywords:h,contains:[...r,it,Zt,Ca,$n,Li,Pn,Xi,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},se,...y,...x,...w,A,X,...le,...z,W,ke]}}const Af="[A-Za-z$_][0-9A-Za-z$_]*",E_=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],S_=["true","false","null","undefined","NaN","Infinity"],__=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],w_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],k_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],N_=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],T_=[].concat(k_,__,w_);function lB(e){const t=e.regex,i=(ce,{after:Se})=>{const R="</"+ce[0].slice(1);return ce.input.indexOf(R,Se)!==-1},r=Af,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ce,Se)=>{const R=ce[0].length+ce.index,z=ce.input[R];if(z==="<"||z===","){Se.ignoreMatch();return}z===">"&&(i(ce,{after:R})||Se.ignoreMatch());let W;const C=ce.input.substring(R);if(W=C.match(/^\s*=/)){Se.ignoreMatch();return}if((W=C.match(/^\s+extends\s+/))&&W.index===0){Se.ignoreMatch();return}}},f={$pattern:Af,keyword:E_,literal:S_,built_in:T_,"variable.language":N_},d="[0-9](_?[0-9])*",h=`\\.(${d})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${y})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${y})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},O={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,S,_,w,{match:/\$\d+/},m];v.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const I=[].concat(O,v.contains),q=I.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(I)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:q},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},j={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...__,...w_]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},$={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Q(ce){return t.concat("(?!",ce.join("|"),")")}const se={match:t.concat(/\b/,Q([...k_,"super","import"].map(ce=>`${ce}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ae={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},J={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},K="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",le={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(K)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:q,CLASS_REFERENCE:j},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,S,_,w,O,{match:/\$\d+/},m,j,{scope:"attr",match:r+t.lookahead(":"),relevance:0},le,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,e.REGEXP_MODE,{className:"function",begin:K,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:q}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ae,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},se,$,P,J,{match:/\$[(.]/}]}}function oB(e){const t=e.regex,i=lB(e),r=Af,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[i.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Af,keyword:E_.concat(d),literal:S_,built_in:T_.concat(l),"variable.language":N_},y={className:"meta",begin:"@"+r},m=(_,w,k)=>{const O=_.contains.findIndex(A=>A.label===w);if(O===-1)throw new Error("can not find mode to replace");_.contains.splice(O,1,k)};Object.assign(i.keywords,h),i.exports.PARAMS_CONTAINS.push(y);const v=i.contains.find(_=>_.scope==="attr"),x=Object.assign({},v,{match:t.concat(r,t.lookahead(/\s*\?:/))});i.exports.PARAMS_CONTAINS.push([i.exports.CLASS_REFERENCE,v,x]),i.contains=i.contains.concat([y,o,c,x]),m(i,"shebang",e.SHEBANG()),m(i,"use_strict",f);const S=i.contains.find(_=>_.label==="func.def");return S.relevance=0,Object.assign(i,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),i}function cB(e){const t=e.regex,i={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},l=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,l),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,l),/ +/,t.either(c,f),/ *#/)}]},h={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},y={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),v=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[i,r,d,h,y,m,v,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[v]}]}}function uB(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const i=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],l={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},h={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[i,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,l,e.QUOTE_STRING_MODE,d,h,f]}}function fB(e){const t=e.regex,i=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,l={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,d,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,d,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},l,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(i,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:h}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function dB(e){const t="true false yes no null",i="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,l]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),v={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},x={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},S={begin:/\{/,end:/\}/,contains:[x],illegal:"\\n",relevance:0},_={begin:"\\[",end:"\\]",contains:[x],illegal:"\\n",relevance:0},w=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+i},{className:"type",begin:"!<"+i+">"},{className:"type",begin:"!"+i},{className:"type",begin:"!!"+i},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},v,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},S,_,o,c],k=[...w];return k.pop(),k.push(f),x.contains=k,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}const hB={arduino:Q3,bash:V3,c:X3,cpp:Z3,csharp:W3,css:lz,diff:oz,go:cz,graphql:uz,ini:fz,java:dz,javascript:bz,json:yz,kotlin:vz,less:Cz,lua:Az,makefile:Oz,markdown:Rz,objectivec:Mz,perl:Dz,php:Lz,"php-template":jz,plaintext:Iz,python:zz,"python-repl":Bz,r:Uz,ruby:Fz,rust:Pz,scss:Xz,shell:Zz,sql:Wz,swift:sB,typescript:oB,vbnet:cB,wasm:uB,xml:fB,yaml:dB};var zp,G0;function pB(){if(G0)return zp;G0=1;function e(U){return U instanceof Map?U.clear=U.delete=U.set=function(){throw new Error("map is read-only")}:U instanceof Set&&(U.add=U.clear=U.delete=function(){throw new Error("set is read-only")}),Object.freeze(U),Object.getOwnPropertyNames(U).forEach(ne=>{const pe=U[ne],Me=typeof pe;(Me==="object"||Me==="function")&&!Object.isFrozen(pe)&&e(pe)}),U}class t{constructor(ne){ne.data===void 0&&(ne.data={}),this.data=ne.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(U){return U.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(U,...ne){const pe=Object.create(null);for(const Me in U)pe[Me]=U[Me];return ne.forEach(function(Me){for(const St in Me)pe[St]=Me[St]}),pe}const l="</span>",o=U=>!!U.scope,c=(U,{prefix:ne})=>{if(U.startsWith("language:"))return U.replace("language:","language-");if(U.includes(".")){const pe=U.split(".");return[`${ne}${pe.shift()}`,...pe.map((Me,St)=>`${Me}${"_".repeat(St+1)}`)].join(" ")}return`${ne}${U}`};class f{constructor(ne,pe){this.buffer="",this.classPrefix=pe.classPrefix,ne.walk(this)}addText(ne){this.buffer+=i(ne)}openNode(ne){if(!o(ne))return;const pe=c(ne.scope,{prefix:this.classPrefix});this.span(pe)}closeNode(ne){o(ne)&&(this.buffer+=l)}value(){return this.buffer}span(ne){this.buffer+=`<span class="${ne}">`}}const d=(U={})=>{const ne={children:[]};return Object.assign(ne,U),ne};class h{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ne){this.top.children.push(ne)}openNode(ne){const pe=d({scope:ne});this.add(pe),this.stack.push(pe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ne){return this.constructor._walk(ne,this.rootNode)}static _walk(ne,pe){return typeof pe=="string"?ne.addText(pe):pe.children&&(ne.openNode(pe),pe.children.forEach(Me=>this._walk(ne,Me)),ne.closeNode(pe)),ne}static _collapse(ne){typeof ne!="string"&&ne.children&&(ne.children.every(pe=>typeof pe=="string")?ne.children=[ne.children.join("")]:ne.children.forEach(pe=>{h._collapse(pe)}))}}class y extends h{constructor(ne){super(),this.options=ne}addText(ne){ne!==""&&this.add(ne)}startScope(ne){this.openNode(ne)}endScope(){this.closeNode()}__addSublanguage(ne,pe){const Me=ne.root;pe&&(Me.scope=`language:${pe}`),this.add(Me)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(U){return U?typeof U=="string"?U:U.source:null}function v(U){return _("(?=",U,")")}function x(U){return _("(?:",U,")*")}function S(U){return _("(?:",U,")?")}function _(...U){return U.map(pe=>m(pe)).join("")}function w(U){const ne=U[U.length-1];return typeof ne=="object"&&ne.constructor===Object?(U.splice(U.length-1,1),ne):{}}function k(...U){return"("+(w(U).capture?"":"?:")+U.map(Me=>m(Me)).join("|")+")"}function O(U){return new RegExp(U.toString()+"|").exec("").length-1}function A(U,ne){const pe=U&&U.exec(ne);return pe&&pe.index===0}const I=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function q(U,{joinWith:ne}){let pe=0;return U.map(Me=>{pe+=1;const St=pe;let gt=m(Me),ye="";for(;gt.length>0;){const ge=I.exec(gt);if(!ge){ye+=gt;break}ye+=gt.substring(0,ge.index),gt=gt.substring(ge.index+ge[0].length),ge[0][0]==="\\"&&ge[1]?ye+="\\"+String(Number(ge[1])+St):(ye+=ge[0],ge[0]==="("&&pe++)}return ye}).map(Me=>`(${Me})`).join(ne)}const T=/\b\B/,P="[a-zA-Z]\\w*",j="[a-zA-Z_]\\w*",X="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",$="\\b(0b[01]+)",Q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",se=(U={})=>{const ne=/^#![ ]*\//;return U.binary&&(U.begin=_(ne,/.*\b/,U.binary,/\b.*/)),r({scope:"meta",begin:ne,end:/$/,relevance:0,"on:begin":(pe,Me)=>{pe.index!==0&&Me.ignoreMatch()}},U)},ae={begin:"\\\\[\\s\\S]",relevance:0},J={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ae]},K={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ae]},le={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ce=function(U,ne,pe={}){const Me=r({scope:"comment",begin:U,end:ne,contains:[]},pe);Me.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const St=k("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Me.contains.push({begin:_(/[ ]+/,"(",St,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Me},Se=ce("//","$"),R=ce("/\\*","\\*/"),z=ce("#","$"),W={scope:"number",begin:X,relevance:0},C={scope:"number",begin:D,relevance:0},he={scope:"number",begin:$,relevance:0},ke={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ae,{begin:/\[/,end:/\]/,relevance:0,contains:[ae]}]},xe={scope:"title",begin:P,relevance:0},Pe={scope:"title",begin:j,relevance:0},st={begin:"\\.\\s*"+j,relevance:0};var Zt=Object.freeze({__proto__:null,APOS_STRING_MODE:J,BACKSLASH_ESCAPE:ae,BINARY_NUMBER_MODE:he,BINARY_NUMBER_RE:$,COMMENT:ce,C_BLOCK_COMMENT_MODE:R,C_LINE_COMMENT_MODE:Se,C_NUMBER_MODE:C,C_NUMBER_RE:D,END_SAME_AS_BEGIN:function(U){return Object.assign(U,{"on:begin":(ne,pe)=>{pe.data._beginMatch=ne[1]},"on:end":(ne,pe)=>{pe.data._beginMatch!==ne[1]&&pe.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:P,MATCH_NOTHING_RE:T,METHOD_GUARD:st,NUMBER_MODE:W,NUMBER_RE:X,PHRASAL_WORDS_MODE:le,QUOTE_STRING_MODE:K,REGEXP_MODE:ke,RE_STARTERS_RE:Q,SHEBANG:se,TITLE_MODE:xe,UNDERSCORE_IDENT_RE:j,UNDERSCORE_TITLE_MODE:Pe});function Pn(U,ne){U.input[U.index-1]==="."&&ne.ignoreMatch()}function Xi(U,ne){U.className!==void 0&&(U.scope=U.className,delete U.className)}function Ca(U,ne){ne&&U.beginKeywords&&(U.begin="\\b("+U.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",U.__beforeBegin=Pn,U.keywords=U.keywords||U.beginKeywords,delete U.beginKeywords,U.relevance===void 0&&(U.relevance=0))}function $n(U,ne){Array.isArray(U.illegal)&&(U.illegal=k(...U.illegal))}function Li(U,ne){if(U.match){if(U.begin||U.end)throw new Error("begin & end are not supported with match");U.begin=U.match,delete U.match}}function Xe(U,ne){U.relevance===void 0&&(U.relevance=1)}const Si=(U,ne)=>{if(!U.beforeMatch)return;if(U.starts)throw new Error("beforeMatch cannot be used with starts");const pe=Object.assign({},U);Object.keys(U).forEach(Me=>{delete U[Me]}),U.keywords=pe.keywords,U.begin=_(pe.beforeMatch,v(pe.begin)),U.starts={relevance:0,contains:[Object.assign(pe,{endsParent:!0})]},U.relevance=0,delete pe.beforeMatch},ri=["of","and","for","in","not","or","if","then","parent","list","value"],ji="keyword";function Zi(U,ne,pe=ji){const Me=Object.create(null);return typeof U=="string"?St(pe,U.split(" ")):Array.isArray(U)?St(pe,U):Object.keys(U).forEach(function(gt){Object.assign(Me,Zi(U[gt],ne,gt))}),Me;function St(gt,ye){ne&&(ye=ye.map(ge=>ge.toLowerCase())),ye.forEach(function(ge){const Re=ge.split("|");Me[Re[0]]=[gt,wr(Re[0],Re[1])]})}}function wr(U,ne){return ne?Number(ne):Hl(U)?0:1}function Hl(U){return ri.includes(U.toLowerCase())}const gs={},Ot=U=>{console.error(U)},bs=(U,...ne)=>{console.log(`WARN: ${U}`,...ne)},ee=(U,ne)=>{gs[`${U}/${ne}`]||(console.log(`Deprecated as of ${U}. ${ne}`),gs[`${U}/${ne}`]=!0)},fe=new Error;function Ce(U,ne,{key:pe}){let Me=0;const St=U[pe],gt={},ye={};for(let ge=1;ge<=ne.length;ge++)ye[ge+Me]=St[ge],gt[ge+Me]=!0,Me+=O(ne[ge-1]);U[pe]=ye,U[pe]._emit=gt,U[pe]._multi=!0}function $e(U){if(Array.isArray(U.begin)){if(U.skip||U.excludeBegin||U.returnBegin)throw Ot("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fe;if(typeof U.beginScope!="object"||U.beginScope===null)throw Ot("beginScope must be object"),fe;Ce(U,U.begin,{key:"beginScope"}),U.begin=q(U.begin,{joinWith:""})}}function et(U){if(Array.isArray(U.end)){if(U.skip||U.excludeEnd||U.returnEnd)throw Ot("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fe;if(typeof U.endScope!="object"||U.endScope===null)throw Ot("endScope must be object"),fe;Ce(U,U.end,{key:"endScope"}),U.end=q(U.end,{joinWith:""})}}function bn(U){U.scope&&typeof U.scope=="object"&&U.scope!==null&&(U.beginScope=U.scope,delete U.scope)}function _i(U){bn(U),typeof U.beginScope=="string"&&(U.beginScope={_wrap:U.beginScope}),typeof U.endScope=="string"&&(U.endScope={_wrap:U.endScope}),$e(U),et(U)}function nn(U){function ne(ye,ge){return new RegExp(m(ye),"m"+(U.case_insensitive?"i":"")+(U.unicodeRegex?"u":"")+(ge?"g":""))}class pe{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ge,Re){Re.position=this.position++,this.matchIndexes[this.matchAt]=Re,this.regexes.push([Re,ge]),this.matchAt+=O(ge)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ge=this.regexes.map(Re=>Re[1]);this.matcherRe=ne(q(ge,{joinWith:"|"}),!0),this.lastIndex=0}exec(ge){this.matcherRe.lastIndex=this.lastIndex;const Re=this.matcherRe.exec(ge);if(!Re)return null;const Bt=Re.findIndex((Wi,xs)=>xs>0&&Wi!==void 0),Nt=this.matchIndexes[Bt];return Re.splice(0,Bt),Object.assign(Re,Nt)}}class Me{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ge){if(this.multiRegexes[ge])return this.multiRegexes[ge];const Re=new pe;return this.rules.slice(ge).forEach(([Bt,Nt])=>Re.addRule(Bt,Nt)),Re.compile(),this.multiRegexes[ge]=Re,Re}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ge,Re){this.rules.push([ge,Re]),Re.type==="begin"&&this.count++}exec(ge){const Re=this.getMatcher(this.regexIndex);Re.lastIndex=this.lastIndex;let Bt=Re.exec(ge);if(this.resumingScanAtSamePosition()&&!(Bt&&Bt.index===this.lastIndex)){const Nt=this.getMatcher(0);Nt.lastIndex=this.lastIndex+1,Bt=Nt.exec(ge)}return Bt&&(this.regexIndex+=Bt.position+1,this.regexIndex===this.count&&this.considerAll()),Bt}}function St(ye){const ge=new Me;return ye.contains.forEach(Re=>ge.addRule(Re.begin,{rule:Re,type:"begin"})),ye.terminatorEnd&&ge.addRule(ye.terminatorEnd,{type:"end"}),ye.illegal&&ge.addRule(ye.illegal,{type:"illegal"}),ge}function gt(ye,ge){const Re=ye;if(ye.isCompiled)return Re;[Xi,Li,_i,Si].forEach(Nt=>Nt(ye,ge)),U.compilerExtensions.forEach(Nt=>Nt(ye,ge)),ye.__beforeBegin=null,[Ca,$n,Xe].forEach(Nt=>Nt(ye,ge)),ye.isCompiled=!0;let Bt=null;return typeof ye.keywords=="object"&&ye.keywords.$pattern&&(ye.keywords=Object.assign({},ye.keywords),Bt=ye.keywords.$pattern,delete ye.keywords.$pattern),Bt=Bt||/\w+/,ye.keywords&&(ye.keywords=Zi(ye.keywords,U.case_insensitive)),Re.keywordPatternRe=ne(Bt,!0),ge&&(ye.begin||(ye.begin=/\B|\b/),Re.beginRe=ne(Re.begin),!ye.end&&!ye.endsWithParent&&(ye.end=/\B|\b/),ye.end&&(Re.endRe=ne(Re.end)),Re.terminatorEnd=m(Re.end)||"",ye.endsWithParent&&ge.terminatorEnd&&(Re.terminatorEnd+=(ye.end?"|":"")+ge.terminatorEnd)),ye.illegal&&(Re.illegalRe=ne(ye.illegal)),ye.contains||(ye.contains=[]),ye.contains=[].concat(...ye.contains.map(function(Nt){return cn(Nt==="self"?ye:Nt)})),ye.contains.forEach(function(Nt){gt(Nt,Re)}),ye.starts&&gt(ye.starts,ge),Re.matcher=St(Re),Re}if(U.compilerExtensions||(U.compilerExtensions=[]),U.contains&&U.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return U.classNameAliases=r(U.classNameAliases||{}),gt(U)}function Lt(U){return U?U.endsWithParent||Lt(U.starts):!1}function cn(U){return U.variants&&!U.cachedVariants&&(U.cachedVariants=U.variants.map(function(ne){return r(U,{variants:null},ne)})),U.cachedVariants?U.cachedVariants:Lt(U)?r(U,{starts:U.starts?r(U.starts):null}):Object.isFrozen(U)?r(U):U}var lt="11.11.1";class Ii extends Error{constructor(ne,pe){super(ne),this.name="HTMLInjectionError",this.html=pe}}const yn=i,kc=r,kr=Symbol("nomatch"),ys=7,Nr=function(U){const ne=Object.create(null),pe=Object.create(null),Me=[];let St=!0;const gt="Could not find the language '{}', did you forget to load/include a language module?",ye={disableAutodetect:!0,name:"Plain text",contains:[]};let ge={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:y};function Re(oe){return ge.noHighlightRe.test(oe)}function Bt(oe){let _e=oe.className+" ";_e+=oe.parentNode?oe.parentNode.className:"";const qe=ge.languageDetectRe.exec(_e);if(qe){const ot=xn(qe[1]);return ot||(bs(gt.replace("{}",qe[1])),bs("Falling back to no-highlight mode for this block.",oe)),ot?qe[1]:"no-highlight"}return _e.split(/\s+/).find(ot=>Re(ot)||xn(ot))}function Nt(oe,_e,qe){let ot="",Ft="";typeof _e=="object"?(ot=oe,qe=_e.ignoreIllegals,Ft=_e.language):(ee("10.7.0","highlight(lang, code, ...args) has been deprecated."),ee("10.7.0",`Please use highlight(code, options) instead.
485
+ https://github.com/highlightjs/highlight.js/issues/2277`),Ft=oe,ot=_e),qe===void 0&&(qe=!0);const fn={code:ot,language:Ft};Cr("before:highlight",fn);const qn=fn.result?fn.result:Wi(fn.language,fn.code,qe);return qn.code=fn.code,Cr("after:highlight",qn),qn}function Wi(oe,_e,qe,ot){const Ft=Object.create(null);function fn(de,ve){return de.keywords[ve]}function qn(){if(!Oe.keywords){Kt.addText(ct);return}let de=0;Oe.keywordPatternRe.lastIndex=0;let ve=Oe.keywordPatternRe.exec(ct),Ie="";for(;ve;){Ie+=ct.substring(de,ve.index);const Ye=an.case_insensitive?ve[0].toLowerCase():ve[0],Rt=fn(Oe,Ye);if(Rt){const[si,Xl]=Rt;if(Kt.addText(Ie),Ie="",Ft[Ye]=(Ft[Ye]||0)+1,Ft[Ye]<=ys&&(Ma+=Xl),si.startsWith("_"))Ie+=ve[0];else{const Mc=an.classNameAliases[si]||si;Hn(ve[0],Mc)}}else Ie+=ve[0];de=Oe.keywordPatternRe.lastIndex,ve=Oe.keywordPatternRe.exec(ct)}Ie+=ct.substring(de),Kt.addText(Ie)}function Tn(){if(ct==="")return;let de=null;if(typeof Oe.subLanguage=="string"){if(!ne[Oe.subLanguage]){Kt.addText(ct);return}de=Wi(Oe.subLanguage,ct,!0,Rc[Oe.subLanguage]),Rc[Oe.subLanguage]=de._top}else de=vs(ct,Oe.subLanguage.length?Oe.subLanguage:null);Oe.relevance>0&&(Ma+=de.relevance),Kt.__addSublanguage(de._emitter,de.language)}function vt(){Oe.subLanguage!=null?Tn():qn(),ct=""}function Hn(de,ve){de!==""&&(Kt.startScope(ve),Kt.addText(de),Kt.endScope())}function Ac(de,ve){let Ie=1;const Ye=ve.length-1;for(;Ie<=Ye;){if(!de._emit[Ie]){Ie++;continue}const Rt=an.classNameAliases[de[Ie]]||de[Ie],si=ve[Ie];Rt?Hn(si,Rt):(ct=si,qn(),ct=""),Ie++}}function Ss(de,ve){return de.scope&&typeof de.scope=="string"&&Kt.openNode(an.classNameAliases[de.scope]||de.scope),de.beginScope&&(de.beginScope._wrap?(Hn(ct,an.classNameAliases[de.beginScope._wrap]||de.beginScope._wrap),ct=""):de.beginScope._multi&&(Ac(de.beginScope,ve),ct="")),Oe=Object.create(de,{parent:{value:Oe}}),Oe}function Yl(de,ve,Ie){let Ye=A(de.endRe,Ie);if(Ye){if(de["on:end"]){const Rt=new t(de);de["on:end"](ve,Rt),Rt.isMatchIgnored&&(Ye=!1)}if(Ye){for(;de.endsParent&&de.parent;)de=de.parent;return de}}if(de.endsWithParent)return Yl(de.parent,ve,Ie)}function _s(de){return Oe.matcher.regexIndex===0?(ct+=de[0],1):(Da=!0,0)}function Jf(de){const ve=de[0],Ie=de.rule,Ye=new t(Ie),Rt=[Ie.__beforeBegin,Ie["on:begin"]];for(const si of Rt)if(si&&(si(de,Ye),Ye.isMatchIgnored))return _s(ve);return Ie.skip?ct+=ve:(Ie.excludeBegin&&(ct+=ve),vt(),!Ie.returnBegin&&!Ie.excludeBegin&&(ct=ve)),Ss(Ie,de),Ie.returnBegin?0:ve.length}function Cn(de){const ve=de[0],Ie=_e.substring(de.index),Ye=Yl(Oe,de,Ie);if(!Ye)return kr;const Rt=Oe;Oe.endScope&&Oe.endScope._wrap?(vt(),Hn(ve,Oe.endScope._wrap)):Oe.endScope&&Oe.endScope._multi?(vt(),Ac(Oe.endScope,de)):Rt.skip?ct+=ve:(Rt.returnEnd||Rt.excludeEnd||(ct+=ve),vt(),Rt.excludeEnd&&(ct=ve));do Oe.scope&&Kt.closeNode(),!Oe.skip&&!Oe.subLanguage&&(Ma+=Oe.relevance),Oe=Oe.parent;while(Oe!==Ye.parent);return Ye.starts&&Ss(Ye.starts,de),Rt.returnEnd?0:ve.length}function Ql(){const de=[];for(let ve=Oe;ve!==an;ve=ve.parent)ve.scope&&de.unshift(ve.scope);de.forEach(ve=>Kt.openNode(ve))}let Ar={};function ws(de,ve){const Ie=ve&&ve[0];if(ct+=de,Ie==null)return vt(),0;if(Ar.type==="begin"&&ve.type==="end"&&Ar.index===ve.index&&Ie===""){if(ct+=_e.slice(ve.index,ve.index+1),!St){const Ye=new Error(`0 width match regex (${oe})`);throw Ye.languageName=oe,Ye.badRule=Ar.rule,Ye}return 1}if(Ar=ve,ve.type==="begin")return Jf(ve);if(ve.type==="illegal"&&!qe){const Ye=new Error('Illegal lexeme "'+Ie+'" for mode "'+(Oe.scope||"<unnamed>")+'"');throw Ye.mode=Oe,Ye}else if(ve.type==="end"){const Ye=Cn(ve);if(Ye!==kr)return Ye}if(ve.type==="illegal"&&Ie==="")return ct+=`
486
+ `,1;if(Vl>1e5&&Vl>ve.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ct+=Ie,Ie.length}const an=xn(oe);if(!an)throw Ot(gt.replace("{}",oe)),new Error('Unknown language: "'+oe+'"');const Oc=nn(an);let ks="",Oe=ot||Oc;const Rc={},Kt=new ge.__emitter(ge);Ql();let ct="",Ma=0,ta=0,Vl=0,Da=!1;try{if(an.__emitTokens)an.__emitTokens(_e,Kt);else{for(Oe.matcher.considerAll();;){Vl++,Da?Da=!1:Oe.matcher.considerAll(),Oe.matcher.lastIndex=ta;const de=Oe.matcher.exec(_e);if(!de)break;const ve=_e.substring(ta,de.index),Ie=ws(ve,de);ta=de.index+Ie}ws(_e.substring(ta))}return Kt.finalize(),ks=Kt.toHTML(),{language:oe,value:ks,relevance:Ma,illegal:!1,_emitter:Kt,_top:Oe}}catch(de){if(de.message&&de.message.includes("Illegal"))return{language:oe,value:yn(_e),illegal:!0,relevance:0,_illegalBy:{message:de.message,index:ta,context:_e.slice(ta-100,ta+100),mode:de.mode,resultSoFar:ks},_emitter:Kt};if(St)return{language:oe,value:yn(_e),illegal:!1,relevance:0,errorRaised:de,_emitter:Kt,_top:Oe};throw de}}function xs(oe){const _e={value:yn(oe),illegal:!1,relevance:0,_top:ye,_emitter:new ge.__emitter(ge)};return _e._emitter.addText(oe),_e}function vs(oe,_e){_e=_e||ge.languages||Object.keys(ne);const qe=xs(oe),ot=_e.filter(xn).filter(Oa).map(vt=>Wi(vt,oe,!1));ot.unshift(qe);const Ft=ot.sort((vt,Hn)=>{if(vt.relevance!==Hn.relevance)return Hn.relevance-vt.relevance;if(vt.language&&Hn.language){if(xn(vt.language).supersetOf===Hn.language)return 1;if(xn(Hn.language).supersetOf===vt.language)return-1}return 0}),[fn,qn]=Ft,Tn=fn;return Tn.secondBest=qn,Tn}function zi(oe,_e,qe){const ot=_e&&pe[_e]||qe;oe.classList.add("hljs"),oe.classList.add(`language-${ot}`)}function Ut(oe){let _e=null;const qe=Bt(oe);if(Re(qe))return;if(Cr("before:highlightElement",{el:oe,language:qe}),oe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",oe);return}if(oe.children.length>0&&(ge.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(oe)),ge.throwUnescapedHTML))throw new Ii("One of your code blocks includes unescaped HTML.",oe.innerHTML);_e=oe;const ot=_e.textContent,Ft=qe?Nt(ot,{language:qe,ignoreIllegals:!0}):vs(ot);oe.innerHTML=Ft.value,oe.dataset.highlighted="yes",zi(oe,qe,Ft.language),oe.result={language:Ft.language,re:Ft.relevance,relevance:Ft.relevance},Ft.secondBest&&(oe.secondBest={language:Ft.secondBest.language,relevance:Ft.secondBest.relevance}),Cr("after:highlightElement",{el:oe,result:Ft,text:ot})}function un(oe){ge=kc(ge,oe)}const Aa=()=>{Es(),ee("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Kl(){Es(),ee("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Nc=!1;function Es(){function oe(){Es()}if(document.readyState==="loading"){Nc||window.addEventListener("DOMContentLoaded",oe,!1),Nc=!0;return}document.querySelectorAll(ge.cssSelector).forEach(Ut)}function Tc(oe,_e){let qe=null;try{qe=_e(U)}catch(ot){if(Ot("Language definition for '{}' could not be registered.".replace("{}",oe)),St)Ot(ot);else throw ot;qe=ye}qe.name||(qe.name=oe),ne[oe]=qe,qe.rawDefinition=_e.bind(null,U),qe.aliases&&Ji(qe.aliases,{languageName:oe})}function Tr(oe){delete ne[oe];for(const _e of Object.keys(pe))pe[_e]===oe&&delete pe[_e]}function Gl(){return Object.keys(ne)}function xn(oe){return oe=(oe||"").toLowerCase(),ne[oe]||ne[pe[oe]]}function Ji(oe,{languageName:_e}){typeof oe=="string"&&(oe=[oe]),oe.forEach(qe=>{pe[qe.toLowerCase()]=_e})}function Oa(oe){const _e=xn(oe);return _e&&!_e.disableAutodetect}function Ra(oe){oe["before:highlightBlock"]&&!oe["before:highlightElement"]&&(oe["before:highlightElement"]=_e=>{oe["before:highlightBlock"](Object.assign({block:_e.el},_e))}),oe["after:highlightBlock"]&&!oe["after:highlightElement"]&&(oe["after:highlightElement"]=_e=>{oe["after:highlightBlock"](Object.assign({block:_e.el},_e))})}function Ht(oe){Ra(oe),Me.push(oe)}function Cc(oe){const _e=Me.indexOf(oe);_e!==-1&&Me.splice(_e,1)}function Cr(oe,_e){const qe=oe;Me.forEach(function(ot){ot[qe]&&ot[qe](_e)})}function ea(oe){return ee("10.7.0","highlightBlock will be removed entirely in v12.0"),ee("10.7.0","Please use highlightElement now."),Ut(oe)}Object.assign(U,{highlight:Nt,highlightAuto:vs,highlightAll:Es,highlightElement:Ut,highlightBlock:ea,configure:un,initHighlighting:Aa,initHighlightingOnLoad:Kl,registerLanguage:Tc,unregisterLanguage:Tr,listLanguages:Gl,getLanguage:xn,registerAliases:Ji,autoDetection:Oa,inherit:kc,addPlugin:Ht,removePlugin:Cc}),U.debugMode=function(){St=!1},U.safeMode=function(){St=!0},U.versionString=lt,U.regex={concat:_,lookahead:v,either:k,optional:S,anyNumberOfTimes:x};for(const oe in Zt)typeof Zt[oe]=="object"&&e(Zt[oe]);return Object.assign(U,Zt),U},Nn=Nr({});return Nn.newInstance=()=>Nr({}),zp=Nn,Nn.HighlightJS=Nn,Nn.default=Nn,zp}var mB=pB();const gB=Em(mB),Y0={},bB="hljs-";function yB(e){const t=gB.newInstance();return e&&o(e),{highlight:i,highlightAuto:r,listLanguages:l,register:o,registerAlias:c,registered:f};function i(d,h,y){const m=y||Y0,v=typeof m.prefix=="string"?m.prefix:bB;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:xB,classPrefix:v});const x=t.highlight(h,{ignoreIllegals:!0,language:d});if(x.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:x.errorRaised});const S=x._emitter.root,_=S.data;return _.language=x.language,_.relevance=x.relevance,S}function r(d,h){const m=(h||Y0).subset||l();let v=-1,x=0,S;for(;++v<m.length;){const _=m[v];if(!t.getLanguage(_))continue;const w=i(_,d,h);w.data&&w.data.relevance!==void 0&&w.data.relevance>x&&(x=w.data.relevance,S=w)}return S||{type:"root",children:[],data:{language:void 0,relevance:x}}}function l(){return t.listLanguages()}function o(d,h){if(typeof d=="string")t.registerLanguage(d,h);else{let y;for(y in d)Object.hasOwn(d,y)&&t.registerLanguage(y,d[y])}}function c(d,h){if(typeof d=="string")t.registerAliases(typeof h=="string"?h:[...h],{languageName:d});else{let y;for(y in d)if(Object.hasOwn(d,y)){const m=d[y];t.registerAliases(typeof m=="string"?m:[...m],{languageName:y})}}}function f(d){return!!t.getLanguage(d)}}class xB{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const i=this.stack[this.stack.length-1],r=i.children[i.children.length-1];r&&r.type==="text"?r.value+=t:i.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,i){const r=this.stack[this.stack.length-1],l=t.root.children;i?r.children.push({type:"element",tagName:"span",properties:{className:[i]},children:l}):r.children.push(...l)}openNode(t){const i=this,r=t.split(".").map(function(c,f){return f?c+"_".repeat(f):i.options.classPrefix+c}),l=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:r},children:[]};l.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const vB={};function kg(e){const t=e||vB,i=t.aliases,r=t.detect||!1,l=t.languages||hB,o=t.plainText,c=t.prefix,f=t.subset;let d="hljs";const h=yB(l);if(i&&h.registerAlias(i),c){const y=c.indexOf("-");d=y===-1?c:c.slice(0,y)}return function(y,m){Wf(y,"element",function(v,x,S){if(v.tagName!=="code"||!S||S.type!=="element"||S.tagName!=="pre")return;const _=EB(v);if(_===!1||!_&&!r||_&&o&&o.includes(_))return;Array.isArray(v.properties.className)||(v.properties.className=[]),v.properties.className.includes(d)||v.properties.className.unshift(d);const w=F3(v,{whitespace:"pre"});let k;try{k=_?h.highlight(_,w,{prefix:c}):h.highlightAuto(w,{prefix:c,subset:f})}catch(O){const A=O;if(_&&/Unknown language/.test(A.message)){m.message("Cannot highlight as `"+_+"`, it’s not registered",{ancestors:[S,v],cause:A,place:v.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw A}!_&&k.data&&k.data.language&&v.properties.className.push("language-"+k.data.language),k.children.length>0&&(v.children=k.children)})}}function EB(e){const t=e.properties.className;let i=-1;if(!Array.isArray(t))return;let r;for(;++i<t.length;){const l=String(t[i]);if(l==="no-highlight"||l==="nohighlight")return!1;!r&&l.slice(0,5)==="lang-"&&(r=l.slice(5)),!r&&l.slice(0,9)==="language-"&&(r=l.slice(9))}return r}function SB({name:e,projects:t,onClose:i,onChange:r}){const{confirm:l}=ai(),{data:o,isLoading:c,isError:f,error:d,refetch:h}=kt({queryKey:["skill",e],queryFn:()=>rR(e)});M.useEffect(()=>{const _=w=>{w.key==="Escape"&&i()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[i]);const y=async _=>{await lR(e,_),h(),r()},m=async _=>{await l({title:`从 ${_} 移除 ${e}`,body:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",confirm:"移除",danger:!0})&&(await oR(e,_),h(),r())},v=async _=>{await cR(e,_),h(),r()},x=async _=>{await l({title:`解冻 ${e} @ ${_}`,body:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",confirm:"解冻",danger:!0})&&(await uR(e,_),h(),r())},S=new Map(((o==null?void 0:o.linkedProjects)??[]).map(_=>[_.project,_.state]));return g.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:i,children:g.jsxs("div",{onClick:_=>_.stopPropagation(),className:"nb-card mt-8 w-full max-w-4xl",children:[g.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),o&&g.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[o.category," · ",o.origin||"local"]})]}),g.jsx("button",{onClick:i,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:g.jsx(gc,{size:16,strokeWidth:3})})]}),c&&g.jsx("p",{children:"加载中…"}),f&&g.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",d instanceof Error?d.message:String(d)]}),o&&g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[g.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-3 uppercase tracking-wider",children:"项目链接状态"}),g.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(_=>{const w=S.get(_);return g.jsxs("div",{className:"flex items-center justify-between gap-3 p-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:_}),w==="linked"&&g.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),w==="frozen"&&g.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!w&&g.jsx("span",{className:"nb-status",style:{background:"var(--color-idle-bg)",color:"var(--color-idle)"},children:"absent"})]}),g.jsxs("div",{className:"flex gap-2",children:[!w&&g.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>y(_),type:"button",children:[g.jsx(XC,{size:11})," link"]}),w==="linked"&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(_),type:"button",children:[g.jsx(mA,{size:11})," freeze"]}),g.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>m(_),type:"button",children:"unlink"})]}),w==="frozen"&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(_),type:"button",children:[g.jsx(MC,{size:11})," unfreeze"]}),g.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>m(_),type:"button",children:"unlink"})]})]})]},_)}),t.length===0&&g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"还没有任何项目。先去创建一个项目。"})]})]}),g.jsxs("div",{children:[g.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"SKILL.md 预览"}),g.jsx("div",{className:"prose-chat bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-80 overflow-auto text-sm",children:o.body?g.jsx(yg,{remarkPlugins:[Sg],rehypePlugins:[kg],children:o.body}):g.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),o.references.length>0&&g.jsxs("div",{children:[g.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),g.jsx("ul",{className:"flex flex-col gap-2",children:o.references.map(_=>g.jsx(_B,{skillName:e,file:_.name,lines:_.lines},_.name))})]})]})]})})}function _B({skillName:e,file:t,lines:i}){const[r,l]=M.useState(!1),{data:o,isLoading:c,isError:f,error:d}=kt({queryKey:["skill-ref",e,t],queryFn:()=>sR(e,t),enabled:r,staleTime:1/0});return g.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[g.jsxs("button",{type:"button",onClick:()=>l(h=>!h),"aria-label":`${r?"收起":"展开"} ${t}`,"aria-expanded":r,className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[g.jsx($E,{size:12,strokeWidth:3,className:["transition-transform",r?"rotate-90":""].join(" ")}),g.jsx(Um,{size:12,strokeWidth:2.5}),g.jsx("span",{className:"flex-1 text-left font-bold",children:t}),g.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[i," lines"]})]}),r&&g.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[c&&g.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"加载中…"}),f&&g.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["加载失败: ",d instanceof Error?d.message:String(d)]}),o&&g.jsx("div",{className:"prose-chat text-sm",children:g.jsx(yg,{remarkPlugins:[Sg],rehypePlugins:[kg],children:o.content})})]})]})}const wB=[{value:"all",label:"全部"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],kB={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function NB(){var v;const[e,t]=M.useState("all"),[i,r]=M.useState(""),[l,o]=M.useState(null),c=ni(),{data:f,isLoading:d}=kt({queryKey:["skills"],queryFn:()=>aR()}),h=kt({queryKey:["projects"],queryFn:bc}),y=M.useMemo(()=>((f==null?void 0:f.data)??[]).filter(S=>!(e!=="all"&&S.category!==e||i&&!S.name.toLowerCase().includes(i.toLowerCase()))),[f,e,i]),m=M.useMemo(()=>{const x=(f==null?void 0:f.data)??[],S={all:x.length};for(const _ of x)S[_.category]=(S[_.category]??0)+1;return S},[f]);return g.jsxs("div",{className:"flex flex-col gap-4 max-w-6xl",children:[g.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:d?"加载中…":`${(f==null?void 0:f.data.length)??0} 个 user-level skill`})]}),g.jsx("div",{className:"flex gap-3 items-center",children:g.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await fR(),c.invalidateQueries({queryKey:["skills"]})},type:"button",children:[g.jsx(Ll,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),g.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[g.jsxs("div",{className:"relative flex-1 max-w-md",children:[g.jsx(yf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),g.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索 skill…",value:i,onChange:x=>r(x.target.value),"aria-label":"搜索 skill"})]}),g.jsx("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:wB.map(x=>g.jsxs("button",{type:"button",onClick:()=>t(x.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",e===x.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[x.label," ",m[x.value]]},x.value))})]}),g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:y.map(x=>{var S;return g.jsx(TB,{skill:x,projectCount:((S=h.data)==null?void 0:S.data.length)??0,onOpen:()=>o(x.name)},x.name)})}),l&&g.jsx(SB,{name:l,projects:((v=h.data)==null?void 0:v.data.map(x=>x.name))??[],onClose:()=>o(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function TB({skill:e,projectCount:t,onOpen:i}){const r=kB[e.category];return g.jsxs("article",{onClick:i,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),i())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),g.jsx("span",{className:"nb-badge text-[10px]",style:{background:r},children:e.category})]}),g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),g.jsxs("div",{className:"flex items-center justify-between text-xs font-[family-name:var(--font-mono)] pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[g.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),g.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function CB(){var o;const e=kt({queryKey:["system-info"],queryFn:WE}),t=kt({queryKey:["system-env"],queryFn:AA}),i=kt({queryKey:["doctor"],queryFn:OA}),[r,l]=M.useState(!1);return g.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[g.jsx("header",{children:g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),g.jsx(AB,{current:(o=e.data)==null?void 0:o.version}),g.jsxs("section",{className:"nb-card",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"运行时"}),e.data?g.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[g.jsx("dt",{className:"font-bold",children:"Node"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.nodeVersion}),g.jsx("dt",{className:"font-bold",children:"Platform"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.platform}),g.jsx("dt",{className:"font-bold",children:"PID"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.pid??"—"}),g.jsx("dt",{className:"font-bold",children:"Uptime"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:RB(e.data.uptimeMs)})]}):g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})]}),g.jsxs("section",{className:"nb-card",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[g.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:["全局配置 ",g.jsx("code",{className:"text-sm font-[family-name:var(--font-mono)] font-normal bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"~/.coral/env"})]}),r?g.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 编辑模式"}):g.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>l(!0),type:"button","aria-label":"编辑 env 文件",children:[g.jsx(KE,{size:12,strokeWidth:2.5})," 编辑"]})]}),r?g.jsx(OB,{onClose:()=>{l(!1),t.refetch()}}):t.data&&t.data.exists?g.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:t.data.entries.map(c=>g.jsxs("div",{className:"contents",children:[g.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[c.masked&&g.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),c.key]}),g.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:c.value})]},c.key))}):g.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:['env 文件不存在。点"编辑"或者终端运行 ',g.jsx("code",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded font-[family-name:var(--font-mono)]",children:"sps setup"}),"。"]})]}),g.jsxs("section",{className:"nb-card",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"项目健康检查"}),g.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>i.refetch(),type:"button",children:[g.jsx(Ll,{size:12,strokeWidth:2.5}),"重跑"]})]}),i.data&&i.data.data.length>0?g.jsx("ul",{className:"flex flex-col gap-2",children:i.data.data.map(c=>g.jsxs("li",{className:"flex items-center gap-3 px-3 py-2 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[c.ok?g.jsx(wC,{size:16,className:"text-[var(--color-running)]",strokeWidth:2.5}):g.jsx(Bm,{size:16,className:"text-[var(--color-stuck)]",strokeWidth:2.5}),g.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:c.project}),c.issues.length>0?g.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:c.issues.join("; ")}):g.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"})]},c.project))}):g.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:"还没有项目。"})]})]})}function AB({current:e}){const{confirm:t,alert:i}=ai(),[r,l]=M.useState(!1),[o,c]=M.useState(null),f=kt({queryKey:["latest-version"],queryFn:DA,enabled:!1}),d=async()=>{var y;if(await t({title:"升级 sps-cli",body:`当前 ${e},升级到 ${(y=f.data)==null?void 0:y.latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。`,confirm:"升级"})){l(!0),c(null);try{const m=await LA();c(m.output),m.ok?i({title:"升级完成",body:'请手动 `pkill -f "sps console"` 再重新启动以生效。'}):i({title:"升级失败",body:m.output.slice(-500)})}catch(m){c(m.message),i({title:"升级失败",body:m.message})}finally{l(!1)}}};return g.jsxs("section",{className:"nb-card",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"版本"}),g.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f.refetch(),disabled:f.isFetching||!e,type:"button","aria-label":"检查最新版本",children:[f.isFetching?g.jsx(Ri,{size:12,strokeWidth:3,className:"animate-spin"}):g.jsx(Ll,{size:12,strokeWidth:2.5}),"检查更新"]})]}),g.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[g.jsx("dt",{className:"font-bold",children:"sps-cli (当前)"}),g.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),f.data&&g.jsxs(g.Fragment,{children:[g.jsx("dt",{className:"font-bold",children:"npm (最新)"}),g.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[f.data.latest,f.data.upToDate?g.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"最新"}):g.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:d,disabled:r,type:"button","aria-label":"升级到最新版本",children:[r?g.jsx(Ri,{size:11,strokeWidth:3,className:"animate-spin"}):g.jsx(HE,{size:11,strokeWidth:2.5}),"升级"]})]})]}),f.isError&&g.jsxs(g.Fragment,{children:[g.jsx("dt",{className:"font-bold",children:"检查"}),g.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),o&&g.jsx("pre",{className:"mt-3 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-40 overflow-auto whitespace-pre-wrap",children:o})]})}function OB({onClose:e}){const t=ni(),{alert:i}=ai(),r=kt({queryKey:["system-env-raw"],queryFn:RA}),[l,o]=M.useState(null),[c,f]=M.useState(null);M.useEffect(()=>{r.data&&l===null&&(o(r.data.content),f(r.data.etag))},[r.data,l]);const d=l!==null&&r.data&&l!==r.data.content,h=br({mutationFn:()=>{if(l===null)throw new Error("no draft");return MA(l,c??"")},onSuccess:()=>{t.invalidateQueries({queryKey:["system-env"]}),t.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:y=>{const m=y.status;i({title:m===409?"env 被其他地方修改了":"保存失败",body:m===409?"请点取消后重开编辑。":y instanceof Error?y.message:String(y)})}});return r.isLoading?g.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}):g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:"⚠ 文件包含凭证明文。保存时保持 0600 权限。"}),g.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:l??"",onChange:y=>o(y.target.value),spellCheck:!1,"aria-label":"env 文件编辑器"}),g.jsxs("div",{className:"flex items-center justify-between mt-3",children:[g.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[c?`etag: ${c}`:"",d?" · ● 未保存":""]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:h.isPending,type:"button",children:[g.jsx(gc,{size:12,strokeWidth:3})," 取消"]}),g.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>h.mutate(),disabled:!d||h.isPending,type:"button","aria-label":"保存 env",children:[h.isPending?g.jsx(Ri,{size:12,strokeWidth:3,className:"animate-spin"}):g.jsx(Pm,{size:12,strokeWidth:3}),"保存"]})]})]})]})}function RB(e){const t=Math.floor(e/1e3),i=Math.floor(t/3600),r=Math.floor(t%3600/60),l=t%60;return i>0?`${i}h ${r}m ${l}s`:r>0?`${r}m ${l}s`:`${l}s`}function MB(){return qt("/api/chat/sessions")}function DB(e){return qt(`/api/chat/sessions/${e}`)}async function Q0(e={}){const t=await fetch("/api/chat/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return await t.json()}async function LB(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function jB(e,t){const i=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(!i.ok)throw new Error(`${i.status}: ${await i.text()}`);return await i.json()}async function IB(e){const t=await fetch(`/api/chat/sessions/${e}/interrupt`,{method:"POST"});if(!t.ok&&t.status!==204)throw new Error(`${t.status}: ${await t.text()}`)}function zB(e,t){const i=t?`?since=${encodeURIComponent(t)}`:"";return qt(`/api/chat/sessions/${e}/messages${i}`)}function V0(){var O,A,I,q,T,P;const{sessionId:e}=RE(),t=vr(),i=ni(),{confirm:r,alert:l}=ai(),o=kt({queryKey:["chat-sessions"],queryFn:MB}),c=kt({queryKey:["chat-session",e],queryFn:()=>DB(e??""),enabled:!!e}),[f,d]=M.useState(null),[h,y]=M.useState(""),[m,v]=M.useState(!1),x=M.useRef(null);M.useEffect(()=>{if(!e)return;const j=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let X=!0;return j.addEventListener("open",()=>{if(X){X=!1;return}const D=i.getQueryData(["chat-session",e]),$=D!=null&&D.messages.length?D.messages[D.messages.length-1].ts:void 0;zB(e,$).then(Q=>{Q.data.length!==0&&i.setQueryData(["chat-session",e],se=>{if(!se)return se;const ae=new Set(se.messages.map(K=>K.id)),J=Q.data.filter(K=>!ae.has(K.id));return J.length===0?se:{...se,messages:[...se.messages,...J],lastMessageAt:J[J.length-1].ts,messageCount:se.messageCount+J.length}})}).catch(()=>{})}),j.addEventListener("chat.message",D=>{try{const $=JSON.parse(D.data);i.setQueryData(["chat-session",e],Q=>{if(!Q||Q.messages.some(J=>J.id===$.message.id))return Q;const ae=Q.messages.findIndex(J=>J.role==="user"&&J.id.startsWith("optim-")&&J.content===$.message.content);if(ae>=0){const J=[...Q.messages];return J[ae]=$.message,{...Q,messages:J}}return{...Q,messages:[...Q.messages,$.message]}})}catch{}}),j.addEventListener("chat.message.pending",D=>{try{const $=JSON.parse(D.data);d({id:$.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),j.addEventListener("chat.message.chunk.text",D=>{try{const $=JSON.parse(D.data);d(Q=>{if(!Q||Q.id!==$.assistantId)return Q;const se=[...Q.blocks],ae=se[se.length-1];return ae&&ae.type==="text"?se[se.length-1]={...ae,target:ae.target+$.text}:se.push({type:"text",target:$.text,displayed:""}),{...Q,blocks:se}})}catch{}}),j.addEventListener("chat.message.chunk.tool_use",D=>{try{const $=JSON.parse(D.data);d(Q=>!Q||Q.id!==$.assistantId?Q:{...Q,blocks:[...Q.blocks,{type:"tool_use",id:$.id,title:$.title,kind:$.kind,status:$.status}]})}catch{}}),j.addEventListener("chat.message.chunk.tool_update",D=>{try{const $=JSON.parse(D.data);d(Q=>!Q||Q.id!==$.assistantId?Q:{...Q,blocks:Q.blocks.map(se=>se.type==="tool_use"&&se.id===$.id?{...se,status:$.status}:se)})}catch{}}),j.addEventListener("chat.message.complete",D=>{try{const $=JSON.parse(D.data);d(Q=>Q&&Q.id===$.assistantId?{...Q,done:!0,finalMessage:$.message}:Q)}catch{}}),()=>j.close()},[e,i]),M.useEffect(()=>{if(!f)return;const j=f.blocks.reduce((D,$)=>$.type==="text"?D+($.target.length-$.displayed.length):D,0);if(j<=0){if(f.done&&f.finalMessage){const D=f.finalMessage;i.setQueryData(["chat-session",e],$=>!$||$.messages.some(Q=>Q.id===D.id)?$:{...$,messages:[...$.messages,D],lastMessageAt:D.ts,messageCount:$.messageCount+1}),i.invalidateQueries({queryKey:["chat-sessions"]}),d(null),v(!1)}return}const X=setTimeout(()=>{d(D=>{if(!D)return D;let $=Math.max(1,Math.ceil(j/40));const Q=D.blocks.map(se=>{if(se.type!=="text"||$<=0)return se;const ae=se.target.length-se.displayed.length;if(ae<=0)return se;const J=Math.min(ae,$);return $-=J,{...se,displayed:se.target.slice(0,se.displayed.length+J)}});return{...D,blocks:Q}})},25);return()=>clearTimeout(X)},[f,i,e]),M.useEffect(()=>{const j=x.current;j&&(j.scrollTop=j.scrollHeight)},[c.data,f]);const S=M.useCallback(async()=>{const j=await Q0();i.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${j.id}`)},[i,t]),_=M.useCallback(async()=>{const j=h.trim();if(!j||m)return;let X=e;if(!X){const $=await Q0();i.invalidateQueries({queryKey:["chat-sessions"]}),X=$.id,t(`/chat/${X}`,{replace:!0})}const D={id:`optim-${Date.now()}`,role:"user",content:j,ts:new Date().toISOString(),status:"complete"};i.setQueryData(["chat-session",X],$=>$?{...$,messages:[...$.messages,D],lastMessageAt:D.ts,messageCount:$.messageCount+1}:{id:X,createdAt:D.ts,lastMessageAt:D.ts,title:j.slice(0,60),project:null,messageCount:1,messages:[D]}),y(""),v(!0);try{await jB(X,j)}catch($){v(!1),console.error("sendMessage failed",$),l({title:"发送失败",body:$ instanceof Error?$.message:String($)})}},[h,m,e,i,t,l]),w=M.useCallback(async j=>{await r({title:"删除对话",body:"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await LB(j),i.invalidateQueries({queryKey:["chat-sessions"]}),e===j&&t("/chat"))},[i,e,t,r]),k=M.useCallback(async()=>{if(e)try{await IB(e)}catch(j){l({title:"中断失败",body:j instanceof Error?j.message:String(j)})}},[e,l]);return g.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[g.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[g.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:S,type:"button",children:[g.jsx(fs,{size:14,strokeWidth:3}),"新建对话"]}),g.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:["历史 ",((O=o.data)==null?void 0:O.data.length)??0]}),g.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((A=o.data)==null?void 0:A.data)??[]).map(j=>g.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===j.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[g.jsxs("button",{type:"button","aria-label":`打开对话 ${j.title}`,onClick:()=>t(`/chat/${j.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[g.jsx(Lv,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("p",{className:"text-sm font-semibold truncate",children:j.title}),g.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[j.messageCount," msg · ",O_(j.lastMessageAt??j.createdAt)]})]})]}),g.jsx("button",{type:"button","aria-label":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:X=>{X.stopPropagation(),w(j.id)},children:g.jsx(mc,{size:12})})]},j.id)),(((I=o.data)==null?void 0:I.data)??[]).length===0&&g.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"还没对话。点上面新建。"})]})]}),g.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:e?g.jsxs(g.Fragment,{children:[g.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[g.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((q=c.data)==null?void 0:q.title)??"新对话"}),g.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:e})]}),g.jsxs("div",{ref:x,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((T=c.data)==null?void 0:T.messages)??[]).map(j=>g.jsx(BB,{msg:j},j.id)),f&&g.jsx(UB,{pending:f}),!c.isLoading&&(((P=c.data)==null?void 0:P.messages)??[]).length===0&&!f&&!m&&g.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),g.jsx("div",{className:"border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)]",children:g.jsxs("div",{className:"flex gap-2 items-end",children:[g.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:"说点什么… (Enter 发送,Shift+Enter 换行)",rows:2,value:h,onChange:j=>y(j.target.value),onKeyDown:j=>{j.key==="Enter"&&!j.shiftKey&&!j.nativeEvent.isComposing&&(j.preventDefault(),_())},"aria-label":"消息输入"}),f?g.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:k,type:"button","aria-label":"中断生成",children:[g.jsx(QE,{size:14,strokeWidth:3}),"中断"]}):g.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:_,disabled:!h.trim()||m,type:"button","aria-label":"发送",children:[m?g.jsx(Ri,{size:14,strokeWidth:3,className:"animate-spin"}):g.jsx(dA,{size:14,strokeWidth:3}),"发送"]})]})})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:g.jsxs("div",{className:"text-center max-w-md",children:[g.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center mx-auto mb-4",children:g.jsx(Lv,{size:32,strokeWidth:2.5})}),g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"对话 💬"}),g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。'}),g.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:"Enter 发送 · Shift+Enter 换行 · 内容流式返回"})]})})})]})}function BB({msg:e}){const t=e.role==="user",i=e.role==="error",r=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}];return g.jsx("div",{className:t?"self-end max-w-3xl":"self-start max-w-3xl",children:g.jsxs("div",{className:["nb-card",t?"bg-[var(--color-secondary)]":i?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[g.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[t?"你":i?"错误":"assistant",g.jsx("span",{className:"font-normal",children:"·"}),g.jsx("span",{className:"font-normal",children:O_(e.ts)})]}),g.jsx("div",{className:"flex flex-col gap-2",children:r.map((l,o)=>g.jsx(FB,{block:l},o))}),e.truncated&&g.jsx("p",{className:"mt-3 px-3 py-2 bg-[var(--color-stuck-bg)] border-2 border-[var(--color-stuck)] rounded-lg text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 输出超过 10MB,已截断"})]})})}function UB({pending:e}){const t=(()=>{for(let i=e.blocks.length-1;i>=0;i--)if(e.blocks[i].type==="text")return i;return-1})();return g.jsx("div",{className:"self-start max-w-3xl",children:g.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[g.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",g.jsx("span",{className:"font-normal",children:"·"}),g.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[g.jsx(Ri,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),g.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&g.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((i,r)=>{if(i.type==="text"){const l=r===t;return g.jsxs("div",{className:"relative",children:[g.jsx(C_,{text:i.displayed}),l&&g.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},r)}return g.jsx(A_,{tool:i},r)})]})]})})}function FB({block:e}){return e.type==="text"?g.jsx(C_,{text:e.text}):g.jsx(A_,{tool:e})}function C_({text:e}){return e?g.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:g.jsx(yg,{remarkPlugins:[Sg],rehypePlugins:[kg],children:e})}):null}function A_({tool:e}){const[t,i]=M.useState(!1),r=e.status==="completed",l=e.status==="failed",o=!r&&!l;return g.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[g.jsxs("button",{type:"button",onClick:()=>i(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[g.jsx($E,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),g.jsx(_A,{size:12,strokeWidth:2.5}),g.jsx("span",{className:"font-bold",children:e.kind}),g.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&g.jsx(Ri,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),r&&g.jsx(qE,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),l&&g.jsx(TC,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&g.jsxs("div",{className:"px-3 py-2 text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] border-t-2 border-[var(--color-text)]",children:[g.jsxs("div",{children:["id: ",g.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),g.jsxs("div",{children:["status: ",g.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function O_(e){if(!e)return"";const t=new Date(e),i=Date.now()-t.getTime();return i<6e4?"刚才":i<36e5?`${Math.floor(i/6e4)}m`:i<864e5?`${Math.floor(i/36e5)}h`:t.toLocaleDateString()}function PB(){return g.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[g.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:"404 · 页面不存在"}),g.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:"没找到这个页面。可能是链接过期了。"}),g.jsx(Er,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:"返回首页"})]})}function $B(){return g.jsx(ZA,{children:g.jsx(AT,{children:g.jsxs(jn,{element:g.jsx(VA,{}),children:[g.jsx(jn,{index:!0,element:g.jsx(NT,{to:"/projects",replace:!0})}),g.jsx(jn,{path:"/projects",element:g.jsx(WA,{})}),g.jsx(jn,{path:"/projects/new",element:g.jsx(lO,{})}),g.jsx(jn,{path:"/projects/:name",element:g.jsx(x2,{})}),g.jsx(jn,{path:"/board",element:g.jsx(q2,{})}),g.jsx(jn,{path:"/workers",element:g.jsx(Y2,{})}),g.jsx(jn,{path:"/logs",element:g.jsx(tR,{})}),g.jsx(jn,{path:"/skills",element:g.jsx(NB,{})}),g.jsx(jn,{path:"/system",element:g.jsx(CB,{})}),g.jsx(jn,{path:"/chat",element:g.jsx(V0,{})}),g.jsx(jn,{path:"/chat/:sessionId",element:g.jsx(V0,{})}),g.jsx(jn,{path:"*",element:g.jsx(PB,{})})]})})})}XA();const qB=new gN({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),R_=document.getElementById("root");if(!R_)throw new Error("#root not found");Kk.createRoot(R_).render(g.jsx(M.StrictMode,{children:g.jsx(bN,{client:qB,children:g.jsx(eC,{children:g.jsx(aO,{children:g.jsx($B,{})})})})}));