@coralai/sps-cli 0.52.0 → 0.52.1

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,566 @@
1
+ var H_=Object.defineProperty;var Uv=e=>{throw TypeError(e)};var q_=(e,t,n)=>t in e?H_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kp=(e,t,n)=>q_(e,typeof t!="symbol"?t+"":t,n),Np=(e,t,n)=>t.has(e)||Uv("Cannot "+n);var z=(e,t,n)=>(Np(e,t,"read from private field"),n?n.call(e):t.get(e)),Te=(e,t,n)=>t.has(e)?Uv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),we=(e,t,n,a)=>(Np(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),Ke=(e,t,n)=>(Np(e,t,"access private method"),n);var id=(e,t,n,a)=>({set _(s){we(e,t,s,n)},get _(){return z(e,t,a)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function ag(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _p={exports:{}},Wo={};/**
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 Pv;function K_(){if(Pv)return Wo;Pv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var d in s)d!=="key"&&(l[d]=s[d])}else l=s;return s=l.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:l}}return Wo.Fragment=t,Wo.jsx=n,Wo.jsxs=n,Wo}var Fv;function G_(){return Fv||(Fv=1,_p.exports=K_()),_p.exports}var p=G_(),Cp={exports:{}},Ue={};/**
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 $v;function V_(){if($v)return Ue;$v=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),x=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=x&&D[x]||D["@@iterator"],typeof D=="function"?D:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function N(D,Y,R){this.props=D,this.context=Y,this.refs=k,this.updater=R||E}N.prototype.isReactComponent={},N.prototype.setState=function(D,Y){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,Y,"setState")},N.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function C(){}C.prototype=N.prototype;function A(D,Y,R){this.props=D,this.context=Y,this.refs=k,this.updater=R||E}var T=A.prototype=new C;T.constructor=A,w(T,N.prototype),T.isPureReactComponent=!0;var L=Array.isArray;function M(){}var U={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function te(D,Y,R){var ye=R.ref;return{$$typeof:e,type:D,key:Y,ref:ye!==void 0?ye:null,props:R}}function P(D,Y){return te(D.type,Y,D.props)}function Q(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function J(D){var Y={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(R){return Y[R]})}var me=/\/+/g;function le(D,Y){return typeof D=="object"&&D!==null&&D.key!=null?J(""+D.key):Y.toString(36)}function ee(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(M,M):(D.status="pending",D.then(function(Y){D.status==="pending"&&(D.status="fulfilled",D.value=Y)},function(Y){D.status==="pending"&&(D.status="rejected",D.reason=Y)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function H(D,Y,R,ye,X){var fe=typeof D;(fe==="undefined"||fe==="boolean")&&(D=null);var he=!1;if(D===null)he=!0;else switch(fe){case"bigint":case"string":case"number":he=!0;break;case"object":switch(D.$$typeof){case e:case t:he=!0;break;case b:return he=D._init,H(he(D._payload),Y,R,ye,X)}}if(he)return X=X(D),he=ye===""?"."+le(D,0):ye,L(X)?(R="",he!=null&&(R=he.replace(me,"$&/")+"/"),H(X,Y,R,"",function(Oe){return Oe})):X!=null&&(Q(X)&&(X=P(X,R+(X.key==null||D&&D.key===X.key?"":(""+X.key).replace(me,"$&/")+"/")+he)),Y.push(X)),1;he=0;var K=ye===""?".":ye+":";if(L(D))for(var ue=0;ue<D.length;ue++)ye=D[ue],fe=K+le(ye,ue),he+=H(ye,Y,R,fe,X);else if(ue=v(D),typeof ue=="function")for(D=ue.call(D),ue=0;!(ye=D.next()).done;)ye=ye.value,fe=K+le(ye,ue++),he+=H(ye,Y,R,fe,X);else if(fe==="object"){if(typeof D.then=="function")return H(ee(D),Y,R,ye,X);throw Y=String(D),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return he}function oe(D,Y,R){if(D==null)return D;var ye=[],X=0;return H(D,ye,"","",function(fe){return Y.call(R,fe,X++)}),ye}function ce(D){if(D._status===-1){var Y=D._result;Y=Y(),Y.then(function(R){(D._status===0||D._status===-1)&&(D._status=1,D._result=R)},function(R){(D._status===0||D._status===-1)&&(D._status=2,D._result=R)}),D._status===-1&&(D._status=0,D._result=Y)}if(D._status===1)return D._result.default;throw D._result}var ne=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},j={map:oe,forEach:function(D,Y,R){oe(D,function(){Y.apply(this,arguments)},R)},count:function(D){var Y=0;return oe(D,function(){Y++}),Y},toArray:function(D){return oe(D,function(Y){return Y})||[]},only:function(D){if(!Q(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Ue.Activity=m,Ue.Children=j,Ue.Component=N,Ue.Fragment=n,Ue.Profiler=s,Ue.PureComponent=A,Ue.StrictMode=a,Ue.Suspense=f,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(D){return U.H.useMemoCache(D)}},Ue.cache=function(D){return function(){return D.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(D,Y,R){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ye=w({},D.props),X=D.key;if(Y!=null)for(fe in Y.key!==void 0&&(X=""+Y.key),Y)!$.call(Y,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Y.ref===void 0||(ye[fe]=Y[fe]);var fe=arguments.length-2;if(fe===1)ye.children=R;else if(1<fe){for(var he=Array(fe),K=0;K<fe;K++)he[K]=arguments[K+2];ye.children=he}return te(D.type,X,ye)},Ue.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:l,_context:D},D},Ue.createElement=function(D,Y,R){var ye,X={},fe=null;if(Y!=null)for(ye in Y.key!==void 0&&(fe=""+Y.key),Y)$.call(Y,ye)&&ye!=="key"&&ye!=="__self"&&ye!=="__source"&&(X[ye]=Y[ye]);var he=arguments.length-2;if(he===1)X.children=R;else if(1<he){for(var K=Array(he),ue=0;ue<he;ue++)K[ue]=arguments[ue+2];X.children=K}if(D&&D.defaultProps)for(ye in he=D.defaultProps,he)X[ye]===void 0&&(X[ye]=he[ye]);return te(D,fe,X)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(D){return{$$typeof:d,render:D}},Ue.isValidElement=Q,Ue.lazy=function(D){return{$$typeof:b,_payload:{_status:-1,_result:D},_init:ce}},Ue.memo=function(D,Y){return{$$typeof:h,type:D,compare:Y===void 0?null:Y}},Ue.startTransition=function(D){var Y=U.T,R={};U.T=R;try{var ye=D(),X=U.S;X!==null&&X(R,ye),typeof ye=="object"&&ye!==null&&typeof ye.then=="function"&&ye.then(M,ne)}catch(fe){ne(fe)}finally{Y!==null&&R.types!==null&&(Y.types=R.types),U.T=Y}},Ue.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Ue.use=function(D){return U.H.use(D)},Ue.useActionState=function(D,Y,R){return U.H.useActionState(D,Y,R)},Ue.useCallback=function(D,Y){return U.H.useCallback(D,Y)},Ue.useContext=function(D){return U.H.useContext(D)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(D,Y){return U.H.useDeferredValue(D,Y)},Ue.useEffect=function(D,Y){return U.H.useEffect(D,Y)},Ue.useEffectEvent=function(D){return U.H.useEffectEvent(D)},Ue.useId=function(){return U.H.useId()},Ue.useImperativeHandle=function(D,Y,R){return U.H.useImperativeHandle(D,Y,R)},Ue.useInsertionEffect=function(D,Y){return U.H.useInsertionEffect(D,Y)},Ue.useLayoutEffect=function(D,Y){return U.H.useLayoutEffect(D,Y)},Ue.useMemo=function(D,Y){return U.H.useMemo(D,Y)},Ue.useOptimistic=function(D,Y){return U.H.useOptimistic(D,Y)},Ue.useReducer=function(D,Y,R){return U.H.useReducer(D,Y,R)},Ue.useRef=function(D){return U.H.useRef(D)},Ue.useState=function(D){return U.H.useState(D)},Ue.useSyncExternalStore=function(D,Y,R){return U.H.useSyncExternalStore(D,Y,R)},Ue.useTransition=function(){return U.H.useTransition()},Ue.version="19.2.5",Ue}var Hv;function rg(){return Hv||(Hv=1,Cp.exports=V_()),Cp.exports}var O=rg(),Ap={exports:{}},Xo={},Tp={exports:{}},Op={};/**
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 qv;function Q_(){return qv||(qv=1,(function(e){function t(H,oe){var ce=H.length;H.push(oe);e:for(;0<ce;){var ne=ce-1>>>1,j=H[ne];if(0<s(j,oe))H[ne]=oe,H[ce]=j,ce=ne;else break e}}function n(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var oe=H[0],ce=H.pop();if(ce!==oe){H[0]=ce;e:for(var ne=0,j=H.length,D=j>>>1;ne<D;){var Y=2*(ne+1)-1,R=H[Y],ye=Y+1,X=H[ye];if(0>s(R,ce))ye<j&&0>s(X,R)?(H[ne]=X,H[ye]=ce,ne=ye):(H[ne]=R,H[Y]=ce,ne=Y);else if(ye<j&&0>s(X,ce))H[ne]=X,H[ye]=ce,ne=ye;else break e}}return oe}function s(H,oe){var ce=H.sortIndex-oe.sortIndex;return ce!==0?ce:H.id-oe.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],b=1,m=null,x=3,v=!1,E=!1,w=!1,k=!1,N=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function T(H){for(var oe=n(h);oe!==null;){if(oe.callback===null)a(h);else if(oe.startTime<=H)a(h),oe.sortIndex=oe.expirationTime,t(f,oe);else break;oe=n(h)}}function L(H){if(w=!1,T(H),!E)if(n(f)!==null)E=!0,M||(M=!0,J());else{var oe=n(h);oe!==null&&ee(L,oe.startTime-H)}}var M=!1,U=-1,$=5,te=-1;function P(){return k?!0:!(e.unstable_now()-te<$)}function Q(){if(k=!1,M){var H=e.unstable_now();te=H;var oe=!0;try{e:{E=!1,w&&(w=!1,C(U),U=-1),v=!0;var ce=x;try{t:{for(T(H),m=n(f);m!==null&&!(m.expirationTime>H&&P());){var ne=m.callback;if(typeof ne=="function"){m.callback=null,x=m.priorityLevel;var j=ne(m.expirationTime<=H);if(H=e.unstable_now(),typeof j=="function"){m.callback=j,T(H),oe=!0;break t}m===n(f)&&a(f),T(H)}else a(f);m=n(f)}if(m!==null)oe=!0;else{var D=n(h);D!==null&&ee(L,D.startTime-H),oe=!1}}break e}finally{m=null,x=ce,v=!1}oe=void 0}}finally{oe?J():M=!1}}}var J;if(typeof A=="function")J=function(){A(Q)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,le=me.port2;me.port1.onmessage=Q,J=function(){le.postMessage(null)}}else J=function(){N(Q,0)};function ee(H,oe){U=N(function(){H(e.unstable_now())},oe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(H){switch(x){case 1:case 2:case 3:var oe=3;break;default:oe=x}var ce=x;x=oe;try{return H()}finally{x=ce}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(H,oe){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ce=x;x=H;try{return oe()}finally{x=ce}},e.unstable_scheduleCallback=function(H,oe,ce){var ne=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?ne+ce:ne):ce=ne,H){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=ce+j,H={id:b++,callback:oe,priorityLevel:H,startTime:ce,expirationTime:j,sortIndex:-1},ce>ne?(H.sortIndex=ce,t(h,H),n(f)===null&&H===n(h)&&(w?(C(U),U=-1):w=!0,ee(L,ce-ne))):(H.sortIndex=j,t(f,H),E||v||(E=!0,M||(M=!0,J()))),H},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(H){var oe=x;return function(){var ce=x;x=oe;try{return H.apply(this,arguments)}finally{x=ce}}}})(Op)),Op}var Kv;function Y_(){return Kv||(Kv=1,Tp.exports=Q_()),Tp.exports}var Rp={exports:{}},yn={};/**
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 Gv;function W_(){if(Gv)return yn;Gv=1;var e=rg();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(f,h,b){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:f,containerInfo:h,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return yn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,yn.createPortal=function(f,h){var b=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 l(f,h,null,b)},yn.flushSync=function(f){var h=c.T,b=a.p;try{if(c.T=null,a.p=2,f)return f()}finally{c.T=h,a.p=b,a.d.f()}},yn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},yn.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},yn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var b=h.as,m=d(b,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:x,fetchPriority:v}):b==="script"&&a.d.X(f,{crossOrigin:m,integrity:x,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},yn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},yn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,m=d(b,h.crossOrigin);a.d.L(f,b,{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})}},yn.preloadModule=function(f,h){if(typeof f=="string")if(h){var b=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},yn.requestFormReset=function(f){a.d.r(f)},yn.unstable_batchedUpdates=function(f,h){return f(h)},yn.useFormState=function(f,h,b){return c.H.useFormState(f,h,b)},yn.useFormStatus=function(){return c.H.useHostTransitionStatus()},yn.version="19.2.5",yn}var Vv;function X_(){if(Vv)return Rp.exports;Vv=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(),Rp.exports=W_(),Rp.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 Qv;function Z_(){if(Qv)return Xo;Qv=1;var e=Y_(),t=rg(),n=X_();function a(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)r+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function l(i){var r=i,o=i;if(i.alternate)for(;r.return;)r=r.return;else{i=r;do r=i,(r.flags&4098)!==0&&(o=r.return),i=r.return;while(i)}return r.tag===3?o:null}function c(i){if(i.tag===13){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function d(i){if(i.tag===31){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function f(i){if(l(i)!==i)throw Error(a(188))}function h(i){var r=i.alternate;if(!r){if(r=l(i),r===null)throw Error(a(188));return r!==i?null:i}for(var o=i,u=r;;){var g=o.return;if(g===null)break;var y=g.alternate;if(y===null){if(u=g.return,u!==null){o=u;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===o)return f(g),i;if(y===u)return f(g),r;y=y.sibling}throw Error(a(188))}if(o.return!==u.return)o=g,u=y;else{for(var S=!1,_=g.child;_;){if(_===o){S=!0,o=g,u=y;break}if(_===u){S=!0,u=g,o=y;break}_=_.sibling}if(!S){for(_=y.child;_;){if(_===o){S=!0,o=y,u=g;break}if(_===u){S=!0,u=y,o=g;break}_=_.sibling}if(!S)throw Error(a(189))}}if(o.alternate!==u)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?i:r}function b(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=b(i),r!==null)return r;i=i.sibling}return null}var m=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),A=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function J(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var me=Symbol.for("react.client.reference");function le(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===me?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case N:return"Profiler";case k:return"StrictMode";case L:return"Suspense";case M:return"SuspenseList";case te:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case A:return i.displayName||"Context";case C:return(i._context.displayName||"Context")+".Consumer";case T:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case U:return r=i.displayName||null,r!==null?r:le(i.type)||"Memo";case $:r=i._payload,i=i._init;try{return le(i(r))}catch{}}return null}var ee=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},ne=[],j=-1;function D(i){return{current:i}}function Y(i){0>j||(i.current=ne[j],ne[j]=null,j--)}function R(i,r){j++,ne[j]=i.current,i.current=r}var ye=D(null),X=D(null),fe=D(null),he=D(null);function K(i,r){switch(R(fe,r),R(X,i),R(ye,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?ov(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=ov(r),i=cv(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Y(ye),R(ye,i)}function ue(){Y(ye),Y(X),Y(fe)}function Oe(i){i.memoizedState!==null&&R(he,i);var r=ye.current,o=cv(r,i.type);r!==o&&(R(X,i),R(ye,o))}function dt(i){X.current===i&&(Y(ye),Y(X)),he.current===i&&(Y(he),Go._currentValue=ce)}var ft,di;function Yn(i){if(ft===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);ft=r&&r[1]||"",di=-1<o.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ft+i+di}var $i=!1;function tt(i,r){if(!i||$i)return"";$i=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(Z){var W=Z}Reflect.construct(i,[],de)}else{try{de.call()}catch(Z){W=Z}i.call(de.prototype)}}else{try{throw Error()}catch(Z){W=Z}(de=i())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(Z){if(Z&&W&&typeof Z.stack=="string")return[Z.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),S=y[0],_=y[1];if(S&&_){var I=S.split(`
44
+ `),V=_.split(`
45
+ `);for(g=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;g<V.length&&!V[g].includes("DetermineComponentFrameRoot");)g++;if(u===I.length||g===V.length)for(u=I.length-1,g=V.length-1;1<=u&&0<=g&&I[u]!==V[g];)g--;for(;1<=u&&0<=g;u--,g--)if(I[u]!==V[g]){if(u!==1||g!==1)do if(u--,g--,0>g||I[u]!==V[g]){var ae=`
46
+ `+I[u].replace(" at new "," at ");return i.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",i.displayName)),ae}while(1<=u&&0<=g);break}}}finally{$i=!1,Error.prepareStackTrace=o}return(o=i?i.displayName||i.name:"")?Yn(o):""}function Oi(i,r){switch(i.tag){case 26:case 27:case 5:return Yn(i.type);case 16:return Yn("Lazy");case 13:return i.child!==r&&r!==null?Yn("Suspense Fallback"):Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 15:return tt(i.type,!1);case 11:return tt(i.type.render,!1);case 1:return tt(i.type,!0);case 31:return Yn("Activity");default:return""}}function fi(i){try{var r="",o=null;do r+=Oi(i,o),o=i,i=i.return;while(i);return r}catch(u){return`
47
+ Error generating stack: `+u.message+`
48
+ `+u.stack}}var Hi=Object.prototype.hasOwnProperty,ra=e.unstable_scheduleCallback,Rr=e.unstable_cancelCallback,to=e.unstable_shouldYield,Es=e.unstable_requestPaint,Lt=e.unstable_now,Ss=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,be=e.unstable_UserBlockingPriority,Me=e.unstable_NormalPriority,Ve=e.unstable_LowPriority,rt=e.unstable_IdlePriority,Sn=e.log,Ri=e.unstable_setDisableYieldValue,cn=null,Pt=null;function mn(i){if(typeof Sn=="function"&&Ri(i),Pt&&typeof Pt.setStrictMode=="function")try{Pt.setStrictMode(cn,i)}catch{}}var ht=Math.clz32?Math.clz32:Fc,qi=Math.log,kn=Math.LN2;function Fc(i){return i>>>=0,i===0?32:31-(qi(i)/kn|0)|0}var jr=256,ks=262144,Mr=4194304;function jn(i){var r=i&42;if(r!==0)return r;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function B(i,r,o){var u=i.pendingLanes;if(u===0)return 0;var g=0,y=i.suspendedLanes,S=i.pingedLanes;i=i.warmLanes;var _=u&134217727;return _!==0?(u=_&~y,u!==0?g=jn(u):(S&=_,S!==0?g=jn(S):o||(o=_&~i,o!==0&&(g=jn(o))))):(_=u&~y,_!==0?g=jn(_):S!==0?g=jn(S):o||(o=u&~i,o!==0&&(g=jn(o)))),g===0?0:r!==0&&r!==g&&(r&y)===0&&(y=g&-g,o=r&-r,y>=o||y===32&&(o&4194048)!==0)?r:g}function re(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function ve(i,r){switch(i){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 ze(){var i=Mr;return Mr<<=1,(Mr&62914560)===0&&(Mr=4194304),i}function At(i){for(var r=[],o=0;31>o;o++)r.push(i);return r}function Et(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function ke(i,r,o,u,g,y){var S=i.pendingLanes;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=o,i.entangledLanes&=o,i.errorRecoveryDisabledLanes&=o,i.shellSuspendCounter=0;var _=i.entanglements,I=i.expirationTimes,V=i.hiddenUpdates;for(o=S&~o;0<o;){var ae=31-ht(o),de=1<<ae;_[ae]=0,I[ae]=-1;var W=V[ae];if(W!==null)for(V[ae]=null,ae=0;ae<W.length;ae++){var Z=W[ae];Z!==null&&(Z.lane&=-536870913)}o&=~de}u!==0&&Ee(i,u,0),y!==0&&g===0&&i.tag!==0&&(i.suspendedLanes|=y&~(S&~r))}function Ee(i,r,o){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-ht(r);i.entangledLanes|=r,i.entanglements[u]=i.entanglements[u]|1073741824|o&261930}function Ie(i,r){var o=i.entangledLanes|=r;for(i=i.entanglements;o;){var u=31-ht(o),g=1<<u;g&r|i[u]&r&&(i[u]|=r),o&=~g}}function Kt(i,r){var o=r&-r;return o=(o&42)!==0?1:Rt(o),(o&(i.suspendedLanes|r))!==0?0:o}function Rt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function sa(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Ns(){var i=oe.p;return i!==0?i:(i=window.event,i===void 0?32:jv(i.type))}function _s(i,r){var o=oe.p;try{return oe.p=i,r()}finally{oe.p=o}}var Ki=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Ki,gn="__reactProps$"+Ki,Ia="__reactContainer$"+Ki,no="__reactEvents$"+Ki,$c="__reactListeners$"+Ki,Cs="__reactHandles$"+Ki,Hc="__reactResources$"+Ki,Dr="__reactMarker$"+Ki;function io(i){delete i[Gt],delete i[gn],delete i[no],delete i[$c],delete i[Cs]}function Nn(i){var r=i[Gt];if(r)return r;for(var o=i.parentNode;o;){if(r=o[Ia]||o[Gt]){if(o=r.alternate,r.child!==null||o!==null&&o.child!==null)for(i=gv(i);i!==null;){if(o=i[Gt])return o;i=gv(i)}return r}i=o,o=i.parentNode}return null}function la(i){if(i=i[Gt]||i[Ia]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function za(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(a(33))}function Ba(i){var r=i[Hc];return r||(r=i[Hc]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Wt(i){i[Dr]=!0}var qc=new Set,Lr={};function oa(i,r){pe(i,r),pe(i+"Capture",r)}function pe(i,r){for(Lr[i]=r,i=0;i<r.length;i++)qc.add(r[i])}var Ae=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={},pt={};function Vt(i){return Hi.call(pt,i)?!0:Hi.call(Qe,i)?!1:Ae.test(i)?pt[i]=!0:(Qe[i]=!0,!1)}function bn(i,r,o){if(Vt(r))if(o===null)i.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,""+o)}}function Wn(i,r,o){if(o===null)i.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,""+o)}}function Mn(i,r,o,u){if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttributeNS(r,o,""+u)}}function _t(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Xn(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Kc(i,r,o){var u=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,y=u.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return g.call(this)},set:function(S){o=""+S,y.call(this,S)}}),Object.defineProperty(i,r,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(S){o=""+S},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function As(i){if(!i._valueTracker){var r=Xn(i)?"checked":"value";i._valueTracker=Kc(i,r,""+i[r])}}function ao(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var o=r.getValue(),u="";return i&&(u=Xn(i)?i.checked?"true":"false":i.value),i=u,i!==o?(r.setValue(i),!0):!1}function Ts(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Sf=/[\n"\\]/g;function Dn(i){return i.replace(Sf,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function ro(i,r,o,u,g,y,S,_){i.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?i.type=S:i.removeAttribute("type"),r!=null?S==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+_t(r)):i.value!==""+_t(r)&&(i.value=""+_t(r)):S!=="submit"&&S!=="reset"||i.removeAttribute("value"),r!=null?Os(i,S,_t(r)):o!=null?Os(i,S,_t(o)):u!=null&&i.removeAttribute("value"),g==null&&y!=null&&(i.defaultChecked=!!y),g!=null&&(i.checked=g&&typeof g!="function"&&typeof g!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?i.name=""+_t(_):i.removeAttribute("name")}function Ir(i,r,o,u,g,y,S,_){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(i.type=y),r!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||r!=null)){As(i);return}o=o!=null?""+_t(o):"",r=r!=null?""+_t(r):o,_||r===i.value||(i.value=r),i.defaultValue=r}u=u??g,u=typeof u!="function"&&typeof u!="symbol"&&!!u,i.checked=_?i.checked:!!u,i.defaultChecked=!!u,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.name=S),As(i)}function Os(i,r,o){r==="number"&&Ts(i.ownerDocument)===i||i.defaultValue===""+o||(i.defaultValue=""+o)}function un(i,r,o,u){if(i=i.options,r){r={};for(var g=0;g<o.length;g++)r["$"+o[g]]=!0;for(o=0;o<i.length;o++)g=r.hasOwnProperty("$"+i[o].value),i[o].selected!==g&&(i[o].selected=g),g&&u&&(i[o].defaultSelected=!0)}else{for(o=""+_t(o),r=null,g=0;g<i.length;g++){if(i[g].value===o){i[g].selected=!0,u&&(i[g].defaultSelected=!0);return}r!==null||i[g].disabled||(r=i[g])}r!==null&&(r.selected=!0)}}function Gc(i,r,o){if(r!=null&&(r=""+_t(r),r!==i.value&&(i.value=r),o==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=o!=null?""+_t(o):""}function Rs(i,r,o,u){if(r==null){if(u!=null){if(o!=null)throw Error(a(92));if(ee(u)){if(1<u.length)throw Error(a(93));u=u[0]}o=u}o==null&&(o=""),r=o}o=_t(r),i.defaultValue=o,u=i.textContent,u===o&&u!==""&&u!==null&&(i.value=u),As(i)}function Le(i,r){if(r){var o=i.firstChild;if(o&&o===i.lastChild&&o.nodeType===3){o.nodeValue=r;return}}i.textContent=r}var Vc=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 Xt(i,r,o){var u=r.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?i.setProperty(r,""):r==="float"?i.cssFloat="":i[r]="":u?i.setProperty(r,o):typeof o!="number"||o===0||Vc.has(r)?r==="float"?i.cssFloat=o:i[r]=(""+o).trim():i[r]=o+"px"}function mt(i,r,o){if(r!=null&&typeof r!="object")throw Error(a(62));if(i=i.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?i.setProperty(u,""):u==="float"?i.cssFloat="":i[u]="");for(var g in r)u=r[g],r.hasOwnProperty(g)&&o[g]!==u&&Xt(i,g,u)}else for(var y in r)r.hasOwnProperty(y)&&Xt(i,y,r[y])}function Ua(i){if(i.indexOf("-")===-1)return!1;switch(i){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 ca=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"]]),so=/^[\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 Pa(i){return so.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function xe(){}var Ne=null;function $e(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ze=null,It=null;function hi(i){var r=la(i);if(r&&(i=r.stateNode)){var o=i[gn]||null;e:switch(i=r.stateNode,r.type){case"input":if(ro(i,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),r=o.name,o.type==="radio"&&r!=null){for(o=i;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Dn(""+r)+'"][type="radio"]'),r=0;r<o.length;r++){var u=o[r];if(u!==i&&u.form===i.form){var g=u[gn]||null;if(!g)throw Error(a(90));ro(u,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(r=0;r<o.length;r++)u=o[r],u.form===i.form&&ao(u)}break e;case"textarea":Gc(i,o.value,o.defaultValue);break e;case"select":r=o.value,r!=null&&un(i,!!o.multiple,r,!1)}}}var lo=!1;function Qc(i,r,o){if(lo)return i(r,o);lo=!0;try{var u=i(r);return u}finally{if(lo=!1,(Ze!==null||It!==null)&&(Lu(),Ze&&(r=Ze,i=It,It=Ze=null,hi(r),i)))for(r=0;r<i.length;r++)hi(i[r])}}function oo(i,r){var o=i.stateNode;if(o===null)return null;var u=o[gn]||null;if(u===null)return null;o=u[r];e:switch(r){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)||(i=i.type,u=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!u;break e;default:i=!1}if(i)return null;if(o&&typeof o!="function")throw Error(a(231,r,typeof o));return o}var ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kf=!1;if(ua)try{var co={};Object.defineProperty(co,"passive",{get:function(){kf=!0}}),window.addEventListener("test",co,co),window.removeEventListener("test",co,co)}catch{kf=!1}var Fa=null,Nf=null,Yc=null;function cb(){if(Yc)return Yc;var i,r=Nf,o=r.length,u,g="value"in Fa?Fa.value:Fa.textContent,y=g.length;for(i=0;i<o&&r[i]===g[i];i++);var S=o-i;for(u=1;u<=S&&r[o-u]===g[y-u];u++);return Yc=g.slice(i,1<u?1-u:void 0)}function Wc(i){var r=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&r===13&&(i=13)):i=r,i===10&&(i=13),32<=i||i===13?i:0}function Xc(){return!0}function ub(){return!1}function Ln(i){function r(o,u,g,y,S){this._reactName=o,this._targetInst=g,this.type=u,this.nativeEvent=y,this.target=S,this.currentTarget=null;for(var _ in i)i.hasOwnProperty(_)&&(o=i[_],this[_]=o?o(y):y[_]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Xc:ub,this.isPropagationStopped=ub,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Xc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Xc)},persist:function(){},isPersistent:Xc}),r}var zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zc=Ln(zr),uo=m({},zr,{view:0,detail:0}),Fk=Ln(uo),_f,Cf,fo,Jc=m({},uo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tf,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==fo&&(fo&&i.type==="mousemove"?(_f=i.screenX-fo.screenX,Cf=i.screenY-fo.screenY):Cf=_f=0,fo=i),_f)},movementY:function(i){return"movementY"in i?i.movementY:Cf}}),db=Ln(Jc),$k=m({},Jc,{dataTransfer:0}),Hk=Ln($k),qk=m({},uo,{relatedTarget:0}),Af=Ln(qk),Kk=m({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Gk=Ln(Kk),Vk=m({},zr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Qk=Ln(Vk),Yk=m({},zr,{data:0}),fb=Ln(Yk),Wk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xk={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"},Zk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jk(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=Zk[i])?!!r[i]:!1}function Tf(){return Jk}var eN=m({},uo,{key:function(i){if(i.key){var r=Wk[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=Wc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?Xk[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tf,charCode:function(i){return i.type==="keypress"?Wc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Wc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),tN=Ln(eN),nN=m({},Jc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hb=Ln(nN),iN=m({},uo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tf}),aN=Ln(iN),rN=m({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),sN=Ln(rN),lN=m({},Jc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),oN=Ln(lN),cN=m({},zr,{newState:0,oldState:0}),uN=Ln(cN),dN=[9,13,27,32],Of=ua&&"CompositionEvent"in window,ho=null;ua&&"documentMode"in document&&(ho=document.documentMode);var fN=ua&&"TextEvent"in window&&!ho,pb=ua&&(!Of||ho&&8<ho&&11>=ho),mb=" ",gb=!1;function bb(i,r){switch(i){case"keyup":return dN.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yb(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var js=!1;function hN(i,r){switch(i){case"compositionend":return yb(r);case"keypress":return r.which!==32?null:(gb=!0,mb);case"textInput":return i=r.data,i===mb&&gb?null:i;default:return null}}function pN(i,r){if(js)return i==="compositionend"||!Of&&bb(i,r)?(i=cb(),Yc=Nf=Fa=null,js=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return pb&&r.locale!=="ko"?null:r.data;default:return null}}var mN={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 xb(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!mN[i.type]:r==="textarea"}function vb(i,r,o,u){Ze?It?It.push(u):It=[u]:Ze=u,r=$u(r,"onChange"),0<r.length&&(o=new Zc("onChange","change",null,o,u),i.push({event:o,listeners:r}))}var po=null,mo=null;function gN(i){nv(i,0)}function eu(i){var r=za(i);if(ao(r))return i}function wb(i,r){if(i==="change")return r}var Eb=!1;if(ua){var Rf;if(ua){var jf="oninput"in document;if(!jf){var Sb=document.createElement("div");Sb.setAttribute("oninput","return;"),jf=typeof Sb.oninput=="function"}Rf=jf}else Rf=!1;Eb=Rf&&(!document.documentMode||9<document.documentMode)}function kb(){po&&(po.detachEvent("onpropertychange",Nb),mo=po=null)}function Nb(i){if(i.propertyName==="value"&&eu(mo)){var r=[];vb(r,mo,i,$e(i)),Qc(gN,r)}}function bN(i,r,o){i==="focusin"?(kb(),po=r,mo=o,po.attachEvent("onpropertychange",Nb)):i==="focusout"&&kb()}function yN(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return eu(mo)}function xN(i,r){if(i==="click")return eu(r)}function vN(i,r){if(i==="input"||i==="change")return eu(r)}function wN(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Zn=typeof Object.is=="function"?Object.is:wN;function go(i,r){if(Zn(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var o=Object.keys(i),u=Object.keys(r);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var g=o[u];if(!Hi.call(r,g)||!Zn(i[g],r[g]))return!1}return!0}function _b(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Cb(i,r){var o=_b(i);i=0;for(var u;o;){if(o.nodeType===3){if(u=i+o.textContent.length,i<=r&&u>=r)return{node:o,offset:r-i};i=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=_b(o)}}function Ab(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?Ab(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function Tb(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=Ts(i.document);r instanceof i.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)i=r.contentWindow;else break;r=Ts(i.document)}return r}function Mf(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r&&(r==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||r==="textarea"||i.contentEditable==="true")}var EN=ua&&"documentMode"in document&&11>=document.documentMode,Ms=null,Df=null,bo=null,Lf=!1;function Ob(i,r,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Lf||Ms==null||Ms!==Ts(u)||(u=Ms,"selectionStart"in u&&Mf(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}),bo&&go(bo,u)||(bo=u,u=$u(Df,"onSelect"),0<u.length&&(r=new Zc("onSelect","select",null,r,o),i.push({event:r,listeners:u}),r.target=Ms)))}function Br(i,r){var o={};return o[i.toLowerCase()]=r.toLowerCase(),o["Webkit"+i]="webkit"+r,o["Moz"+i]="moz"+r,o}var Ds={animationend:Br("Animation","AnimationEnd"),animationiteration:Br("Animation","AnimationIteration"),animationstart:Br("Animation","AnimationStart"),transitionrun:Br("Transition","TransitionRun"),transitionstart:Br("Transition","TransitionStart"),transitioncancel:Br("Transition","TransitionCancel"),transitionend:Br("Transition","TransitionEnd")},If={},Rb={};ua&&(Rb=document.createElement("div").style,"AnimationEvent"in window||(delete Ds.animationend.animation,delete Ds.animationiteration.animation,delete Ds.animationstart.animation),"TransitionEvent"in window||delete Ds.transitionend.transition);function Ur(i){if(If[i])return If[i];if(!Ds[i])return i;var r=Ds[i],o;for(o in r)if(r.hasOwnProperty(o)&&o in Rb)return If[i]=r[o];return i}var jb=Ur("animationend"),Mb=Ur("animationiteration"),Db=Ur("animationstart"),SN=Ur("transitionrun"),kN=Ur("transitionstart"),NN=Ur("transitioncancel"),Lb=Ur("transitionend"),Ib=new Map,zf="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(" ");zf.push("scrollEnd");function ji(i,r){Ib.set(i,r),oa(r,[i])}var tu=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},pi=[],Ls=0,Bf=0;function nu(){for(var i=Ls,r=Bf=Ls=0;r<i;){var o=pi[r];pi[r++]=null;var u=pi[r];pi[r++]=null;var g=pi[r];pi[r++]=null;var y=pi[r];if(pi[r++]=null,u!==null&&g!==null){var S=u.pending;S===null?g.next=g:(g.next=S.next,S.next=g),u.pending=g}y!==0&&zb(o,g,y)}}function iu(i,r,o,u){pi[Ls++]=i,pi[Ls++]=r,pi[Ls++]=o,pi[Ls++]=u,Bf|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function Uf(i,r,o,u){return iu(i,r,o,u),au(i)}function Pr(i,r){return iu(i,null,null,r),au(i)}function zb(i,r,o){i.lanes|=o;var u=i.alternate;u!==null&&(u.lanes|=o);for(var g=!1,y=i.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(i=y.stateNode,i===null||i._visibility&1||(g=!0)),i=y,y=y.return;return i.tag===3?(y=i.stateNode,g&&r!==null&&(g=31-ht(o),i=y.hiddenUpdates,u=i[g],u===null?i[g]=[r]:u.push(r),r.lane=o|536870912),y):null}function au(i){if(50<Uo)throw Uo=0,Qh=null,Error(a(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var Is={};function _N(i,r,o,u){this.tag=i,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,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 Jn(i,r,o,u){return new _N(i,r,o,u)}function Pf(i){return i=i.prototype,!(!i||!i.isReactComponent)}function da(i,r){var o=i.alternate;return o===null?(o=Jn(i.tag,r,i.key,i.mode),o.elementType=i.elementType,o.type=i.type,o.stateNode=i.stateNode,o.alternate=i,i.alternate=o):(o.pendingProps=r,o.type=i.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=i.flags&65011712,o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,r=i.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=i.sibling,o.index=i.index,o.ref=i.ref,o.refCleanup=i.refCleanup,o}function Bb(i,r){i.flags&=65011714;var o=i.alternate;return o===null?(i.childLanes=0,i.lanes=r,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,r=o.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),i}function ru(i,r,o,u,g,y){var S=0;if(u=i,typeof i=="function")Pf(i)&&(S=1);else if(typeof i=="string")S=R_(i,o,ye.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case te:return i=Jn(31,o,r,g),i.elementType=te,i.lanes=y,i;case w:return Fr(o.children,g,y,r);case k:S=8,g|=24;break;case N:return i=Jn(12,o,r,g|2),i.elementType=N,i.lanes=y,i;case L:return i=Jn(13,o,r,g),i.elementType=L,i.lanes=y,i;case M:return i=Jn(19,o,r,g),i.elementType=M,i.lanes=y,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:S=10;break e;case C:S=9;break e;case T:S=11;break e;case U:S=14;break e;case $:S=16,u=null;break e}S=29,o=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Jn(S,o,r,g),r.elementType=i,r.type=u,r.lanes=y,r}function Fr(i,r,o,u){return i=Jn(7,i,u,r),i.lanes=o,i}function Ff(i,r,o){return i=Jn(6,i,null,r),i.lanes=o,i}function Ub(i){var r=Jn(18,null,null,0);return r.stateNode=i,r}function $f(i,r,o){return r=Jn(4,i.children!==null?i.children:[],i.key,r),r.lanes=o,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var Pb=new WeakMap;function mi(i,r){if(typeof i=="object"&&i!==null){var o=Pb.get(i);return o!==void 0?o:(r={value:i,source:r,stack:fi(r)},Pb.set(i,r),r)}return{value:i,source:r,stack:fi(r)}}var zs=[],Bs=0,su=null,yo=0,gi=[],bi=0,$a=null,Gi=1,Vi="";function fa(i,r){zs[Bs++]=yo,zs[Bs++]=su,su=i,yo=r}function Fb(i,r,o){gi[bi++]=Gi,gi[bi++]=Vi,gi[bi++]=$a,$a=i;var u=Gi;i=Vi;var g=32-ht(u)-1;u&=~(1<<g),o+=1;var y=32-ht(r)+g;if(30<y){var S=g-g%5;y=(u&(1<<S)-1).toString(32),u>>=S,g-=S,Gi=1<<32-ht(r)+g|o<<g|u,Vi=y+i}else Gi=1<<y|o<<g|u,Vi=i}function Hf(i){i.return!==null&&(fa(i,1),Fb(i,1,0))}function qf(i){for(;i===su;)su=zs[--Bs],zs[Bs]=null,yo=zs[--Bs],zs[Bs]=null;for(;i===$a;)$a=gi[--bi],gi[bi]=null,Vi=gi[--bi],gi[bi]=null,Gi=gi[--bi],gi[bi]=null}function $b(i,r){gi[bi++]=Gi,gi[bi++]=Vi,gi[bi++]=$a,Gi=r.id,Vi=r.overflow,$a=i}var dn=null,Tt=null,nt=!1,Ha=null,yi=!1,Kf=Error(a(519));function qa(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xo(mi(r,i)),Kf}function Hb(i){var r=i.stateNode,o=i.type,u=i.memoizedProps;switch(r[Gt]=i,r[gn]=u,o){case"dialog":We("cancel",r),We("close",r);break;case"iframe":case"object":case"embed":We("load",r);break;case"video":case"audio":for(o=0;o<Fo.length;o++)We(Fo[o],r);break;case"source":We("error",r);break;case"img":case"image":case"link":We("error",r),We("load",r);break;case"details":We("toggle",r);break;case"input":We("invalid",r),Ir(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":We("invalid",r);break;case"textarea":We("invalid",r),Rs(r,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||r.textContent===""+o||u.suppressHydrationWarning===!0||sv(r.textContent,o)?(u.popover!=null&&(We("beforetoggle",r),We("toggle",r)),u.onScroll!=null&&We("scroll",r),u.onScrollEnd!=null&&We("scrollend",r),u.onClick!=null&&(r.onclick=xe),r=!0):r=!1,r||qa(i,!0)}function qb(i){for(dn=i.return;dn;)switch(dn.tag){case 5:case 31:case 13:yi=!1;return;case 27:case 3:yi=!0;return;default:dn=dn.return}}function Us(i){if(i!==dn)return!1;if(!nt)return qb(i),nt=!0,!1;var r=i.tag,o;if((o=r!==3&&r!==27)&&((o=r===5)&&(o=i.type,o=!(o!=="form"&&o!=="button")||cp(i.type,i.memoizedProps)),o=!o),o&&Tt&&qa(i),qb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Tt=mv(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Tt=mv(i)}else r===27?(r=Tt,ar(i.type)?(i=pp,pp=null,Tt=i):Tt=r):Tt=dn?vi(i.stateNode.nextSibling):null;return!0}function $r(){Tt=dn=null,nt=!1}function Gf(){var i=Ha;return i!==null&&(Un===null?Un=i:Un.push.apply(Un,i),Ha=null),i}function xo(i){Ha===null?Ha=[i]:Ha.push(i)}var Vf=D(null),Hr=null,ha=null;function Ka(i,r,o){R(Vf,r._currentValue),r._currentValue=o}function pa(i){i._currentValue=Vf.current,Y(Vf)}function Qf(i,r,o){for(;i!==null;){var u=i.alternate;if((i.childLanes&r)!==r?(i.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),i===o)break;i=i.return}}function Yf(i,r,o,u){var g=i.child;for(g!==null&&(g.return=i);g!==null;){var y=g.dependencies;if(y!==null){var S=g.child;y=y.firstContext;e:for(;y!==null;){var _=y;y=g;for(var I=0;I<r.length;I++)if(_.context===r[I]){y.lanes|=o,_=y.alternate,_!==null&&(_.lanes|=o),Qf(y.return,o,i),u||(S=null);break e}y=_.next}}else if(g.tag===18){if(S=g.return,S===null)throw Error(a(341));S.lanes|=o,y=S.alternate,y!==null&&(y.lanes|=o),Qf(S,o,i),S=null}else S=g.child;if(S!==null)S.return=g;else for(S=g;S!==null;){if(S===i){S=null;break}if(g=S.sibling,g!==null){g.return=S.return,S=g;break}S=S.return}g=S}}function Ps(i,r,o,u){i=null;for(var g=r,y=!1;g!==null;){if(!y){if((g.flags&524288)!==0)y=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var S=g.alternate;if(S===null)throw Error(a(387));if(S=S.memoizedProps,S!==null){var _=g.type;Zn(g.pendingProps.value,S.value)||(i!==null?i.push(_):i=[_])}}else if(g===he.current){if(S=g.alternate,S===null)throw Error(a(387));S.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(i!==null?i.push(Go):i=[Go])}g=g.return}i!==null&&Yf(r,i,o,u),r.flags|=262144}function lu(i){for(i=i.firstContext;i!==null;){if(!Zn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function qr(i){Hr=i,ha=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function fn(i){return Kb(Hr,i)}function ou(i,r){return Hr===null&&qr(i),Kb(i,r)}function Kb(i,r){var o=r._currentValue;if(r={context:r,memoizedValue:o,next:null},ha===null){if(i===null)throw Error(a(308));ha=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else ha=ha.next=r;return o}var CN=typeof AbortController<"u"?AbortController:function(){var i=[],r=this.signal={aborted:!1,addEventListener:function(o,u){i.push(u)}};this.abort=function(){r.aborted=!0,i.forEach(function(o){return o()})}},AN=e.unstable_scheduleCallback,TN=e.unstable_NormalPriority,Zt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wf(){return{controller:new CN,data:new Map,refCount:0}}function vo(i){i.refCount--,i.refCount===0&&AN(TN,function(){i.controller.abort()})}var wo=null,Xf=0,Fs=0,$s=null;function ON(i,r){if(wo===null){var o=wo=[];Xf=0,Fs=ep(),$s={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Xf++,r.then(Gb,Gb),r}function Gb(){if(--Xf===0&&wo!==null){$s!==null&&($s.status="fulfilled");var i=wo;wo=null,Fs=0,$s=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function RN(i,r){var o=[],u={status:"pending",value:null,reason:null,then:function(g){o.push(g)}};return i.then(function(){u.status="fulfilled",u.value=r;for(var g=0;g<o.length;g++)(0,o[g])(r)},function(g){for(u.status="rejected",u.reason=g,g=0;g<o.length;g++)(0,o[g])(void 0)}),u}var Vb=H.S;H.S=function(i,r){Ox=Lt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&ON(i,r),Vb!==null&&Vb(i,r)};var Kr=D(null);function Zf(){var i=Kr.current;return i!==null?i:St.pooledCache}function cu(i,r){r===null?R(Kr,Kr.current):R(Kr,r.pool)}function Qb(){var i=Zf();return i===null?null:{parent:Zt._currentValue,pool:i}}var Hs=Error(a(460)),Jf=Error(a(474)),uu=Error(a(542)),du={then:function(){}};function Yb(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Wb(i,r,o){switch(o=i[o],o===void 0?i.push(r):o!==r&&(r.then(xe,xe),r=o),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,Zb(i),i;default:if(typeof r.status=="string")r.then(xe,xe);else{if(i=St,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=r,i.status="pending",i.then(function(u){if(r.status==="pending"){var g=r;g.status="fulfilled",g.value=u}},function(u){if(r.status==="pending"){var g=r;g.status="rejected",g.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,Zb(i),i}throw Vr=r,Hs}}function Gr(i){try{var r=i._init;return r(i._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Vr=o,Hs):o}}var Vr=null;function Xb(){if(Vr===null)throw Error(a(459));var i=Vr;return Vr=null,i}function Zb(i){if(i===Hs||i===uu)throw Error(a(483))}var qs=null,Eo=0;function fu(i){var r=Eo;return Eo+=1,qs===null&&(qs=[]),Wb(qs,i,r)}function So(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function hu(i,r){throw r.$$typeof===x?Error(a(525)):(i=Object.prototype.toString.call(r),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function Jb(i){function r(q,F){if(i){var G=q.deletions;G===null?(q.deletions=[F],q.flags|=16):G.push(F)}}function o(q,F){if(!i)return null;for(;F!==null;)r(q,F),F=F.sibling;return null}function u(q){for(var F=new Map;q!==null;)q.key!==null?F.set(q.key,q):F.set(q.index,q),q=q.sibling;return F}function g(q,F){return q=da(q,F),q.index=0,q.sibling=null,q}function y(q,F,G){return q.index=G,i?(G=q.alternate,G!==null?(G=G.index,G<F?(q.flags|=67108866,F):G):(q.flags|=67108866,F)):(q.flags|=1048576,F)}function S(q){return i&&q.alternate===null&&(q.flags|=67108866),q}function _(q,F,G,se){return F===null||F.tag!==6?(F=Ff(G,q.mode,se),F.return=q,F):(F=g(F,G),F.return=q,F)}function I(q,F,G,se){var Re=G.type;return Re===w?ae(q,F,G.props.children,se,G.key):F!==null&&(F.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===$&&Gr(Re)===F.type)?(F=g(F,G.props),So(F,G),F.return=q,F):(F=ru(G.type,G.key,G.props,null,q.mode,se),So(F,G),F.return=q,F)}function V(q,F,G,se){return F===null||F.tag!==4||F.stateNode.containerInfo!==G.containerInfo||F.stateNode.implementation!==G.implementation?(F=$f(G,q.mode,se),F.return=q,F):(F=g(F,G.children||[]),F.return=q,F)}function ae(q,F,G,se,Re){return F===null||F.tag!==7?(F=Fr(G,q.mode,se,Re),F.return=q,F):(F=g(F,G),F.return=q,F)}function de(q,F,G){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Ff(""+F,q.mode,G),F.return=q,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case v:return G=ru(F.type,F.key,F.props,null,q.mode,G),So(G,F),G.return=q,G;case E:return F=$f(F,q.mode,G),F.return=q,F;case $:return F=Gr(F),de(q,F,G)}if(ee(F)||J(F))return F=Fr(F,q.mode,G,null),F.return=q,F;if(typeof F.then=="function")return de(q,fu(F),G);if(F.$$typeof===A)return de(q,ou(q,F),G);hu(q,F)}return null}function W(q,F,G,se){var Re=F!==null?F.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Re!==null?null:_(q,F,""+G,se);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case v:return G.key===Re?I(q,F,G,se):null;case E:return G.key===Re?V(q,F,G,se):null;case $:return G=Gr(G),W(q,F,G,se)}if(ee(G)||J(G))return Re!==null?null:ae(q,F,G,se,null);if(typeof G.then=="function")return W(q,F,fu(G),se);if(G.$$typeof===A)return W(q,F,ou(q,G),se);hu(q,G)}return null}function Z(q,F,G,se,Re){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return q=q.get(G)||null,_(F,q,""+se,Re);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case v:return q=q.get(se.key===null?G:se.key)||null,I(F,q,se,Re);case E:return q=q.get(se.key===null?G:se.key)||null,V(F,q,se,Re);case $:return se=Gr(se),Z(q,F,G,se,Re)}if(ee(se)||J(se))return q=q.get(G)||null,ae(F,q,se,Re,null);if(typeof se.then=="function")return Z(q,F,G,fu(se),Re);if(se.$$typeof===A)return Z(q,F,G,ou(F,se),Re);hu(F,se)}return null}function Se(q,F,G,se){for(var Re=null,st=null,_e=F,qe=F=0,et=null;_e!==null&&qe<G.length;qe++){_e.index>qe?(et=_e,_e=null):et=_e.sibling;var lt=W(q,_e,G[qe],se);if(lt===null){_e===null&&(_e=et);break}i&&_e&&lt.alternate===null&&r(q,_e),F=y(lt,F,qe),st===null?Re=lt:st.sibling=lt,st=lt,_e=et}if(qe===G.length)return o(q,_e),nt&&fa(q,qe),Re;if(_e===null){for(;qe<G.length;qe++)_e=de(q,G[qe],se),_e!==null&&(F=y(_e,F,qe),st===null?Re=_e:st.sibling=_e,st=_e);return nt&&fa(q,qe),Re}for(_e=u(_e);qe<G.length;qe++)et=Z(_e,q,qe,G[qe],se),et!==null&&(i&&et.alternate!==null&&_e.delete(et.key===null?qe:et.key),F=y(et,F,qe),st===null?Re=et:st.sibling=et,st=et);return i&&_e.forEach(function(cr){return r(q,cr)}),nt&&fa(q,qe),Re}function De(q,F,G,se){if(G==null)throw Error(a(151));for(var Re=null,st=null,_e=F,qe=F=0,et=null,lt=G.next();_e!==null&&!lt.done;qe++,lt=G.next()){_e.index>qe?(et=_e,_e=null):et=_e.sibling;var cr=W(q,_e,lt.value,se);if(cr===null){_e===null&&(_e=et);break}i&&_e&&cr.alternate===null&&r(q,_e),F=y(cr,F,qe),st===null?Re=cr:st.sibling=cr,st=cr,_e=et}if(lt.done)return o(q,_e),nt&&fa(q,qe),Re;if(_e===null){for(;!lt.done;qe++,lt=G.next())lt=de(q,lt.value,se),lt!==null&&(F=y(lt,F,qe),st===null?Re=lt:st.sibling=lt,st=lt);return nt&&fa(q,qe),Re}for(_e=u(_e);!lt.done;qe++,lt=G.next())lt=Z(_e,q,qe,lt.value,se),lt!==null&&(i&&lt.alternate!==null&&_e.delete(lt.key===null?qe:lt.key),F=y(lt,F,qe),st===null?Re=lt:st.sibling=lt,st=lt);return i&&_e.forEach(function($_){return r(q,$_)}),nt&&fa(q,qe),Re}function vt(q,F,G,se){if(typeof G=="object"&&G!==null&&G.type===w&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case v:e:{for(var Re=G.key;F!==null;){if(F.key===Re){if(Re=G.type,Re===w){if(F.tag===7){o(q,F.sibling),se=g(F,G.props.children),se.return=q,q=se;break e}}else if(F.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===$&&Gr(Re)===F.type){o(q,F.sibling),se=g(F,G.props),So(se,G),se.return=q,q=se;break e}o(q,F);break}else r(q,F);F=F.sibling}G.type===w?(se=Fr(G.props.children,q.mode,se,G.key),se.return=q,q=se):(se=ru(G.type,G.key,G.props,null,q.mode,se),So(se,G),se.return=q,q=se)}return S(q);case E:e:{for(Re=G.key;F!==null;){if(F.key===Re)if(F.tag===4&&F.stateNode.containerInfo===G.containerInfo&&F.stateNode.implementation===G.implementation){o(q,F.sibling),se=g(F,G.children||[]),se.return=q,q=se;break e}else{o(q,F);break}else r(q,F);F=F.sibling}se=$f(G,q.mode,se),se.return=q,q=se}return S(q);case $:return G=Gr(G),vt(q,F,G,se)}if(ee(G))return Se(q,F,G,se);if(J(G)){if(Re=J(G),typeof Re!="function")throw Error(a(150));return G=Re.call(G),De(q,F,G,se)}if(typeof G.then=="function")return vt(q,F,fu(G),se);if(G.$$typeof===A)return vt(q,F,ou(q,G),se);hu(q,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,F!==null&&F.tag===6?(o(q,F.sibling),se=g(F,G),se.return=q,q=se):(o(q,F),se=Ff(G,q.mode,se),se.return=q,q=se),S(q)):o(q,F)}return function(q,F,G,se){try{Eo=0;var Re=vt(q,F,G,se);return qs=null,Re}catch(_e){if(_e===Hs||_e===uu)throw _e;var st=Jn(29,_e,null,q.mode);return st.lanes=se,st.return=q,st}finally{}}}var Qr=Jb(!0),ey=Jb(!1),Ga=!1;function eh(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function th(i,r){i=i.updateQueue,r.updateQueue===i&&(r.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Va(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Qa(i,r,o){var u=i.updateQueue;if(u===null)return null;if(u=u.shared,(ot&2)!==0){var g=u.pending;return g===null?r.next=r:(r.next=g.next,g.next=r),u.pending=r,r=au(i),zb(i,null,o),r}return iu(i,u,r,o),au(i)}function ko(i,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194048)!==0)){var u=r.lanes;u&=i.pendingLanes,o|=u,r.lanes=o,Ie(i,o)}}function nh(i,r){var o=i.updateQueue,u=i.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var g=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var S={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?g=y=S:y=y.next=S,o=o.next}while(o!==null);y===null?g=y=r:y=y.next=r}else g=y=r;o={baseState:u.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},i.updateQueue=o;return}i=o.lastBaseUpdate,i===null?o.firstBaseUpdate=r:i.next=r,o.lastBaseUpdate=r}var ih=!1;function No(){if(ih){var i=$s;if(i!==null)throw i}}function _o(i,r,o,u){ih=!1;var g=i.updateQueue;Ga=!1;var y=g.firstBaseUpdate,S=g.lastBaseUpdate,_=g.shared.pending;if(_!==null){g.shared.pending=null;var I=_,V=I.next;I.next=null,S===null?y=V:S.next=V,S=I;var ae=i.alternate;ae!==null&&(ae=ae.updateQueue,_=ae.lastBaseUpdate,_!==S&&(_===null?ae.firstBaseUpdate=V:_.next=V,ae.lastBaseUpdate=I))}if(y!==null){var de=g.baseState;S=0,ae=V=I=null,_=y;do{var W=_.lane&-536870913,Z=W!==_.lane;if(Z?(Je&W)===W:(u&W)===W){W!==0&&W===Fs&&(ih=!0),ae!==null&&(ae=ae.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Se=i,De=_;W=r;var vt=o;switch(De.tag){case 1:if(Se=De.payload,typeof Se=="function"){de=Se.call(vt,de,W);break e}de=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=De.payload,W=typeof Se=="function"?Se.call(vt,de,W):Se,W==null)break e;de=m({},de,W);break e;case 2:Ga=!0}}W=_.callback,W!==null&&(i.flags|=64,Z&&(i.flags|=8192),Z=g.callbacks,Z===null?g.callbacks=[W]:Z.push(W))}else Z={lane:W,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ae===null?(V=ae=Z,I=de):ae=ae.next=Z,S|=W;if(_=_.next,_===null){if(_=g.shared.pending,_===null)break;Z=_,_=Z.next,Z.next=null,g.lastBaseUpdate=Z,g.shared.pending=null}}while(!0);ae===null&&(I=de),g.baseState=I,g.firstBaseUpdate=V,g.lastBaseUpdate=ae,y===null&&(g.shared.lanes=0),Ja|=S,i.lanes=S,i.memoizedState=de}}function ty(i,r){if(typeof i!="function")throw Error(a(191,i));i.call(r)}function ny(i,r){var o=i.callbacks;if(o!==null)for(i.callbacks=null,i=0;i<o.length;i++)ty(o[i],r)}var Ks=D(null),pu=D(0);function iy(i,r){i=Sa,R(pu,i),R(Ks,r),Sa=i|r.baseLanes}function ah(){R(pu,Sa),R(Ks,Ks.current)}function rh(){Sa=pu.current,Y(Ks),Y(pu)}var ei=D(null),xi=null;function Ya(i){var r=i.alternate;R(Qt,Qt.current&1),R(ei,i),xi===null&&(r===null||Ks.current!==null||r.memoizedState!==null)&&(xi=i)}function sh(i){R(Qt,Qt.current),R(ei,i),xi===null&&(xi=i)}function ay(i){i.tag===22?(R(Qt,Qt.current),R(ei,i),xi===null&&(xi=i)):Wa()}function Wa(){R(Qt,Qt.current),R(ei,ei.current)}function ti(i){Y(ei),xi===i&&(xi=null),Y(Qt)}var Qt=D(0);function mu(i){for(var r=i;r!==null;){if(r.tag===13){var o=r.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||fp(o)||hp(o)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ma=0,He=null,yt=null,Jt=null,gu=!1,Gs=!1,Yr=!1,bu=0,Co=0,Vs=null,jN=0;function Ft(){throw Error(a(321))}function lh(i,r){if(r===null)return!1;for(var o=0;o<r.length&&o<i.length;o++)if(!Zn(i[o],r[o]))return!1;return!0}function oh(i,r,o,u,g,y){return ma=y,He=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,H.H=i===null||i.memoizedState===null?Fy:Sh,Yr=!1,y=o(u,g),Yr=!1,Gs&&(y=sy(r,o,u,g)),ry(i),y}function ry(i){H.H=Oo;var r=yt!==null&&yt.next!==null;if(ma=0,Jt=yt=He=null,gu=!1,Co=0,Vs=null,r)throw Error(a(300));i===null||en||(i=i.dependencies,i!==null&&lu(i)&&(en=!0))}function sy(i,r,o,u){He=i;var g=0;do{if(Gs&&(Vs=null),Co=0,Gs=!1,25<=g)throw Error(a(301));if(g+=1,Jt=yt=null,i.updateQueue!=null){var y=i.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}H.H=$y,y=r(o,u)}while(Gs);return y}function MN(){var i=H.H,r=i.useState()[0];return r=typeof r.then=="function"?Ao(r):r,i=i.useState()[0],(yt!==null?yt.memoizedState:null)!==i&&(He.flags|=1024),r}function ch(){var i=bu!==0;return bu=0,i}function uh(i,r,o){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~o}function dh(i){if(gu){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}gu=!1}ma=0,Jt=yt=He=null,Gs=!1,Co=bu=0,Vs=null}function _n(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?He.memoizedState=Jt=i:Jt=Jt.next=i,Jt}function Yt(){if(yt===null){var i=He.alternate;i=i!==null?i.memoizedState:null}else i=yt.next;var r=Jt===null?He.memoizedState:Jt.next;if(r!==null)Jt=r,yt=i;else{if(i===null)throw He.alternate===null?Error(a(467)):Error(a(310));yt=i,i={memoizedState:yt.memoizedState,baseState:yt.baseState,baseQueue:yt.baseQueue,queue:yt.queue,next:null},Jt===null?He.memoizedState=Jt=i:Jt=Jt.next=i}return Jt}function yu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(i){var r=Co;return Co+=1,Vs===null&&(Vs=[]),i=Wb(Vs,i,r),r=He,(Jt===null?r.memoizedState:Jt.next)===null&&(r=r.alternate,H.H=r===null||r.memoizedState===null?Fy:Sh),i}function xu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Ao(i);if(i.$$typeof===A)return fn(i)}throw Error(a(438,String(i)))}function fh(i){var r=null,o=He.updateQueue;if(o!==null&&(r=o.memoCache),r==null){var u=He.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(g){return g.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),o===null&&(o=yu(),He.updateQueue=o),o.memoCache=r,o=r.data[r.index],o===void 0)for(o=r.data[r.index]=Array(i),u=0;u<i;u++)o[u]=P;return r.index++,o}function ga(i,r){return typeof r=="function"?r(i):r}function vu(i){var r=Yt();return hh(r,yt,i)}function hh(i,r,o){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=o;var g=i.baseQueue,y=u.pending;if(y!==null){if(g!==null){var S=g.next;g.next=y.next,y.next=S}r.baseQueue=g=y,u.pending=null}if(y=i.baseState,g===null)i.memoizedState=y;else{r=g.next;var _=S=null,I=null,V=r,ae=!1;do{var de=V.lane&-536870913;if(de!==V.lane?(Je&de)===de:(ma&de)===de){var W=V.revertLane;if(W===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),de===Fs&&(ae=!0);else if((ma&W)===W){V=V.next,W===Fs&&(ae=!0);continue}else de={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},I===null?(_=I=de,S=y):I=I.next=de,He.lanes|=W,Ja|=W;de=V.action,Yr&&o(y,de),y=V.hasEagerState?V.eagerState:o(y,de)}else W={lane:de,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},I===null?(_=I=W,S=y):I=I.next=W,He.lanes|=de,Ja|=de;V=V.next}while(V!==null&&V!==r);if(I===null?S=y:I.next=_,!Zn(y,i.memoizedState)&&(en=!0,ae&&(o=$s,o!==null)))throw o;i.memoizedState=y,i.baseState=S,i.baseQueue=I,u.lastRenderedState=y}return g===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function ph(i){var r=Yt(),o=r.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var u=o.dispatch,g=o.pending,y=r.memoizedState;if(g!==null){o.pending=null;var S=g=g.next;do y=i(y,S.action),S=S.next;while(S!==g);Zn(y,r.memoizedState)||(en=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),o.lastRenderedState=y}return[y,u]}function ly(i,r,o){var u=He,g=Yt(),y=nt;if(y){if(o===void 0)throw Error(a(407));o=o()}else o=r();var S=!Zn((yt||g).memoizedState,o);if(S&&(g.memoizedState=o,en=!0),g=g.queue,bh(uy.bind(null,u,g,i),[i]),g.getSnapshot!==r||S||Jt!==null&&Jt.memoizedState.tag&1){if(u.flags|=2048,Qs(9,{destroy:void 0},cy.bind(null,u,g,o,r),null),St===null)throw Error(a(349));y||(ma&127)!==0||oy(u,r,o)}return o}function oy(i,r,o){i.flags|=16384,i={getSnapshot:r,value:o},r=He.updateQueue,r===null?(r=yu(),He.updateQueue=r,r.stores=[i]):(o=r.stores,o===null?r.stores=[i]:o.push(i))}function cy(i,r,o,u){r.value=o,r.getSnapshot=u,dy(r)&&fy(i)}function uy(i,r,o){return o(function(){dy(r)&&fy(i)})}function dy(i){var r=i.getSnapshot;i=i.value;try{var o=r();return!Zn(i,o)}catch{return!0}}function fy(i){var r=Pr(i,2);r!==null&&Pn(r,i,2)}function mh(i){var r=_n();if(typeof i=="function"){var o=i;if(i=o(),Yr){mn(!0);try{o()}finally{mn(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:i},r}function hy(i,r,o,u){return i.baseState=o,hh(i,yt,typeof u=="function"?u:ga)}function DN(i,r,o,u,g){if(Su(i))throw Error(a(485));if(i=r.action,i!==null){var y={payload:g,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){y.listeners.push(S)}};H.T!==null?o(!0):y.isTransition=!1,u(y),o=r.pending,o===null?(y.next=r.pending=y,py(r,y)):(y.next=o.next,r.pending=o.next=y)}}function py(i,r){var o=r.action,u=r.payload,g=i.state;if(r.isTransition){var y=H.T,S={};H.T=S;try{var _=o(g,u),I=H.S;I!==null&&I(S,_),my(i,r,_)}catch(V){gh(i,r,V)}finally{y!==null&&S.types!==null&&(y.types=S.types),H.T=y}}else try{y=o(g,u),my(i,r,y)}catch(V){gh(i,r,V)}}function my(i,r,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){gy(i,r,u)},function(u){return gh(i,r,u)}):gy(i,r,o)}function gy(i,r,o){r.status="fulfilled",r.value=o,by(r),i.state=o,r=i.pending,r!==null&&(o=r.next,o===r?i.pending=null:(o=o.next,r.next=o,py(i,o)))}function gh(i,r,o){var u=i.pending;if(i.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=o,by(r),r=r.next;while(r!==u)}i.action=null}function by(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function yy(i,r){return r}function xy(i,r){if(nt){var o=St.formState;if(o!==null){e:{var u=He;if(nt){if(Tt){t:{for(var g=Tt,y=yi;g.nodeType!==8;){if(!y){g=null;break t}if(g=vi(g.nextSibling),g===null){g=null;break t}}y=g.data,g=y==="F!"||y==="F"?g:null}if(g){Tt=vi(g.nextSibling),u=g.data==="F!";break e}}qa(u)}u=!1}u&&(r=o[0])}}return o=_n(),o.memoizedState=o.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yy,lastRenderedState:r},o.queue=u,o=By.bind(null,He,u),u.dispatch=o,u=mh(!1),y=Eh.bind(null,He,!1,u.queue),u=_n(),g={state:r,dispatch:null,action:i,pending:null},u.queue=g,o=DN.bind(null,He,g,y,o),g.dispatch=o,u.memoizedState=i,[r,o,!1]}function vy(i){var r=Yt();return wy(r,yt,i)}function wy(i,r,o){if(r=hh(i,r,yy)[0],i=vu(ga)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Ao(r)}catch(S){throw S===Hs?uu:S}else u=r;r=Yt();var g=r.queue,y=g.dispatch;return o!==r.memoizedState&&(He.flags|=2048,Qs(9,{destroy:void 0},LN.bind(null,g,o),null)),[u,y,i]}function LN(i,r){i.action=r}function Ey(i){var r=Yt(),o=yt;if(o!==null)return wy(r,o,i);Yt(),r=r.memoizedState,o=Yt();var u=o.queue.dispatch;return o.memoizedState=i,[r,u,!1]}function Qs(i,r,o,u){return i={tag:i,create:o,deps:u,inst:r,next:null},r=He.updateQueue,r===null&&(r=yu(),He.updateQueue=r),o=r.lastEffect,o===null?r.lastEffect=i.next=i:(u=o.next,o.next=i,i.next=u,r.lastEffect=i),i}function Sy(){return Yt().memoizedState}function wu(i,r,o,u){var g=_n();He.flags|=i,g.memoizedState=Qs(1|r,{destroy:void 0},o,u===void 0?null:u)}function Eu(i,r,o,u){var g=Yt();u=u===void 0?null:u;var y=g.memoizedState.inst;yt!==null&&u!==null&&lh(u,yt.memoizedState.deps)?g.memoizedState=Qs(r,y,o,u):(He.flags|=i,g.memoizedState=Qs(1|r,y,o,u))}function ky(i,r){wu(8390656,8,i,r)}function bh(i,r){Eu(2048,8,i,r)}function IN(i){He.flags|=4;var r=He.updateQueue;if(r===null)r=yu(),He.updateQueue=r,r.events=[i];else{var o=r.events;o===null?r.events=[i]:o.push(i)}}function Ny(i){var r=Yt().memoizedState;return IN({ref:r,nextImpl:i}),function(){if((ot&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function _y(i,r){return Eu(4,2,i,r)}function Cy(i,r){return Eu(4,4,i,r)}function Ay(i,r){if(typeof r=="function"){i=i();var o=r(i);return function(){typeof o=="function"?o():r(null)}}if(r!=null)return i=i(),r.current=i,function(){r.current=null}}function Ty(i,r,o){o=o!=null?o.concat([i]):null,Eu(4,4,Ay.bind(null,r,i),o)}function yh(){}function Oy(i,r){var o=Yt();r=r===void 0?null:r;var u=o.memoizedState;return r!==null&&lh(r,u[1])?u[0]:(o.memoizedState=[i,r],i)}function Ry(i,r){var o=Yt();r=r===void 0?null:r;var u=o.memoizedState;if(r!==null&&lh(r,u[1]))return u[0];if(u=i(),Yr){mn(!0);try{i()}finally{mn(!1)}}return o.memoizedState=[u,r],u}function xh(i,r,o){return o===void 0||(ma&1073741824)!==0&&(Je&261930)===0?i.memoizedState=r:(i.memoizedState=o,i=jx(),He.lanes|=i,Ja|=i,o)}function jy(i,r,o,u){return Zn(o,r)?o:Ks.current!==null?(i=xh(i,o,u),Zn(i,r)||(en=!0),i):(ma&42)===0||(ma&1073741824)!==0&&(Je&261930)===0?(en=!0,i.memoizedState=o):(i=jx(),He.lanes|=i,Ja|=i,r)}function My(i,r,o,u,g){var y=oe.p;oe.p=y!==0&&8>y?y:8;var S=H.T,_={};H.T=_,Eh(i,!1,r,o);try{var I=g(),V=H.S;if(V!==null&&V(_,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ae=RN(I,u);To(i,r,ae,ai(i))}else To(i,r,u,ai(i))}catch(de){To(i,r,{then:function(){},status:"rejected",reason:de},ai())}finally{oe.p=y,S!==null&&_.types!==null&&(S.types=_.types),H.T=S}}function zN(){}function vh(i,r,o,u){if(i.tag!==5)throw Error(a(476));var g=Dy(i).queue;My(i,g,r,ce,o===null?zN:function(){return Ly(i),o(u)})}function Dy(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:ce},next:null};var o={};return r.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:o},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function Ly(i){var r=Dy(i);r.next===null&&(r=i.alternate.memoizedState),To(i,r.next.queue,{},ai())}function wh(){return fn(Go)}function Iy(){return Yt().memoizedState}function zy(){return Yt().memoizedState}function BN(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var o=ai();i=Va(o);var u=Qa(r,i,o);u!==null&&(Pn(u,r,o),ko(u,r,o)),r={cache:Wf()},i.payload=r;return}r=r.return}}function UN(i,r,o){var u=ai();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Su(i)?Uy(r,o):(o=Uf(i,r,o,u),o!==null&&(Pn(o,i,u),Py(o,r,u)))}function By(i,r,o){var u=ai();To(i,r,o,u)}function To(i,r,o,u){var g={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Su(i))Uy(r,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var S=r.lastRenderedState,_=y(S,o);if(g.hasEagerState=!0,g.eagerState=_,Zn(_,S))return iu(i,r,g,0),St===null&&nu(),!1}catch{}finally{}if(o=Uf(i,r,g,u),o!==null)return Pn(o,i,u),Py(o,r,u),!0}return!1}function Eh(i,r,o,u){if(u={lane:2,revertLane:ep(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Su(i)){if(r)throw Error(a(479))}else r=Uf(i,o,u,2),r!==null&&Pn(r,i,2)}function Su(i){var r=i.alternate;return i===He||r!==null&&r===He}function Uy(i,r){Gs=gu=!0;var o=i.pending;o===null?r.next=r:(r.next=o.next,o.next=r),i.pending=r}function Py(i,r,o){if((o&4194048)!==0){var u=r.lanes;u&=i.pendingLanes,o|=u,r.lanes=o,Ie(i,o)}}var Oo={readContext:fn,use:xu,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useLayoutEffect:Ft,useInsertionEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useSyncExternalStore:Ft,useId:Ft,useHostTransitionStatus:Ft,useFormState:Ft,useActionState:Ft,useOptimistic:Ft,useMemoCache:Ft,useCacheRefresh:Ft};Oo.useEffectEvent=Ft;var Fy={readContext:fn,use:xu,useCallback:function(i,r){return _n().memoizedState=[i,r===void 0?null:r],i},useContext:fn,useEffect:ky,useImperativeHandle:function(i,r,o){o=o!=null?o.concat([i]):null,wu(4194308,4,Ay.bind(null,r,i),o)},useLayoutEffect:function(i,r){return wu(4194308,4,i,r)},useInsertionEffect:function(i,r){wu(4,2,i,r)},useMemo:function(i,r){var o=_n();r=r===void 0?null:r;var u=i();if(Yr){mn(!0);try{i()}finally{mn(!1)}}return o.memoizedState=[u,r],u},useReducer:function(i,r,o){var u=_n();if(o!==void 0){var g=o(r);if(Yr){mn(!0);try{o(r)}finally{mn(!1)}}}else g=r;return u.memoizedState=u.baseState=g,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:g},u.queue=i,i=i.dispatch=UN.bind(null,He,i),[u.memoizedState,i]},useRef:function(i){var r=_n();return i={current:i},r.memoizedState=i},useState:function(i){i=mh(i);var r=i.queue,o=By.bind(null,He,r);return r.dispatch=o,[i.memoizedState,o]},useDebugValue:yh,useDeferredValue:function(i,r){var o=_n();return xh(o,i,r)},useTransition:function(){var i=mh(!1);return i=My.bind(null,He,i.queue,!0,!1),_n().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,o){var u=He,g=_n();if(nt){if(o===void 0)throw Error(a(407));o=o()}else{if(o=r(),St===null)throw Error(a(349));(Je&127)!==0||oy(u,r,o)}g.memoizedState=o;var y={value:o,getSnapshot:r};return g.queue=y,ky(uy.bind(null,u,y,i),[i]),u.flags|=2048,Qs(9,{destroy:void 0},cy.bind(null,u,y,o,r),null),o},useId:function(){var i=_n(),r=St.identifierPrefix;if(nt){var o=Vi,u=Gi;o=(u&~(1<<32-ht(u)-1)).toString(32)+o,r="_"+r+"R_"+o,o=bu++,0<o&&(r+="H"+o.toString(32)),r+="_"}else o=jN++,r="_"+r+"r_"+o.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:wh,useFormState:xy,useActionState:xy,useOptimistic:function(i){var r=_n();r.memoizedState=r.baseState=i;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=o,r=Eh.bind(null,He,!0,o),o.dispatch=r,[i,r]},useMemoCache:fh,useCacheRefresh:function(){return _n().memoizedState=BN.bind(null,He)},useEffectEvent:function(i){var r=_n(),o={impl:i};return r.memoizedState=o,function(){if((ot&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},Sh={readContext:fn,use:xu,useCallback:Oy,useContext:fn,useEffect:bh,useImperativeHandle:Ty,useInsertionEffect:_y,useLayoutEffect:Cy,useMemo:Ry,useReducer:vu,useRef:Sy,useState:function(){return vu(ga)},useDebugValue:yh,useDeferredValue:function(i,r){var o=Yt();return jy(o,yt.memoizedState,i,r)},useTransition:function(){var i=vu(ga)[0],r=Yt().memoizedState;return[typeof i=="boolean"?i:Ao(i),r]},useSyncExternalStore:ly,useId:Iy,useHostTransitionStatus:wh,useFormState:vy,useActionState:vy,useOptimistic:function(i,r){var o=Yt();return hy(o,yt,i,r)},useMemoCache:fh,useCacheRefresh:zy};Sh.useEffectEvent=Ny;var $y={readContext:fn,use:xu,useCallback:Oy,useContext:fn,useEffect:bh,useImperativeHandle:Ty,useInsertionEffect:_y,useLayoutEffect:Cy,useMemo:Ry,useReducer:ph,useRef:Sy,useState:function(){return ph(ga)},useDebugValue:yh,useDeferredValue:function(i,r){var o=Yt();return yt===null?xh(o,i,r):jy(o,yt.memoizedState,i,r)},useTransition:function(){var i=ph(ga)[0],r=Yt().memoizedState;return[typeof i=="boolean"?i:Ao(i),r]},useSyncExternalStore:ly,useId:Iy,useHostTransitionStatus:wh,useFormState:Ey,useActionState:Ey,useOptimistic:function(i,r){var o=Yt();return yt!==null?hy(o,yt,i,r):(o.baseState=i,[i,o.queue.dispatch])},useMemoCache:fh,useCacheRefresh:zy};$y.useEffectEvent=Ny;function kh(i,r,o,u){r=i.memoizedState,o=o(u,r),o=o==null?r:m({},r,o),i.memoizedState=o,i.lanes===0&&(i.updateQueue.baseState=o)}var Nh={enqueueSetState:function(i,r,o){i=i._reactInternals;var u=ai(),g=Va(u);g.payload=r,o!=null&&(g.callback=o),r=Qa(i,g,u),r!==null&&(Pn(r,i,u),ko(r,i,u))},enqueueReplaceState:function(i,r,o){i=i._reactInternals;var u=ai(),g=Va(u);g.tag=1,g.payload=r,o!=null&&(g.callback=o),r=Qa(i,g,u),r!==null&&(Pn(r,i,u),ko(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var o=ai(),u=Va(o);u.tag=2,r!=null&&(u.callback=r),r=Qa(i,u,o),r!==null&&(Pn(r,i,o),ko(r,i,o))}};function Hy(i,r,o,u,g,y,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,y,S):r.prototype&&r.prototype.isPureReactComponent?!go(o,u)||!go(g,y):!0}function qy(i,r,o,u){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(o,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(o,u),r.state!==i&&Nh.enqueueReplaceState(r,r.state,null)}function Wr(i,r){var o=r;if("ref"in r){o={};for(var u in r)u!=="ref"&&(o[u]=r[u])}if(i=i.defaultProps){o===r&&(o=m({},o));for(var g in i)o[g]===void 0&&(o[g]=i[g])}return o}function Ky(i){tu(i)}function Gy(i){console.error(i)}function Vy(i){tu(i)}function ku(i,r){try{var o=i.onUncaughtError;o(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function Qy(i,r,o){try{var u=i.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function _h(i,r,o){return o=Va(o),o.tag=3,o.payload={element:null},o.callback=function(){ku(i,r)},o}function Yy(i){return i=Va(i),i.tag=3,i}function Wy(i,r,o,u){var g=o.type.getDerivedStateFromError;if(typeof g=="function"){var y=u.value;i.payload=function(){return g(y)},i.callback=function(){Qy(r,o,u)}}var S=o.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(i.callback=function(){Qy(r,o,u),typeof g!="function"&&(er===null?er=new Set([this]):er.add(this));var _=u.stack;this.componentDidCatch(u.value,{componentStack:_!==null?_:""})})}function PN(i,r,o,u,g){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=o.alternate,r!==null&&Ps(r,o,g,!0),o=ei.current,o!==null){switch(o.tag){case 31:case 13:return xi===null?Iu():o.alternate===null&&$t===0&&($t=3),o.flags&=-257,o.flags|=65536,o.lanes=g,u===du?o.flags|=16384:(r=o.updateQueue,r===null?o.updateQueue=new Set([u]):r.add(u),Xh(i,u,g)),!1;case 22:return o.flags|=65536,u===du?o.flags|=16384:(r=o.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=r):(o=r.retryQueue,o===null?r.retryQueue=new Set([u]):o.add(u)),Xh(i,u,g)),!1}throw Error(a(435,o.tag))}return Xh(i,u,g),Iu(),!1}if(nt)return r=ei.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=g,u!==Kf&&(i=Error(a(422),{cause:u}),xo(mi(i,o)))):(u!==Kf&&(r=Error(a(423),{cause:u}),xo(mi(r,o))),i=i.current.alternate,i.flags|=65536,g&=-g,i.lanes|=g,u=mi(u,o),g=_h(i.stateNode,u,g),nh(i,g),$t!==4&&($t=2)),!1;var y=Error(a(520),{cause:u});if(y=mi(y,o),Bo===null?Bo=[y]:Bo.push(y),$t!==4&&($t=2),r===null)return!0;u=mi(u,o),o=r;do{switch(o.tag){case 3:return o.flags|=65536,i=g&-g,o.lanes|=i,i=_h(o.stateNode,u,i),nh(o,i),!1;case 1:if(r=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(er===null||!er.has(y))))return o.flags|=65536,g&=-g,o.lanes|=g,g=Yy(g),Wy(g,i,o,u),nh(o,g),!1}o=o.return}while(o!==null);return!1}var Ch=Error(a(461)),en=!1;function hn(i,r,o,u){r.child=i===null?ey(r,null,o,u):Qr(r,i.child,o,u)}function Xy(i,r,o,u,g){o=o.render;var y=r.ref;if("ref"in u){var S={};for(var _ in u)_!=="ref"&&(S[_]=u[_])}else S=u;return qr(r),u=oh(i,r,o,S,y,g),_=ch(),i!==null&&!en?(uh(i,r,g),ba(i,r,g)):(nt&&_&&Hf(r),r.flags|=1,hn(i,r,u,g),r.child)}function Zy(i,r,o,u,g){if(i===null){var y=o.type;return typeof y=="function"&&!Pf(y)&&y.defaultProps===void 0&&o.compare===null?(r.tag=15,r.type=y,Jy(i,r,y,u,g)):(i=ru(o.type,null,u,r,r.mode,g),i.ref=r.ref,i.return=r,r.child=i)}if(y=i.child,!Lh(i,g)){var S=y.memoizedProps;if(o=o.compare,o=o!==null?o:go,o(S,u)&&i.ref===r.ref)return ba(i,r,g)}return r.flags|=1,i=da(y,u),i.ref=r.ref,i.return=r,r.child=i}function Jy(i,r,o,u,g){if(i!==null){var y=i.memoizedProps;if(go(y,u)&&i.ref===r.ref)if(en=!1,r.pendingProps=u=y,Lh(i,g))(i.flags&131072)!==0&&(en=!0);else return r.lanes=i.lanes,ba(i,r,g)}return Ah(i,r,o,u,g)}function ex(i,r,o,u){var g=u.children,y=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,i!==null){for(u=r.child=i.child,g=0;u!==null;)g=g|u.lanes|u.childLanes,u=u.sibling;u=g&~y}else u=0,r.child=null;return tx(i,r,y,o,u)}if((o&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&cu(r,y!==null?y.cachePool:null),y!==null?iy(r,y):ah(),ay(r);else return u=r.lanes=536870912,tx(i,r,y!==null?y.baseLanes|o:o,o,u)}else y!==null?(cu(r,y.cachePool),iy(r,y),Wa(),r.memoizedState=null):(i!==null&&cu(r,null),ah(),Wa());return hn(i,r,g,o),r.child}function Ro(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function tx(i,r,o,u,g){var y=Zf();return y=y===null?null:{parent:Zt._currentValue,pool:y},r.memoizedState={baseLanes:o,cachePool:y},i!==null&&cu(r,null),ah(),ay(r),i!==null&&Ps(i,r,u,!0),r.childLanes=g,null}function Nu(i,r){return r=Cu({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function nx(i,r,o){return Qr(r,i.child,null,o),i=Nu(r,r.pendingProps),i.flags|=2,ti(r),r.memoizedState=null,i}function FN(i,r,o){var u=r.pendingProps,g=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(nt){if(u.mode==="hidden")return i=Nu(r,u),r.lanes=536870912,Ro(null,i);if(sh(r),(i=Tt)?(i=pv(i,yi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:$a!==null?{id:Gi,overflow:Vi}:null,retryLane:536870912,hydrationErrors:null},o=Ub(i),o.return=r,r.child=o,dn=r,Tt=null)):i=null,i===null)throw qa(r);return r.lanes=536870912,null}return Nu(r,u)}var y=i.memoizedState;if(y!==null){var S=y.dehydrated;if(sh(r),g)if(r.flags&256)r.flags&=-257,r=nx(i,r,o);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(a(558));else if(en||Ps(i,r,o,!1),g=(o&i.childLanes)!==0,en||g){if(u=St,u!==null&&(S=Kt(u,o),S!==0&&S!==y.retryLane))throw y.retryLane=S,Pr(i,S),Pn(u,i,S),Ch;Iu(),r=nx(i,r,o)}else i=y.treeContext,Tt=vi(S.nextSibling),dn=r,nt=!0,Ha=null,yi=!1,i!==null&&$b(r,i),r=Nu(r,u),r.flags|=4096;return r}return i=da(i.child,{mode:u.mode,children:u.children}),i.ref=r.ref,r.child=i,i.return=r,i}function _u(i,r){var o=r.ref;if(o===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(i===null||i.ref!==o)&&(r.flags|=4194816)}}function Ah(i,r,o,u,g){return qr(r),o=oh(i,r,o,u,void 0,g),u=ch(),i!==null&&!en?(uh(i,r,g),ba(i,r,g)):(nt&&u&&Hf(r),r.flags|=1,hn(i,r,o,g),r.child)}function ix(i,r,o,u,g,y){return qr(r),r.updateQueue=null,o=sy(r,u,o,g),ry(i),u=ch(),i!==null&&!en?(uh(i,r,y),ba(i,r,y)):(nt&&u&&Hf(r),r.flags|=1,hn(i,r,o,y),r.child)}function ax(i,r,o,u,g){if(qr(r),r.stateNode===null){var y=Is,S=o.contextType;typeof S=="object"&&S!==null&&(y=fn(S)),y=new o(u,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Nh,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=u,y.state=r.memoizedState,y.refs={},eh(r),S=o.contextType,y.context=typeof S=="object"&&S!==null?fn(S):Is,y.state=r.memoizedState,S=o.getDerivedStateFromProps,typeof S=="function"&&(kh(r,o,S,u),y.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(S=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),S!==y.state&&Nh.enqueueReplaceState(y,y.state,null),_o(r,u,y,g),No(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){y=r.stateNode;var _=r.memoizedProps,I=Wr(o,_);y.props=I;var V=y.context,ae=o.contextType;S=Is,typeof ae=="object"&&ae!==null&&(S=fn(ae));var de=o.getDerivedStateFromProps;ae=typeof de=="function"||typeof y.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,ae||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(_||V!==S)&&qy(r,y,u,S),Ga=!1;var W=r.memoizedState;y.state=W,_o(r,u,y,g),No(),V=r.memoizedState,_||W!==V||Ga?(typeof de=="function"&&(kh(r,o,de,u),V=r.memoizedState),(I=Ga||Hy(r,o,I,u,W,V,S))?(ae||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(r.flags|=4194308)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=V),y.props=u,y.state=V,y.context=S,u=I):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{y=r.stateNode,th(i,r),S=r.memoizedProps,ae=Wr(o,S),y.props=ae,de=r.pendingProps,W=y.context,V=o.contextType,I=Is,typeof V=="object"&&V!==null&&(I=fn(V)),_=o.getDerivedStateFromProps,(V=typeof _=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==de||W!==I)&&qy(r,y,u,I),Ga=!1,W=r.memoizedState,y.state=W,_o(r,u,y,g),No();var Z=r.memoizedState;S!==de||W!==Z||Ga||i!==null&&i.dependencies!==null&&lu(i.dependencies)?(typeof _=="function"&&(kh(r,o,_,u),Z=r.memoizedState),(ae=Ga||Hy(r,o,ae,u,W,Z,I)||i!==null&&i.dependencies!==null&&lu(i.dependencies))?(V||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,Z,I),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,Z,I)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=Z),y.props=u,y.state=Z,y.context=I,u=ae):(typeof y.componentDidUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),u=!1)}return y=u,_u(i,r),u=(r.flags&128)!==0,y||u?(y=r.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),r.flags|=1,i!==null&&u?(r.child=Qr(r,i.child,null,g),r.child=Qr(r,null,o,g)):hn(i,r,o,g),r.memoizedState=y.state,i=r.child):i=ba(i,r,g),i}function rx(i,r,o,u){return $r(),r.flags|=256,hn(i,r,o,u),r.child}var Th={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oh(i){return{baseLanes:i,cachePool:Qb()}}function Rh(i,r,o){return i=i!==null?i.childLanes&~o:0,r&&(i|=ii),i}function sx(i,r,o){var u=r.pendingProps,g=!1,y=(r.flags&128)!==0,S;if((S=y)||(S=i!==null&&i.memoizedState===null?!1:(Qt.current&2)!==0),S&&(g=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,i===null){if(nt){if(g?Ya(r):Wa(),(i=Tt)?(i=pv(i,yi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:$a!==null?{id:Gi,overflow:Vi}:null,retryLane:536870912,hydrationErrors:null},o=Ub(i),o.return=r,r.child=o,dn=r,Tt=null)):i=null,i===null)throw qa(r);return hp(i)?r.lanes=32:r.lanes=536870912,null}var _=u.children;return u=u.fallback,g?(Wa(),g=r.mode,_=Cu({mode:"hidden",children:_},g),u=Fr(u,g,o,null),_.return=r,u.return=r,_.sibling=u,r.child=_,u=r.child,u.memoizedState=Oh(o),u.childLanes=Rh(i,S,o),r.memoizedState=Th,Ro(null,u)):(Ya(r),jh(r,_))}var I=i.memoizedState;if(I!==null&&(_=I.dehydrated,_!==null)){if(y)r.flags&256?(Ya(r),r.flags&=-257,r=Mh(i,r,o)):r.memoizedState!==null?(Wa(),r.child=i.child,r.flags|=128,r=null):(Wa(),_=u.fallback,g=r.mode,u=Cu({mode:"visible",children:u.children},g),_=Fr(_,g,o,null),_.flags|=2,u.return=r,_.return=r,u.sibling=_,r.child=u,Qr(r,i.child,null,o),u=r.child,u.memoizedState=Oh(o),u.childLanes=Rh(i,S,o),r.memoizedState=Th,r=Ro(null,u));else if(Ya(r),hp(_)){if(S=_.nextSibling&&_.nextSibling.dataset,S)var V=S.dgst;S=V,u=Error(a(419)),u.stack="",u.digest=S,xo({value:u,source:null,stack:null}),r=Mh(i,r,o)}else if(en||Ps(i,r,o,!1),S=(o&i.childLanes)!==0,en||S){if(S=St,S!==null&&(u=Kt(S,o),u!==0&&u!==I.retryLane))throw I.retryLane=u,Pr(i,u),Pn(S,i,u),Ch;fp(_)||Iu(),r=Mh(i,r,o)}else fp(_)?(r.flags|=192,r.child=i.child,r=null):(i=I.treeContext,Tt=vi(_.nextSibling),dn=r,nt=!0,Ha=null,yi=!1,i!==null&&$b(r,i),r=jh(r,u.children),r.flags|=4096);return r}return g?(Wa(),_=u.fallback,g=r.mode,I=i.child,V=I.sibling,u=da(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,V!==null?_=da(V,_):(_=Fr(_,g,o,null),_.flags|=2),_.return=r,u.return=r,u.sibling=_,r.child=u,Ro(null,u),u=r.child,_=i.child.memoizedState,_===null?_=Oh(o):(g=_.cachePool,g!==null?(I=Zt._currentValue,g=g.parent!==I?{parent:I,pool:I}:g):g=Qb(),_={baseLanes:_.baseLanes|o,cachePool:g}),u.memoizedState=_,u.childLanes=Rh(i,S,o),r.memoizedState=Th,Ro(i.child,u)):(Ya(r),o=i.child,i=o.sibling,o=da(o,{mode:"visible",children:u.children}),o.return=r,o.sibling=null,i!==null&&(S=r.deletions,S===null?(r.deletions=[i],r.flags|=16):S.push(i)),r.child=o,r.memoizedState=null,o)}function jh(i,r){return r=Cu({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function Cu(i,r){return i=Jn(22,i,null,r),i.lanes=0,i}function Mh(i,r,o){return Qr(r,i.child,null,o),i=jh(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function lx(i,r,o){i.lanes|=r;var u=i.alternate;u!==null&&(u.lanes|=r),Qf(i.return,r,o)}function Dh(i,r,o,u,g,y){var S=i.memoizedState;S===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:g,treeForkCount:y}:(S.isBackwards=r,S.rendering=null,S.renderingStartTime=0,S.last=u,S.tail=o,S.tailMode=g,S.treeForkCount=y)}function ox(i,r,o){var u=r.pendingProps,g=u.revealOrder,y=u.tail;u=u.children;var S=Qt.current,_=(S&2)!==0;if(_?(S=S&1|2,r.flags|=128):S&=1,R(Qt,S),hn(i,r,u,o),u=nt?yo:0,!_&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&lx(i,o,r);else if(i.tag===19)lx(i,o,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(g){case"forwards":for(o=r.child,g=null;o!==null;)i=o.alternate,i!==null&&mu(i)===null&&(g=o),o=o.sibling;o=g,o===null?(g=r.child,r.child=null):(g=o.sibling,o.sibling=null),Dh(r,!1,g,o,y,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,g=r.child,r.child=null;g!==null;){if(i=g.alternate,i!==null&&mu(i)===null){r.child=g;break}i=g.sibling,g.sibling=o,o=g,g=i}Dh(r,!0,o,null,y,u);break;case"together":Dh(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function ba(i,r,o){if(i!==null&&(r.dependencies=i.dependencies),Ja|=r.lanes,(o&r.childLanes)===0)if(i!==null){if(Ps(i,r,o,!1),(o&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(a(153));if(r.child!==null){for(i=r.child,o=da(i,i.pendingProps),r.child=o,o.return=r;i.sibling!==null;)i=i.sibling,o=o.sibling=da(i,i.pendingProps),o.return=r;o.sibling=null}return r.child}function Lh(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&lu(i)))}function $N(i,r,o){switch(r.tag){case 3:K(r,r.stateNode.containerInfo),Ka(r,Zt,i.memoizedState.cache),$r();break;case 27:case 5:Oe(r);break;case 4:K(r,r.stateNode.containerInfo);break;case 10:Ka(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,sh(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ya(r),r.flags|=128,null):(o&r.child.childLanes)!==0?sx(i,r,o):(Ya(r),i=ba(i,r,o),i!==null?i.sibling:null);Ya(r);break;case 19:var g=(i.flags&128)!==0;if(u=(o&r.childLanes)!==0,u||(Ps(i,r,o,!1),u=(o&r.childLanes)!==0),g){if(u)return ox(i,r,o);r.flags|=128}if(g=r.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),R(Qt,Qt.current),u)break;return null;case 22:return r.lanes=0,ex(i,r,o,r.pendingProps);case 24:Ka(r,Zt,i.memoizedState.cache)}return ba(i,r,o)}function cx(i,r,o){if(i!==null)if(i.memoizedProps!==r.pendingProps)en=!0;else{if(!Lh(i,o)&&(r.flags&128)===0)return en=!1,$N(i,r,o);en=(i.flags&131072)!==0}else en=!1,nt&&(r.flags&1048576)!==0&&Fb(r,yo,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(i=Gr(r.elementType),r.type=i,typeof i=="function")Pf(i)?(u=Wr(i,u),r.tag=1,r=ax(null,r,i,u,o)):(r.tag=0,r=Ah(null,r,i,u,o));else{if(i!=null){var g=i.$$typeof;if(g===T){r.tag=11,r=Xy(null,r,i,u,o);break e}else if(g===U){r.tag=14,r=Zy(null,r,i,u,o);break e}}throw r=le(i)||i,Error(a(306,r,""))}}return r;case 0:return Ah(i,r,r.type,r.pendingProps,o);case 1:return u=r.type,g=Wr(u,r.pendingProps),ax(i,r,u,g,o);case 3:e:{if(K(r,r.stateNode.containerInfo),i===null)throw Error(a(387));u=r.pendingProps;var y=r.memoizedState;g=y.element,th(i,r),_o(r,u,null,o);var S=r.memoizedState;if(u=S.cache,Ka(r,Zt,u),u!==y.cache&&Yf(r,[Zt],o,!0),No(),u=S.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=rx(i,r,u,o);break e}else if(u!==g){g=mi(Error(a(424)),r),xo(g),r=rx(i,r,u,o);break e}else{switch(i=r.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Tt=vi(i.firstChild),dn=r,nt=!0,Ha=null,yi=!0,o=ey(r,null,u,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if($r(),u===g){r=ba(i,r,o);break e}hn(i,r,u,o)}r=r.child}return r;case 26:return _u(i,r),i===null?(o=vv(r.type,null,r.pendingProps,null))?r.memoizedState=o:nt||(o=r.type,i=r.pendingProps,u=Hu(fe.current).createElement(o),u[Gt]=r,u[gn]=i,pn(u,o,i),Wt(u),r.stateNode=u):r.memoizedState=vv(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Oe(r),i===null&&nt&&(u=r.stateNode=bv(r.type,r.pendingProps,fe.current),dn=r,yi=!0,g=Tt,ar(r.type)?(pp=g,Tt=vi(u.firstChild)):Tt=g),hn(i,r,r.pendingProps.children,o),_u(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&nt&&((g=u=Tt)&&(u=y_(u,r.type,r.pendingProps,yi),u!==null?(r.stateNode=u,dn=r,Tt=vi(u.firstChild),yi=!1,g=!0):g=!1),g||qa(r)),Oe(r),g=r.type,y=r.pendingProps,S=i!==null?i.memoizedProps:null,u=y.children,cp(g,y)?u=null:S!==null&&cp(g,S)&&(r.flags|=32),r.memoizedState!==null&&(g=oh(i,r,MN,null,null,o),Go._currentValue=g),_u(i,r),hn(i,r,u,o),r.child;case 6:return i===null&&nt&&((i=o=Tt)&&(o=x_(o,r.pendingProps,yi),o!==null?(r.stateNode=o,dn=r,Tt=null,i=!0):i=!1),i||qa(r)),null;case 13:return sx(i,r,o);case 4:return K(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=Qr(r,null,u,o):hn(i,r,u,o),r.child;case 11:return Xy(i,r,r.type,r.pendingProps,o);case 7:return hn(i,r,r.pendingProps,o),r.child;case 8:return hn(i,r,r.pendingProps.children,o),r.child;case 12:return hn(i,r,r.pendingProps.children,o),r.child;case 10:return u=r.pendingProps,Ka(r,r.type,u.value),hn(i,r,u.children,o),r.child;case 9:return g=r.type._context,u=r.pendingProps.children,qr(r),g=fn(g),u=u(g),r.flags|=1,hn(i,r,u,o),r.child;case 14:return Zy(i,r,r.type,r.pendingProps,o);case 15:return Jy(i,r,r.type,r.pendingProps,o);case 19:return ox(i,r,o);case 31:return FN(i,r,o);case 22:return ex(i,r,o,r.pendingProps);case 24:return qr(r),u=fn(Zt),i===null?(g=Zf(),g===null&&(g=St,y=Wf(),g.pooledCache=y,y.refCount++,y!==null&&(g.pooledCacheLanes|=o),g=y),r.memoizedState={parent:u,cache:g},eh(r),Ka(r,Zt,g)):((i.lanes&o)!==0&&(th(i,r),_o(r,null,null,o),No()),g=i.memoizedState,y=r.memoizedState,g.parent!==u?(g={parent:u,cache:u},r.memoizedState=g,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=g),Ka(r,Zt,u)):(u=y.cache,Ka(r,Zt,u),u!==g.cache&&Yf(r,[Zt],o,!0))),hn(i,r,r.pendingProps.children,o),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ya(i){i.flags|=4}function Ih(i,r,o,u,g){if((r=(i.mode&32)!==0)&&(r=!1),r){if(i.flags|=16777216,(g&335544128)===g)if(i.stateNode.complete)i.flags|=8192;else if(Ix())i.flags|=8192;else throw Vr=du,Jf}else i.flags&=-16777217}function ux(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Nv(r))if(Ix())i.flags|=8192;else throw Vr=du,Jf}function Au(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?ze():536870912,i.lanes|=r,Zs|=r)}function jo(i,r){if(!nt)switch(i.tailMode){case"hidden":r=i.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?i.tail=null:o.sibling=null;break;case"collapsed":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:u.sibling=null}}function Ot(i){var r=i.alternate!==null&&i.alternate.child===i.child,o=0,u=0;if(r)for(var g=i.child;g!==null;)o|=g.lanes|g.childLanes,u|=g.subtreeFlags&65011712,u|=g.flags&65011712,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)o|=g.lanes|g.childLanes,u|=g.subtreeFlags,u|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=u,i.childLanes=o,r}function HN(i,r,o){var u=r.pendingProps;switch(qf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ot(r),null;case 1:return Ot(r),null;case 3:return o=r.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),pa(Zt),ue(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(i===null||i.child===null)&&(Us(r)?ya(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Gf())),Ot(r),null;case 26:var g=r.type,y=r.memoizedState;return i===null?(ya(r),y!==null?(Ot(r),ux(r,y)):(Ot(r),Ih(r,g,null,u,o))):y?y!==i.memoizedState?(ya(r),Ot(r),ux(r,y)):(Ot(r),r.flags&=-16777217):(i=i.memoizedProps,i!==u&&ya(r),Ot(r),Ih(r,g,i,u,o)),null;case 27:if(dt(r),o=fe.current,g=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ya(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Ot(r),null}i=ye.current,Us(r)?Hb(r):(i=bv(g,u,o),r.stateNode=i,ya(r))}return Ot(r),null;case 5:if(dt(r),g=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ya(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Ot(r),null}if(y=ye.current,Us(r))Hb(r);else{var S=Hu(fe.current);switch(y){case 1:y=S.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:y=S.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":y=S.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":y=S.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":y=S.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?S.createElement("select",{is:u.is}):S.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?S.createElement(g,{is:u.is}):S.createElement(g)}}y[Gt]=r,y[gn]=u;e:for(S=r.child;S!==null;){if(S.tag===5||S.tag===6)y.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===r)break e;for(;S.sibling===null;){if(S.return===null||S.return===r)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}r.stateNode=y;e:switch(pn(y,g,u),g){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ya(r)}}return Ot(r),Ih(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,o),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==u&&ya(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(i=fe.current,Us(r)){if(i=r.stateNode,o=r.memoizedProps,u=null,g=dn,g!==null)switch(g.tag){case 27:case 5:u=g.memoizedProps}i[Gt]=r,i=!!(i.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||sv(i.nodeValue,o)),i||qa(r,!0)}else i=Hu(i).createTextNode(u),i[Gt]=r,r.stateNode=i}return Ot(r),null;case 31:if(o=r.memoizedState,i===null||i.memoizedState!==null){if(u=Us(r),o!==null){if(i===null){if(!u)throw Error(a(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[Gt]=r}else $r(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ot(r),i=!1}else o=Gf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=o),i=!0;if(!i)return r.flags&256?(ti(r),r):(ti(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Ot(r),null;case 13:if(u=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(g=Us(r),u!==null&&u.dehydrated!==null){if(i===null){if(!g)throw Error(a(318));if(g=r.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(a(317));g[Gt]=r}else $r(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ot(r),g=!1}else g=Gf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=g),g=!0;if(!g)return r.flags&256?(ti(r),r):(ti(r),null)}return ti(r),(r.flags&128)!==0?(r.lanes=o,r):(o=u!==null,i=i!==null&&i.memoizedState!==null,o&&(u=r.child,g=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(g=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==g&&(u.flags|=2048)),o!==i&&o&&(r.child.flags|=8192),Au(r,r.updateQueue),Ot(r),null);case 4:return ue(),i===null&&ap(r.stateNode.containerInfo),Ot(r),null;case 10:return pa(r.type),Ot(r),null;case 19:if(Y(Qt),u=r.memoizedState,u===null)return Ot(r),null;if(g=(r.flags&128)!==0,y=u.rendering,y===null)if(g)jo(u,!1);else{if($t!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(y=mu(i),y!==null){for(r.flags|=128,jo(u,!1),i=y.updateQueue,r.updateQueue=i,Au(r,i),r.subtreeFlags=0,i=o,o=r.child;o!==null;)Bb(o,i),o=o.sibling;return R(Qt,Qt.current&1|2),nt&&fa(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Lt()>Mu&&(r.flags|=128,g=!0,jo(u,!1),r.lanes=4194304)}else{if(!g)if(i=mu(y),i!==null){if(r.flags|=128,g=!0,i=i.updateQueue,r.updateQueue=i,Au(r,i),jo(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!nt)return Ot(r),null}else 2*Lt()-u.renderingStartTime>Mu&&o!==536870912&&(r.flags|=128,g=!0,jo(u,!1),r.lanes=4194304);u.isBackwards?(y.sibling=r.child,r.child=y):(i=u.last,i!==null?i.sibling=y:r.child=y,u.last=y)}return u.tail!==null?(i=u.tail,u.rendering=i,u.tail=i.sibling,u.renderingStartTime=Lt(),i.sibling=null,o=Qt.current,R(Qt,g?o&1|2:o&1),nt&&fa(r,u.treeForkCount),i):(Ot(r),null);case 22:case 23:return ti(r),rh(),u=r.memoizedState!==null,i!==null?i.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(o&536870912)!==0&&(r.flags&128)===0&&(Ot(r),r.subtreeFlags&6&&(r.flags|=8192)):Ot(r),o=r.updateQueue,o!==null&&Au(r,o.retryQueue),o=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==o&&(r.flags|=2048),i!==null&&Y(Kr),null;case 24:return o=null,i!==null&&(o=i.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),pa(Zt),Ot(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function qN(i,r){switch(qf(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return pa(Zt),ue(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return dt(r),null;case 31:if(r.memoizedState!==null){if(ti(r),r.alternate===null)throw Error(a(340));$r()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(ti(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(a(340));$r()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return Y(Qt),null;case 4:return ue(),null;case 10:return pa(r.type),null;case 22:case 23:return ti(r),rh(),i!==null&&Y(Kr),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return pa(Zt),null;case 25:return null;default:return null}}function dx(i,r){switch(qf(r),r.tag){case 3:pa(Zt),ue();break;case 26:case 27:case 5:dt(r);break;case 4:ue();break;case 31:r.memoizedState!==null&&ti(r);break;case 13:ti(r);break;case 19:Y(Qt);break;case 10:pa(r.type);break;case 22:case 23:ti(r),rh(),i!==null&&Y(Kr);break;case 24:pa(Zt)}}function Mo(i,r){try{var o=r.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var g=u.next;o=g;do{if((o.tag&i)===i){u=void 0;var y=o.create,S=o.inst;u=y(),S.destroy=u}o=o.next}while(o!==g)}}catch(_){bt(r,r.return,_)}}function Xa(i,r,o){try{var u=r.updateQueue,g=u!==null?u.lastEffect:null;if(g!==null){var y=g.next;u=y;do{if((u.tag&i)===i){var S=u.inst,_=S.destroy;if(_!==void 0){S.destroy=void 0,g=r;var I=o,V=_;try{V()}catch(ae){bt(g,I,ae)}}}u=u.next}while(u!==y)}}catch(ae){bt(r,r.return,ae)}}function fx(i){var r=i.updateQueue;if(r!==null){var o=i.stateNode;try{ny(r,o)}catch(u){bt(i,i.return,u)}}}function hx(i,r,o){o.props=Wr(i.type,i.memoizedProps),o.state=i.memoizedState;try{o.componentWillUnmount()}catch(u){bt(i,r,u)}}function Do(i,r){try{var o=i.ref;if(o!==null){switch(i.tag){case 26:case 27:case 5:var u=i.stateNode;break;case 30:u=i.stateNode;break;default:u=i.stateNode}typeof o=="function"?i.refCleanup=o(u):o.current=u}}catch(g){bt(i,r,g)}}function Qi(i,r){var o=i.ref,u=i.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(g){bt(i,r,g)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(g){bt(i,r,g)}else o.current=null}function px(i){var r=i.type,o=i.memoizedProps,u=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(g){bt(i,i.return,g)}}function zh(i,r,o){try{var u=i.stateNode;f_(u,i.type,o,r),u[gn]=r}catch(g){bt(i,i.return,g)}}function mx(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ar(i.type)||i.tag===4}function Bh(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||mx(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&ar(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Uh(i,r,o){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(i,r):(r=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,r.appendChild(i),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=xe));else if(u!==4&&(u===27&&ar(i.type)&&(o=i.stateNode,r=null),i=i.child,i!==null))for(Uh(i,r,o),i=i.sibling;i!==null;)Uh(i,r,o),i=i.sibling}function Tu(i,r,o){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?o.insertBefore(i,r):o.appendChild(i);else if(u!==4&&(u===27&&ar(i.type)&&(o=i.stateNode),i=i.child,i!==null))for(Tu(i,r,o),i=i.sibling;i!==null;)Tu(i,r,o),i=i.sibling}function gx(i){var r=i.stateNode,o=i.memoizedProps;try{for(var u=i.type,g=r.attributes;g.length;)r.removeAttributeNode(g[0]);pn(r,u,o),r[Gt]=i,r[gn]=o}catch(y){bt(i,i.return,y)}}var xa=!1,tn=!1,Ph=!1,bx=typeof WeakSet=="function"?WeakSet:Set,ln=null;function KN(i,r){if(i=i.containerInfo,lp=Wu,i=Tb(i),Mf(i)){if("selectionStart"in i)var o={start:i.selectionStart,end:i.selectionEnd};else e:{o=(o=i.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var g=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var S=0,_=-1,I=-1,V=0,ae=0,de=i,W=null;t:for(;;){for(var Z;de!==o||g!==0&&de.nodeType!==3||(_=S+g),de!==y||u!==0&&de.nodeType!==3||(I=S+u),de.nodeType===3&&(S+=de.nodeValue.length),(Z=de.firstChild)!==null;)W=de,de=Z;for(;;){if(de===i)break t;if(W===o&&++V===g&&(_=S),W===y&&++ae===u&&(I=S),(Z=de.nextSibling)!==null)break;de=W,W=de.parentNode}de=Z}o=_===-1||I===-1?null:{start:_,end:I}}else o=null}o=o||{start:0,end:0}}else o=null;for(op={focusedElem:i,selectionRange:o},Wu=!1,ln=r;ln!==null;)if(r=ln,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,ln=i;else for(;ln!==null;){switch(r=ln,y=r.alternate,i=r.flags,r.tag){case 0:if((i&4)!==0&&(i=r.updateQueue,i=i!==null?i.events:null,i!==null))for(o=0;o<i.length;o++)g=i[o],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&y!==null){i=void 0,o=r,g=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var Se=Wr(o.type,g);i=u.getSnapshotBeforeUpdate(Se,y),u.__reactInternalSnapshotBeforeUpdate=i}catch(De){bt(o,o.return,De)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,o=i.nodeType,o===9)dp(i);else if(o===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":dp(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(a(163))}if(i=r.sibling,i!==null){i.return=r.return,ln=i;break}ln=r.return}}function yx(i,r,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:wa(i,o),u&4&&Mo(5,o);break;case 1:if(wa(i,o),u&4)if(i=o.stateNode,r===null)try{i.componentDidMount()}catch(S){bt(o,o.return,S)}else{var g=Wr(o.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(g,r,i.__reactInternalSnapshotBeforeUpdate)}catch(S){bt(o,o.return,S)}}u&64&&fx(o),u&512&&Do(o,o.return);break;case 3:if(wa(i,o),u&64&&(i=o.updateQueue,i!==null)){if(r=null,o.child!==null)switch(o.child.tag){case 27:case 5:r=o.child.stateNode;break;case 1:r=o.child.stateNode}try{ny(i,r)}catch(S){bt(o,o.return,S)}}break;case 27:r===null&&u&4&&gx(o);case 26:case 5:wa(i,o),r===null&&u&4&&px(o),u&512&&Do(o,o.return);break;case 12:wa(i,o);break;case 31:wa(i,o),u&4&&wx(i,o);break;case 13:wa(i,o),u&4&&Ex(i,o),u&64&&(i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(o=e_.bind(null,o),v_(i,o))));break;case 22:if(u=o.memoizedState!==null||xa,!u){r=r!==null&&r.memoizedState!==null||tn,g=xa;var y=tn;xa=u,(tn=r)&&!y?Ea(i,o,(o.subtreeFlags&8772)!==0):wa(i,o),xa=g,tn=y}break;case 30:break;default:wa(i,o)}}function xx(i){var r=i.alternate;r!==null&&(i.alternate=null,xx(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&io(r)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var jt=null,In=!1;function va(i,r,o){for(o=o.child;o!==null;)vx(i,r,o),o=o.sibling}function vx(i,r,o){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(cn,o)}catch{}switch(o.tag){case 26:tn||Qi(o,r),va(i,r,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:tn||Qi(o,r);var u=jt,g=In;ar(o.type)&&(jt=o.stateNode,In=!1),va(i,r,o),Ho(o.stateNode),jt=u,In=g;break;case 5:tn||Qi(o,r);case 6:if(u=jt,g=In,jt=null,va(i,r,o),jt=u,In=g,jt!==null)if(In)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(o.stateNode)}catch(y){bt(o,r,y)}else try{jt.removeChild(o.stateNode)}catch(y){bt(o,r,y)}break;case 18:jt!==null&&(In?(i=jt,fv(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,o.stateNode),sl(i)):fv(jt,o.stateNode));break;case 4:u=jt,g=In,jt=o.stateNode.containerInfo,In=!0,va(i,r,o),jt=u,In=g;break;case 0:case 11:case 14:case 15:Xa(2,o,r),tn||Xa(4,o,r),va(i,r,o);break;case 1:tn||(Qi(o,r),u=o.stateNode,typeof u.componentWillUnmount=="function"&&hx(o,r,u)),va(i,r,o);break;case 21:va(i,r,o);break;case 22:tn=(u=tn)||o.memoizedState!==null,va(i,r,o),tn=u;break;default:va(i,r,o)}}function wx(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{sl(i)}catch(o){bt(r,r.return,o)}}}function Ex(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{sl(i)}catch(o){bt(r,r.return,o)}}function GN(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new bx),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new bx),r;default:throw Error(a(435,i.tag))}}function Ou(i,r){var o=GN(i);r.forEach(function(u){if(!o.has(u)){o.add(u);var g=t_.bind(null,i,u);u.then(g,g)}})}function zn(i,r){var o=r.deletions;if(o!==null)for(var u=0;u<o.length;u++){var g=o[u],y=i,S=r,_=S;e:for(;_!==null;){switch(_.tag){case 27:if(ar(_.type)){jt=_.stateNode,In=!1;break e}break;case 5:jt=_.stateNode,In=!1;break e;case 3:case 4:jt=_.stateNode.containerInfo,In=!0;break e}_=_.return}if(jt===null)throw Error(a(160));vx(y,S,g),jt=null,In=!1,y=g.alternate,y!==null&&(y.return=null),g.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Sx(r,i),r=r.sibling}var Mi=null;function Sx(i,r){var o=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:zn(r,i),Bn(i),u&4&&(Xa(3,i,i.return),Mo(3,i),Xa(5,i,i.return));break;case 1:zn(r,i),Bn(i),u&512&&(tn||o===null||Qi(o,o.return)),u&64&&xa&&(i=i.updateQueue,i!==null&&(u=i.callbacks,u!==null&&(o=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var g=Mi;if(zn(r,i),Bn(i),u&512&&(tn||o===null||Qi(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=i.memoizedState,o===null)if(u===null)if(i.stateNode===null){e:{u=i.type,o=i.memoizedProps,g=g.ownerDocument||g;t:switch(u){case"title":y=g.getElementsByTagName("title")[0],(!y||y[Dr]||y[Gt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=g.createElement(u),g.head.insertBefore(y,g.querySelector("head > title"))),pn(y,u,o),y[Gt]=i,Wt(y),u=y;break e;case"link":var S=Sv("link","href",g).get(u+(o.href||""));if(S){for(var _=0;_<S.length;_++)if(y=S[_],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){S.splice(_,1);break t}}y=g.createElement(u),pn(y,u,o),g.head.appendChild(y);break;case"meta":if(S=Sv("meta","content",g).get(u+(o.content||""))){for(_=0;_<S.length;_++)if(y=S[_],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){S.splice(_,1);break t}}y=g.createElement(u),pn(y,u,o),g.head.appendChild(y);break;default:throw Error(a(468,u))}y[Gt]=i,Wt(y),u=y}i.stateNode=u}else kv(g,i.type,i.stateNode);else i.stateNode=Ev(g,u,i.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?kv(g,i.type,i.stateNode):Ev(g,u,i.memoizedProps)):u===null&&i.stateNode!==null&&zh(i,i.memoizedProps,o.memoizedProps)}break;case 27:zn(r,i),Bn(i),u&512&&(tn||o===null||Qi(o,o.return)),o!==null&&u&4&&zh(i,i.memoizedProps,o.memoizedProps);break;case 5:if(zn(r,i),Bn(i),u&512&&(tn||o===null||Qi(o,o.return)),i.flags&32){g=i.stateNode;try{Le(g,"")}catch(Se){bt(i,i.return,Se)}}u&4&&i.stateNode!=null&&(g=i.memoizedProps,zh(i,g,o!==null?o.memoizedProps:g)),u&1024&&(Ph=!0);break;case 6:if(zn(r,i),Bn(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,o=i.stateNode;try{o.nodeValue=u}catch(Se){bt(i,i.return,Se)}}break;case 3:if(Gu=null,g=Mi,Mi=qu(r.containerInfo),zn(r,i),Mi=g,Bn(i),u&4&&o!==null&&o.memoizedState.isDehydrated)try{sl(r.containerInfo)}catch(Se){bt(i,i.return,Se)}Ph&&(Ph=!1,kx(i));break;case 4:u=Mi,Mi=qu(i.stateNode.containerInfo),zn(r,i),Bn(i),Mi=u;break;case 12:zn(r,i),Bn(i);break;case 31:zn(r,i),Bn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,Ou(i,u)));break;case 13:zn(r,i),Bn(i),i.child.flags&8192&&i.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(ju=Lt()),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,Ou(i,u)));break;case 22:g=i.memoizedState!==null;var I=o!==null&&o.memoizedState!==null,V=xa,ae=tn;if(xa=V||g,tn=ae||I,zn(r,i),tn=ae,xa=V,Bn(i),u&8192)e:for(r=i.stateNode,r._visibility=g?r._visibility&-2:r._visibility|1,g&&(o===null||I||xa||tn||Xr(i)),o=null,r=i;;){if(r.tag===5||r.tag===26){if(o===null){I=o=r;try{if(y=I.stateNode,g)S=y.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{_=I.stateNode;var de=I.memoizedProps.style,W=de!=null&&de.hasOwnProperty("display")?de.display:null;_.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(Se){bt(I,I.return,Se)}}}else if(r.tag===6){if(o===null){I=r;try{I.stateNode.nodeValue=g?"":I.memoizedProps}catch(Se){bt(I,I.return,Se)}}}else if(r.tag===18){if(o===null){I=r;try{var Z=I.stateNode;g?hv(Z,!0):hv(I.stateNode,!1)}catch(Se){bt(I,I.return,Se)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===i)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;o===r&&(o=null),r=r.return}o===r&&(o=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=i.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Ou(i,o))));break;case 19:zn(r,i),Bn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,Ou(i,u)));break;case 30:break;case 21:break;default:zn(r,i),Bn(i)}}function Bn(i){var r=i.flags;if(r&2){try{for(var o,u=i.return;u!==null;){if(mx(u)){o=u;break}u=u.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var g=o.stateNode,y=Bh(i);Tu(i,y,g);break;case 5:var S=o.stateNode;o.flags&32&&(Le(S,""),o.flags&=-33);var _=Bh(i);Tu(i,_,S);break;case 3:case 4:var I=o.stateNode.containerInfo,V=Bh(i);Uh(i,V,I);break;default:throw Error(a(161))}}catch(ae){bt(i,i.return,ae)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function kx(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;kx(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),i=i.sibling}}function wa(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)yx(i,r.alternate,r),r=r.sibling}function Xr(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:Xa(4,r,r.return),Xr(r);break;case 1:Qi(r,r.return);var o=r.stateNode;typeof o.componentWillUnmount=="function"&&hx(r,r.return,o),Xr(r);break;case 27:Ho(r.stateNode);case 26:case 5:Qi(r,r.return),Xr(r);break;case 22:r.memoizedState===null&&Xr(r);break;case 30:Xr(r);break;default:Xr(r)}i=i.sibling}}function Ea(i,r,o){for(o=o&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,g=i,y=r,S=y.flags;switch(y.tag){case 0:case 11:case 15:Ea(g,y,o),Mo(4,y);break;case 1:if(Ea(g,y,o),u=y,g=u.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(V){bt(u,u.return,V)}if(u=y,g=u.updateQueue,g!==null){var _=u.stateNode;try{var I=g.shared.hiddenCallbacks;if(I!==null)for(g.shared.hiddenCallbacks=null,g=0;g<I.length;g++)ty(I[g],_)}catch(V){bt(u,u.return,V)}}o&&S&64&&fx(y),Do(y,y.return);break;case 27:gx(y);case 26:case 5:Ea(g,y,o),o&&u===null&&S&4&&px(y),Do(y,y.return);break;case 12:Ea(g,y,o);break;case 31:Ea(g,y,o),o&&S&4&&wx(g,y);break;case 13:Ea(g,y,o),o&&S&4&&Ex(g,y);break;case 22:y.memoizedState===null&&Ea(g,y,o),Do(y,y.return);break;case 30:break;default:Ea(g,y,o)}r=r.sibling}}function Fh(i,r){var o=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==o&&(i!=null&&i.refCount++,o!=null&&vo(o))}function $h(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&vo(i))}function Di(i,r,o,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Nx(i,r,o,u),r=r.sibling}function Nx(i,r,o,u){var g=r.flags;switch(r.tag){case 0:case 11:case 15:Di(i,r,o,u),g&2048&&Mo(9,r);break;case 1:Di(i,r,o,u);break;case 3:Di(i,r,o,u),g&2048&&(i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&vo(i)));break;case 12:if(g&2048){Di(i,r,o,u),i=r.stateNode;try{var y=r.memoizedProps,S=y.id,_=y.onPostCommit;typeof _=="function"&&_(S,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(I){bt(r,r.return,I)}}else Di(i,r,o,u);break;case 31:Di(i,r,o,u);break;case 13:Di(i,r,o,u);break;case 23:break;case 22:y=r.stateNode,S=r.alternate,r.memoizedState!==null?y._visibility&2?Di(i,r,o,u):Lo(i,r):y._visibility&2?Di(i,r,o,u):(y._visibility|=2,Ys(i,r,o,u,(r.subtreeFlags&10256)!==0||!1)),g&2048&&Fh(S,r);break;case 24:Di(i,r,o,u),g&2048&&$h(r.alternate,r);break;default:Di(i,r,o,u)}}function Ys(i,r,o,u,g){for(g=g&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var y=i,S=r,_=o,I=u,V=S.flags;switch(S.tag){case 0:case 11:case 15:Ys(y,S,_,I,g),Mo(8,S);break;case 23:break;case 22:var ae=S.stateNode;S.memoizedState!==null?ae._visibility&2?Ys(y,S,_,I,g):Lo(y,S):(ae._visibility|=2,Ys(y,S,_,I,g)),g&&V&2048&&Fh(S.alternate,S);break;case 24:Ys(y,S,_,I,g),g&&V&2048&&$h(S.alternate,S);break;default:Ys(y,S,_,I,g)}r=r.sibling}}function Lo(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var o=i,u=r,g=u.flags;switch(u.tag){case 22:Lo(o,u),g&2048&&Fh(u.alternate,u);break;case 24:Lo(o,u),g&2048&&$h(u.alternate,u);break;default:Lo(o,u)}r=r.sibling}}var Io=8192;function Ws(i,r,o){if(i.subtreeFlags&Io)for(i=i.child;i!==null;)_x(i,r,o),i=i.sibling}function _x(i,r,o){switch(i.tag){case 26:Ws(i,r,o),i.flags&Io&&i.memoizedState!==null&&j_(o,Mi,i.memoizedState,i.memoizedProps);break;case 5:Ws(i,r,o);break;case 3:case 4:var u=Mi;Mi=qu(i.stateNode.containerInfo),Ws(i,r,o),Mi=u;break;case 22:i.memoizedState===null&&(u=i.alternate,u!==null&&u.memoizedState!==null?(u=Io,Io=16777216,Ws(i,r,o),Io=u):Ws(i,r,o));break;default:Ws(i,r,o)}}function Cx(i){var r=i.alternate;if(r!==null&&(i=r.child,i!==null)){r.child=null;do r=i.sibling,i.sibling=null,i=r;while(i!==null)}}function zo(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var o=0;o<r.length;o++){var u=r[o];ln=u,Tx(u,i)}Cx(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Ax(i),i=i.sibling}function Ax(i){switch(i.tag){case 0:case 11:case 15:zo(i),i.flags&2048&&Xa(9,i,i.return);break;case 3:zo(i);break;case 12:zo(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,Ru(i)):zo(i);break;default:zo(i)}}function Ru(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var o=0;o<r.length;o++){var u=r[o];ln=u,Tx(u,i)}Cx(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Xa(8,r,r.return),Ru(r);break;case 22:o=r.stateNode,o._visibility&2&&(o._visibility&=-3,Ru(r));break;default:Ru(r)}i=i.sibling}}function Tx(i,r){for(;ln!==null;){var o=ln;switch(o.tag){case 0:case 11:case 15:Xa(8,o,r);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:vo(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,ln=u;else e:for(o=i;ln!==null;){u=ln;var g=u.sibling,y=u.return;if(xx(u),u===o){ln=null;break e}if(g!==null){g.return=y,ln=g;break e}ln=y}}}var VN={getCacheForType:function(i){var r=fn(Zt),o=r.data.get(i);return o===void 0&&(o=i(),r.data.set(i,o)),o},cacheSignal:function(){return fn(Zt).controller.signal}},QN=typeof WeakMap=="function"?WeakMap:Map,ot=0,St=null,Ye=null,Je=0,gt=0,ni=null,Za=!1,Xs=!1,Hh=!1,Sa=0,$t=0,Ja=0,Zr=0,qh=0,ii=0,Zs=0,Bo=null,Un=null,Kh=!1,ju=0,Ox=0,Mu=1/0,Du=null,er=null,an=0,tr=null,Js=null,ka=0,Gh=0,Vh=null,Rx=null,Uo=0,Qh=null;function ai(){return(ot&2)!==0&&Je!==0?Je&-Je:H.T!==null?ep():Ns()}function jx(){if(ii===0)if((Je&536870912)===0||nt){var i=ks;ks<<=1,(ks&3932160)===0&&(ks=262144),ii=i}else ii=536870912;return i=ei.current,i!==null&&(i.flags|=32),ii}function Pn(i,r,o){(i===St&&(gt===2||gt===9)||i.cancelPendingCommit!==null)&&(el(i,0),nr(i,Je,ii,!1)),Et(i,o),((ot&2)===0||i!==St)&&(i===St&&((ot&2)===0&&(Zr|=o),$t===4&&nr(i,Je,ii,!1)),Yi(i))}function Mx(i,r,o){if((ot&6)!==0)throw Error(a(327));var u=!o&&(r&127)===0&&(r&i.expiredLanes)===0||re(i,r),g=u?XN(i,r):Wh(i,r,!0),y=u;do{if(g===0){Xs&&!u&&nr(i,r,0,!1);break}else{if(o=i.current.alternate,y&&!YN(o)){g=Wh(i,r,!1),y=!1;continue}if(g===2){if(y=r,i.errorRecoveryDisabledLanes&y)var S=0;else S=i.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var _=i;g=Bo;var I=_.current.memoizedState.isDehydrated;if(I&&(el(_,S).flags|=256),S=Wh(_,S,!1),S!==2){if(Hh&&!I){_.errorRecoveryDisabledLanes|=y,Zr|=y,g=4;break e}y=Un,Un=g,y!==null&&(Un===null?Un=y:Un.push.apply(Un,y))}g=S}if(y=!1,g!==2)continue}}if(g===1){el(i,0),nr(i,r,0,!0);break}e:{switch(u=i,y=g,y){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:nr(u,r,ii,!Za);break e;case 2:Un=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(g=ju+300-Lt(),10<g)){if(nr(u,r,ii,!Za),B(u,0,!0)!==0)break e;ka=r,u.timeoutHandle=uv(Dx.bind(null,u,o,Un,Du,Kh,r,ii,Zr,Zs,Za,y,"Throttled",-0,0),g);break e}Dx(u,o,Un,Du,Kh,r,ii,Zr,Zs,Za,y,null,-0,0)}}break}while(!0);Yi(i)}function Dx(i,r,o,u,g,y,S,_,I,V,ae,de,W,Z){if(i.timeoutHandle=-1,de=r.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xe},_x(r,y,de);var Se=(y&62914560)===y?ju-Lt():(y&4194048)===y?Ox-Lt():0;if(Se=M_(de,Se),Se!==null){ka=y,i.cancelPendingCommit=Se($x.bind(null,i,r,y,o,u,g,S,_,I,ae,de,null,W,Z)),nr(i,y,S,!V);return}}$x(i,r,y,o,u,g,S,_,I)}function YN(i){for(var r=i;;){var o=r.tag;if((o===0||o===11||o===15)&&r.flags&16384&&(o=r.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var g=o[u],y=g.getSnapshot;g=g.value;try{if(!Zn(y(),g))return!1}catch{return!1}}if(o=r.child,r.subtreeFlags&16384&&o!==null)o.return=r,r=o;else{if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function nr(i,r,o,u){r&=~qh,r&=~Zr,i.suspendedLanes|=r,i.pingedLanes&=~r,u&&(i.warmLanes|=r),u=i.expirationTimes;for(var g=r;0<g;){var y=31-ht(g),S=1<<y;u[y]=-1,g&=~S}o!==0&&Ee(i,o,r)}function Lu(){return(ot&6)===0?(Po(0),!1):!0}function Yh(){if(Ye!==null){if(gt===0)var i=Ye.return;else i=Ye,ha=Hr=null,dh(i),qs=null,Eo=0,i=Ye;for(;i!==null;)dx(i.alternate,i),i=i.return;Ye=null}}function el(i,r){var o=i.timeoutHandle;o!==-1&&(i.timeoutHandle=-1,m_(o)),o=i.cancelPendingCommit,o!==null&&(i.cancelPendingCommit=null,o()),ka=0,Yh(),St=i,Ye=o=da(i.current,null),Je=r,gt=0,ni=null,Za=!1,Xs=re(i,r),Hh=!1,Zs=ii=qh=Zr=Ja=$t=0,Un=Bo=null,Kh=!1,(r&8)!==0&&(r|=r&32);var u=i.entangledLanes;if(u!==0)for(i=i.entanglements,u&=r;0<u;){var g=31-ht(u),y=1<<g;r|=i[g],u&=~y}return Sa=r,nu(),o}function Lx(i,r){He=null,H.H=Oo,r===Hs||r===uu?(r=Xb(),gt=3):r===Jf?(r=Xb(),gt=4):gt=r===Ch?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ni=r,Ye===null&&($t=1,ku(i,mi(r,i.current)))}function Ix(){var i=ei.current;return i===null?!0:(Je&4194048)===Je?xi===null:(Je&62914560)===Je||(Je&536870912)!==0?i===xi:!1}function zx(){var i=H.H;return H.H=Oo,i===null?Oo:i}function Bx(){var i=H.A;return H.A=VN,i}function Iu(){$t=4,Za||(Je&4194048)!==Je&&ei.current!==null||(Xs=!0),(Ja&134217727)===0&&(Zr&134217727)===0||St===null||nr(St,Je,ii,!1)}function Wh(i,r,o){var u=ot;ot|=2;var g=zx(),y=Bx();(St!==i||Je!==r)&&(Du=null,el(i,r)),r=!1;var S=$t;e:do try{if(gt!==0&&Ye!==null){var _=Ye,I=ni;switch(gt){case 8:Yh(),S=6;break e;case 3:case 2:case 9:case 6:ei.current===null&&(r=!0);var V=gt;if(gt=0,ni=null,tl(i,_,I,V),o&&Xs){S=0;break e}break;default:V=gt,gt=0,ni=null,tl(i,_,I,V)}}WN(),S=$t;break}catch(ae){Lx(i,ae)}while(!0);return r&&i.shellSuspendCounter++,ha=Hr=null,ot=u,H.H=g,H.A=y,Ye===null&&(St=null,Je=0,nu()),S}function WN(){for(;Ye!==null;)Ux(Ye)}function XN(i,r){var o=ot;ot|=2;var u=zx(),g=Bx();St!==i||Je!==r?(Du=null,Mu=Lt()+500,el(i,r)):Xs=re(i,r);e:do try{if(gt!==0&&Ye!==null){r=Ye;var y=ni;t:switch(gt){case 1:gt=0,ni=null,tl(i,r,y,1);break;case 2:case 9:if(Yb(y)){gt=0,ni=null,Px(r);break}r=function(){gt!==2&&gt!==9||St!==i||(gt=7),Yi(i)},y.then(r,r);break e;case 3:gt=7;break e;case 4:gt=5;break e;case 7:Yb(y)?(gt=0,ni=null,Px(r)):(gt=0,ni=null,tl(i,r,y,7));break;case 5:var S=null;switch(Ye.tag){case 26:S=Ye.memoizedState;case 5:case 27:var _=Ye;if(S?Nv(S):_.stateNode.complete){gt=0,ni=null;var I=_.sibling;if(I!==null)Ye=I;else{var V=_.return;V!==null?(Ye=V,zu(V)):Ye=null}break t}}gt=0,ni=null,tl(i,r,y,5);break;case 6:gt=0,ni=null,tl(i,r,y,6);break;case 8:Yh(),$t=6;break e;default:throw Error(a(462))}}ZN();break}catch(ae){Lx(i,ae)}while(!0);return ha=Hr=null,H.H=u,H.A=g,ot=o,Ye!==null?0:(St=null,Je=0,nu(),$t)}function ZN(){for(;Ye!==null&&!to();)Ux(Ye)}function Ux(i){var r=cx(i.alternate,i,Sa);i.memoizedProps=i.pendingProps,r===null?zu(i):Ye=r}function Px(i){var r=i,o=r.alternate;switch(r.tag){case 15:case 0:r=ix(o,r,r.pendingProps,r.type,void 0,Je);break;case 11:r=ix(o,r,r.pendingProps,r.type.render,r.ref,Je);break;case 5:dh(r);default:dx(o,r),r=Ye=Bb(r,Sa),r=cx(o,r,Sa)}i.memoizedProps=i.pendingProps,r===null?zu(i):Ye=r}function tl(i,r,o,u){ha=Hr=null,dh(r),qs=null,Eo=0;var g=r.return;try{if(PN(i,g,r,o,Je)){$t=1,ku(i,mi(o,i.current)),Ye=null;return}}catch(y){if(g!==null)throw Ye=g,y;$t=1,ku(i,mi(o,i.current)),Ye=null;return}r.flags&32768?(nt||u===1?i=!0:Xs||(Je&536870912)!==0?i=!1:(Za=i=!0,(u===2||u===9||u===3||u===6)&&(u=ei.current,u!==null&&u.tag===13&&(u.flags|=16384))),Fx(r,i)):zu(r)}function zu(i){var r=i;do{if((r.flags&32768)!==0){Fx(r,Za);return}i=r.return;var o=HN(r.alternate,r,Sa);if(o!==null){Ye=o;return}if(r=r.sibling,r!==null){Ye=r;return}Ye=r=i}while(r!==null);$t===0&&($t=5)}function Fx(i,r){do{var o=qN(i.alternate,i);if(o!==null){o.flags&=32767,Ye=o;return}if(o=i.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!r&&(i=i.sibling,i!==null)){Ye=i;return}Ye=i=o}while(i!==null);$t=6,Ye=null}function $x(i,r,o,u,g,y,S,_,I){i.cancelPendingCommit=null;do Bu();while(an!==0);if((ot&6)!==0)throw Error(a(327));if(r!==null){if(r===i.current)throw Error(a(177));if(y=r.lanes|r.childLanes,y|=Bf,ke(i,o,y,S,_,I),i===St&&(Ye=St=null,Je=0),Js=r,tr=i,ka=o,Gh=y,Vh=g,Rx=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,n_(Me,function(){return Vx(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,g=oe.p,oe.p=2,S=ot,ot|=4;try{KN(i,r,o)}finally{ot=S,oe.p=g,H.T=u}}an=1,Hx(),qx(),Kx()}}function Hx(){if(an===1){an=0;var i=tr,r=Js,o=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||o){o=H.T,H.T=null;var u=oe.p;oe.p=2;var g=ot;ot|=4;try{Sx(r,i);var y=op,S=Tb(i.containerInfo),_=y.focusedElem,I=y.selectionRange;if(S!==_&&_&&_.ownerDocument&&Ab(_.ownerDocument.documentElement,_)){if(I!==null&&Mf(_)){var V=I.start,ae=I.end;if(ae===void 0&&(ae=V),"selectionStart"in _)_.selectionStart=V,_.selectionEnd=Math.min(ae,_.value.length);else{var de=_.ownerDocument||document,W=de&&de.defaultView||window;if(W.getSelection){var Z=W.getSelection(),Se=_.textContent.length,De=Math.min(I.start,Se),vt=I.end===void 0?De:Math.min(I.end,Se);!Z.extend&&De>vt&&(S=vt,vt=De,De=S);var q=Cb(_,De),F=Cb(_,vt);if(q&&F&&(Z.rangeCount!==1||Z.anchorNode!==q.node||Z.anchorOffset!==q.offset||Z.focusNode!==F.node||Z.focusOffset!==F.offset)){var G=de.createRange();G.setStart(q.node,q.offset),Z.removeAllRanges(),De>vt?(Z.addRange(G),Z.extend(F.node,F.offset)):(G.setEnd(F.node,F.offset),Z.addRange(G))}}}}for(de=[],Z=_;Z=Z.parentNode;)Z.nodeType===1&&de.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<de.length;_++){var se=de[_];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Wu=!!lp,op=lp=null}finally{ot=g,oe.p=u,H.T=o}}i.current=r,an=2}}function qx(){if(an===2){an=0;var i=tr,r=Js,o=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||o){o=H.T,H.T=null;var u=oe.p;oe.p=2;var g=ot;ot|=4;try{yx(i,r.alternate,r)}finally{ot=g,oe.p=u,H.T=o}}an=3}}function Kx(){if(an===4||an===3){an=0,Es();var i=tr,r=Js,o=ka,u=Rx;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?an=5:(an=0,Js=tr=null,Gx(i,i.pendingLanes));var g=i.pendingLanes;if(g===0&&(er=null),sa(o),r=r.stateNode,Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(cn,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=H.T,g=oe.p,oe.p=2,H.T=null;try{for(var y=i.onRecoverableError,S=0;S<u.length;S++){var _=u[S];y(_.value,{componentStack:_.stack})}}finally{H.T=r,oe.p=g}}(ka&3)!==0&&Bu(),Yi(i),g=i.pendingLanes,(o&261930)!==0&&(g&42)!==0?i===Qh?Uo++:(Uo=0,Qh=i):Uo=0,Po(0)}}function Gx(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,vo(r)))}function Bu(){return Hx(),qx(),Kx(),Vx()}function Vx(){if(an!==5)return!1;var i=tr,r=Gh;Gh=0;var o=sa(ka),u=H.T,g=oe.p;try{oe.p=32>o?32:o,H.T=null,o=Vh,Vh=null;var y=tr,S=ka;if(an=0,Js=tr=null,ka=0,(ot&6)!==0)throw Error(a(331));var _=ot;if(ot|=4,Ax(y.current),Nx(y,y.current,S,o),ot=_,Po(0,!1),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(cn,y)}catch{}return!0}finally{oe.p=g,H.T=u,Gx(i,r)}}function Qx(i,r,o){r=mi(o,r),r=_h(i.stateNode,r,2),i=Qa(i,r,2),i!==null&&(Et(i,2),Yi(i))}function bt(i,r,o){if(i.tag===3)Qx(i,i,o);else for(;r!==null;){if(r.tag===3){Qx(r,i,o);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(er===null||!er.has(u))){i=mi(o,i),o=Yy(2),u=Qa(r,o,2),u!==null&&(Wy(o,u,r,i),Et(u,2),Yi(u));break}}r=r.return}}function Xh(i,r,o){var u=i.pingCache;if(u===null){u=i.pingCache=new QN;var g=new Set;u.set(r,g)}else g=u.get(r),g===void 0&&(g=new Set,u.set(r,g));g.has(o)||(Hh=!0,g.add(o),i=JN.bind(null,i,r,o),r.then(i,i))}function JN(i,r,o){var u=i.pingCache;u!==null&&u.delete(r),i.pingedLanes|=i.suspendedLanes&o,i.warmLanes&=~o,St===i&&(Je&o)===o&&($t===4||$t===3&&(Je&62914560)===Je&&300>Lt()-ju?(ot&2)===0&&el(i,0):qh|=o,Zs===Je&&(Zs=0)),Yi(i)}function Yx(i,r){r===0&&(r=ze()),i=Pr(i,r),i!==null&&(Et(i,r),Yi(i))}function e_(i){var r=i.memoizedState,o=0;r!==null&&(o=r.retryLane),Yx(i,o)}function t_(i,r){var o=0;switch(i.tag){case 31:case 13:var u=i.stateNode,g=i.memoizedState;g!==null&&(o=g.retryLane);break;case 19:u=i.stateNode;break;case 22:u=i.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),Yx(i,o)}function n_(i,r){return ra(i,r)}var Uu=null,nl=null,Zh=!1,Pu=!1,Jh=!1,ir=0;function Yi(i){i!==nl&&i.next===null&&(nl===null?Uu=nl=i:nl=nl.next=i),Pu=!0,Zh||(Zh=!0,a_())}function Po(i,r){if(!Jh&&Pu){Jh=!0;do for(var o=!1,u=Uu;u!==null;){if(i!==0){var g=u.pendingLanes;if(g===0)var y=0;else{var S=u.suspendedLanes,_=u.pingedLanes;y=(1<<31-ht(42|i)+1)-1,y&=g&~(S&~_),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,Jx(u,y))}else y=Je,y=B(u,u===St?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||re(u,y)||(o=!0,Jx(u,y));u=u.next}while(o);Jh=!1}}function i_(){Wx()}function Wx(){Pu=Zh=!1;var i=0;ir!==0&&p_()&&(i=ir);for(var r=Lt(),o=null,u=Uu;u!==null;){var g=u.next,y=Xx(u,r);y===0?(u.next=null,o===null?Uu=g:o.next=g,g===null&&(nl=o)):(o=u,(i!==0||(y&3)!==0)&&(Pu=!0)),u=g}an!==0&&an!==5||Po(i),ir!==0&&(ir=0)}function Xx(i,r){for(var o=i.suspendedLanes,u=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes&-62914561;0<y;){var S=31-ht(y),_=1<<S,I=g[S];I===-1?((_&o)===0||(_&u)!==0)&&(g[S]=ve(_,r)):I<=r&&(i.expiredLanes|=_),y&=~_}if(r=St,o=Je,o=B(i,i===r?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,o===0||i===r&&(gt===2||gt===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&Rr(u),i.callbackNode=null,i.callbackPriority=0;if((o&3)===0||re(i,o)){if(r=o&-o,r===i.callbackPriority)return r;switch(u!==null&&Rr(u),sa(o)){case 2:case 8:o=be;break;case 32:o=Me;break;case 268435456:o=rt;break;default:o=Me}return u=Zx.bind(null,i),o=ra(o,u),i.callbackPriority=r,i.callbackNode=o,r}return u!==null&&u!==null&&Rr(u),i.callbackPriority=2,i.callbackNode=null,2}function Zx(i,r){if(an!==0&&an!==5)return i.callbackNode=null,i.callbackPriority=0,null;var o=i.callbackNode;if(Bu()&&i.callbackNode!==o)return null;var u=Je;return u=B(i,i===St?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(Mx(i,u,r),Xx(i,Lt()),i.callbackNode!=null&&i.callbackNode===o?Zx.bind(null,i):null)}function Jx(i,r){if(Bu())return null;Mx(i,r,!0)}function a_(){g_(function(){(ot&6)!==0?ra(ie,i_):Wx()})}function ep(){if(ir===0){var i=Fs;i===0&&(i=jr,jr<<=1,(jr&261888)===0&&(jr=256)),ir=i}return ir}function ev(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Pa(""+i)}function tv(i,r){var o=r.ownerDocument.createElement("input");return o.name=r.name,o.value=r.value,i.id&&o.setAttribute("form",i.id),r.parentNode.insertBefore(o,r),i=new FormData(i),o.parentNode.removeChild(o),i}function r_(i,r,o,u,g){if(r==="submit"&&o&&o.stateNode===g){var y=ev((g[gn]||null).action),S=u.submitter;S&&(r=(r=S[gn]||null)?ev(r.formAction):S.getAttribute("formAction"),r!==null&&(y=r,S=null));var _=new Zc("action","action",null,u,g);i.push({event:_,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ir!==0){var I=S?tv(g,S):new FormData(g);vh(o,{pending:!0,data:I,method:g.method,action:y},null,I)}}else typeof y=="function"&&(_.preventDefault(),I=S?tv(g,S):new FormData(g),vh(o,{pending:!0,data:I,method:g.method,action:y},y,I))},currentTarget:g}]})}}for(var tp=0;tp<zf.length;tp++){var np=zf[tp],s_=np.toLowerCase(),l_=np[0].toUpperCase()+np.slice(1);ji(s_,"on"+l_)}ji(jb,"onAnimationEnd"),ji(Mb,"onAnimationIteration"),ji(Db,"onAnimationStart"),ji("dblclick","onDoubleClick"),ji("focusin","onFocus"),ji("focusout","onBlur"),ji(SN,"onTransitionRun"),ji(kN,"onTransitionStart"),ji(NN,"onTransitionCancel"),ji(Lb,"onTransitionEnd"),pe("onMouseEnter",["mouseout","mouseover"]),pe("onMouseLeave",["mouseout","mouseover"]),pe("onPointerEnter",["pointerout","pointerover"]),pe("onPointerLeave",["pointerout","pointerover"]),oa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),oa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),oa("onBeforeInput",["compositionend","keypress","textInput","paste"]),oa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),oa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),oa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fo="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(" "),o_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fo));function nv(i,r){r=(r&4)!==0;for(var o=0;o<i.length;o++){var u=i[o],g=u.event;u=u.listeners;e:{var y=void 0;if(r)for(var S=u.length-1;0<=S;S--){var _=u[S],I=_.instance,V=_.currentTarget;if(_=_.listener,I!==y&&g.isPropagationStopped())break e;y=_,g.currentTarget=V;try{y(g)}catch(ae){tu(ae)}g.currentTarget=null,y=I}else for(S=0;S<u.length;S++){if(_=u[S],I=_.instance,V=_.currentTarget,_=_.listener,I!==y&&g.isPropagationStopped())break e;y=_,g.currentTarget=V;try{y(g)}catch(ae){tu(ae)}g.currentTarget=null,y=I}}}}function We(i,r){var o=r[no];o===void 0&&(o=r[no]=new Set);var u=i+"__bubble";o.has(u)||(iv(r,i,2,!1),o.add(u))}function ip(i,r,o){var u=0;r&&(u|=4),iv(o,i,u,r)}var Fu="_reactListening"+Math.random().toString(36).slice(2);function ap(i){if(!i[Fu]){i[Fu]=!0,qc.forEach(function(o){o!=="selectionchange"&&(o_.has(o)||ip(o,!1,i),ip(o,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[Fu]||(r[Fu]=!0,ip("selectionchange",!1,r))}}function iv(i,r,o,u){switch(jv(r)){case 2:var g=I_;break;case 8:g=z_;break;default:g=xp}o=g.bind(null,r,o,i),g=void 0,!kf||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(g=!0),u?g!==void 0?i.addEventListener(r,o,{capture:!0,passive:g}):i.addEventListener(r,o,!0):g!==void 0?i.addEventListener(r,o,{passive:g}):i.addEventListener(r,o,!1)}function rp(i,r,o,u,g){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var _=u.stateNode.containerInfo;if(_===g)break;if(S===4)for(S=u.return;S!==null;){var I=S.tag;if((I===3||I===4)&&S.stateNode.containerInfo===g)return;S=S.return}for(;_!==null;){if(S=Nn(_),S===null)return;if(I=S.tag,I===5||I===6||I===26||I===27){u=y=S;continue e}_=_.parentNode}}u=u.return}Qc(function(){var V=y,ae=$e(o),de=[];e:{var W=Ib.get(i);if(W!==void 0){var Z=Zc,Se=i;switch(i){case"keypress":if(Wc(o)===0)break e;case"keydown":case"keyup":Z=tN;break;case"focusin":Se="focus",Z=Af;break;case"focusout":Se="blur",Z=Af;break;case"beforeblur":case"afterblur":Z=Af;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=db;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=Hk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=aN;break;case jb:case Mb:case Db:Z=Gk;break;case Lb:Z=sN;break;case"scroll":case"scrollend":Z=Fk;break;case"wheel":Z=oN;break;case"copy":case"cut":case"paste":Z=Qk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=hb;break;case"toggle":case"beforetoggle":Z=uN}var De=(r&4)!==0,vt=!De&&(i==="scroll"||i==="scrollend"),q=De?W!==null?W+"Capture":null:W;De=[];for(var F=V,G;F!==null;){var se=F;if(G=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||G===null||q===null||(se=oo(F,q),se!=null&&De.push($o(F,se,G))),vt)break;F=F.return}0<De.length&&(W=new Z(W,Se,null,o,ae),de.push({event:W,listeners:De}))}}if((r&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",Z=i==="mouseout"||i==="pointerout",W&&o!==Ne&&(Se=o.relatedTarget||o.fromElement)&&(Nn(Se)||Se[Ia]))break e;if((Z||W)&&(W=ae.window===ae?ae:(W=ae.ownerDocument)?W.defaultView||W.parentWindow:window,Z?(Se=o.relatedTarget||o.toElement,Z=V,Se=Se?Nn(Se):null,Se!==null&&(vt=l(Se),De=Se.tag,Se!==vt||De!==5&&De!==27&&De!==6)&&(Se=null)):(Z=null,Se=V),Z!==Se)){if(De=db,se="onMouseLeave",q="onMouseEnter",F="mouse",(i==="pointerout"||i==="pointerover")&&(De=hb,se="onPointerLeave",q="onPointerEnter",F="pointer"),vt=Z==null?W:za(Z),G=Se==null?W:za(Se),W=new De(se,F+"leave",Z,o,ae),W.target=vt,W.relatedTarget=G,se=null,Nn(ae)===V&&(De=new De(q,F+"enter",Se,o,ae),De.target=G,De.relatedTarget=vt,se=De),vt=se,Z&&Se)t:{for(De=c_,q=Z,F=Se,G=0,se=q;se;se=De(se))G++;se=0;for(var Re=F;Re;Re=De(Re))se++;for(;0<G-se;)q=De(q),G--;for(;0<se-G;)F=De(F),se--;for(;G--;){if(q===F||F!==null&&q===F.alternate){De=q;break t}q=De(q),F=De(F)}De=null}else De=null;Z!==null&&av(de,W,Z,De,!1),Se!==null&&vt!==null&&av(de,vt,Se,De,!0)}}e:{if(W=V?za(V):window,Z=W.nodeName&&W.nodeName.toLowerCase(),Z==="select"||Z==="input"&&W.type==="file")var st=wb;else if(xb(W))if(Eb)st=vN;else{st=yN;var _e=bN}else Z=W.nodeName,!Z||Z.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?V&&Ua(V.elementType)&&(st=wb):st=xN;if(st&&(st=st(i,V))){vb(de,st,o,ae);break e}_e&&_e(i,W,V),i==="focusout"&&V&&W.type==="number"&&V.memoizedProps.value!=null&&Os(W,"number",W.value)}switch(_e=V?za(V):window,i){case"focusin":(xb(_e)||_e.contentEditable==="true")&&(Ms=_e,Df=V,bo=null);break;case"focusout":bo=Df=Ms=null;break;case"mousedown":Lf=!0;break;case"contextmenu":case"mouseup":case"dragend":Lf=!1,Ob(de,o,ae);break;case"selectionchange":if(EN)break;case"keydown":case"keyup":Ob(de,o,ae)}var qe;if(Of)e:{switch(i){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else js?bb(i,o)&&(et="onCompositionEnd"):i==="keydown"&&o.keyCode===229&&(et="onCompositionStart");et&&(pb&&o.locale!=="ko"&&(js||et!=="onCompositionStart"?et==="onCompositionEnd"&&js&&(qe=cb()):(Fa=ae,Nf="value"in Fa?Fa.value:Fa.textContent,js=!0)),_e=$u(V,et),0<_e.length&&(et=new fb(et,i,null,o,ae),de.push({event:et,listeners:_e}),qe?et.data=qe:(qe=yb(o),qe!==null&&(et.data=qe)))),(qe=fN?hN(i,o):pN(i,o))&&(et=$u(V,"onBeforeInput"),0<et.length&&(_e=new fb("onBeforeInput","beforeinput",null,o,ae),de.push({event:_e,listeners:et}),_e.data=qe)),r_(de,i,V,o,ae)}nv(de,r)})}function $o(i,r,o){return{instance:i,listener:r,currentTarget:o}}function $u(i,r){for(var o=r+"Capture",u=[];i!==null;){var g=i,y=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||y===null||(g=oo(i,o),g!=null&&u.unshift($o(i,g,y)),g=oo(i,r),g!=null&&u.push($o(i,g,y))),i.tag===3)return u;i=i.return}return[]}function c_(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function av(i,r,o,u,g){for(var y=r._reactName,S=[];o!==null&&o!==u;){var _=o,I=_.alternate,V=_.stateNode;if(_=_.tag,I!==null&&I===u)break;_!==5&&_!==26&&_!==27||V===null||(I=V,g?(V=oo(o,y),V!=null&&S.unshift($o(o,V,I))):g||(V=oo(o,y),V!=null&&S.push($o(o,V,I)))),o=o.return}S.length!==0&&i.push({event:r,listeners:S})}var u_=/\r\n?/g,d_=/\u0000|\uFFFD/g;function rv(i){return(typeof i=="string"?i:""+i).replace(u_,`
49
+ `).replace(d_,"")}function sv(i,r){return r=rv(r),rv(i)===r}function xt(i,r,o,u,g,y){switch(o){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Le(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Le(i,""+u);break;case"className":Wn(i,"class",u);break;case"tabIndex":Wn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Wn(i,o,u);break;case"style":mt(i,u,y);break;case"data":if(r!=="object"){Wn(i,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||o!=="href")){i.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(o);break}u=Pa(""+u),i.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){i.setAttribute(o,"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 y=="function"&&(o==="formAction"?(r!=="input"&&xt(i,r,"name",g.name,g,null),xt(i,r,"formEncType",g.formEncType,g,null),xt(i,r,"formMethod",g.formMethod,g,null),xt(i,r,"formTarget",g.formTarget,g,null)):(xt(i,r,"encType",g.encType,g,null),xt(i,r,"method",g.method,g,null),xt(i,r,"target",g.target,g,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(o);break}u=Pa(""+u),i.setAttribute(o,u);break;case"onClick":u!=null&&(i.onclick=xe);break;case"onScroll":u!=null&&We("scroll",i);break;case"onScrollEnd":u!=null&&We("scrollend",i);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(o=u.__html,o!=null){if(g.children!=null)throw Error(a(60));i.innerHTML=o}}break;case"multiple":i.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":i.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"){i.removeAttribute("xlink:href");break}o=Pa(""+u),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);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"?i.setAttribute(o,""+u):i.removeAttribute(o);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"?i.setAttribute(o,""):i.removeAttribute(o);break;case"capture":case"download":u===!0?i.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(o,u):i.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?i.setAttribute(o,u):i.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?i.removeAttribute(o):i.setAttribute(o,u);break;case"popover":We("beforetoggle",i),We("toggle",i),bn(i,"popover",u);break;case"xlinkActuate":Mn(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Mn(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Mn(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Mn(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Mn(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Mn(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Mn(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Mn(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Mn(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":bn(i,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=ca.get(o)||o,bn(i,o,u))}}function sp(i,r,o,u,g,y){switch(o){case"style":mt(i,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(o=u.__html,o!=null){if(g.children!=null)throw Error(a(60));i.innerHTML=o}}break;case"children":typeof u=="string"?Le(i,u):(typeof u=="number"||typeof u=="bigint")&&Le(i,""+u);break;case"onScroll":u!=null&&We("scroll",i);break;case"onScrollEnd":u!=null&&We("scrollend",i);break;case"onClick":u!=null&&(i.onclick=xe);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lr.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(g=o.endsWith("Capture"),r=o.slice(2,g?o.length-7:void 0),y=i[gn]||null,y=y!=null?y[o]:null,typeof y=="function"&&i.removeEventListener(r,y,g),typeof u=="function")){typeof y!="function"&&y!==null&&(o in i?i[o]=null:i.hasAttribute(o)&&i.removeAttribute(o)),i.addEventListener(r,u,g);break e}o in i?i[o]=u:u===!0?i.setAttribute(o,""):bn(i,o,u)}}}function pn(i,r,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",i),We("load",i);var u=!1,g=!1,y;for(y in o)if(o.hasOwnProperty(y)){var S=o[y];if(S!=null)switch(y){case"src":u=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:xt(i,r,y,S,o,null)}}g&&xt(i,r,"srcSet",o.srcSet,o,null),u&&xt(i,r,"src",o.src,o,null);return;case"input":We("invalid",i);var _=y=S=g=null,I=null,V=null;for(u in o)if(o.hasOwnProperty(u)){var ae=o[u];if(ae!=null)switch(u){case"name":g=ae;break;case"type":S=ae;break;case"checked":I=ae;break;case"defaultChecked":V=ae;break;case"value":y=ae;break;case"defaultValue":_=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(a(137,r));break;default:xt(i,r,u,ae,o,null)}}Ir(i,y,_,I,V,S,g,!1);return;case"select":We("invalid",i),u=S=y=null;for(g in o)if(o.hasOwnProperty(g)&&(_=o[g],_!=null))switch(g){case"value":y=_;break;case"defaultValue":S=_;break;case"multiple":u=_;default:xt(i,r,g,_,o,null)}r=y,o=S,i.multiple=!!u,r!=null?un(i,!!u,r,!1):o!=null&&un(i,!!u,o,!0);return;case"textarea":We("invalid",i),y=g=u=null;for(S in o)if(o.hasOwnProperty(S)&&(_=o[S],_!=null))switch(S){case"value":u=_;break;case"defaultValue":g=_;break;case"children":y=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(a(91));break;default:xt(i,r,S,_,o,null)}Rs(i,u,g,y);return;case"option":for(I in o)if(o.hasOwnProperty(I)&&(u=o[I],u!=null))switch(I){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:xt(i,r,I,u,o,null)}return;case"dialog":We("beforetoggle",i),We("toggle",i),We("cancel",i),We("close",i);break;case"iframe":case"object":We("load",i);break;case"video":case"audio":for(u=0;u<Fo.length;u++)We(Fo[u],i);break;case"image":We("error",i),We("load",i);break;case"details":We("toggle",i);break;case"embed":case"source":case"link":We("error",i),We("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in o)if(o.hasOwnProperty(V)&&(u=o[V],u!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:xt(i,r,V,u,o,null)}return;default:if(Ua(r)){for(ae in o)o.hasOwnProperty(ae)&&(u=o[ae],u!==void 0&&sp(i,r,ae,u,o,void 0));return}}for(_ in o)o.hasOwnProperty(_)&&(u=o[_],u!=null&&xt(i,r,_,u,o,null))}function f_(i,r,o,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,y=null,S=null,_=null,I=null,V=null,ae=null;for(Z in o){var de=o[Z];if(o.hasOwnProperty(Z)&&de!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":I=de;default:u.hasOwnProperty(Z)||xt(i,r,Z,null,u,de)}}for(var W in u){var Z=u[W];if(de=o[W],u.hasOwnProperty(W)&&(Z!=null||de!=null))switch(W){case"type":y=Z;break;case"name":g=Z;break;case"checked":V=Z;break;case"defaultChecked":ae=Z;break;case"value":S=Z;break;case"defaultValue":_=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,r));break;default:Z!==de&&xt(i,r,W,Z,u,de)}}ro(i,S,_,I,V,ae,y,g);return;case"select":Z=S=_=W=null;for(y in o)if(I=o[y],o.hasOwnProperty(y)&&I!=null)switch(y){case"value":break;case"multiple":Z=I;default:u.hasOwnProperty(y)||xt(i,r,y,null,u,I)}for(g in u)if(y=u[g],I=o[g],u.hasOwnProperty(g)&&(y!=null||I!=null))switch(g){case"value":W=y;break;case"defaultValue":_=y;break;case"multiple":S=y;default:y!==I&&xt(i,r,g,y,u,I)}r=_,o=S,u=Z,W!=null?un(i,!!o,W,!1):!!u!=!!o&&(r!=null?un(i,!!o,r,!0):un(i,!!o,o?[]:"",!1));return;case"textarea":Z=W=null;for(_ in o)if(g=o[_],o.hasOwnProperty(_)&&g!=null&&!u.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:xt(i,r,_,null,u,g)}for(S in u)if(g=u[S],y=o[S],u.hasOwnProperty(S)&&(g!=null||y!=null))switch(S){case"value":W=g;break;case"defaultValue":Z=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(a(91));break;default:g!==y&&xt(i,r,S,g,u,y)}Gc(i,W,Z);return;case"option":for(var Se in o)if(W=o[Se],o.hasOwnProperty(Se)&&W!=null&&!u.hasOwnProperty(Se))switch(Se){case"selected":i.selected=!1;break;default:xt(i,r,Se,null,u,W)}for(I in u)if(W=u[I],Z=o[I],u.hasOwnProperty(I)&&W!==Z&&(W!=null||Z!=null))switch(I){case"selected":i.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:xt(i,r,I,W,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 De in o)W=o[De],o.hasOwnProperty(De)&&W!=null&&!u.hasOwnProperty(De)&&xt(i,r,De,null,u,W);for(V in u)if(W=u[V],Z=o[V],u.hasOwnProperty(V)&&W!==Z&&(W!=null||Z!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,r));break;default:xt(i,r,V,W,u,Z)}return;default:if(Ua(r)){for(var vt in o)W=o[vt],o.hasOwnProperty(vt)&&W!==void 0&&!u.hasOwnProperty(vt)&&sp(i,r,vt,void 0,u,W);for(ae in u)W=u[ae],Z=o[ae],!u.hasOwnProperty(ae)||W===Z||W===void 0&&Z===void 0||sp(i,r,ae,W,u,Z);return}}for(var q in o)W=o[q],o.hasOwnProperty(q)&&W!=null&&!u.hasOwnProperty(q)&&xt(i,r,q,null,u,W);for(de in u)W=u[de],Z=o[de],!u.hasOwnProperty(de)||W===Z||W==null&&Z==null||xt(i,r,de,W,u,Z)}function lv(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function h_(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var g=o[u],y=g.transferSize,S=g.initiatorType,_=g.duration;if(y&&_&&lv(S)){for(S=0,_=g.responseEnd,u+=1;u<o.length;u++){var I=o[u],V=I.startTime;if(V>_)break;var ae=I.transferSize,de=I.initiatorType;ae&&lv(de)&&(I=I.responseEnd,S+=ae*(I<_?1:(_-V)/(I-V)))}if(--u,r+=8*(y+S)/(g.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var lp=null,op=null;function Hu(i){return i.nodeType===9?i:i.ownerDocument}function ov(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function cv(i,r){if(i===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&r==="foreignObject"?0:i}function cp(i,r){return i==="textarea"||i==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var up=null;function p_(){var i=window.event;return i&&i.type==="popstate"?i===up?!1:(up=i,!0):(up=null,!1)}var uv=typeof setTimeout=="function"?setTimeout:void 0,m_=typeof clearTimeout=="function"?clearTimeout:void 0,dv=typeof Promise=="function"?Promise:void 0,g_=typeof queueMicrotask=="function"?queueMicrotask:typeof dv<"u"?function(i){return dv.resolve(null).then(i).catch(b_)}:uv;function b_(i){setTimeout(function(){throw i})}function ar(i){return i==="head"}function fv(i,r){var o=r,u=0;do{var g=o.nextSibling;if(i.removeChild(o),g&&g.nodeType===8)if(o=g.data,o==="/$"||o==="/&"){if(u===0){i.removeChild(g),sl(r);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")Ho(i.ownerDocument.documentElement);else if(o==="head"){o=i.ownerDocument.head,Ho(o);for(var y=o.firstChild;y;){var S=y.nextSibling,_=y.nodeName;y[Dr]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=S}}else o==="body"&&Ho(i.ownerDocument.body);o=g}while(o);sl(r)}function hv(i,r){var o=i;i=0;do{var u=o.nextSibling;if(o.nodeType===1?r?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(r?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(i===0)break;i--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||i++;o=u}while(o)}function dp(i){var r=i.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var o=r;switch(r=r.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":dp(o),io(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}i.removeChild(o)}}function y_(i,r,o,u){for(;i.nodeType===1;){var g=o;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(u){if(!i[Dr])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(y=i.getAttribute("rel"),y==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(y!==g.rel||i.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||i.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||i.getAttribute("title")!==(g.title==null?null:g.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(y=i.getAttribute("src"),(y!==(g.src==null?null:g.src)||i.getAttribute("type")!==(g.type==null?null:g.type)||i.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&y&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var y=g.name==null?null:""+g.name;if(g.type==="hidden"&&i.getAttribute("name")===y)return i}else return i;if(i=vi(i.nextSibling),i===null)break}return null}function x_(i,r,o){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=vi(i.nextSibling),i===null))return null;return i}function pv(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=vi(i.nextSibling),i===null))return null;return i}function fp(i){return i.data==="$?"||i.data==="$~"}function hp(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function v_(i,r){var o=i.ownerDocument;if(i.data==="$~")i._reactRetry=r;else if(i.data!=="$?"||o.readyState!=="loading")r();else{var u=function(){r(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),i._reactRetry=u}}function vi(i){for(;i!=null;i=i.nextSibling){var r=i.nodeType;if(r===1||r===3)break;if(r===8){if(r=i.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return i}var pp=null;function mv(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var o=i.data;if(o==="/$"||o==="/&"){if(r===0)return vi(i.nextSibling);r--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||r++}i=i.nextSibling}return null}function gv(i){i=i.previousSibling;for(var r=0;i;){if(i.nodeType===8){var o=i.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(r===0)return i;r--}else o!=="/$"&&o!=="/&"||r++}i=i.previousSibling}return null}function bv(i,r,o){switch(r=Hu(o),i){case"html":if(i=r.documentElement,!i)throw Error(a(452));return i;case"head":if(i=r.head,!i)throw Error(a(453));return i;case"body":if(i=r.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function Ho(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);io(i)}var wi=new Map,yv=new Set;function qu(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Na=oe.d;oe.d={f:w_,r:E_,D:S_,C:k_,L:N_,m:__,X:A_,S:C_,M:T_};function w_(){var i=Na.f(),r=Lu();return i||r}function E_(i){var r=la(i);r!==null&&r.tag===5&&r.type==="form"?Ly(r):Na.r(i)}var il=typeof document>"u"?null:document;function xv(i,r,o){var u=il;if(u&&typeof r=="string"&&r){var g=Dn(r);g='link[rel="'+i+'"][href="'+g+'"]',typeof o=="string"&&(g+='[crossorigin="'+o+'"]'),yv.has(g)||(yv.add(g),i={rel:i,crossOrigin:o,href:r},u.querySelector(g)===null&&(r=u.createElement("link"),pn(r,"link",i),Wt(r),u.head.appendChild(r)))}}function S_(i){Na.D(i),xv("dns-prefetch",i,null)}function k_(i,r){Na.C(i,r),xv("preconnect",i,r)}function N_(i,r,o){Na.L(i,r,o);var u=il;if(u&&i&&r){var g='link[rel="preload"][as="'+Dn(r)+'"]';r==="image"&&o&&o.imageSrcSet?(g+='[imagesrcset="'+Dn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(g+='[imagesizes="'+Dn(o.imageSizes)+'"]')):g+='[href="'+Dn(i)+'"]';var y=g;switch(r){case"style":y=al(i);break;case"script":y=rl(i)}wi.has(y)||(i=m({rel:"preload",href:r==="image"&&o&&o.imageSrcSet?void 0:i,as:r},o),wi.set(y,i),u.querySelector(g)!==null||r==="style"&&u.querySelector(qo(y))||r==="script"&&u.querySelector(Ko(y))||(r=u.createElement("link"),pn(r,"link",i),Wt(r),u.head.appendChild(r)))}}function __(i,r){Na.m(i,r);var o=il;if(o&&i){var u=r&&typeof r.as=="string"?r.as:"script",g='link[rel="modulepreload"][as="'+Dn(u)+'"][href="'+Dn(i)+'"]',y=g;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=rl(i)}if(!wi.has(y)&&(i=m({rel:"modulepreload",href:i},r),wi.set(y,i),o.querySelector(g)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Ko(y)))return}u=o.createElement("link"),pn(u,"link",i),Wt(u),o.head.appendChild(u)}}}function C_(i,r,o){Na.S(i,r,o);var u=il;if(u&&i){var g=Ba(u).hoistableStyles,y=al(i);r=r||"default";var S=g.get(y);if(!S){var _={loading:0,preload:null};if(S=u.querySelector(qo(y)))_.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":r},o),(o=wi.get(y))&&mp(i,o);var I=S=u.createElement("link");Wt(I),pn(I,"link",i),I._p=new Promise(function(V,ae){I.onload=V,I.onerror=ae}),I.addEventListener("load",function(){_.loading|=1}),I.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Ku(S,r,u)}S={type:"stylesheet",instance:S,count:1,state:_},g.set(y,S)}}}function A_(i,r){Na.X(i,r);var o=il;if(o&&i){var u=Ba(o).hoistableScripts,g=rl(i),y=u.get(g);y||(y=o.querySelector(Ko(g)),y||(i=m({src:i,async:!0},r),(r=wi.get(g))&&gp(i,r),y=o.createElement("script"),Wt(y),pn(y,"link",i),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(g,y))}}function T_(i,r){Na.M(i,r);var o=il;if(o&&i){var u=Ba(o).hoistableScripts,g=rl(i),y=u.get(g);y||(y=o.querySelector(Ko(g)),y||(i=m({src:i,async:!0,type:"module"},r),(r=wi.get(g))&&gp(i,r),y=o.createElement("script"),Wt(y),pn(y,"link",i),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(g,y))}}function vv(i,r,o,u){var g=(g=fe.current)?qu(g):null;if(!g)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(r=al(o.href),o=Ba(g).hoistableStyles,u=o.get(r),u||(u={type:"style",instance:null,count:0,state:null},o.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){i=al(o.href);var y=Ba(g).hoistableStyles,S=y.get(i);if(S||(g=g.ownerDocument||g,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(i,S),(y=g.querySelector(qo(i)))&&!y._p&&(S.instance=y,S.state.loading=5),wi.has(i)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},wi.set(i,o),y||O_(g,i,o,S.state))),r&&u===null)throw Error(a(528,""));return S}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=o.async,o=o.src,typeof o=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=rl(o),o=Ba(g).hoistableScripts,u=o.get(r),u||(u={type:"script",instance:null,count:0,state:null},o.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function al(i){return'href="'+Dn(i)+'"'}function qo(i){return'link[rel="stylesheet"]['+i+"]"}function wv(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function O_(i,r,o,u){i.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=i.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),pn(r,"link",o),Wt(r),i.head.appendChild(r))}function rl(i){return'[src="'+Dn(i)+'"]'}function Ko(i){return"script[async]"+i}function Ev(i,r,o){if(r.count++,r.instance===null)switch(r.type){case"style":var u=i.querySelector('style[data-href~="'+Dn(o.href)+'"]');if(u)return r.instance=u,Wt(u),u;var g=m({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(i.ownerDocument||i).createElement("style"),Wt(u),pn(u,"style",g),Ku(u,o.precedence,i),r.instance=u;case"stylesheet":g=al(o.href);var y=i.querySelector(qo(g));if(y)return r.state.loading|=4,r.instance=y,Wt(y),y;u=wv(o),(g=wi.get(g))&&mp(u,g),y=(i.ownerDocument||i).createElement("link"),Wt(y);var S=y;return S._p=new Promise(function(_,I){S.onload=_,S.onerror=I}),pn(y,"link",u),r.state.loading|=4,Ku(y,o.precedence,i),r.instance=y;case"script":return y=rl(o.src),(g=i.querySelector(Ko(y)))?(r.instance=g,Wt(g),g):(u=o,(g=wi.get(y))&&(u=m({},o),gp(u,g)),i=i.ownerDocument||i,g=i.createElement("script"),Wt(g),pn(g,"link",u),i.head.appendChild(g),r.instance=g);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Ku(u,o.precedence,i));return r.instance}function Ku(i,r,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=u.length?u[u.length-1]:null,y=g,S=0;S<u.length;S++){var _=u[S];if(_.dataset.precedence===r)y=_;else if(y!==g)break}y?y.parentNode.insertBefore(i,y.nextSibling):(r=o.nodeType===9?o.head:o,r.insertBefore(i,r.firstChild))}function mp(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function gp(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var Gu=null;function Sv(i,r,o){if(Gu===null){var u=new Map,g=Gu=new Map;g.set(o,u)}else g=Gu,u=g.get(o),u||(u=new Map,g.set(o,u));if(u.has(i))return u;for(u.set(i,null),o=o.getElementsByTagName(i),g=0;g<o.length;g++){var y=o[g];if(!(y[Dr]||y[Gt]||i==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var S=y.getAttribute(r)||"";S=i+S;var _=u.get(S);_?_.push(y):u.set(S,[y])}}return u}function kv(i,r,o){i=i.ownerDocument||i,i.head.insertBefore(o,r==="title"?i.querySelector("head > title"):null)}function R_(i,r,o){if(o===1||r.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return i=r.disabled,typeof r.precedence=="string"&&i==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Nv(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function j_(i,r,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var g=al(u.href),y=r.querySelector(qo(g));if(y){r=y._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=Vu.bind(i),r.then(i,i)),o.state.loading|=4,o.instance=y,Wt(y);return}y=r.ownerDocument||r,u=wv(u),(g=wi.get(g))&&mp(u,g),y=y.createElement("link"),Wt(y);var S=y;S._p=new Promise(function(_,I){S.onload=_,S.onerror=I}),pn(y,"link",u),o.instance=y}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(o,r),(r=o.state.preload)&&(o.state.loading&3)===0&&(i.count++,o=Vu.bind(i),r.addEventListener("load",o),r.addEventListener("error",o))}}var bp=0;function M_(i,r){return i.stylesheets&&i.count===0&&Yu(i,i.stylesheets),0<i.count||0<i.imgCount?function(o){var u=setTimeout(function(){if(i.stylesheets&&Yu(i,i.stylesheets),i.unsuspend){var y=i.unsuspend;i.unsuspend=null,y()}},6e4+r);0<i.imgBytes&&bp===0&&(bp=62500*h_());var g=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Yu(i,i.stylesheets),i.unsuspend)){var y=i.unsuspend;i.unsuspend=null,y()}},(i.imgBytes>bp?50:800)+r);return i.unsuspend=o,function(){i.unsuspend=null,clearTimeout(u),clearTimeout(g)}}:null}function Vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yu(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Qu=null;function Yu(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Qu=new Map,r.forEach(D_,i),Qu=null,Vu.call(i))}function D_(i,r){if(!(r.state.loading&4)){var o=Qu.get(i);if(o)var u=o.get(null);else{o=new Map,Qu.set(i,o);for(var g=i.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<g.length;y++){var S=g[y];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(o.set(S.dataset.precedence,S),u=S)}u&&o.set(null,u)}g=r.instance,S=g.getAttribute("data-precedence"),y=o.get(S)||u,y===u&&o.set(null,g),o.set(S,g),this.count++,u=Vu.bind(this),g.addEventListener("load",u),g.addEventListener("error",u),y?y.parentNode.insertBefore(g,y.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(g,i.firstChild)),r.state.loading|=4}}var Go={$$typeof:A,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function L_(i,r,o,u,g,y,S,_,I){this.tag=1,this.containerInfo=i,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=At(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=At(0),this.hiddenUpdates=At(null),this.identifierPrefix=u,this.onUncaughtError=g,this.onCaughtError=y,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function _v(i,r,o,u,g,y,S,_,I,V,ae,de){return i=new L_(i,r,o,S,I,V,ae,de,_),r=1,y===!0&&(r|=24),y=Jn(3,null,null,r),i.current=y,y.stateNode=i,r=Wf(),r.refCount++,i.pooledCache=r,r.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:r},eh(y),i}function Cv(i){return i?(i=Is,i):Is}function Av(i,r,o,u,g,y){g=Cv(g),u.context===null?u.context=g:u.pendingContext=g,u=Va(r),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Qa(i,u,r),o!==null&&(Pn(o,i,r),ko(o,i,r))}function Tv(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var o=i.retryLane;i.retryLane=o!==0&&o<r?o:r}}function yp(i,r){Tv(i,r),(i=i.alternate)&&Tv(i,r)}function Ov(i){if(i.tag===13||i.tag===31){var r=Pr(i,67108864);r!==null&&Pn(r,i,67108864),yp(i,67108864)}}function Rv(i){if(i.tag===13||i.tag===31){var r=ai();r=Rt(r);var o=Pr(i,r);o!==null&&Pn(o,i,r),yp(i,r)}}var Wu=!0;function I_(i,r,o,u){var g=H.T;H.T=null;var y=oe.p;try{oe.p=2,xp(i,r,o,u)}finally{oe.p=y,H.T=g}}function z_(i,r,o,u){var g=H.T;H.T=null;var y=oe.p;try{oe.p=8,xp(i,r,o,u)}finally{oe.p=y,H.T=g}}function xp(i,r,o,u){if(Wu){var g=vp(u);if(g===null)rp(i,r,u,Xu,o),Mv(i,u);else if(U_(g,i,r,o,u))u.stopPropagation();else if(Mv(i,u),r&4&&-1<B_.indexOf(i)){for(;g!==null;){var y=la(g);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var S=jn(y.pendingLanes);if(S!==0){var _=y;for(_.pendingLanes|=2,_.entangledLanes|=2;S;){var I=1<<31-ht(S);_.entanglements[1]|=I,S&=~I}Yi(y),(ot&6)===0&&(Mu=Lt()+500,Po(0))}}break;case 31:case 13:_=Pr(y,2),_!==null&&Pn(_,y,2),Lu(),yp(y,2)}if(y=vp(u),y===null&&rp(i,r,u,Xu,o),y===g)break;g=y}g!==null&&u.stopPropagation()}else rp(i,r,u,null,o)}}function vp(i){return i=$e(i),wp(i)}var Xu=null;function wp(i){if(Xu=null,i=Nn(i),i!==null){var r=l(i);if(r===null)i=null;else{var o=r.tag;if(o===13){if(i=c(r),i!==null)return i;i=null}else if(o===31){if(i=d(r),i!==null)return i;i=null}else if(o===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return Xu=i,null}function jv(i){switch(i){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(Ss()){case ie:return 2;case be:return 8;case Me:case Ve:return 32;case rt:return 268435456;default:return 32}default:return 32}}var Ep=!1,rr=null,sr=null,lr=null,Vo=new Map,Qo=new Map,or=[],B_="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 Mv(i,r){switch(i){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":sr=null;break;case"mouseover":case"mouseout":lr=null;break;case"pointerover":case"pointerout":Vo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qo.delete(r.pointerId)}}function Yo(i,r,o,u,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:r,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[g]},r!==null&&(r=la(r),r!==null&&Ov(r)),i):(i.eventSystemFlags|=u,r=i.targetContainers,g!==null&&r.indexOf(g)===-1&&r.push(g),i)}function U_(i,r,o,u,g){switch(r){case"focusin":return rr=Yo(rr,i,r,o,u,g),!0;case"dragenter":return sr=Yo(sr,i,r,o,u,g),!0;case"mouseover":return lr=Yo(lr,i,r,o,u,g),!0;case"pointerover":var y=g.pointerId;return Vo.set(y,Yo(Vo.get(y)||null,i,r,o,u,g)),!0;case"gotpointercapture":return y=g.pointerId,Qo.set(y,Yo(Qo.get(y)||null,i,r,o,u,g)),!0}return!1}function Dv(i){var r=Nn(i.target);if(r!==null){var o=l(r);if(o!==null){if(r=o.tag,r===13){if(r=c(o),r!==null){i.blockedOn=r,_s(i.priority,function(){Rv(o)});return}}else if(r===31){if(r=d(o),r!==null){i.blockedOn=r,_s(i.priority,function(){Rv(o)});return}}else if(r===3&&o.stateNode.current.memoizedState.isDehydrated){i.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Zu(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var o=vp(i.nativeEvent);if(o===null){o=i.nativeEvent;var u=new o.constructor(o.type,o);Ne=u,o.target.dispatchEvent(u),Ne=null}else return r=la(o),r!==null&&Ov(r),i.blockedOn=o,!1;r.shift()}return!0}function Lv(i,r,o){Zu(i)&&o.delete(r)}function P_(){Ep=!1,rr!==null&&Zu(rr)&&(rr=null),sr!==null&&Zu(sr)&&(sr=null),lr!==null&&Zu(lr)&&(lr=null),Vo.forEach(Lv),Qo.forEach(Lv)}function Ju(i,r){i.blockedOn===r&&(i.blockedOn=null,Ep||(Ep=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,P_)))}var ed=null;function Iv(i){ed!==i&&(ed=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ed===i&&(ed=null);for(var r=0;r<i.length;r+=3){var o=i[r],u=i[r+1],g=i[r+2];if(typeof u!="function"){if(wp(u||o)===null)continue;break}var y=la(o);y!==null&&(i.splice(r,3),r-=3,vh(y,{pending:!0,data:g,method:o.method,action:u},u,g))}}))}function sl(i){function r(I){return Ju(I,i)}rr!==null&&Ju(rr,i),sr!==null&&Ju(sr,i),lr!==null&&Ju(lr,i),Vo.forEach(r),Qo.forEach(r);for(var o=0;o<or.length;o++){var u=or[o];u.blockedOn===i&&(u.blockedOn=null)}for(;0<or.length&&(o=or[0],o.blockedOn===null);)Dv(o),o.blockedOn===null&&or.shift();if(o=(i.ownerDocument||i).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var g=o[u],y=o[u+1],S=g[gn]||null;if(typeof y=="function")S||Iv(o);else if(S){var _=null;if(y&&y.hasAttribute("formAction")){if(g=y,S=y[gn]||null)_=S.formAction;else if(wp(g)!==null)continue}else _=S.action;typeof _=="function"?o[u+1]=_:(o.splice(u,3),u-=3),Iv(o)}}}function zv(){function i(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(S){return g=S})},focusReset:"manual",scroll:"manual"})}function r(){g!==null&&(g(),g=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,g=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),g!==null&&(g(),g=null)}}}function Sp(i){this._internalRoot=i}td.prototype.render=Sp.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(a(409));var o=r.current,u=ai();Av(o,u,i,r,null,null)},td.prototype.unmount=Sp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;Av(i.current,2,null,i,null,null),Lu(),r[Ia]=null}};function td(i){this._internalRoot=i}td.prototype.unstable_scheduleHydration=function(i){if(i){var r=Ns();i={blockedOn:null,target:i,priority:r};for(var o=0;o<or.length&&r!==0&&r<or[o].priority;o++);or.splice(o,0,i),o===0&&Dv(i)}};var Bv=t.version;if(Bv!=="19.2.5")throw Error(a(527,Bv,"19.2.5"));oe.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=h(r),i=i!==null?b(i):null,i=i===null?null:i.stateNode,i};var F_={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nd.isDisabled&&nd.supportsFiber)try{cn=nd.inject(F_),Pt=nd}catch{}}return Xo.createRoot=function(i,r){if(!s(i))throw Error(a(299));var o=!1,u="",g=Ky,y=Gy,S=Vy;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(g=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError)),r=_v(i,1,!1,null,null,o,u,null,g,y,S,zv),i[Ia]=r.current,ap(i),new Sp(r)},Xo.hydrateRoot=function(i,r,o){if(!s(i))throw Error(a(299));var u=!1,g="",y=Ky,S=Gy,_=Vy,I=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(g=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(_=o.onRecoverableError),o.formState!==void 0&&(I=o.formState)),r=_v(i,1,!0,r,o??null,u,g,I,y,S,_,zv),r.context=Cv(null),o=r.current,u=ai(),u=Rt(u),g=Va(u),g.callback=null,Qa(o,g,u),o=u,r.current.lanes=o,Et(r,o),Yi(r),i[Ia]=r.current,ap(i),new td(r)},Xo.version="19.2.5",Xo}var Yv;function J_(){if(Yv)return Ap.exports;Yv=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(),Ap.exports=Z_(),Ap.exports}var eC=J_(),Fl=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(){}},as,mr,Nl,X1,tC=(X1=class extends Fl{constructor(){super();Te(this,as);Te(this,mr);Te(this,Nl);we(this,Nl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,mr)||this.setEventListener(z(this,Nl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,mr))==null||t.call(this),we(this,mr,void 0))}setEventListener(t){var n;we(this,Nl,t),(n=z(this,mr))==null||n.call(this),we(this,mr,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){z(this,as)!==t&&(we(this,as,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,as)=="boolean"?z(this,as):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},as=new WeakMap,mr=new WeakMap,Nl=new WeakMap,X1),sg=new tC,nC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gr,ig,Z1,iC=(Z1=class{constructor(){Te(this,gr,nC);Te(this,ig,!1)}setTimeoutProvider(e){we(this,gr,e)}setTimeout(e,t){return z(this,gr).setTimeout(e,t)}clearTimeout(e){z(this,gr).clearTimeout(e)}setInterval(e,t){return z(this,gr).setInterval(e,t)}clearInterval(e){z(this,gr).clearInterval(e)}},gr=new WeakMap,ig=new WeakMap,Z1),es=new iC;function aC(e){setTimeout(e,0)}var rC=typeof window>"u"||"Deno"in globalThis;function Tn(){}function sC(e,t){return typeof e=="function"?e(t):e}function mm(e){return typeof e=="number"&&e>=0&&e!==1/0}function ow(e,t){return Math.max(e+(t||0)-Date.now(),0)}function kr(e,t){return typeof e=="function"?e(t):e}function Si(e,t){return typeof e=="function"?e(t):e}function Wv(e,t){const{type:n="all",exact:a,fetchStatus:s,predicate:l,queryKey:c,stale:d}=e;if(c){if(a){if(t.queryHash!==lg(c,t.options))return!1}else if(!hc(t.queryKey,c))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||s&&s!==t.state.fetchStatus||l&&!l(t))}function Xv(e,t){const{exact:n,status:a,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(ps(t.options.mutationKey)!==ps(l))return!1}else if(!hc(t.options.mutationKey,l))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function lg(e,t){return((t==null?void 0:t.queryKeyHashFn)||ps)(e)}function ps(e){return JSON.stringify(e,(t,n)=>gm(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function hc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>hc(e[n],t[n])):!1}var lC=Object.prototype.hasOwnProperty;function cw(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=Zv(e)&&Zv(t);if(!a&&!(gm(e)&&gm(t)))return t;const l=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),d=c.length,f=a?new Array(d):{};let h=0;for(let b=0;b<d;b++){const m=a?b:c[b],x=e[m],v=t[m];if(x===v){f[m]=x,(a?b<l:lC.call(e,m))&&h++;continue}if(x===null||v===null||typeof x!="object"||typeof v!="object"){f[m]=v;continue}const E=cw(x,v,n+1);f[m]=E,E===x&&h++}return l===d&&h===l?e:f}function Od(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Zv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gm(e){if(!Jv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Jv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Jv(e){return Object.prototype.toString.call(e)==="[object Object]"}function oC(e){return new Promise(t=>{es.setTimeout(t,e)})}function bm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?cw(e,t):t}function cC(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function uC(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var og=Symbol();function uw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===og?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function cg(e,t){return typeof e=="function"?e(...t):!!e}function dC(e,t,n){let a=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),a||(a=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var pc=(()=>{let e=()=>rC;return{isServer(){return e()},setIsServer(t){e=t}}})();function ym(){let e,t;const n=new Promise((s,l)=>{e=s,t=l});n.status="pending",n.catch(()=>{});function a(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},n.reject=s=>{a({status:"rejected",reason:s}),t(s)},n}var fC=aC;function hC(){let e=[],t=0,n=d=>{d()},a=d=>{d()},s=fC;const l=d=>{t?e.push(d):s(()=>{n(d)})},c=()=>{const d=e;e=[],d.length&&s(()=>{a(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||c()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{s=d}}}var rn=hC(),_l,br,Cl,J1,pC=(J1=class extends Fl{constructor(){super();Te(this,_l,!0);Te(this,br);Te(this,Cl);we(this,Cl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}})}onSubscribe(){z(this,br)||this.setEventListener(z(this,Cl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,br))==null||t.call(this),we(this,br,void 0))}setEventListener(t){var n;we(this,Cl,t),(n=z(this,br))==null||n.call(this),we(this,br,t(this.setOnline.bind(this)))}setOnline(t){z(this,_l)!==t&&(we(this,_l,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return z(this,_l)}},_l=new WeakMap,br=new WeakMap,Cl=new WeakMap,J1),Rd=new pC;function mC(e){return Math.min(1e3*2**e,3e4)}function dw(e){return(e??"online")==="online"?Rd.isOnline():!0}var xm=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function fw(e){let t=!1,n=0,a;const s=ym(),l=()=>s.status!=="pending",c=w=>{var k;if(!l()){const N=new xm(w);x(N),(k=e.onCancel)==null||k.call(e,N)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>sg.isFocused()&&(e.networkMode==="always"||Rd.isOnline())&&e.canRun(),b=()=>dw(e.networkMode)&&e.canRun(),m=w=>{l()||(a==null||a(),s.resolve(w))},x=w=>{l()||(a==null||a(),s.reject(w))},v=()=>new Promise(w=>{var k;a=N=>{(l()||h())&&w(N)},(k=e.onPause)==null||k.call(e)}).then(()=>{var w;a=void 0,l()||(w=e.onContinue)==null||w.call(e)}),E=()=>{if(l())return;let w;const k=n===0?e.initialPromise:void 0;try{w=k??e.fn()}catch(N){w=Promise.reject(N)}Promise.resolve(w).then(m).catch(N=>{var M;if(l())return;const C=e.retry??(pc.isServer()?0:3),A=e.retryDelay??mC,T=typeof A=="function"?A(n,N):A,L=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,N);if(t||!L){x(N);return}n++,(M=e.onFail)==null||M.call(e,n,N),oC(T).then(()=>h()?void 0:v()).then(()=>{t?x(N):E()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:d,continueRetry:f,canStart:b,start:()=>(b()?E():v().then(E),s)}}var rs,ew,hw=(ew=class{constructor(){Te(this,rs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mm(this.gcTime)&&we(this,rs,es.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pc.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,rs)!==void 0&&(es.clearTimeout(z(this,rs)),we(this,rs,void 0))}},rs=new WeakMap,ew),ss,Al,Ei,ls,on,Nc,os,si,pw,_a,tw,gC=(tw=class extends hw{constructor(t){super();Te(this,si);Te(this,ss);Te(this,Al);Te(this,Ei);Te(this,ls);Te(this,on);Te(this,Nc);Te(this,os);we(this,os,!1),we(this,Nc,t.defaultOptions),this.setOptions(t.options),this.observers=[],we(this,ls,t.client),we(this,Ei,z(this,ls).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,we(this,ss,t0(this.options)),this.state=t.state??z(this,ss),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,on))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,Nc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=t0(this.options);n.data!==void 0&&(this.setState(e0(n.data,n.dataUpdatedAt)),we(this,ss,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,Ei).remove(this)}setData(t,n){const a=bm(this.state.data,t,this.options);return Ke(this,si,_a).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){Ke(this,si,_a).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=z(this,on))==null?void 0:a.promise;return(s=z(this,on))==null||s.cancel(t),n?n.then(Tn).catch(Tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,ss)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Si(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===og||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>kr(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:!ow(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,on))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,on))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,Ei).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(z(this,on)&&(z(this,os)||Ke(this,si,pw).call(this)?z(this,on).cancel({revert:!0}):z(this,on).cancelRetry()),this.scheduleGc()),z(this,Ei).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,si,_a).call(this,{type:"invalidate"})}async fetch(t,n){var f,h,b,m,x,v,E,w,k,N,C,A;if(this.state.fetchStatus!=="idle"&&((f=z(this,on))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,on))return z(this,on).continueRetry(),z(this,on).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(L=>L.options.queryFn);T&&this.setOptions(T.options)}const a=new AbortController,s=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(we(this,os,!0),a.signal)})},l=()=>{const T=uw(this.options,n),M=(()=>{const U={client:z(this,ls),queryKey:this.queryKey,meta:this.meta};return s(U),U})();return we(this,os,!1),this.options.persister?this.options.persister(T,M,this):T(M)},d=(()=>{const T={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,ls),state:this.state,fetchFn:l};return s(T),T})();(h=this.options.behavior)==null||h.onFetch(d,this),we(this,Al,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=d.fetchOptions)==null?void 0:b.meta))&&Ke(this,si,_a).call(this,{type:"fetch",meta:(m=d.fetchOptions)==null?void 0:m.meta}),we(this,on,fw({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:T=>{T instanceof xm&&T.revert&&this.setState({...z(this,Al),fetchStatus:"idle"}),a.abort()},onFail:(T,L)=>{Ke(this,si,_a).call(this,{type:"failed",failureCount:T,error:L})},onPause:()=>{Ke(this,si,_a).call(this,{type:"pause"})},onContinue:()=>{Ke(this,si,_a).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const T=await z(this,on).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(v=(x=z(this,Ei).config).onSuccess)==null||v.call(x,T,this),(w=(E=z(this,Ei).config).onSettled)==null||w.call(E,T,this.state.error,this),T}catch(T){if(T instanceof xm){if(T.silent)return z(this,on).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw Ke(this,si,_a).call(this,{type:"error",error:T}),(N=(k=z(this,Ei).config).onError)==null||N.call(k,T,this),(A=(C=z(this,Ei).config).onSettled)==null||A.call(C,this.state.data,T,this),T}finally{this.scheduleGc()}}},ss=new WeakMap,Al=new WeakMap,Ei=new WeakMap,ls=new WeakMap,on=new WeakMap,Nc=new WeakMap,os=new WeakMap,si=new WeakSet,pw=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},_a=function(t){const n=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...mw(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,...e0(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return we(this,Al,t.manual?s:void 0),s;case"error":const l=t.error;return{...a,error:l,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=n(this.state),rn.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),z(this,Ei).notify({query:this,type:"updated",action:t})})},tw);function mw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function e0(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function t0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Hn,it,_c,Cn,cs,Tl,Ca,yr,Cc,Ol,Rl,us,ds,xr,jl,ut,sc,vm,wm,Em,Sm,km,Nm,_m,gw,nw,bC=(nw=class extends Fl{constructor(t,n){super();Te(this,ut);Te(this,Hn);Te(this,it);Te(this,_c);Te(this,Cn);Te(this,cs);Te(this,Tl);Te(this,Ca);Te(this,yr);Te(this,Cc);Te(this,Ol);Te(this,Rl);Te(this,us);Te(this,ds);Te(this,xr);Te(this,jl,new Set);this.options=n,we(this,Hn,t),we(this,yr,null),we(this,Ca,ym()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,it).addObserver(this),n0(z(this,it),this.options)?Ke(this,ut,sc).call(this):this.updateResult(),Ke(this,ut,Sm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cm(z(this,it),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cm(z(this,it),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,ut,km).call(this),Ke(this,ut,Nm).call(this),z(this,it).removeObserver(this)}setOptions(t){const n=this.options,a=z(this,it);if(this.options=z(this,Hn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Si(this.options.enabled,z(this,it))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ke(this,ut,_m).call(this),z(this,it).setOptions(this.options),n._defaulted&&!Od(this.options,n)&&z(this,Hn).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,it),observer:this});const s=this.hasListeners();s&&i0(z(this,it),a,this.options,n)&&Ke(this,ut,sc).call(this),this.updateResult(),s&&(z(this,it)!==a||Si(this.options.enabled,z(this,it))!==Si(n.enabled,z(this,it))||kr(this.options.staleTime,z(this,it))!==kr(n.staleTime,z(this,it)))&&Ke(this,ut,vm).call(this);const l=Ke(this,ut,wm).call(this);s&&(z(this,it)!==a||Si(this.options.enabled,z(this,it))!==Si(n.enabled,z(this,it))||l!==z(this,xr))&&Ke(this,ut,Em).call(this,l)}getOptimisticResult(t){const n=z(this,Hn).getQueryCache().build(z(this,Hn),t),a=this.createResult(n,t);return xC(this,a)&&(we(this,Cn,a),we(this,Tl,this.options),we(this,cs,z(this,it).state)),a}getCurrentResult(){return z(this,Cn)}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Ca).status==="pending"&&z(this,Ca).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){z(this,jl).add(t)}getCurrentQuery(){return z(this,it)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,Hn).defaultQueryOptions(t),a=z(this,Hn).getQueryCache().build(z(this,Hn),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Ke(this,ut,sc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,Cn)))}createResult(t,n){var te;const a=z(this,it),s=this.options,l=z(this,Cn),c=z(this,cs),d=z(this,Tl),h=t!==a?t.state:z(this,_c),{state:b}=t;let m={...b},x=!1,v;if(n._optimisticResults){const P=this.hasListeners(),Q=!P&&n0(t,n),J=P&&i0(t,a,n,s);(Q||J)&&(m={...m,...mw(b.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:E,errorUpdatedAt:w,status:k}=m;v=m.data;let N=!1;if(n.placeholderData!==void 0&&v===void 0&&k==="pending"){let P;l!=null&&l.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(P=l.data,N=!0):P=typeof n.placeholderData=="function"?n.placeholderData((te=z(this,Rl))==null?void 0:te.state.data,z(this,Rl)):n.placeholderData,P!==void 0&&(k="success",v=bm(l==null?void 0:l.data,P,n),x=!0)}if(n.select&&v!==void 0&&!N)if(l&&v===(c==null?void 0:c.data)&&n.select===z(this,Cc))v=z(this,Ol);else try{we(this,Cc,n.select),v=n.select(v),v=bm(l==null?void 0:l.data,v,n),we(this,Ol,v),we(this,yr,null)}catch(P){we(this,yr,P)}z(this,yr)&&(E=z(this,yr),v=z(this,Ol),w=Date.now(),k="error");const C=m.fetchStatus==="fetching",A=k==="pending",T=k==="error",L=A&&C,M=v!==void 0,$={status:k,fetchStatus:m.fetchStatus,isPending:A,isSuccess:k==="success",isError:T,isInitialLoading:L,isLoading:L,data:v,dataUpdatedAt:m.dataUpdatedAt,error:E,errorUpdatedAt:w,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&!A,isLoadingError:T&&!M,isPaused:m.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:T&&M,isStale:ug(t,n),refetch:this.refetch,promise:z(this,Ca),isEnabled:Si(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=$.data!==void 0,Q=$.status==="error"&&!P,J=ee=>{Q?ee.reject($.error):P&&ee.resolve($.data)},me=()=>{const ee=we(this,Ca,$.promise=ym());J(ee)},le=z(this,Ca);switch(le.status){case"pending":t.queryHash===a.queryHash&&J(le);break;case"fulfilled":(Q||$.data!==le.value)&&me();break;case"rejected":(!Q||$.error!==le.reason)&&me();break}}return $}updateResult(){const t=z(this,Cn),n=this.createResult(z(this,it),this.options);if(we(this,cs,z(this,it).state),we(this,Tl,this.options),z(this,cs).data!==void 0&&we(this,Rl,z(this,it)),Od(n,t))return;we(this,Cn,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!z(this,jl).size)return!0;const c=new Set(l??z(this,jl));return this.options.throwOnError&&c.add("error"),Object.keys(z(this,Cn)).some(d=>{const f=d;return z(this,Cn)[f]!==t[f]&&c.has(f)})};Ke(this,ut,gw).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,ut,Sm).call(this)}},Hn=new WeakMap,it=new WeakMap,_c=new WeakMap,Cn=new WeakMap,cs=new WeakMap,Tl=new WeakMap,Ca=new WeakMap,yr=new WeakMap,Cc=new WeakMap,Ol=new WeakMap,Rl=new WeakMap,us=new WeakMap,ds=new WeakMap,xr=new WeakMap,jl=new WeakMap,ut=new WeakSet,sc=function(t){Ke(this,ut,_m).call(this);let n=z(this,it).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Tn)),n},vm=function(){Ke(this,ut,km).call(this);const t=kr(this.options.staleTime,z(this,it));if(pc.isServer()||z(this,Cn).isStale||!mm(t))return;const a=ow(z(this,Cn).dataUpdatedAt,t)+1;we(this,us,es.setTimeout(()=>{z(this,Cn).isStale||this.updateResult()},a))},wm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,it)):this.options.refetchInterval)??!1},Em=function(t){Ke(this,ut,Nm).call(this),we(this,xr,t),!(pc.isServer()||Si(this.options.enabled,z(this,it))===!1||!mm(z(this,xr))||z(this,xr)===0)&&we(this,ds,es.setInterval(()=>{(this.options.refetchIntervalInBackground||sg.isFocused())&&Ke(this,ut,sc).call(this)},z(this,xr)))},Sm=function(){Ke(this,ut,vm).call(this),Ke(this,ut,Em).call(this,Ke(this,ut,wm).call(this))},km=function(){z(this,us)!==void 0&&(es.clearTimeout(z(this,us)),we(this,us,void 0))},Nm=function(){z(this,ds)!==void 0&&(es.clearInterval(z(this,ds)),we(this,ds,void 0))},_m=function(){const t=z(this,Hn).getQueryCache().build(z(this,Hn),this.options);if(t===z(this,it))return;const n=z(this,it);we(this,it,t),we(this,_c,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},gw=function(t){rn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,Cn))}),z(this,Hn).getQueryCache().notify({query:z(this,it),type:"observerResultsUpdated"})})},nw);function yC(e,t){return Si(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function n0(e,t){return yC(e,t)||e.state.data!==void 0&&Cm(e,t,t.refetchOnMount)}function Cm(e,t,n){if(Si(t.enabled,e)!==!1&&kr(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&ug(e,t)}return!1}function i0(e,t,n,a){return(e!==t||Si(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ug(e,n)}function ug(e,t){return Si(t.enabled,e)!==!1&&e.isStaleByTime(kr(t.staleTime,e))}function xC(e,t){return!Od(e.getCurrentResult(),t)}function a0(e){return{onFetch:(t,n)=>{var b,m,x,v,E;const a=t.options,s=(x=(m=(b=t.fetchOptions)==null?void 0:b.meta)==null?void 0:m.fetchMore)==null?void 0:x.direction,l=((v=t.state.data)==null?void 0:v.pages)||[],c=((E=t.state.data)==null?void 0:E.pageParams)||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let w=!1;const k=A=>{dC(A,()=>t.signal,()=>w=!0)},N=uw(t.options,t.fetchOptions),C=async(A,T,L)=>{if(w)return Promise.reject();if(T==null&&A.pages.length)return Promise.resolve(A);const U=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:T,direction:L?"backward":"forward",meta:t.options.meta};return k(Q),Q})(),$=await N(U),{maxPages:te}=t.options,P=L?uC:cC;return{pages:P(A.pages,$,te),pageParams:P(A.pageParams,T,te)}};if(s&&l.length){const A=s==="backward",T=A?vC:r0,L={pages:l,pageParams:c},M=T(a,L);d=await C(L,M,A)}else{const A=e??l.length;do{const T=f===0?c[0]??a.initialPageParam:r0(a,d);if(f>0&&T==null)break;d=await C(d,T),f++}while(f<A)}return d};t.options.persister?t.fetchFn=()=>{var w,k;return(k=(w=t.options).persister)==null?void 0:k.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function r0(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function vC(e,{pages:t,pageParams:n}){var a;return t.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,t[0],t,n[0],n):void 0}var Ac,Zi,xn,fs,Ji,hr,iw,wC=(iw=class extends hw{constructor(t){super();Te(this,Ji);Te(this,Ac);Te(this,Zi);Te(this,xn);Te(this,fs);we(this,Ac,t.client),this.mutationId=t.mutationId,we(this,xn,t.mutationCache),we(this,Zi,[]),this.state=t.state||bw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Zi).includes(t)||(z(this,Zi).push(t),this.clearGcTimeout(),z(this,xn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){we(this,Zi,z(this,Zi).filter(n=>n!==t)),this.scheduleGc(),z(this,xn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Zi).length||(this.state.status==="pending"?this.scheduleGc():z(this,xn).remove(this))}continue(){var t;return((t=z(this,fs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,d,f,h,b,m,x,v,E,w,k,N,C,A,T,L,M,U;const n=()=>{Ke(this,Ji,hr).call(this,{type:"continue"})},a={client:z(this,Ac),meta:this.options.meta,mutationKey:this.options.mutationKey};we(this,fs,fw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:($,te)=>{Ke(this,Ji,hr).call(this,{type:"failed",failureCount:$,error:te})},onPause:()=>{Ke(this,Ji,hr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,xn).canRun(this)}));const s=this.state.status==="pending",l=!z(this,fs).canStart();try{if(s)n();else{Ke(this,Ji,hr).call(this,{type:"pending",variables:t,isPaused:l}),z(this,xn).config.onMutate&&await z(this,xn).config.onMutate(t,this,a);const te=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,a));te!==this.state.context&&Ke(this,Ji,hr).call(this,{type:"pending",context:te,variables:t,isPaused:l})}const $=await z(this,fs).start();return await((h=(f=z(this,xn).config).onSuccess)==null?void 0:h.call(f,$,t,this.state.context,this,a)),await((m=(b=this.options).onSuccess)==null?void 0:m.call(b,$,t,this.state.context,a)),await((v=(x=z(this,xn).config).onSettled)==null?void 0:v.call(x,$,null,this.state.variables,this.state.context,this,a)),await((w=(E=this.options).onSettled)==null?void 0:w.call(E,$,null,t,this.state.context,a)),Ke(this,Ji,hr).call(this,{type:"success",data:$}),$}catch($){try{await((N=(k=z(this,xn).config).onError)==null?void 0:N.call(k,$,t,this.state.context,this,a))}catch(te){Promise.reject(te)}try{await((A=(C=this.options).onError)==null?void 0:A.call(C,$,t,this.state.context,a))}catch(te){Promise.reject(te)}try{await((L=(T=z(this,xn).config).onSettled)==null?void 0:L.call(T,void 0,$,this.state.variables,this.state.context,this,a))}catch(te){Promise.reject(te)}try{await((U=(M=this.options).onSettled)==null?void 0:U.call(M,void 0,$,t,this.state.context,a))}catch(te){Promise.reject(te)}throw Ke(this,Ji,hr).call(this,{type:"error",error:$}),$}finally{z(this,xn).runNext(this)}}},Ac=new WeakMap,Zi=new WeakMap,xn=new WeakMap,fs=new WeakMap,Ji=new WeakSet,hr=function(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,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{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),rn.batch(()=>{z(this,Zi).forEach(a=>{a.onMutationUpdate(t)}),z(this,xn).notify({mutation:this,type:"updated",action:t})})},iw);function bw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Aa,Ii,Tc,aw,EC=(aw=class extends Fl{constructor(t={}){super();Te(this,Aa);Te(this,Ii);Te(this,Tc);this.config=t,we(this,Aa,new Set),we(this,Ii,new Map),we(this,Tc,0)}build(t,n,a){const s=new wC({client:t,mutationCache:this,mutationId:++id(this,Tc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){z(this,Aa).add(t);const n=ad(t);if(typeof n=="string"){const a=z(this,Ii).get(n);a?a.push(t):z(this,Ii).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,Aa).delete(t)){const n=ad(t);if(typeof n=="string"){const a=z(this,Ii).get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&z(this,Ii).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ad(t);if(typeof n=="string"){const a=z(this,Ii).get(n),s=a==null?void 0:a.find(l=>l.state.status==="pending");return!s||s===t}else return!0}runNext(t){var a;const n=ad(t);if(typeof n=="string"){const s=(a=z(this,Ii).get(n))==null?void 0:a.find(l=>l!==t&&l.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){rn.batch(()=>{z(this,Aa).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,Aa).clear(),z(this,Ii).clear()})}getAll(){return Array.from(z(this,Aa))}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Xv(n,a))}findAll(t={}){return this.getAll().filter(n=>Xv(t,n))}notify(t){rn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return rn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tn))))}},Aa=new WeakMap,Ii=new WeakMap,Tc=new WeakMap,aw);function ad(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ta,vr,qn,Oa,Ma,Ed,Am,rw,SC=(rw=class extends Fl{constructor(n,a){super();Te(this,Ma);Te(this,Ta);Te(this,vr);Te(this,qn);Te(this,Oa);we(this,Ta,n),this.setOptions(a),this.bindMethods(),Ke(this,Ma,Ed).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const a=this.options;this.options=z(this,Ta).defaultMutationOptions(n),Od(this.options,a)||z(this,Ta).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,qn),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&ps(a.mutationKey)!==ps(this.options.mutationKey)?this.reset():((s=z(this,qn))==null?void 0:s.state.status)==="pending"&&z(this,qn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,qn))==null||n.removeObserver(this)}onMutationUpdate(n){Ke(this,Ma,Ed).call(this),Ke(this,Ma,Am).call(this,n)}getCurrentResult(){return z(this,vr)}reset(){var n;(n=z(this,qn))==null||n.removeObserver(this),we(this,qn,void 0),Ke(this,Ma,Ed).call(this),Ke(this,Ma,Am).call(this)}mutate(n,a){var s;return we(this,Oa,a),(s=z(this,qn))==null||s.removeObserver(this),we(this,qn,z(this,Ta).getMutationCache().build(z(this,Ta),this.options)),z(this,qn).addObserver(this),z(this,qn).execute(n)}},Ta=new WeakMap,vr=new WeakMap,qn=new WeakMap,Oa=new WeakMap,Ma=new WeakSet,Ed=function(){var a;const n=((a=z(this,qn))==null?void 0:a.state)??bw();we(this,vr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Am=function(n){rn.batch(()=>{var a,s,l,c,d,f,h,b;if(z(this,Oa)&&this.hasListeners()){const m=z(this,vr).variables,x=z(this,vr).context,v={client:z(this,Ta),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=z(this,Oa)).onSuccess)==null||s.call(a,n.data,m,x,v)}catch(E){Promise.reject(E)}try{(c=(l=z(this,Oa)).onSettled)==null||c.call(l,n.data,null,m,x,v)}catch(E){Promise.reject(E)}}else if((n==null?void 0:n.type)==="error"){try{(f=(d=z(this,Oa)).onError)==null||f.call(d,n.error,m,x,v)}catch(E){Promise.reject(E)}try{(b=(h=z(this,Oa)).onSettled)==null||b.call(h,void 0,n.error,m,x,v)}catch(E){Promise.reject(E)}}}this.listeners.forEach(m=>{m(z(this,vr))})})},rw),ea,sw,kC=(sw=class extends Fl{constructor(t={}){super();Te(this,ea);this.config=t,we(this,ea,new Map)}build(t,n,a){const s=n.queryKey,l=n.queryHash??lg(s,n);let c=this.get(l);return c||(c=new gC({client:t,queryKey:s,queryHash:l,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(c)),c}add(t){z(this,ea).has(t.queryHash)||(z(this,ea).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,ea).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,ea).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){rn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,ea).get(t)}getAll(){return[...z(this,ea).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Wv(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>Wv(t,a)):n}notify(t){rn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){rn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){rn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ea=new WeakMap,sw),Ht,wr,Er,Ml,Dl,Sr,Ll,Il,lw,NC=(lw=class{constructor(e={}){Te(this,Ht);Te(this,wr);Te(this,Er);Te(this,Ml);Te(this,Dl);Te(this,Sr);Te(this,Ll);Te(this,Il);we(this,Ht,e.queryCache||new kC),we(this,wr,e.mutationCache||new EC),we(this,Er,e.defaultOptions||{}),we(this,Ml,new Map),we(this,Dl,new Map),we(this,Sr,0)}mount(){id(this,Sr)._++,z(this,Sr)===1&&(we(this,Ll,sg.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Ht).onFocus())})),we(this,Il,Rd.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Ht).onOnline())})))}unmount(){var e,t;id(this,Sr)._--,z(this,Sr)===0&&((e=z(this,Ll))==null||e.call(this),we(this,Ll,void 0),(t=z(this,Il))==null||t.call(this),we(this,Il,void 0))}isFetching(e){return z(this,Ht).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,wr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,Ht).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,Ht).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(kr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return z(this,Ht).findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),s=z(this,Ht).get(a.queryHash),l=s==null?void 0:s.state.data,c=sC(t,l);if(c!==void 0)return z(this,Ht).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return rn.batch(()=>z(this,Ht).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,Ht).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,Ht);rn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,Ht);return rn.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=rn.batch(()=>z(this,Ht).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(Tn).catch(Tn)}invalidateQueries(e,t={}){return rn.batch(()=>(z(this,Ht).findAll(e).forEach(n=>{n.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 n={...t,cancelRefetch:t.cancelRefetch??!0},a=rn.batch(()=>z(this,Ht).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,n);return n.throwOnError||(l=l.catch(Tn)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(a).then(Tn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(this,Ht).build(this,t);return n.isStaleByTime(kr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tn).catch(Tn)}fetchInfiniteQuery(e){return e.behavior=a0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tn).catch(Tn)}ensureInfiniteQueryData(e){return e.behavior=a0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Rd.isOnline()?z(this,wr).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,Ht)}getMutationCache(){return z(this,wr)}getDefaultOptions(){return z(this,Er)}setDefaultOptions(e){we(this,Er,e)}setQueryDefaults(e,t){z(this,Ml).set(ps(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,Ml).values()],n={};return t.forEach(a=>{hc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){z(this,Dl).set(ps(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,Dl).values()],n={};return t.forEach(a=>{hc(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,Er).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=lg(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===og&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,Er).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,Ht).clear(),z(this,wr).clear()}},Ht=new WeakMap,wr=new WeakMap,Er=new WeakMap,Ml=new WeakMap,Dl=new WeakMap,Sr=new WeakMap,Ll=new WeakMap,Il=new WeakMap,lw),yw=O.createContext(void 0),Vn=e=>{const t=O.useContext(yw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_C=({client:e,children:t})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(yw.Provider,{value:e,children:t})),xw=O.createContext(!1),CC=()=>O.useContext(xw);xw.Provider;function AC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var TC=O.createContext(AC()),OC=()=>O.useContext(TC),RC=(e,t,n)=>{const a=n!=null&&n.state.error&&typeof e.throwOnError=="function"?cg(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},jC=e=>{O.useEffect(()=>{e.clearReset()},[e])},MC=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||cg(n,[e.error,a])),DC=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>n(a(...s)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},LC=(e,t)=>e.isLoading&&e.isFetching&&!t,IC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,s0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function zC(e,t,n){var x,v,E,w;const a=CC(),s=OC(),l=Vn(),c=l.defaultQueryOptions(e);(v=(x=l.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||v.call(x,c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",DC(c),RC(c,s,d),jC(s);const f=!l.getQueryCache().get(c.queryHash),[h]=O.useState(()=>new t(l,c)),b=h.getOptimisticResult(c),m=!a&&e.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(k=>{const N=m?h.subscribe(rn.batchCalls(k)):Tn;return h.updateResult(),N},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),O.useEffect(()=>{h.setOptions(c)},[c,h]),IC(c,b))throw s0(c,h,s);if(MC({result:b,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw b.error;if((w=(E=l.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||w.call(E,c,b),c.experimental_prefetchInRender&&!pc.isServer()&&LC(b,a)){const k=f?s0(c,h,s):d==null?void 0:d.promise;k==null||k.catch(Tn).finally(()=>{h.updateResult()})}return c.notifyOnChangeProps?b:h.trackResult(b)}function ct(e,t){return zC(e,bC)}function Gn(e,t){const n=Vn(),[a]=O.useState(()=>new SC(n,e));O.useEffect(()=>{a.setOptions(e)},[a,e]);const s=O.useSyncExternalStore(O.useCallback(c=>a.subscribe(rn.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),l=O.useCallback((c,d)=>{a.mutate(c,d).catch(Tn)},[a]);if(s.error&&cg(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.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 l0="popstate";function o0(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function BC(e={}){function t(a,s){var h;let l=(h=s.state)==null?void 0:h.masked,{pathname:c,search:d,hash:f}=l||a.location;return Tm("",{pathname:c,search:d,hash:f},s.state&&s.state.usr||null,s.state&&s.state.key||"default",l?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:mc(s)}return PC(t,n,null,e)}function Mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _i(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function UC(){return Math.random().toString(36).substring(2,10)}function c0(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 Tm(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?$l(t):t,state:n,key:t&&t.key||a||UC(),unstable_mask:s}}function mc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function $l(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function PC(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,d="POP",f=null,h=b();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function b(){return(c.state||{idx:null}).idx}function m(){d="POP";let k=b(),N=k==null?null:k-h;h=k,f&&f({action:d,location:w.location,delta:N})}function x(k,N){d="PUSH";let C=o0(k)?k:Tm(w.location,k,N);h=b()+1;let A=c0(C,h),T=w.createHref(C.unstable_mask||C);try{c.pushState(A,"",T)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;s.location.assign(T)}l&&f&&f({action:d,location:w.location,delta:1})}function v(k,N){d="REPLACE";let C=o0(k)?k:Tm(w.location,k,N);h=b();let A=c0(C,h),T=w.createHref(C.unstable_mask||C);c.replaceState(A,"",T),l&&f&&f({action:d,location:w.location,delta:0})}function E(k){return FC(k)}let w={get action(){return d},get location(){return e(s,c)},listen(k){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(l0,m),f=k,()=>{s.removeEventListener(l0,m),f=null}},createHref(k){return t(s,k)},createURL:E,encodeLocation(k){let N=E(k);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:x,replace:v,go(k){return c.go(k)}};return w}function FC(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Mt(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:mc(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function vw(e,t,n="/"){return $C(e,t,n,!1)}function $C(e,t,n,a){let s=typeof t=="string"?$l(t):t,l=Da(s.pathname||"/",n);if(l==null)return null;let c=ww(e);HC(c);let d=null;for(let f=0;d==null&&f<c.length;++f){let h=eA(l);d=ZC(c[f],h,a)}return d}function ww(e,t=[],n=[],a="",s=!1){let l=(c,d,f=s,h)=>{let b={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(a)&&f)return;Mt(b.relativePath.startsWith(a),`Absolute route path "${b.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(a.length)}let m=zi([a,b.relativePath]),x=n.concat(b);c.children&&c.children.length>0&&(Mt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),ww(c.children,t,x,m,f)),!(c.path==null&&!c.index)&&t.push({path:m,score:WC(m,c.index),routesMeta:x})};return e.forEach((c,d)=>{var f;if(c.path===""||!((f=c.path)!=null&&f.includes("?")))l(c,d);else for(let h of Ew(c.path))l(c,d,!0,h)}),t}function Ew(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),l=n.replace(/\?$/,"");if(a.length===0)return s?[l,""]:[l];let c=Ew(a.join("/")),d=[];return d.push(...c.map(f=>f===""?l:[l,f].join("/"))),s&&d.push(...c),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function HC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:XC(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var qC=/^:[\w-]+$/,KC=3,GC=2,VC=1,QC=10,YC=-2,u0=e=>e==="*";function WC(e,t){let n=e.split("/"),a=n.length;return n.some(u0)&&(a+=YC),t&&(a+=GC),n.filter(s=>!u0(s)).reduce((s,l)=>s+(qC.test(l)?KC:l===""?VC:QC),a)}function XC(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function ZC(e,t,n=!1){let{routesMeta:a}=e,s={},l="/",c=[];for(let d=0;d<a.length;++d){let f=a[d],h=d===a.length-1,b=l==="/"?t:t.slice(l.length)||"/",m=jd({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},b),x=f.route;if(!m&&h&&n&&!a[a.length-1].route.index&&(m=jd({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},b)),!m)return null;Object.assign(s,m.params),c.push({params:s,pathname:zi([l,m.pathname]),pathnameBase:aA(zi([l,m.pathnameBase])),route:x}),m.pathnameBase!=="/"&&(l=zi([l,m.pathnameBase]))}return c}function jd(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=JC(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let l=s[0],c=l.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:a.reduce((h,{paramName:b,isOptional:m},x)=>{if(b==="*"){let E=d[x]||"";c=l.slice(0,l.length-E.length).replace(/(.)\/+$/,"$1")}const v=d[x];return m&&!v?h[b]=void 0:h[b]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:c,pattern:e}}function JC(e,t=!1,n=!0){_i(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 a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,f,h,b)=>{if(a.push({paramName:d,isOptional:f!=null}),f){let m=b.charAt(h+c.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function eA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return _i(!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 Da(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var tA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function nA(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?$l(e):e,l;return n?(n=Sw(n),n.startsWith("/")?l=d0(n.substring(1),"/"):l=d0(n,t)):l=t,{pathname:l,search:rA(a),hash:sA(s)}}function d0(e,t){let n=Md(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function jp(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function iA(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function dg(e){let t=iA(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Wd(e,t,n,a=!1){let s;typeof e=="string"?s=$l(e):(s={...e},Mt(!s.pathname||!s.pathname.includes("?"),jp("?","pathname","search",s)),Mt(!s.pathname||!s.pathname.includes("#"),jp("#","pathname","hash",s)),Mt(!s.search||!s.search.includes("#"),jp("#","search","hash",s)));let l=e===""||s.pathname==="",c=l?"/":s.pathname,d;if(c==null)d=n;else{let m=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),m-=1;s.pathname=x.join("/")}d=m>=0?t[m]:"/"}let f=nA(s,d),h=c&&c!=="/"&&c.endsWith("/"),b=(l||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||b)&&(f.pathname+="/"),f}var Sw=e=>e.replace(/\/\/+/g,"/"),zi=e=>Sw(e.join("/")),Md=e=>e.replace(/\/+$/,""),aA=e=>Md(e).replace(/^\/*/,"/"),rA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,sA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,lA=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function oA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function cA(e){let t=e.map(n=>n.route.path).filter(Boolean);return zi(t)||"/"}var kw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nw(e,t){let n=e;if(typeof n!="string"||!tA.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(kw)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),d=Da(c.pathname,t);c.origin===l.origin&&d!=null?n=d+c.search+c.hash:s=!0}catch{_i(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _w=["POST","PUT","PATCH","DELETE"];new Set(_w);var uA=["GET",..._w];new Set(uA);var Hl=O.createContext(null);Hl.displayName="DataRouter";var Xd=O.createContext(null);Xd.displayName="DataRouterState";var Cw=O.createContext(!1);function dA(){return O.useContext(Cw)}var Aw=O.createContext({isTransitioning:!1});Aw.displayName="ViewTransition";var fA=O.createContext(new Map);fA.displayName="Fetchers";var hA=O.createContext(null);hA.displayName="Await";var ci=O.createContext(null);ci.displayName="Navigation";var Oc=O.createContext(null);Oc.displayName="Location";var Ti=O.createContext({outlet:null,matches:[],isDataRoute:!1});Ti.displayName="Route";var fg=O.createContext(null);fg.displayName="RouteError";var Tw="REACT_ROUTER_ERROR",pA="REDIRECT",mA="ROUTE_ERROR_RESPONSE";function gA(e){if(e.startsWith(`${Tw}:${pA}:{`))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 bA(e){if(e.startsWith(`${Tw}:${mA}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new lA(t.status,t.statusText,t.data)}catch{}}function yA(e,{relative:t}={}){Mt(ql(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=O.useContext(ci),{hash:s,pathname:l,search:c}=Rc(e,{relative:t}),d=l;return n!=="/"&&(d=l==="/"?n:zi([n,l])),a.createHref({pathname:d,search:c,hash:s})}function ql(){return O.useContext(Oc)!=null}function Ui(){return Mt(ql(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(Oc).location}var Ow="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Rw(e){O.useContext(ci).static||O.useLayoutEffect(e)}function Cr(){let{isDataRoute:e}=O.useContext(Ti);return e?MA():xA()}function xA(){Mt(ql(),"useNavigate() may be used only in the context of a <Router> component.");let e=O.useContext(Hl),{basename:t,navigator:n}=O.useContext(ci),{matches:a}=O.useContext(Ti),{pathname:s}=Ui(),l=JSON.stringify(dg(a)),c=O.useRef(!1);return Rw(()=>{c.current=!0}),O.useCallback((f,h={})=>{if(_i(c.current,Ow),!c.current)return;if(typeof f=="number"){n.go(f);return}let b=Wd(f,JSON.parse(l),s,h.relative==="path");e==null&&t!=="/"&&(b.pathname=b.pathname==="/"?t:zi([t,b.pathname])),(h.replace?n.replace:n.push)(b,h.state,h)},[t,n,l,s,e])}var vA=O.createContext(null);function wA(e){let t=O.useContext(Ti).outlet;return O.useMemo(()=>t&&O.createElement(vA.Provider,{value:e},t),[t,e])}function jw(){let{matches:e}=O.useContext(Ti),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Rc(e,{relative:t}={}){let{matches:n}=O.useContext(Ti),{pathname:a}=Ui(),s=JSON.stringify(dg(n));return O.useMemo(()=>Wd(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function EA(e,t){return Mw(e,t)}function Mw(e,t,n){var k;Mt(ql(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=O.useContext(ci),{matches:s}=O.useContext(Ti),l=s[s.length-1],c=l?l.params:{},d=l?l.pathname:"/",f=l?l.pathnameBase:"/",h=l&&l.route;{let N=h&&h.path||"";Lw(d,!h||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${N}">) 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="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let b=Ui(),m;if(t){let N=typeof t=="string"?$l(t):t;Mt(f==="/"||((k=N.pathname)==null?void 0:k.startsWith(f)),`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 "${f}" but pathname "${N.pathname}" was given in the \`location\` prop.`),m=N}else m=b;let x=m.pathname||"/",v=x;if(f!=="/"){let N=f.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let E=vw(e,{pathname:v});_i(h||E!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),_i(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.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 w=CA(E&&E.map(N=>Object.assign({},N,{params:Object.assign({},c,N.params),pathname:zi([f,a.encodeLocation?a.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?f:zi([f,a.encodeLocation?a.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),s,n);return t&&w?O.createElement(Oc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},w):w}function SA(){let e=jA(),t=oA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:l},"ErrorBoundary")," or"," ",O.createElement("code",{style:l},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),n?O.createElement("pre",{style:s},n):null,c)}var kA=O.createElement(SA,null),Dw=class extends O.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 n=bA(e.digest);n&&(e=n)}let t=e!==void 0?O.createElement(Ti.Provider,{value:this.props.routeContext},O.createElement(fg.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?O.createElement(NA,{error:e},t):t}};Dw.contextType=Cw;var Mp=new WeakMap;function NA({children:e,error:t}){let{basename:n}=O.useContext(ci);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=gA(t.digest);if(a){let s=Mp.get(t);if(s)throw s;let l=Nw(a.location,n);if(kw&&!Mp.get(t))if(l.isExternal||a.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:a.replace}));throw Mp.set(t,c),c}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function _A({routeContext:e,match:t,children:n}){let a=O.useContext(Hl);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),O.createElement(Ti.Provider,{value:e},n)}function CA(e,t=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,l=a==null?void 0:a.errors;if(l!=null){let b=s.findIndex(m=>m.route.id&&(l==null?void 0:l[m.route.id])!==void 0);Mt(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,b+1))}let c=!1,d=-1;if(n&&a){c=a.renderFallback;for(let b=0;b<s.length;b++){let m=s[b];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=b),m.route.id){let{loaderData:x,errors:v}=a,E=m.route.loader&&!x.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||E){n.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let f=n==null?void 0:n.onError,h=a&&f?(b,m)=>{var x,v;f(b,{location:a.location,params:((v=(x=a.matches)==null?void 0:x[0])==null?void 0:v.params)??{},unstable_pattern:cA(a.matches),errorInfo:m})}:void 0;return s.reduceRight((b,m,x)=>{let v,E=!1,w=null,k=null;a&&(v=l&&m.route.id?l[m.route.id]:void 0,w=m.route.errorElement||kA,c&&(d<0&&x===0?(Lw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,k=null):d===x&&(E=!0,k=m.route.hydrateFallbackElement||null)));let N=t.concat(s.slice(0,x+1)),C=()=>{let A;return v?A=w:E?A=k:m.route.Component?A=O.createElement(m.route.Component,null):m.route.element?A=m.route.element:A=b,O.createElement(_A,{match:m,routeContext:{outlet:b,matches:N,isDataRoute:a!=null},children:A})};return a&&(m.route.ErrorBoundary||m.route.errorElement||x===0)?O.createElement(Dw,{location:a.location,revalidation:a.revalidation,component:w,error:v,children:C(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:h}):C()},null)}function hg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function AA(e){let t=O.useContext(Hl);return Mt(t,hg(e)),t}function TA(e){let t=O.useContext(Xd);return Mt(t,hg(e)),t}function OA(e){let t=O.useContext(Ti);return Mt(t,hg(e)),t}function pg(e){let t=OA(e),n=t.matches[t.matches.length-1];return Mt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function RA(){return pg("useRouteId")}function jA(){var a;let e=O.useContext(fg),t=TA("useRouteError"),n=pg("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function MA(){let{router:e}=AA("useNavigate"),t=pg("useNavigate"),n=O.useRef(!1);return Rw(()=>{n.current=!0}),O.useCallback(async(s,l={})=>{_i(n.current,Ow),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var f0={};function Lw(e,t,n){!t&&!f0[e]&&(f0[e]=!0,_i(!1,n))}O.memo(DA);function DA({routes:e,future:t,state:n,isStatic:a,onError:s}){return Mw(e,void 0,{state:n,isStatic:a,onError:s})}function LA({to:e,replace:t,state:n,relative:a}){Mt(ql(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=O.useContext(ci);_i(!s,"<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:l}=O.useContext(Ti),{pathname:c}=Ui(),d=Cr(),f=Wd(e,dg(l),c,a==="path"),h=JSON.stringify(f);return O.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:a})},[d,h,a,t,n]),null}function IA(e){return wA(e.context)}function Fn(e){Mt(!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 zA({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:l=!1,unstable_useTransitions:c}){Mt(!ql(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=O.useMemo(()=>({basename:d,navigator:s,static:l,unstable_useTransitions:c,future:{}}),[d,s,l,c]);typeof n=="string"&&(n=$l(n));let{pathname:h="/",search:b="",hash:m="",state:x=null,key:v="default",unstable_mask:E}=n,w=O.useMemo(()=>{let k=Da(h,d);return k==null?null:{location:{pathname:k,search:b,hash:m,state:x,key:v,unstable_mask:E},navigationType:a}},[d,h,b,m,x,v,a,E]);return _i(w!=null,`<Router basename="${d}"> is not able to match the URL "${h}${b}${m}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:O.createElement(ci.Provider,{value:f},O.createElement(Oc.Provider,{children:t,value:w}))}function BA({children:e,location:t}){return EA(Om(e),t)}function Om(e,t=[]){let n=[];return O.Children.forEach(e,(a,s)=>{if(!O.isValidElement(a))return;let l=[...t,s];if(a.type===O.Fragment){n.push.apply(n,Om(a.props.children,l));return}Mt(a.type===Fn,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Mt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||l.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=Om(a.props.children,l)),n.push(c)}),n}var Sd="get",kd="application/x-www-form-urlencoded";function Zd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function UA(e){return Zd(e)&&e.tagName.toLowerCase()==="button"}function PA(e){return Zd(e)&&e.tagName.toLowerCase()==="form"}function FA(e){return Zd(e)&&e.tagName.toLowerCase()==="input"}function $A(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HA(e,t){return e.button===0&&(!t||t==="_self")&&!$A(e)}function Rm(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function qA(e,t){let n=Rm(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(l=>{n.append(s,l)})}),n}var rd=null;function KA(){if(rd===null)try{new FormData(document.createElement("form"),0),rd=!1}catch{rd=!0}return rd}var GA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Dp(e){return e!=null&&!GA.has(e)?(_i(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kd}"`),null):e}function VA(e,t){let n,a,s,l,c;if(PA(e)){let d=e.getAttribute("action");a=d?Da(d,t):null,n=e.getAttribute("method")||Sd,s=Dp(e.getAttribute("enctype"))||kd,l=new FormData(e)}else if(UA(e)||FA(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(a=f?Da(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Sd,s=Dp(e.getAttribute("formenctype"))||Dp(d.getAttribute("enctype"))||kd,l=new FormData(d,e),!KA()){let{name:h,type:b,value:m}=e;if(b==="image"){let x=h?`${h}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else h&&l.append(h,m)}}else{if(Zd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Sd,a=null,s=kd,c=e}return l&&s==="text/plain"&&(c=l,l=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function mg(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Iw(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Da(s.pathname,t)==="/"?s.pathname=`${Md(t)}/_root.${a}`:s.pathname=`${Md(s.pathname)}.${a}`,s}async function QA(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function YA(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 WA(e,t,n){let a=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let c=await QA(l,n);return c.links?c.links():[]}return[]}));return eT(a.flat(1).filter(YA).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function h0(e,t,n,a,s,l){let c=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,d=(f,h)=>{var b;return n[h].pathname!==f.pathname||((b=n[h].route.path)==null?void 0:b.endsWith("*"))&&n[h].params["*"]!==f.params["*"]};return l==="assets"?t.filter((f,h)=>c(f,h)||d(f,h)):l==="data"?t.filter((f,h)=>{var m;let b=a.routes[f.route.id];if(!b||!b.hasLoader)return!1;if(c(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let x=f.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function XA(e,t,{includeHydrateFallback:n}={}){return ZA(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function ZA(e){return[...new Set(e)]}function JA(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function eT(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let l=JSON.stringify(JA(s));return n.has(l)||(n.add(l),a.push({key:l,link:s})),a},[])}function gg(){let e=O.useContext(Hl);return mg(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tT(){let e=O.useContext(Xd);return mg(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bg=O.createContext(void 0);bg.displayName="FrameworkContext";function yg(){let e=O.useContext(bg);return mg(e,"You must render this element inside a <HydratedRouter> element"),e}function nT(e,t){let n=O.useContext(bg),[a,s]=O.useState(!1),[l,c]=O.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:b,onTouchStart:m}=t,x=O.useRef(null);O.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=N=>{N.forEach(C=>{c(C.isIntersecting)})},k=new IntersectionObserver(w,{threshold:.5});return x.current&&k.observe(x.current),()=>{k.disconnect()}}},[e]),O.useEffect(()=>{if(a){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[a]);let v=()=>{s(!0)},E=()=>{s(!1),c(!1)};return n?e!=="intent"?[l,x,{}]:[l,x,{onFocus:Zo(d,v),onBlur:Zo(f,E),onMouseEnter:Zo(h,v),onMouseLeave:Zo(b,E),onTouchStart:Zo(m,v)}]:[!1,x,{}]}function Zo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function iT({page:e,...t}){let n=dA(),{router:a}=gg(),s=O.useMemo(()=>vw(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?O.createElement(rT,{page:e,matches:s,...t}):O.createElement(sT,{page:e,matches:s,...t}):null}function aT(e){let{manifest:t,routeModules:n}=yg(),[a,s]=O.useState([]);return O.useEffect(()=>{let l=!1;return WA(e,t,n).then(c=>{l||s(c)}),()=>{l=!0}},[e,t,n]),a}function rT({page:e,matches:t,...n}){let a=Ui(),{future:s}=yg(),{basename:l}=gg(),c=O.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let d=Iw(e,l,s.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,h=[];for(let b of t)typeof b.route.shouldRevalidate=="function"?f=!0:h.push(b.route.id);return f&&h.length>0&&d.searchParams.set("_routes",h.join(",")),[d.pathname+d.search]},[l,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return O.createElement(O.Fragment,null,c.map(d=>O.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function sT({page:e,matches:t,...n}){let a=Ui(),{future:s,manifest:l,routeModules:c}=yg(),{basename:d}=gg(),{loaderData:f,matches:h}=tT(),b=O.useMemo(()=>h0(e,t,h,l,a,"data"),[e,t,h,l,a]),m=O.useMemo(()=>h0(e,t,h,l,a,"assets"),[e,t,h,l,a]),x=O.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,k=!1;if(t.forEach(C=>{var T;let A=l.routes[C.route.id];!A||!A.hasLoader||(!b.some(L=>L.route.id===C.route.id)&&C.route.id in f&&((T=c[C.route.id])!=null&&T.shouldRevalidate)||A.hasClientLoader?k=!0:w.add(C.route.id))}),w.size===0)return[];let N=Iw(e,d,s.unstable_trailingSlashAwareDataRequests,"data");return k&&w.size>0&&N.searchParams.set("_routes",t.filter(C=>w.has(C.route.id)).map(C=>C.route.id).join(",")),[N.pathname+N.search]},[d,s.unstable_trailingSlashAwareDataRequests,f,a,l,b,t,e,c]),v=O.useMemo(()=>XA(m,l),[m,l]),E=aT(m);return O.createElement(O.Fragment,null,x.map(w=>O.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),v.map(w=>O.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),E.map(({key:w,link:k})=>O.createElement("link",{key:w,nonce:n.nonce,...k,crossOrigin:k.crossOrigin??n.crossOrigin})))}function lT(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var oT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oT&&(window.__reactRouterVersion="7.14.2")}catch{}function cT({basename:e,children:t,unstable_useTransitions:n,window:a}){let s=O.useRef();s.current==null&&(s.current=BC({window:a,v5Compat:!0}));let l=s.current,[c,d]=O.useState({action:l.action,location:l.location}),f=O.useCallback(h=>{n===!1?d(h):O.startTransition(()=>d(h))},[n]);return O.useLayoutEffect(()=>l.listen(f),[l,f]),O.createElement(zA,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,unstable_useTransitions:n})}var zw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bs=O.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:l,replace:c,unstable_mask:d,state:f,target:h,to:b,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:v,...E},w){let{basename:k,navigator:N,unstable_useTransitions:C}=O.useContext(ci),A=typeof b=="string"&&zw.test(b),T=Nw(b,k);b=T.to;let L=yA(b,{relative:s}),M=Ui(),U=null;if(d){let ee=Wd(d,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);k!=="/"&&(ee.pathname=ee.pathname==="/"?k:zi([k,ee.pathname])),U=N.createHref(ee)}let[$,te,P]=nT(a,E),Q=fT(b,{replace:c,unstable_mask:d,state:f,target:h,preventScrollReset:m,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:C});function J(ee){t&&t(ee),ee.defaultPrevented||Q(ee)}let me=!(T.isExternal||l),le=O.createElement("a",{...E,...P,href:(me?U:void 0)||T.absoluteURL||L,onClick:me?J:t,ref:lT(w,te),target:h,"data-discover":!A&&n==="render"?"true":void 0});return $&&!A?O.createElement(O.Fragment,null,le,O.createElement(iT,{page:L})):le});bs.displayName="Link";var Bw=O.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:l,to:c,viewTransition:d,children:f,...h},b){let m=Rc(c,{relative:h.relative}),x=Ui(),v=O.useContext(Xd),{navigator:E,basename:w}=O.useContext(ci),k=v!=null&&bT(m)&&d===!0,N=E.encodeLocation?E.encodeLocation(m).pathname:m.pathname,C=x.pathname,A=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(C=C.toLowerCase(),A=A?A.toLowerCase():null,N=N.toLowerCase()),A&&w&&(A=Da(A,w)||A);const T=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let L=C===N||!s&&C.startsWith(N)&&C.charAt(T)==="/",M=A!=null&&(A===N||!s&&A.startsWith(N)&&A.charAt(N.length)==="/"),U={isActive:L,isPending:M,isTransitioning:k},$=L?t:void 0,te;typeof a=="function"?te=a(U):te=[a,L?"active":null,M?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let P=typeof l=="function"?l(U):l;return O.createElement(bs,{...h,"aria-current":$,className:te,ref:b,style:P,to:c,viewTransition:d},typeof f=="function"?f(U):f)});Bw.displayName="NavLink";var uT=O.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:l,method:c=Sd,action:d,onSubmit:f,relative:h,preventScrollReset:b,viewTransition:m,unstable_defaultShouldRevalidate:x,...v},E)=>{let{unstable_useTransitions:w}=O.useContext(ci),k=mT(),N=gT(d,{relative:h}),C=c.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&zw.test(d),T=L=>{if(f&&f(L),L.defaultPrevented)return;L.preventDefault();let M=L.nativeEvent.submitter,U=(M==null?void 0:M.getAttribute("formmethod"))||c,$=()=>k(M||L.currentTarget,{fetcherKey:t,method:U,navigate:n,replace:s,state:l,relative:h,preventScrollReset:b,viewTransition:m,unstable_defaultShouldRevalidate:x});w&&n!==!1?O.startTransition(()=>$()):$()};return O.createElement("form",{ref:E,method:C,action:N,onSubmit:a?f:T,...v,"data-discover":!A&&e==="render"?"true":void 0})});uT.displayName="Form";function dT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Uw(e){let t=O.useContext(Hl);return Mt(t,dT(e)),t}function fT(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:h}={}){let b=Cr(),m=Ui(),x=Rc(e,{relative:c});return O.useCallback(v=>{if(HA(v,t)){v.preventDefault();let E=n!==void 0?n:mc(m)===mc(x),w=()=>b(e,{replace:E,unstable_mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:f});h?O.startTransition(()=>w()):w()}},[m,b,x,n,a,s,t,e,l,c,d,f,h])}function Pw(e){_i(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=O.useRef(Rm(e)),n=O.useRef(!1),a=Ui(),s=O.useMemo(()=>qA(a.search,n.current?null:t.current),[a.search]),l=Cr(),c=O.useCallback((d,f)=>{const h=Rm(typeof d=="function"?d(new URLSearchParams(s)):d);n.current=!0,l("?"+h,f)},[l,s]);return[s,c]}var hT=0,pT=()=>`__${String(++hT)}__`;function mT(){let{router:e}=Uw("useSubmit"),{basename:t}=O.useContext(ci),n=RA(),a=e.fetch,s=e.navigate;return O.useCallback(async(l,c={})=>{let{action:d,method:f,encType:h,formData:b,body:m}=VA(l,t);if(c.navigate===!1){let x=c.fetcherKey||pT();await a(x,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:m,formMethod:c.method||f,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:m,formMethod:c.method||f,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function gT(e,{relative:t}={}){let{basename:n}=O.useContext(ci),a=O.useContext(Ti);Mt(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),l={...Rc(e||".",{relative:t})},c=Ui();if(e==null){l.search=c.search;let d=new URLSearchParams(l.search),f=d.getAll("index");if(f.some(b=>b==="")){d.delete("index"),f.filter(m=>m).forEach(m=>d.append("index",m));let b=d.toString();l.search=b?`?${b}`:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:zi([n,l.pathname])),mc(l)}function bT(e,{relative:t}={}){let n=O.useContext(Aw);Mt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Uw("useViewTransitionState"),s=Rc(e,{relative:t});if(!n.isTransitioning)return!1;let l=Da(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Da(n.nextLocation.pathname,a)||n.nextLocation.pathname;return jd(s.pathname,c)!=null||jd(s.pathname,l)!=null}function yT(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];hs(t[0])&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const p0={};function jm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];hs(t[0])&&p0[t[0]]||(hs(t[0])&&(p0[t[0]]=new Date),yT(...t))}const Fw=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},m0=(e,t,n)=>{e.loadNamespaces(t,Fw(e,n))},g0=(e,t,n,a)=>{hs(n)&&(n=[n]),n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,Fw(e,a))},xT=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=t.languages[0],s=t.options?t.options.fallbackLng:!1,l=t.languages[t.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const c=(d,f)=>{const h=t.services.backendConnector.state[`${d}|${f}`];return h===-1||h===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!c(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(a,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||c(a,e)&&(!s||c(l,e)))},vT=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(jm("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(s,l)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!l(s.isLanguageChangingTo,e))return!1}}):xT(e,t,n)},hs=e=>typeof e=="string",wT=e=>typeof e=="object"&&e!==null,ET=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ST={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},kT=e=>ST[e],NT=e=>e.replace(ET,kT);let Mm={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:NT};const _T=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Mm={...Mm,...e}},CT=()=>Mm;let $w;const AT=e=>{$w=e},TT=()=>$w,OT={type:"3rdParty",init(e){_T(e.options.react),AT(e)}},RT=O.createContext();class jT{constructor(){kp(this,"getUsedNamespaces",()=>Object.keys(this.usedNamespaces));this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}}const MT=(e,t)=>{const n=O.useRef();return O.useEffect(()=>{n.current=e},[e,t]),n.current},Hw=(e,t,n,a)=>e.getFixedT(t,n,a),DT=(e,t,n,a)=>O.useCallback(Hw(e,t,n,a),[e,t,n,a]),Fe=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:a,defaultNS:s}=O.useContext(RT)||{},l=n||a||TT();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new jT),!l){jm("You will need to pass in an i18next instance by using initReactI18next");const T=(M,U)=>hs(U)?U:wT(U)&&hs(U.defaultValue)?U.defaultValue:Array.isArray(M)?M[M.length-1]:M,L=[T,{},!1];return L.t=T,L.i18n={},L.ready=!1,L}l.options.react&&l.options.react.wait!==void 0&&jm("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c={...CT(),...l.options.react,...t},{useSuspense:d,keyPrefix:f}=c;let h=e||s||l.options&&l.options.defaultNS;h=hs(h)?[h]:h||["translation"],l.reportNamespaces.addUsedNamespaces&&l.reportNamespaces.addUsedNamespaces(h);const b=(l.isInitialized||l.initializedStoreOnce)&&h.every(T=>vT(T,l,c)),m=DT(l,t.lng||null,c.nsMode==="fallback"?h:h[0],f),x=()=>m,v=()=>Hw(l,t.lng||null,c.nsMode==="fallback"?h:h[0],f),[E,w]=O.useState(x);let k=h.join();t.lng&&(k=`${t.lng}${k}`);const N=MT(k),C=O.useRef(!0);O.useEffect(()=>{const{bindI18n:T,bindI18nStore:L}=c;C.current=!0,!b&&!d&&(t.lng?g0(l,t.lng,h,()=>{C.current&&w(v)}):m0(l,h,()=>{C.current&&w(v)})),b&&N&&N!==k&&C.current&&w(v);const M=()=>{C.current&&w(v)};return T&&l&&l.on(T,M),L&&l&&l.store.on(L,M),()=>{C.current=!1,T&&l&&T.split(" ").forEach(U=>l.off(U,M)),L&&l&&L.split(" ").forEach(U=>l.store.off(U,M))}},[l,k]),O.useEffect(()=>{C.current&&b&&w(x)},[l,f,b]);const A=[E,l,b];if(A.t=E,A.i18n=l,A.ready=b,b||!b&&!d)return A;throw new Promise(T=>{t.lng?g0(l,t.lng,h,()=>T()):m0(l,h,()=>T())})};/**
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 LT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),IT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),b0=e=>{const t=IT(e);return t.charAt(0).toUpperCase()+t.slice(1)},qw=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),zT=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 BT={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 UT=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:l,iconNode:c,...d},f)=>O.createElement("svg",{ref:f,...BT,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:qw("lucide",s),...!l&&!zT(d)&&{"aria-hidden":"true"},...d},[...c.map(([h,b])=>O.createElement(h,b)),...Array.isArray(l)?l:[l]]));/**
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 Ce=(e,t)=>{const n=O.forwardRef(({className:a,...s},l)=>O.createElement(UT,{ref:l,iconNode:t,className:qw(`lucide-${LT(b0(e))}`,`lucide-${e}`,a),...s}));return n.displayName=b0(e),n};/**
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 PT=[["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"}]],Jd=Ce("activity",PT);/**
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 FT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Kw=Ce("arrow-left",FT);/**
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 $T=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],HT=Ce("arrow-up",$T);/**
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 qT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],KT=Ce("check",qT);/**
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 GT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],jc=Ce("chevron-down",GT);/**
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 VT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ef=Ce("chevron-right",VT);/**
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 QT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],YT=Ce("chevron-up",QT);/**
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 WT=[["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"}]],gc=Ce("circle-alert",WT);/**
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 XT=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Dm=Ce("circle-check-big",XT);/**
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 ZT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],bc=Ce("circle-check",ZT);/**
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 JT=[["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"}]],e2=Ce("circle-x",JT);/**
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 t2=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],n2=Ce("clock",t2);/**
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 i2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],a2=Ce("copy",i2);/**
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 r2=[["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"}]],Gw=Ce("download",r2);/**
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 s2=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],l2=Ce("eye",s2);/**
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 o2=[["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"}]],y0=Ce("file-code",o2);/**
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 c2=[["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"}]],Mc=Ce("file-text",c2);/**
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 u2=[["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"}]],d2=Ce("flame",u2);/**
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 f2=[["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"}]],h2=Ce("folder-git-2",f2);/**
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 p2=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Vw=Ce("folder-open",p2);/**
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 m2=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],yc=Ce("folder",m2);/**
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 g2=[["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"}]],b2=Ce("funnel",g2);/**
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 y2=[["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"}]],x2=Ce("git-branch",y2);/**
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 v2=[["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"}]],Qw=Ce("globe",v2);/**
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 w2=[["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"}]],E2=Ce("history",w2);/**
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 S2=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],k2=Ce("house",S2);/**
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 N2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],_2=Ce("image",N2);/**
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 C2=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],A2=Ce("kanban",C2);/**
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 T2=[["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"}]],O2=Ce("layout-grid",T2);/**
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 R2=[["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"}]],j2=Ce("link",R2);/**
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 M2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bt=Ce("loader-circle",M2);/**
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 D2=[["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"}]],x0=Ce("message-circle",D2);/**
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 L2=[["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"}]],I2=Ce("message-square",L2);/**
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 z2=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],B2=Ce("paperclip",z2);/**
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 U2=[["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"}]],P2=Ce("pause",U2);/**
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 F2=[["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"}]],xg=Ce("pen-line",F2);/**
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 $2=[["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"}]],vg=Ce("play",$2);/**
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 H2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Pi=Ce("plus",H2);/**
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 q2=[["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"}]],Yw=Ce("radio",q2);/**
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 K2=[["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"}]],zl=Ce("refresh-cw",K2);/**
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 G2=[["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"}]],Ww=Ce("rotate-ccw",G2);/**
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 V2=[["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"}]],tf=Ce("save",V2);/**
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 Q2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Dd=Ce("search",Q2);/**
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 Y2=[["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"}]],W2=Ce("send",Y2);/**
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 X2=[["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"}]],Xw=Ce("settings",X2);/**
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 Z2=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],J2=Ce("skull",Z2);/**
311
+ * @license lucide-react v0.544.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const eO=[["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"}]],tO=Ce("snowflake",eO);/**
316
+ * @license lucide-react v0.544.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const nO=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Zw=Ce("square",nO);/**
321
+ * @license lucide-react v0.544.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const iO=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Jw=Ce("terminal",iO);/**
326
+ * @license lucide-react v0.544.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const aO=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],rO=Ce("timer-reset",aO);/**
331
+ * @license lucide-react v0.544.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const sO=[["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"}]],Kl=Ce("trash-2",sO);/**
336
+ * @license lucide-react v0.544.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const lO=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],oO=Ce("triangle-alert",lO);/**
341
+ * @license lucide-react v0.544.0 - ISC
342
+ *
343
+ * This source code is licensed under the ISC license.
344
+ * See the LICENSE file in the root directory of this source tree.
345
+ */const cO=[["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"}]],eE=Ce("users",cO);/**
346
+ * @license lucide-react v0.544.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const uO=[["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"}]],tE=Ce("workflow",uO);/**
351
+ * @license lucide-react v0.544.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const dO=[["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"}]],nE=Ce("wrench",dO);/**
356
+ * @license lucide-react v0.544.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const fO=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ci=Ce("x",fO);/**
361
+ * @license lucide-react v0.544.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const hO=[["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"}]],pO=Ce("zap",hO),Be=e=>typeof e=="string",Jo=()=>{let e,t;const n=new Promise((a,s)=>{e=a,t=s});return n.resolve=e,n.reject=t,n},v0=e=>e==null?"":""+e,mO=(e,t,n)=>{e.forEach(a=>{t[a]&&(n[a]=t[a])})},gO=/###/g,w0=e=>e&&e.indexOf("###")>-1?e.replace(gO,"."):e,E0=e=>!e||Be(e),oc=(e,t,n)=>{const a=Be(t)?t.split("."):t;let s=0;for(;s<a.length-1;){if(E0(e))return{};const l=w0(a[s]);!e[l]&&n&&(e[l]=new n),Object.prototype.hasOwnProperty.call(e,l)?e=e[l]:e={},++s}return E0(e)?{}:{obj:e,k:w0(a[s])}},S0=(e,t,n)=>{const{obj:a,k:s}=oc(e,t,Object);if(a!==void 0||t.length===1){a[s]=n;return}let l=t[t.length-1],c=t.slice(0,t.length-1),d=oc(e,c,Object);for(;d.obj===void 0&&c.length;)l=`${c[c.length-1]}.${l}`,c=c.slice(0,c.length-1),d=oc(e,c,Object),d&&d.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=n},bO=(e,t,n,a)=>{const{obj:s,k:l}=oc(e,t,Object);s[l]=s[l]||[],s[l].push(n)},Ld=(e,t)=>{const{obj:n,k:a}=oc(e,t);if(n)return n[a]},yO=(e,t,n)=>{const a=Ld(e,n);return a!==void 0?a:Ld(t,n)},iE=(e,t,n)=>{for(const a in t)a!=="__proto__"&&a!=="constructor"&&(a in e?Be(e[a])||e[a]instanceof String||Be(t[a])||t[a]instanceof String?n&&(e[a]=t[a]):iE(e[a],t[a],n):e[a]=t[a]);return e},ll=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var xO={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const vO=e=>Be(e)?e.replace(/[&<>"'\/]/g,t=>xO[t]):e;class wO{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const a=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,a),this.regExpQueue.push(t),a}}const EO=[" ",",","?","!",";"],SO=new wO(20),kO=(e,t,n)=>{t=t||"",n=n||"";const a=EO.filter(c=>t.indexOf(c)<0&&n.indexOf(c)<0);if(a.length===0)return!0;const s=SO.getRegExp(`(${a.map(c=>c==="?"?"\\?":c).join("|")})`);let l=!s.test(e);if(!l){const c=e.indexOf(n);c>0&&!s.test(e.substring(0,c))&&(l=!0)}return l},Lm=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const a=t.split(n);let s=e;for(let l=0;l<a.length;){if(!s||typeof s!="object")return;let c,d="";for(let f=l;f<a.length;++f)if(f!==l&&(d+=n),d+=a[f],c=s[d],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&f<a.length-1)continue;l+=f-l+1;break}s=c}return s},Id=e=>e&&e.replace("_","-"),NO={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class zd{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||NO,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,a,s){return s&&!this.debug?null:(Be(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new zd(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new zd(this.logger,t)}}var ta=new zd;class nf{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);const s=this.observers[a].get(n)||0;this.observers[a].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(c=>{let[d,f]=c;for(let h=0;h<f;h++)d(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(c=>{let[d,f]=c;for(let h=0;h<f;h++)d.apply(d,[t,...a])})}}class k0 extends nf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,a){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;t.indexOf(".")>-1?d=t.split("."):(d=[t,n],a&&(Array.isArray(a)?d.push(...a):Be(a)&&l?d.push(...a.split(l)):d.push(a)));const f=Ld(this.data,d);return!f&&!n&&!a&&t.indexOf(".")>-1&&(t=d[0],n=d[1],a=d.slice(2).join(".")),f||!c||!Be(a)?f:Lm(this.data&&this.data[t]&&this.data[t][n],a,l)}addResource(t,n,a,s){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const c=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=[t,n];a&&(d=d.concat(c?a.split(c):a)),t.indexOf(".")>-1&&(d=t.split("."),s=n,n=d[1]),this.addNamespaces(n),S0(this.data,d,s),l.silent||this.emit("added",t,n,a,s)}addResources(t,n,a){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const l in a)(Be(a[l])||Array.isArray(a[l]))&&this.addResource(t,n,l,a[l],{silent:!0});s.silent||this.emit("added",t,n,a)}addResourceBundle(t,n,a,s,l){let c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},d=[t,n];t.indexOf(".")>-1&&(d=t.split("."),s=a,a=n,n=d[1]),this.addNamespaces(n);let f=Ld(this.data,d)||{};c.skipCopy||(a=JSON.parse(JSON.stringify(a))),s?iE(f,a,l):f={...f,...a},S0(this.data,d,f),c.silent||this.emit("added",t,n,a)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var aE={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,a,s){return e.forEach(l=>{this.processors[l]&&(t=this.processors[l].process(t,n,a,s))}),t}};const N0={};class Bd extends nf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),mO(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ta.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const a=this.resolve(t,n);return a&&a.res!==void 0}extractFromKey(t,n){let a=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let l=n.ns||this.options.defaultNS||[];const c=a&&t.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!kO(t,a,s);if(c&&!d){const f=t.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:t,namespaces:Be(l)?[l]:l};const h=t.split(a);(a!==s||a===s&&this.options.ns.indexOf(h[0])>-1)&&(l=h.shift()),t=h.join(s)}return{key:t,namespaces:Be(l)?[l]:l}}translate(t,n,a){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,l=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:c,namespaces:d}=this.extractFromKey(t[t.length-1],n),f=d[d.length-1],h=n.lng||this.language,b=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(b){const T=n.nsSeparator||this.options.nsSeparator;return s?{res:`${f}${T}${c}`,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:f,usedParams:this.getUsedParamsDetails(n)}:`${f}${T}${c}`}return s?{res:c,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:f,usedParams:this.getUsedParamsDetails(n)}:c}const m=this.resolve(t,n);let x=m&&m.res;const v=m&&m.usedKey||c,E=m&&m.exactUsedKey||c,w=Object.prototype.toString.apply(x),k=["[object Number]","[object Function]","[object RegExp]"],N=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,A=!Be(x)&&typeof x!="boolean"&&typeof x!="number";if(C&&x&&A&&k.indexOf(w)<0&&!(Be(N)&&Array.isArray(x))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,x,{...n,ns:d}):`key '${c} (${this.language})' returned an object instead of string.`;return s?(m.res=T,m.usedParams=this.getUsedParamsDetails(n),m):T}if(l){const T=Array.isArray(x),L=T?[]:{},M=T?E:v;for(const U in x)if(Object.prototype.hasOwnProperty.call(x,U)){const $=`${M}${l}${U}`;L[U]=this.translate($,{...n,joinArrays:!1,ns:d}),L[U]===$&&(L[U]=x[U])}x=L}}else if(C&&Be(N)&&Array.isArray(x))x=x.join(N),x&&(x=this.extendTranslation(x,t,n,a));else{let T=!1,L=!1;const M=n.count!==void 0&&!Be(n.count),U=Bd.hasDefaultValue(n),$=M?this.pluralResolver.getSuffix(h,n.count,n):"",te=n.ordinal&&M?this.pluralResolver.getSuffix(h,n.count,{ordinal:!1}):"",P=M&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Q=P&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${$}`]||n[`defaultValue${te}`]||n.defaultValue;!this.isValidLookup(x)&&U&&(T=!0,x=Q),this.isValidLookup(x)||(L=!0,x=c);const me=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:x,le=U&&Q!==x&&this.options.updateMissing;if(L||T||le){if(this.logger.log(le?"updateKey":"missingKey",h,f,c,le?Q:x),l){const ce=this.resolve(c,{...n,keySeparator:!1});ce&&ce.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ee=[];const H=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&H&&H[0])for(let ce=0;ce<H.length;ce++)ee.push(H[ce]);else this.options.saveMissingTo==="all"?ee=this.languageUtils.toResolveHierarchy(n.lng||this.language):ee.push(n.lng||this.language);const oe=(ce,ne,j)=>{const D=U&&j!==x?j:me;this.options.missingKeyHandler?this.options.missingKeyHandler(ce,f,ne,D,le,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ce,f,ne,D,le,n),this.emit("missingKey",ce,f,ne,x)};this.options.saveMissing&&(this.options.saveMissingPlurals&&M?ee.forEach(ce=>{const ne=this.pluralResolver.getSuffixes(ce,n);P&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ne.indexOf(`${this.options.pluralSeparator}zero`)<0&&ne.push(`${this.options.pluralSeparator}zero`),ne.forEach(j=>{oe([ce],c+j,n[`defaultValue${j}`]||Q)})}):oe(ee,c,Q))}x=this.extendTranslation(x,t,n,m,a),L&&x===c&&this.options.appendNamespaceToMissingKey&&(x=`${f}:${c}`),(L||T)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?x=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}:${c}`:c,T?x:void 0):x=this.options.parseMissingKeyHandler(x))}return s?(m.res=x,m.usedParams=this.getUsedParamsDetails(n),m):x}extendTranslation(t,n,a,s,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});const h=Be(t)&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let b;if(h){const x=t.match(this.interpolator.nestingRegexp);b=x&&x.length}let m=a.replace&&!Be(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,a.lng||this.language||s.usedLng,a),h){const x=t.match(this.interpolator.nestingRegexp),v=x&&x.length;b<v&&(a.nest=!1)}!a.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(a.lng=this.language||s.usedLng),a.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var x=arguments.length,v=new Array(x),E=0;E<x;E++)v[E]=arguments[E];return l&&l[0]===v[0]&&!a.context?(c.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):c.translate(...v,n)},a)),a.interpolation&&this.interpolator.reset()}const d=a.postProcess||this.options.postProcess,f=Be(d)?[d]:d;return t!=null&&f&&f.length&&a.applyPostProcessor!==!1&&(t=aE.handle(f,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,s,l,c,d;return Be(t)&&(t=[t]),t.forEach(f=>{if(this.isValidLookup(a))return;const h=this.extractFromKey(f,n),b=h.key;s=b;let m=h.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const x=n.count!==void 0&&!Be(n.count),v=x&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),E=n.context!==void 0&&(Be(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);m.forEach(k=>{this.isValidLookup(a)||(d=k,!N0[`${w[0]}-${k}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(d)&&(N0[`${w[0]}-${k}`]=!0,this.logger.warn(`key "${s}" for languages "${w.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(N=>{if(this.isValidLookup(a))return;c=N;const C=[b];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(C,b,N,k,n);else{let T;x&&(T=this.pluralResolver.getSuffix(N,n.count,n));const L=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(C.push(b+T),n.ordinal&&T.indexOf(M)===0&&C.push(b+T.replace(M,this.options.pluralSeparator)),v&&C.push(b+L)),E){const U=`${b}${this.options.contextSeparator}${n.context}`;C.push(U),x&&(C.push(U+T),n.ordinal&&T.indexOf(M)===0&&C.push(U+T.replace(M,this.options.pluralSeparator)),v&&C.push(U+L))}}let A;for(;A=C.pop();)this.isValidLookup(a)||(l=A,a=this.getResource(N,k,A,n))}))})}),{res:a,usedKey:s,exactUsedKey:l,usedLng:c,usedNS:d}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,a){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,a,s):this.resourceStore.getResource(t,n,a,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=t.replace&&!Be(t.replace);let s=a?t.replace:t;if(a&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!a){s={...s};for(const l of n)delete s[l]}return s}static hasDefaultValue(t){const n="defaultValue";for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&n===a.substring(0,n.length)&&t[a]!==void 0)return!0;return!1}}const Lp=e=>e.charAt(0).toUpperCase()+e.slice(1);class _0{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ta.create("languageUtils")}getScriptPartFromCode(t){if(t=Id(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Id(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Be(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(t)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let a=t.split("-");return this.options.lowerCaseLng?a=a.map(s=>s.toLowerCase()):a.length===2?(a[0]=a[0].toLowerCase(),a[1]=a[1].toUpperCase(),n.indexOf(a[1].toLowerCase())>-1&&(a[1]=Lp(a[1].toLowerCase()))):a.length===3&&(a[0]=a[0].toLowerCase(),a[1].length===2&&(a[1]=a[1].toUpperCase()),a[0]!=="sgn"&&a[2].length===2&&(a[2]=a[2].toUpperCase()),n.indexOf(a[1].toLowerCase())>-1&&(a[1]=Lp(a[1].toLowerCase())),n.indexOf(a[2].toLowerCase())>-1&&(a[2]=Lp(a[2].toLowerCase()))),a.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(a=>{if(n)return;const s=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(a=>{if(n)return;const s=this.getLanguagePartFromCode(a);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(l=>{if(l===s)return l;if(!(l.indexOf("-")<0&&s.indexOf("-")<0)&&(l.indexOf("-")>0&&s.indexOf("-")<0&&l.substring(0,l.indexOf("-"))===s||l.indexOf(s)===0&&s.length>1))return l})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Be(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let a=t[n];return a||(a=t[this.getScriptPartFromCode(n)]),a||(a=t[this.formatLanguageCode(n)]),a||(a=t[this.getLanguagePartFromCode(n)]),a||(a=t.default),a||[]}toResolveHierarchy(t,n){const a=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],l=c=>{c&&(this.isSupportedCode(c)?s.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return Be(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(t))):Be(t)&&l(this.formatLanguageCode(t)),a.forEach(c=>{s.indexOf(c)<0&&l(this.formatLanguageCode(c))}),s}}let _O=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],CO={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const AO=["v1","v2","v3"],TO=["v4"],C0={zero:0,one:1,two:2,few:3,many:4,other:5},OO=()=>{const e={};return _O.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:CO[t.fc]}})}),e};class RO{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ta.create("pluralResolver"),(!this.options.compatibilityJSON||TO.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=OO(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const a=Id(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:a,type:s});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let c;try{c=new Intl.PluralRules(a,{type:s})}catch{if(!t.match(/-|_/))return;const f=this.languageUtils.getLanguagePartFromCode(t);c=this.getRule(f,n)}return this.pluralRulesCache[l]=c,c}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=this.getRule(t,n);return this.shouldUseIntlApi()?a&&a.resolvedOptions().pluralCategories.length>1:a&&a.numbers.length>1}getPluralFormsOfKey(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,a).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=this.getRule(t,n);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort((s,l)=>C0[s]-C0[l]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):a.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,a);return s?this.shouldUseIntlApi()?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const a=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[a];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const l=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:l():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?l():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}shouldUseIntlApi(){return!AO.includes(this.options.compatibilityJSON)}}const A0=function(e,t,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=yO(e,t,n);return!l&&s&&Be(n)&&(l=Lm(e,n,a),l===void 0&&(l=Lm(t,n,a))),l},Ip=e=>e.replace(/\$/g,"$$$$");class jO{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ta.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:a,useRawValueToEscape:s,prefix:l,prefixEscaped:c,suffix:d,suffixEscaped:f,formatSeparator:h,unescapeSuffix:b,unescapePrefix:m,nestingPrefix:x,nestingPrefixEscaped:v,nestingSuffix:E,nestingSuffixEscaped:w,nestingOptionsSeparator:k,maxReplaces:N,alwaysFormat:C}=t.interpolation;this.escape=n!==void 0?n:vO,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=l?ll(l):c||"{{",this.suffix=d?ll(d):f||"}}",this.formatSeparator=h||",",this.unescapePrefix=b?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=x?ll(x):v||ll("$t("),this.nestingSuffix=E?ll(E):w||ll(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=N||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,a)=>n&&n.source===a?(n.lastIndex=0,n):new RegExp(a,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,a,s){let l,c,d;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=v=>{if(v.indexOf(this.formatSeparator)<0){const N=A0(n,f,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,a,{...s,...n,interpolationkey:v}):N}const E=v.split(this.formatSeparator),w=E.shift().trim(),k=E.join(this.formatSeparator).trim();return this.format(A0(n,f,w,this.options.keySeparator,this.options.ignoreJSONStructure),k,a,{...s,...n,interpolationkey:w})};this.resetRegExp();const b=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,m=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>Ip(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?Ip(this.escape(v)):Ip(v)}].forEach(v=>{for(d=0;l=v.regex.exec(t);){const E=l[1].trim();if(c=h(E),c===void 0)if(typeof b=="function"){const k=b(t,l,s);c=Be(k)?k:""}else if(s&&Object.prototype.hasOwnProperty.call(s,E))c="";else if(m){c=l[0];continue}else this.logger.warn(`missed to pass in variable ${E} for interpolating ${t}`),c="";else!Be(c)&&!this.useRawValueToEscape&&(c=v0(c));const w=v.safeValue(c);if(t=t.replace(l[0],w),m?(v.regex.lastIndex+=c.length,v.regex.lastIndex-=l[0].length):v.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,l,c;const d=(f,h)=>{const b=this.nestingOptionsSeparator;if(f.indexOf(b)<0)return f;const m=f.split(new RegExp(`${b}[ ]*{`));let x=`{${m[1]}`;f=m[0],x=this.interpolate(x,c);const v=x.match(/'/g),E=x.match(/"/g);(v&&v.length%2===0&&!E||E.length%2!==0)&&(x=x.replace(/'/g,'"'));try{c=JSON.parse(x),h&&(c={...h,...c})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,w),`${f}${b}${x}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,f};for(;s=this.nestingRegexp.exec(t);){let f=[];c={...a},c=c.replace&&!Be(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;let h=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const b=s[1].split(this.formatSeparator).map(m=>m.trim());s[1]=b.shift(),f=b,h=!0}if(l=n(d.call(this,s[1].trim(),c),c),l&&s[0]===t&&!Be(l))return l;Be(l)||(l=v0(l)),l||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),l=""),h&&(l=f.reduce((b,m)=>this.format(b,m,a.lng,{...a,interpolationkey:s[1].trim()}),l.trim())),t=t.replace(s[0],l),this.regexp.lastIndex=0}return t}}const MO=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const a=e.split("(");t=a[0].toLowerCase().trim();const s=a[1].substring(0,a[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(c=>{if(c){const[d,...f]=c.split(":"),h=f.join(":").trim().replace(/^'+|'+$/g,""),b=d.trim();n[b]||(n[b]=h),h==="false"&&(n[b]=!1),h==="true"&&(n[b]=!0),isNaN(h)||(n[b]=parseInt(h,10))}})}return{formatName:t,formatOptions:n}},ol=e=>{const t={};return(n,a,s)=>{let l=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(l={...l,[s.interpolationkey]:void 0});const c=a+JSON.stringify(l);let d=t[c];return d||(d=e(Id(a),s),t[c]=d),d(n)}};class DO{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ta.create("formatter"),this.options=t,this.formats={number:ol((n,a)=>{const s=new Intl.NumberFormat(n,{...a});return l=>s.format(l)}),currency:ol((n,a)=>{const s=new Intl.NumberFormat(n,{...a,style:"currency"});return l=>s.format(l)}),datetime:ol((n,a)=>{const s=new Intl.DateTimeFormat(n,{...a});return l=>s.format(l)}),relativetime:ol((n,a)=>{const s=new Intl.RelativeTimeFormat(n,{...a});return l=>s.format(l,a.range||"day")}),list:ol((n,a)=>{const s=new Intl.ListFormat(n,{...a});return l=>s.format(l)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ol(n)}format(t,n,a){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=n.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(d=>d.indexOf(")")>-1)){const d=l.findIndex(f=>f.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,d)].join(this.formatSeparator)}return l.reduce((d,f)=>{const{formatName:h,formatOptions:b}=MO(f);if(this.formats[h]){let m=d;try{const x=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},v=x.locale||x.lng||s.locale||s.lng||a;m=this.formats[h](d,v,{...b,...s,...x})}catch(x){this.logger.warn(x)}return m}else this.logger.warn(`there was no format function for ${h}`);return d},t)}}const LO=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class IO extends nf{constructor(t,n,a){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=a,this.languageUtils=a.languageUtils,this.options=s,this.logger=ta.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(a,s.backend,s)}queueLoad(t,n,a,s){const l={},c={},d={},f={};return t.forEach(h=>{let b=!0;n.forEach(m=>{const x=`${h}|${m}`;!a.reload&&this.store.hasResourceBundle(h,m)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?c[x]===void 0&&(c[x]=!0):(this.state[x]=1,b=!1,c[x]===void 0&&(c[x]=!0),l[x]===void 0&&(l[x]=!0),f[m]===void 0&&(f[m]=!0)))}),b||(d[h]=!0)}),(Object.keys(l).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(l),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}loaded(t,n,a){const s=t.split("|"),l=s[0],c=s[1];n&&this.emit("failedLoading",l,c,n),!n&&a&&this.store.addResourceBundle(l,c,a,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&a&&(this.state[t]=0);const d={};this.queue.forEach(f=>{bO(f.loaded,[l],c),LO(f,t),n&&f.errors.push(n),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(h=>{d[h]||(d[h]={});const b=f.loaded[h];b.length&&b.forEach(m=>{d[h][m]===void 0&&(d[h][m]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(f=>!f.done)}read(t,n,a){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!t.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:a,tried:s,wait:l,callback:c});return}this.readingCalls++;const d=(h,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(h&&b&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,a,s+1,l*2,c)},l);return}c(h,b)},f=this.backend[a].bind(this.backend);if(f.length===2){try{const h=f(t,n);h&&typeof h.then=="function"?h.then(b=>d(null,b)).catch(d):d(null,h)}catch(h){d(h)}return}return f(t,n,d)}prepareLoading(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Be(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Be(n)&&(n=[n]);const l=this.queueLoad(t,n,a,s);if(!l.toLoad.length)return l.pending.length||s(),null;l.toLoad.forEach(c=>{this.loadOne(c)})}load(t,n,a){this.prepareLoading(t,n,{},a)}reload(t,n,a){this.prepareLoading(t,n,{reload:!0},a)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const a=t.split("|"),s=a[0],l=a[1];this.read(s,l,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${n}loading namespace ${l} for language ${s} failed`,c),!c&&d&&this.logger.log(`${n}loaded namespace ${l} for language ${s}`,d),this.loaded(t,c,d)})}saveMissing(t,n,a,s,l){let c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${a}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){const f={...c,isUpdate:l},h=this.backend.create.bind(this.backend);if(h.length<6)try{let b;h.length===5?b=h(t,n,a,s,f):b=h(t,n,a,s),b&&typeof b.then=="function"?b.then(m=>d(null,m)).catch(d):d(null,b)}catch(b){d(b)}else h(t,n,a,s,d,f)}!t||!t[0]||this.store.addResource(t[0],n,a,s)}}}const T0=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Be(e[1])&&(t.defaultValue=e[1]),Be(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(a=>{t[a]=n[a]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),O0=e=>(Be(e.ns)&&(e.ns=[e.ns]),Be(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Be(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),sd=()=>{},zO=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class xc extends nf{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=O0(t),this.services={},this.logger=ta,this.modules={external:[]},zO(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(a=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(Be(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=T0();this.options={...s,...this.options,...O0(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const l=b=>b?typeof b=="function"?new b:b:null;if(!this.options.isClone){this.modules.logger?ta.init(l(this.modules.logger),this.options):ta.init(null,this.options);let b;this.modules.formatter?b=this.modules.formatter:typeof Intl<"u"&&(b=DO);const m=new _0(this.options);this.store=new k0(this.options.resources,this.options);const x=this.services;x.logger=ta,x.resourceStore=this.store,x.languageUtils=m,x.pluralResolver=new RO(m,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),b&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(x.formatter=l(b),x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new jO(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new IO(l(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",function(v){for(var E=arguments.length,w=new Array(E>1?E-1:0),k=1;k<E;k++)w[k-1]=arguments[k];t.emit(v,...w)}),this.modules.languageDetector&&(x.languageDetector=l(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=l(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Bd(this.services,this.options),this.translator.on("*",function(v){for(var E=arguments.length,w=new Array(E>1?E-1:0),k=1;k<E;k++)w[k-1]=arguments[k];t.emit(v,...w)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,a||(a=sd),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const b=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);b.length>0&&b[0]!=="dev"&&(this.options.lng=b[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(b=>{this[b]=function(){return t.store[b](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(b=>{this[b]=function(){return t.store[b](...arguments),t}});const f=Jo(),h=()=>{const b=(m,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(x),a(m,x)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return b(null,this.t.bind(this));this.changeLanguage(this.options.lng,b)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),f}loadResources(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sd;const s=Be(t)?t:this.language;if(typeof t=="function"&&(a=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();const l=[],c=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(h=>{h!=="cimode"&&l.indexOf(h)<0&&l.push(h)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>c(f)),this.options.preload&&this.options.preload.forEach(d=>c(d)),this.services.backendConnector.load(l,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(d)})}else a(null)}reloadResources(t,n,a){const s=Jo();return typeof t=="function"&&(a=t,t=void 0),typeof n=="function"&&(a=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),a||(a=sd),this.services.backendConnector.reload(t,n,l=>{s.resolve(),a(l)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&aE.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const a=this.languages[n];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}changeLanguage(t,n){var a=this;this.isLanguageChangingTo=t;const s=Jo();this.emit("languageChanging",t);const l=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},c=(f,h)=>{h?(l(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,s.resolve(function(){return a.t(...arguments)}),n&&n(f,function(){return a.t(...arguments)})},d=f=>{!t&&!f&&this.services.languageDetector&&(f=[]);const h=Be(f)?f:this.services.languageUtils.getBestMatchFromCodes(f);h&&(this.language||l(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(h)),this.loadResources(h,b=>{c(b,h)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(t),s}getFixedT(t,n,a){var s=this;const l=function(c,d){let f;if(typeof d!="object"){for(var h=arguments.length,b=new Array(h>2?h-2:0),m=2;m<h;m++)b[m-2]=arguments[m];f=s.options.overloadTranslationOptionHandler([c,d].concat(b))}else f={...d};f.lng=f.lng||l.lng,f.lngs=f.lngs||l.lngs,f.ns=f.ns||l.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||a||l.keyPrefix);const x=s.options.keySeparator||".";let v;return f.keyPrefix&&Array.isArray(c)?v=c.map(E=>`${f.keyPrefix}${x}${E}`):v=f.keyPrefix?`${f.keyPrefix}${x}${c}`:c,s.t(v,f)};return Be(t)?l.lng=t:l.lngs=t,l.ns=n,l.keyPrefix=a,l}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const a=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const c=(d,f)=>{const h=this.services.backendConnector.state[`${d}|${f}`];return h===-1||h===0||h===2};if(n.precheck){const d=n.precheck(this,c);if(d!==void 0)return d}return!!(this.hasResourceBundle(a,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(a,t)&&(!s||c(l,t)))}loadNamespaces(t,n){const a=Jo();return this.options.ns?(Be(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{a.resolve(),n&&n(s)}),a):(n&&n(),Promise.resolve())}loadLanguages(t,n){const a=Jo();Be(t)&&(t=[t]);const s=this.options.preload||[],l=t.filter(c=>s.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return l.length?(this.options.preload=s.concat(l),this.loadResources(c=>{a.resolve(),n&&n(c)}),a):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services&&this.services.languageUtils||new _0(T0());return n.indexOf(a.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new xc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sd;const a=t.forkResourceStore;a&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},l=new xc(s);return(t.debug!==void 0||t.prefix!==void 0)&&(l.logger=l.logger.clone(t)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},a&&(l.store=new k0(this.store.data,s),l.services.resourceStore=l.store),l.translator=new Bd(l.services,s),l.translator.on("*",function(d){for(var f=arguments.length,h=new Array(f>1?f-1:0),b=1;b<f;b++)h[b-1]=arguments[b];l.emit(d,...h)}),l.init(s,n),l.translator.options=s,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const sn=xc.createInstance();sn.createInstance=xc.createInstance;sn.createInstance;sn.dir;sn.init;sn.loadResources;sn.reloadResources;sn.use;sn.changeLanguage;sn.getFixedT;sn.t;sn.exists;sn.setDefaultNamespace;sn.hasLoadedNamespace;sn.loadNamespaces;sn.loadLanguages;const{slice:BO,forEach:UO}=[];function PO(e){return UO.call(BO.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function FO(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const R0=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,$O=function(e,t){const a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(t);let l=`${e}=${s}`;if(a.maxAge>0){const c=a.maxAge-0;if(Number.isNaN(c))throw new Error("maxAge should be a Number");l+=`; Max-Age=${Math.floor(c)}`}if(a.domain){if(!R0.test(a.domain))throw new TypeError("option domain is invalid");l+=`; Domain=${a.domain}`}if(a.path){if(!R0.test(a.path))throw new TypeError("option path is invalid");l+=`; Path=${a.path}`}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");l+=`; Expires=${a.expires.toUTCString()}`}if(a.httpOnly&&(l+="; HttpOnly"),a.secure&&(l+="; Secure"),a.sameSite)switch(typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a.partitioned&&(l+="; Partitioned"),l},j0={create(e,t,n,a){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),a&&(s.domain=a),document.cookie=$O(e,t,s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let a=0;a<n.length;a++){let s=n[a];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var HO={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return j0.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:a,cookieDomain:s,cookieOptions:l}=t;n&&typeof document<"u"&&j0.create(n,e,a,s,l)}},qO={name:"querystring",lookup(e){var a;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((a=window.location.hash)==null?void 0:a.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const c=s.substring(1).split("&");for(let d=0;d<c.length;d++){const f=c[d].indexOf("=");f>0&&c[d].substring(0,f)===t&&(n=c[d].substring(f+1))}}return n}},KO={name:"hash",lookup(e){var s;let{lookupHash:t,lookupFromHashIndex:n}=e,a;if(typeof window<"u"){const{hash:l}=window.location;if(l&&l.length>2){const c=l.substring(1);if(t){const d=c.split("&");for(let f=0;f<d.length;f++){const h=d[f].indexOf("=");h>0&&d[f].substring(0,h)===t&&(a=d[f].substring(h+1))}}if(a)return a;if(!a&&n>-1){const d=l.match(/\/([a-zA-Z-]*)/g);return Array.isArray(d)?(s=d[typeof n=="number"?n:0])==null?void 0:s.replace("/",""):void 0}}}return a}};let cl=null;const M0=()=>{if(cl!==null)return cl;try{if(cl=typeof window<"u"&&window.localStorage!==null,!cl)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{cl=!1}return cl};var GO={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&M0())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&M0()&&window.localStorage.setItem(n,e)}};let ul=null;const D0=()=>{if(ul!==null)return ul;try{if(ul=typeof window<"u"&&window.sessionStorage!==null,!ul)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ul=!1}return ul};var VO={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&D0())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&D0()&&window.sessionStorage.setItem(n,e)}},QO={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:a,language:s}=navigator;if(n)for(let l=0;l<n.length;l++)t.push(n[l]);a&&t.push(a),s&&t.push(s)}return t.length>0?t:void 0}},YO={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const a=t||(typeof document<"u"?document.documentElement:null);return a&&typeof a.getAttribute=="function"&&(n=a.getAttribute("lang")),n}},WO={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},XO={name:"subdomain",lookup(e){var s,l;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,a=typeof window<"u"&&((l=(s=window.location)==null?void 0:s.hostname)==null?void 0:l.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(a)return a[n]}};let rE=!1;try{document.cookie,rE=!0}catch{}const sE=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];rE||sE.splice(1,1);const ZO=()=>({order:sE,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class lE{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=PO(n,this.options||{},ZO()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(HO),this.addDetector(qO),this.addDetector(GO),this.addDetector(VO),this.addDetector(QO),this.addDetector(YO),this.addDetector(WO),this.addDetector(XO),this.addDetector(KO)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(a=>{if(this.detectors[a]){let s=this.detectors[a].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(a=>a!=null&&!FO(a)).map(a=>this.options.convertDetectedLanguage(a)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(a=>{this.detectors[a]&&this.detectors[a].cacheUserLanguage(t,this.options)}))}}lE.type="languageDetector";const JO="SPS Console",eR="New chat",tR="History",nR={placeholder:"Say something… (Enter to send · Shift+Enter newline · drop or paste files)",placeholderDragOver:"Release to attach…",send:"Send",stop:"Stop",stopped:"Stopped",attach:"Attach local file",attachHint:"Attach local file (or drop / paste an image)",removeAttachment:"Remove",ariaInput:"Message input",ariaSend:"Send",ariaStop:"Cancel streaming",uploading:"Uploading…",ariaRemoveAttachment:"Remove {{name}}",attachmentTitle:`{{name}}
366
+ {{path}}
367
+ Click to preview`},iR={streaming:"STREAMING",thinking:"Thinking…",tool:"Tool",toolResult:"Tool result"},aR={untitled:"New chat",rename:"Rename",delete:"Delete session",deleteConfirm:"Delete this session permanently?",deleteBody:"The session will be permanently deleted and cannot be recovered.",deleteAria:"Delete session",deleteConfirmBtn:"Delete",switch:"Switch session",loadFailed:"Failed to load session",createFailed:"Failed to create session",openAria:"Open session {{title}}",openAriaWithCwd:"Open session {{title}} (cwd: {{cwd}})",empty:"No sessions yet. Click above to create one."},rR={label:"Working directory (optional)",placeholder:"/home/coral/projects/my-app",select:"Browse",selectAria:"Browse for directory",hint1:"Agent will read and write files in this directory. Absolute path required, must exist.",hint2:"Leave blank to use the daemon's startup directory.",invalidAbsolute:"Working directory must be an absolute path",notFound:"Working directory not found"},sR={title:"New chat",ariaLabel:"New chat",closeAria:"Close",titleField:"Title (optional)",titlePlaceholder:"Leave blank to auto-generate from first message",filePicker:"Select attachment"},lR={ariaLabel:"Preview {{name}}",closeAria:"Close",readFailed:"Failed to read: {{error}}",loading:"Loading…",unsupported:"This file type cannot be previewed inline.",download:"Download",thumbTitle:`{{name}}
368
+ Click to enlarge`,expandTitle:`{{name}}
369
+ {{path}}
370
+ Click to preview`},oR={you:"You",error:"Error",assistant:"assistant",outputTruncated:"⚠ Output exceeds 10MB, truncated"},cR={heading:"Chat 💬",hint1:'Click "New chat" above to start a session, or just type below to auto-create one.',hint2:"Enter to send · Shift+Enter for newline · streaming output"},uR={stillStreaming:"The previous message is still streaming; wait for it or cancel.",tooManyConcurrent:"Up to {{max}} concurrent chat sessions can stream at once. Wait for others to finish or cancel them.",send:"Send failed",fileTooLarge:"File too large",fileTooLargeBody:"Per-file limit is 50 MB; current {{size}} MB ({{name}})",uploadFailed:"Attachment upload failed",cancelFailed:"Cancel failed"},dR={attachment:"(attachment)",seeAttachments:"(see attachments)",attachmentTitle:"Attachment"},fR={justNow:"just now"},hR={title:JO,newSession:eR,history:tR,input:nR,assistant:iR,session:aR,cwd:rR,newDialog:sR,preview:lR,bubble:oR,empty:cR,errors:uR,fallback:dR,time:fR},pR="Board",mR="Board ✨",gR="Select a project 🎯",bR="The board is per-project. Pick one to start:",yR="Loading…",xR="{{name}} · {{cards}} cards · {{workers}} workers active",vR={Planning:"Planning",Backlog:"Backlog",Todo:"Todo",Inprogress:"In progress",QA:"QA Review",Done:"Done"},wR={start:"Start",stop:"Stop",reset:"Reset",newCard:"New card",search:"Search",clear:"Clear",clearSelection:"Clear selection",ariaSearch:"Search cards",ariaClearFilter:"Clear filters",ariaFilterBy:"Filter by {{label}}",ariaStartPipeline:"Start pipeline",ariaStopPipeline:"Stop pipeline",searchPlaceholder:"Search title / skill / label…"},ER={title:"Title",description:"Description",checklist:"Checklist",checklistMore:"… {{count}} more",log:"Log",skills:"Skills",labels:"Labels",created:"Created",claimed:"Claimed by",seq:"Seq",empty:"(empty)",justNow:"just now"},SR={title:"New card",closeAria:"Close",titleField:"Title *",titlePlaceholder:"e.g. Wire up GitHub OAuth login",titleHint:"Short, focused goal (<200 chars)",descField:"Description",descPlaceholder:"User story, requirements, acceptance criteria, references… Claude reads this on launch.",descHint:"Markdown supported. If empty, Claude only has the title to work from.",skillsHint:"Which skills to load (frontmatter `skills:`). Optional — workers fall back to project-level skills.",loadingSkills:"Loading skills…",loadFailed:"Failed to load skills (won't block create): {{error}}",selected:"Selected {{count}} of: {{names}}",dispatchField:"Dispatch",dispatchToggle:"Dispatch immediately (goes straight to Backlog)",dispatchOff:"Default off: card lands in Planning; drag it to Backlog to start work.",dispatchOn:"Checked: skip staging — the next tick dispatches a worker.",cancel:"Cancel",create:"Create",createAria:"Create card"},kR={edit:"Edit",editAria:"Edit card",editing:"⚠ editing",loadFailed:"Load failed: {{error}}",loadingSkills:"Loading skills…",ariaTitle:"Card title",ariaCardDesc:"Card description",removeLabelAria:"Remove {{label}}",addLabelPlaceholder:"+ add label",addLabelAria:"Add label",labelsNote:"Note: AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX are managed by the pipeline — manual edits may be overwritten.",checklistCount:"Checklist {{done}}/{{total}}",checklistEmpty:"No checklist items. Add them in the description with `- [ ] item` syntax.",descNote:'Replaces only the "## Description" section; Checklist and Log sections are untouched.',doneCannotStart:"Card is done — drag it back to Todo before starting",pipelineRunningCannotStart:"Pipeline is running — supervisor dispatches automatically, no manual start needed",launchWorker:"Launch worker",launchFailed:"Failed to launch worker",resetTitle:"Reset card #{{seq}}",resetBody:"Card state will reset to initial, and completed checklist items will be cleared.",resetConfirm:"Reset",resetFailed:"Reset failed",resetButton:"Reset card",deleteTitle:"Delete card #{{seq}}",deleteBody:'About to delete "{{title}}". This is permanent — the md file will be physically removed. Continue?',deleteContinue:"Continue",deleteFinalTitle:"Final confirmation",deleteFinalBody:"Please confirm again to delete card #{{seq}}.",deleteFinalConfirm:"Confirm delete",deleteFailed:"Delete failed",deleteButton:"Delete card",deleteAria:"Delete card",cancel:"Cancel",save:"Save",saveAria:"Save card changes",saveFailed:"Save failed",closeAria:"Close",loading:"Loading…"},NR={loadFailed:"Failed to load cards",createFailed:"Failed to create card",updateFailed:"Failed to update card",deleteFailed:"Failed to delete card",moveFailed:"Failed to move card",startFailed:"Failed to start pipeline",stopFailed:"Failed to stop pipeline",resetTitle:"Reset entire pipeline",resetBody:"This clears every card's run state, worker markers, and branches. Cannot be undone.",resetConfirm:"Reset all",resetFailed:"Reset failed",isRunning:"Card is running; kill the worker or move it out of In progress first."},_R={title:pR,titleEmoji:mR,selectProject:gR,selectHint:bR,loadingProject:yR,summary:xR,columns:vR,actions:wR,card:ER,newCardDialog:SR,cardModal:kR,errors:NR},CR="Projects 🎯",AR={summary:"{{count}} local projects",loading:"Loading…",loadFailed:"Click refresh to retry",loadError:"Load failed",retry:"Retry",refresh:"Refresh",newProjectAria:"New project",newProject:"New project",empty:"No projects yet ✨",emptyHint:"Run {{cmd}} to create your first project."},TR={title:"New project",backAria:"Back to projects",back:"Back",name:"Project name",nameHint:"Letters, digits, _ and - only. e.g. acme-web",namePlaceholder:"e.g. acme-web",nameInvalid:"Name may only contain a-z A-Z 0-9 _ -",dir:"Project directory",dirHint:"Absolute path on this machine (code or docs are both fine). Independent of the git toggle.",dirBrowseAria:"Browse for project directory",dirBrowse:"Browse",dirAutoCreate:"Auto-create the directory if missing (recommended — otherwise .claude/ and wiki/ install are skipped)",maxWorkers:"Max workers",ackTimeout:"ACK timeout (minutes)",ackTimeoutHint:"How long after launch with no ACK before the worker is treated as failed",enableGit:"Enable Git (Worker auto-commits + pushes)",enableGitHint:"When off, the Worker just runs the task without version control; good for docs/data projects.",mergeBranch:"Merge branch",remotePath:"Git remote project path",remotePathHint:"e.g. user/repo. Empty skips the remote API (local commit/push only).",gitlabId:"GitLab project ID",gitlabIdHint:"numeric; GitHub users leave empty",enableWiki:"Enable Wiki knowledge base (per-project)",enableWikiHintPrefix:"Scaffolds ",enableWikiHintMid:" dir and injects 5-layer retrieval context plus wiki-update hints into Worker prompts. You can also enable later with ",enableWikiHintSuffix:" .",notifications:"Notifications",matrixRoom:"Matrix room ID",matrixRoomHint:"empty = use global config; blank = no notifications",cancel:"Cancel",createAria:"Create project",creating:"Creating…",create:"Create",pickerTitle:"Select project directory",createFailed:"Create failed"},OR={backAria:"Back to projects",back:"Back",board:"Board",tabs:{overview:"Overview",config:"Config",danger:"Danger zone"},loading:"Loading…",notFound:"Project {{name}} not found or unreadable.",repo:"Repository",pmBackend:"PM backend",cards:"Cards",cardsSummary:"{{total}} total · {{ip}} in progress · {{done}} done",workers:"Workers",workersSummary:"{{total}} ({{active}} active)",lastActivity:"Last activity",config:{saveFailed:"Save failed",etagConflict:"Config was modified elsewhere",etagConflictBody:'The conf file was modified while you were editing. Click "Reload" before editing again.',loading:"Loading…",loadFailed:"Load failed: {{error}}",reloadAria:"Reload",reload:"Reload",saveAria:"Save config",save:"Save",editorAria:"Conf file editor",unsaved:"● unsaved changes"},pipeline:{newAria:"New pipeline",new:"New pipeline",empty:'No pipeline files yet. Click "New pipeline" to start.',editAria:"Edit {{name}}",edit:"Edit",switchTitle:"Switch to {{name}}",switchBody:"Current project.yaml will be overwritten with the contents of {{name}}. Continue?",switchConfirm:"Switch",switchAria:"Switch to {{name}}",switch:"Switch",deleteTitle:"Delete {{name}}",deleteBody:"This pipeline file will be permanently deleted.",deleteConfirm:"Delete",deleteAria:"Delete {{name}}",switchFailed:"Switch failed",deleteFailed:"Delete failed",createFailed:"Create failed"},danger:{deletedTitle:"Deleted",deletedBodyClean:`Project deleted. Also cleaned up:
371
+ {{paths}}`,deletedBody:"Project deleted.",deleteFailed:"Delete failed",delete:"Delete project",deleteHint:"This will clean up {{path}} (including all cards, runtime, logs).",alsoCleanRepo:"Also clean up the repo's .claude/",repoUntouched:"The repo itself is untouched; only this directory is cleaned.",confirmType:"Type the project name {{name}} to confirm:",deleteAria:"Permanently delete project",deleteBtn:"Permanently delete"}},RR={closeAria:"Close",loading:"Loading…",loadFailed:"Load failed: {{error}}",structured:"Structured",rawYaml:"Raw YAML",activeWarn:"⚠ This is the active pipeline; takes effect on the next tick after save",yamlAria:"Pipeline YAML editor",unsaved:"● unsaved",saved:"Saved",noChanges:"No changes",reload:"Reload",saveAria:"Save pipeline",save:"Save",saveFailed:"Save failed",yamlInvalid:"Invalid YAML syntax",etagConflict:"File was modified elsewhere",yamlSerializeFailed:"YAML serialization failed",modeProject:"project = event-driven pipeline (default) · steps = sequential script",addStageAria:"Add stage",addStage:"Add stage",noStages:'No stages yet. Click "Add stage" to start.',moveUpAria:"Move up",moveDownAria:"Move down",deleteStageAria:"Delete stage",stageNameHint:"unique stage name",stageProfileHint:"skill profile (optional)",stageCardStateHint:"card state during this stage",stageTimeoutHint:"optional, e.g. 30m 2h",stageTriggerHint:"trigger condition (optional, defaults applied)",stageOnCompleteHint:"action on success",stageOnFailureActionHint:"action on failure, e.g. label NEEDS-FIX",stageCommentHint:"comment written into the card",stopOnFailureNote:"(stops the pipeline on failure; remove to continue with the next card)",filenameInvalid:"Invalid pipeline filename, or it must not be project.yaml"},jR={title:"New pipeline",closeAria:"Close",filename:"Filename",filenamePlaceholder:"e.g. ci",savedAs:"Saved as {{name}}",filenameHint:"Allowed: a-z A-Z 0-9 _ -. A duplicate name returns 409.",initial:"Initial contents",blankLabel:"Blank template",blankDesc:"Minimal 1-stage pipeline (develop → Done)",tutorialLabel:"Tutorial template",tutorialDesc:"Copy from sample.yaml.example (commented, explains every field)",tutorialDisabled:"sample.yaml.example not found",copyLabel:"Copy from current",copyDesc:"Copy from project.yaml (start from the current config)",copyDisabled:"project.yaml not found",cancel:"Cancel",createAria:"Create pipeline",create:"Create"},MR={title:CR,list:AR,newProject:TR,detail:OR,pipelineEditor:RR,newPipelineDialog:jR},DR="Workers",LR="Across {{projects}} projects · {{running}} running · {{starting}} starting · ",IR="{{count}} stuck",zR="{{count}} crashed",BR=" · {{count}} idle",UR="Refresh",PR="Refresh",FR="Loading…",$R="Load failed: {{error}}",HR="Click a project / worker for details",qR={title:"Capacity",project:"Project",inUse:"In use",other:"Other",details:"Details →",boardLink:"Board →",loadingWorkers:"Loading workers…",noSlots:"This project has no worker slots.",noWorkers:"No workers",selectWorker:"Select a worker",idle:"idle",currentCard:"Current card",slotIdle:"slot is idle — no current card.",outputRecent:"Claude output · last {{count}} lines",outputEmpty:"No session output yet. Worker takes a few seconds after launch.",heartbeatRecent:"Supervisor heartbeat · last {{count}} lines",viewFullLog:"View full log →"},KR={restartTitle:"Restart worker-{{slot}}",restartBody:"Kills the process, then re-launches to #{{seq}}",restartConfirm:"Restart",restartFailed:"Restart failed",restart:"Restart",killTitle:"Terminate worker-{{slot}}",killBody:"Current task will be force-cancelled.",killConfirm:"Terminate",killFailed:"Terminate failed",kill:"Terminate"},GR={allHealthy:"All workers healthy",pidDead:"PID is dead.",markerStalled:"marker stalled for {{relative}}."},VR={secondsAgo:"{{value}}s ago",minutesAgo:"{{value}}m ago",hoursAgo:"{{value}}h ago"},QR={title:DR,summary:LR,stuck:IR,crashed:zR,idle:BR,refreshAria:UR,refresh:PR,loading:FR,loadFailed:$R,selectHint:HR,capacity:qR,actions:KR,alerts:GR,format:VR},YR="Logs",WR="{{scope}}{{worker}} · {{mode}} · {{count}} lines",XR="All projects ({{count}})",ZR="5s polling",JR="tail -f",ej="Live",tj="History",nj="Query start time",ij="Query",aj="Query",rj="Filter project",sj="All projects",lj="Filter keyword…",oj="Filter logs",cj="No matching logs",uj={loadFailed:"Failed to load logs"},dj={title:YR,header:WR,scopeAll:XR,modeLive:ZR,modeTail:JR,live:ej,history:tj,queryStartAria:nj,queryAria:ij,query:aj,filterProjectAria:rj,allProjectsOption:sj,filterPlaceholder:lj,filterAria:oj,noMatches:cj,errors:uj},fj="Skills 🔧",hj="{{count}} user-level skills",pj="Loading…",mj="Sync bundled",gj="Search skill",bj="Search skill…",yj={all:"All",language:"Language",spec:"Spec",workflow:"Workflow",persona:"Persona"},xj={closeAria:"Close",loading:"Loading…",loadFailed:"Load failed: {{error}}",linkStatus:"Project link status",noProjects:"No projects yet. Create one first.",preview:"SKILL.md preview",fileToggleAria:"{{action}} {{file}}",expand:"Expand",collapse:"Collapse",labelFailed:"{{label}} failed",removeTitle:"Remove {{name}} from {{project}}",removeBody:"The skill link will be removed; this project will no longer load the skill on future runs.",removeConfirm:"Remove",unfreezeTitle:"Unfreeze {{name}} @ {{project}}",unfreezeBody:"Local edits to this skill will be overwritten; it returns to the latest shared version.",unfreezeConfirm:"Unfreeze"},vj={title:fj,summary:hj,loading:pj,syncBundled:mj,search:gj,searchPlaceholder:bj,filter:yj,modal:xj},wj="System ⚙️",Ej="Loading…",Sj="Runtime",kj="Global config ",Nj="Edit",_j="Edit env file",Cj="⚠ Editing",Aj='env file does not exist. Click "Edit" or run in your terminal: ',Tj="⚠ File contains plaintext credentials. 0600 permissions preserved on save.",Oj="env file editor",Rj=" · ● unsaved",jj="Cancel",Mj="Save",Dj="Save env",Lj="env was modified elsewhere",Ij="Save failed",zj="Click cancel and reopen the editor.",Bj="Version",Uj="Check for updates",Pj="Check latest version",Fj="sps-cli (current)",$j="npm (latest)",Hj="Latest",qj="Upgrade",Kj="Upgrade to latest",Gj="Copy command",Vj="Copy upgrade command",Qj="Run manually if auto-upgrade fails",Yj="Installed",Wj="Active (visible after console restart)",Xj="Upgrade did not take effect",Zj="Check",Jj="Upgrade sps-cli",eM="Current {{current}} → {{latest}}. All pipelines must be stopped. Restart sps console after upgrade.",tM="Upgrade",nM="Upgrade complete",iM='Installed v{{version}}. Run `pkill -f "sps console"` and restart to apply.',aM="Upgrade had no effect",rM="npm finished but the version did not change (still {{version}}) — likely permissions or registry issue. Copy the command below to run manually.",sM="npm did not install a new version. Copy the command to run manually, or check the log below.",lM="Upgrade failed",oM="Command copied",cM=`Paste it into your terminal to run:
372
+ {{cmd}}`,uM="Copy failed",dM=`Copy manually:
373
+ {{cmd}}`,fM={title:"Project health check",checkAll:"Check all",noProjects:"No projects yet.",expand:"Expand",collapse:"Collapse",clickCheck:'Click "Check" to run sps doctor',checkAria:"Check",check:"Check",fixAria:"Auto-fix",fixNothing:"Nothing to fix",fixHint:"Runs sps doctor <proj> --fix: auto-creates .claude/hooks/stop.sh, state.json, etc.",fix:"Fix",fixed:"Fixed",doctorActionFailed:"doctor {{action}} failed",actionFix:"fix",actionCheck:"check"},hM={title:wj,loading:Ej,runtime:Sj,envSection:kj,envEdit:Nj,envEditAria:_j,envEditing:Cj,envMissing:Aj,envWarn:Tj,envEditorAria:Oj,envUnsaved:Rj,envCancel:jj,envSave:Mj,envSaveAria:Dj,envEtagConflict:Lj,envSaveFailed:Ij,envEtagBody:zj,version:Bj,checkUpdate:Uj,checkUpdateAria:Pj,spsCliCurrent:Fj,npmLatest:$j,latestBadge:Hj,upgrade:qj,upgradeAria:Kj,copyCmd:Gj,copyCmdAria:Vj,copyCmdTitle:Qj,installed:Yj,installedActive:Wj,installedFailed:Xj,checkLabel:Zj,upgradeTitle:Jj,upgradeBody:eM,upgradeConfirm:tM,upgradeDoneTitle:nM,upgradeDoneBody:iM,upgradeIneffectiveTitle:aM,upgradeIneffectiveSameVersion:rM,upgradeIneffectiveNoInstall:sM,upgradeFailed:lM,cmdCopiedTitle:oM,cmdCopiedBody:cM,copyFailedTitle:uM,copyFailedBody:dM,doctor:fM},pM={cancel:"Cancel",confirm:"Confirm",save:"Save",delete:"Delete",edit:"Edit",close:"Close",create:"Create",refresh:"Refresh",retry:"Retry",loading:"Loading…",search:"Search",more:"More",back:"Back",next:"Next",previous:"Previous",yes:"Yes",no:"No",ok:"OK"},mM={online:"online",offline:"offline",connecting:"connecting",ready:"ready",running:"running",stopped:"stopped",error:"error",idle:"idle"},gM={chat:"Chat",projects:"Projects",board:"Board",workers:"Workers",logs:"Logs",skills:"Skills",system:"System"},bM={generic:"Something went wrong",networkOffline:"Network is offline",notFound:"Not found",unauthorized:"Unauthorized",badRequest:"Bad request"},yM={noData:"No data",noResults:"No results"},xM={label:"Language",en:"English",zh:"中文"},vM={title:"404 · Page not found",body:"Could not find this page. The link may have expired.",back:"Back to home"},wM={defaultTitle:"Select directory",closeAria:"Close",currentPath:"Current path",parentDirAria:"Parent directory",homeAria:"Go to home",loading:"Loading…",readFailed:"Read failed",emptyDir:"— empty —",enterDir:"Enter {{name}}/",selectDoubleClick:"Select {{name}} (double-click to confirm)",fileNotSelectable:"File not selectable",cancel:"Cancel",useFile:"Use this file",useFileTitle:"Pick a file first",useDir:"Use this directory"},EM={activePipelines:"Active pipelines",activeWorkers:"Active workers"},SM={actions:pM,status:mM,nav:gM,errors:bM,empty:yM,locale:xM,notFound:vM,directoryPicker:wM,statusBar:EM},kM="SPS Console",NM="新建对话",_M="历史",CM={placeholder:"说点什么…(Enter 发送,Shift+Enter 换行,可拖入文件 / 粘贴图片)",placeholderDragOver:"松开鼠标以附加文件…",send:"发送",stop:"中断",stopped:"已停止",attach:"附加本地文件",attachHint:"附加本地文件(也可拖拽 / 粘贴图片)",removeAttachment:"移除",ariaInput:"消息输入",ariaSend:"发送",ariaStop:"中断生成",uploading:"上传中…",ariaRemoveAttachment:"移除 {{name}}",attachmentTitle:`{{name}}
374
+ {{path}}
375
+ 点击预览`},AM={streaming:"STREAMING",thinking:"思考中…",tool:"工具",toolResult:"工具结果"},TM={untitled:"新对话",rename:"重命名",delete:"删除会话",deleteConfirm:"永久删除该会话?",deleteBody:"对话记录会永久删除,不可恢复。",deleteAria:"删除对话",deleteConfirmBtn:"删除",switch:"切换会话",loadFailed:"会话加载失败",createFailed:"新建对话失败",openAria:"打开对话 {{title}}",openAriaWithCwd:"打开对话 {{title}}(工作目录 {{cwd}})",empty:"还没对话。点上面新建。"},OM={label:"工作目录(可选)",placeholder:"/home/coral/projects/my-app",select:"浏览",selectAria:"浏览选择目录",hint1:"Agent 在该目录下读写文件。绝对路径,必须存在。",hint2:"留空则用 daemon 启动时的目录。",invalidAbsolute:"工作目录必须是绝对路径",notFound:"工作目录不存在"},RM={title:"新建对话",ariaLabel:"新建对话",closeAria:"关闭",titleField:"标题(可选)",titlePlaceholder:"留空 = 自动用首条消息生成",filePicker:"选择附件文件"},jM={ariaLabel:"预览 {{name}}",closeAria:"关闭",readFailed:"读取失败: {{error}}",loading:"加载中...",unsupported:"此文件类型不支持内联预览。",download:"下载",thumbTitle:`{{name}}
376
+ 点击放大`,expandTitle:`{{name}}
377
+ {{path}}
378
+ 点击预览`},MM={you:"你",error:"错误",assistant:"assistant",outputTruncated:"⚠ 输出超过 10MB,已截断"},DM={heading:"对话 💬",hint1:'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。',hint2:"Enter 发送 · Shift+Enter 换行 · 内容流式返回"},LM={stillStreaming:"上一条消息还在生成中,先等完成或点中断",tooManyConcurrent:"最多同时 {{max}} 个 chat 会话在生成。先等其它完成或中断。",send:"发送失败",fileTooLarge:"文件超过上限",fileTooLargeBody:"单文件上限 50 MB;当前 {{size}} MB({{name}})",uploadFailed:"附件上传失败",cancelFailed:"中断失败"},IM={attachment:"(附件)",seeAttachments:"(请查看附件)",attachmentTitle:"附件"},zM={justNow:"刚才"},BM={title:kM,newSession:NM,history:_M,input:CM,assistant:AM,session:TM,cwd:OM,newDialog:RM,preview:jM,bubble:MM,empty:DM,errors:LM,fallback:IM,time:zM},UM="看板",PM="看板 ✨",FM="选择一个项目 🎯",$M="看板按项目分。挑一个开始:",HM="加载中…",qM="{{name}} · {{cards}} cards · {{workers}} workers 活跃",KM={Planning:"Planning",Backlog:"Backlog",Todo:"Todo",Inprogress:"进行中",QA:"QA Review",Done:"已完成"},GM={start:"启动",stop:"停止",reset:"重置",newCard:"新卡片",search:"搜索",clear:"清空",clearSelection:"清空选择",ariaSearch:"搜索卡片",ariaClearFilter:"清空筛选",ariaFilterBy:"按 {{label}} 筛选",ariaStartPipeline:"启动 pipeline",ariaStopPipeline:"停止 pipeline",searchPlaceholder:"搜索标题 / skill / label…"},VM={title:"标题",description:"描述",checklist:"检查清单",checklistMore:"… 还有 {{count}} 条",log:"日志",skills:"Skills",labels:"标签",created:"创建时间",claimed:"认领者",seq:"Seq",empty:"(空)",justNow:"刚才"},QM={title:"新建卡片",closeAria:"关闭",titleField:"标题 *",titlePlaceholder:"例如:接入 GitHub OAuth 登录",titleHint:"写简短明了的目标(<200 字符)",descField:"描述",descPlaceholder:"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容",descHint:"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。",skillsHint:"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。",loadingSkills:"加载 skill 列表…",loadFailed:"skill 列表加载失败,不影响创建:{{error}}",selected:"已选 {{count}} 个:{{names}}",dispatchField:"派发",dispatchToggle:"立即派发执行(直接进 Backlog)",dispatchOff:"默认不勾:卡进 Planning 暂存,等你看板上拖到 Backlog 再开工。",dispatchOn:"勾上:跳过暂存,下次 tick 直接派 worker 跑。",cancel:"取消",create:"创建",createAria:"创建卡片"},YM={edit:"编辑",editAria:"编辑卡片",editing:"⚠ 编辑中",loadFailed:"加载失败: {{error}}",loadingSkills:"加载 skill 列表…",ariaTitle:"卡片标题",ariaCardDesc:"卡片描述",removeLabelAria:"删除 {{label}}",addLabelPlaceholder:"+ 添加 label",addLabelAria:"添加 label",labelsNote:"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖",checklistCount:"检查清单 {{done}}/{{total}}",checklistEmpty:"暂无清单项。在描述里用 `- [ ] 项` 语法添加。",descNote:'只替换 "## 描述" 段的内容;检查清单和日志段不动。',doneCannotStart:"卡片已完成;先拖回 Todo 再启动",pipelineRunningCannotStart:"Pipeline 正在跑——supervisor 会自动 dispatch,无需手动启动",launchWorker:"启动 worker",launchFailed:"启动 worker 失败",resetTitle:"重置卡片 #{{seq}}",resetBody:"卡片状态会回到初始,已做的 checklist 会清空。",resetConfirm:"重置",resetFailed:"重置失败",resetButton:"重置卡片",deleteTitle:"删除卡片 #{{seq}}",deleteBody:'即将删除 "{{title}}"。此操作不可恢复(md 文件将被物理删除)。是否继续?',deleteContinue:"继续",deleteFinalTitle:"最终确认",deleteFinalBody:"请再次确认删除卡片 #{{seq}}。",deleteFinalConfirm:"确定删除",deleteFailed:"删除失败",deleteButton:"删除卡片",deleteAria:"删除卡片",cancel:"取消",save:"保存",saveAria:"保存卡片修改",saveFailed:"保存失败",closeAria:"关闭",loading:"加载中…"},WM={loadFailed:"加载卡片失败",createFailed:"新建卡片失败",updateFailed:"卡片更新失败",deleteFailed:"卡片删除失败",moveFailed:"移动卡片失败",startFailed:"启动 pipeline 失败",stopFailed:"停止 pipeline 失败",resetTitle:"重置整个流水线",resetBody:"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。",resetConfirm:"重置全部",resetFailed:"重置失败",isRunning:"卡片正在运行,请先 kill worker 或移出 Inprogress"},XM={title:UM,titleEmoji:PM,selectProject:FM,selectHint:$M,loadingProject:HM,summary:qM,columns:KM,actions:GM,card:VM,newCardDialog:QM,cardModal:YM,errors:WM},ZM="项目 🎯",JM={summary:"{{count}} 个本机项目",loading:"加载中…",loadFailed:"点击刷新重试",loadError:"加载失败",retry:"重试",refresh:"刷新",newProjectAria:"新建项目",newProject:"新建项目",empty:"还没有项目 ✨",emptyHint:"运行 {{cmd}} 创建第一个项目。"},eD={title:"新建项目",backAria:"返回项目列表",back:"返回",name:"项目名",nameHint:"只能用字母、数字、下划线、连字符。例如 acme-web",namePlaceholder:"例如: acme-web",nameInvalid:"名称只能包含 a-z A-Z 0-9 _ -",dir:"项目目录",dirHint:"本机绝对路径(代码或文档都可)。和是否启用 git 无关。",dirBrowseAria:"浏览选择项目目录",dirBrowse:"浏览",dirAutoCreate:"目录不存在时自动创建(推荐 — 否则 .claude/ 和 wiki/ 安装会被跳过)",maxWorkers:"最大 Worker 数",ackTimeout:"ACK 超时(分钟)",ackTimeoutHint:"Worker 启动后多久没 ACK 视为失败",enableGit:"启用 Git(Worker 自动 commit + push)",enableGitHint:"关闭后 Worker 只做任务、不做版本控制;适合文档/数据处理等非代码项目。",mergeBranch:"合并分支",remotePath:"Git 远程项目路径",remotePathHint:"如 user/repo,空则跳过远程 API(只本地 commit/push)",gitlabId:"GitLab 项目 ID",gitlabIdHint:"数字;GitHub 用户留空",enableWiki:"启用 Wiki 知识库(per-project)",enableWikiHintPrefix:"开启后自动 scaffold ",enableWikiHintMid:" 目录,并向 Worker prompt 注入 5 层检索上下文与 wiki-update 提示。可后续 ",enableWikiHintSuffix:" 补办。",notifications:"通知",matrixRoom:"Matrix 房间 ID",matrixRoomHint:"空则使用全局配置;不填 = 不通知",cancel:"取消",createAria:"创建项目",creating:"创建中…",create:"创建",pickerTitle:"选择项目目录",createFailed:"创建失败"},tD={backAria:"返回项目列表",back:"返回",board:"看板",tabs:{overview:"概览",config:"配置",danger:"危险操作"},loading:"加载中…",notFound:"项目 {{name}} 不存在或无法读取。",repo:"仓库路径",pmBackend:"PM 后端",cards:"卡片",cardsSummary:"{{total}} 张 · {{ip}} 进行中 · {{done}} 完成",workers:"Workers",workersSummary:"{{total}} 个({{active}} 活跃)",lastActivity:"最近活动",config:{saveFailed:"保存失败",etagConflict:"配置已被其他地方修改",etagConflictBody:'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。',loading:"加载中…",loadFailed:"加载失败: {{error}}",reloadAria:"重新加载",reload:"重新加载",saveAria:"保存配置",save:"保存",editorAria:"conf 文件编辑器",unsaved:"● 未保存的修改"},pipeline:{newAria:"新建 pipeline",new:"新建 pipeline",empty:'还没有 pipeline 文件。点"新建 pipeline"开始。',editAria:"编辑 {{name}}",edit:"编辑",switchTitle:"切换到 {{name}}",switchBody:"当前 project.yaml 会被 {{name}} 的内容覆盖。继续?",switchConfirm:"切换",switchAria:"切换到 {{name}}",switch:"切换",deleteTitle:"删除 {{name}}",deleteBody:"这个 pipeline 文件会被永久删除。",deleteConfirm:"删除",deleteAria:"删除 {{name}}",switchFailed:"切换失败",deleteFailed:"删除失败",createFailed:"创建失败"},danger:{deletedTitle:"已删除",deletedBodyClean:`项目已删除。同时清理了:
379
+ {{paths}}`,deletedBody:"项目已删除。",deleteFailed:"删除失败",delete:"删除项目",deleteHint:"这会清理 {{path}}(包括所有卡片、runtime、logs)。",alsoCleanRepo:"同时清理 repo 的 .claude/",repoUntouched:"repo 本身不动,只清这个目录。",confirmType:"输入项目名 {{name}} 确认:",deleteAria:"永久删除项目",deleteBtn:"永久删除"}},nD={closeAria:"关闭",loading:"加载中…",loadFailed:"加载失败: {{error}}",structured:"结构化",rawYaml:"原始 YAML",activeWarn:"⚠ 这是当前激活的 pipeline,保存后下一轮 tick 生效",yamlAria:"pipeline YAML 编辑器",unsaved:"● 未保存",saved:"已保存",noChanges:"无变化",reload:"重新加载",saveAria:"保存 pipeline",save:"保存",saveFailed:"保存失败",yamlInvalid:"YAML 语法错",etagConflict:"文件已被其他地方修改",yamlSerializeFailed:"YAML 序列化失败",modeProject:"project = 事件驱动流水线(默认) · steps = 顺序脚本",addStageAria:"添加 stage",addStage:"添加 stage",noStages:'还没 stage。点"添加 stage"开始。',moveUpAria:"上移",moveDownAria:"下移",deleteStageAria:"删除 stage",stageNameHint:"stage 唯一名",stageProfileHint:"skill 画像,可空",stageCardStateHint:"本 stage 期间卡片状态",stageTimeoutHint:"可选,如 30m 2h",stageTriggerHint:"触发条件,可空走默认",stageOnCompleteHint:"成功后动作",stageOnFailureActionHint:"失败时动作,如 label NEEDS-FIX",stageCommentHint:"写进卡片的注释",stopOnFailureNote:"(失败后停流水线;去掉则继续下一张卡)",filenameInvalid:"pipeline 文件名非法或不能是 project.yaml"},iD={title:"新建 pipeline",closeAria:"关闭",filename:"文件名",filenamePlaceholder:"例如 ci",savedAs:"实际会保存为 {{name}}",filenameHint:"只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。",initial:"初始内容",blankLabel:"空白模板",blankDesc:"最简 1 stage (develop → Done)",tutorialLabel:"教学模板",tutorialDesc:"从 sample.yaml.example 复制(带注释,讲解所有字段)",tutorialDisabled:"sample.yaml.example 不存在",copyLabel:"复制当前活动的",copyDesc:"从 project.yaml 复制(基于目前的配置改)",copyDisabled:"project.yaml 不存在",cancel:"取消",createAria:"创建 pipeline",create:"创建"},aD={title:ZM,list:JM,newProject:eD,detail:tD,pipelineEditor:nD,newPipelineDialog:iD},rD="Workers",sD="跨 {{projects}} 项目 · {{running}} 跑 · {{starting}} 启动 · ",lD="{{count}} 卡",oD="{{count}} 崩",cD=" · {{count}} 闲",uD="刷新",dD="刷新",fD="加载中…",hD="加载失败: {{error}}",pD="点击项目 / worker 查看详情",mD={title:"容量",project:"项目",inUse:"占用",other:"其它",details:"详情 →",boardLink:"看板 →",loadingWorkers:"加载 workers…",noSlots:"该项目没有 worker slot。",noWorkers:"无 worker",selectWorker:"请选择一个 worker",idle:"空闲",currentCard:"当前卡片",slotIdle:"slot 空闲,没有当前卡片。",outputRecent:"Claude 输出 · 最近 {{count}} 行",outputEmpty:"还没收到 session 输出。Worker 刚启动时需要几秒。",heartbeatRecent:"Supervisor 心跳 · 最近 {{count}} 行",viewFullLog:"查看完整 log →"},gD={restartTitle:"重启 worker-{{slot}}",restartBody:"先杀进程,再重新 launch 到 #{{seq}}",restartConfirm:"重启",restartFailed:"重启失败",restart:"重启",killTitle:"终止 worker-{{slot}}",killBody:"当前任务强制中断。",killConfirm:"终止",killFailed:"终止失败",kill:"终止"},bD={allHealthy:"全部 worker 健康",pidDead:"PID 已死。",markerStalled:"marker 停 {{relative}}。"},yD={secondsAgo:"{{value}}s 前",minutesAgo:"{{value}}m 前",hoursAgo:"{{value}}h 前"},xD={title:rD,summary:sD,stuck:lD,crashed:oD,idle:cD,refreshAria:uD,refresh:dD,loading:fD,loadFailed:hD,selectHint:pD,capacity:mD,actions:gD,alerts:bD,format:yD},vD="日志",wD="{{scope}}{{worker}} · {{mode}} · {{count}} lines",ED="全部项目({{count}})",SD="5s 轮询",kD="tail -f",ND="实时",_D="历史",CD="查询起始时间",AD="查询",TD="查询",OD="筛选项目",RD="全部项目",jD="过滤关键字…",MD="过滤日志",DD="没有匹配的日志",LD={loadFailed:"日志加载失败"},ID={title:vD,header:wD,scopeAll:ED,modeLive:SD,modeTail:kD,live:ND,history:_D,queryStartAria:CD,queryAria:AD,query:TD,filterProjectAria:OD,allProjectsOption:RD,filterPlaceholder:jD,filterAria:MD,noMatches:DD,errors:LD},zD="Skills 🔧",BD="{{count}} 个 user-level skill",UD="加载中…",PD="同步内置",FD="搜索 skill",$D="搜索 skill…",HD={all:"全部",language:"语言",spec:"规范",workflow:"工作流",persona:"角色"},qD={closeAria:"关闭",loading:"加载中…",loadFailed:"加载失败: {{error}}",linkStatus:"项目链接状态",noProjects:"还没有任何项目。先去创建一个项目。",preview:"SKILL.md 预览",fileToggleAria:"{{action}} {{file}}",expand:"展开",collapse:"收起",labelFailed:"{{label}}失败",removeTitle:"从 {{project}} 移除 {{name}}",removeBody:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",removeConfirm:"移除",unfreezeTitle:"解冻 {{name}} @ {{project}}",unfreezeBody:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",unfreezeConfirm:"解冻"},KD={title:zD,summary:BD,loading:UD,syncBundled:PD,search:FD,searchPlaceholder:$D,filter:HD,modal:qD},GD="系统 ⚙️",VD="加载中…",QD="运行时",YD="全局配置 ",WD="编辑",XD="编辑 env 文件",ZD="⚠ 编辑模式",JD='env 文件不存在。点"编辑"或者终端运行 ',eL="⚠ 文件包含凭证明文。保存时保持 0600 权限。",tL="env 文件编辑器",nL=" · ● 未保存",iL="取消",aL="保存",rL="保存 env",sL="env 被其他地方修改了",lL="保存失败",oL="请点取消后重开编辑。",cL="版本",uL="检查更新",dL="检查最新版本",fL="sps-cli (当前)",hL="npm (最新)",pL="最新",mL="升级",gL="升级到最新版本",bL="复制命令",yL="复制升级命令",xL="自动升级失败时手动跑",vL="已安装",wL="已生效(重启 console 后可见)",EL="未升级成功",SL="检查",kL="升级 sps-cli",NL="当前 {{current}},升级到 {{latest}}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。",_L="升级",CL="升级完成",AL='装上了 v{{version}}。请 `pkill -f "sps console"` 再重启以生效。',TL="升级未生效",OL="npm 执行完毕但版本没变(仍 {{version}})——多半是权限或 registry 问题。可复制下面的命令在终端手动跑。",RL="npm 没装上新版本。可复制命令手动跑,或看下面日志定位。",jL="升级失败",ML="命令已复制",DL=`粘贴到终端运行即可:
380
+ {{cmd}}`,LL="复制失败",IL=`请手动复制:
381
+ {{cmd}}`,zL={title:"项目健康检查",checkAll:"检查全部",noProjects:"还没有项目。",expand:"展开",collapse:"折叠",clickCheck:'点 "检查" 运行 sps doctor',checkAria:"检查",check:"检查",fixAria:"自动修复",fixNothing:"已无可修问题",fixHint:"调 sps doctor <proj> --fix:自动创建 .claude/hooks/stop.sh、state.json 等",fix:"修复",fixed:"已修复",doctorActionFailed:"doctor {{action}}失败",actionFix:"修复",actionCheck:"检查"},BL={title:GD,loading:VD,runtime:QD,envSection:YD,envEdit:WD,envEditAria:XD,envEditing:ZD,envMissing:JD,envWarn:eL,envEditorAria:tL,envUnsaved:nL,envCancel:iL,envSave:aL,envSaveAria:rL,envEtagConflict:sL,envSaveFailed:lL,envEtagBody:oL,version:cL,checkUpdate:uL,checkUpdateAria:dL,spsCliCurrent:fL,npmLatest:hL,latestBadge:pL,upgrade:mL,upgradeAria:gL,copyCmd:bL,copyCmdAria:yL,copyCmdTitle:xL,installed:vL,installedActive:wL,installedFailed:EL,checkLabel:SL,upgradeTitle:kL,upgradeBody:NL,upgradeConfirm:_L,upgradeDoneTitle:CL,upgradeDoneBody:AL,upgradeIneffectiveTitle:TL,upgradeIneffectiveSameVersion:OL,upgradeIneffectiveNoInstall:RL,upgradeFailed:jL,cmdCopiedTitle:ML,cmdCopiedBody:DL,copyFailedTitle:LL,copyFailedBody:IL,doctor:zL},UL={cancel:"取消",confirm:"确认",save:"保存",delete:"删除",edit:"编辑",close:"关闭",create:"创建",refresh:"刷新",retry:"重试",loading:"加载中…",search:"搜索",more:"更多",back:"返回",next:"下一步",previous:"上一步",yes:"是",no:"否",ok:"确定"},PL={online:"在线",offline:"离线",connecting:"连接中",ready:"就绪",running:"运行中",stopped:"已停止",error:"错误",idle:"空闲"},FL={chat:"对话",projects:"项目",board:"看板",workers:"Workers",logs:"日志",skills:"Skills",system:"系统"},$L={generic:"出错了",networkOffline:"网络未连接",notFound:"未找到",unauthorized:"未授权",badRequest:"请求无效"},HL={noData:"暂无数据",noResults:"没有结果"},qL={label:"语言",en:"English",zh:"中文"},KL={title:"404 · 页面不存在",body:"没找到这个页面。可能是链接过期了。",back:"返回首页"},GL={defaultTitle:"选择目录",closeAria:"关闭",currentPath:"当前路径",parentDirAria:"上级目录",homeAria:"回到 Home",loading:"加载中...",readFailed:"读取失败",emptyDir:"— 空目录 —",enterDir:"进入 {{name}}/",selectDoubleClick:"选择 {{name}}(双击直接确认)",fileNotSelectable:"文件不可选",cancel:"取消",useFile:"使用此文件",useFileTitle:"请先点选一个文件",useDir:"选此目录"},VL={activePipelines:"活跃 pipeline 数",activeWorkers:"活跃 worker 数"},QL={actions:UL,status:PL,nav:FL,errors:$L,empty:HL,locale:qL,notFound:KL,directoryPicker:GL,statusBar:VL},YL=["common","chat","board","projects","workers","logs","skills","system"],oE=["en","zh"],WL={en:{common:SM,chat:hR,board:_R,projects:MR,workers:QR,logs:dj,skills:vj,system:hM},zh:{common:QL,chat:BM,board:XM,projects:aD,workers:xD,logs:ID,skills:KD,system:BL}};sn.use(lE).use(OT).init({resources:WL,fallbackLng:"en",supportedLngs:oE,ns:YL,defaultNS:"common",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],lookupLocalStorage:"sps.locale",caches:["localStorage"]},returnNull:!1});function XL(){const{i18n:e,t}=Fe("common"),n=e.resolvedLanguage??"en";return p.jsxs("div",{className:"inline-flex items-center gap-1.5 border-2 border-[var(--color-text)] rounded-full bg-[var(--color-bg-cream)] p-1",role:"group","aria-label":t("locale.label"),children:[p.jsx(Qw,{size:12,strokeWidth:2.5,className:"ml-1.5 mr-0.5 text-[var(--color-text-muted)]"}),oE.map(a=>{const s=n===a;return p.jsx("button",{type:"button",onClick:()=>{s||e.changeLanguage(a)},className:["text-xs font-bold px-2 py-0.5 rounded-full transition-colors",s?"bg-[var(--color-accent-mint)] border-2 border-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),"aria-pressed":s,children:t(`locale.${a}`)},a)})]})}const ZL=[{to:"/chat",key:"chat",icon:I2},{to:"/projects",key:"projects",icon:O2},{to:"/board",key:"board",icon:A2},{to:"/workers",key:"workers",icon:eE},{to:"/logs",key:"logs",icon:Mc},{to:"/skills",key:"skills",icon:Qw},{to:"/system",key:"system",icon:Xw}];function JL(){const{t:e}=Fe("common");return p.jsxs(p.Fragment,{children:[p.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:[p.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"]}),p.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":e("nav.chat"),children:ZL.map(t=>{const n=t.icon;return p.jsxs(Bw,{to:t.to,className:({isActive:a})=>["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",a?"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:[p.jsx(n,{size:18,strokeWidth:2.5}),e(`nav.${t.key}`)]},t.to)})}),p.jsx("div",{className:"mt-auto pt-4 px-1",children:p.jsx(XL,{})})]})}class eI extends Error{constructor(t,n,a){super(n),this.status=t,this.detail=a,this.name="ApiError"}}async function qt(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok){let n;try{n=await t.json()}catch{n=await t.text()}throw new eI(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function cE(){return qt("/api/system/info")}function tI(){return qt("/api/system/env")}function nI(){return qt("/api/system/env/raw")}async function iI(e,t){const n=await fetch("/api/system/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,etag:t})});if(!n.ok){const a=await n.text(),s=new Error(`${n.status}: ${a}`);throw s.status=n.status,s}return n.json()}function aI(){return qt("/api/system/latest-version")}async function rI(){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()}async function sI(e,t=!1){const n=t?"?fix=1":"",a=await fetch(`/api/system/doctor/${encodeURIComponent(e)}${n}`,{method:"POST"});if(!a.ok)throw new Error(`${a.status}: ${await a.text()}`);return a.json()}function Ar(){return qt("/api/projects")}function lI(e){return qt(`/api/projects/${encodeURIComponent(e)}`)}async function oI(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text();throw new Error(`${t.status}: ${n}`)}return t.json()}function cI(e){return qt(`/api/projects/${encodeURIComponent(e)}/conf`)}async function uI(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/conf`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,etag:n})});if(!a.ok){const s=await a.text(),l=new Error(`${a.status}: ${s}`);throw l.status=a.status,l}return a.json()}async function dI(e,t={}){const n=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function fI(e){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function hI(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipeline`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipeline:t})});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function pI(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function mI(e,t,n,a){const s=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n,etag:a})});if(!s.ok){const l=await s.text(),c=new Error(`${s.status}: ${l}`);throw c.status=s.status,c}return s.json()}async function gI(e,t,n="blank"){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,template:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}async function bI(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function yI(){var f;const{t:e}=Fe("common"),t=ct({queryKey:["system-info"],queryFn:cE,refetchInterval:3e4}),n=ct({queryKey:["projects"],queryFn:Ar,refetchInterval:1e4}),a=vI(),s=!t.isError,l=((f=n.data)==null?void 0:f.data)??[],c=l.filter(h=>h.pipelineStatus==="running").length,d=l.reduce((h,b)=>h+b.workers.active,0);return p.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:[p.jsx("span",{className:"nb-status",style:{background:s?"var(--color-running-bg)":"var(--color-crashed-bg)",color:s?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:s?"server":"offline"}),p.jsx(xI,{state:a}),p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{className:"flex items-center gap-1",title:e("statusBar.activePipelines"),children:[p.jsx(Jd,{size:10,strokeWidth:2.5}),p.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," pipeline"]}),p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{className:"flex items-center gap-1",title:e("statusBar.activeWorkers"),children:[p.jsx(Yw,{size:10,strokeWidth:2.5}),p.jsx("span",{className:"font-bold text-[var(--color-text)]",children:d})," worker"]}),p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{children:["localhost:",window.location.port]}),t.data&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{children:["v",t.data.version]}),p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{children:["node ",t.data.nodeVersion]})]})]})}function xI({state:e}){return e==="open"?p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:"SSE"}):e==="connecting"?p.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:"SSE·connect"}):p.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[p.jsx(gc,{size:9,strokeWidth:2.5}),"SSE·down"]})}function vI(){const[e,t]=O.useState("connecting");return O.useEffect(()=>{let n=null,a=null,s=!1;const l=()=>{s||(n=new EventSource("/stream/heartbeat"),n.addEventListener("server.heartbeat",()=>t("open")),n.addEventListener("open",()=>t("open")),n.addEventListener("error",()=>{(n==null?void 0:n.readyState)===EventSource.CLOSED?(t("closed"),a==null&&(a=setTimeout(()=>{a=null,n==null||n.close(),l()},1e4))):t("connecting")}))};return l(),()=>{s=!0,a!=null&&clearTimeout(a),n==null||n.close()}},[]),e}function wI(){return p.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] h-screen",children:[p.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:p.jsx(JL,{})}),p.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:p.jsx(IA,{})}),p.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:p.jsx(yI,{})})]})}function Im(e,t){try{const n=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:n,keepalive:!0}).catch(()=>{})}catch{}}function EI(){typeof window>"u"||(window.addEventListener("error",e=>{Im(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;Im(t instanceof Error?t:String(t),"unhandledrejection")}))}class SI extends O.Component{constructor(){super(...arguments);kp(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,a){var s;Im(n,`ErrorBoundary: ${((s=a.componentStack)==null?void 0:s.slice(0,200))??""}`),console.error("[ErrorBoundary]",n,a)}render(){return this.state.error?p.jsx("div",{className:"p-6",children:p.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"💥 UI crashed"}),p.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),p.jsxs("details",{className:"text-xs mb-4",children:[p.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),p.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)"})]}),p.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:"Reload page"})]})}):this.props.children}}function kI(){const{t:e}=Fe("projects"),t=Cr(),{data:n,isLoading:a,isError:s,error:l,refetch:c}=ct({queryKey:["projects"],queryFn:Ar});return p.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[p.jsxs("header",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("title")}),p.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:n?e("list.summary",{count:n.data.length}):e(a?"list.loading":"list.loadFailed")})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>c(),type:"button",children:[p.jsx(Jd,{size:16,strokeWidth:2.5}),e("list.refresh")]}),p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>t("/projects/new"),"aria-label":e("list.newProjectAria"),children:[p.jsx(Pi,{size:16,strokeWidth:3}),e("list.newProject")]})]})]}),a&&p.jsx(CI,{}),s&&p.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e("list.loadError")}),p.jsx("p",{className:"text-sm text-[var(--color-text)]",children:l instanceof Error?l.message:String(l)}),p.jsx("button",{className:"nb-btn mt-4",onClick:()=>c(),type:"button",children:e("list.retry")})]}),n&&n.data.length===0&&p.jsx(AI,{}),n&&n.data.length>0&&p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.data.map(d=>p.jsx(NI,{project:d},d.name))})]})}function NI({project:e}){const t=e.pipelineStatus==="running";return p.jsxs(bs,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),p.jsx(_I,{status:e.pipelineStatus})]}),e.repoDir&&p.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),p.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:[p.jsx(zp,{label:"cards",value:e.cards.total,accent:"purple"}),p.jsx(zp,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),p.jsx(zp,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function zp({label:e,value:t,accent:n}){const a={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return p.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:a[n]},children:[p.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),p.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function _I({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:n,label:a}=t[e],s=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return p.jsx("span",{className:"nb-status",style:{background:n,color:s},children:a})}function CI(){return p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>p.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[p.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),p.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),p.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function AI(){const{t:e}=Fe("projects");return p.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[p.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:p.jsx(eE,{size:32,strokeWidth:2.5})}),p.jsxs("div",{className:"flex-1",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("list.empty")}),p.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:[e("list.emptyHint",{cmd:""}),p.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>"})]}),p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[p.jsx(Pi,{size:16,strokeWidth:3}),e("list.newProject")]})]})]})}function TI(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return qt(`/api/fs/browse${t}`)}const uE=50*1024*1024;async function OI(e,t){if(t.size>uE)throw new Error(`文件超过 50 MB 上限(当前 ${(t.size/1024/1024).toFixed(2)} MB)`);const n=new FormData;n.append("sessionId",e),n.append("file",t,t.name);const a=await fetch("/api/fs/upload",{method:"POST",body:n});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return await a.json()}function zm(e,t){return`/api/fs/file?${new URLSearchParams({path:t,sessionId:e}).toString()}`}function wg({initialPath:e,onCancel:t,onSelect:n,title:a,mode:s="directory"}){var w,k,N;const[l,c]=O.useState(e??null),[d,f]=O.useState(null),h=ct({queryKey:["fs-browse",l],queryFn:()=>TI(l??void 0),staleTime:0,gcTime:0}),{t:b}=Fe("common"),m=a??b("directoryPicker.defaultTitle"),x=((w=h.data)==null?void 0:w.path)??l??"",v=((k=h.data)==null?void 0:k.parent)??null,E=((N=h.data)==null?void 0:N.home)??null;return O.useEffect(()=>{const C=A=>{A.key==="Escape"&&(A.preventDefault(),t())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[t]),p.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.5)] p-4",role:"presentation",children:p.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-lg w-full p-5 flex flex-col",style:{maxHeight:"70vh"},role:"dialog","aria-modal":"true","aria-label":m,children:[p.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base",children:m}),p.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":b("directoryPicker.closeAria"),children:p.jsx(Ci,{size:14,strokeWidth:3})})]}),p.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[p.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>v&&c(v),disabled:!v||h.isLoading,"aria-label":b("directoryPicker.parentDirAria"),title:b("directoryPicker.parentDirAria"),children:p.jsx(HT,{size:12,strokeWidth:3})}),p.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>E&&c(E),disabled:!E||h.isLoading,"aria-label":b("directoryPicker.homeAria"),title:b("directoryPicker.homeAria"),children:p.jsx(k2,{size:12,strokeWidth:3})}),p.jsx("div",{className:"flex-1 min-w-0 nb-input font-[family-name:var(--font-mono)] text-xs px-2 py-1.5 truncate",title:x,dir:"rtl",children:x||"..."})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[h.isLoading&&p.jsxs("div",{className:"flex items-center justify-center py-12 text-[var(--color-text-muted)]",children:[p.jsx(Bt,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),b("directoryPicker.loading")]}),h.isError&&p.jsxs("div",{className:"p-4 text-sm text-[var(--color-crashed)]",children:[p.jsx("p",{className:"font-bold mb-1",children:b("directoryPicker.readFailed")}),p.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] break-all",children:h.error instanceof Error?h.error.message:String(h.error)})]}),h.data&&p.jsxs("ul",{className:"divide-y-2 divide-[var(--color-text)]/20",children:[h.data.entries.length===0&&p.jsx("li",{className:"p-4 text-xs text-[var(--color-text-subtle)] italic text-center",children:b("directoryPicker.emptyDir")}),h.data.entries.map(C=>{const A=(()=>{const M=x.endsWith("/")||x.endsWith("\\")?"":"/";return`${x}${M}${C.name}`})(),T=s==="file"&&d===A,L=C.isDirectory||s==="file";return p.jsx("li",{children:p.jsxs("button",{type:"button",className:["w-full flex items-center gap-2 px-3 py-2 text-left text-sm font-[family-name:var(--font-mono)]","disabled:opacity-50 disabled:cursor-not-allowed",T?"bg-[var(--color-accent-mint)] font-bold":"hover:bg-[var(--color-accent-mint)]"].join(" "),disabled:!L,onClick:()=>{C.isDirectory?(f(null),c(A)):s==="file"&&f(A)},onDoubleClick:()=>{s==="file"&&!C.isDirectory&&n(A)},title:C.isDirectory?b("directoryPicker.enterDir",{name:C.name}):s==="file"?b("directoryPicker.selectDoubleClick",{name:C.name}):b("directoryPicker.fileNotSelectable"),children:[C.isDirectory?p.jsx(yc,{size:14,strokeWidth:2.5,className:"flex-shrink-0 text-[var(--color-text)]"}):p.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0"}),p.jsx("span",{className:"truncate",children:C.name}),C.isDirectory&&p.jsx(ef,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},C.name)})]})]}),p.jsxs("div",{className:"flex gap-2 justify-end pt-3 shrink-0",children:[p.jsx("button",{type:"button",className:"nb-btn",onClick:t,children:b("directoryPicker.cancel")}),s==="file"?p.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>d&&n(d),disabled:!d||h.isLoading||h.isError,title:d??b("directoryPicker.useFileTitle"),children:[p.jsx(bc,{size:14,strokeWidth:3}),b("directoryPicker.useFile")]}):p.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(x),disabled:!x||h.isLoading||h.isError,children:[p.jsx(bc,{size:14,strokeWidth:3}),b("directoryPicker.useDir")]})]})]})})}function RI({title:e,body:t,confirm:n,onConfirm:a,onCancel:s,danger:l}){const{t:c}=Fe("common");return O.useEffect(()=>{const d=f=>{f.key==="Escape"&&s()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[s]),p.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",children:p.jsxs("div",{className:"nb-card max-w-md w-full",children:[p.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),p.jsxs("div",{className:"flex gap-3 justify-end",children:[p.jsx("button",{className:"nb-btn",onClick:s,type:"button",children:c("actions.cancel")}),p.jsx("button",{className:l?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await a()},type:"button",children:n})]})]})})}const dE=O.createContext(null);function jI({children:e}){const[t,n]=O.useState(null),a=O.useCallback(d=>new Promise(f=>{n({kind:"confirm",opts:d,resolve:h=>{n(null),f(h)}})}),[]),s=O.useCallback(d=>new Promise(f=>{n({kind:"alert",opts:d,resolve:()=>{n(null),f()}})}),[]),l=O.useCallback(d=>new Promise(f=>{n({kind:"prompt",opts:d,resolve:h=>{n(null),f(h)}})}),[]),{t:c}=Fe("common");return p.jsxs(dE.Provider,{value:{confirm:a,alert:s,prompt:l},children:[e,(t==null?void 0:t.kind)==="confirm"&&p.jsx(RI,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??c("actions.ok"),danger:t.opts.danger,onConfirm:()=>t.resolve(!0),onCancel:()=>t.resolve(!1)}),(t==null?void 0:t.kind)==="alert"&&p.jsx(MI,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??c("actions.ok"),onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&p.jsx(DI,{title:t.opts.title,body:t.opts.body,placeholder:t.opts.placeholder,defaultValue:t.opts.defaultValue,confirm:t.opts.confirm??c("actions.ok"),cancel:t.opts.cancel??c("actions.cancel"),onConfirm:d=>t.resolve(d),onCancel:()=>t.resolve(null)})]})}function ui(){const e=O.useContext(dE);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function MI({title:e,body:t,confirm:n,onClose:a}){return O.useEffect(()=>{const s=l=>{(l.key==="Escape"||l.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),p.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:p.jsxs("div",{className:"nb-card max-w-md w-full",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),p.jsx("div",{className:"flex gap-3 justify-end",children:p.jsx("button",{className:"nb-btn nb-btn-primary",onClick:a,type:"button",autoFocus:!0,children:n})})]})})}function DI({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:l,onConfirm:c,onCancel:d}){const[f,h]=O.useState(a??""),b=O.useRef(null);O.useEffect(()=>{var v,E;(v=b.current)==null||v.focus(),(E=b.current)==null||E.select();const x=w=>{w.key==="Escape"&&d()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[d]);const m=()=>{const x=f.trim();x&&c(x)};return p.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:p.jsxs("div",{className:"nb-card max-w-md w-full",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),p.jsx("input",{ref:b,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:f,onChange:x=>h(x.target.value),onKeyDown:x=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&(x.preventDefault(),m())}}),p.jsxs("div",{className:"flex gap-3 justify-end",children:[p.jsx("button",{className:"nb-btn",onClick:d,type:"button",children:l}),p.jsx("button",{className:"nb-btn nb-btn-primary",onClick:m,type:"button",disabled:!f.trim(),children:s})]})]})})}function LI(){const{t:e}=Fe("projects"),t=Cr(),n=Vn(),{alert:a}=ui(),[s,l]=O.useState({name:"",projectDir:"",enableGit:!0,createIfMissing:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5"}),[c,d]=O.useState(!1),f=Gn({mutationFn:m=>oI(m),onSuccess:m=>{n.invalidateQueries({queryKey:["projects"]}),t(`/projects/${encodeURIComponent(m.name)}`)},onError:m=>{a({title:e("newProject.createFailed"),body:m instanceof Error?m.message:String(m)})}}),h=/^[a-zA-Z0-9_-]+$/.test(s.name),b=h&&s.projectDir.trim()!==""&&!f.isPending;return p.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[p.jsxs("header",{className:"flex items-center gap-3",children:[p.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.backAria"),children:[p.jsx(Kw,{size:14,strokeWidth:3}),e("newProject.back")]}),p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e("newProject.title")})]}),p.jsx("div",{className:"nb-card",children:p.jsxs("form",{onSubmit:m=>{m.preventDefault(),b&&f.mutate(s)},className:"flex flex-col gap-5",children:[p.jsxs(ur,{label:e("newProject.name"),hint:e("newProject.nameHint"),children:[p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.namePlaceholder"),value:s.name,onChange:m=>l({...s,name:m.target.value}),autoFocus:!0,required:!0}),s.name&&!h&&p.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:e("newProject.nameInvalid")})]}),p.jsxs(ur,{label:e("newProject.dir"),hint:e("newProject.dirHint"),children:[p.jsxs("div",{className:"flex gap-2",children:[p.jsx("input",{type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)]",placeholder:"/home/coral/code/acme",value:s.projectDir,onChange:m=>l({...s,projectDir:m.target.value}),required:!0}),p.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>d(!0),"aria-label":e("newProject.dirBrowseAria"),title:e("newProject.dirBrowseAria"),children:[p.jsx(Vw,{size:14,strokeWidth:2.5}),e("newProject.dirBrowse")]})]}),p.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer select-none",children:[p.jsx("input",{type:"checkbox",checked:s.createIfMissing!==!1,onChange:m=>l({...s,createIfMissing:m.target.checked}),className:"w-4 h-4 cursor-pointer"}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("newProject.dirAutoCreate")})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(ur,{label:e("newProject.maxWorkers"),children:p.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:s.maxWorkers,onChange:m=>l({...s,maxWorkers:m.target.value})})}),p.jsx(ur,{label:e("newProject.ackTimeout"),hint:e("newProject.ackTimeoutHint"),children:p.jsx("input",{type:"number",min:"1",max:"30",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:s.ackTimeoutMin??"5",onChange:m=>l({...s,ackTimeoutMin:m.target.value})})})]}),p.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[p.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[p.jsx("input",{type:"checkbox",checked:s.enableGit??!0,onChange:m=>l({...s,enableGit:m.target.checked}),className:"w-4 h-4 cursor-pointer"}),p.jsx("span",{className:"text-sm font-bold",children:e("newProject.enableGit")})]}),p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:e("newProject.enableGitHint")}),s.enableGit!==!1&&p.jsxs("div",{className:"flex flex-col gap-4 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[p.jsx(ur,{label:e("newProject.mergeBranch"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:s.mergeBranch??"main",onChange:m=>l({...s,mergeBranch:m.target.value})})}),p.jsx(ur,{label:e("newProject.remotePath"),hint:e("newProject.remotePathHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"user/repo",value:s.gitlabProject??"",onChange:m=>l({...s,gitlabProject:m.target.value})})}),s.gitlabProject&&p.jsx(ur,{label:e("newProject.gitlabId"),hint:e("newProject.gitlabIdHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"42",value:s.gitlabProjectId??"",onChange:m=>l({...s,gitlabProjectId:m.target.value})})})]})]}),p.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[p.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[p.jsx("input",{type:"checkbox",checked:s.enableWiki===!0,onChange:m=>l({...s,enableWiki:m.target.checked}),className:"w-4 h-4 cursor-pointer"}),p.jsx("span",{className:"text-sm font-bold",children:e("newProject.enableWiki")})]}),p.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[e("newProject.enableWikiHintPrefix"),p.jsx("code",{className:"font-mono",children:"wiki/"}),e("newProject.enableWikiHintMid"),p.jsx("code",{className:"font-mono",children:"sps wiki init"}),e("newProject.enableWikiHintSuffix")]})]}),p.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:e("newProject.notifications")}),p.jsx(ur,{label:e("newProject.matrixRoom"),hint:e("newProject.matrixRoomHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"!abc:matrix.example.com",value:s.matrixRoomId??"",onChange:m=>l({...s,matrixRoomId:m.target.value})})})]}),p.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[p.jsx("button",{type:"button",className:"nb-btn",onClick:()=>t("/projects"),disabled:f.isPending,children:e("newProject.cancel")}),p.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!b,"aria-label":e("newProject.createAria"),children:f.isPending?p.jsxs(p.Fragment,{children:[p.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}),e("newProject.creating")]}):p.jsxs(p.Fragment,{children:[p.jsx(Pi,{size:14,strokeWidth:3}),e("newProject.create")]})})]})]})}),c&&p.jsx(wg,{title:e("newProject.pickerTitle"),initialPath:s.projectDir.trim()||void 0,onCancel:()=>d(!1),onSelect:m=>{l({...s,projectDir:m}),d(!1)}})]})}function ur({label:e,hint:t,children:n}){return p.jsxs("label",{className:"flex flex-col gap-1.5",children:[p.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const Eg=Symbol.for("yaml.alias"),Bm=Symbol.for("yaml.document"),Nr=Symbol.for("yaml.map"),fE=Symbol.for("yaml.pair"),ia=Symbol.for("yaml.scalar"),Gl=Symbol.for("yaml.seq"),Ai=Symbol.for("yaml.node.type"),Tr=e=>!!e&&typeof e=="object"&&e[Ai]===Eg,ys=e=>!!e&&typeof e=="object"&&e[Ai]===Bm,Vl=e=>!!e&&typeof e=="object"&&e[Ai]===Nr,Dt=e=>!!e&&typeof e=="object"&&e[Ai]===fE,Nt=e=>!!e&&typeof e=="object"&&e[Ai]===ia,Ql=e=>!!e&&typeof e=="object"&&e[Ai]===Gl;function zt(e){if(e&&typeof e=="object")switch(e[Ai]){case Nr:case Gl:return!0}return!1}function Ut(e){if(e&&typeof e=="object")switch(e[Ai]){case Eg:case Nr:case ia:case Gl:return!0}return!1}const hE=e=>(Nt(e)||zt(e))&&!!e.anchor,Kn=Symbol("break visit"),pE=Symbol("skip children"),na=Symbol("remove node");function xs(e,t){const n=mE(t);ys(e)?yl(null,e.contents,n,Object.freeze([e]))===na&&(e.contents=null):yl(null,e,n,Object.freeze([]))}xs.BREAK=Kn;xs.SKIP=pE;xs.REMOVE=na;function yl(e,t,n,a){const s=gE(e,t,n,a);if(Ut(s)||Dt(s))return bE(e,a,s),yl(e,s,n,a);if(typeof s!="symbol"){if(zt(t)){a=Object.freeze(a.concat(t));for(let l=0;l<t.items.length;++l){const c=yl(l,t.items[l],n,a);if(typeof c=="number")l=c-1;else{if(c===Kn)return Kn;c===na&&(t.items.splice(l,1),l-=1)}}}else if(Dt(t)){a=Object.freeze(a.concat(t));const l=yl("key",t.key,n,a);if(l===Kn)return Kn;l===na&&(t.key=null);const c=yl("value",t.value,n,a);if(c===Kn)return Kn;c===na&&(t.value=null)}}return s}async function af(e,t){const n=mE(t);ys(e)?await xl(null,e.contents,n,Object.freeze([e]))===na&&(e.contents=null):await xl(null,e,n,Object.freeze([]))}af.BREAK=Kn;af.SKIP=pE;af.REMOVE=na;async function xl(e,t,n,a){const s=await gE(e,t,n,a);if(Ut(s)||Dt(s))return bE(e,a,s),xl(e,s,n,a);if(typeof s!="symbol"){if(zt(t)){a=Object.freeze(a.concat(t));for(let l=0;l<t.items.length;++l){const c=await xl(l,t.items[l],n,a);if(typeof c=="number")l=c-1;else{if(c===Kn)return Kn;c===na&&(t.items.splice(l,1),l-=1)}}}else if(Dt(t)){a=Object.freeze(a.concat(t));const l=await xl("key",t.key,n,a);if(l===Kn)return Kn;l===na&&(t.key=null);const c=await xl("value",t.value,n,a);if(c===Kn)return Kn;c===na&&(t.value=null)}}return s}function mE(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 gE(e,t,n,a){var s,l,c,d,f;if(typeof n=="function")return n(e,t,a);if(Vl(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Ql(t))return(l=n.Seq)==null?void 0:l.call(n,e,t,a);if(Dt(t))return(c=n.Pair)==null?void 0:c.call(n,e,t,a);if(Nt(t))return(d=n.Scalar)==null?void 0:d.call(n,e,t,a);if(Tr(t))return(f=n.Alias)==null?void 0:f.call(n,e,t,a)}function bE(e,t,n){const a=t[t.length-1];if(zt(a))a.items[e]=n;else if(Dt(a))e==="key"?a.key=n:a.value=n;else if(ys(a))a.contents=n;else{const s=Tr(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const II={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},zI=e=>e.replace(/[!,[\]{}]/g,t=>II[t]);class On{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},On.defaultYaml,t),this.tags=Object.assign({},On.defaultTags,n)}clone(){const t=new On(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new On(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:On.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},On.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:On.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},On.defaultTags),this.atNextDocument=!1);const a=t.trim().split(/[ \t]+/),s=a.shift();switch(s){case"%TAG":{if(a.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;const[l,c]=a;return this.tags[l]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[l]=a;if(l==="1.1"||l==="1.2")return this.yaml.version=l,!0;{const c=/^\d+\.\d+$/.test(l);return n(6,`Unsupported YAML version ${l}`,c),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const c=t.slice(2,-1);return c==="!"||c==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),c)}const[,a,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const l=this.tags[a];if(l)try{return l+decodeURIComponent(s)}catch(c){return n(String(c)),null}return a==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,a]of Object.entries(this.tags))if(t.startsWith(a))return n+zI(t.substring(a.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],a=Object.entries(this.tags);let s;if(t&&a.length>0&&Ut(t.contents)){const l={};xs(t.contents,(c,d)=>{Ut(d)&&d.tag&&(l[d.tag]=!0)}),s=Object.keys(l)}else s=[];for(const[l,c]of a)l==="!!"&&c==="tag:yaml.org,2002:"||(!t||s.some(d=>d.startsWith(c)))&&n.push(`%TAG ${l} ${c}`);return n.join(`
382
+ `)}}On.defaultYaml={explicit:!1,version:"1.2"};On.defaultTags={"!!":"tag:yaml.org,2002:"};function yE(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function xE(e){const t=new Set;return xs(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function vE(e,t){for(let n=1;;++n){const a=`${e}${n}`;if(!t.has(a))return a}}function BI(e,t){const n=[],a=new Map;let s=null;return{onAnchor:l=>{n.push(l),s??(s=xE(e));const c=vE(t,s);return s.add(c),c},setAnchors:()=>{for(const l of n){const c=a.get(l);if(typeof c=="object"&&c.anchor&&(Nt(c.node)||zt(c.node)))c.node.anchor=c.anchor;else{const d=new Error("Failed to resolve repeated object (this should not happen)");throw d.source=l,d}}},sourceObjects:a}}function vl(e,t,n,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let s=0,l=a.length;s<l;++s){const c=a[s],d=vl(e,a,String(s),c);d===void 0?delete a[s]:d!==c&&(a[s]=d)}else if(a instanceof Map)for(const s of Array.from(a.keys())){const l=a.get(s),c=vl(e,a,s,l);c===void 0?a.delete(s):c!==l&&a.set(s,c)}else if(a instanceof Set)for(const s of Array.from(a)){const l=vl(e,a,s,s);l===void 0?a.delete(s):l!==s&&(a.delete(s),a.add(l))}else for(const[s,l]of Object.entries(a)){const c=vl(e,a,s,l);c===void 0?delete a[s]:c!==l&&(a[s]=c)}return e.call(t,n,a)}function Ni(e,t,n){if(Array.isArray(e))return e.map((a,s)=>Ni(a,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!hE(e))return e.toJSON(t,n);const a={aliasCount:0,count:1,res:void 0};n.anchors.set(e,a),n.onCreate=l=>{a.res=l,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class Sg{constructor(t){Object.defineProperty(this,Ai,{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:n,maxAliasCount:a,onAnchor:s,reviver:l}={}){if(!ys(t))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},d=Ni(this,"",c);if(typeof s=="function")for(const{count:f,res:h}of c.anchors.values())s(h,f);return typeof l=="function"?vl(l,{"":d},"",d):d}}class rf extends Sg{constructor(t){super(Eg),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let a;n!=null&&n.aliasResolveCache?a=n.aliasResolveCache:(a=[],xs(t,{Node:(l,c)=>{(Tr(c)||hE(c))&&a.push(c)}}),n&&(n.aliasResolveCache=a));let s;for(const l of a){if(l===this)break;l.anchor===this.source&&(s=l)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:a,doc:s,maxAliasCount:l}=n,c=this.resolve(s,n);if(!c){const f=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(f)}let d=a.get(c);if(d||(Ni(c,null,n),d=a.get(c)),(d==null?void 0:d.res)===void 0){const f="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(f)}if(l>=0&&(d.count+=1,d.aliasCount===0&&(d.aliasCount=Nd(s,c,a)),d.count*d.aliasCount>l)){const f="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(f)}return d.res}toString(t,n,a){const s=`*${this.source}`;if(t){if(yE(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(l)}if(t.implicitKey)return`${s} `}return s}}function Nd(e,t,n){if(Tr(t)){const a=t.resolve(e),s=n&&a&&n.get(a);return s?s.count*s.aliasCount:0}else if(zt(t)){let a=0;for(const s of t.items){const l=Nd(e,s,n);l>a&&(a=l)}return a}else if(Dt(t)){const a=Nd(e,t.key,n),s=Nd(e,t.value,n);return Math.max(a,s)}return 1}const wE=e=>!e||typeof e!="function"&&typeof e!="object";class Pe extends Sg{constructor(t){super(ia),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:Ni(this.value,t,n)}toString(){return String(this.value)}}Pe.BLOCK_FOLDED="BLOCK_FOLDED";Pe.BLOCK_LITERAL="BLOCK_LITERAL";Pe.PLAIN="PLAIN";Pe.QUOTE_DOUBLE="QUOTE_DOUBLE";Pe.QUOTE_SINGLE="QUOTE_SINGLE";const UI="tag:yaml.org,2002:";function PI(e,t,n){if(t){const a=n.filter(l=>l.tag===t),s=a.find(l=>!l.format)??a[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(a=>{var s;return((s=a.identify)==null?void 0:s.call(a,e))&&!a.format})}function vc(e,t,n){var m,x,v;if(ys(e)&&(e=e.contents),Ut(e))return e;if(Dt(e)){const E=(x=(m=n.schema[Nr]).createNode)==null?void 0:x.call(m,n.schema,null,n);return E.items.push(e),E}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:a,onAnchor:s,onTagObj:l,schema:c,sourceObjects:d}=n;let f;if(a&&e&&typeof e=="object"){if(f=d.get(e),f)return f.anchor??(f.anchor=s(e)),new rf(f.anchor);f={anchor:null,node:null},d.set(e,f)}t!=null&&t.startsWith("!!")&&(t=UI+t.slice(2));let h=PI(e,t,c.tags);if(!h){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const E=new Pe(e);return f&&(f.node=E),E}h=e instanceof Map?c[Nr]:Symbol.iterator in Object(e)?c[Gl]:c[Nr]}l&&(l(h),delete n.onTagObj);const b=h!=null&&h.createNode?h.createNode(n.schema,e,n):typeof((v=h==null?void 0:h.nodeClass)==null?void 0:v.from)=="function"?h.nodeClass.from(n.schema,e,n):new Pe(e);return t?b.tag=t:h.default||(b.tag=h.tag),f&&(f.node=b),b}function Ud(e,t,n){let a=n;for(let s=t.length-1;s>=0;--s){const l=t[s];if(typeof l=="number"&&Number.isInteger(l)&&l>=0){const c=[];c[l]=a,a=c}else a=new Map([[l,a]])}return vc(a,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const lc=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class EE extends Sg{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(a=>Ut(a)||Dt(a)?a.clone(t):a),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(lc(t))this.add(n);else{const[a,...s]=t,l=this.get(a,!0);if(zt(l))l.addIn(s,n);else if(l===void 0&&this.schema)this.set(a,Ud(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}deleteIn(t){const[n,...a]=t;if(a.length===0)return this.delete(n);const s=this.get(n,!0);if(zt(s))return s.deleteIn(a);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${a}`)}getIn(t,n){const[a,...s]=t,l=this.get(a,!0);return s.length===0?!n&&Nt(l)?l.value:l:zt(l)?l.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Dt(n))return!1;const a=n.value;return a==null||t&&Nt(a)&&a.value==null&&!a.commentBefore&&!a.comment&&!a.tag})}hasIn(t){const[n,...a]=t;if(a.length===0)return this.has(n);const s=this.get(n,!0);return zt(s)?s.hasIn(a):!1}setIn(t,n){const[a,...s]=t;if(s.length===0)this.set(a,n);else{const l=this.get(a,!0);if(zt(l))l.setIn(s,n);else if(l===void 0&&this.schema)this.set(a,Ud(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}}const FI=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Ra(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const ts=(e,t,n)=>e.endsWith(`
383
+ `)?Ra(n,t):n.includes(`
384
+ `)?`
385
+ `+Ra(n,t):(e.endsWith(" ")?"":" ")+n,SE="flow",Um="block",_d="quoted";function sf(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:l=20,onFold:c,onOverflow:d}={}){if(!s||s<0)return e;s<l&&(l=0);const f=Math.max(1+l,1+s-t.length);if(e.length<=f)return e;const h=[],b={};let m=s-t.length;typeof a=="number"&&(a>s-Math.max(2,l)?h.push(0):m=s-a);let x,v,E=!1,w=-1,k=-1,N=-1;n===Um&&(w=L0(e,w,t.length),w!==-1&&(m=w+f));for(let A;A=e[w+=1];){if(n===_d&&A==="\\"){switch(k=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}N=w}if(A===`
386
+ `)n===Um&&(w=L0(e,w,t.length)),m=w+t.length+f,x=void 0;else{if(A===" "&&v&&v!==" "&&v!==`
387
+ `&&v!==" "){const T=e[w+1];T&&T!==" "&&T!==`
388
+ `&&T!==" "&&(x=w)}if(w>=m)if(x)h.push(x),m=x+f,x=void 0;else if(n===_d){for(;v===" "||v===" ";)v=A,A=e[w+=1],E=!0;const T=w>N+1?w-2:k-1;if(b[T])return e;h.push(T),b[T]=!0,m=T+f,x=void 0}else E=!0}v=A}if(E&&d&&d(),h.length===0)return e;c&&c();let C=e.slice(0,h[0]);for(let A=0;A<h.length;++A){const T=h[A],L=h[A+1]||e.length;T===0?C=`
389
+ ${t}${e.slice(0,L)}`:(n===_d&&b[T]&&(C+=`${e[T]}\\`),C+=`
390
+ ${t}${e.slice(T+1,L)}`)}return C}function L0(e,t,n){let a=t,s=t+1,l=e[s];for(;l===" "||l===" ";)if(t<s+n)l=e[++t];else{do l=e[++t];while(l&&l!==`
391
+ `);a=t,s=t+1,l=e[s]}return a}const lf=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),of=e=>/^(%|---|\.\.\.)/m.test(e);function $I(e,t,n){if(!t||t<0)return!1;const a=t-n,s=e.length;if(s<=a)return!1;for(let l=0,c=0;l<s;++l)if(e[l]===`
392
+ `){if(l-c>a)return!0;if(c=l+1,s-c<=a)return!1}return!0}function cc(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:a}=t,s=t.options.doubleQuotedMinMultiLineLength,l=t.indent||(of(e)?" ":"");let c="",d=0;for(let f=0,h=n[f];h;h=n[++f])if(h===" "&&n[f+1]==="\\"&&n[f+2]==="n"&&(c+=n.slice(d,f)+"\\ ",f+=1,d=f,h="\\"),h==="\\")switch(n[f+1]){case"u":{c+=n.slice(d,f);const b=n.substr(f+2,4);switch(b){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:b.substr(0,2)==="00"?c+="\\x"+b.substr(2):c+=n.substr(f,6)}f+=5,d=f+1}break;case"n":if(a||n[f+2]==='"'||n.length<s)f+=1;else{for(c+=n.slice(d,f)+`
393
+
394
+ `;n[f+2]==="\\"&&n[f+3]==="n"&&n[f+4]!=='"';)c+=`
395
+ `,f+=2;c+=l,n[f+2]===" "&&(c+="\\"),f+=1,d=f+1}break;default:f+=1}return c=d?c+n.slice(d):n,a?c:sf(c,l,_d,lf(t,!1))}function Pm(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
396
+ `)||/[ \t]\n|\n[ \t]/.test(e))return cc(e,t);const n=t.indent||(of(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
397
+ ${n}`)+"'";return t.implicitKey?a:sf(a,n,SE,lf(t,!1))}function wl(e,t){const{singleQuote:n}=t.options;let a;if(n===!1)a=cc;else{const s=e.includes('"'),l=e.includes("'");s&&!l?a=Pm:l&&!s?a=cc:a=n?Pm:cc}return a(e,t)}let Fm;try{Fm=new RegExp(`(^|(?<!
398
+ ))
399
+ +(?!
400
+ |$)`,"g")}catch{Fm=/\n+(?!\n|$)/g}function Cd({comment:e,type:t,value:n},a,s,l){const{blockQuote:c,commentString:d,lineWidth:f}=a.options;if(!c||/\n[\t ]+$/.test(n))return wl(n,a);const h=a.indent||(a.forceBlockIndent||of(n)?" ":""),b=c==="literal"?!0:c==="folded"||t===Pe.BLOCK_FOLDED?!1:t===Pe.BLOCK_LITERAL?!0:!$I(n,f,h.length);if(!n)return b?`|
401
+ `:`>
402
+ `;let m,x;for(x=n.length;x>0;--x){const L=n[x-1];if(L!==`
403
+ `&&L!==" "&&L!==" ")break}let v=n.substring(x);const E=v.indexOf(`
404
+ `);E===-1?m="-":n===v||E!==v.length-1?(m="+",l&&l()):m="",v&&(n=n.slice(0,-v.length),v[v.length-1]===`
405
+ `&&(v=v.slice(0,-1)),v=v.replace(Fm,`$&${h}`));let w=!1,k,N=-1;for(k=0;k<n.length;++k){const L=n[k];if(L===" ")w=!0;else if(L===`
406
+ `)N=k;else break}let C=n.substring(0,N<k?N+1:k);C&&(n=n.substring(C.length),C=C.replace(/\n+/g,`$&${h}`));let T=(w?h?"2":"1":"")+m;if(e&&(T+=" "+d(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!b){const L=n.replace(/\n+/g,`
407
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let M=!1;const U=lf(a,!0);c!=="folded"&&t!==Pe.BLOCK_FOLDED&&(U.onOverflow=()=>{M=!0});const $=sf(`${C}${L}${v}`,h,Um,U);if(!M)return`>${T}
408
+ ${h}${$}`}return n=n.replace(/\n+/g,`$&${h}`),`|${T}
409
+ ${h}${C}${n}${v}`}function HI(e,t,n,a){const{type:s,value:l}=e,{actualString:c,implicitKey:d,indent:f,indentStep:h,inFlow:b}=t;if(d&&l.includes(`
410
+ `)||b&&/[[\]{},]/.test(l))return wl(l,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return d||b||!l.includes(`
411
+ `)?wl(l,t):Cd(e,t,n,a);if(!d&&!b&&s!==Pe.PLAIN&&l.includes(`
412
+ `))return Cd(e,t,n,a);if(of(l)){if(f==="")return t.forceBlockIndent=!0,Cd(e,t,n,a);if(d&&f===h)return wl(l,t)}const m=l.replace(/\n+/g,`$&
413
+ ${f}`);if(c){const x=w=>{var k;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((k=w.test)==null?void 0:k.test(m))},{compat:v,tags:E}=t.doc.schema;if(E.some(x)||v!=null&&v.some(x))return wl(l,t)}return d?m:sf(m,f,SE,lf(t,!1))}function Dc(e,t,n,a){const{implicitKey:s,inFlow:l}=t,c=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:d}=e;d!==Pe.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(d=Pe.QUOTE_DOUBLE);const f=b=>{switch(b){case Pe.BLOCK_FOLDED:case Pe.BLOCK_LITERAL:return s||l?wl(c.value,t):Cd(c,t,n,a);case Pe.QUOTE_DOUBLE:return cc(c.value,t);case Pe.QUOTE_SINGLE:return Pm(c.value,t);case Pe.PLAIN:return HI(c,t,n,a);default:return null}};let h=f(d);if(h===null){const{defaultKeyType:b,defaultStringType:m}=t.options,x=s&&b||m;if(h=f(x),h===null)throw new Error(`Unsupported default string type ${x}`)}return h}function kE(e,t){const n=Object.assign({blockQuote:!0,commentString:FI,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 a;switch(n.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:a,options:n}}function qI(e,t){var s;if(t.tag){const l=e.filter(c=>c.tag===t.tag);if(l.length>0)return l.find(c=>c.format===t.format)??l[0]}let n,a;if(Nt(t)){a=t.value;let l=e.filter(c=>{var d;return(d=c.identify)==null?void 0:d.call(c,a)});if(l.length>1){const c=l.filter(d=>d.test);c.length>0&&(l=c)}n=l.find(c=>c.format===t.format)??l.find(c=>!c.format)}else a=t,n=e.find(l=>l.nodeClass&&a instanceof l.nodeClass);if(!n){const l=((s=a==null?void 0:a.constructor)==null?void 0:s.name)??(a===null?"null":typeof a);throw new Error(`Tag not resolved for ${l} value`)}return n}function KI(e,t,{anchors:n,doc:a}){if(!a.directives)return"";const s=[],l=(Nt(e)||zt(e))&&e.anchor;l&&yE(l)&&(n.add(l),s.push(`&${l}`));const c=e.tag??(t.default?null:t.tag);return c&&s.push(a.directives.tagString(c)),s.join(" ")}function Bl(e,t,n,a){var f;if(Dt(e))return e.toString(t,n,a);if(Tr(e)){if(t.doc.directives)return e.toString(t);if((f=t.resolvedAliases)!=null&&f.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 s;const l=Ut(e)?e:t.doc.createNode(e,{onTagObj:h=>s=h});s??(s=qI(t.doc.schema.tags,l));const c=KI(l,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const d=typeof s.stringify=="function"?s.stringify(l,t,n,a):Nt(l)?Dc(l,t,n,a):l.toString(t,n,a);return c?Nt(l)||d[0]==="{"||d[0]==="["?`${c} ${d}`:`${c}
414
+ ${t.indent}${d}`:d}function GI({key:e,value:t},n,a,s){const{allNullValues:l,doc:c,indent:d,indentStep:f,options:{commentString:h,indentSeq:b,simpleKeys:m}}=n;let x=Ut(e)&&e.comment||null;if(m){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(zt(e)||!Ut(e)&&typeof e=="object"){const U="With simple keys, collection cannot be used as a key value";throw new Error(U)}}let v=!m&&(!e||x&&t==null&&!n.inFlow||zt(e)||(Nt(e)?e.type===Pe.BLOCK_FOLDED||e.type===Pe.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!v&&(m||!l),indent:d+f});let E=!1,w=!1,k=Bl(e,n,()=>E=!0,()=>w=!0);if(!v&&!n.inFlow&&k.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(n.inFlow){if(l||t==null)return E&&a&&a(),k===""?"?":v?`? ${k}`:k}else if(l&&!m||t==null&&v)return k=`? ${k}`,x&&!E?k+=ts(k,n.indent,h(x)):w&&s&&s(),k;E&&(x=null),v?(x&&(k+=ts(k,n.indent,h(x))),k=`? ${k}
415
+ ${d}:`):(k=`${k}:`,x&&(k+=ts(k,n.indent,h(x))));let N,C,A;Ut(t)?(N=!!t.spaceBefore,C=t.commentBefore,A=t.comment):(N=!1,C=null,A=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!v&&!x&&Nt(t)&&(n.indentAtStart=k.length+1),w=!1,!b&&f.length>=2&&!n.inFlow&&!v&&Ql(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let T=!1;const L=Bl(t,n,()=>T=!0,()=>w=!0);let M=" ";if(x||N||C){if(M=N?`
416
+ `:"",C){const U=h(C);M+=`
417
+ ${Ra(U,n.indent)}`}L===""&&!n.inFlow?M===`
418
+ `&&A&&(M=`
419
+
420
+ `):M+=`
421
+ ${n.indent}`}else if(!v&&zt(t)){const U=L[0],$=L.indexOf(`
422
+ `),te=$!==-1,P=n.inFlow??t.flow??t.items.length===0;if(te||!P){let Q=!1;if(te&&(U==="&"||U==="!")){let J=L.indexOf(" ");U==="&"&&J!==-1&&J<$&&L[J+1]==="!"&&(J=L.indexOf(" ",J+1)),(J===-1||$<J)&&(Q=!0)}Q||(M=`
423
+ ${n.indent}`)}}else(L===""||L[0]===`
424
+ `)&&(M="");return k+=M+L,n.inFlow?T&&a&&a():A&&!T?k+=ts(k,n.indent,h(A)):w&&s&&s(),k}function NE(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const ld="<<",ja={identify:e=>e===ld||typeof e=="symbol"&&e.description===ld,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Pe(Symbol(ld)),{addToJSMap:_E}),stringify:()=>ld},VI=(e,t)=>(ja.identify(t)||Nt(t)&&(!t.type||t.type===Pe.PLAIN)&&ja.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===ja.tag&&n.default));function _E(e,t,n){if(n=e&&Tr(n)?n.resolve(e.doc):n,Ql(n))for(const a of n.items)Bp(e,t,a);else if(Array.isArray(n))for(const a of n)Bp(e,t,a);else Bp(e,t,n)}function Bp(e,t,n){const a=e&&Tr(n)?n.resolve(e.doc):n;if(!Vl(a))throw new Error("Merge sources must be maps or map aliases");const s=a.toJSON(null,e,Map);for(const[l,c]of s)t instanceof Map?t.has(l)||t.set(l,c):t instanceof Set?t.add(l):Object.prototype.hasOwnProperty.call(t,l)||Object.defineProperty(t,l,{value:c,writable:!0,enumerable:!0,configurable:!0});return t}function CE(e,t,{key:n,value:a}){if(Ut(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(VI(e,n))_E(e,t,a);else{const s=Ni(n,"",e);if(t instanceof Map)t.set(s,Ni(a,s,e));else if(t instanceof Set)t.add(s);else{const l=QI(n,s,e),c=Ni(a,l,e);l in t?Object.defineProperty(t,l,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[l]=c}}return t}function QI(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Ut(e)&&(n!=null&&n.doc)){const a=kE(n.doc,{});a.anchors=new Set;for(const l of n.anchors.keys())a.anchors.add(l.anchor);a.inFlow=!0,a.inStringifyKey=!0;const s=e.toString(a);if(!n.mapKeyWarned){let l=JSON.stringify(s);l.length>40&&(l=l.substring(0,36)+'..."'),NE(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function kg(e,t,n){const a=vc(e,void 0,n),s=vc(t,void 0,n);return new wn(a,s)}class wn{constructor(t,n=null){Object.defineProperty(this,Ai,{value:fE}),this.key=t,this.value=n}clone(t){let{key:n,value:a}=this;return Ut(n)&&(n=n.clone(t)),Ut(a)&&(a=a.clone(t)),new wn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return CE(n,a,this)}toString(t,n,a){return t!=null&&t.doc?GI(this,t,n,a):JSON.stringify(this)}}function AE(e,t,n){return(t.inFlow??e.flow?WI:YI)(e,t,n)}function YI({comment:e,items:t},n,{blockItemPrefix:a,flowChars:s,itemIndent:l,onChompKeep:c,onComment:d}){const{indent:f,options:{commentString:h}}=n,b=Object.assign({},n,{indent:l,type:null});let m=!1;const x=[];for(let E=0;E<t.length;++E){const w=t[E];let k=null;if(Ut(w))!m&&w.spaceBefore&&x.push(""),Pd(n,x,w.commentBefore,m),w.comment&&(k=w.comment);else if(Dt(w)){const C=Ut(w.key)?w.key:null;C&&(!m&&C.spaceBefore&&x.push(""),Pd(n,x,C.commentBefore,m))}m=!1;let N=Bl(w,b,()=>k=null,()=>m=!0);k&&(N+=ts(N,l,h(k))),m&&k&&(m=!1),x.push(a+N)}let v;if(x.length===0)v=s.start+s.end;else{v=x[0];for(let E=1;E<x.length;++E){const w=x[E];v+=w?`
425
+ ${f}${w}`:`
426
+ `}}return e?(v+=`
427
+ `+Ra(h(e),f),d&&d()):m&&c&&c(),v}function WI({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:l,flowCollectionPadding:c,options:{commentString:d}}=t;a+=l;const f=Object.assign({},t,{indent:a,inFlow:!0,type:null});let h=!1,b=0;const m=[];for(let E=0;E<e.length;++E){const w=e[E];let k=null;if(Ut(w))w.spaceBefore&&m.push(""),Pd(t,m,w.commentBefore,!1),w.comment&&(k=w.comment);else if(Dt(w)){const C=Ut(w.key)?w.key:null;C&&(C.spaceBefore&&m.push(""),Pd(t,m,C.commentBefore,!1),C.comment&&(h=!0));const A=Ut(w.value)?w.value:null;A?(A.comment&&(k=A.comment),A.commentBefore&&(h=!0)):w.value==null&&(C!=null&&C.comment)&&(k=C.comment)}k&&(h=!0);let N=Bl(w,f,()=>k=null);h||(h=m.length>b||N.includes(`
428
+ `)),E<e.length-1?N+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=m.reduce((C,A)=>C+A.length+2,2)+(N.length+2)>t.options.lineWidth)),h&&(N+=",")),k&&(N+=ts(N,a,d(k))),m.push(N),b=m.length}const{start:x,end:v}=n;if(m.length===0)return x+v;if(!h){const E=m.reduce((w,k)=>w+k.length+2,2);h=t.options.lineWidth>0&&E>t.options.lineWidth}if(h){let E=x;for(const w of m)E+=w?`
429
+ ${l}${s}${w}`:`
430
+ `;return`${E}
431
+ ${s}${v}`}else return`${x}${c}${m.join(" ")}${c}${v}`}function Pd({indent:e,options:{commentString:t}},n,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){const l=Ra(t(a),e);n.push(l.trimStart())}}function ns(e,t){const n=Nt(t)?t.value:t;for(const a of e)if(Dt(a)&&(a.key===t||a.key===n||Nt(a.key)&&a.key.value===n))return a}class li extends EE{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Nr,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:l}=a,c=new this(t),d=(f,h)=>{if(typeof l=="function")h=l.call(n,f,h);else if(Array.isArray(l)&&!l.includes(f))return;(h!==void 0||s)&&c.items.push(kg(f,h,a))};if(n instanceof Map)for(const[f,h]of n)d(f,h);else if(n&&typeof n=="object")for(const f of Object.keys(n))d(f,n[f]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;Dt(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new wn(t,t==null?void 0:t.value):a=new wn(t.key,t.value);const s=ns(this.items,a.key),l=(c=this.schema)==null?void 0:c.sortMapEntries;if(s){if(!n)throw new Error(`Key ${a.key} already set`);Nt(s.value)&&wE(a.value)?s.value.value=a.value:s.value=a.value}else if(l){const d=this.items.findIndex(f=>l(a,f)<0);d===-1?this.items.push(a):this.items.splice(d,0,a)}else this.items.push(a)}delete(t){const n=ns(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const a=ns(this.items,t),s=a==null?void 0:a.value;return(!n&&Nt(s)?s.value:s)??void 0}has(t){return!!ns(this.items,t)}set(t,n){this.add(new wn(t,n),!0)}toJSON(t,n,a){const s=a?new a:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const l of this.items)CE(n,s,l);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!Dt(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),AE(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const Yl={collection:"map",default:!0,nodeClass:li,tag:"tag:yaml.org,2002:map",resolve(e,t){return Vl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>li.from(e,t,n)};class _r extends EE{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Gl,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=od(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const a=od(t);if(typeof a!="number")return;const s=this.items[a];return!n&&Nt(s)?s.value:s}has(t){const n=od(t);return typeof n=="number"&&n<this.items.length}set(t,n){const a=od(t);if(typeof a!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[a];Nt(s)&&wE(n)?s.value=n:this.items[a]=n}toJSON(t,n){const a=[];n!=null&&n.onCreate&&n.onCreate(a);let s=0;for(const l of this.items)a.push(Ni(l,String(s++),n));return a}toString(t,n,a){return t?AE(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:a,onComment:n}):JSON.stringify(this)}static from(t,n,a){const{replacer:s}=a,l=new this(t);if(n&&Symbol.iterator in Object(n)){let c=0;for(let d of n){if(typeof s=="function"){const f=n instanceof Set?d:String(c++);d=s.call(n,f,d)}l.items.push(vc(d,void 0,a))}}return l}}function od(e){let t=Nt(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const Wl={collection:"seq",default:!0,nodeClass:_r,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Ql(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>_r.from(e,t,n)},cf={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,a){return t=Object.assign({actualString:!0},t),Dc(e,t,n,a)}},uf={identify:e=>e==null,createNode:()=>new Pe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Pe(null),stringify:({source:e},t)=>typeof e=="string"&&uf.test.test(e)?e:t.options.nullStr},Ng={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Pe(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Ng.test.test(e)){const a=e[0]==="t"||e[0]==="T";if(t===a)return e}return t?n.options.trueStr:n.options.falseStr}};function Fi({format:e,minFractionDigits:t,tag:n,value:a}){if(typeof a=="bigint")return String(a);const s=typeof a=="number"?a:Number(a);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let l=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(l)){let c=l.indexOf(".");c<0&&(c=l.length,l+=".");let d=t-(l.length-c-1);for(;d-- >0;)l+="0"}return l}const TE={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:Fi},OE={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():Fi(e)}},RE={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 Pe(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Fi},df=e=>typeof e=="bigint"||Number.isInteger(e),_g=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function jE(e,t,n){const{value:a}=e;return df(a)&&a>=0?n+a.toString(t):Fi(e)}const ME={identify:e=>df(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>_g(e,2,8,n),stringify:e=>jE(e,8,"0o")},DE={identify:df,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>_g(e,0,10,n),stringify:Fi},LE={identify:e=>df(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>_g(e,2,16,n),stringify:e=>jE(e,16,"0x")},XI=[Yl,Wl,cf,uf,Ng,ME,DE,LE,TE,OE,RE];function I0(e){return typeof e=="bigint"||Number.isInteger(e)}const cd=({value:e})=>JSON.stringify(e),ZI=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:cd},{identify:e=>e==null,createNode:()=>new Pe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:cd},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:cd},{identify:I0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>I0(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:cd}],JI={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},e3=[Yl,Wl].concat(ZI,JI),Cg={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(n.length);for(let s=0;s<n.length;++s)a[s]=n.charCodeAt(s);return a}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},a,s,l){if(!n)return"";const c=n;let d;if(typeof btoa=="function"){let f="";for(let h=0;h<c.length;++h)f+=String.fromCharCode(c[h]);d=btoa(f)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Pe.BLOCK_LITERAL),t!==Pe.QUOTE_DOUBLE){const f=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),h=Math.ceil(d.length/f),b=new Array(h);for(let m=0,x=0;m<h;++m,x+=f)b[m]=d.substr(x,f);d=b.join(t===Pe.BLOCK_LITERAL?`
432
+ `:" ")}return Dc({comment:e,type:t,value:d},a,s,l)}};function IE(e,t){if(Ql(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!Dt(a)){if(Vl(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const s=a.items[0]||new wn(new Pe(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
433
+ ${s.key.commentBefore}`:a.commentBefore),a.comment){const l=s.value??s.key;l.comment=l.comment?`${a.comment}
434
+ ${l.comment}`:a.comment}a=s}e.items[n]=Dt(a)?a:new wn(a)}}else t("Expected a sequence for this tag");return e}function zE(e,t,n){const{replacer:a}=n,s=new _r(e);s.tag="tag:yaml.org,2002:pairs";let l=0;if(t&&Symbol.iterator in Object(t))for(let c of t){typeof a=="function"&&(c=a.call(t,String(l++),c));let d,f;if(Array.isArray(c))if(c.length===2)d=c[0],f=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)d=h[0],f=c[d];else throw new TypeError(`Expected tuple with one key, not ${h.length} keys`)}else d=c;s.items.push(kg(d,f,n))}return s}const Ag={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:IE,createNode:zE};class El extends _r{constructor(){super(),this.add=li.prototype.add.bind(this),this.delete=li.prototype.delete.bind(this),this.get=li.prototype.get.bind(this),this.has=li.prototype.has.bind(this),this.set=li.prototype.set.bind(this),this.tag=El.tag}toJSON(t,n){if(!n)return super.toJSON(t);const a=new Map;n!=null&&n.onCreate&&n.onCreate(a);for(const s of this.items){let l,c;if(Dt(s)?(l=Ni(s.key,"",n),c=Ni(s.value,l,n)):l=Ni(s,"",n),a.has(l))throw new Error("Ordered maps must not include duplicate keys");a.set(l,c)}return a}static from(t,n,a){const s=zE(t,n,a),l=new this;return l.items=s.items,l}}El.tag="tag:yaml.org,2002:omap";const Tg={collection:"seq",identify:e=>e instanceof Map,nodeClass:El,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=IE(e,t),a=[];for(const{key:s}of n.items)Nt(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new El,n)},createNode:(e,t,n)=>El.from(e,t,n)};function BE({value:e,source:t},n){return t&&(e?UE:PE).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const UE={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 Pe(!0),stringify:BE},PE={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 Pe(!1),stringify:BE},t3={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:Fi},n3={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():Fi(e)}},i3={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 Pe(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const a=e.substring(n+1).replace(/_/g,"");a[a.length-1]==="0"&&(t.minFractionDigits=a.length)}return t},stringify:Fi},Lc=e=>typeof e=="bigint"||Number.isInteger(e);function ff(e,t,n,{intAsBigInt:a}){const s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),a){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const c=BigInt(e);return s==="-"?BigInt(-1)*c:c}const l=parseInt(e,n);return s==="-"?-1*l:l}function Og(e,t,n){const{value:a}=e;if(Lc(a)){const s=a.toString(t);return a<0?"-"+n+s.substr(1):n+s}return Fi(e)}const a3={identify:Lc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>ff(e,2,2,n),stringify:e=>Og(e,2,"0b")},r3={identify:Lc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>ff(e,1,8,n),stringify:e=>Og(e,8,"0")},s3={identify:Lc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>ff(e,0,10,n),stringify:Fi},l3={identify:Lc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>ff(e,2,16,n),stringify:e=>Og(e,16,"0x")};class Sl extends li{constructor(t){super(t),this.tag=Sl.tag}add(t){let n;Dt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new wn(t.key,null):n=new wn(t,null),ns(this.items,n.key)||this.items.push(n)}get(t,n){const a=ns(this.items,t);return!n&&Dt(a)?Nt(a.key)?a.key.value:a.key:a}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const a=ns(this.items,t);a&&!n?this.items.splice(this.items.indexOf(a),1):!a&&n&&this.items.push(new wn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,a){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,a);throw new Error("Set items must all have null values")}static from(t,n,a){const{replacer:s}=a,l=new this(t);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof s=="function"&&(c=s.call(n,c,c)),l.items.push(kg(c,null,a));return l}}Sl.tag="tag:yaml.org,2002:set";const Rg={collection:"map",identify:e=>e instanceof Set,nodeClass:Sl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>Sl.from(e,t,n),resolve(e,t){if(Vl(e)){if(e.hasAllNullValues(!0))return Object.assign(new Sl,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function jg(e,t){const n=e[0],a=n==="-"||n==="+"?e.substring(1):e,s=c=>t?BigInt(c):Number(c),l=a.replace(/_/g,"").split(":").reduce((c,d)=>c*s(60)+s(d),s(0));return n==="-"?s(-1)*l:l}function FE(e){let{value:t}=e,n=c=>c;if(typeof t=="bigint")n=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return Fi(e);let a="";t<0&&(a="-",t*=n(-1));const s=n(60),l=[t%s];return t<60?l.unshift(0):(t=(t-l[0])/s,l.unshift(t%s),t>=60&&(t=(t-l[0])/s,l.unshift(t))),a+l.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const $E={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:n})=>jg(e,n),stringify:FE},HE={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=>jg(e,!1),stringify:FE},hf={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(hf.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,a,s,l,c,d]=t.map(Number),f=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(n,a-1,s,l||0,c||0,d||0,f);const b=t[8];if(b&&b!=="Z"){let m=jg(b,!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$/,""))??""},z0=[Yl,Wl,cf,uf,UE,PE,a3,r3,s3,l3,t3,n3,i3,Cg,ja,Tg,Ag,Rg,$E,HE,hf],B0=new Map([["core",XI],["failsafe",[Yl,Wl,cf]],["json",e3],["yaml11",z0],["yaml-1.1",z0]]),U0={binary:Cg,bool:Ng,float:RE,floatExp:OE,floatNaN:TE,floatTime:HE,int:DE,intHex:LE,intOct:ME,intTime:$E,map:Yl,merge:ja,null:uf,omap:Tg,pairs:Ag,seq:Wl,set:Rg,timestamp:hf},o3={"tag:yaml.org,2002:binary":Cg,"tag:yaml.org,2002:merge":ja,"tag:yaml.org,2002:omap":Tg,"tag:yaml.org,2002:pairs":Ag,"tag:yaml.org,2002:set":Rg,"tag:yaml.org,2002:timestamp":hf};function Up(e,t,n){const a=B0.get(t);if(a&&!e)return n&&!a.includes(ja)?a.concat(ja):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{const l=Array.from(B0.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${l} or define customTags array`)}if(Array.isArray(e))for(const l of e)s=s.concat(l);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(ja)),s.reduce((l,c)=>{const d=typeof c=="string"?U0[c]:c;if(!d){const f=JSON.stringify(c),h=Object.keys(U0).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${f}; use one of ${h}`)}return l.includes(d)||l.push(d),l},[])}const c3=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let qE=class KE{constructor({compat:t,customTags:n,merge:a,resolveKnownTags:s,schema:l,sortMapEntries:c,toStringDefaults:d}){this.compat=Array.isArray(t)?Up(t,"compat"):t?Up(null,t):null,this.name=typeof l=="string"&&l||"core",this.knownTags=s?o3:{},this.tags=Up(n,this.name,a),this.toStringOptions=d??null,Object.defineProperty(this,Nr,{value:Yl}),Object.defineProperty(this,ia,{value:cf}),Object.defineProperty(this,Gl,{value:Wl}),this.sortMapEntries=typeof c=="function"?c:c===!0?c3:null}clone(){const t=Object.create(KE.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function u3(e,t){var f;const n=[];let a=t.directives===!0;if(t.directives!==!1&&e.directives){const h=e.directives.toString(e);h?(n.push(h),a=!0):e.directives.docStart&&(a=!0)}a&&n.push("---");const s=kE(e,t),{commentString:l}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const h=l(e.commentBefore);n.unshift(Ra(h,""))}let c=!1,d=null;if(e.contents){if(Ut(e.contents)){if(e.contents.spaceBefore&&a&&n.push(""),e.contents.commentBefore){const m=l(e.contents.commentBefore);n.push(Ra(m,""))}s.forceBlockIndent=!!e.comment,d=e.contents.comment}const h=d?void 0:()=>c=!0;let b=Bl(e.contents,s,()=>d=null,h);d&&(b+=ts(b,"",l(d))),(b[0]==="|"||b[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${b}`:n.push(b)}else n.push(Bl(e.contents,s));if((f=e.directives)!=null&&f.docEnd)if(e.comment){const h=l(e.comment);h.includes(`
435
+ `)?(n.push("..."),n.push(Ra(h,""))):n.push(`... ${h}`)}else n.push("...");else{let h=e.comment;h&&c&&(h=h.replace(/^\n+/,"")),h&&((!c||d)&&n[n.length-1]!==""&&n.push(""),n.push(Ra(l(h),"")))}return n.join(`
436
+ `)+`
437
+ `}class Xl{constructor(t,n,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ai,{value:Bm});let s=null;typeof n=="function"||Array.isArray(n)?s=n:a===void 0&&n&&(a=n,n=void 0);const l=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=l;let{version:c}=l;a!=null&&a._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new On({version:c}),this.setSchema(c,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){const t=Object.create(Xl.prototype,{[Ai]:{value:Bm}});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=Ut(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){dl(this.contents)&&this.contents.add(t)}addIn(t,n){dl(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const a=xE(this);t.anchor=!n||a.has(n)?vE(n||"a",a):n}return new rf(t.anchor)}createNode(t,n,a){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const k=C=>typeof C=="number"||C instanceof String||C instanceof Number,N=n.filter(k).map(String);N.length>0&&(n=n.concat(N)),s=n}else a===void 0&&n&&(a=n,n=void 0);const{aliasDuplicateObjects:l,anchorPrefix:c,flow:d,keepUndefined:f,onTagObj:h,tag:b}=a??{},{onAnchor:m,setAnchors:x,sourceObjects:v}=BI(this,c||"a"),E={aliasDuplicateObjects:l??!0,keepUndefined:f??!1,onAnchor:m,onTagObj:h,replacer:s,schema:this.schema,sourceObjects:v},w=vc(t,b,E);return d&&zt(w)&&(w.flow=!0),x(),w}createPair(t,n,a={}){const s=this.createNode(t,null,a),l=this.createNode(n,null,a);return new wn(s,l)}delete(t){return dl(this.contents)?this.contents.delete(t):!1}deleteIn(t){return lc(t)?this.contents==null?!1:(this.contents=null,!0):dl(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return zt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return lc(t)?!n&&Nt(this.contents)?this.contents.value:this.contents:zt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return zt(this.contents)?this.contents.has(t):!1}hasIn(t){return lc(t)?this.contents!==void 0:zt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Ud(this.schema,[t],n):dl(this.contents)&&this.contents.set(t,n)}setIn(t,n){lc(t)?this.contents=n:this.contents==null?this.contents=Ud(this.schema,Array.from(t),n):dl(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let a;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new On({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new On({version:t}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(a)this.schema=new qE(Object.assign(a,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:a,maxAliasCount:s,onAnchor:l,reviver:c}={}){const d={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=Ni(this.contents,n??"",d);if(typeof l=="function")for(const{count:h,res:b}of d.anchors.values())l(b,h);return typeof c=="function"?vl(c,{"":f},"",f):f}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}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 n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return u3(this,t)}}function dl(e){if(zt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Mg extends Error{constructor(t,n,a,s){super(),this.name=t,this.code=a,this.message=s,this.pos=n}}class is extends Mg{constructor(t,n,a){super("YAMLParseError",t,n,a)}}class GE extends Mg{constructor(t,n,a){super("YAMLWarning",t,n,a)}}const Fd=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(d=>t.linePos(d));const{line:a,col:s}=n.linePos[0];n.message+=` at line ${a}, column ${s}`;let l=s-1,c=e.substring(t.lineStarts[a-1],t.lineStarts[a]).replace(/[\n\r]+$/,"");if(l>=60&&c.length>80){const d=Math.min(l-39,c.length-79);c="…"+c.substring(d),l-=d-1}if(c.length>80&&(c=c.substring(0,79)+"…"),a>1&&/^ *$/.test(c.substring(0,l))){let d=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);d.length>80&&(d=d.substring(0,79)+`…
438
+ `),c=d+c}if(/[^ ]/.test(c)){let d=1;const f=n.linePos[1];(f==null?void 0:f.line)===a&&f.col>s&&(d=Math.max(1,Math.min(f.col-s,80-l)));const h=" ".repeat(l)+"^".repeat(d);n.message+=`:
439
+
440
+ ${c}
441
+ ${h}
442
+ `}};function Ul(e,{flow:t,indicator:n,next:a,offset:s,onError:l,parentIndent:c,startOnNewline:d}){let f=!1,h=d,b=d,m="",x="",v=!1,E=!1,w=null,k=null,N=null,C=null,A=null,T=null,L=null;for(const $ of e)switch(E&&($.type!=="space"&&$.type!=="newline"&&$.type!=="comma"&&l($.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),w&&(h&&$.type!=="comment"&&$.type!=="newline"&&l(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),$.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&$.source.includes(" ")&&(w=$),b=!0;break;case"comment":{b||l($,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const te=$.source.substring(1)||" ";m?m+=x+te:m=te,x="",h=!1;break}case"newline":h?m?m+=$.source:(!T||n!=="seq-item-ind")&&(f=!0):x+=$.source,h=!0,v=!0,(k||N)&&(C=$),b=!0;break;case"anchor":k&&l($,"MULTIPLE_ANCHORS","A node can have at most one anchor"),$.source.endsWith(":")&&l($.offset+$.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=$,L??(L=$.offset),h=!1,b=!1,E=!0;break;case"tag":{N&&l($,"MULTIPLE_TAGS","A node can have at most one tag"),N=$,L??(L=$.offset),h=!1,b=!1,E=!0;break}case n:(k||N)&&l($,"BAD_PROP_ORDER",`Anchors and tags must be after the ${$.source} indicator`),T&&l($,"UNEXPECTED_TOKEN",`Unexpected ${$.source} in ${t??"collection"}`),T=$,h=n==="seq-item-ind"||n==="explicit-key-ind",b=!1;break;case"comma":if(t){A&&l($,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),A=$,h=!1,b=!1;break}default:l($,"UNEXPECTED_TOKEN",`Unexpected ${$.type} token`),h=!1,b=!1}const M=e[e.length-1],U=M?M.offset+M.source.length:s;return E&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&l(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(h&&w.indent<=c||(a==null?void 0:a.type)==="block-map"||(a==null?void 0:a.type)==="block-seq")&&l(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:T,spaceBefore:f,comment:m,hasNewline:v,anchor:k,tag:N,newlineAfterProp:C,end:U,start:L??U}}function wc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
443
+ `))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 n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(wc(t.key)||wc(t.value))return!0}return!1;default:return!0}}function $m(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&wc(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function VE(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(l,c)=>l===c||Nt(l)&&Nt(c)&&l.value===c.value;return t.some(l=>s(l.key,n))}const P0="All mapping items must start at the same column";function d3({composeNode:e,composeEmptyNode:t},n,a,s,l){var b;const c=(l==null?void 0:l.nodeClass)??li,d=new c(n.schema);n.atRoot&&(n.atRoot=!1);let f=a.offset,h=null;for(const m of a.items){const{start:x,key:v,sep:E,value:w}=m,k=Ul(x,{indicator:"explicit-key-ind",next:v??(E==null?void 0:E[0]),offset:f,onError:s,parentIndent:a.indent,startOnNewline:!0}),N=!k.found;if(N){if(v&&(v.type==="block-seq"?s(f,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==a.indent&&s(f,"BAD_INDENT",P0)),!k.anchor&&!k.tag&&!E){h=k.end,k.comment&&(d.comment?d.comment+=`
444
+ `+k.comment:d.comment=k.comment);continue}(k.newlineAfterProp||wc(v))&&s(v??x[x.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((b=k.found)==null?void 0:b.indent)!==a.indent&&s(f,"BAD_INDENT",P0);n.atKey=!0;const C=k.end,A=v?e(n,v,k,s):t(n,C,x,null,k,s);n.schema.compat&&$m(a.indent,v,s),n.atKey=!1,VE(n,d.items,A)&&s(C,"DUPLICATE_KEY","Map keys must be unique");const T=Ul(E??[],{indicator:"map-value-ind",next:w,offset:A.range[2],onError:s,parentIndent:a.indent,startOnNewline:!v||v.type==="block-scalar"});if(f=T.end,T.found){N&&((w==null?void 0:w.type)==="block-map"&&!T.hasNewline&&s(f,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&k.start<T.found.offset-1024&&s(A.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const L=w?e(n,w,T,s):t(n,f,E,null,T,s);n.schema.compat&&$m(a.indent,w,s),f=L.range[2];const M=new wn(A,L);n.options.keepSourceTokens&&(M.srcToken=m),d.items.push(M)}else{N&&s(A.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(A.comment?A.comment+=`
445
+ `+T.comment:A.comment=T.comment);const L=new wn(A);n.options.keepSourceTokens&&(L.srcToken=m),d.items.push(L)}}return h&&h<f&&s(h,"IMPOSSIBLE","Map comment with trailing content"),d.range=[a.offset,f,h??f],d}function f3({composeNode:e,composeEmptyNode:t},n,a,s,l){const c=(l==null?void 0:l.nodeClass)??_r,d=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=a.offset,h=null;for(const{start:b,value:m}of a.items){const x=Ul(b,{indicator:"seq-item-ind",next:m,offset:f,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!x.found)if(x.anchor||x.tag||m)(m==null?void 0:m.type)==="block-seq"?s(x.end,"BAD_INDENT","All sequence items must start at the same column"):s(f,"MISSING_CHAR","Sequence item without - indicator");else{h=x.end,x.comment&&(d.comment=x.comment);continue}const v=m?e(n,m,x,s):t(n,x.end,b,null,x,s);n.schema.compat&&$m(a.indent,m,s),f=v.range[2],d.items.push(v)}return d.range=[a.offset,f,h??f],d}function Ic(e,t,n,a){let s="";if(e){let l=!1,c="";for(const d of e){const{source:f,type:h}=d;switch(h){case"space":l=!0;break;case"comment":{n&&!l&&a(d,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=f.substring(1)||" ";s?s+=c+b:s=b,c="";break}case"newline":s&&(c+=f),l=!0;break;default:a(d,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}t+=f.length}}return{comment:s,offset:t}}const Pp="Block collections are not allowed within flow collections",Fp=e=>e&&(e.type==="block-map"||e.type==="block-seq");function h3({composeNode:e,composeEmptyNode:t},n,a,s,l){var k;const c=a.start.source==="{",d=c?"flow map":"flow sequence",f=(l==null?void 0:l.nodeClass)??(c?li:_r),h=new f(n.schema);h.flow=!0;const b=n.atRoot;b&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let m=a.offset+a.start.source.length;for(let N=0;N<a.items.length;++N){const C=a.items[N],{start:A,key:T,sep:L,value:M}=C,U=Ul(A,{flow:d,indicator:"explicit-key-ind",next:T??(L==null?void 0:L[0]),offset:m,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!U.found){if(!U.anchor&&!U.tag&&!L&&!M){N===0&&U.comma?s(U.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${d}`):N<a.items.length-1&&s(U.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${d}`),U.comment&&(h.comment?h.comment+=`
446
+ `+U.comment:h.comment=U.comment),m=U.end;continue}!c&&n.options.strict&&wc(T)&&s(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(N===0)U.comma&&s(U.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${d}`);else if(U.comma||s(U.start,"MISSING_CHAR",`Missing , between ${d} items`),U.comment){let $="";e:for(const te of A)switch(te.type){case"comma":case"space":break;case"comment":$=te.source.substring(1);break e;default:break e}if($){let te=h.items[h.items.length-1];Dt(te)&&(te=te.value??te.key),te.comment?te.comment+=`
447
+ `+$:te.comment=$,U.comment=U.comment.substring($.length+1)}}if(!c&&!L&&!U.found){const $=M?e(n,M,U,s):t(n,U.end,L,null,U,s);h.items.push($),m=$.range[2],Fp(M)&&s($.range,"BLOCK_IN_FLOW",Pp)}else{n.atKey=!0;const $=U.end,te=T?e(n,T,U,s):t(n,$,A,null,U,s);Fp(T)&&s(te.range,"BLOCK_IN_FLOW",Pp),n.atKey=!1;const P=Ul(L??[],{flow:d,indicator:"map-value-ind",next:M,offset:te.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(P.found){if(!c&&!U.found&&n.options.strict){if(L)for(const me of L){if(me===P.found)break;if(me.type==="newline"){s(me,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}U.start<P.found.offset-1024&&s(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&((k=M.source)==null?void 0:k[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${d}`):s(P.start,"MISSING_CHAR",`Missing , or : between ${d} items`));const Q=M?e(n,M,P,s):P.found?t(n,P.end,L,null,P,s):null;Q?Fp(M)&&s(Q.range,"BLOCK_IN_FLOW",Pp):P.comment&&(te.comment?te.comment+=`
448
+ `+P.comment:te.comment=P.comment);const J=new wn(te,Q);if(n.options.keepSourceTokens&&(J.srcToken=C),c){const me=h;VE(n,me.items,te)&&s($,"DUPLICATE_KEY","Map keys must be unique"),me.items.push(J)}else{const me=new li(n.schema);me.flow=!0,me.items.push(J);const le=(Q??te).range;me.range=[te.range[0],le[1],le[2]],h.items.push(me)}m=Q?Q.range[2]:P.end}}const x=c?"}":"]",[v,...E]=a.end;let w=m;if((v==null?void 0:v.source)===x)w=v.offset+v.source.length;else{const N=d[0].toUpperCase()+d.substring(1),C=b?`${N} must end with a ${x}`:`${N} in block collection must be sufficiently indented and end with a ${x}`;s(m,b?"MISSING_CHAR":"BAD_INDENT",C),v&&v.source.length!==1&&E.unshift(v)}if(E.length>0){const N=Ic(E,w,n.options.strict,s);N.comment&&(h.comment?h.comment+=`
449
+ `+N.comment:h.comment=N.comment),h.range=[a.offset,w,N.offset]}else h.range=[a.offset,w,w];return h}function $p(e,t,n,a,s,l){const c=n.type==="block-map"?d3(e,t,n,a,l):n.type==="block-seq"?f3(e,t,n,a,l):h3(e,t,n,a,l),d=c.constructor;return s==="!"||s===d.tagName?(c.tag=d.tagName,c):(s&&(c.tag=s),c)}function p3(e,t,n,a,s){var x;const l=a.tag,c=l?t.directives.tagName(l.source,v=>s(l,"TAG_RESOLVE_FAILED",v)):null;if(n.type==="block-seq"){const{anchor:v,newlineAfterProp:E}=a,w=v&&l?v.offset>l.offset?v:l:v??l;w&&(!E||E.offset<w.offset)&&s(w,"MISSING_CHAR","Missing newline after block sequence props")}const d=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!c||c==="!"||c===li.tagName&&d==="map"||c===_r.tagName&&d==="seq")return $p(e,t,n,s,c);let f=t.schema.tags.find(v=>v.tag===c&&v.collection===d);if(!f){const v=t.schema.knownTags[c];if((v==null?void 0:v.collection)===d)t.schema.tags.push(Object.assign({},v,{default:!1})),f=v;else return v?s(l,"BAD_COLLECTION_TYPE",`${v.tag} used for ${d} collection, but expects ${v.collection??"scalar"}`,!0):s(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),$p(e,t,n,s,c)}const h=$p(e,t,n,s,c,f),b=((x=f.resolve)==null?void 0:x.call(f,h,v=>s(l,"TAG_RESOLVE_FAILED",v),t.options))??h,m=Ut(b)?b:new Pe(b);return m.range=h.range,m.tag=c,f!=null&&f.format&&(m.format=f.format),m}function QE(e,t,n){const a=t.offset,s=m3(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};const l=s.mode===">"?Pe.BLOCK_FOLDED:Pe.BLOCK_LITERAL,c=t.source?g3(t.source):[];let d=c.length;for(let w=c.length-1;w>=0;--w){const k=c[w][1];if(k===""||k==="\r")d=w;else break}if(d===0){const w=s.chomp==="+"&&c.length>0?`
450
+ `.repeat(Math.max(1,c.length-1)):"";let k=a+s.length;return t.source&&(k+=t.source.length),{value:w,type:l,comment:s.comment,range:[a,k,k]}}let f=t.indent+s.indent,h=t.offset+s.length,b=0;for(let w=0;w<d;++w){const[k,N]=c[w];if(N===""||N==="\r")s.indent===0&&k.length>f&&(f=k.length);else{k.length<f&&n(h+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(f=k.length),b=w,f===0&&!e.atRoot&&n(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=k.length+N.length+1}for(let w=c.length-1;w>=d;--w)c[w][0].length>f&&(d=w+1);let m="",x="",v=!1;for(let w=0;w<b;++w)m+=c[w][0].slice(f)+`
451
+ `;for(let w=b;w<d;++w){let[k,N]=c[w];h+=k.length+N.length+1;const C=N[N.length-1]==="\r";if(C&&(N=N.slice(0,-1)),N&&k.length<f){const T=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(h-N.length-(C?2:1),"BAD_INDENT",T),k=""}l===Pe.BLOCK_LITERAL?(m+=x+k.slice(f)+N,x=`
452
+ `):k.length>f||N[0]===" "?(x===" "?x=`
453
+ `:!v&&x===`
454
+ `&&(x=`
455
+
456
+ `),m+=x+k.slice(f)+N,x=`
457
+ `,v=!0):N===""?x===`
458
+ `?m+=`
459
+ `:x=`
460
+ `:(m+=x+N,x=" ",v=!1)}switch(s.chomp){case"-":break;case"+":for(let w=d;w<c.length;++w)m+=`
461
+ `+c[w][0].slice(f);m[m.length-1]!==`
462
+ `&&(m+=`
463
+ `);break;default:m+=`
464
+ `}const E=a+s.length+t.source.length;return{value:m,type:l,comment:s.comment,range:[a,E,E]}}function m3({offset:e,props:t},n,a){if(t[0].type!=="block-scalar-header")return a(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],l=s[0];let c=0,d="",f=-1;for(let x=1;x<s.length;++x){const v=s[x];if(!d&&(v==="-"||v==="+"))d=v;else{const E=Number(v);!c&&E?c=E:f===-1&&(f=e+x)}}f!==-1&&a(f,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let h=!1,b="",m=s.length;for(let x=1;x<t.length;++x){const v=t[x];switch(v.type){case"space":h=!0;case"newline":m+=v.source.length;break;case"comment":n&&!h&&a(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=v.source.length,b=v.source.substring(1);break;case"error":a(v,"UNEXPECTED_TOKEN",v.message),m+=v.source.length;break;default:{const E=`Unexpected token in block scalar header: ${v.type}`;a(v,"UNEXPECTED_TOKEN",E);const w=v.source;w&&typeof w=="string"&&(m+=w.length)}}}return{mode:l,indent:c,chomp:d,comment:b,length:m}}function g3(e){const t=e.split(/\n( *)/),n=t[0],a=n.match(/^( *)/),l=[a!=null&&a[1]?[a[1],n.slice(a[1].length)]:["",n]];for(let c=1;c<t.length;c+=2)l.push([t[c],t[c+1]]);return l}function YE(e,t,n){const{offset:a,type:s,source:l,end:c}=e;let d,f;const h=(x,v,E)=>n(a+x,v,E);switch(s){case"scalar":d=Pe.PLAIN,f=b3(l,h);break;case"single-quoted-scalar":d=Pe.QUOTE_SINGLE,f=y3(l,h);break;case"double-quoted-scalar":d=Pe.QUOTE_DOUBLE,f=x3(l,h);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[a,a+l.length,a+l.length]}}const b=a+l.length,m=Ic(c,b,t,n);return{value:f,type:d,comment:m.comment,range:[a,b,m.offset]}}function b3(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),WE(e)}function y3(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),WE(e.slice(1,-1)).replace(/''/g,"'")}function WE(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
465
+ `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
466
+ `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let a=t.exec(e);if(!a)return e;let s=a[1],l=" ",c=t.lastIndex;for(n.lastIndex=c;a=n.exec(e);)a[1]===""?l===`
467
+ `?s+=l:l=`
468
+ `:(s+=l+a[1],l=" "),c=n.lastIndex;const d=/[ \t]*(.*)/sy;return d.lastIndex=c,a=d.exec(e),s+l+((a==null?void 0:a[1])??"")}function x3(e,t){let n="";for(let a=1;a<e.length-1;++a){const s=e[a];if(!(s==="\r"&&e[a+1]===`
469
+ `))if(s===`
470
+ `){const{fold:l,offset:c}=v3(e,a);n+=l,a=c}else if(s==="\\"){let l=e[++a];const c=w3[l];if(c)n+=c;else if(l===`
471
+ `)for(l=e[a+1];l===" "||l===" ";)l=e[++a+1];else if(l==="\r"&&e[a+1]===`
472
+ `)for(l=e[++a+1];l===" "||l===" ";)l=e[++a+1];else if(l==="x"||l==="u"||l==="U"){const d={x:2,u:4,U:8}[l];n+=E3(e,a+1,d,t),a+=d}else{const d=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${d}`),n+=d}}else if(s===" "||s===" "){const l=a;let c=e[a+1];for(;c===" "||c===" ";)c=e[++a+1];c!==`
473
+ `&&!(c==="\r"&&e[a+2]===`
474
+ `)&&(n+=a>l?e.slice(l,a+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function v3(e,t){let n="",a=e[t+1];for(;(a===" "||a===" "||a===`
475
+ `||a==="\r")&&!(a==="\r"&&e[t+2]!==`
476
+ `);)a===`
477
+ `&&(n+=`
478
+ `),t+=1,a=e[t+1];return n||(n=" "),{fold:n,offset:t}}const w3={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
479
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function E3(e,t,n,a){const s=e.substr(t,n),c=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(c)){const d=e.substr(t-2,n+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${d}`),d}return String.fromCodePoint(c)}function XE(e,t,n,a){const{value:s,type:l,comment:c,range:d}=t.type==="block-scalar"?QE(e,t,a):YE(t,e.options.strict,a),f=n?e.directives.tagName(n.source,m=>a(n,"TAG_RESOLVE_FAILED",m)):null;let h;e.options.stringKeys&&e.atKey?h=e.schema[ia]:f?h=S3(e.schema,s,f,n,a):t.type==="scalar"?h=k3(e,s,t,a):h=e.schema[ia];let b;try{const m=h.resolve(s,x=>a(n??t,"TAG_RESOLVE_FAILED",x),e.options);b=Nt(m)?m:new Pe(m)}catch(m){const x=m instanceof Error?m.message:String(m);a(n??t,"TAG_RESOLVE_FAILED",x),b=new Pe(s)}return b.range=d,b.source=s,l&&(b.type=l),f&&(b.tag=f),h.format&&(b.format=h.format),c&&(b.comment=c),b}function S3(e,t,n,a,s){var d;if(n==="!")return e[ia];const l=[];for(const f of e.tags)if(!f.collection&&f.tag===n)if(f.default&&f.test)l.push(f);else return f;for(const f of l)if((d=f.test)!=null&&d.test(t))return f;const c=e.knownTags[n];return c&&!c.collection?(e.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(s(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[ia])}function k3({atKey:e,directives:t,schema:n},a,s,l){const c=n.tags.find(d=>{var f;return(d.default===!0||e&&d.default==="key")&&((f=d.test)==null?void 0:f.test(a))})||n[ia];if(n.compat){const d=n.compat.find(f=>{var h;return f.default&&((h=f.test)==null?void 0:h.test(a))})??n[ia];if(c.tag!==d.tag){const f=t.tagString(c.tag),h=t.tagString(d.tag),b=`Value may be parsed as either ${f} or ${h}`;l(s,"TAG_RESOLVE_FAILED",b,!0)}}return c}function N3(e,t,n){if(t){n??(n=t.length);for(let a=n-1;a>=0;--a){let s=t[a];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++a];(s==null?void 0:s.type)==="space";)e+=s.source.length,s=t[++a];break}}return e}const _3={composeNode:ZE,composeEmptyNode:Dg};function ZE(e,t,n,a){const s=e.atKey,{spaceBefore:l,comment:c,anchor:d,tag:f}=n;let h,b=!0;switch(t.type){case"alias":h=C3(e,t,a),(d||f)&&a(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=XE(e,t,f,a),d&&(h.anchor=d.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{h=p3(_3,e,t,n,a),d&&(h.anchor=d.source.substring(1))}catch(m){const x=m instanceof Error?m.message:String(m);a(t,"RESOURCE_EXHAUSTION",x)}break;default:{const m=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;a(t,"UNEXPECTED_TOKEN",m),b=!1}}return h??(h=Dg(e,t.offset,void 0,null,n,a)),d&&h.anchor===""&&a(d,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!Nt(h)||typeof h.value!="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str")&&a(f??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),l&&(h.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?h.comment=c:h.commentBefore=c),e.options.keepSourceTokens&&b&&(h.srcToken=t),h}function Dg(e,t,n,a,{spaceBefore:s,comment:l,anchor:c,tag:d,end:f},h){const b={type:"scalar",offset:N3(t,n,a),indent:-1,source:""},m=XE(e,b,d,h);return c&&(m.anchor=c.source.substring(1),m.anchor===""&&h(c,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(m.spaceBefore=!0),l&&(m.comment=l,m.range[2]=f),m}function C3({options:e},{offset:t,source:n,end:a},s){const l=new rf(n.substring(1));l.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),l.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,d=Ic(a,c,e.strict,s);return l.range=[t,c,d.offset],d.comment&&(l.comment=d.comment),l}function A3(e,t,{offset:n,start:a,value:s,end:l},c){const d=Object.assign({_directives:t},e),f=new Xl(void 0,d),h={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},b=Ul(a,{indicator:"doc-start",next:s??(l==null?void 0:l[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});b.found&&(f.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!b.hasNewline&&c(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=s?ZE(h,s,b,c):Dg(h,b.end,a,null,b,c);const m=f.contents.range[2],x=Ic(l,m,!1,c);return x.comment&&(f.comment=x.comment),f.range=[n,m,x.offset],f}function ec(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:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function F0(e){var s;let t="",n=!1,a=!1;for(let l=0;l<e.length;++l){const c=e[l];switch(c[0]){case"#":t+=(t===""?"":a?`
480
+
481
+ `:`
482
+ `)+(c.substring(1)||" "),n=!0,a=!1;break;case"%":((s=e[l+1])==null?void 0:s[0])!=="#"&&(l+=1),n=!1;break;default:n||(a=!0),n=!1}}return{comment:t,afterEmptyLine:a}}class Lg{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,a,s,l)=>{const c=ec(n);l?this.warnings.push(new GE(c,a,s)):this.errors.push(new is(c,a,s))},this.directives=new On({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:a,afterEmptyLine:s}=F0(this.prelude);if(a){const l=t.contents;if(n)t.comment=t.comment?`${t.comment}
483
+ ${a}`:a;else if(s||t.directives.docStart||!l)t.commentBefore=a;else if(zt(l)&&!l.flow&&l.items.length>0){let c=l.items[0];Dt(c)&&(c=c.key);const d=c.commentBefore;c.commentBefore=d?`${a}
484
+ ${d}`:a}else{const c=l.commentBefore;l.commentBefore=c?`${a}
485
+ ${c}`:a}}n?(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:F0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,a=-1){for(const s of t)yield*this.next(s);yield*this.end(n,a)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,a,s)=>{const l=ec(t);l[0]+=n,this.onError(l,"BAD_DIRECTIVE",a,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=A3(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,a=new is(ec(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(a):this.doc.errors.push(a);break}case"doc-end":{if(!this.doc){const a="Unexpected doc-end without preceding document";this.errors.push(new is(ec(t),"UNEXPECTED_TOKEN",a));break}this.doc.directives.docEnd=!0;const n=Ic(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const a=this.doc.comment;this.doc.comment=a?`${a}
486
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new is(ec(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const a=Object.assign({_directives:this.directives},this.options),s=new Xl(void 0,a);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}function T3(e,t=!0,n){if(e){const a=(s,l,c)=>{const d=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(d,l,c);else throw new is([d,d+1],l,c)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return YE(e,t,a);case"block-scalar":return QE({options:{strict:t}},e,a)}}return null}function O3(e,t){const{implicitKey:n=!1,indent:a,inFlow:s=!1,offset:l=-1,type:c="PLAIN"}=t,d=Dc({type:c,value:e},{implicitKey:n,indent:a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),f=t.end??[{type:"newline",offset:-1,indent:a,source:`
487
+ `}];switch(d[0]){case"|":case">":{const h=d.indexOf(`
488
+ `),b=d.substring(0,h),m=d.substring(h+1)+`
489
+ `,x=[{type:"block-scalar-header",offset:l,indent:a,source:b}];return JE(x,f)||x.push({type:"newline",offset:-1,indent:a,source:`
490
+ `}),{type:"block-scalar",offset:l,indent:a,props:x,source:m}}case'"':return{type:"double-quoted-scalar",offset:l,indent:a,source:d,end:f};case"'":return{type:"single-quoted-scalar",offset:l,indent:a,source:d,end:f};default:return{type:"scalar",offset:l,indent:a,source:d,end:f}}}function R3(e,t,n={}){let{afterKey:a=!1,implicitKey:s=!1,inFlow:l=!1,type:c}=n,d="indent"in e?e.indent:null;if(a&&typeof d=="number"&&(d+=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 f=Dc({type:c,value:t},{implicitKey:s||d===null,indent:d!==null&&d>0?" ".repeat(d):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":j3(e,f);break;case'"':Hp(e,f,"double-quoted-scalar");break;case"'":Hp(e,f,"single-quoted-scalar");break;default:Hp(e,f,"scalar")}}function j3(e,t){const n=t.indexOf(`
491
+ `),a=t.substring(0,n),s=t.substring(n+1)+`
492
+ `;if(e.type==="block-scalar"){const l=e.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l.source=a,e.source=s}else{const{offset:l}=e,c="indent"in e?e.indent:-1,d=[{type:"block-scalar-header",offset:l,indent:c,source:a}];JE(d,"end"in e?e.end:void 0)||d.push({type:"newline",offset:-1,indent:c,source:`
493
+ `});for(const f of Object.keys(e))f!=="type"&&f!=="offset"&&delete e[f];Object.assign(e,{type:"block-scalar",indent:c,props:d,source:s})}}function JE(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function Hp(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const a=e.props.slice(1);let s=t.length;e.props[0].type==="block-scalar-header"&&(s-=e.props[0].source.length);for(const l of a)l.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:a});break}case"block-map":case"block-seq":{const s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
494
+ `};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{const a="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(l=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(const l of Object.keys(e))l!=="type"&&l!=="offset"&&delete e[l];Object.assign(e,{type:n,indent:a,source:t,end:s})}}}const M3=e=>"type"in e?$d(e):Ad(e);function $d(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=$d(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=Ad(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=Ad(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=Ad(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function Ad({start:e,key:t,sep:n,value:a}){let s="";for(const l of e)s+=l.source;if(t&&(s+=$d(t)),n)for(const l of n)s+=l.source;return a&&(s+=$d(a)),s}const Hm=Symbol("break visit"),D3=Symbol("skip children"),eS=Symbol("remove item");function ms(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),tS(Object.freeze([]),e,t)}ms.BREAK=Hm;ms.SKIP=D3;ms.REMOVE=eS;ms.itemAtPath=(e,t)=>{let n=e;for(const[a,s]of t){const l=n==null?void 0:n[a];if(l&&"items"in l)n=l.items[s];else return}return n};ms.parentCollection=(e,t)=>{const n=ms.itemAtPath(e,t.slice(0,-1)),a=t[t.length-1][0],s=n==null?void 0:n[a];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function tS(e,t,n){let a=n(t,e);if(typeof a=="symbol")return a;for(const s of["key","value"]){const l=t[s];if(l&&"items"in l){for(let c=0;c<l.items.length;++c){const d=tS(Object.freeze(e.concat([[s,c]])),l.items[c],n);if(typeof d=="number")c=d-1;else{if(d===Hm)return Hm;d===eS&&(l.items.splice(c,1),c-=1)}}typeof a=="function"&&s==="key"&&(a=a(t,e))}}return typeof a=="function"?a(t,e):a}const pf="\uFEFF",mf="",gf="",Ec="",L3=e=>!!e&&"items"in e,I3=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function z3(e){switch(e){case pf:return"<BOM>";case mf:return"<DOC>";case gf:return"<FLOW_END>";case Ec:return"<SCALAR>";default:return JSON.stringify(e)}}function nS(e){switch(e){case pf:return"byte-order-mark";case mf:return"doc-mode";case gf:return"flow-error-end";case Ec:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
495
+ `:case`\r
496
+ `: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 B3=Object.freeze(Object.defineProperty({__proto__:null,BOM:pf,DOCUMENT:mf,FLOW_END:gf,SCALAR:Ec,createScalarToken:O3,isCollection:L3,isScalar:I3,prettyToken:z3,resolveAsScalar:T3,setScalarValue:R3,stringify:M3,tokenType:nS,visit:ms},Symbol.toStringTag,{value:"Module"}));function Li(e){switch(e){case void 0:case" ":case`
497
+ `:case"\r":case" ":return!0;default:return!1}}const $0=new Set("0123456789ABCDEFabcdef"),U3=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ud=new Set(",[]{}"),P3=new Set(` ,[]{}
498
+ \r `),qp=e=>!e||P3.has(e);class iS{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,n=!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=!n;let a=this.next??"stream";for(;a&&(n||this.hasChars(1));)a=yield*this.parseNext(a)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
499
+ `?!0:n==="\r"?this.buffer[t+1]===`
500
+ `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let a=0;for(;n===" ";)n=this.buffer[++a+t];if(n==="\r"){const s=this.buffer[a+t+1];if(s===`
501
+ `||!s&&!this.atEnd)return t+a+1}return n===`
502
+ `||a>=this.indentNext||!n&&!this.atEnd?t+a:-1}if(n==="-"||n==="."){const a=this.buffer.substr(t,3);if((a==="---"||a==="...")&&Li(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(`
503
+ `,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]===pf&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,a=t.indexOf("#");for(;a!==-1;){const l=t[a-1];if(l===" "||l===" "){n=a-1;break}else a=t.indexOf("#",a+1)}for(;;){const l=t[n-1];if(l===" "||l===" ")n-=1;else break}const s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield mf,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 n=this.peek(3);if((n==="---"||n==="...")&&Li(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Li(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Li(n)){const a=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=a,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);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(qp),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,a=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=a=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((a!==-1&&a<this.indentNext&&s[0]!=="#"||a===0&&(s.startsWith("---")||s.startsWith("..."))&&Li(s[3]))&&!(a===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield gf,yield*this.parseLineStart();let l=0;for(;s[l]===",";)l+=yield*this.pushCount(1),l+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(l+=yield*this.pushIndicators(),s[l]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-l),"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(qp),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||Li(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 n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let l=0;for(;this.buffer[n-1-l]==="\\";)l+=1;if(l%2===0)break;n=this.buffer.indexOf('"',n+1)}const a=this.buffer.substring(0,n);let s=a.indexOf(`
504
+ `,this.pos);if(s!==-1){for(;s!==-1;){const l=this.continueScalar(s+1);if(l===-1)break;s=a.indexOf(`
505
+ `,l)}s!==-1&&(n=s-(a[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Li(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,a;e:for(let l=this.pos;a=this.buffer[l];++l)switch(a){case" ":n+=1;break;case`
506
+ `:t=l,n=0;break;case"\r":{const c=this.buffer[l+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
507
+ `)break}default:break e}if(!a&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const l=this.continueScalar(t+1);if(l===-1)break;t=this.buffer.indexOf(`
508
+ `,l)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let s=t+1;for(a=this.buffer[s];a===" ";)a=this.buffer[++s];if(a===" "){for(;a===" "||a===" "||a==="\r"||a===`
509
+ `;)a=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let l=t-1,c=this.buffer[l];c==="\r"&&(c=this.buffer[--l]);const d=l;for(;c===" ";)c=this.buffer[--l];if(c===`
510
+ `&&l>=this.pos&&l+1+n>d)t=l;else break}while(!0);return yield Ec,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,a=this.pos-1,s;for(;s=this.buffer[++a];)if(s===":"){const l=this.buffer[a+1];if(Li(l)||t&&ud.has(l))break;n=a}else if(Li(s)){let l=this.buffer[a+1];if(s==="\r"&&(l===`
511
+ `?(a+=1,s=`
512
+ `,l=this.buffer[a+1]):n=a),l==="#"||t&&ud.has(l))break;if(s===`
513
+ `){const c=this.continueScalar(a+1);if(c===-1)break;a=Math.max(a,c-2)}}else{if(t&&ud.has(s))break;n=a}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield Ec,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const a=this.buffer.slice(this.pos,t);return a?(yield a,this.pos+=a.length,a.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(qp))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Li(n)||t&&ud.has(n))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,n=this.buffer[t];for(;!Li(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(U3.has(n))n=this.buffer[++t];else if(n==="%"&&$0.has(this.buffer[t+1])&&$0.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
514
+ `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
515
+ `?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,a;do a=this.buffer[++n];while(a===" "||t&&a===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,a=this.buffer[n];for(;!t(a);)a=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class aS{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,a=this.lineStarts.length;for(;n<a;){const l=n+a>>1;this.lineStarts[l]<t?n=l+1:a=l}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const s=this.lineStarts[n-1];return{line:n,col:t-s+1}}}}function pr(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function H0(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 rS(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 dd(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 fl(e){var n;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(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function q0(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!pr(t.start,"explicit-key-ind")&&!pr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,rS(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 Ig{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 iS,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const a of this.lexer.lex(t,n))yield*this.next(a);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=nS(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){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 a=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:a,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 n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const a=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in a?a.indent:0:n.type==="flow-collection"&&a.type==="document"&&(n.indent=0),n.type==="flow-collection"&&q0(n),a.type){case"document":a.value=n;break;case"block-scalar":a.props.push(n);break;case"block-map":{const s=a.items[a.items.length-1];if(s.value){a.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=a.items[a.items.length-1];s.value?a.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=a.items[a.items.length-1];!s||s.value?a.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((a.type==="document"||a.type==="block-map"||a.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&H0(s.start)===-1&&(n.indent===0||s.start.every(l=>l.type!=="comment"||l.indent<n.indent))&&(a.type==="document"?a.end=s.start:a.items.push({start:s.start}),n.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":{H0(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 n=this.startBlockValue(t);n?this.stack.push(n):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 n=dd(this.peek(2)),a=fl(n);let s;t.end?(s=t.end,s.push(this.sourceToken),delete t.end):s=[this.sourceToken];const l={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}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 n=this.source.indexOf(`
516
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
517
+ `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,l=Array.isArray(s)?s[s.length-1]:void 0;(l==null?void 0:l.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],l=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const s=!this.onKeyLine&&this.indent===t.indent,l=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(l&&n.sep&&!n.value){const d=[];for(let f=0;f<n.sep.length;++f){const h=n.sep[f];switch(h.type){case"newline":d.push(f);break;case"space":break;case"comment":h.indent>t.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(c=n.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":l||n.value?(c.push(this.sourceToken),t.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):l||n.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(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(pr(n.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(rS(n.key)&&!pr(n.sep,"newline")){const d=fl(n.start),f=n.key,h=n.sep;h.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:f,sep:h}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(pr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const d=fl(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?t.items.push({start:c,key:null,sep:[this.sourceToken]}):pr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const d=this.flowScalar(this.type);l||n.value?(t.items.push({start:c,key:d,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(d):(Object.assign(n,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(t);if(d){if(d.type==="block-seq"){if(!n.explicitKey&&n.sep&&!pr(n.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 s&&t.items.push({start:c});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,l=Array.isArray(s)?s[s.length-1]:void 0;(l==null?void 0:l.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],l=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||pr(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let a;do yield*this.pop(),a=this.peek(1);while((a==null?void 0:a.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const a=this.startBlockValue(t);a?this.stack.push(a):(yield*this.pop(),yield*this.step())}else{const a=this.peek(2);if(a.type==="block-map"&&(this.type==="map-value-ind"&&a.indent===t.indent||this.type==="newline"&&!a.items[a.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&a.type!=="flow-collection"){const s=dd(a),l=fl(s);q0(t);const c=t.end.splice(1,t.end.length);c.push(this.sourceToken);const d={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:l,key:t,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=d}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
518
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
519
+ `,n)+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 n=dd(t),a=fl(n);return a.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=dd(t),a=fl(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(a=>a.type==="newline"||a.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 sS(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new aS||null,prettyErrors:t}}function F3(e,t={}){const{lineCounter:n,prettyErrors:a}=sS(t),s=new Ig(n==null?void 0:n.addNewLine),l=new Lg(t),c=Array.from(l.compose(s.parse(e)));if(a&&n)for(const d of c)d.errors.forEach(Fd(e,n)),d.warnings.forEach(Fd(e,n));return c.length>0?c:Object.assign([],{empty:!0},l.streamInfo())}function lS(e,t={}){const{lineCounter:n,prettyErrors:a}=sS(t),s=new Ig(n==null?void 0:n.addNewLine),l=new Lg(t);let c=null;for(const d of l.compose(s.parse(e),!0,e.length))if(!c)c=d;else if(c.options.logLevel!=="silent"){c.errors.push(new is(d.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&n&&(c.errors.forEach(Fd(e,n)),c.warnings.forEach(Fd(e,n))),c}function $3(e,t,n){let a;typeof t=="function"?a=t:n===void 0&&t&&typeof t=="object"&&(n=t);const s=lS(e,n);if(!s)return null;if(s.warnings.forEach(l=>NE(s.options.logLevel,l)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:a},n))}function H3(e,t,n){let a=null;if(typeof t=="function"||Array.isArray(t)?a=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(e===void 0){const{keepUndefined:s}=n??t??{};if(!s)return}return ys(e)&&!a?e.toString(n):new Xl(e,a,n).toString(n)}const K0=Object.freeze(Object.defineProperty({__proto__:null,Alias:rf,CST:B3,Composer:Lg,Document:Xl,Lexer:iS,LineCounter:aS,Pair:wn,Parser:Ig,Scalar:Pe,Schema:qE,YAMLError:Mg,YAMLMap:li,YAMLParseError:is,YAMLSeq:_r,YAMLWarning:GE,isAlias:Tr,isCollection:zt,isDocument:ys,isMap:Vl,isNode:Ut,isPair:Dt,isScalar:Nt,isSeq:Ql,parse:$3,parseAllDocuments:F3,parseDocument:lS,stringify:H3,visit:xs,visitAsync:af},Symbol.toStringTag,{value:"Module"}));function q3({projectName:e,file:t,onClose:n,onSaved:a}){const{t:s}=Fe("projects"),l=Vn(),{alert:c}=ui(),{data:d,isLoading:f,isError:h,error:b,refetch:m}=ct({queryKey:["pipeline-file",e,t],queryFn:()=>pI(e,t)}),[x,v]=O.useState("structured"),[E,w]=O.useState(null),[k,N]=O.useState(null);O.useEffect(()=>{d&&E===null&&(w(d.content),N(d.etag),d.parseError&&v("yaml"))},[d,E]),O.useEffect(()=>{const U=$=>{$.key==="Escape"&&n()};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[n]);const C=Gn({mutationFn:()=>{if(E===null||k===null)throw new Error("no draft");return mI(e,t,E,k)},onSuccess:U=>{N(U.etag),l.invalidateQueries({queryKey:["pipeline-file",e,t]}),l.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:U=>{const $=U.status;c({title:s($===409?"pipelineEditor.etagConflict":$===422?"pipelineEditor.yamlInvalid":"pipelineEditor.saveFailed"),body:U instanceof Error?U.message:String(U)})}}),A=E!==null&&d&&E!==d.content,{parsed:T,parseError:L}=O.useMemo(()=>{if(E===null)return{parsed:null,parseError:null};try{return{parsed:K0.parse(E)??{},parseError:null}}catch(U){return{parsed:null,parseError:U instanceof Error?U.message:String(U)}}},[E]),M=U=>{try{const $=K0.stringify(U,{lineWidth:0});w($)}catch($){c({title:s("pipelineEditor.yamlSerializeFailed"),body:$ instanceof Error?$.message:String($)})}};return p.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",children:p.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[p.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[p.jsxs("div",{children:[p.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[p.jsx(y0,{size:20,strokeWidth:2.5}),p.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(d==null?void 0:d.isActive)&&p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:"active"})]}),p.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,k&&` · etag ${k}`]})]}),p.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":s("pipelineEditor.closeAria"),children:p.jsx(Ci,{size:14,strokeWidth:3})})]}),f&&p.jsx("p",{className:"text-[var(--color-text-muted)]",children:s("pipelineEditor.loading")}),h&&p.jsx("p",{className:"text-[var(--color-crashed)]",children:s("pipelineEditor.loadFailed",{error:b instanceof Error?b.message:String(b)})}),d&&E!==null&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[p.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:[p.jsxs("button",{type:"button",onClick:()=>v("structured"),"aria-pressed":x==="structured",disabled:!!L,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",x==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",L?"opacity-50 cursor-not-allowed":""].join(" "),title:L??void 0,children:[p.jsx(Mc,{size:11,strokeWidth:2.5}),s("pipelineEditor.structured")]}),p.jsxs("button",{type:"button",onClick:()=>v("yaml"),"aria-pressed":x==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",x==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[p.jsx(y0,{size:11,strokeWidth:2.5}),s("pipelineEditor.rawYaml")]})]}),L&&p.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[p.jsx(gc,{size:12,strokeWidth:2.5}),"YAML parse: ",L]}),(d==null?void 0:d.isActive)&&p.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:s("pipelineEditor.activeWarn")})]}),p.jsxs("div",{className:"flex-1 overflow-auto",children:[x==="structured"&&T&&p.jsx(K3,{parsed:T,onChange:M}),x==="yaml"&&p.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:E,onChange:U=>w(U.target.value),spellCheck:!1,"aria-label":s("pipelineEditor.yamlAria")})]}),p.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:[p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:A?p.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:s("pipelineEditor.unsaved")}):C.isSuccess?p.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[p.jsx(bc,{size:12,strokeWidth:2.5})," ",s("pipelineEditor.saved")]}):s("pipelineEditor.noChanges")}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{w(null),m()},disabled:C.isPending,type:"button",children:s("pipelineEditor.reload")}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>C.mutate(),disabled:!A||C.isPending,type:"button","aria-label":s("pipelineEditor.saveAria"),children:[C.isPending?p.jsx(Bt,{size:13,strokeWidth:3,className:"animate-spin"}):p.jsx(tf,{size:13,strokeWidth:3}),s("pipelineEditor.save")]})]})]})]})]})})}function K3({parsed:e,onChange:t}){const{t:n}=Fe("projects"),a=e.stages??[],s=h=>{t({...e,stages:h})},l=()=>{s([...a,{name:`stage-${a.length+1}`,on_complete:"move_card Done"}])},c=h=>{s(a.filter((b,m)=>m!==h))},d=(h,b)=>{const m=[...a],x=h+b;x<0||x>=m.length||([m[h],m[x]]=[m[x],m[h]],s(m))},f=(h,b)=>{s(a.map((m,x)=>x===h?{...m,...b}:m))};return p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[p.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[p.jsx("span",{className:"font-bold",children:"mode:"}),p.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:h=>t({...e,mode:h.target.value}),children:[p.jsx("option",{value:"project",children:"project"}),p.jsx("option",{value:"steps",children:"steps"})]})]}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n("pipelineEditor.modeProject")})]}),p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center justify-between mb-2",children:[p.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:["Stages (",a.length,")"]}),p.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:l,"aria-label":n("pipelineEditor.addStageAria"),children:[p.jsx(Pi,{size:11,strokeWidth:3})," ",n("pipelineEditor.addStage")]})]}),a.length===0?p.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:n("pipelineEditor.noStages")}):p.jsx("div",{className:"flex flex-col gap-3",children:a.map((h,b)=>p.jsx(G3,{stage:h,index:b,total:a.length,onChange:m=>f(b,m),onRemove:()=>c(b),onMoveUp:()=>d(b,-1),onMoveDown:()=>d(b,1)},b))})]})]})}function G3({stage:e,index:t,total:n,onChange:a,onRemove:s,onMoveUp:l,onMoveDown:c}){const{t:d}=Fe("projects"),f=e.on_fail??{};return p.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&p.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})]}),p.jsxs("div",{className:"flex gap-1",children:[p.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:l,disabled:t===0,"aria-label":d("pipelineEditor.moveUpAria"),children:p.jsx(YT,{size:12,strokeWidth:3})}),p.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===n-1,"aria-label":d("pipelineEditor.moveDownAria"),children:p.jsx(jc,{size:12,strokeWidth:3})}),p.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:s,"aria-label":d("pipelineEditor.deleteStageAria"),children:p.jsx(Kl,{size:12,strokeWidth:3})})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[p.jsx(dr,{label:"name",hint:d("pipelineEditor.stageNameHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:h=>a({name:h.target.value}),placeholder:"develop"})}),p.jsx(dr,{label:"profile",hint:d("pipelineEditor.stageProfileHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:h=>a({profile:h.target.value||void 0}),placeholder:"fullstack"})}),p.jsx(dr,{label:"card_state",hint:d("pipelineEditor.stageCardStateHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:h=>a({card_state:h.target.value||void 0}),placeholder:"Inprogress"})}),p.jsx(dr,{label:"timeout",hint:d("pipelineEditor.stageTimeoutHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:h=>a({timeout:h.target.value||void 0}),placeholder:"2h"})}),p.jsx(dr,{label:"trigger",hint:d("pipelineEditor.stageTriggerHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:h=>a({trigger:h.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),p.jsx(dr,{label:"on_complete",hint:d("pipelineEditor.stageOnCompleteHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:h=>a({on_complete:h.target.value}),placeholder:"move_card Done"})})]}),p.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[p.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),p.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[p.jsx(dr,{label:"action",hint:d("pipelineEditor.stageOnFailureActionHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:h=>a({on_fail:{...f,action:h.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),p.jsx(dr,{label:"comment",hint:d("pipelineEditor.stageCommentHint"),children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:h=>a({on_fail:{...f,comment:h.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),p.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[p.jsx("input",{type:"checkbox",checked:f.halt??!0,onChange:h=>a({on_fail:{...f,halt:h.target.checked}})}),p.jsx("span",{className:"font-bold",children:"halt"}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:d("pipelineEditor.stopOnFailureNote")})]})]})]})}function dr({label:e,hint:t,children:n}){return p.jsxs("label",{className:"flex flex-col gap-1",children:[p.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&p.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function V3({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const{t:l}=Fe("projects"),[c,d]=O.useState(""),[f,h]=O.useState("blank");O.useEffect(()=>{const E=w=>{w.key==="Escape"&&e()};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[e]);const b=c.trim(),m=b.endsWith(".yaml")?b:b?`${b}.yaml`:"",x=m&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(m),v=()=>{!x||s||t(m,f)};return p.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:p.jsxs("div",{className:"nb-card max-w-md w-full",children:[p.jsxs("header",{className:"flex items-start justify-between mb-4",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:l("newPipelineDialog.title")}),p.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":l("newPipelineDialog.closeAria"),children:p.jsx(Ci,{size:14,strokeWidth:3})})]}),p.jsxs("form",{onSubmit:E=>{E.preventDefault(),v()},className:"flex flex-col gap-4",children:[p.jsxs("label",{className:"flex flex-col gap-1.5",children:[p.jsx("span",{className:"text-sm font-bold",children:l("newPipelineDialog.filename")}),p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:l("newPipelineDialog.filenamePlaceholder"),value:c,onChange:E=>d(E.target.value),autoFocus:!0}),p.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[l("newPipelineDialog.savedAs",{name:m||"xxx.yaml"})," ",l("newPipelineDialog.filenameHint")]})]}),p.jsxs("fieldset",{className:"flex flex-col gap-2",children:[p.jsx("legend",{className:"text-sm font-bold mb-1",children:l("newPipelineDialog.initial")}),p.jsx(Kp,{value:"blank",current:f,label:l("newPipelineDialog.blankLabel"),desc:l("newPipelineDialog.blankDesc"),onSelect:h}),p.jsx(Kp,{value:"sample",current:f,label:l("newPipelineDialog.tutorialLabel"),desc:l("newPipelineDialog.tutorialDesc"),onSelect:h,disabled:!a,disabledReason:l("newPipelineDialog.tutorialDisabled")}),p.jsx(Kp,{value:"active",current:f,label:l("newPipelineDialog.copyLabel"),desc:l("newPipelineDialog.copyDesc"),onSelect:h,disabled:!n,disabledReason:l("newPipelineDialog.copyDisabled")})]}),p.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[p.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:s,children:l("newPipelineDialog.cancel")}),p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!x||s,"aria-label":l("newPipelineDialog.createAria"),children:[s?p.jsx(Bt,{size:13,strokeWidth:3,className:"animate-spin"}):p.jsx(Pi,{size:13,strokeWidth:3}),l("newPipelineDialog.create")]})]})]})]})})}function Kp({value:e,current:t,label:n,desc:a,onSelect:s,disabled:l,disabledReason:c}){const d=t===e;return p.jsxs("label",{className:["flex items-start gap-2 p-2 rounded-lg border-2 cursor-pointer",l?"border-[var(--color-border-light)] opacity-50 cursor-not-allowed":d?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"border-[var(--color-border-light)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[p.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:d,disabled:l,onChange:()=>s(e),className:"mt-1 flex-shrink-0"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("div",{className:"text-sm font-bold",children:n}),p.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:l?c:a})]})]})}function Q3(){var c;const{t:e}=Fe("projects"),{name:t=""}=jw(),n=Cr(),[a,s]=O.useState("overview"),l=ct({queryKey:["project",t],queryFn:()=>lI(t),enabled:!!t});return p.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[p.jsxs("header",{className:"flex items-center gap-3",children:[p.jsxs("button",{type:"button",onClick:()=>n("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("detail.backAria"),children:[p.jsx(Kw,{size:14,strokeWidth:3}),e("detail.back")]}),p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:t}),p.jsx(bs,{to:`/board?project=${encodeURIComponent(t)}`,className:"nb-btn nb-btn-mint",children:e("detail.board")})]}),p.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[p.jsx(fd,{current:a,value:"overview",onSelect:s,icon:h2,children:e("detail.tabs.overview")}),p.jsx(fd,{current:a,value:"config",onSelect:s,icon:Xw,children:e("detail.tabs.config")}),p.jsx(fd,{current:a,value:"pipelines",onSelect:s,icon:tE,children:"Pipelines"}),p.jsx(fd,{current:a,value:"danger",onSelect:s,icon:Kl,children:e("detail.tabs.danger")})]}),a==="overview"&&p.jsx(Y3,{name:t,data:l.data,loading:l.isLoading}),a==="config"&&p.jsx(W3,{name:t}),a==="pipelines"&&p.jsx(X3,{name:t}),a==="danger"&&p.jsx(Z3,{name:t,repoDir:((c=l.data)==null?void 0:c.repoDir)??null})]})}function fd({current:e,value:t,onSelect:n,icon:a,children:s}){const l=e===t;return p.jsxs("button",{type:"button",onClick:()=>n(t),"aria-current":l?"page":void 0,className:["nb-btn",l?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[p.jsx(a,{size:13,strokeWidth:2.5}),s]})}function Y3({name:e,data:t,loading:n}){const{t:a}=Fe("projects");return n?p.jsx("div",{className:"nb-card",children:p.jsx("p",{className:"text-[var(--color-text-muted)]",children:a("detail.loading")})}):t?p.jsx("div",{className:"nb-card",children:p.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[p.jsx("dt",{className:"font-bold",children:a("detail.repo")}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),p.jsx("dt",{className:"font-bold",children:a("detail.pmBackend")}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),p.jsx("dt",{className:"font-bold",children:"Agent"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),p.jsx("dt",{className:"font-bold",children:a("detail.cards")}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:a("detail.cardsSummary",{total:t.cards.total,ip:t.cards.inprogress,done:t.cards.done})}),p.jsx("dt",{className:"font-bold",children:a("detail.workers")}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:a("detail.workersSummary",{total:t.workers.total,active:t.workers.active})}),p.jsx("dt",{className:"font-bold",children:"Pipeline"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),p.jsx("dt",{className:"font-bold",children:a("detail.lastActivity")}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):p.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:p.jsx("p",{children:a("detail.notFound",{name:e})})})}function W3({name:e}){const{t}=Fe("projects"),n=Vn(),{alert:a}=ui(),{data:s,isLoading:l,isError:c,error:d,refetch:f}=ct({queryKey:["project-conf",e],queryFn:()=>cI(e)}),[h,b]=O.useState(null),[m,x]=O.useState(null);O.useEffect(()=>{s&&h===null&&(b(s.content),x(s.etag))},[s,h]);const v=h!==null&&s!==void 0&&h!==s.content,E=Gn({mutationFn:()=>{if(h===null||m===null)throw new Error("no draft");return uI(e,h,m)},onSuccess:w=>{x(w.etag),n.invalidateQueries({queryKey:["project-conf",e]}),n.invalidateQueries({queryKey:["project",e]})},onError:w=>{const k=w.status;a({title:t(k===409?"detail.config.etagConflict":"detail.config.saveFailed"),body:k===409?t("detail.config.etagConflictBody"):w instanceof Error?w.message:String(w)})}});return l?p.jsx("div",{className:"nb-card",children:p.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("detail.config.loading")})}):c?p.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:p.jsx("p",{children:t("detail.config.loadFailed",{error:d instanceof Error?d.message:String(d)})})}):p.jsxs("div",{className:"nb-card",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:p.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"]})}),m&&p.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",m]})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{b(null),f()},disabled:E.isPending,"aria-label":t("detail.config.reloadAria"),children:[p.jsx(zl,{size:13,strokeWidth:2.5}),t("detail.config.reload")]}),p.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>E.mutate(),disabled:!v||E.isPending,"aria-label":t("detail.config.saveAria"),children:[E.isPending?p.jsx(Bt,{size:13,strokeWidth:3,className:"animate-spin"}):E.isSuccess&&!v?p.jsx(KT,{size:13,strokeWidth:3}):p.jsx(tf,{size:13,strokeWidth:3}),t("detail.config.save")]})]})]}),p.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:h??"",onChange:w=>b(w.target.value),spellCheck:!1,"aria-label":t("detail.config.editorAria")}),v&&p.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:t("detail.config.unsaved")})]})}function X3({name:e}){const{t}=Fe("projects"),n=Vn(),{confirm:a,alert:s}=ui(),{data:l,isLoading:c}=ct({queryKey:["project-pipelines",e],queryFn:()=>fI(e)}),[d,f]=O.useState(null),[h,b]=O.useState(!1),m=Gn({mutationFn:w=>hI(e,w),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:w=>{s({title:t("detail.pipeline.switchFailed"),body:w instanceof Error?w.message:String(w)})}}),x=Gn({mutationFn:w=>bI(e,w),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:w=>{s({title:t("detail.pipeline.deleteFailed"),body:w instanceof Error?w.message:String(w)})}}),v=Gn({mutationFn:w=>gI(e,w.name,w.template),onSuccess:w=>{n.invalidateQueries({queryKey:["project-pipelines",e]}),b(!1),f(w.name)},onError:w=>{s({title:t("detail.pipeline.createFailed"),body:w instanceof Error?w.message:String(w)})}});if(c)return p.jsx("div",{className:"nb-card",children:p.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("detail.loading")})});const E=[];l!=null&&l.active&&E.push({name:l.active,isActive:!0});for(const w of(l==null?void 0:l.available)??[])E.push({name:w.name,isActive:!1});return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"nb-card",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:"Pipelines"}),p.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>b(!0),disabled:v.isPending,"aria-label":t("detail.pipeline.newAria"),children:[p.jsx(Pi,{size:12,strokeWidth:3}),t("detail.pipeline.new")]})]}),E.length===0?p.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:t("detail.pipeline.empty")}):p.jsx("ul",{className:"flex flex-col gap-2",children:E.map(w=>p.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[p.jsx(tE,{size:16,strokeWidth:2.5}),p.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:w.name}),w.isActive&&p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"active"}),p.jsxs("div",{className:"flex gap-1",children:[p.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>f(w.name),"aria-label":t("detail.pipeline.editAria",{name:w.name}),children:[p.jsx(xg,{size:11,strokeWidth:2.5}),t("detail.pipeline.edit")]}),!w.isActive&&p.jsxs(p.Fragment,{children:[p.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await a({title:t("detail.pipeline.switchTitle",{name:w.name}),body:t("detail.pipeline.switchBody",{name:w.name}),confirm:t("detail.pipeline.switchConfirm")})&&m.mutate(w.name)},disabled:m.isPending,"aria-label":t("detail.pipeline.switchAria",{name:w.name}),children:t("detail.pipeline.switch")}),p.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await a({title:t("detail.pipeline.deleteTitle",{name:w.name}),body:t("detail.pipeline.deleteBody"),confirm:t("detail.pipeline.deleteConfirm"),danger:!0})&&x.mutate(w.name)},disabled:x.isPending,"aria-label":t("detail.pipeline.deleteAria",{name:w.name}),children:p.jsx(Kl,{size:11,strokeWidth:2.5})})]})]})]},w.name))})]}),d&&p.jsx(q3,{projectName:e,file:d,onClose:()=>f(null),onSaved:()=>{n.invalidateQueries({queryKey:["project-pipelines",e]})}}),h&&p.jsx(V3,{hasActive:!!(l!=null&&l.active),hasSample:!0,isPending:v.isPending,onCancel:()=>b(!1),onCreate:(w,k)=>v.mutate({name:w,template:k})})]})}function Z3({name:e,repoDir:t}){const{t:n}=Fe("projects"),a=Cr(),s=Vn(),{alert:l}=ui(),[c,d]=O.useState(""),[f,h]=O.useState(!0),b=Gn({mutationFn:()=>dI(e,{includeClaudeDir:f}),onSuccess:m=>{s.invalidateQueries({queryKey:["projects"]});const x=m.claudeRemoved.filter(v=>v.ok).map(v=>v.path);l({title:n("detail.danger.deletedTitle"),body:x.length>0?n("detail.danger.deletedBodyClean",{paths:x.join(`
520
+ `)}):n("detail.danger.deletedBody")}).then(()=>a("/projects"))},onError:m=>{l({title:n("detail.danger.deleteFailed"),body:m instanceof Error?m.message:String(m)})}});return p.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:n("detail.danger.delete")}),p.jsx("p",{className:"text-sm mb-4",children:n("detail.danger.deleteHint",{path:`~/.coral/projects/${e}/`})}),t&&p.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:[p.jsx("input",{type:"checkbox",checked:f,onChange:m=>h(m.target.checked),className:"mt-0.5"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("div",{className:"text-sm font-bold",children:n("detail.danger.alsoCleanRepo")}),p.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),p.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:n("detail.danger.repoUntouched")})]})]}),p.jsx("div",{className:"mb-4",children:p.jsxs("label",{className:"flex flex-col gap-1.5",children:[p.jsx("span",{className:"text-sm font-bold",children:n("detail.danger.confirmType",{name:e})}),p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:c,onChange:m=>d(m.target.value),placeholder:e})]})}),p.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:c!==e||b.isPending,onClick:()=>b.mutate(),"aria-label":n("detail.danger.deleteAria"),children:[b.isPending?p.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(Kl,{size:14,strokeWidth:3}),n("detail.danger.deleteBtn")]})]})}function zg(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return qt(`/api/skills${t}`)}function J3(e){return qt(`/api/skills/${encodeURIComponent(e)}`)}function ez(e,t){return qt(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function bf(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function tz(e,t){return bf(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function nz(e,t){return fetch(`/api/skills/${encodeURIComponent(e)}/link?project=${encodeURIComponent(t)}`,{method:"DELETE"}).then(n=>{if(!n.ok)throw new Error(`${n.status}`);return n.json()})}function iz(e,t){return bf(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function az(e,t){return bf(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function rz(){return bf("/api/skills/sync")}function sz({project:e,isPending:t,onCancel:n,onCreate:a}){var A;const{t:s}=Fe("board"),[l,c]=O.useState(""),[d,f]=O.useState(""),[h,b]=O.useState(new Set),[m,x]=O.useState(!1),v=ct({queryKey:["skills-all",e],queryFn:()=>zg(e)});O.useEffect(()=>{const T=L=>{L.key==="Escape"&&n()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[n]);const w=l.trim().length>0&&l.trim().length<=200&&!t,k=T=>{const L=new Set(h);L.has(T)?L.delete(T):L.add(T),b(L)},N=()=>{w&&a({title:l.trim(),description:d.trim(),skills:[...h],labels:["AI-PIPELINE"],initialState:m?"Backlog":"Planning"})},C=((A=v.data)==null?void 0:A.data)??[];return p.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",children:p.jsxs("div",{className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[p.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:s("newCardDialog.title")}),p.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":s("newCardDialog.closeAria"),children:p.jsx(Ci,{size:14,strokeWidth:3})})]}),p.jsxs("form",{onSubmit:T=>{T.preventDefault(),N()},className:"flex flex-col gap-4 overflow-auto",children:[p.jsxs("label",{className:"flex flex-col gap-1.5",children:[p.jsx("span",{className:"text-sm font-bold",children:s("newCardDialog.titleField")}),p.jsx("input",{type:"text",className:"nb-input w-full",placeholder:s("newCardDialog.titlePlaceholder"),value:l,onChange:T=>c(T.target.value),maxLength:200,autoFocus:!0,required:!0}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCardDialog.titleHint")})]}),p.jsxs("label",{className:"flex flex-col gap-1.5",children:[p.jsx("span",{className:"text-sm font-bold",children:s("newCardDialog.descField")}),p.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:s("newCardDialog.descPlaceholder"),value:d,onChange:T=>f(T.target.value)}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCardDialog.descHint")})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("span",{className:"text-sm font-bold",children:s("card.skills")}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCardDialog.skillsHint")}),v.isLoading&&p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("newCardDialog.loadingSkills")}),v.isError&&p.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:s("newCardDialog.loadFailed",{error:v.error instanceof Error?v.error.message:String(v.error)})}),C.length>0&&p.jsx("div",{className:"flex flex-wrap gap-2",children:C.map(T=>{const L=h.has(T.name);return p.jsx("button",{type:"button",onClick:()=>k(T.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",L?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),"aria-pressed":L,children:T.name},T.name)})}),h.size>0&&p.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCardDialog.selected",{count:h.size,names:[...h].join(", ")})})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("span",{className:"text-sm font-bold",children:s("newCardDialog.dispatchField")}),p.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none p-3 border-[2px] border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)]",children:[p.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:m,onChange:T=>x(T.target.checked)}),p.jsxs("div",{className:"flex-1",children:[p.jsx("div",{className:"text-sm font-bold",children:s("newCardDialog.dispatchToggle")}),p.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:[s("newCardDialog.dispatchOff")," ",s("newCardDialog.dispatchOn")]})]})]})]})]}),p.jsxs("div",{className:"flex gap-2 justify-end mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[p.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:s("newCardDialog.cancel")}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:N,disabled:!w,type:"button","aria-label":s("newCardDialog.createAria"),children:[t?p.jsx(Bt,{size:13,strokeWidth:3,className:"animate-spin"}):p.jsx(Pi,{size:13,strokeWidth:3}),s("newCardDialog.create")]})]})]})})}function lz(e){return qt(`/api/projects/${encodeURIComponent(e)}/cards`)}function oz(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function Zl(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const a=await n.text();throw new Error(`${n.status} ${n.statusText}: ${a}`)}return n.json().catch(()=>({}))}function cz(e,t){return Zl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function uz(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function dz(e,t){return Zl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function fz(e,t){const n=typeof t=="string"?{title:t}:t;return Zl(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function hz(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}}async function pz(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}function mz(e){return Zl(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function gz(e){return Zl(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function bz(e,t){return Zl(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function yz(e){const t=Vn();O.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=d=>{try{const f=JSON.parse(d.data);t.invalidateQueries({queryKey:["cards",f.project]}),t.invalidateQueries({queryKey:["card",f.project,f.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},l=d=>{try{const f=JSON.parse(d.data);t.invalidateQueries({queryKey:["workers",f.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=d=>{try{const f=JSON.parse(d.data);t.invalidateQueries({queryKey:["pipeline-status",f.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return a.addEventListener("card.created",s),a.addEventListener("card.updated",s),a.addEventListener("card.moved",s),a.addEventListener("card.deleted",s),a.addEventListener("worker.updated",l),a.addEventListener("worker.added",l),a.addEventListener("worker.deleted",l),a.addEventListener("pipeline.status",c),a.addEventListener("pipeline.started",c),a.addEventListener("pipeline.stopped",c),()=>a.close()},[e,t])}const xz=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),vz=new Set(["frontend","backend","mobile","database","devops"]),wz=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),Ez=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function Sz(e){return xz.has(e)?"lang":vz.has(e)?"end":wz.has(e)?"persona":Ez.has(e)?"workflow":"other"}const kz={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function oS({name:e}){const t=kz[Sz(e)];return p.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function cS({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return p.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function Nz({card:e,onClick:t,done:n,draggable:a}){const{t:s,i18n:l}=Fe("board"),c=e.labels.some(d=>d.startsWith("STARTED-"))&&!n;return p.jsxs("article",{onClick:t,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),t())},draggable:a,onDragStart:d=>{d.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),d.dataTransfer.effectAllowed="move"},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)]",n?"opacity-60":"",a?"active:cursor-grabbing":""].join(" "),children:[p.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[p.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]}),c&&p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),p.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${n?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&p.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(d=>p.jsx(oS,{name:d},d)),e.labels.filter(d=>d==="NEEDS-FIX").map(d=>p.jsx(cS,{label:d,kind:"warn"},d))]}),e.checklist&&e.checklist.total>0&&p.jsx(_z,{stats:e.checklist}),p.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:[p.jsx("span",{children:Cz(e.updatedAt??e.createdAt,s("card.justNow"),l.resolvedLanguage)}),e.branch&&p.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function _z({stats:e}){const{t}=Fe("board");return p.jsxs("div",{className:"mb-2",children:[p.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[p.jsx("span",{className:"font-bold",children:t("cardModal.checklistCount",{done:e.done,total:e.total})}),p.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),p.jsx("div",{className:"w-full h-1.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full overflow-hidden mb-1.5",children:p.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),p.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((n,a)=>p.jsxs("li",{className:`flex items-start gap-1 ${n.done?"opacity-60 line-through":""}`,children:[p.jsx("span",{className:"flex-shrink-0 mt-0.5",children:n.done?"✓":"○"}),p.jsx("span",{className:"line-clamp-1",children:n.text})]},a)),e.items.length>3&&p.jsx("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:t("card.checklistMore",{count:e.items.length-3})})]})]})}function Cz(e,t="just now",n){if(!e)return"—";const a=new Date(e),s=Date.now()-a.getTime();return s<6e4?t:s<36e5?`${Math.floor(s/6e4)}m ago`:s<864e5?`${Math.floor(s/36e5)}h ago`:a.toLocaleDateString(n)}function Az({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const[l,c]=O.useState(!1);return p.jsxs("div",{className:["flex flex-col p-3 rounded-2xl border-[3px] min-h-[280px] h-full min-h-0 overflow-hidden","transition-all",l?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:d=>{!s||!d.dataTransfer.types.includes("application/x-sps-card-seq")||(d.preventDefault(),d.dataTransfer.dropEffect="move",l||c(!0))},onDragLeave:()=>c(!1),onDrop:d=>{if(c(!1),!s)return;const f=d.dataTransfer.getData("application/x-sps-card-seq"),h=Number.parseInt(f,10);Number.isFinite(h)&&(d.preventDefault(),s(h))},children:[p.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 mb-2 border-b-2 border-[var(--color-text)] shrink-0",children:[p.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),p.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:n.length})]}),p.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto pr-1 -mr-1",style:{scrollbarWidth:"thin",scrollbarColor:"var(--color-text) transparent"},children:[n.length===0&&p.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),n.map(d=>p.jsx(Nz,{card:d,onClick:()=>a(d),done:e==="Done",draggable:!!s},d.seq))]})]})}function qm(e,t){if(!e)return"";const n=Array.isArray(t)?t:[t],a=e.split(`
521
+ `);for(const s of n){const l=new RegExp(`^##\\s+${s}\\s*$`),c=a.findIndex(f=>l.test(f));if(c===-1)continue;let d=a.length;for(let f=c+1;f<a.length;f++)if(/^##\s+/.test(a[f]??"")){d=f;break}return a.slice(c+1,d).join(`
522
+ `).trim()}return""}function Gp(e){return qm(e,["Description","描述"])}function Tz({project:e,seq:t,onClose:n,onChanged:a}){var oe,ce,ne,j,D,Y,R,ye,X,fe,he;const{t:s}=Fe("board"),l=Vn(),{confirm:c,alert:d}=ui(),{data:f,isLoading:h,isError:b,error:m,refetch:x}=ct({queryKey:["card",e,t],queryFn:()=>oz(e,t)}),[v,E]=O.useState(!1),[w,k]=O.useState(""),[N,C]=O.useState(""),[A,T]=O.useState(new Set),[L,M]=O.useState([]),[U,$]=O.useState(""),te=ct({queryKey:["skills-all",e],queryFn:()=>zg(e),enabled:v}),Q=((ce=(oe=ct({queryKey:["projects"],queryFn:Ar,refetchInterval:1e4}).data)==null?void 0:oe.data.find(K=>K.name===e))==null?void 0:ce.pipelineStatus)==="running";O.useEffect(()=>{v&&f&&(k(f.title),C(Gp(f.body)),T(new Set(f.skills)),M([...f.labels]))},[v,f]),O.useEffect(()=>{const K=ue=>{ue.key==="Escape"&&(v?E(!1):n())};return window.addEventListener("keydown",K),()=>window.removeEventListener("keydown",K)},[n,v]);const J=Gn({mutationFn:()=>{if(!f)throw new Error("no data");const K={},ue=w.trim();ue&&ue!==f.title&&(K.title=ue);const Oe=Gp(f.body);N!==Oe&&(K.description=N);const dt=[...A].sort(),ft=[...f.skills].sort();return JSON.stringify(dt)!==JSON.stringify(ft)&&(K.skills=dt),JSON.stringify(L)!==JSON.stringify(f.labels)&&(K.labels=L),Object.keys(K).length===0?Promise.resolve({ok:!0,noop:!0}):pz(e,t,K)},onSuccess:()=>{l.invalidateQueries({queryKey:["card",e,t]}),l.invalidateQueries({queryKey:["cards",e]}),E(!1),a()},onError:K=>{d({title:s("cardModal.saveFailed"),body:K instanceof Error?K.message:String(K)})}}),me=O.useMemo(()=>{if(!v||!f)return!1;if(w.trim()!==f.title||N!==Gp(f.body))return!0;const K=[...A].sort(),ue=[...f.skills].sort();return JSON.stringify(K)!==JSON.stringify(ue)||JSON.stringify(L)!==JSON.stringify(f.labels)},[v,f,w,N,A,L]),le=K=>{const ue=new Set(A);ue.has(K)?ue.delete(K):ue.add(K),T(ue)},ee=()=>{const K=U.trim();if(K){if(L.includes(K)){$("");return}M([...L,K]),$("")}},H=K=>{M(L.filter(ue=>ue!==K))};return p.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",children:p.jsxs("div",{className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[p.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[p.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]}),(f==null?void 0:f.state)&&p.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:f.state}),v&&p.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:s("cardModal.editing")})]}),v?p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:w,onChange:K=>k(K.target.value),maxLength:200,"aria-label":s("cardModal.ariaTitle")}):p.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:(f==null?void 0:f.title)??s("cardModal.loading")})]}),p.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!v&&f&&p.jsxs("button",{onClick:()=>E(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":s("cardModal.editAria"),children:[p.jsx(xg,{size:12,strokeWidth:2.5})," ",s("cardModal.edit")]}),p.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":s("cardModal.closeAria"),type:"button",children:p.jsx(Ci,{size:14,strokeWidth:3})})]})]}),h&&p.jsx("p",{className:"text-[var(--color-text-muted)]",children:s("cardModal.loading")}),b&&p.jsx("p",{className:"text-[var(--color-crashed)]",children:s("cardModal.loadFailed",{error:m instanceof Error?m.message:String(m)})}),f&&p.jsxs("div",{className:"flex flex-col gap-4",children:[f.branch&&!v&&p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx(x2,{size:14}),p.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),v?p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),te.isLoading&&p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("cardModal.loadingSkills")}),te.data&&te.data.data.length>0&&p.jsx("div",{className:"flex flex-wrap gap-1.5",children:te.data.data.map(K=>{const ue=A.has(K.name);return p.jsx("button",{type:"button",onClick:()=>le(K.name),"aria-pressed":ue,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",ue?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:K.name},K.name)})})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),p.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[L.map(K=>p.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-accent-yellow)] border-2 border-[var(--color-text)] rounded-full",children:[K,p.jsx("button",{type:"button",onClick:()=>H(K),className:"hover:text-[var(--color-crashed)]","aria-label":s("cardModal.removeLabelAria",{label:K}),children:p.jsx(Ci,{size:10,strokeWidth:3})})]},K)),p.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:s("cardModal.addLabelPlaceholder"),value:U,onChange:K=>$(K.target.value),onKeyDown:K=>{K.key==="Enter"&&!K.nativeEvent.isComposing&&(K.preventDefault(),ee())}}),U&&p.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:ee,"aria-label":s("cardModal.addLabelAria"),children:p.jsx(Pi,{size:10,strokeWidth:3})})]}),p.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:s("cardModal.labelsNote")})]})]}):p.jsxs(p.Fragment,{children:[f.skills.length>0&&p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),p.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.skills.map(K=>p.jsx(oS,{name:K},K))})]}),f.labels.length>0&&p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),p.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.labels.map(K=>p.jsx(cS,{label:K,kind:K==="NEEDS-FIX"?"warn":"default"},K))})]})]}),v?p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("card.description")}),p.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:N,onChange:K=>C(K.target.value),"aria-label":s("cardModal.ariaCardDesc")}),p.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:s("cardModal.descNote")})]}),(((ye=f.checklist)==null?void 0:ye.total)??0)>0&&p.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[p.jsx("div",{className:"flex items-center justify-between mb-2",children:p.jsx("span",{className:"font-bold text-sm",children:s("cardModal.checklistCount",{done:((X=f.checklist)==null?void 0:X.done)??0,total:((fe=f.checklist)==null?void 0:fe.total)??0})})}),p.jsx("ul",{className:"text-sm space-y-1",children:(((he=f.checklist)==null?void 0:he.items)??[]).map((K,ue)=>p.jsxs("li",{className:`flex items-start gap-2 ${K.done?"opacity-60 line-through":""}`,children:[p.jsx("span",{children:K.done?"✓":"○"}),p.jsx("span",{children:K.text})]},ue))})]})]}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("card.description")}),p.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:qm(f.body,["Description","描述"])||s("card.empty")})]}),p.jsxs("div",{children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("cardModal.checklistCount",{done:((ne=f.checklist)==null?void 0:ne.done)??0,total:((j=f.checklist)==null?void 0:j.total)??0})}),p.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((D=f.checklist)==null?void 0:D.total)??0)>0?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"flex items-center justify-end mb-2",children:p.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:p.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${((Y=f.checklist)==null?void 0:Y.percent)??0}%`}})})}),p.jsx("ul",{className:"text-sm space-y-1",children:(((R=f.checklist)==null?void 0:R.items)??[]).map((K,ue)=>p.jsxs("li",{className:`flex items-start gap-2 ${K.done?"opacity-60 line-through":""}`,children:[p.jsx("span",{children:K.done?"✓":"○"}),p.jsx("span",{children:K.text})]},ue))})]}):p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("cardModal.checklistEmpty")})})]}),p.jsxs("div",{children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("card.log")}),p.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:qm(f.body,["Log","日志"])||s("card.empty")})]})]}),p.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:v?p.jsxs(p.Fragment,{children:[p.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{E(!1),x()},disabled:J.isPending,children:s("cardModal.cancel")}),p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>J.mutate(),disabled:!me||!w.trim()||J.isPending,"aria-label":s("cardModal.saveAria"),children:[J.isPending?p.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(tf,{size:14,strokeWidth:3}),s("cardModal.save")]})]}):p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:f.state==="Done"||Q,title:f.state==="Done"?s("cardModal.doneCannotStart"):Q?s("cardModal.pipelineRunningCannotStart"):void 0,onClick:async()=>{try{await dz(e,t),a()}catch(K){d({title:s("cardModal.launchFailed"),body:K instanceof Error?K.message:String(K)})}},children:[p.jsx(vg,{size:14,strokeWidth:3}),s("cardModal.launchWorker")]}),p.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await c({title:s("cardModal.resetTitle",{seq:t}),body:s("cardModal.resetBody"),confirm:s("cardModal.resetConfirm"),danger:!0}))try{await cz(e,t),a(),n()}catch(ue){d({title:s("cardModal.resetFailed"),body:ue instanceof Error?ue.message:String(ue)})}},children:[p.jsx(Ww,{size:14,strokeWidth:2.5}),s("cardModal.resetButton")]}),p.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await c({title:s("cardModal.deleteTitle",{seq:t}),body:s("cardModal.deleteBody",{title:f.title}),confirm:s("cardModal.deleteContinue"),danger:!0})||!await c({title:s("cardModal.deleteFinalTitle"),body:s("cardModal.deleteFinalBody",{seq:t}),confirm:s("cardModal.deleteFinalConfirm"),danger:!0})))try{await uz(e,t),a(),n()}catch(Oe){d({title:s("cardModal.deleteFailed"),body:Oe instanceof Error?Oe.message:String(Oe)})}},"aria-label":s("cardModal.deleteAria"),children:[p.jsx(Kl,{size:14,strokeWidth:2.5}),s("cardModal.deleteButton")]})]})})]})]})})}function Oz({current:e,onChange:t}){const[n,a]=O.useState(!1),s=O.useRef(null),{data:l}=ct({queryKey:["projects"],queryFn:Ar});return O.useEffect(()=>{const c=d=>{var f;(f=s.current)!=null&&f.contains(d.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),p.jsxs("div",{className:"relative",ref:s,children:[p.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:()=>a(c=>!c),children:[e,p.jsx(jc,{size:14,strokeWidth:2.5})]}),n&&l&&p.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:l.data.map(c=>p.jsxs("button",{type:"button",onClick:()=>{t(c.name),a(!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:[p.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),p.jsxs("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:[c.cards.total," cards"]})]},c.name))})]})}const Rz=[{state:"Planning",label:"Planning",bg:"var(--color-accent-purple)"},{state:"Backlog",label:"Backlog",bg:"var(--color-bg-cream)"},{state:"Todo",label:"Todo",bg:"var(--color-accent-yellow)"},{state:"Inprogress",label:"Inprogress",bg:"var(--color-secondary)"},{state:"QA",label:"QA / Review",bg:"var(--color-accent-pink)"},{state:"Done",label:"Done",bg:"var(--color-accent-mint)"}],uS="sps-console:last-board-project";function jz(){if(typeof window>"u")return null;try{return localStorage.getItem(uS)}catch{return null}}function Mz(e){if(!(typeof window>"u"))try{localStorage.setItem(uS,e)}catch{}}function Dz(){var H,oe,ce;const{t:e}=Fe("board"),[t,n]=Pw(),a=t.get("project"),[s,l]=O.useState(null),[c,d]=O.useState(""),[f,h]=O.useState(()=>new Set),[b,m]=O.useState(()=>new Set),{confirm:x,alert:v}=ui();yz(a);const E=ct({queryKey:["projects"],queryFn:Ar}),w=ct({queryKey:["cards",a],queryFn:()=>lz(a??""),enabled:!!a}),k=Vn(),N=()=>{k.invalidateQueries({queryKey:["cards",a]}),k.invalidateQueries({queryKey:["projects"]}),k.invalidateQueries({queryKey:["pipeline-status",a]})},C=ne=>{n({project:ne})};O.useEffect(()=>{var j;if(a){Mz(a);return}const ne=jz();ne&&((j=E.data)!=null&&j.data.some(D=>D.name===ne))&&n({project:ne},{replace:!0})},[a,E.data,n]);const A=Gn({mutationFn:()=>mz(a),onSuccess:()=>{N()},onError:ne=>{v({title:e("errors.startFailed"),body:ne instanceof Error?ne.message:String(ne)})}}),T=Gn({mutationFn:()=>gz(a),onSuccess:()=>N(),onError:ne=>{v({title:e("errors.stopFailed"),body:ne instanceof Error?ne.message:String(ne)})}}),L=Gn({mutationFn:()=>bz(a,{all:!0}),onSuccess:()=>N(),onError:ne=>{v({title:e("errors.resetFailed"),body:ne instanceof Error?ne.message:String(ne)})}}),[M,U]=O.useState(!1),$=Gn({mutationFn:ne=>fz(a,ne),onSuccess:()=>{N(),U(!1)},onError:ne=>{v({title:e("errors.createFailed"),body:ne instanceof Error?ne.message:String(ne)})}}),te=Gn({mutationFn:({seq:ne,state:j})=>hz(a,ne,j),onMutate:async({seq:ne,state:j})=>{await k.cancelQueries({queryKey:["cards",a]});const D=k.getQueryData(["cards",a]);return D&&k.setQueryData(["cards",a],{...D,data:D.data.map(Y=>Y.seq===ne?{...Y,state:j}:Y)}),{prev:D}},onError:(ne,j,D)=>{D!=null&&D.prev&&k.setQueryData(["cards",a],D.prev),v({title:e("errors.moveFailed"),body:ne instanceof Error?ne.message:String(ne)})},onSettled:()=>{k.invalidateQueries({queryKey:["cards",a]})}}),P=((H=w.data)==null?void 0:H.data)??[],{allSkills:Q,allLabels:J}=O.useMemo(()=>{const ne=new Set,j=new Set;for(const D of P){for(const Y of D.skills)ne.add(Y);for(const Y of D.labels)j.add(Y)}return{allSkills:[...ne].sort(),allLabels:[...j].sort()}},[P]);if(!a)return p.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("title")}),p.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("selectProject")}),p.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:e("selectHint")}),p.jsx("div",{className:"flex flex-wrap gap-2",children:(oe=E.data)==null?void 0:oe.data.map(ne=>p.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>C(ne.name),type:"button",children:ne.name},ne.name))})]})]});const me=P.filter(ne=>{if(c){const j=c.toLowerCase();if(!(ne.title.toLowerCase().includes(j)||ne.skills.some(Y=>Y.toLowerCase().includes(j))||ne.labels.some(Y=>Y.toLowerCase().includes(j))))return!1}return!(f.size>0&&!ne.skills.some(D=>f.has(D))||b.size>0&&!ne.labels.some(D=>b.has(D)))}),le=(ce=E.data)==null?void 0:ce.data.find(ne=>ne.name===a),ee=(le==null?void 0:le.pipelineStatus)==="running";return p.jsxs("div",{className:"flex flex-col gap-4 max-w-full flex-1 min-h-0",children:[p.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 shrink-0",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("titleEmoji")}),p.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:le?e("summary",{name:le.name,cards:le.cards.total,workers:le.workers.active}):e("loadingProject")})]}),p.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[p.jsx(Oz,{current:a,onChange:C}),p.jsxs("button",{className:ee?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>ee?T.mutate():A.mutate(),disabled:A.isPending||T.isPending,type:"button","aria-label":e(ee?"actions.ariaStopPipeline":"actions.ariaStartPipeline"),title:e(ee?"actions.ariaStopPipeline":"actions.ariaStartPipeline"),children:[A.isPending||T.isPending?p.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):ee?p.jsx(Zw,{size:14,strokeWidth:3}):p.jsx(vg,{size:14,strokeWidth:3}),e(ee?"actions.stop":"actions.start")]}),p.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await x({title:e("errors.resetTitle"),body:e("errors.resetBody"),confirm:e("errors.resetConfirm"),danger:!0})&&L.mutate()},disabled:L.isPending,children:[L.isPending?p.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(Ww,{size:14,strokeWidth:2.5}),e("actions.reset")]}),p.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>U(!0),disabled:$.isPending,children:[$.isPending?p.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(Pi,{size:14,strokeWidth:3}),e("actions.newCard")]})]})]}),p.jsxs("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[p.jsxs("div",{className:"relative flex-1 max-w-md",children:[p.jsx(Dd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),p.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("actions.searchPlaceholder"),value:c,onChange:ne=>d(ne.target.value),"aria-label":e("actions.ariaSearch")})]}),p.jsx(G0,{label:"skill",options:Q,selected:f,onChange:h}),p.jsx(G0,{label:"label",options:J,selected:b,onChange:m}),(c||f.size>0||b.size>0)&&p.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{d(""),h(new Set),m(new Set)},type:"button","aria-label":e("actions.ariaClearFilter"),children:[p.jsx(Ci,{size:11,strokeWidth:3}),e("actions.clear")]}),p.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[p.jsx(b2,{size:12}),me.length," / ",P.length]})]}),w.isError&&p.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[p.jsx("p",{className:"font-semibold",children:e("errors.loadFailed")}),p.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:w.error instanceof Error?w.error.message:String(w.error)})]}),!w.isError&&p.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 auto-rows-fr gap-3 flex-1 min-h-0",children:Rz.map(ne=>p.jsx(Az,{label:ne.label,bg:ne.bg,cards:me.filter(Lz(ne.state)),onCardClick:j=>l(j.seq),onDropCard:j=>te.mutate({seq:j,state:ne.state})},ne.state))}),s!==null&&p.jsx(Tz,{project:a,seq:s,onClose:()=>l(null),onChanged:N}),M&&p.jsx(sz,{project:a,isPending:$.isPending,onCancel:()=>U(!1),onCreate:ne=>$.mutate(ne)})]})}function Lz(e){return t=>e==="QA"?t.state==="QA"||t.state==="Review":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function G0({label:e,options:t,selected:n,onChange:a}){const{t:s}=Fe("board"),[l,c]=O.useState(!1),d=O.useRef(null);O.useEffect(()=>{if(!l)return;const m=v=>{var E;(E=d.current)!=null&&E.contains(v.target)||c(!1)},x=v=>{v.key==="Escape"&&c(!1)};return window.addEventListener("click",m),window.addEventListener("keydown",x),()=>{window.removeEventListener("click",m),window.removeEventListener("keydown",x)}},[l]);const f=m=>{const x=new Set(n);x.has(m)?x.delete(m):x.add(m),a(x)},h=t.length===0,b=n.size;return p.jsxs("div",{ref:d,className:"relative",children:[p.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!h&&c(m=>!m),disabled:h,"aria-haspopup":"listbox","aria-expanded":l,"aria-label":s("actions.ariaFilterBy",{label:e}),children:[e,b>0&&p.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:b}),p.jsx(jc,{size:11,strokeWidth:3,className:["transition-transform",l?"rotate-180":""].join(" ")})]}),l&&p.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(m=>{const x=n.has(m);return p.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",x?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[p.jsx("input",{type:"checkbox",checked:x,onChange:()=>f(m),className:"flex-shrink-0"}),p.jsx("span",{className:"truncate",children:m})]},m)}),b>0&&p.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:()=>a(new Set),children:s("actions.clearSelection")})]})]})}function Iz(){return qt("/api/workers/all")}function zz(e){return qt(`/api/projects/${encodeURIComponent(e)}/workers`)}function Bz(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function dS(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function V0(e,t){return dS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function Uz(e,t,n){return dS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function Bg({state:e}){const n={running:{bg:"var(--color-running-bg)",color:"var(--color-running)",label:"running"},starting:{bg:"var(--color-secondary)",color:"var(--color-text)",label:"starting",icon:p.jsx(Bt,{size:9,strokeWidth:3,className:"animate-spin"})},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)",label:"stuck"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)",label:"crashed",icon:p.jsx(J2,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return p.jsxs("span",{className:"nb-status inline-flex items-center gap-1",style:{background:n.bg,color:n.color},children:[n.icon,n.label]})}function Ug(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m`:a>0?`${a}m ${s}s`:`${s}s`}function Pz(e){if(e==null||e<=0)return"text-[var(--color-text-muted)]";const t=e/6e4;return t<10?"text-[var(--color-running)]":t<60?"text-[var(--color-stuck)]":"text-[var(--color-crashed)]"}function Pg(e){const t=Date.now()-new Date(e).getTime();return t<6e4?sn.t("workers:format.secondsAgo",{value:Math.floor(t/1e3)}):t<36e5?sn.t("workers:format.minutesAgo",{value:Math.floor(t/6e4)}):sn.t("workers:format.hoursAgo",{value:Math.floor(t/36e5)})}function Fz({alerts:e,selected:t,onSelect:n}){const{t:a}=Fe("workers");return e.length===0?p.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[p.jsx(bc,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),p.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:a("alerts.allHealthy")})]}):p.jsxs("section",{children:[p.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2 text-[var(--color-crashed)]",children:[p.jsx(oO,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),p.jsx("div",{className:"flex flex-col gap-2",children:e.map(s=>{const l=(t==null?void 0:t.project)===s.project&&(t==null?void 0:t.slot)===s.slot;return p.jsxs("button",{type:"button",onClick:()=>n(s.project,s.slot),className:["nb-card p-3 text-left",s.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",l?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx(Bg,{state:s.state}),p.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[s.project,"/worker-",s.slot]}),s.card&&p.jsxs("span",{className:"truncate",children:["#",s.card.seq," ",s.card.title]}),p.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[p.jsx(n2,{size:10,strokeWidth:2.5}),Ug(s.runtimeMs)]})]}),s.markerUpdatedAt&&p.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:s.state==="crashed"?a("alerts.pidDead"):a("alerts.markerStalled",{relative:Pg(s.markerUpdatedAt)})})]},`${s.project}-${s.slot}`)})})]})}function $z({active:e,selected:t,onSelect:n}){return e.length===0?p.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"没有 worker 在运行。"})}):p.jsxs("section",{children:[p.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[p.jsx(Jd,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return p.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx(Bg,{state:a.state}),p.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[a.project,"/worker-",a.slot]}),p.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${Pz(a.runtimeMs)}`,children:Ug(a.runtimeMs)})]}),a.card&&p.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",a.card.seq," · ",a.card.title]}),p.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[a.stage&&p.jsxs("span",{children:["stage: ",a.stage]}),a.markerUpdatedAt&&p.jsxs("span",{className:"ml-auto",children:["marker ",Pg(a.markerUpdatedAt)]})]}),a.lastLogLine&&p.jsxs("div",{className:"text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded px-2 py-1 mt-2 truncate",children:[p.jsx(Jw,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function Hz({capacity:e,selected:t,onSelect:n}){const{t:a}=Fe("workers");return e.length===0?null:p.jsxs("section",{children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2",children:a("capacity.title")}),p.jsx("div",{className:"nb-card p-0 overflow-hidden",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[p.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:a("capacity.project")}),p.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:a("capacity.inUse")}),p.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),p.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:a("capacity.other")}),p.jsx("th",{className:"px-3 py-2"})]})}),p.jsx("tbody",{children:e.map(s=>{const l=s.running+s.starting+s.stuck+s.crashed,c=(t==null?void 0:t.project)===s.project;return p.jsxs("tr",{onClick:()=>n(s.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",c?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[p.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:s.project}),p.jsx("td",{className:"px-3 py-2",children:p.jsx(qz,{total:s.total,cap:s})}),p.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[p.jsx("span",{className:"text-[var(--color-running)] font-bold",children:s.running}),p.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",s.total]})]}),p.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[s.starting>0&&p.jsxs("span",{className:"mr-2",children:["starting ",s.starting]}),s.stuck>0&&p.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",s.stuck]}),s.crashed>0&&p.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",s.crashed]}),l===0&&p.jsx("span",{children:"idle"})]}),p.jsx("td",{className:"px-3 py-2 text-right",children:p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a("capacity.details")})})]},s.project)})})]})})]})}function qz({total:e,cap:t}){const n=[];for(let a=0;a<t.crashed;a++)n.push("crashed");for(let a=0;a<t.stuck;a++)n.push("stuck");for(let a=0;a<t.starting;a++)n.push("starting");for(let a=0;a<t.running;a++)n.push("running");for(let a=0;a<t.idle;a++)n.push("idle");return p.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((a,s)=>p.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:Kz(a)},title:a},s)),p.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] ml-2 font-[family-name:var(--font-mono)]",children:[e," slot",e!==1?"s":""]})]})}function Kz(e){switch(e){case"running":return"var(--color-running-bg)";case"starting":return"var(--color-secondary)";case"stuck":return"var(--color-stuck-bg)";case"crashed":return"var(--color-crashed-bg)";default:return"var(--color-idle-bg)"}}function Gz({project:e,initialSlot:t,onChange:n}){var h;const{t:a}=Fe("workers"),s=ct({queryKey:["workers",e],queryFn:()=>zz(e),refetchInterval:3e3}),l=((h=s.data)==null?void 0:h.data)??[],[c,d]=O.useState(null);O.useEffect(()=>{if(l.length===0){d(null);return}const b=l[0].slot;d(m=>m!=null&&l.some(x=>x.slot===m)?m:t!=null&&l.some(x=>x.slot===t)?t:b)},[e,t,l.length]);const f=l.find(b=>b.slot===c)??null;return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[p.jsxs("div",{className:"flex items-center justify-between mb-2",children:[p.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:e}),p.jsx(bs,{to:`/board?project=${encodeURIComponent(e)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:a("capacity.boardLink")})]}),s.isLoading&&l.length===0?p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("capacity.loadingWorkers")}):l.length===0?p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("capacity.noSlots")}):p.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(b=>p.jsx(Vz,{worker:b,active:b.slot===c,onClick:()=>d(b.slot)},b.slot))})]}),f?p.jsx(Qz,{project:e,worker:f,onChange:n}):p.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:p.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:l.length===0?a("capacity.noWorkers"):a("capacity.selectWorker")})})]})}function Vz({worker:e,active:t,onClick:n}){const{t:a}=Fe("workers");return p.jsxs("button",{type:"button",onClick:n,className:["nb-card p-2 text-left min-w-[130px] transition-transform",t?"ring-4 ring-[var(--color-text)]":"opacity-80 hover:opacity-100"].join(" "),children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx(Bg,{state:e.state}),p.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs",children:["worker-",e.slot]})]}),e.card?p.jsxs("div",{className:"text-[11px] truncate font-[family-name:var(--font-mono)]",children:["#",e.card.seq," ",e.card.title]}):p.jsx("div",{className:"text-[11px] text-[var(--color-text-muted)] italic",children:a("capacity.idle")})]})}function Qz({project:e,worker:t,onChange:n}){var b,m;const{t:a}=Fe("workers"),{confirm:s,alert:l}=ui(),c=t.state==="crashed"||t.state==="stuck",d=ct({queryKey:["worker-detail",e,t.slot],queryFn:()=>Bz(e,t.slot),refetchInterval:3e3}),f=((b=d.data)==null?void 0:b.recentOutput)??[],h=((m=d.data)==null?void 0:m.recentLogs)??[];return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[t.card?p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:a("capacity.currentCard")}),p.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",t.card.seq," · ",t.card.title]})]}):p.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:a("capacity.slotIdle")}),p.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[p.jsx("dt",{className:"font-bold",children:"Stage"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.stage??"—"}),p.jsx("dt",{className:"font-bold",children:"PID"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pid??"—"}),p.jsx("dt",{className:"font-bold",children:"Runtime"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:Ug(t.runtimeMs)}),p.jsx("dt",{className:"font-bold",children:"Started"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.startedAt?new Date(t.startedAt).toLocaleString():"—"}),p.jsx("dt",{className:"font-bold",children:"Marker"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.markerUpdatedAt?Pg(t.markerUpdatedAt):"—"})]}),p.jsxs("div",{children:[p.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[p.jsx(Jw,{size:10,strokeWidth:2.5}),a("capacity.outputRecent",{count:f.length})]}),d.isLoading&&f.length===0?p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("loading")}):f.length===0?p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("capacity.outputEmpty")}):p.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-80 overflow-auto whitespace-pre-wrap break-words",children:f.map(x=>`${x.ts?`${x.ts} [${x.kind}] `:`[${x.kind}] `}${x.text}`).join(`
523
+ `)})]}),h.length>0&&p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:a("capacity.heartbeatRecent",{count:h.length})}),p.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-40 overflow-auto whitespace-pre-wrap break-words opacity-80",children:h.map(x=>`${x.ts??""} [${x.level}] ${x.msg}`).join(`
524
+ `)}),p.jsx(bs,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:a("capacity.viewFullLog")})]})]}),p.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex gap-2 justify-end flex-wrap",children:[c&&t.card&&p.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await s({title:a("actions.restartTitle",{slot:t.slot}),body:a("actions.restartBody",{seq:t.card.seq}),confirm:a("actions.restartConfirm")})){try{await V0(e,t.slot)}catch{}try{await Uz(e,t.slot,t.card.seq),n()}catch(v){l({title:a("actions.restartFailed"),body:v instanceof Error?v.message:String(v)})}}},children:[p.jsx(rO,{size:11,strokeWidth:2.5})," ",a("actions.restart")]}),t.state!=="idle"&&p.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await s({title:a("actions.killTitle",{slot:t.slot}),body:a("actions.killBody"),confirm:a("actions.killConfirm"),danger:!0}))try{await V0(e,t.slot),n()}catch(v){l({title:a("actions.killFailed"),body:v instanceof Error?v.message:String(v)})}},children:[p.jsx(pO,{size:11,strokeWidth:2.5})," ",a("actions.kill")]})]})]})}function Yz(){var c;const{t:e}=Fe("workers"),t=Vn(),[n,a]=O.useState(null),s=ct({queryKey:["workers-agg"],queryFn:Iz,refetchInterval:5e3});O.useEffect(()=>{if(!s.data)return;const d=s.data.capacity.map(h=>h.project),f=[];for(const h of d){const b=new EventSource(`/stream/projects/${encodeURIComponent(h)}`),m=()=>{t.invalidateQueries({queryKey:["workers-agg"]})};b.addEventListener("worker.updated",m),b.addEventListener("worker.added",m),b.addEventListener("worker.deleted",m),b.addEventListener("card.updated",m),f.push(b)}return()=>{for(const h of f)h.close()}},[(c=s.data)==null?void 0:c.capacity.map(d=>d.project).join(","),t]);const l=O.useMemo(()=>{if(!s.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const d={projects:s.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const f of s.data.capacity)d.running+=f.running,d.starting+=f.starting,d.stuck+=f.stuck,d.crashed+=f.crashed,d.idle+=f.idle;return d},[s.data]);return p.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[p.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[p.jsxs("div",{children:[p.jsxs("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:[e("title")," 👷"]}),p.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[e("summary",{projects:l.projects,running:l.running,starting:l.starting}),p.jsx("span",{className:"text-[var(--color-stuck)]",children:e("stuck",{count:l.stuck})})," ·"," ",p.jsx("span",{className:"text-[var(--color-crashed)]",children:e("crashed",{count:l.crashed})}),e("idle",{count:l.idle})]})]}),p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>s.refetch(),disabled:s.isFetching,type:"button","aria-label":e("refreshAria"),children:[s.isFetching?p.jsx(Bt,{size:12,strokeWidth:3,className:"animate-spin"}):p.jsx(zl,{size:12,strokeWidth:2.5}),e("refresh")]})]}),p.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[p.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[s.isLoading&&p.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:e("loading")}),s.isError&&p.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:p.jsx("p",{children:e("loadFailed",{error:s.error instanceof Error?s.error.message:String(s.error)})})}),s.data&&p.jsxs(p.Fragment,{children:[p.jsx(Fz,{alerts:s.data.alerts,selected:n,onSelect:(d,f)=>a({project:d,slot:f})}),p.jsx($z,{active:s.data.active,selected:n,onSelect:(d,f)=>a({project:d,slot:f})}),p.jsx(Hz,{capacity:s.data.capacity,selected:n,onSelect:d=>a({project:d})})]})]}),p.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:n?p.jsx(Gz,{project:n.project,initialSlot:n.slot,onChange:()=>t.invalidateQueries({queryKey:["workers-agg"]})}):p.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:p.jsxs("div",{children:[p.jsx(Jd,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),p.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:e("selectHint")})]})})})]})]})}function Wz(e){const t=new URLSearchParams;return e.project&&t.set("project",e.project),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 Xz(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const Zz=["error","warn","info","debug"],Jz=["error","warn","info"];function eB(){var te,P;const{t:e}=Fe("logs"),[t,n]=Pw(),a=t.get("project"),s=t.get("worker")??"",[l,c]=O.useState([]),[d,f]=O.useState(!1),[h,b]=O.useState(!0),[m,x]=O.useState(()=>new Set(Jz)),[v,E]=O.useState(""),[w,k]=O.useState("live"),[N,C]=O.useState(()=>{const Q=new Date(Date.now()-36e5),J=me=>String(me).padStart(2,"0");return`${Q.getFullYear()}-${J(Q.getMonth()+1)}-${J(Q.getDate())}T${J(Q.getHours())}:${J(Q.getMinutes())}`}),A=O.useRef(null),T=!a,L=ct({queryKey:["projects"],queryFn:Ar}),{data:M,refetch:U}=ct({queryKey:["logs",a??"agg",s,w,w==="history"?N:"live"],queryFn:()=>Wz({project:a||void 0,worker:s||void 0,limit:w==="history"?2e3:500,since:w==="history"?new Date(N).toISOString():void 0}),refetchInterval:T&&w==="live"?5e3:!1});O.useEffect(()=>{M!=null&&M.data&&c(M.data)},[M]),O.useEffect(()=>{if(!a||w!=="live")return;const Q=Xz({project:a,worker:s||void 0}),J=new EventSource(Q);return J.addEventListener("log.line",me=>{if(!d)try{const le=JSON.parse(me.data);c(ee=>{const H=[...ee,le];return H.length>5e3&&H.splice(0,H.length-5e3),H})}catch{}}),()=>J.close()},[a,s,d,w]),O.useEffect(()=>{if(!h)return;const Q=A.current;Q&&(Q.scrollTop=Q.scrollHeight)},[l,h]);const $=O.useMemo(()=>{const Q=v.toLowerCase();return l.filter(J=>!(!m.has(J.level)||Q&&!J.msg.toLowerCase().includes(Q)))},[l,m,v]);return p.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[p.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:p.jsxs("div",{children:[p.jsxs("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:[e("title")," 📜"]}),p.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[e("header",{scope:T?e("scopeAll",{count:((te=L.data)==null?void 0:te.data.length)??0}):a,worker:s?` · worker-${s}`:"",mode:e(T&&w==="live"?"modeLive":"modeTail"),count:l.length}),d&&p.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]})}),p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[p.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:[p.jsxs("button",{type:"button",onClick:()=>k("live"),"aria-pressed":w==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",w==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[p.jsx(Yw,{size:11,strokeWidth:2.5}),e("live")]}),p.jsxs("button",{type:"button",onClick:()=>k("history"),"aria-pressed":w==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",w==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[p.jsx(E2,{size:11,strokeWidth:2.5}),e("history")]})]}),w==="history"&&p.jsxs(p.Fragment,{children:[p.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:N,onChange:Q=>C(Q.target.value),"aria-label":e("queryStartAria")}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>U(),type:"button","aria-label":e("queryAria"),children:[p.jsx(Dd,{size:11,strokeWidth:3}),e("query")]})]}),p.jsxs("div",{className:"relative",children:[p.jsx(yc,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),p.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:a??"",onChange:Q=>{const J=Q.target.value;n(J?{project:J}:{})},"aria-label":e("filterProjectAria"),children:[p.jsx("option",{value:"",children:e("allProjectsOption")}),(P=L.data)==null?void 0:P.data.map(Q=>p.jsx("option",{value:Q.name,children:Q.name},Q.name))]}),p.jsx(jc,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),p.jsxs("div",{className:"relative flex-1 max-w-md",children:[p.jsx(Dd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),p.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("filterPlaceholder"),value:v,onChange:Q=>E(Q.target.value),"aria-label":e("filterAria")})]}),p.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:Zz.map(Q=>p.jsx(tB,{level:Q,enabled:m.has(Q),onToggle:()=>{x(J=>{const me=new Set(J);return me.has(Q)?me.delete(Q):me.add(Q),me})}},Q))}),p.jsxs("div",{className:"ml-auto flex gap-2",children:[w==="live"&&p.jsxs(p.Fragment,{children:[p.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>b(Q=>!Q),type:"button",children:h?"✓ Auto-scroll":"Auto-scroll"}),p.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(Q=>!Q),type:"button",children:d?p.jsxs(p.Fragment,{children:[p.jsx(vg,{size:12,strokeWidth:3})," Resume"]}):p.jsxs(p.Fragment,{children:[p.jsx(P2,{size:12,strokeWidth:3})," Pause"]})})]}),p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const Q=new Blob([$.map(le=>le.raw).join(`
525
+ `)],{type:"text/plain"}),J=URL.createObjectURL(Q),me=document.createElement("a");me.href=J,me.download=`${a}-log-${Date.now()}.log`,me.click(),URL.revokeObjectURL(J)},type:"button",children:[p.jsx(Gw,{size:12,strokeWidth:2.5})," Export"]})]})]}),p.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[p.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:[p.jsx("span",{className:"text-[var(--color-text-muted)]",children:(M==null?void 0:M.file)??"~/.coral/projects/.../logs/*.log"}),w==="live"?p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):p.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),p.jsxs("div",{ref:A,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:Q=>{const J=Q.currentTarget;!(J.scrollHeight-J.scrollTop-J.clientHeight<40)&&h&&b(!1)},children:[$.map((Q,J)=>p.jsx(nB,{line:Q},J)),$.length===0&&p.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:e("noMatches")})]})]})]})}function tB({level:e,enabled:t,onToggle:n}){const a={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},s={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return p.jsx("button",{type:"button",onClick:n,"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:a[e],color:s[e]}:{},children:e.toUpperCase()})}function nB({line:e}){var a;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:""},n=!!e.project;return p.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[p.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((a=e.ts.split("T")[1])==null?void 0:a.replace("Z",""))??e.ts:"--"}),n&&p.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),p.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),p.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function iB(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const aB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sB={};function Q0(e,t){return(sB.jsx?rB:aB).test(e)}const lB=/[ \t\n\f\r]/g;function oB(e){return typeof e=="object"?e.type==="text"?Y0(e.value):!1:Y0(e)}function Y0(e){return e.replace(lB,"")===""}class zc{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}zc.prototype.normal={};zc.prototype.property={};zc.prototype.space=void 0;function fS(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new zc(n,a,t)}function Km(e){return e.toLowerCase()}class Qn{constructor(t,n){this.attribute=n,this.property=t}}Qn.prototype.attribute="";Qn.prototype.booleanish=!1;Qn.prototype.boolean=!1;Qn.prototype.commaOrSpaceSeparated=!1;Qn.prototype.commaSeparated=!1;Qn.prototype.defined=!1;Qn.prototype.mustUseProperty=!1;Qn.prototype.number=!1;Qn.prototype.overloadedBoolean=!1;Qn.prototype.property="";Qn.prototype.spaceSeparated=!1;Qn.prototype.space=void 0;let cB=0;const Ge=vs(),nn=vs(),Gm=vs(),ge=vs(),Ct=vs(),kl=vs(),ri=vs();function vs(){return 2**++cB}const Vm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:nn,commaOrSpaceSeparated:ri,commaSeparated:kl,number:ge,overloadedBoolean:Gm,spaceSeparated:Ct},Symbol.toStringTag,{value:"Module"})),Vp=Object.keys(Vm);class Fg extends Qn{constructor(t,n,a,s){let l=-1;if(super(t,n),W0(this,"space",s),typeof a=="number")for(;++l<Vp.length;){const c=Vp[l];W0(this,Vp[l],(a&Vm[c])===Vm[c])}}}Fg.prototype.defined=!0;function W0(e,t,n){n&&(e[t]=n)}function Jl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const l=new Fg(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(l.mustUseProperty=!0),t[a]=l,n[Km(a)]=a,n[Km(l.attribute)]=a}return new zc(t,n,e.space)}const hS=Jl({properties:{ariaActiveDescendant:null,ariaAtomic:nn,ariaAutoComplete:null,ariaBusy:nn,ariaChecked:nn,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:Ct,ariaCurrent:null,ariaDescribedBy:Ct,ariaDetails:null,ariaDisabled:nn,ariaDropEffect:Ct,ariaErrorMessage:null,ariaExpanded:nn,ariaFlowTo:Ct,ariaGrabbed:nn,ariaHasPopup:null,ariaHidden:nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ct,ariaLevel:ge,ariaLive:null,ariaModal:nn,ariaMultiLine:nn,ariaMultiSelectable:nn,ariaOrientation:null,ariaOwns:Ct,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:nn,ariaReadOnly:nn,ariaRelevant:null,ariaRequired:nn,ariaRoleDescription:Ct,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:nn,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function pS(e,t){return t in e?e[t]:t}function mS(e,t){return pS(e,t.toLowerCase())}const uB=Jl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kl,acceptCharset:Ct,accessKey:Ct,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Ct,autoFocus:Ge,autoPlay:Ge,blocking:Ct,capture:null,charSet:null,checked:Ge,cite:null,className:Ct,cols:ge,colSpan:null,content:null,contentEditable:nn,controls:Ge,controlsList:Ct,coords:ge|kl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Gm,draggable:nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Ct,height:ge,hidden:Gm,high:ge,href:null,hrefLang:null,htmlFor:Ct,httpEquiv:Ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Ct,itemRef:Ct,itemScope:Ge,itemType:Ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:ge,pattern:null,ping:Ct,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Ct,required:Ge,reversed:Ge,rows:ge,rowSpan:ge,sandbox:Ct,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:nn,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ct,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:nn,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:mS}),dB=Jl({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:ri,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:Ct,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:kl,g2:kl,glyphName:kl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:ri,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ri,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ri,rev:ri,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ri,requiredFeatures:ri,requiredFonts:ri,requiredFormats:ri,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:ri,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ri,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ri,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:pS}),gS=Jl({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()}}),bS=Jl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mS}),yS=Jl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fB={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"},hB=/[A-Z]/g,X0=/-[a-z]/g,pB=/^data[-\w.:]+$/i;function mB(e,t){const n=Km(t);let a=t,s=Qn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pB.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(X0,bB);a="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!X0.test(l)){let c=l.replace(hB,gB);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=Fg}return new s(a,t)}function gB(e){return"-"+e.toLowerCase()}function bB(e){return e.charAt(1).toUpperCase()}const yB=fS([hS,uB,gS,bS,yS],"html"),$g=fS([hS,dB,gS,bS,yS],"svg");function xB(e){return e.join(" ").trim()}var hl={},Qp,Z0;function vB(){if(Z0)return Qp;Z0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
526
+ `,h="/",b="*",m="",x="comment",v="declaration";function E(k,N){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];N=N||{};var C=1,A=1;function T(le){var ee=le.match(t);ee&&(C+=ee.length);var H=le.lastIndexOf(f);A=~H?le.length-H:A+le.length}function L(){var le={line:C,column:A};return function(ee){return ee.position=new M(le),te(),ee}}function M(le){this.start=le,this.end={line:C,column:A},this.source=N.source}M.prototype.content=k;function U(le){var ee=new Error(N.source+":"+C+":"+A+": "+le);if(ee.reason=le,ee.filename=N.source,ee.line=C,ee.column=A,ee.source=k,!N.silent)throw ee}function $(le){var ee=le.exec(k);if(ee){var H=ee[0];return T(H),k=k.slice(H.length),ee}}function te(){$(n)}function P(le){var ee;for(le=le||[];ee=Q();)ee!==!1&&le.push(ee);return le}function Q(){var le=L();if(!(h!=k.charAt(0)||b!=k.charAt(1))){for(var ee=2;m!=k.charAt(ee)&&(b!=k.charAt(ee)||h!=k.charAt(ee+1));)++ee;if(ee+=2,m===k.charAt(ee-1))return U("End of comment missing");var H=k.slice(2,ee-2);return A+=2,T(H),k=k.slice(ee),A+=2,le({type:x,comment:H})}}function J(){var le=L(),ee=$(a);if(ee){if(Q(),!$(s))return U("property missing ':'");var H=$(l),oe=le({type:v,property:w(ee[0].replace(e,m)),value:H?w(H[0].replace(e,m)):m});return $(c),oe}}function me(){var le=[];P(le);for(var ee;ee=J();)ee!==!1&&(le.push(ee),P(le));return le}return te(),me()}function w(k){return k?k.replace(d,m):m}return Qp=E,Qp}var J0;function wB(){if(J0)return hl;J0=1;var e=hl&&hl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(hl,"__esModule",{value:!0}),hl.default=n;const t=e(vB());function n(a,s){let l=null;if(!a||typeof a!="string")return l;const c=(0,t.default)(a),d=typeof s=="function";return c.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:b}=f;d?s(h,b,f):b&&(l=l||{},l[h]=b)}),l}return hl}var tc={},e1;function EB(){if(e1)return tc;e1=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},c=function(h,b){return b.toUpperCase()},d=function(h,b){return"".concat(b,"-")},f=function(h,b){return b===void 0&&(b={}),l(h)?h:(h=h.toLowerCase(),b.reactCompat?h=h.replace(s,d):h=h.replace(a,d),h.replace(t,c))};return tc.camelCase=f,tc}var nc,t1;function SB(){if(t1)return nc;t1=1;var e=nc&&nc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(wB()),n=EB();function a(s,l){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(d,f){d&&f&&(c[(0,n.camelCase)(d,l)]=f)}),c}return a.default=a,nc=a,nc}var kB=SB();const NB=ag(kB),xS=vS("end"),Hg=vS("start");function vS(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function _B(e){const t=Hg(e),n=xS(e);if(t&&n)return{start:t,end:n}}function uc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?n1(e.position):"start"in e||"end"in e?n1(e):"line"in e||"column"in e?Qm(e):""}function Qm(e){return i1(e&&e.line)+":"+i1(e&&e.column)}function n1(e){return Qm(e&&e.start)+"-"+Qm(e&&e.end)}function i1(e){return e&&typeof e=="number"?e:1}class En extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",l={},c=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(c=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof a=="string"){const f=a.indexOf(":");f===-1?l.ruleId=a:(l.source=a.slice(0,f),l.ruleId=a.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const d=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=uc(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=c&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}En.prototype.file="";En.prototype.name="";En.prototype.reason="";En.prototype.message="";En.prototype.stack="";En.prototype.column=void 0;En.prototype.line=void 0;En.prototype.ancestors=void 0;En.prototype.cause=void 0;En.prototype.fatal=void 0;En.prototype.place=void 0;En.prototype.ruleId=void 0;En.prototype.source=void 0;const qg={}.hasOwnProperty,CB=new Map,AB=/[A-Z]/g,TB=new Set(["table","tbody","thead","tfoot","tr"]),OB=new Set(["td","th"]),wS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function RB(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=UB(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=BB(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?$g:yB,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=ES(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function ES(e,t,n){if(t.type==="element")return jB(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return MB(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return LB(e,t,n);if(t.type==="mdxjsEsm")return DB(e,t);if(t.type==="root")return IB(e,t,n);if(t.type==="text")return zB(e,t)}function jB(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=$g,e.schema=s),e.ancestors.push(t);const l=kS(e,t.tagName,!1),c=PB(e,t);let d=Gg(e,t);return TB.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!oB(f):!0})),SS(e,c,l,t),Kg(c,d),e.ancestors.pop(),e.schema=a,e.create(t,l,c,n)}function MB(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Sc(e,t.position)}function DB(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Sc(e,t.position)}function LB(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=$g,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:kS(e,t.name,!0),c=FB(e,t),d=Gg(e,t);return SS(e,c,l,t),Kg(c,d),e.ancestors.pop(),e.schema=a,e.create(t,l,c,n)}function IB(e,t,n){const a={};return Kg(a,Gg(e,t)),e.create(t,e.Fragment,a,n)}function zB(e,t){return t.value}function SS(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Kg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function BB(e,t,n){return a;function a(s,l,c,d){const h=Array.isArray(c.children)?n:t;return d?h(l,c,d):h(l,c)}}function UB(e,t){return n;function n(a,s,l,c){const d=Array.isArray(l.children),f=Hg(a);return t(s,l,c,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function PB(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&qg.call(t.properties,s)){const l=$B(e,s,t.properties[s]);if(l){const[c,d]=l;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&OB.has(t.tagName)?a=d:n[c]=d}}if(a){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function FB(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const l=a.data.estree.body[0];l.type;const c=l.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Sc(e,t.position);else{const s=a.name;let l;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,l=e.evaluater.evaluateExpression(d.expression)}else Sc(e,t.position);else l=a.value===null?!0:a.value;n[s]=l}return n}function Gg(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:CB;for(;++a<t.children.length;){const l=t.children[a];let c;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const h=s.get(f)||0;c=f+"-"+h,s.set(f,h+1)}}const d=ES(e,l,c);d!==void 0&&n.push(d)}return n}function $B(e,t,n){const a=mB(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?iB(n):xB(n)),a.property==="style"){let s=typeof n=="object"?n:HB(e,String(n));return e.stylePropertyNameCase==="css"&&(s=qB(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?fB[a.property]||a.property:a.attribute,n]}}function HB(e,t){try{return NB(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new En("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=wS+"#cannot-parse-style-attribute",s}}function kS(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,c;for(;++l<s.length;){const d=Q0(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(l&&d.type==="Literal"),optional:!1}:d}a=c}else a=Q0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return qg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);Sc(e)}function Sc(e,t){const n=new En("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=wS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qB(e){const t={};let n;for(n in e)qg.call(e,n)&&(t[KB(n)]=e[n]);return t}function KB(e){let t=e.replace(AB,GB);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function GB(e){return"-"+e.toLowerCase()}const Yp={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"]},VB={};function Vg(e,t){const n=VB,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return NS(e,a,s)}function NS(e,t,n){if(QB(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return a1(e.children,t,n)}return Array.isArray(e)?a1(e,t,n):""}function a1(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=NS(e[s],t,n);return a.join("")}function QB(e){return!!(e&&typeof e=="object")}const r1=document.createElement("i");function Qg(e){const t="&"+e+";";r1.innerHTML=t;const n=r1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function oi(e,t,n,a){const s=e.length;let l=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)c=Array.from(a),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);l<a.length;)c=a.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function ki(e,t){return e.length>0?(oi(e,e.length,0,t),e):t}const s1={}.hasOwnProperty;function _S(e){const t={};let n=-1;for(;++n<e.length;)YB(t,e[n]);return t}function YB(e,t){let n;for(n in t){const s=(s1.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let c;if(l)for(c in l){s1.call(s,c)||(s[c]=[]);const d=l[c];WB(s[c],Array.isArray(d)?d:d?[d]:[])}}}function WB(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);oi(e,0,0,a)}function CS(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Bi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rn=Or(/[A-Za-z]/),vn=Or(/[\dA-Za-z]/),XB=Or(/[#-'*+\--9=?A-Z^-~]/);function Hd(e){return e!==null&&(e<32||e===127)}const Ym=Or(/\d/),ZB=Or(/[\dA-Fa-f]/),JB=Or(/[!-/:-@[-`{-~]/);function je(e){return e!==null&&e<-2}function kt(e){return e!==null&&(e<0||e===32)}function Xe(e){return e===-2||e===-1||e===32}const yf=Or(new RegExp("\\p{P}|\\p{S}","u")),gs=Or(/\s/);function Or(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function eo(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let c="";if(l===37&&vn(e.charCodeAt(n+1))&&vn(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(c=String.fromCharCode(l));else if(l>55295&&l<57344){const d=e.charCodeAt(n+1);l<56320&&d>56319&&d<57344?(c=String.fromCharCode(l,d),s=1):c="�"}else c=String.fromCharCode(l);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function at(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(f){return Xe(f)?(e.enter(n),d(f)):t(f)}function d(f){return Xe(f)&&l++<s?(e.consume(f),d):(e.exit(n),t(f))}}const e4={tokenize:t4};function t4(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),at(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),l(d)}function l(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return je(d)?(e.consume(d),e.exit("chunkText"),l):(e.consume(d),c)}}const n4={tokenize:i4},l1={tokenize:a4};function i4(e){const t=this,n=[];let a=0,s,l,c;return d;function d(A){if(a<n.length){const T=n[a];return t.containerState=T[1],e.attempt(T[0].continuation,f,h)(A)}return h(A)}function f(A){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&C();const T=t.events.length;let L=T,M;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){M=t.events[L][1].end;break}N(a);let U=T;for(;U<t.events.length;)t.events[U][1].end={...M},U++;return oi(t.events,L+1,0,t.events.slice(T)),t.events.length=U,h(A)}return d(A)}function h(A){if(a===n.length){if(!s)return x(A);if(s.currentConstruct&&s.currentConstruct.concrete)return E(A);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(l1,b,m)(A)}function b(A){return s&&C(),N(a),x(A)}function m(A){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,E(A)}function x(A){return t.containerState={},e.attempt(l1,v,E)(A)}function v(A){return a++,n.push([t.currentConstruct,t.containerState]),x(A)}function E(A){if(A===null){s&&C(),N(0),e.consume(A);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),w(A)}function w(A){if(A===null){k(e.exit("chunkFlow"),!0),N(0),e.consume(A);return}return je(A)?(e.consume(A),k(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(A),w)}function k(A,T){const L=t.sliceStream(A);if(T&&L.push(null),A.previous=l,l&&(l.next=A),l=A,s.defineSkip(A.start),s.write(L),t.parser.lazy[A.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const U=t.events.length;let $=U,te,P;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(te){P=t.events[$][1].end;break}te=!0}for(N(a),M=U;M<t.events.length;)t.events[M][1].end={...P},M++;oi(t.events,$+1,0,t.events.slice(U)),t.events.length=M}}function N(A){let T=n.length;for(;T-- >A;){const L=n[T];t.containerState=L[1],L[0].exit.call(t,e)}n.length=A}function C(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function a4(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Pl(e){if(e===null||kt(e)||gs(e))return 1;if(yf(e))return 2}function xf(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!a.includes(l)&&(t=l(t,n),a.push(l))}return t}const Wm={name:"attention",resolveAll:r4,tokenize:s4};function r4(e,t){let n=-1,a,s,l,c,d,f,h,b;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[a][1].end},x={...e[n][1].start};o1(m,-f),o1(x,f),c={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[a][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},l={type:f>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:f>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[n][1].start={...d.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=ki(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=ki(h,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",l,t]]),h=ki(h,xf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=ki(h,[["exit",l,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(b=2,h=ki(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):b=0,oi(e,a-1,n-a+3,h),n=a+h.length-b-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function s4(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Pl(a);let l;return c;function c(f){return l=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===l)return e.consume(f),d;const h=e.exit("attentionSequence"),b=Pl(f),m=!b||b===2&&s||n.includes(f),x=!s||s===2&&b||n.includes(a);return h._open=!!(l===42?m:m&&(s||!x)),h._close=!!(l===42?x:x&&(b||!m)),t(f)}}function o1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const l4={name:"autolink",tokenize:o4};function o4(e,t,n){let a=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(v){return Rn(v)?(e.consume(v),c):v===64?n(v):h(v)}function c(v){return v===43||v===45||v===46||vn(v)?(a=1,d(v)):h(v)}function d(v){return v===58?(e.consume(v),a=0,f):(v===43||v===45||v===46||vn(v))&&a++<32?(e.consume(v),d):(a=0,h(v))}function f(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Hd(v)?n(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),b):XB(v)?(e.consume(v),h):n(v)}function b(v){return vn(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),a=0,b):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):x(v)}function x(v){if((v===45||vn(v))&&a++<63){const E=v===45?x:m;return e.consume(v),E}return n(v)}}const Bc={partial:!0,tokenize:c4};function c4(e,t,n){return a;function a(l){return Xe(l)?at(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||je(l)?t(l):n(l)}}const AS={continuation:{tokenize:d4},exit:f4,name:"blockQuote",tokenize:u4};function u4(e,t,n){const a=this;return s;function s(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),l}return n(c)}function l(c){return Xe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function d4(e,t,n){const a=this;return s;function s(c){return Xe(c)?at(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(AS,t,n)(c)}}function f4(e){e.exit("blockQuote")}const TS={name:"characterEscape",tokenize:h4};function h4(e,t,n){return a;function a(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return JB(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const OS={name:"characterReference",tokenize:p4};function p4(e,t,n){const a=this;let s=0,l,c;return d;function d(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,c=vn,b(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=ZB,b):(e.enter("characterReferenceValue"),l=7,c=Ym,b(m))}function b(m){if(m===59&&s){const x=e.exit("characterReferenceValue");return c===vn&&!Qg(a.sliceSerialize(x))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(m)&&s++<l?(e.consume(m),b):n(m)}}const c1={partial:!0,tokenize:g4},u1={concrete:!0,name:"codeFenced",tokenize:m4};function m4(e,t,n){const a=this,s={partial:!0,tokenize:L};let l=0,c=0,d;return f;function f(M){return h(M)}function h(M){const U=a.events[a.events.length-1];return l=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,d=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(M)}function b(M){return M===d?(c++,e.consume(M),b):c<3?n(M):(e.exit("codeFencedFenceSequence"),Xe(M)?at(e,m,"whitespace")(M):m(M))}function m(M){return M===null||je(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(c1,w,T)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(M))}function x(M){return M===null||je(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(M)):Xe(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,v,"whitespace")(M)):M===96&&M===d?n(M):(e.consume(M),x)}function v(M){return M===null||je(M)?m(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(M))}function E(M){return M===null||je(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(M)):M===96&&M===d?n(M):(e.consume(M),E)}function w(M){return e.attempt(s,T,k)(M)}function k(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),N}function N(M){return l>0&&Xe(M)?at(e,C,"linePrefix",l+1)(M):C(M)}function C(M){return M===null||je(M)?e.check(c1,w,T)(M):(e.enter("codeFlowValue"),A(M))}function A(M){return M===null||je(M)?(e.exit("codeFlowValue"),C(M)):(e.consume(M),A)}function T(M){return e.exit("codeFenced"),t(M)}function L(M,U,$){let te=0;return P;function P(ee){return M.enter("lineEnding"),M.consume(ee),M.exit("lineEnding"),Q}function Q(ee){return M.enter("codeFencedFence"),Xe(ee)?at(M,J,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):J(ee)}function J(ee){return ee===d?(M.enter("codeFencedFenceSequence"),me(ee)):$(ee)}function me(ee){return ee===d?(te++,M.consume(ee),me):te>=c?(M.exit("codeFencedFenceSequence"),Xe(ee)?at(M,le,"whitespace")(ee):le(ee)):$(ee)}function le(ee){return ee===null||je(ee)?(M.exit("codeFencedFence"),U(ee)):$(ee)}}}function g4(e,t,n){const a=this;return s;function s(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const Wp={name:"codeIndented",tokenize:y4},b4={partial:!0,tokenize:x4};function y4(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),at(e,l,"linePrefix",5)(h)}function l(h){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(h):n(h)}function c(h){return h===null?f(h):je(h)?e.attempt(b4,c,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||je(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),t(h)}}function x4(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):je(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):at(e,l,"linePrefix",5)(c)}function l(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):je(c)?s(c):n(c)}}const v4={name:"codeText",previous:E4,resolve:w4,tokenize:S4};function w4(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function E4(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function S4(e,t,n){let a=0,s,l;return c;function c(m){return e.enter("codeText"),e.enter("codeTextSequence"),d(m)}function d(m){return m===96?(e.consume(m),a++,d):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(l=e.enter("codeTextSequence"),s=0,b(m)):je(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||je(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function b(m){return m===96?(e.consume(m),s++,b):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(l.type="codeTextData",h(m))}}class k4{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&ic(this.left,a),l.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),ic(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ic(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ic(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ic(this.left,n.reverse())}}}function ic(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function RS(e){const t={};let n=-1,a,s,l,c,d,f,h;const b=new k4(e);for(;++n<b.length;){for(;n in t;)n=t[n];if(a=b.get(n),n&&a[1].type==="chunkFlow"&&b.get(n-1)[1].type==="listItemPrefix"&&(f=a[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,N4(b,n)),n=t[n],h=!0);else if(a[1]._container){for(l=n,s=void 0;l--;)if(c=b.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...b.get(s)[1].start},d=b.slice(s,n),d.unshift(a),b.splice(s,n-s+1,d))}}return oi(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!h}function N4(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const l=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,f=[],h={};let b,m,x=-1,v=n,E=0,w=0;const k=[w];for(;v;){for(;e.get(++s)[1]!==v;);l.push(s),v._tokenizer||(b=a.sliceStream(v),v.next||b.push(null),m&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(b),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(w=x+1,k.push(w),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):k.pop(),x=k.length;x--;){const N=d.slice(k[x],k[x+1]),C=l.pop();f.push([C,C+N.length-1]),e.splice(C,2,N)}for(f.reverse(),x=-1;++x<f.length;)h[E+f[x][0]]=E+f[x][1],E+=f[x][1]-f[x][0]-1;return h}const _4={resolve:A4,tokenize:T4},C4={partial:!0,tokenize:O4};function A4(e){return RS(e),e}function T4(e,t){let n;return a;function a(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?l(d):je(d)?e.check(C4,c,l)(d):(e.consume(d),s)}function l(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function O4(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),at(e,l,"linePrefix")}function l(c){if(c===null||je(c))return n(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function jS(e,t,n,a,s,l,c,d,f){const h=f||Number.POSITIVE_INFINITY;let b=0;return m;function m(N){return N===60?(e.enter(a),e.enter(s),e.enter(l),e.consume(N),e.exit(l),x):N===null||N===32||N===41||Hd(N)?n(N):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),w(N))}function x(N){return N===62?(e.enter(l),e.consume(N),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(e.exit("chunkString"),e.exit(d),x(N)):N===null||N===60||je(N)?n(N):(e.consume(N),N===92?E:v)}function E(N){return N===60||N===62||N===92?(e.consume(N),v):v(N)}function w(N){return!b&&(N===null||N===41||kt(N))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(N)):b<h&&N===40?(e.consume(N),b++,w):N===41?(e.consume(N),b--,w):N===null||N===32||N===40||Hd(N)?n(N):(e.consume(N),N===92?k:w)}function k(N){return N===40||N===41||N===92?(e.consume(N),w):w(N)}}function MS(e,t,n,a,s,l){const c=this;let d=0,f;return h;function h(v){return e.enter(a),e.enter(s),e.consume(v),e.exit(s),e.enter(l),b}function b(v){return d>999||v===null||v===91||v===93&&!f||v===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(v):v===93?(e.exit(l),e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):je(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||je(v)||d++>999?(e.exit("chunkString"),b(v)):(e.consume(v),f||(f=!Xe(v)),v===92?x:m)}function x(v){return v===91||v===92||v===93?(e.consume(v),d++,m):m(v)}}function DS(e,t,n,a,s,l){let c;return d;function d(x){return x===34||x===39||x===40?(e.enter(a),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,f):n(x)}function f(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):(e.enter(l),h(x))}function h(x){return x===c?(e.exit(l),f(c)):x===null?n(x):je(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),at(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===c||x===null||je(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?m:b)}function m(x){return x===c||x===92?(e.consume(x),b):b(x)}}function dc(e,t){let n;return a;function a(s){return je(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Xe(s)?at(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const R4={name:"definition",tokenize:M4},j4={partial:!0,tokenize:D4};function M4(e,t,n){const a=this;let s;return l;function l(v){return e.enter("definition"),c(v)}function c(v){return MS.call(a,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return s=Bi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):n(v)}function f(v){return kt(v)?dc(e,h)(v):h(v)}function h(v){return jS(e,b,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function b(v){return e.attempt(j4,m,m)(v)}function m(v){return Xe(v)?at(e,x,"whitespace")(v):x(v)}function x(v){return v===null||je(v)?(e.exit("definition"),a.parser.defined.push(s),t(v)):n(v)}}function D4(e,t,n){return a;function a(d){return kt(d)?dc(e,s)(d):n(d)}function s(d){return DS(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function l(d){return Xe(d)?at(e,c,"whitespace")(d):c(d)}function c(d){return d===null||je(d)?t(d):n(d)}}const L4={name:"hardBreakEscape",tokenize:I4};function I4(e,t,n){return a;function a(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return je(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const z4={name:"headingAtx",resolve:B4,tokenize:U4};function B4(e,t){let n=e.length-2,a=3,s,l;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},l={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},oi(e,a,n-a+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function U4(e,t,n){let a=0;return s;function s(b){return e.enter("atxHeading"),l(b)}function l(b){return e.enter("atxHeadingSequence"),c(b)}function c(b){return b===35&&a++<6?(e.consume(b),c):b===null||kt(b)?(e.exit("atxHeadingSequence"),d(b)):n(b)}function d(b){return b===35?(e.enter("atxHeadingSequence"),f(b)):b===null||je(b)?(e.exit("atxHeading"),t(b)):Xe(b)?at(e,d,"whitespace")(b):(e.enter("atxHeadingText"),h(b))}function f(b){return b===35?(e.consume(b),f):(e.exit("atxHeadingSequence"),d(b))}function h(b){return b===null||b===35||kt(b)?(e.exit("atxHeadingText"),d(b)):(e.consume(b),h)}}const P4=["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"],d1=["pre","script","style","textarea"],F4={concrete:!0,name:"htmlFlow",resolveTo:q4,tokenize:K4},$4={partial:!0,tokenize:V4},H4={partial:!0,tokenize:G4};function q4(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 K4(e,t,n){const a=this;let s,l,c,d,f;return h;function h(R){return b(R)}function b(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),x):R===47?(e.consume(R),l=!0,w):R===63?(e.consume(R),s=3,a.interrupt?t:j):Rn(R)?(e.consume(R),c=String.fromCharCode(R),k):n(R)}function x(R){return R===45?(e.consume(R),s=2,v):R===91?(e.consume(R),s=5,d=0,E):Rn(R)?(e.consume(R),s=4,a.interrupt?t:j):n(R)}function v(R){return R===45?(e.consume(R),a.interrupt?t:j):n(R)}function E(R){const ye="CDATA[";return R===ye.charCodeAt(d++)?(e.consume(R),d===ye.length?a.interrupt?t:J:E):n(R)}function w(R){return Rn(R)?(e.consume(R),c=String.fromCharCode(R),k):n(R)}function k(R){if(R===null||R===47||R===62||kt(R)){const ye=R===47,X=c.toLowerCase();return!ye&&!l&&d1.includes(X)?(s=1,a.interrupt?t(R):J(R)):P4.includes(c.toLowerCase())?(s=6,ye?(e.consume(R),N):a.interrupt?t(R):J(R)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(R):l?C(R):A(R))}return R===45||vn(R)?(e.consume(R),c+=String.fromCharCode(R),k):n(R)}function N(R){return R===62?(e.consume(R),a.interrupt?t:J):n(R)}function C(R){return Xe(R)?(e.consume(R),C):P(R)}function A(R){return R===47?(e.consume(R),P):R===58||R===95||Rn(R)?(e.consume(R),T):Xe(R)?(e.consume(R),A):P(R)}function T(R){return R===45||R===46||R===58||R===95||vn(R)?(e.consume(R),T):L(R)}function L(R){return R===61?(e.consume(R),M):Xe(R)?(e.consume(R),L):A(R)}function M(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),f=R,U):Xe(R)?(e.consume(R),M):$(R)}function U(R){return R===f?(e.consume(R),f=null,te):R===null||je(R)?n(R):(e.consume(R),U)}function $(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||kt(R)?L(R):(e.consume(R),$)}function te(R){return R===47||R===62||Xe(R)?A(R):n(R)}function P(R){return R===62?(e.consume(R),Q):n(R)}function Q(R){return R===null||je(R)?J(R):Xe(R)?(e.consume(R),Q):n(R)}function J(R){return R===45&&s===2?(e.consume(R),H):R===60&&s===1?(e.consume(R),oe):R===62&&s===4?(e.consume(R),D):R===63&&s===3?(e.consume(R),j):R===93&&s===5?(e.consume(R),ne):je(R)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check($4,Y,me)(R)):R===null||je(R)?(e.exit("htmlFlowData"),me(R)):(e.consume(R),J)}function me(R){return e.check(H4,le,Y)(R)}function le(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),ee}function ee(R){return R===null||je(R)?me(R):(e.enter("htmlFlowData"),J(R))}function H(R){return R===45?(e.consume(R),j):J(R)}function oe(R){return R===47?(e.consume(R),c="",ce):J(R)}function ce(R){if(R===62){const ye=c.toLowerCase();return d1.includes(ye)?(e.consume(R),D):J(R)}return Rn(R)&&c.length<8?(e.consume(R),c+=String.fromCharCode(R),ce):J(R)}function ne(R){return R===93?(e.consume(R),j):J(R)}function j(R){return R===62?(e.consume(R),D):R===45&&s===2?(e.consume(R),j):J(R)}function D(R){return R===null||je(R)?(e.exit("htmlFlowData"),Y(R)):(e.consume(R),D)}function Y(R){return e.exit("htmlFlow"),t(R)}}function G4(e,t,n){const a=this;return s;function s(c){return je(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):n(c)}function l(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function V4(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Bc,t,n)}}const Q4={name:"htmlText",tokenize:Y4};function Y4(e,t,n){const a=this;let s,l,c;return d;function d(j){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(j),f}function f(j){return j===33?(e.consume(j),h):j===47?(e.consume(j),L):j===63?(e.consume(j),A):Rn(j)?(e.consume(j),$):n(j)}function h(j){return j===45?(e.consume(j),b):j===91?(e.consume(j),l=0,E):Rn(j)?(e.consume(j),C):n(j)}function b(j){return j===45?(e.consume(j),v):n(j)}function m(j){return j===null?n(j):j===45?(e.consume(j),x):je(j)?(c=m,oe(j)):(e.consume(j),m)}function x(j){return j===45?(e.consume(j),v):m(j)}function v(j){return j===62?H(j):j===45?x(j):m(j)}function E(j){const D="CDATA[";return j===D.charCodeAt(l++)?(e.consume(j),l===D.length?w:E):n(j)}function w(j){return j===null?n(j):j===93?(e.consume(j),k):je(j)?(c=w,oe(j)):(e.consume(j),w)}function k(j){return j===93?(e.consume(j),N):w(j)}function N(j){return j===62?H(j):j===93?(e.consume(j),N):w(j)}function C(j){return j===null||j===62?H(j):je(j)?(c=C,oe(j)):(e.consume(j),C)}function A(j){return j===null?n(j):j===63?(e.consume(j),T):je(j)?(c=A,oe(j)):(e.consume(j),A)}function T(j){return j===62?H(j):A(j)}function L(j){return Rn(j)?(e.consume(j),M):n(j)}function M(j){return j===45||vn(j)?(e.consume(j),M):U(j)}function U(j){return je(j)?(c=U,oe(j)):Xe(j)?(e.consume(j),U):H(j)}function $(j){return j===45||vn(j)?(e.consume(j),$):j===47||j===62||kt(j)?te(j):n(j)}function te(j){return j===47?(e.consume(j),H):j===58||j===95||Rn(j)?(e.consume(j),P):je(j)?(c=te,oe(j)):Xe(j)?(e.consume(j),te):H(j)}function P(j){return j===45||j===46||j===58||j===95||vn(j)?(e.consume(j),P):Q(j)}function Q(j){return j===61?(e.consume(j),J):je(j)?(c=Q,oe(j)):Xe(j)?(e.consume(j),Q):te(j)}function J(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),s=j,me):je(j)?(c=J,oe(j)):Xe(j)?(e.consume(j),J):(e.consume(j),le)}function me(j){return j===s?(e.consume(j),s=void 0,ee):j===null?n(j):je(j)?(c=me,oe(j)):(e.consume(j),me)}function le(j){return j===null||j===34||j===39||j===60||j===61||j===96?n(j):j===47||j===62||kt(j)?te(j):(e.consume(j),le)}function ee(j){return j===47||j===62||kt(j)?te(j):n(j)}function H(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),t):n(j)}function oe(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),ce}function ce(j){return Xe(j)?at(e,ne,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):ne(j)}function ne(j){return e.enter("htmlTextData"),c(j)}}const Yg={name:"labelEnd",resolveAll:J4,resolveTo:eU,tokenize:tU},W4={tokenize:nU},X4={tokenize:iU},Z4={tokenize:aU};function J4(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&oi(e,0,e.length,n),e}function eU(e,t){let n=e.length,a=0,s,l,c,d;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[c][1].end}},b={type:"labelText",start:{...e[l+a+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",f,t],["enter",h,t]],d=ki(d,e.slice(l+1,l+a+3)),d=ki(d,[["enter",b,t]]),d=ki(d,xf(t.parser.constructs.insideSpan.null,e.slice(l+a+4,c-3),t)),d=ki(d,[["exit",b,t],e[c-2],e[c-1],["exit",h,t]]),d=ki(d,e.slice(c+1)),d=ki(d,[["exit",f,t]]),oi(e,l,e.length,d),e}function tU(e,t,n){const a=this;let s=a.events.length,l,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){l=a.events[s][1];break}return d;function d(x){return l?l._inactive?m(x):(c=a.parser.defined.includes(Bi(a.sliceSerialize({start:l.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),f):n(x)}function f(x){return x===40?e.attempt(W4,b,c?b:m)(x):x===91?e.attempt(X4,b,c?h:m)(x):c?b(x):m(x)}function h(x){return e.attempt(Z4,b,m)(x)}function b(x){return t(x)}function m(x){return l._balanced=!0,n(x)}}function nU(e,t,n){return a;function a(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return kt(m)?dc(e,l)(m):l(m)}function l(m){return m===41?b(m):jS(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function c(m){return kt(m)?dc(e,f)(m):b(m)}function d(m){return n(m)}function f(m){return m===34||m===39||m===40?DS(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):b(m)}function h(m){return kt(m)?dc(e,b)(m):b(m)}function b(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function iU(e,t,n){const a=this;return s;function s(d){return MS.call(a,e,l,c,"reference","referenceMarker","referenceString")(d)}function l(d){return a.parser.defined.includes(Bi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function aU(e,t,n){return a;function a(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const rU={name:"labelStartImage",resolveAll:Yg.resolveAll,tokenize:sU};function sU(e,t,n){const a=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),l}function l(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):t(d)}}const lU={name:"labelStartLink",resolveAll:Yg.resolveAll,tokenize:oU};function oU(e,t,n){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const Xp={name:"lineEnding",tokenize:cU};function cU(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),at(e,t,"linePrefix")}}const Td={name:"thematicBreak",tokenize:uU};function uU(e,t,n){let a=0,s;return l;function l(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,d(h)}function d(h){return h===s?(e.enter("thematicBreakSequence"),f(h)):a>=3&&(h===null||je(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===s?(e.consume(h),a++,f):(e.exit("thematicBreakSequence"),Xe(h)?at(e,d,"whitespace")(h):d(h))}}const $n={continuation:{tokenize:pU},exit:gU,name:"list",tokenize:hU},dU={partial:!0,tokenize:bU},fU={partial:!0,tokenize:mU};function hU(e,t,n){const a=this,s=a.events[a.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(v){const E=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:Ym(v)){if(a.containerState.type||(a.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Td,n,h)(v):h(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return n(v)}function f(v){return Ym(v)&&++c<10?(e.consume(v),f):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(Bc,a.interrupt?n:b,e.attempt(dU,x,m))}function b(v){return a.containerState.initialBlankLine=!0,l++,x(v)}function m(v){return Xe(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):n(v)}function x(v){return a.containerState.size=l+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function pU(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Bc,s,l);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,at(e,t,"listItemIndent",a.containerState.size+1)(d)}function l(d){return a.containerState.furtherBlankLines||!Xe(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(fU,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,at(e,e.attempt($n,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function mU(e,t,n){const a=this;return at(e,s,"listItemIndent",a.containerState.size+1);function s(l){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(l):n(l)}}function gU(e){e.exit(this.containerState.type)}function bU(e,t,n){const a=this;return at(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const c=a.events[a.events.length-1];return!Xe(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const f1={name:"setextUnderline",resolveTo:yU,tokenize:xU};function yU(e,t){let n=e.length,a,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",c,t]),e.splice(l+1,0,["exit",e[a][1],t]),e[a][1].end={...e[l][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function xU(e,t,n){const a=this;let s;return l;function l(h){let b=a.events.length,m;for(;b--;)if(a.events[b][1].type!=="lineEnding"&&a.events[b][1].type!=="linePrefix"&&a.events[b][1].type!=="content"){m=a.events[b][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||m)?(e.enter("setextHeadingLine"),s=h,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===s?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),Xe(h)?at(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||je(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const vU={tokenize:wU};function wU(e){const t=this,n=e.attempt(Bc,a,e.attempt(this.parser.constructs.flowInitial,s,at(e,e.attempt(this.parser.constructs.flow,s,e.attempt(_4,s)),"linePrefix")));return n;function a(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const EU={resolveAll:IS()},SU=LS("string"),kU=LS("text");function LS(e){return{resolveAll:IS(e==="text"?NU:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],l=n.attempt(s,c,d);return c;function c(b){return h(b)?l(b):d(b)}function d(b){if(b===null){n.consume(b);return}return n.enter("data"),n.consume(b),f}function f(b){return h(b)?(n.exit("data"),l(b)):(n.consume(b),f)}function h(b){if(b===null)return!0;const m=s[b];let x=-1;if(m)for(;++x<m.length;){const v=m[x];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function IS(e){return t;function t(n,a){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,a):n}}function NU(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let l=s.length,c=-1,d=0,f;for(;l--;){const h=s[l];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)f=!0,d++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:a.start._bufferIndex+c,_index:a.start._index+l,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const _U={42:$n,43:$n,45:$n,48:$n,49:$n,50:$n,51:$n,52:$n,53:$n,54:$n,55:$n,56:$n,57:$n,62:AS},CU={91:R4},AU={[-2]:Wp,[-1]:Wp,32:Wp},TU={35:z4,42:Td,45:[f1,Td],60:F4,61:f1,95:Td,96:u1,126:u1},OU={38:OS,92:TS},RU={[-5]:Xp,[-4]:Xp,[-3]:Xp,33:rU,38:OS,42:Wm,60:[l4,Q4],91:lU,92:[L4,TS],93:Yg,95:Wm,96:v4},jU={null:[Wm,EU]},MU={null:[42,95]},DU={null:[]},LU=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:MU,contentInitial:CU,disable:DU,document:_U,flow:TU,flowInitial:AU,insideSpan:jU,string:OU,text:RU},Symbol.toStringTag,{value:"Module"}));function IU(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let c=[],d=[];const f={attempt:U(L),check:U(M),consume:C,enter:A,exit:T,interrupt:U(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:E,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:m};let b=t.tokenize.call(h,f);return t.resolveAll&&l.push(t),h;function m(Q){return c=ki(c,Q),k(),c[c.length-1]!==null?[]:($(t,0),h.events=xf(l,h.events,h),h.events)}function x(Q,J){return BU(v(Q),J)}function v(Q){return zU(c,Q)}function E(){const{_bufferIndex:Q,_index:J,line:me,column:le,offset:ee}=a;return{_bufferIndex:Q,_index:J,line:me,column:le,offset:ee}}function w(Q){s[Q.line]=Q.column,P()}function k(){let Q;for(;a._index<c.length;){const J=c[a._index];if(typeof J=="string")for(Q=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===Q&&a._bufferIndex<J.length;)N(J.charCodeAt(a._bufferIndex));else N(J)}}function N(Q){b=b(Q)}function C(Q){je(Q)?(a.line++,a.column=1,a.offset+=Q===-3?2:1,P()):Q!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=Q}function A(Q,J){const me=J||{};return me.type=Q,me.start=E(),h.events.push(["enter",me,h]),d.push(me),me}function T(Q){const J=d.pop();return J.end=E(),h.events.push(["exit",J,h]),J}function L(Q,J){$(Q,J.from)}function M(Q,J){J.restore()}function U(Q,J){return me;function me(le,ee,H){let oe,ce,ne,j;return Array.isArray(le)?Y(le):"tokenize"in le?Y([le]):D(le);function D(fe){return he;function he(K){const ue=K!==null&&fe[K],Oe=K!==null&&fe.null,dt=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(Oe)?Oe:Oe?[Oe]:[]];return Y(dt)(K)}}function Y(fe){return oe=fe,ce=0,fe.length===0?H:R(fe[ce])}function R(fe){return he;function he(K){return j=te(),ne=fe,fe.partial||(h.currentConstruct=fe),fe.name&&h.parser.constructs.disable.null.includes(fe.name)?X():fe.tokenize.call(J?Object.assign(Object.create(h),J):h,f,ye,X)(K)}}function ye(fe){return Q(ne,j),ee}function X(fe){return j.restore(),++ce<oe.length?R(oe[ce]):H}}}function $(Q,J){Q.resolveAll&&!l.includes(Q)&&l.push(Q),Q.resolve&&oi(h.events,J,h.events.length-J,Q.resolve(h.events.slice(J),h)),Q.resolveTo&&(h.events=Q.resolveTo(h.events,h))}function te(){const Q=E(),J=h.previous,me=h.currentConstruct,le=h.events.length,ee=Array.from(d);return{from:le,restore:H};function H(){a=Q,h.previous=J,h.currentConstruct=me,h.events.length=le,d=ee,P()}}function P(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function zU(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,l)];else{if(c=e.slice(n,s),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}l>0&&c.push(e[s].slice(0,l))}return c}function BU(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const l=e[n];let c;if(typeof l=="string")c=l;else switch(l){case-5:{c="\r";break}case-4:{c=`
527
+ `;break}case-3:{c=`\r
528
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(l)}s=l===-2,a.push(c)}return a.join("")}function UU(e){const a={constructs:_S([LU,...(e||{}).extensions||[]]),content:s(e4),defined:[],document:s(n4),flow:s(vU),lazy:{},string:s(SU),text:s(kU)};return a;function s(l){return c;function c(d){return IU(a,l,d)}}}function PU(e){for(;!RS(e););return e}const h1=/[\0\t\n\r]/g;function FU(){let e=1,t="",n=!0,a;return s;function s(l,c,d){const f=[];let h,b,m,x,v;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),m=0,t="",n&&(l.charCodeAt(0)===65279&&m++,n=void 0);m<l.length;){if(h1.lastIndex=m,h=h1.exec(l),x=h&&h.index!==void 0?h.index:l.length,v=l.charCodeAt(x),!h){t=l.slice(m);break}if(v===10&&m===x&&a)f.push(-3),a=void 0;else switch(a&&(f.push(-5),a=void 0),m<x&&(f.push(l.slice(m,x)),e+=x-m),v){case 0:{f.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,f.push(-2);e++<b;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:a=!0,e=1}m=x+1}return d&&(a&&f.push(-5),t&&f.push(t),f.push(null)),f}}const $U=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function HU(e){return e.replace($U,qU)}function qU(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return CS(n.slice(l?2:1),l?16:10)}return Qg(n)||e}const zS={}.hasOwnProperty;function KU(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),GU(n)(PU(UU(n).document().write(FU()(e,t,!0))))}function GU(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Hi),autolinkProtocol:te,autolinkEmail:te,atxHeading:l($i),blockQuote:l(Oe),characterEscape:te,characterReference:te,codeFenced:l(dt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(dt,c),codeText:l(ft,c),codeTextData:te,data:te,codeFlowValue:te,definition:l(di),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(Yn),hardBreakEscape:l(tt),hardBreakTrailing:l(tt),htmlFlow:l(Oi,c),htmlFlowData:te,htmlText:l(Oi,c),htmlTextData:te,image:l(fi),label:c,link:l(Hi),listItem:l(Rr),listItemValue:x,listOrdered:l(ra,m),listUnordered:l(ra),paragraph:l(to),reference:R,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l($i),strong:l(Es),thematicBreak:l(Ss)},exit:{atxHeading:f(),atxHeadingSequence:L,autolink:f(),autolinkEmail:ue,autolinkProtocol:K,blockQuote:f(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:fe,characterReference:he,codeFenced:f(k),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:E,codeFlowValue:P,codeIndented:f(N),codeText:f(ee),codeTextData:P,data:P,definition:f(),definitionDestinationString:T,definitionLabelString:C,definitionTitleString:A,emphasis:f(),hardBreakEscape:f(J),hardBreakTrailing:f(J),htmlFlow:f(me),htmlFlowData:P,htmlText:f(le),htmlTextData:P,image:f(oe),label:ne,labelText:ce,lineEnding:Q,link:f(H),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ye,resourceDestinationString:j,resourceTitleString:D,resource:Y,setextHeading:f($),setextHeadingLineSequence:U,setextHeadingText:M,strong:f(),thematicBreak:f()}};BS(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ie){let be={type:"root",children:[]};const Me={stack:[be],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:b,data:n},Ve=[];let rt=-1;for(;++rt<ie.length;)if(ie[rt][1].type==="listOrdered"||ie[rt][1].type==="listUnordered")if(ie[rt][0]==="enter")Ve.push(rt);else{const Sn=Ve.pop();rt=s(ie,Sn,rt)}for(rt=-1;++rt<ie.length;){const Sn=t[ie[rt][0]];zS.call(Sn,ie[rt][1].type)&&Sn[ie[rt][1].type].call(Object.assign({sliceSerialize:ie[rt][2].sliceSerialize},Me),ie[rt][1])}if(Me.tokenStack.length>0){const Sn=Me.tokenStack[Me.tokenStack.length-1];(Sn[1]||p1).call(Me,void 0,Sn[0])}for(be.position={start:fr(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:fr(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)be=t.transforms[rt](be)||be;return be}function s(ie,be,Me){let Ve=be-1,rt=-1,Sn=!1,Ri,cn,Pt,mn;for(;++Ve<=Me;){const ht=ie[Ve];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?rt++:rt--,mn=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(Ri&&!mn&&!rt&&!Pt&&(Pt=Ve),mn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mn=void 0}if(!rt&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||rt===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(Ri){let qi=Ve;for(cn=void 0;qi--;){const kn=ie[qi];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;cn&&(ie[cn][1].type="lineEndingBlank",Sn=!0),kn[1].type="lineEnding",cn=qi}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}Pt&&(!cn||Pt<cn)&&(Ri._spread=!0),Ri.end=Object.assign({},cn?ie[cn][1].start:ht[1].end),ie.splice(cn||Ve,0,["exit",Ri,ht[2]]),Ve++,Me++}if(ht[1].type==="listItemPrefix"){const qi={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};Ri=qi,ie.splice(Ve,0,["enter",qi,ht[2]]),Ve++,Me++,Pt=void 0,mn=!0}}}return ie[be][1]._spread=Sn,Me}function l(ie,be){return Me;function Me(Ve){d.call(this,ie(Ve),Ve),be&&be.call(this,Ve)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ie,be,Me){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([be,Me||void 0]),ie.position={start:fr(be.start),end:void 0}}function f(ie){return be;function be(Me){ie&&ie.call(this,Me),h.call(this,Me)}}function h(ie,be){const Me=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ie.type&&(be?be.call(this,ie,Ve[0]):(Ve[1]||p1).call(this,ie,Ve[0]));else throw new Error("Cannot close `"+ie.type+"` ("+uc({start:ie.start,end:ie.end})+"): it’s not open");Me.position.end=fr(ie.end)}function b(){return Vg(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function x(ie){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.lang=ie}function E(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.meta=ie}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie.replace(/(\r?\n|\r)$/g,"")}function C(ie){const be=this.resume(),Me=this.stack[this.stack.length-1];Me.label=be,Me.identifier=Bi(this.sliceSerialize(ie)).toLowerCase()}function A(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.title=ie}function T(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.url=ie}function L(ie){const be=this.stack[this.stack.length-1];if(!be.depth){const Me=this.sliceSerialize(ie).length;be.depth=Me}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function U(ie){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function te(ie){const Me=this.stack[this.stack.length-1].children;let Ve=Me[Me.length-1];(!Ve||Ve.type!=="text")&&(Ve=Lt(),Ve.position={start:fr(ie.start),end:void 0},Me.push(Ve)),this.stack.push(Ve)}function P(ie){const be=this.stack.pop();be.value+=this.sliceSerialize(ie),be.position.end=fr(ie.end)}function Q(ie){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=be.children[be.children.length-1];Me.position.end=fr(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(be.type)&&(te.call(this,ie),P.call(this,ie))}function J(){this.data.atHardBreak=!0}function me(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie}function le(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie}function ee(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.value=ie}function H(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=be,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function oe(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=be,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ce(ie){const be=this.sliceSerialize(ie),Me=this.stack[this.stack.length-2];Me.label=HU(be),Me.identifier=Bi(be).toLowerCase()}function ne(){const ie=this.stack[this.stack.length-1],be=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const Ve=ie.children;Me.children=Ve}else Me.alt=be}function j(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.url=ie}function D(){const ie=this.resume(),be=this.stack[this.stack.length-1];be.title=ie}function Y(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function ye(ie){const be=this.resume(),Me=this.stack[this.stack.length-1];Me.label=be,Me.identifier=Bi(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function X(ie){this.data.characterReferenceType=ie.type}function fe(ie){const be=this.sliceSerialize(ie),Me=this.data.characterReferenceType;let Ve;Me?(Ve=CS(be,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=Qg(be);const rt=this.stack[this.stack.length-1];rt.value+=Ve}function he(ie){const be=this.stack.pop();be.position.end=fr(ie.end)}function K(ie){P.call(this,ie);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(ie)}function ue(ie){P.call(this,ie);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(ie)}function Oe(){return{type:"blockquote",children:[]}}function dt(){return{type:"code",lang:null,meta:null,value:""}}function ft(){return{type:"inlineCode",value:""}}function di(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Yn(){return{type:"emphasis",children:[]}}function $i(){return{type:"heading",depth:0,children:[]}}function tt(){return{type:"break"}}function Oi(){return{type:"html",value:""}}function fi(){return{type:"image",title:null,url:"",alt:null}}function Hi(){return{type:"link",title:null,url:"",children:[]}}function ra(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function Rr(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function to(){return{type:"paragraph",children:[]}}function Es(){return{type:"strong",children:[]}}function Lt(){return{type:"text",value:""}}function Ss(){return{type:"thematicBreak"}}}function fr(e){return{line:e.line,column:e.column,offset:e.offset}}function BS(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?BS(e,a):VU(e,a)}}function VU(e,t){let n;for(n in t)if(zS.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function p1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+uc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+uc({start:t.start,end:t.end})+") is still open")}function QU(e){const t=this;t.parser=n;function n(a){return KU(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function YU(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function WU(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
529
+ `}]}function XU(e,t){const n=t.value?t.value+`
530
+ `:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function ZU(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JU(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=eo(a.toLowerCase()),l=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=l+1,d+=1,e.footnoteCounts.set(a,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function tP(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function US(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function iP(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return US(e,t);const s={src:eo(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function aP(e,t){const n={src:eo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function rP(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function sP(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return US(e,t);const s={href:eo(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function lP(e,t){const n={href:eo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function oP(e,t,n){const a=e.all(t),s=n?cP(n):PS(t),l={},c=[];if(typeof t.checked=="boolean"){const b=a[0];let m;b&&b.type==="element"&&b.tagName==="p"?m=b:(m={type:"element",tagName:"p",properties:{},children:[]},a.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:[]}),l.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const b=a[d];(s||d!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
531
+ `}),b.type==="element"&&b.tagName==="p"&&!s?c.push(...b.children):c.push(b)}const f=a[a.length-1];f&&(s||f.type!=="element"||f.tagName!=="p")&&c.push({type:"text",value:`
532
+ `});const h={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,h),e.applyData(t,h)}function cP(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=PS(n[a])}return t}function PS(e){const t=e.spread;return t??e.children.length>1}function uP(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,l),e.applyData(t,l)}function dP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fP(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function hP(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pP(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Hg(t.children[1]),f=xS(t.children[t.children.length-1]);d&&f&&(c.position={start:d,end:f}),s.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function mP(e,t,n){const a=n?n.children:void 0,l=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let f=-1;const h=[];for(;++f<d;){const m=t.children[f],x={},v=c?c[f]:void 0;v&&(x.align=v);let E={type:"element",tagName:l,properties:x,children:[]};m&&(E.children=e.all(m),e.patch(m,E),E=e.applyData(m,E)),h.push(E)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,b),e.applyData(t,b)}function gP(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const m1=9,g1=32;function bP(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const l=[];for(;a;)l.push(b1(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return l.push(b1(t.slice(s),s>0,!1)),l.join("")}function b1(e,t,n){let a=0,s=e.length;if(t){let l=e.codePointAt(a);for(;l===m1||l===g1;)a++,l=e.codePointAt(a)}if(n){let l=e.codePointAt(s-1);for(;l===m1||l===g1;)s--,l=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function yP(e,t){const n={type:"text",value:bP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function xP(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const vP={blockquote:YU,break:WU,code:XU,delete:ZU,emphasis:JU,footnoteReference:eP,heading:tP,html:nP,imageReference:iP,image:aP,inlineCode:rP,linkReference:sP,link:lP,listItem:oP,list:uP,paragraph:dP,root:fP,strong:hP,table:pP,tableCell:gP,tableRow:mP,text:yP,thematicBreak:xP,toml:hd,yaml:hd,definition:hd,footnoteDefinition:hd};function hd(){}const FS=-1,vf=0,fc=1,qd=2,Wg=3,Xg=4,Zg=5,Jg=6,$S=7,HS=8,y1=typeof self=="object"?self:globalThis,wP=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),a=s=>{if(e.has(s))return e.get(s);const[l,c]=t[s];switch(l){case vf:case FS:return n(c,s);case fc:{const d=n([],s);for(const f of c)d.push(a(f));return d}case qd:{const d=n({},s);for(const[f,h]of c)d[a(f)]=a(h);return d}case Wg:return n(new Date(c),s);case Xg:{const{source:d,flags:f}=c;return n(new RegExp(d,f),s)}case Zg:{const d=n(new Map,s);for(const[f,h]of c)d.set(a(f),a(h));return d}case Jg:{const d=n(new Set,s);for(const f of c)d.add(a(f));return d}case $S:{const{name:d,message:f}=c;return n(new y1[d](f),s)}case HS:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(new y1[l](c),s)};return a},x1=e=>wP(new Map,e)(0),pl="",{toString:EP}={},{keys:SP}=Object,ac=e=>{const t=typeof e;if(t!=="object"||!e)return[vf,t];const n=EP.call(e).slice(8,-1);switch(n){case"Array":return[fc,pl];case"Object":return[qd,pl];case"Date":return[Wg,pl];case"RegExp":return[Xg,pl];case"Map":return[Zg,pl];case"Set":return[Jg,pl];case"DataView":return[fc,n]}return n.includes("Array")?[fc,n]:n.includes("Error")?[$S,n]:[qd,n]},pd=([e,t])=>e===vf&&(t==="function"||t==="symbol"),kP=(e,t,n,a)=>{const s=(c,d)=>{const f=a.push(c)-1;return n.set(d,f),f},l=c=>{if(n.has(c))return n.get(c);let[d,f]=ac(c);switch(d){case vf:{let b=c;switch(f){case"bigint":d=HS,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);b=null;break;case"undefined":return s([FS],c)}return s([d,b],c)}case fc:{if(f){let x=c;return f==="DataView"?x=new Uint8Array(c.buffer):f==="ArrayBuffer"&&(x=new Uint8Array(c)),s([f,[...x]],c)}const b=[],m=s([d,b],c);for(const x of c)b.push(l(x));return m}case qd:{if(f)switch(f){case"BigInt":return s([f,c.toString()],c);case"Boolean":case"Number":case"String":return s([f,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const b=[],m=s([d,b],c);for(const x of SP(c))(e||!pd(ac(c[x])))&&b.push([l(x),l(c[x])]);return m}case Wg:return s([d,c.toISOString()],c);case Xg:{const{source:b,flags:m}=c;return s([d,{source:b,flags:m}],c)}case Zg:{const b=[],m=s([d,b],c);for(const[x,v]of c)(e||!(pd(ac(x))||pd(ac(v))))&&b.push([l(x),l(v)]);return m}case Jg:{const b=[],m=s([d,b],c);for(const x of c)(e||!pd(ac(x)))&&b.push(l(x));return m}}const{message:h}=c;return s([d,{name:f,message:h}],c)};return l},v1=(e,{json:t,lossy:n}={})=>{const a=[];return kP(!(t||n),!!t,new Map,a)(e),a},Kd=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?x1(v1(e,t)):structuredClone(e):(e,t)=>x1(v1(e,t));function NP(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function _P(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function CP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||NP,a=e.options.footnoteBackLabel||_P,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const b=e.all(h),m=String(h.identifier).toUpperCase(),x=eo(m.toLowerCase());let v=0;const E=[],w=e.footnoteCounts.get(m);for(;w!==void 0&&++v<=w;){E.length>0&&E.push({type:"text",value:" "});let C=typeof n=="string"?n:n(f,v);typeof C=="string"&&(C={type:"text",value:C}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(f,v),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const k=b[b.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const C=k.children[k.children.length-1];C&&C.type==="text"?C.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...E)}else b.push(...E);const N={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(b,!0)};e.patch(h,N),d.push(N)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Kd(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
533
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
534
+ `}]}}const Uc=(function(e){if(e==null)return RP;if(typeof e=="function")return wf(e);if(typeof e=="object")return Array.isArray(e)?AP(e):TP(e);if(typeof e=="string")return OP(e);throw new Error("Expected function, string, or object as test")});function AP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uc(e[n]);return wf(a);function a(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function TP(e){const t=e;return wf(n);function n(a){const s=a;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function OP(e){return wf(t);function t(n){return n&&n.type===e}}function wf(e){return t;function t(n,a,s){return!!(jP(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function RP(){return!0}function jP(e){return e!==null&&typeof e=="object"&&"type"in e}const qS=[],MP=!0,Xm=!1,DP="skip";function KS(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const l=Uc(s),c=a?-1:1;d(e,void 0,[])();function d(f,h,b){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(f.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=qS,E,w,k;if((!t||l(f,h,b[b.length-1]||void 0))&&(v=LP(n(f,b)),v[0]===Xm))return v;if("children"in f&&f.children){const N=f;if(N.children&&v[0]!==DP)for(w=(a?N.children.length:-1)+c,k=b.concat(N);w>-1&&w<N.children.length;){const C=N.children[w];if(E=d(C,w,k)(),E[0]===Xm)return E;w=typeof E[1]=="number"?E[1]:w+c}}return v}}}function LP(e){return Array.isArray(e)?e:typeof e=="number"?[MP,e]:e==null?qS:[e]}function Ef(e,t,n,a){let s,l,c;typeof t=="function"&&typeof n!="function"?(l=void 0,c=t,s=n):(l=t,c=n,s=a),KS(e,l,d,s);function d(f,h){const b=h[h.length-1],m=b?b.children.indexOf(f):void 0;return c(f,m,b)}}const Zm={}.hasOwnProperty,IP={};function zP(e,t){const n=t||IP,a=new Map,s=new Map,l=new Map,c={...vP,...n.handlers},d={all:h,applyData:UP,definitionById:a,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:c,one:f,options:n,patch:BP,wrap:FP};return Ef(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const m=b.type==="definition"?a:s,x=String(b.identifier).toUpperCase();m.has(x)||m.set(x,b)}}),d;function f(b,m){const x=b.type,v=d.handlers[x];if(Zm.call(d.handlers,x)&&v)return v(d,b,m);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in b){const{children:w,...k}=b,N=Kd(k);return N.children=d.all(b),N}return Kd(b)}return(d.options.unknownHandler||PP)(d,b,m)}function h(b){const m=[];if("children"in b){const x=b.children;let v=-1;for(;++v<x.length;){const E=d.one(x[v],b);if(E){if(v&&x[v-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=w1(E.value)),!Array.isArray(E)&&E.type==="element")){const w=E.children[0];w&&w.type==="text"&&(w.value=w1(w.value))}Array.isArray(E)?m.push(...E):m.push(E)}}}return m}}function BP(e,t){e.position&&(t.position=_B(e))}function UP(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const c="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:c}}n.type==="element"&&l&&Object.assign(n.properties,Kd(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function PP(e,t){const n=t.data||{},a="value"in t&&!(Zm.call(n,"hProperties")||Zm.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function FP(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
535
+ `});++a<e.length;)a&&n.push({type:"text",value:`
536
+ `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
537
+ `}),n}function w1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function E1(e,t){const n=zP(e,t),a=n.one(e,void 0),s=CP(n),l=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
538
+ `},s),l}function $P(e,t){return e&&"run"in e?async function(n,a){const s=E1(n,{file:a,...t});await e.run(s,a)}:function(n,a){return E1(n,{file:a,...e||t})}}function S1(e){if(e)throw e}var Zp,k1;function HP(){if(k1)return Zp;k1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var b=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!b&&!m)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},c=function(h,b){n&&b.name==="__proto__"?n(h,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):h[b.name]=b.newValue},d=function(h,b){if(b==="__proto__")if(e.call(h,b)){if(a)return a(h,b).value}else return;return h[b]};return Zp=function f(){var h,b,m,x,v,E,w=arguments[0],k=1,N=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<N;++k)if(h=arguments[k],h!=null)for(b in h)m=d(w,b),x=d(h,b),w!==x&&(C&&x&&(l(x)||(v=s(x)))?(v?(v=!1,E=m&&s(m)?m:[]):E=m&&l(m)?m:{},c(w,{name:b,newValue:f(C,E,x)})):typeof x<"u"&&c(w,{name:b,newValue:x}));return w},Zp}var qP=HP();const Jp=ag(qP);function Jm(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 KP(){const e=[],t={run:n,use:a};return t;function n(...s){let l=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(f,...h){const b=e[++l];let m=-1;if(f){c(f);return}for(;++m<s.length;)(h[m]===null||h[m]===void 0)&&(h[m]=s[m]);s=h,b?GP(b,d)(...h):c(null,...h)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function GP(e,t){let n;return a;function a(...c){const d=e.length>c.length;let f;d&&c.push(s);try{f=e.apply(this,c)}catch(h){const b=h;if(d&&n)throw b;return s(b)}d||(f&&f.then&&typeof f.then=="function"?f.then(l,s):f instanceof Error?s(f):l(f))}function s(c,...d){n||(n=!0,t(c,...d))}function l(c){s(null,c)}}const Xi={basename:VP,dirname:QP,extname:YP,join:WP,sep:"/"};function VP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pc(e);let n=0,a=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else a<0&&(l=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else c<0&&(l=!0,c=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(a=s):(d=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function QP(e){if(Pc(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function YP(e){Pc(e);let t=e.length,n=-1,a=0,s=-1,l=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function WP(...e){let t=-1,n;for(;++t<e.length;)Pc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":XP(n)}function XP(e){Pc(e);const t=e.codePointAt(0)===47;let n=ZP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ZP(e,t){let n="",a=0,s=-1,l=0,c=-1,d,f;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||l===1))if(s!==c-1&&l===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",a=0):(n=n.slice(0,f),a=n.length-1-n.lastIndexOf("/")),s=c,l=0;continue}}else if(n.length>0){n="",a=0,s=c,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),a=c-s-1;s=c,l=0}else d===46&&l>-1?l++:l=-1}return n}function Pc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const JP={cwd:eF};function eF(){return"/"}function eg(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tF(e){if(typeof e=="string")e=new URL(e);else if(!eg(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 nF(e)}function nF(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const em=["history","path","basename","stem","extname","dirname"];class GS{constructor(t){let n;t?eg(t)?n={path:t}:typeof t=="string"||iF(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":JP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<em.length;){const l=em[a];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)em.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Xi.basename(this.path):void 0}set basename(t){nm(t,"basename"),tm(t,"basename"),this.path=Xi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Xi.dirname(this.path):void 0}set dirname(t){N1(this.basename,"dirname"),this.path=Xi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Xi.extname(this.path):void 0}set extname(t){if(tm(t,"extname"),N1(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=Xi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){eg(t)&&(t=tF(t)),nm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Xi.basename(this.path,this.extname):void 0}set stem(t){nm(t,"stem"),tm(t,"stem"),this.path=Xi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new En(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function tm(e,t){if(e&&e.includes(Xi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Xi.sep+"`")}function nm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function N1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function iF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const aF=(function(e){const a=this.constructor.prototype,s=a[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,a),l}),rF={}.hasOwnProperty;class eb extends aF{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=KP()}copy(){const t=new eb;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Jp(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(rm("data",this.frozen),this.namespace[t]=n,this):rF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(rm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=md(t),a=this.parser||this.Parser;return im("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),im("process",this.parser||this.Parser),am("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,c){const d=md(t),f=a.parse(d);a.run(f,d,function(b,m,x){if(b||!m||!x)return h(b);const v=m,E=a.stringify(v,x);oF(E)?x.value=E:x.result=E,h(b,x)});function h(b,m){b||!m?c(b):l?l(m):n(void 0,m)}}}processSync(t){let n=!1,a;return this.freeze(),im("processSync",this.parser||this.Parser),am("processSync",this.compiler||this.Compiler),this.process(t,s),C1("processSync","process",n),a;function s(l,c){n=!0,S1(l),a=c}}run(t,n,a){_1(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?l(void 0,a):new Promise(l);function l(c,d){const f=md(n);s.run(t,f,h);function h(b,m,x){const v=m||t;b?d(b):c?c(v):a(void 0,v,x)}}}runSync(t,n){let a=!1,s;return this.run(t,n,l),C1("runSync","run",a),s;function l(c,d){S1(c),s=d,a=!0}}stringify(t,n){this.freeze();const a=md(n),s=this.compiler||this.Compiler;return am("stringify",s),_1(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(rm("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[b,...m]=h;f(b,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");d(h.plugins),h.settings&&(s.settings=Jp(!0,s.settings,h.settings))}function d(h){let b=-1;if(h!=null)if(Array.isArray(h))for(;++b<h.length;){const m=h[b];l(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,b){let m=-1,x=-1;for(;++m<a.length;)if(a[m][0]===h){x=m;break}if(x===-1)a.push([h,...b]);else if(b.length>0){let[v,...E]=b;const w=a[x][1];Jm(w)&&Jm(v)&&(v=Jp(!0,w,v)),a[x]=[h,v,...E]}}}}const sF=new eb().freeze();function im(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function am(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function rm(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 _1(e){if(!Jm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function C1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function md(e){return lF(e)?e:new GS(e)}function lF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oF(e){return typeof e=="string"||cF(e)}function cF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uF="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",A1=[],T1={allowDangerousHtml:!0},dF=/^(https?|ircs?|mailto|xmpp)$/i,fF=[{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 tb(e){const t=hF(e),n=pF(e);return mF(t.runSync(t.parse(n),n),e)}function hF(e){const t=e.rehypePlugins||A1,n=e.remarkPlugins||A1,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...T1}:T1;return sF().use(QU).use(n).use($P,a).use(t)}function pF(e){const t=e.children||"",n=new GS;return typeof t=="string"&&(n.value=t),n}function mF(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,l=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||gF;for(const b of fF)Object.hasOwn(t,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+uF+b.id,void 0);return Ef(e,h),RB(e,{Fragment:p.Fragment,components:s,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function h(b,m,x){if(b.type==="raw"&&x&&typeof m=="number")return c?x.children.splice(m,1):x.children[m]={type:"text",value:b.value},m;if(b.type==="element"){let v;for(v in Yp)if(Object.hasOwn(Yp,v)&&Object.hasOwn(b.properties,v)){const E=b.properties[v],w=Yp[v];(w===null||w.includes(b.tagName))&&(b.properties[v]=f(String(E||""),v,b))}}if(b.type==="element"){let v=n?!n.includes(b.tagName):l?l.includes(b.tagName):!1;if(!v&&a&&typeof m=="number"&&(v=!a(b,m,x)),v&&x&&typeof m=="number")return d&&b.children?x.children.splice(m,1,...b.children):x.children.splice(m,1),m}}}function gF(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||a!==-1&&t>a||dF.test(e.slice(0,t))?e:""}function O1(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}function bF(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yF(e,t,n){const s=Uc((n||{}).ignore||[]),l=xF(t);let c=-1;for(;++c<l.length;)KS(e,"text",d);function d(h,b){let m=-1,x;for(;++m<b.length;){const v=b[m],E=x?x.children:void 0;if(s(v,E?E.indexOf(v):void 0,x))return;x=v}if(x)return f(h,b)}function f(h,b){const m=b[b.length-1],x=l[c][0],v=l[c][1];let E=0;const k=m.children.indexOf(h);let N=!1,C=[];x.lastIndex=0;let A=x.exec(h.value);for(;A;){const T=A.index,L={index:A.index,input:A.input,stack:[...b,h]};let M=v(...A,L);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?x.lastIndex=T+1:(E!==T&&C.push({type:"text",value:h.value.slice(E,T)}),Array.isArray(M)?C.push(...M):M&&C.push(M),E=T+A[0].length,N=!0),!x.global)break;A=x.exec(h.value)}return N?(E<h.value.length&&C.push({type:"text",value:h.value.slice(E)}),m.children.splice(k,1,...C)):C=[h],k+C.length}}function xF(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<n.length;){const s=n[a];t.push([vF(s[0]),wF(s[1])])}return t}function vF(e){return typeof e=="string"?new RegExp(bF(e),"g"):e}function wF(e){return typeof e=="function"?e:function(){return e}}const sm="phrasing",lm=["autolink","link","image","label"];function EF(){return{transforms:[TF],enter:{literalAutolink:kF,literalAutolinkEmail:om,literalAutolinkHttp:om,literalAutolinkWww:om},exit:{literalAutolink:AF,literalAutolinkEmail:CF,literalAutolinkHttp:NF,literalAutolinkWww:_F}}}function SF(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sm,notInConstruct:lm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sm,notInConstruct:lm},{character:":",before:"[ps]",after:"\\/",inConstruct:sm,notInConstruct:lm}]}}function kF(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function om(e){this.config.enter.autolinkProtocol.call(this,e)}function NF(e){this.config.exit.autolinkProtocol.call(this,e)}function _F(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 CF(e){this.config.exit.autolinkEmail.call(this,e)}function AF(e){this.exit(e)}function TF(e){yF(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OF],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),RF]],{ignore:["link","linkReference"]})}function OF(e,t,n,a,s){let l="";if(!VS(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!jF(n)))return!1;const c=MF(n+a);if(!c[0])return!1;const d={type:"link",title:null,url:l+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function RF(e,t,n,a){return!VS(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function jF(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 MF(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=O1(e,"(");let l=O1(e,")");for(;a!==-1&&s>l;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),l++;return[e,n]}function VS(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||gs(n)||yf(n))&&(!t||n!==47)}QS.peek=$F;function DF(){this.buffer()}function LF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function IF(){this.buffer()}function zF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function BF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Bi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function UF(e){this.exit(e)}function PF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Bi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function FF(e){this.exit(e)}function $F(){return"["}function QS(e,t,n,a){const s=n.createTracker(a);let l=s.move("[^");const c=n.enter("footnoteReference"),d=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),d(),c(),l+=s.move("]"),l}function HF(){return{enter:{gfmFootnoteCallString:DF,gfmFootnoteCall:LF,gfmFootnoteDefinitionLabelString:IF,gfmFootnoteDefinition:zF},exit:{gfmFootnoteCallString:BF,gfmFootnoteCall:UF,gfmFootnoteDefinitionLabelString:PF,gfmFootnoteDefinition:FF}}}function qF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:QS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,l,c){const d=l.createTracker(c);let f=d.move("[^");const h=l.enter("footnoteDefinition"),b=l.enter("label");return f+=d.move(l.safe(l.associationId(a),{before:f,after:"]"})),b(),f+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),f+=d.move((t?`
539
+ `:" ")+l.indentLines(l.containerFlow(a,d.current()),t?YS:KF))),h(),f}}function KF(e,t,n){return t===0?e:YS(e,t,n)}function YS(e,t,n){return(n?"":" ")+e}const GF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];WS.peek=XF;function VF(){return{canContainEols:["delete"],enter:{strikethrough:YF},exit:{strikethrough:WF}}}function QF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:GF}],handlers:{delete:WS}}}function YF(e){this.enter({type:"delete",children:[]},e)}function WF(e){this.exit(e)}function WS(e,t,n,a){const s=n.createTracker(a),l=n.enter("strikethrough");let c=s.move("~~");return c+=n.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),l(),c}function XF(){return"~"}function ZF(e){return e.length}function JF(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||ZF,l=[],c=[],d=[],f=[];let h=0,b=-1;for(;++b<e.length;){const w=[],k=[];let N=-1;for(e[b].length>h&&(h=e[b].length);++N<e[b].length;){const C=e$(e[b][N]);if(n.alignDelimiters!==!1){const A=s(C);k[N]=A,(f[N]===void 0||A>f[N])&&(f[N]=A)}w.push(C)}c[b]=w,d[b]=k}let m=-1;if(typeof a=="object"&&"length"in a)for(;++m<h;)l[m]=R1(a[m]);else{const w=R1(a);for(;++m<h;)l[m]=w}m=-1;const x=[],v=[];for(;++m<h;){const w=l[m];let k="",N="";w===99?(k=":",N=":"):w===108?k=":":w===114&&(N=":");let C=n.alignDelimiters===!1?1:Math.max(1,f[m]-k.length-N.length);const A=k+"-".repeat(C)+N;n.alignDelimiters!==!1&&(C=k.length+C+N.length,C>f[m]&&(f[m]=C),v[m]=C),x[m]=A}c.splice(1,0,x),d.splice(1,0,v),b=-1;const E=[];for(;++b<c.length;){const w=c[b],k=d[b];m=-1;const N=[];for(;++m<h;){const C=w[m]||"";let A="",T="";if(n.alignDelimiters!==!1){const L=f[m]-(k[m]||0),M=l[m];M===114?A=" ".repeat(L):M===99?L%2?(A=" ".repeat(L/2+.5),T=" ".repeat(L/2-.5)):(A=" ".repeat(L/2),T=A):T=" ".repeat(L)}n.delimiterStart!==!1&&!m&&N.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||m)&&N.push(" "),n.alignDelimiters!==!1&&N.push(A),N.push(C),n.alignDelimiters!==!1&&N.push(T),n.padding!==!1&&N.push(" "),(n.delimiterEnd!==!1||m!==h-1)&&N.push("|")}E.push(n.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return E.join(`
540
+ `)}function e$(e){return e==null?"":String(e)}function R1(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 t$(e,t,n,a){const s=n.enter("blockquote"),l=n.createTracker(a);l.move("> "),l.shift(2);const c=n.indentLines(n.containerFlow(e,l.current()),n$);return s(),c}function n$(e,t,n){return">"+(n?"":" ")+e}function i$(e,t){return j1(e,t.inConstruct,!0)&&!j1(e,t.notInConstruct,!1)}function j1(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function M1(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
541
+ `&&i$(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
542
+ `}function a$(e,t){const n=String(e);let a=n.indexOf(t),s=a,l=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++l>c&&(c=l):l=1,s=a+t.length,a=n.indexOf(t,s);return c}function r$(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 s$(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 l$(e,t,n,a){const s=s$(n),l=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(r$(e,n)){const m=n.enter("codeIndented"),x=n.indentLines(l,o$);return m(),x}const d=n.createTracker(a),f=s.repeat(Math.max(a$(l,s)+1,3)),h=n.enter("codeFenced");let b=d.move(f);if(e.lang){const m=n.enter(`codeFencedLang${c}`);b+=d.move(n.safe(e.lang,{before:b,after:" ",encode:["`"],...d.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${c}`);b+=d.move(" "),b+=d.move(n.safe(e.meta,{before:b,after:`
543
+ `,encode:["`"],...d.current()})),m()}return b+=d.move(`
544
+ `),l&&(b+=d.move(l+`
545
+ `)),b+=d.move(f),h(),b}function o$(e,t,n){return(n?"":" ")+e}function nb(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 c$(e,t,n,a){const s=nb(n),l=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let d=n.enter("label");const f=n.createTracker(a);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
546
+ `,...f.current()}))),d(),e.title&&(d=n.enter(`title${l}`),h+=f.move(" "+s),h+=f.move(n.safe(e.title,{before:h,after:s,...f.current()})),h+=f.move(s),d()),c(),h}function u$(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 kc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Gd(e,t,n){const a=Pl(e),s=Pl(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}XS.peek=d$;function XS(e,t,n,a){const s=u$(n),l=n.enter("emphasis"),c=n.createTracker(a),d=c.move(s);let f=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const h=f.charCodeAt(0),b=Gd(a.before.charCodeAt(a.before.length-1),h,s);b.inside&&(f=kc(h)+f.slice(1));const m=f.charCodeAt(f.length-1),x=Gd(a.after.charCodeAt(0),m,s);x.inside&&(f=f.slice(0,-1)+kc(m));const v=c.move(s);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:b.outside},d+f+v}function d$(e,t,n){return n.options.emphasis||"*"}function f$(e,t){let n=!1;return Ef(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Xm}),!!((!e.depth||e.depth<3)&&Vg(e)&&(t.options.setext||n))}function h$(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(a);if(f$(e,n)){const b=n.enter("headingSetext"),m=n.enter("phrasing"),x=n.containerPhrasing(e,{...l.current(),before:`
547
+ `,after:`
548
+ `});return m(),b(),x+`
549
+ `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
550
+ `))+1))}const c="#".repeat(s),d=n.enter("headingAtx"),f=n.enter("phrasing");l.move(c+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
551
+ `,...l.current()});return/^[\t ]/.test(h)&&(h=kc(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),f(),d(),h}ZS.peek=p$;function ZS(e){return e.value||""}function p$(){return"<"}JS.peek=m$;function JS(e,t,n,a){const s=nb(n),l=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let d=n.enter("label");const f=n.createTracker(a);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=n.enter(`title${l}`),h+=f.move(" "+s),h+=f.move(n.safe(e.title,{before:h,after:s,...f.current()})),h+=f.move(s),d()),h+=f.move(")"),c(),h}function m$(){return"!"}ek.peek=g$;function ek(e,t,n,a){const s=e.referenceType,l=n.enter("imageReference");let c=n.enter("label");const d=n.createTracker(a);let f=d.move("![");const h=n.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return c(),n.stack=b,l(),s==="full"||!h||h!==m?f+=d.move(m+"]"):s==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function g$(){return"!"}tk.peek=b$;function tk(e,t,n){let a=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++l<n.unsafe.length;){const c=n.unsafe[l],d=n.compilePattern(c);let f;if(c.atBreak)for(;f=d.exec(a);){let h=f.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(f.index+1)}}return s+a+s}function b$(){return"`"}function nk(e,t){const n=Vg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ik.peek=y$;function ik(e,t,n,a){const s=nb(n),l=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let d,f;if(nk(e,n)){const b=n.stack;n.stack=[],d=n.enter("autolink");let m=c.move("<");return m+=c.move(n.containerPhrasing(e,{before:m,after:">",...c.current()})),m+=c.move(">"),d(),n.stack=b,m}d=n.enter("link"),f=n.enter("label");let h=c.move("[");return h+=c.move(n.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(n.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(f=n.enter("destinationRaw"),h+=c.move(n.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),f(),e.title&&(f=n.enter(`title${l}`),h+=c.move(" "+s),h+=c.move(n.safe(e.title,{before:h,after:s,...c.current()})),h+=c.move(s),f()),h+=c.move(")"),d(),h}function y$(e,t,n){return nk(e,n)?"<":"["}ak.peek=x$;function ak(e,t,n,a){const s=e.referenceType,l=n.enter("linkReference");let c=n.enter("label");const d=n.createTracker(a);let f=d.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return c(),n.stack=b,l(),s==="full"||!h||h!==m?f+=d.move(m+"]"):s==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function x$(){return"["}function ib(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 v$(e){const t=ib(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function w$(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 rk(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 E$(e,t,n,a){const s=n.enter("list"),l=n.bulletCurrent;let c=e.ordered?w$(n):ib(n);const d=e.ordered?c==="."?")":".":v$(n);let f=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&b&&(!b.children||!b.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),rk(n)===c&&b){let m=-1;for(;++m<e.children.length;){const x=e.children[m];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(c=d),n.bulletCurrent=c;const h=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=l,s(),h}function S$(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 k$(e,t,n,a){const s=S$(n);let l=n.bulletCurrent||ib(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let c=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const d=n.createTracker(a);d.move(l+" ".repeat(c-l.length)),d.shift(c);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,d.current()),b);return f(),h;function b(m,x,v){return x?(v?"":" ".repeat(c))+m:(v?l:l+" ".repeat(c-l.length))+m}}function N$(e,t,n,a){const s=n.enter("paragraph"),l=n.enter("phrasing"),c=n.containerPhrasing(e,a);return l(),s(),c}const _$=Uc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function C$(e,t,n,a){return(e.children.some(function(c){return _$(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function A$(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}sk.peek=T$;function sk(e,t,n,a){const s=A$(n),l=n.enter("strong"),c=n.createTracker(a),d=c.move(s+s);let f=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const h=f.charCodeAt(0),b=Gd(a.before.charCodeAt(a.before.length-1),h,s);b.inside&&(f=kc(h)+f.slice(1));const m=f.charCodeAt(f.length-1),x=Gd(a.after.charCodeAt(0),m,s);x.inside&&(f=f.slice(0,-1)+kc(m));const v=c.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:b.outside},d+f+v}function T$(e,t,n){return n.options.strong||"*"}function O$(e,t,n,a){return n.safe(e.value,a)}function R$(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 j$(e,t,n){const a=(rk(n)+(n.options.ruleSpaces?" ":"")).repeat(R$(n));return n.options.ruleSpaces?a.slice(0,-1):a}const lk={blockquote:t$,break:M1,code:l$,definition:c$,emphasis:XS,hardBreak:M1,heading:h$,html:ZS,image:JS,imageReference:ek,inlineCode:tk,link:ik,linkReference:ak,list:E$,listItem:k$,paragraph:N$,root:C$,strong:sk,text:O$,thematicBreak:j$};function M$(){return{enter:{table:D$,tableData:D1,tableHeader:D1,tableRow:I$},exit:{codeText:z$,table:L$,tableData:cm,tableHeader:cm,tableRow:cm}}}function D$(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function L$(e){this.exit(e),this.data.inTable=void 0}function I$(e){this.enter({type:"tableRow",children:[]},e)}function cm(e){this.exit(e)}function D1(e){this.enter({type:"tableCell",children:[]},e)}function z$(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,B$));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function B$(e,t){return t==="|"?t:e}function U$(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
552
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:f,tableRow:d}};function c(v,E,w,k){return h(b(v,w,k),v.align)}function d(v,E,w,k){const N=m(v,w,k),C=h([N]);return C.slice(0,C.indexOf(`
553
+ `))}function f(v,E,w,k){const N=w.enter("tableCell"),C=w.enter("phrasing"),A=w.containerPhrasing(v,{...k,before:l,after:l});return C(),N(),A}function h(v,E){return JF(v,{align:E,alignDelimiters:a,padding:n,stringLength:s})}function b(v,E,w){const k=v.children;let N=-1;const C=[],A=E.enter("table");for(;++N<k.length;)C[N]=m(k[N],E,w);return A(),C}function m(v,E,w){const k=v.children;let N=-1;const C=[],A=E.enter("tableRow");for(;++N<k.length;)C[N]=f(k[N],v,E,w);return A(),C}function x(v,E,w){let k=lk.inlineCode(v,E,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function P$(){return{exit:{taskListCheckValueChecked:L1,taskListCheckValueUnchecked:L1,paragraph:$$}}}function F$(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:H$}}}function L1(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function $$(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const s=t.children;let l=-1,c;for(;++l<s.length;){const d=s[l];if(d.type==="paragraph"){c=d;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function H$(e,t,n,a){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",d=n.createTracker(a);l&&d.move(c);let f=lk.listItem(e,t,n,{...a,...d.current()});return l&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(b){return b+c}}function q$(){return[EF(),HF(),VF(),M$(),P$()]}function K$(e){return{extensions:[SF(),qF(e),QF(),U$(e),F$()]}}const G$={tokenize:Z$,partial:!0},ok={tokenize:J$,partial:!0},ck={tokenize:e5,partial:!0},uk={tokenize:t5,partial:!0},V$={tokenize:n5,partial:!0},dk={name:"wwwAutolink",tokenize:W$,previous:hk},fk={name:"protocolAutolink",tokenize:X$,previous:pk},La={name:"emailAutolink",tokenize:Y$,previous:mk},aa={};function Q$(){return{text:aa}}let Jr=48;for(;Jr<123;)aa[Jr]=La,Jr++,Jr===58?Jr=65:Jr===91&&(Jr=97);aa[43]=La;aa[45]=La;aa[46]=La;aa[95]=La;aa[72]=[La,fk];aa[104]=[La,fk];aa[87]=[La,dk];aa[119]=[La,dk];function Y$(e,t,n){const a=this;let s,l;return c;function c(m){return!tg(m)||!mk.call(a,a.previous)||ab(a.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(m))}function d(m){return tg(m)?(e.consume(m),d):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(V$,b,h)(m):m===45||m===95||vn(m)?(l=!0,e.consume(m),f):b(m)}function h(m){return e.consume(m),s=!0,f}function b(m){return l&&s&&Rn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function W$(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!hk.call(a,a.previous)||ab(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(G$,e.attempt(ok,e.attempt(ck,l),n),n)(c))}function l(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function X$(e,t,n){const a=this;let s="",l=!1;return c;function c(m){return(m===72||m===104)&&pk.call(a,a.previous)&&!ab(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),d):n(m)}function d(m){if(Rn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),d;if(m===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),l?h:(l=!0,f)):n(m)}function h(m){return m===null||Hd(m)||kt(m)||gs(m)||yf(m)?n(m):e.attempt(ok,e.attempt(ck,b),n)(m)}function b(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Z$(e,t,n){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),l):n(c)}function l(c){return c===null?n(c):t(c)}}function J$(e,t,n){let a,s,l;return c;function c(h){return h===46||h===95?e.check(uk,f,d)(h):h===null||kt(h)||gs(h)||h!==45&&yf(h)?f(h):(l=!0,e.consume(h),c)}function d(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),c}function f(h){return s||a||!l?n(h):t(h)}}function e5(e,t){let n=0,a=0;return s;function s(c){return c===40?(n++,e.consume(c),s):c===41&&a<n?l(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(uk,t,l)(c):c===null||kt(c)||gs(c)?t(c):(e.consume(c),s)}function l(c){return c===41&&a++,e.consume(c),s}}function t5(e,t,n){return a;function a(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),a):d===38?(e.consume(d),l):d===93?(e.consume(d),s):d===60||d===null||kt(d)||gs(d)?t(d):n(d)}function s(d){return d===null||d===40||d===91||kt(d)||gs(d)?t(d):a(d)}function l(d){return Rn(d)?c(d):n(d)}function c(d){return d===59?(e.consume(d),a):Rn(d)?(e.consume(d),c):n(d)}}function n5(e,t,n){return a;function a(l){return e.consume(l),s}function s(l){return vn(l)?n(l):t(l)}}function hk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||kt(e)}function pk(e){return!Rn(e)}function mk(e){return!(e===47||tg(e))}function tg(e){return e===43||e===45||e===46||e===95||vn(e)}function ab(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const i5={tokenize:d5,partial:!0};function a5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:o5,continuation:{tokenize:c5},exit:u5}},text:{91:{name:"gfmFootnoteCall",tokenize:l5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:r5,resolveTo:s5}}}}function r5(e,t,n){const a=this;let s=a.events.length;const l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const f=a.events[s][1];if(f.type==="labelImage"){c=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!c||!c._balanced)return n(f);const h=Bi(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function s5(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},d=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",c,t],["exit",c,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...d),e}function l5(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l=0,c;return d;function d(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(l>999||m===93&&!c||m===null||m===91||kt(m))return n(m);if(m===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(Bi(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return kt(m)||(c=!0),l++,e.consume(m),m===92?b:h}function b(m){return m===91||m===92||m===93?(e.consume(m),l++,h):h(m)}}function o5(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l,c=0,d;return f;function f(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):n(E)}function b(E){if(c>999||E===93&&!d||E===null||E===91||kt(E))return n(E);if(E===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return l=Bi(a.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return kt(E)||(d=!0),c++,e.consume(E),E===92?m:b}function m(E){return E===91||E===92||E===93?(e.consume(E),c++,b):b(E)}function x(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),s.includes(l)||s.push(l),at(e,v,"gfmFootnoteDefinitionWhitespace")):n(E)}function v(E){return t(E)}}function c5(e,t,n){return e.check(Bc,t,e.attempt(i5,t,n))}function u5(e){e.exit("gfmFootnoteDefinition")}function d5(e,t,n){const a=this;return at(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(l):n(l)}}function f5(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,d){let f=-1;for(;++f<c.length;)if(c[f][0]==="enter"&&c[f][1].type==="strikethroughSequenceTemporary"&&c[f][1]._close){let h=f;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[f][1].end.offset-c[f][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[f][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[f][1].end)},m={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[f][1].start)},x=[["enter",b,d],["enter",c[h][1],d],["exit",c[h][1],d],["enter",m,d]],v=d.parser.constructs.insideSpan.null;v&&oi(x,x.length,0,xf(v,c.slice(h+1,f),d)),oi(x,x.length,0,[["exit",m,d],["enter",c[f][1],d],["exit",c[f][1],d],["exit",b,d]]),oi(c,h-1,f-h+3,x),f=h+x.length-2;break}}for(f=-1;++f<c.length;)c[f][1].type==="strikethroughSequenceTemporary"&&(c[f][1].type="data");return c}function l(c,d,f){const h=this.previous,b=this.events;let m=0;return x;function x(E){return h===126&&b[b.length-1][1].type!=="characterEscape"?f(E):(c.enter("strikethroughSequenceTemporary"),v(E))}function v(E){const w=Pl(h);if(E===126)return m>1?f(E):(c.consume(E),m++,v);if(m<2&&!n)return f(E);const k=c.exit("strikethroughSequenceTemporary"),N=Pl(E);return k._open=!N||N===2&&!!w,k._close=!w||w===2&&!!N,d(E)}}}class h5{constructor(){this.map=[]}add(t,n,a){p5(this,t,n,a)}consume(t){if(this.map.sort(function(l,c){return l[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const l of s)t.push(l);s=a.pop()}this.map.length=0}}function p5(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function m5(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=a.length-1;a[l]=a[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function g5(){return{flow:{null:{name:"table",tokenize:b5,resolveAll:y5}}}}function b5(e,t,n){const a=this;let s=0,l=0,c;return d;function d(P){let Q=a.events.length-1;for(;Q>-1;){const le=a.events[Q][1].type;if(le==="lineEnding"||le==="linePrefix")Q--;else break}const J=Q>-1?a.events[Q][1].type:null,me=J==="tableHead"||J==="tableRow"?M:f;return me===M&&a.parser.lazy[a.now().line]?n(P):me(P)}function f(P){return e.enter("tableHead"),e.enter("tableRow"),h(P)}function h(P){return P===124||(c=!0,l+=1),b(P)}function b(P){return P===null?n(P):je(P)?l>1?(l=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),v):n(P):Xe(P)?at(e,b,"whitespace")(P):(l+=1,c&&(c=!1,s+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),m(P)))}function m(P){return P===null||P===124||kt(P)?(e.exit("data"),b(P)):(e.consume(P),P===92?x:m)}function x(P){return P===92||P===124?(e.consume(P),m):m(P)}function v(P){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(P):(e.enter("tableDelimiterRow"),c=!1,Xe(P)?at(e,E,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):E(P))}function E(P){return P===45||P===58?k(P):P===124?(c=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),w):L(P)}function w(P){return Xe(P)?at(e,k,"whitespace")(P):k(P)}function k(P){return P===58?(l+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),N):P===45?(l+=1,N(P)):P===null||je(P)?T(P):L(P)}function N(P){return P===45?(e.enter("tableDelimiterFiller"),C(P)):L(P)}function C(P){return P===45?(e.consume(P),C):P===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(P))}function A(P){return Xe(P)?at(e,T,"whitespace")(P):T(P)}function T(P){return P===124?E(P):P===null||je(P)?!c||s!==l?L(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):L(P)}function L(P){return n(P)}function M(P){return e.enter("tableRow"),U(P)}function U(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),U):P===null||je(P)?(e.exit("tableRow"),t(P)):Xe(P)?at(e,U,"whitespace")(P):(e.enter("data"),$(P))}function $(P){return P===null||P===124||kt(P)?(e.exit("data"),U(P)):(e.consume(P),P===92?te:$)}function te(P){return P===92||P===124?(e.consume(P),$):$(P)}}function y5(e,t){let n=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],d=!1,f=0,h,b,m;const x=new h5;for(;++n<e.length;){const v=e[n],E=v[1];v[0]==="enter"?E.type==="tableHead"?(d=!1,f!==0&&(I1(x,t,f,h,b),b=void 0,f=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(n,0,[["enter",h,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(a=!0,m=void 0,l=[0,0,0,0],c=[0,n+1,0,0],d&&(d=!1,b={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(n,0,[["enter",b,t]])),s=E.type==="tableDelimiterRow"?2:b?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(l[1]!==0&&(c[0]=c[1],m=gd(x,t,l,s,void 0,m),l=[0,0,0,0]),c[2]=n)):E.type==="tableCellDivider"&&(a?a=!1:(l[1]!==0&&(c[0]=c[1],m=gd(x,t,l,s,void 0,m)),l=c,c=[l[1],n,0,0])):E.type==="tableHead"?(d=!0,f=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(f=n,l[1]!==0?(c[0]=c[1],m=gd(x,t,l,s,n,m)):c[1]!==0&&(m=gd(x,t,c,s,n,m)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=n)}for(f!==0&&I1(x,t,f,h,b),x.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=m5(t.events,n))}return e}function gd(e,t,n,a,s,l){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(l.end=Object.assign({},ml(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const f=ml(t.events,n[1]);if(l={type:c,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=ml(t.events,n[2]),b=ml(t.events,n[3]),m={type:d,start:Object.assign({},h),end:Object.assign({},b)};if(e.add(n[2],0,[["enter",m,t]]),a!==2){const x=t.events[n[2]],v=t.events[n[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,w=n[3]-n[2]-1;e.add(E,w,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(l.end=Object.assign({},ml(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function I1(e,t,n,a,s){const l=[],c=ml(t.events,n);s&&(s.end=Object.assign({},c),l.push(["exit",s,t])),a.end=Object.assign({},c),l.push(["exit",a,t]),e.add(n+1,0,l)}function ml(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const x5={name:"tasklistCheck",tokenize:w5};function v5(){return{text:{91:x5}}}function w5(e,t,n){const a=this;return s;function s(f){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),l)}function l(f){return kt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),c):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),c):n(f)}function c(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(f)}function d(f){return je(f)?t(f):Xe(f)?e.check({tokenize:E5},t,n)(f):n(f)}}function E5(e,t,n){return at(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function S5(e){return _S([Q$(),a5(),f5(e),g5(),v5()])}const k5={};function rb(e){const t=this,n=e||k5,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),l=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(S5(n)),l.push(q$()),c.push(K$(n))}const z1=(function(e,t,n){const a=Uc(n);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(a(e.children[t],t,e))return e.children[t]}),ws=(function(e){if(e==null)return C5;if(typeof e=="string")return _5(e);if(typeof e=="object")return N5(e);if(typeof e=="function")return sb(e);throw new Error("Expected function, string, or array as `test`")});function N5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ws(e[n]);return sb(a);function a(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function _5(e){return sb(t);function t(n){return n.tagName===e}}function sb(e){return t;function t(n,a,s){return!!(A5(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function C5(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function A5(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const B1=/\n/g,U1=/[\t ]+/g,ng=ws("br"),P1=ws(I5),T5=ws("p"),F1=ws("tr"),O5=ws(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",L5,z5]),gk=ws(["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 R5(e,t){const n=t||{},a="children"in e?e.children:[],s=gk(e),l=xk(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...yk(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<a.length;)c.push(...bk(a[d],e,{whitespace:l,breakBefore:d?void 0:s,breakAfter:d<a.length-1?ng(a[d+1]):s}));const f=[];let h;for(d=-1;++d<c.length;){const b=c[d];typeof b=="number"?h!==void 0&&b>h&&(h=b):b&&(h!==void 0&&h>-1&&f.push(`
554
+ `.repeat(h)||" "),h=-1,f.push(b))}return f.join("")}function bk(e,t,n){return e.type==="element"?j5(e,t,n):e.type==="text"?n.whitespace==="normal"?yk(e,n):M5(e):[]}function j5(e,t,n){const a=xk(e,n),s=e.children||[];let l=-1,c=[];if(O5(e))return c;let d,f;for(ng(e)||F1(e)&&z1(t,e,F1)?f=`
555
+ `:T5(e)?(d=2,f=2):gk(e)&&(d=1,f=1);++l<s.length;)c=c.concat(bk(s[l],e,{whitespace:a,breakBefore:l?void 0:d,breakAfter:l<s.length-1?ng(s[l+1]):f}));return P1(e)&&z1(t,e,P1)&&c.push(" "),d&&c.unshift(d),f&&c.push(f),c}function yk(e,t){const n=String(e.value),a=[],s=[];let l=0;for(;l<=n.length;){B1.lastIndex=l;const f=B1.exec(n),h=f&&"index"in f?f.index:n.length;a.push(D5(n.slice(l,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),l===0?t.breakBefore:!0,h===n.length?t.breakAfter:!0)),l=h+1}let c=-1,d;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),d=void 0):a[c]?(typeof d=="number"&&s.push(d),s.push(a[c]),d=0):(c===0||c===a.length-1)&&s.push(0);return s}function M5(e){return[String(e.value)]}function D5(e,t,n){const a=[];let s=0,l;for(;s<e.length;){U1.lastIndex=s;const c=U1.exec(e);l=c?c.index:e.length,!s&&!l&&c&&!t&&a.push(""),s!==l&&a.push(e.slice(s,l)),s=c?l+c[0].length:l}return s!==l&&!n&&a.push(""),a.join(" ")}function xk(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function L5(e){return!!(e.properties||{}).hidden}function I5(e){return e.tagName==="td"||e.tagName==="th"}function z5(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function B5(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",d={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})"/})]},b={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:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["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"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["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"],N=["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"],T={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},L={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[L,m,d,n,e.C_BLOCK_COMMENT_MODE,b,h],U={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:M.concat([{begin:/\(/,end:/\)/,keywords:T,contains:M.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:T,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,b,d,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(U,$,L,M,[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:T,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function U5(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"]},n=B5(e),a=n.keywords;return a.type=[...a.type,...t.type],a.literal=[...a.literal,...t.literal],a.built_in=[...a.built_in,...t.built_in],a._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function P5(e){const t=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},l=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"})]}},d={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(d);const f={match:/\\"/},h={className:"string",begin:/'/,end:/'/},b={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),E={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],N={match:/(\/[a-z._-]+)+/},C=["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"],T=["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"],L=["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:w,literal:k,built_in:[...C,...A,"set","shopt",...T,...L]},contains:[v,e.SHEBANG(),E,m,l,c,N,d,f,h,b,n]}}function F5(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",d={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})"/})]},b={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:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",k={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"},N=[m,d,n,e.C_BLOCK_COMMENT_MODE,b,h],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:N.concat([{begin:/\(/,end:/\)/,keywords:k,contains:N.concat(["self"]),relevance:0}]),relevance:0},A={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:k,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,b,d,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:k,disableAutodetect:!0,illegal:"</",contains:[].concat(C,A,N,[m,{begin:e.IDENT_RE+"::",keywords:k},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:h,keywords:k}}}function $5(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",d={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})"/})]},b={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:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["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"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["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"],N=["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"],T={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},L={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[L,m,d,n,e.C_BLOCK_COMMENT_MODE,b,h],U={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:M.concat([{begin:/\(/,end:/\)/,keywords:T,contains:M.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:T,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,b,d,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(U,$,L,M,[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:T,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function H5(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],s=["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"],l=["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:s.concat(l),built_in:t,literal:a},d=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),f={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},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(b,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:c},v=e.inherit(x,{illegal:/\n/}),E={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},k=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.C_BLOCK_COMMENT_MODE],v.contains=[k,E,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const N={variants:[h,w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},C={begin:"<",end:">",contains:[{beginKeywords:"in out"},d]},A=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",T={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"}},N,f,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},d,C,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,C,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:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,C],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[N,f,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},T]}}const q5=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_-]*/}}),K5=["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"],G5=["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"],V5=[...K5,...G5],Q5=["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(),Y5=["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(),W5=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),X5=["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 Z5(e){const t=e.regex,n=q5(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",l=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",d=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,a,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Y5.join("|")+")"},{begin:":(:)?("+W5.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+X5.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...d,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...d,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:l},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Q5.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...d,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+V5.join("|")+")\\b"}]}}function J5(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 e6(e){const l={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:l,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:l,illegal:/["']/}]}]}}function t6(e){const t=e.regex,n=/[_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(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function n6(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},l={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:"'"}]},d={begin:/\[/,end:/\]/,contains:[a,l,s,c,n,"self"],relevance:0},f=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,b=/'[^']*'/,m=t.either(f,h,b),x=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:x,className:"attr",starts:{end:/$/,contains:[a,d,l,s,c,n]}}]}}var gl="[0-9](_*[0-9])*",bd=`\\.(${gl})`,yd="[0-9a-fA-F](_*[0-9a-fA-F])*",$1={className:"number",variants:[{begin:`(\\b(${gl})((${bd})|\\.)?|(${bd}))[eE][+-]?(${gl})[fFdD]?\\b`},{begin:`\\b(${gl})((${bd})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${bd})[fFdD]?\\b`},{begin:`\\b(${gl})[fFdD]\\b`},{begin:`\\b0[xX]((${yd})\\.?|(${yd})?\\.(${yd}))[pP][+-]?(${gl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${yd})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function vk(e,t,n){return n===-1?"":e.replace(t,a=>vk(e,t,n-1))}function i6(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+vk("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),f={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:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:f,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+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:f,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,$1,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},$1,h]}}const H1="[A-Za-z$_][0-9A-Za-z$_]*",a6=["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"],r6=["true","false","null","undefined","NaN","Infinity"],wk=["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"],Ek=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Sk=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s6=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],l6=[].concat(Sk,wk,Ek);function o6(e){const t=e.regex,n=(ce,{after:ne})=>{const j="</"+ce[0].slice(1);return ce.input.indexOf(j,ne)!==-1},a=H1,s={begin:"<>",end:"</>"},l=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ce,ne)=>{const j=ce[0].length+ce.index,D=ce.input[j];if(D==="<"||D===","){ne.ignoreMatch();return}D===">"&&(n(ce,{after:j})||ne.ignoreMatch());let Y;const R=ce.input.substring(j);if(Y=R.match(/^\s*=/)){ne.ignoreMatch();return}if((Y=R.match(/^\s+extends\s+/))&&Y.index===0){ne.ignoreMatch();return}}},d={$pattern:H1,keyword:a6,literal:r6,built_in:l6,"variable.language":s6},f="[0-9](_?[0-9])*",h=`\\.(${f})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${b})((${h})|\\.)?|(${h}))[eE][+-]?(${f})\\b`},{begin:`\\b(${b})\\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},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},C={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:a+"(?=\\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,v,E,w,k,{match:/\$\d+/},m];x.contains=A.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(A)});const T=[].concat(C,x.contains),L=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(T)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:L},U={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},$={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:{_:[...wk,...Ek]}},te={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},Q={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(ce){return t.concat("(?!",ce.join("|"),")")}const me={match:t.concat(/\b/,J([...Sk,"super","import"].map(ce=>`${ce}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},le={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),te,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,k,C,{match:/\$\d+/},m,$,{scope:"attr",match:a+t.lookahead(":"),relevance:0},oe,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:H,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:d,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:l},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},le,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},me,Q,U,ee,{match:/\$[(.]/}]}}function c6(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],s={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var bl="[0-9](_*[0-9])*",xd=`\\.(${bl})`,vd="[0-9a-fA-F](_*[0-9a-fA-F])*",u6={className:"number",variants:[{begin:`(\\b(${bl})((${xd})|\\.)?|(${xd}))[eE][+-]?(${bl})[fFdD]?\\b`},{begin:`\\b(${bl})((${xd})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${xd})[fFdD]?\\b`},{begin:`\\b(${bl})[fFdD]\\b`},{begin:`\\b0[xX]((${vd})\\.?|(${vd})?\\.(${vd}))[pP][+-]?(${bl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${vd})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function d6(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"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},l={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[l,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,l,s]}]};s.contains.push(c);const d={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},f={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},h=u6,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},x=m;return x.variants[1].contains=[m],m.variants[1].contains=[x],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,b,n,a,d,f,{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,b],relevance:0},e.C_LINE_COMMENT_MODE,b,d,f,c,e.C_NUMBER_MODE]},b]},{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},d,f]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
556
+ `},h]}}const f6=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_-]*/}}),h6=["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"],p6=["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"],m6=[...h6,...p6],g6=["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(),kk=["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(),Nk=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),b6=["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(),y6=kk.concat(Nk).sort().reverse();function x6(e){const t=f6(e),n=y6,a="and or not only",s="[\\w-]+",l="("+s+"|@\\{"+s+"\\})",c=[],d=[],f=function(A){return{className:"string",begin:"~?"+A+".*?"+A}},h=function(A,T,L){return{className:A,begin:T,relevance:L}},b={$pattern:/[a-z-]+/,keyword:a,attribute:g6.join(" ")},m={begin:"\\(",end:"\\)",contains:d,keywords:b,relevance:0};d.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f("'"),f('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,h("variable","@@?"+s,10),h("variable","@\\{"+s+"\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const x=d.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(d)},E={begin:l+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+b6.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:d}}]},w={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:b,returnEnd:!0,contains:d,relevance:0}},k={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:x}},N={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:l,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,h("keyword","all\\b"),h("variable","@\\{"+s+"\\}"),{begin:"\\b("+m6.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,h("selector-tag",l,0),h("selector-id","#"+l),h("selector-class","\\."+l,0),h("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+kk.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Nk.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:x},{begin:"!important"},t.FUNCTION_DISPATCH]},C={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[N]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,k,C,E,N,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function v6(e){const t="\\[=*\\[",n="\\]=*\\]",a={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[a],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:s.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:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[a],relevance:5}])}}function w6(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={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,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},l={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,n,a,s,l,c]}}function E6(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},s={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}]},l={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}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,f={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),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}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(h,{contains:[]}),x=e.inherit(b,{contains:[]});h.contains.push(x),b.contains.push(m);let v=[n,f];return[h,b,m,x].forEach(N=>{N.contains=N.contains.concat(v)}),v=v.concat(h,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},n,l,h,b,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},s,a,f,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function S6(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+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,d={"variable.language":["this","super"],$pattern:n,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"]},f={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:d,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:"("+f.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:f,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function k6(e){const t=e.regex,n=["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"],a=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},l={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},c={begin:/->\{/,end:/\}/},d={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},f={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[d]},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},b=[e.BACKSLASH_ESCAPE,l,f],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(w,k,N="\\1")=>{const C=N==="\\1"?N:t.concat(N,k);return t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,C,/(?:\\.|[^\\\/])*?/,N,a)},v=(w,k,N)=>t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,N,a),E=[f,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:b,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:x("s|tr|y",t.either(...m,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,d]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,d,h]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return l.contains=E,c.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:E}}function N6(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),l=t.concat(/[A-Z]+/,n),c={scope:"variable",match:"\\$+"+a},d={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},f={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=e.inherit(e.APOS_STRING_MODE,{illegal:null}),b=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(f)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(f),"on:begin":(le,ee)=>{ee.data._beginMatch=le[1]||le[2]},"on:end":(le,ee)=>{ee.data._beginMatch!==le[1]&&ee.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
557
+ ]`,E={scope:"string",variants:[b,h,m,x]},w={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},k=["false","null","true"],N=["__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"],C=["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"],T={keyword:N,literal:(le=>{const ee=[];return le.forEach(H=>{ee.push(H),H.toLowerCase()===H?ee.push(H.toUpperCase()):ee.push(H.toLowerCase())}),ee})(k),built_in:C},L=le=>le.map(ee=>ee.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",L(C).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},U=t.concat(a,"\\b(?!\\()"),$={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),U],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),U],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},te={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},P={relevance:0,begin:/\(/,end:/\)/,keywords:T,contains:[te,c,$,e.C_BLOCK_COMMENT_MODE,E,w,M]},Q={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",L(N).join("\\b|"),"|",L(C).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[P]};P.contains.push(Q);const J=[te,$,e.C_BLOCK_COMMENT_MODE,E,w,M],me={begin:t.concat(/#\[\s*\\?/,t.either(s,l)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:k,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:k,keyword:["new","array"]},contains:["self",...J]},...J,{scope:"meta",variants:[{match:s},{match:l}]}]};return{case_insensitive:!1,keywords:T,contains:[me,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}]}},d,{scope:"variable.language",match:/\$this\b/},c,Q,$,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},M,{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:T,contains:["self",me,c,$,e.C_BLOCK_COMMENT_MODE,E,w]}]},{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]},E,w]}}function _6(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 C6(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function A6(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["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"],d={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,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"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:d,illegal:/#/},b={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,b,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,b,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,b,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",v=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,E=`\\b|${a.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${v}))[eE][+-]?(${x})[jJ]?(?=${E})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${E})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${E})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${E})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${E})`},{begin:`\\b(${x})[jJ](?=${E})`}]},k={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:d,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},N={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:["self",f,w,m,e.HASH_COMMENT_MODE]}]};return h.contains=[m,w,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:d,illegal:/(<\/|\?)|=>/,contains:[f,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[N]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[w,N,m]}]}}function T6(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function O6(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=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]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,l=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,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:n},{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:[s,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[l,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:l},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function R6(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(a,/(::\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"]},d={className:"doctag",begin:"@[A-Za-z]+"},f={begin:"#<",end:">"},h=[e.COMMENT("#","$",{contains:[d]}),e.COMMENT("^=begin","^=end",{contains:[d],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:c},m={className:"string",contains:[e.BACKSLASH_ESCAPE,b],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,b]})]}]},x="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",E={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${v}))?([eE][+-]?(${v})|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"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},M=[m,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},E,{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,b],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(f,h),relevance:0}].concat(f,h);b.contains=M,w.contains=M;const P=[{begin:/^\s*=>/,starts:{end:"$",contains:M}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:M}}];return h.unshift(f),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(P).concat(h).concat(M)}}function j6(e){const t=e.regex,n=/(r#)?/,a=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),l={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",d=["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"],f=["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!"],b=["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:b,keyword:d,literal:f,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+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:h,type:b}},{className:"punctuation",begin:"->"},l]}}const M6=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_-]*/}}),D6=["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"],L6=["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"],I6=[...D6,...L6],z6=["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(),B6=["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(),U6=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),P6=["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 F6(e){const t=M6(e),n=U6,a=B6,s="@[a-z-]+",l="and or not only",d={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("+I6.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},d,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+P6.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,d,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:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:z6.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},d,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function $6(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function H6(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},l=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],d=["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"],f=["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"],b=["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"],x=["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"],v=b,E=[...h,...f].filter(L=>!b.includes(L)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},N={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function C(L){return t.concat(/\b/,t.either(...L.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:C(x),relevance:0};function T(L,{exceptions:M,when:U}={}){const $=U;return M=M||[],L.map(te=>te.match(/\|\d+$/)||M.includes(te)?te:$(te)?`${te}|0`:te)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:T(E,{when:L=>L.length<3}),literal:l,type:d,built_in:m},contains:[{scope:"type",match:C(c)},A,N,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}function _k(e){return e?typeof e=="string"?e:e.source:null}function rc(e){return wt("(?=",e,")")}function wt(...e){return e.map(n=>_k(n)).join("")}function q6(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function An(...e){return"("+(q6(e).capture?"":"?:")+e.map(a=>_k(a)).join("|")+")"}const lb=e=>wt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),K6=["Protocol","Type"].map(lb),q1=["init","self"].map(lb),G6=["Any","Self"],um=["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"],K1=["false","nil","true"],V6=["assignment","associativity","higherThan","left","lowerThan","none","right"],Q6=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],G1=["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"],Ck=An(/[/=\-+!*%<>&|^~?]/,/[\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]/),Ak=An(Ck,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),dm=wt(Ck,Ak,"*"),Tk=An(/[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]/),Vd=An(Tk,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Wi=wt(Tk,Vd,"*"),wd=wt(/[A-Z]/,Vd,"*"),Y6=["attached","autoclosure",wt(/convention\(/,An("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",wt(/objc\(/,Wi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],W6=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function X6(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,An(...K6,...q1)],className:{2:"keyword"}},l={match:wt(/\./,An(...um)),relevance:0},c=um.filter(tt=>typeof tt=="string").concat(["_|0"]),d=um.filter(tt=>typeof tt!="string").concat(G6).map(lb),f={variants:[{className:"keyword",match:An(...d,...q1)}]},h={$pattern:An(/\b\w+/,/#\w+/),keyword:c.concat(Q6),literal:K1},b=[s,l,f],m={match:wt(/\./,An(...G1)),relevance:0},x={className:"built_in",match:wt(/\b/,An(...G1),/(?=\()/)},v=[m,x],E={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:dm},{match:`\\.(\\.|${Ak})+`}]},k=[E,w],N="([0-9]_*)+",C="([0-9a-fA-F]_*)+",A={className:"number",relevance:0,variants:[{match:`\\b(${N})(\\.(${N}))?([eE][+-]?(${N}))?\\b`},{match:`\\b0x(${C})(\\.(${C}))?([pP][+-]?(${N}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},T=(tt="")=>({className:"subst",variants:[{match:wt(/\\/,tt,/[0\\tnr"']/)},{match:wt(/\\/,tt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),L=(tt="")=>({className:"subst",match:wt(/\\/,tt,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(tt="")=>({className:"subst",label:"interpol",begin:wt(/\\/,tt,/\(/),end:/\)/}),U=(tt="")=>({begin:wt(tt,/"""/),end:wt(/"""/,tt),contains:[T(tt),L(tt),M(tt)]}),$=(tt="")=>({begin:wt(tt,/"/),end:wt(/"/,tt),contains:[T(tt),M(tt)]}),te={className:"string",variants:[U(),U("#"),U("##"),U("###"),$(),$("#"),$("##"),$("###")]},P=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],Q={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:P},J=tt=>{const Oi=wt(tt,/\//),fi=wt(/\//,tt);return{begin:Oi,end:fi,contains:[...P,{scope:"comment",begin:`#(?!.*${fi})`,end:/$/}]}},me={scope:"regexp",variants:[J("###"),J("##"),J("#"),Q]},le={match:wt(/`/,Wi,/`/)},ee={className:"variable",match:/\$\d+/},H={className:"variable",match:`\\$${Vd}+`},oe=[le,ee,H],ce={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:W6,contains:[...k,A,te]}]}},ne={scope:"keyword",match:wt(/@/,An(...Y6),rc(An(/\(/,/\s+/)))},j={scope:"meta",match:wt(/@/,Wi)},D=[ce,ne,j],Y={match:rc(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:wt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Vd,"+")},{className:"type",match:wd,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:wt(/\s+&\s+/,rc(wd)),relevance:0}]},R={begin:/</,end:/>/,keywords:h,contains:[...a,...b,...D,E,Y]};Y.contains.push(R);const ye={match:wt(Wi,/\s*:/),keywords:"_|0",relevance:0},X={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",ye,...a,me,...b,...v,...k,A,te,...oe,...D,Y]},fe={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,Y]},he={begin:An(rc(wt(Wi,/\s*:/)),rc(wt(Wi,/\s+/,Wi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Wi}]},K={begin:/\(/,end:/\)/,keywords:h,contains:[he,...a,...b,...k,A,te,...D,Y,X],endsParent:!0,illegal:/["']/},ue={match:[/(func|macro)/,/\s+/,An(le.match,Wi,dm)],className:{1:"keyword",3:"title.function"},contains:[fe,K,t],illegal:[/\[/,/%/]},Oe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[fe,K,t],illegal:/\[|%/},dt={match:[/operator/,/\s+/,dm],className:{1:"keyword",3:"title"}},ft={begin:[/precedencegroup/,/\s+/,wd],className:{1:"keyword",3:"title"},contains:[Y],keywords:[...V6,...K1],end:/}/},di={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Yn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},$i={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Wi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[fe,...b,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:wd},...b],relevance:0}]};for(const tt of te.variants){const Oi=tt.contains.find(Hi=>Hi.label==="interpol");Oi.keywords=h;const fi=[...b,...v,...k,A,te,...oe];Oi.contains=[...fi,{begin:/\(/,end:/\)/,contains:["self",...fi]}]}return{name:"Swift",keywords:h,contains:[...a,ue,Oe,di,Yn,$i,dt,ft,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},me,...b,...v,...k,A,te,...oe,...D,Y,X]}}const Qd="[A-Za-z$_][0-9A-Za-z$_]*",Ok=["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"],Rk=["true","false","null","undefined","NaN","Infinity"],jk=["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"],Mk=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Dk=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Lk=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Ik=[].concat(Dk,jk,Mk);function Z6(e){const t=e.regex,n=(ce,{after:ne})=>{const j="</"+ce[0].slice(1);return ce.input.indexOf(j,ne)!==-1},a=Qd,s={begin:"<>",end:"</>"},l=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ce,ne)=>{const j=ce[0].length+ce.index,D=ce.input[j];if(D==="<"||D===","){ne.ignoreMatch();return}D===">"&&(n(ce,{after:j})||ne.ignoreMatch());let Y;const R=ce.input.substring(j);if(Y=R.match(/^\s*=/)){ne.ignoreMatch();return}if((Y=R.match(/^\s+extends\s+/))&&Y.index===0){ne.ignoreMatch();return}}},d={$pattern:Qd,keyword:Ok,literal:Rk,built_in:Ik,"variable.language":Lk},f="[0-9](_?[0-9])*",h=`\\.(${f})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${b})((${h})|\\.)?|(${h}))[eE][+-]?(${f})\\b`},{begin:`\\b(${b})\\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},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},C={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:a+"(?=\\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,v,E,w,k,{match:/\$\d+/},m];x.contains=A.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(A)});const T=[].concat(C,x.contains),L=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(T)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:L},U={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},$={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:{_:[...jk,...Mk]}},te={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},Q={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(ce){return t.concat("(?!",ce.join("|"),")")}const me={match:t.concat(/\b/,J([...Dk,"super","import"].map(ce=>`${ce}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},le={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),te,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,k,C,{match:/\$\d+/},m,$,{scope:"attr",match:a+t.lookahead(":"),relevance:0},oe,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:H,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:d,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:l},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},le,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},me,Q,U,ee,{match:/\$[(.]/}]}}function J6(e){const t=e.regex,n=Z6(e),a=Qd,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],l={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},d={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Qd,keyword:Ok.concat(f),literal:Rk,built_in:Ik.concat(s),"variable.language":Lk},b={className:"meta",begin:"@"+a},m=(w,k,N)=>{const C=w.contains.findIndex(A=>A.label===k);if(C===-1)throw new Error("can not find mode to replace");w.contains.splice(C,1,N)};Object.assign(n.keywords,h),n.exports.PARAMS_CONTAINS.push(b);const x=n.contains.find(w=>w.scope==="attr"),v=Object.assign({},x,{match:t.concat(a,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,x,v]),n.contains=n.contains.concat([b,l,c,v]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",d);const E=n.contains.find(w=>w.label==="func.def");return E.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function e9(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,l=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,d=/\d{1,2}(:\d{1,2}){1,2}/,f={className:"literal",variants:[{begin:t.concat(/# */,t.either(l,s),/ *#/)},{begin:t.concat(/# */,d,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(l,s),/ +/,t.either(c,d),/ *#/)}]},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])|[%&])?/}]},b={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=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:[n,a,f,h,b,m,x,{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:[x]}]}}function t9(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["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"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},l={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},d={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/},f={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:a},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},l,c,s,e.QUOTE_STRING_MODE,f,h,d]}}function n9(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},l={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(l,{begin:/\(/,end:/\)/}),d=e.inherit(e.APOS_STRING_MODE,{className:"string"}),f=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{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:[l,f,d,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[l,c,f,d]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{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(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:h}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function i9(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},l={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,s]},d=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={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"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},E={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},k=[a,{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+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{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}},x,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},E,w,l,c],N=[...k];return N.pop(),N.push(d),v.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}const a9={arduino:U5,bash:P5,c:F5,cpp:$5,csharp:H5,css:Z5,diff:J5,go:e6,graphql:t6,ini:n6,java:i6,javascript:o6,json:c6,kotlin:d6,less:x6,lua:v6,makefile:w6,markdown:E6,objectivec:S6,perl:k6,php:N6,"php-template":_6,plaintext:C6,python:A6,"python-repl":T6,r:O6,ruby:R6,rust:j6,scss:F6,shell:$6,sql:H6,swift:X6,typescript:J6,vbnet:e9,wasm:t9,xml:n9,yaml:i9};var fm,V1;function r9(){if(V1)return fm;V1=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(re=>{const ve=B[re],ze=typeof ve;(ze==="object"||ze==="function")&&!Object.isFrozen(ve)&&e(ve)}),B}class t{constructor(re){re.data===void 0&&(re.data={}),this.data=re.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(B){return B.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(B,...re){const ve=Object.create(null);for(const ze in B)ve[ze]=B[ze];return re.forEach(function(ze){for(const At in ze)ve[At]=ze[At]}),ve}const s="</span>",l=B=>!!B.scope,c=(B,{prefix:re})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const ve=B.split(".");return[`${re}${ve.shift()}`,...ve.map((ze,At)=>`${ze}${"_".repeat(At+1)}`)].join(" ")}return`${re}${B}`};class d{constructor(re,ve){this.buffer="",this.classPrefix=ve.classPrefix,re.walk(this)}addText(re){this.buffer+=n(re)}openNode(re){if(!l(re))return;const ve=c(re.scope,{prefix:this.classPrefix});this.span(ve)}closeNode(re){l(re)&&(this.buffer+=s)}value(){return this.buffer}span(re){this.buffer+=`<span class="${re}">`}}const f=(B={})=>{const re={children:[]};return Object.assign(re,B),re};class h{constructor(){this.rootNode=f(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(re){this.top.children.push(re)}openNode(re){const ve=f({scope:re});this.add(ve),this.stack.push(ve)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(re){return this.constructor._walk(re,this.rootNode)}static _walk(re,ve){return typeof ve=="string"?re.addText(ve):ve.children&&(re.openNode(ve),ve.children.forEach(ze=>this._walk(re,ze)),re.closeNode(ve)),re}static _collapse(re){typeof re!="string"&&re.children&&(re.children.every(ve=>typeof ve=="string")?re.children=[re.children.join("")]:re.children.forEach(ve=>{h._collapse(ve)}))}}class b extends h{constructor(re){super(),this.options=re}addText(re){re!==""&&this.add(re)}startScope(re){this.openNode(re)}endScope(){this.closeNode()}__addSublanguage(re,ve){const ze=re.root;ve&&(ze.scope=`language:${ve}`),this.add(ze)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(B){return B?typeof B=="string"?B:B.source:null}function x(B){return w("(?=",B,")")}function v(B){return w("(?:",B,")*")}function E(B){return w("(?:",B,")?")}function w(...B){return B.map(ve=>m(ve)).join("")}function k(B){const re=B[B.length-1];return typeof re=="object"&&re.constructor===Object?(B.splice(B.length-1,1),re):{}}function N(...B){return"("+(k(B).capture?"":"?:")+B.map(ze=>m(ze)).join("|")+")"}function C(B){return new RegExp(B.toString()+"|").exec("").length-1}function A(B,re){const ve=B&&B.exec(re);return ve&&ve.index===0}const T=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function L(B,{joinWith:re}){let ve=0;return B.map(ze=>{ve+=1;const At=ve;let Et=m(ze),ke="";for(;Et.length>0;){const Ee=T.exec(Et);if(!Ee){ke+=Et;break}ke+=Et.substring(0,Ee.index),Et=Et.substring(Ee.index+Ee[0].length),Ee[0][0]==="\\"&&Ee[1]?ke+="\\"+String(Number(Ee[1])+At):(ke+=Ee[0],Ee[0]==="("&&ve++)}return ke}).map(ze=>`(${ze})`).join(re)}const M=/\b\B/,U="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",te="\\b\\d+(\\.\\d+)?",P="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Q="\\b(0b[01]+)",J="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",me=(B={})=>{const re=/^#![ ]*\//;return B.binary&&(B.begin=w(re,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:re,end:/$/,relevance:0,"on:begin":(ve,ze)=>{ve.index!==0&&ze.ignoreMatch()}},B)},le={begin:"\\\\[\\s\\S]",relevance:0},ee={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[le]},H={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[le]},oe={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(B,re,ve={}){const ze=a({scope:"comment",begin:B,end:re,contains:[]},ve);ze.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 At=N("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 ze.contains.push({begin:w(/[ ]+/,"(",At,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ze},ne=ce("//","$"),j=ce("/\\*","\\*/"),D=ce("#","$"),Y={scope:"number",begin:te,relevance:0},R={scope:"number",begin:P,relevance:0},ye={scope:"number",begin:Q,relevance:0},X={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[le,{begin:/\[/,end:/\]/,relevance:0,contains:[le]}]},fe={scope:"title",begin:U,relevance:0},he={scope:"title",begin:$,relevance:0},K={begin:"\\.\\s*"+$,relevance:0};var Oe=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:le,BINARY_NUMBER_MODE:ye,BINARY_NUMBER_RE:Q,COMMENT:ce,C_BLOCK_COMMENT_MODE:j,C_LINE_COMMENT_MODE:ne,C_NUMBER_MODE:R,C_NUMBER_RE:P,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(re,ve)=>{ve.data._beginMatch=re[1]},"on:end":(re,ve)=>{ve.data._beginMatch!==re[1]&&ve.ignoreMatch()}})},HASH_COMMENT_MODE:D,IDENT_RE:U,MATCH_NOTHING_RE:M,METHOD_GUARD:K,NUMBER_MODE:Y,NUMBER_RE:te,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:H,REGEXP_MODE:X,RE_STARTERS_RE:J,SHEBANG:me,TITLE_MODE:fe,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:he});function dt(B,re){B.input[B.index-1]==="."&&re.ignoreMatch()}function ft(B,re){B.className!==void 0&&(B.scope=B.className,delete B.className)}function di(B,re){re&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=dt,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function Yn(B,re){Array.isArray(B.illegal)&&(B.illegal=N(...B.illegal))}function $i(B,re){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function tt(B,re){B.relevance===void 0&&(B.relevance=1)}const Oi=(B,re)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const ve=Object.assign({},B);Object.keys(B).forEach(ze=>{delete B[ze]}),B.keywords=ve.keywords,B.begin=w(ve.beforeMatch,x(ve.begin)),B.starts={relevance:0,contains:[Object.assign(ve,{endsParent:!0})]},B.relevance=0,delete ve.beforeMatch},fi=["of","and","for","in","not","or","if","then","parent","list","value"],Hi="keyword";function ra(B,re,ve=Hi){const ze=Object.create(null);return typeof B=="string"?At(ve,B.split(" ")):Array.isArray(B)?At(ve,B):Object.keys(B).forEach(function(Et){Object.assign(ze,ra(B[Et],re,Et))}),ze;function At(Et,ke){re&&(ke=ke.map(Ee=>Ee.toLowerCase())),ke.forEach(function(Ee){const Ie=Ee.split("|");ze[Ie[0]]=[Et,Rr(Ie[0],Ie[1])]})}}function Rr(B,re){return re?Number(re):to(B)?0:1}function to(B){return fi.includes(B.toLowerCase())}const Es={},Lt=B=>{console.error(B)},Ss=(B,...re)=>{console.log(`WARN: ${B}`,...re)},ie=(B,re)=>{Es[`${B}/${re}`]||(console.log(`Deprecated as of ${B}. ${re}`),Es[`${B}/${re}`]=!0)},be=new Error;function Me(B,re,{key:ve}){let ze=0;const At=B[ve],Et={},ke={};for(let Ee=1;Ee<=re.length;Ee++)ke[Ee+ze]=At[Ee],Et[Ee+ze]=!0,ze+=C(re[Ee-1]);B[ve]=ke,B[ve]._emit=Et,B[ve]._multi=!0}function Ve(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),be;if(typeof B.beginScope!="object"||B.beginScope===null)throw Lt("beginScope must be object"),be;Me(B,B.begin,{key:"beginScope"}),B.begin=L(B.begin,{joinWith:""})}}function rt(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),be;if(typeof B.endScope!="object"||B.endScope===null)throw Lt("endScope must be object"),be;Me(B,B.end,{key:"endScope"}),B.end=L(B.end,{joinWith:""})}}function Sn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function Ri(B){Sn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),Ve(B),rt(B)}function cn(B){function re(ke,Ee){return new RegExp(m(ke),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(Ee?"g":""))}class ve{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ee,Ie){Ie.position=this.position++,this.matchIndexes[this.matchAt]=Ie,this.regexes.push([Ie,Ee]),this.matchAt+=C(Ee)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ee=this.regexes.map(Ie=>Ie[1]);this.matcherRe=re(L(Ee,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ee){this.matcherRe.lastIndex=this.lastIndex;const Ie=this.matcherRe.exec(Ee);if(!Ie)return null;const Kt=Ie.findIndex((sa,Ns)=>Ns>0&&sa!==void 0),Rt=this.matchIndexes[Kt];return Ie.splice(0,Kt),Object.assign(Ie,Rt)}}class ze{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ee){if(this.multiRegexes[Ee])return this.multiRegexes[Ee];const Ie=new ve;return this.rules.slice(Ee).forEach(([Kt,Rt])=>Ie.addRule(Kt,Rt)),Ie.compile(),this.multiRegexes[Ee]=Ie,Ie}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ee,Ie){this.rules.push([Ee,Ie]),Ie.type==="begin"&&this.count++}exec(Ee){const Ie=this.getMatcher(this.regexIndex);Ie.lastIndex=this.lastIndex;let Kt=Ie.exec(Ee);if(this.resumingScanAtSamePosition()&&!(Kt&&Kt.index===this.lastIndex)){const Rt=this.getMatcher(0);Rt.lastIndex=this.lastIndex+1,Kt=Rt.exec(Ee)}return Kt&&(this.regexIndex+=Kt.position+1,this.regexIndex===this.count&&this.considerAll()),Kt}}function At(ke){const Ee=new ze;return ke.contains.forEach(Ie=>Ee.addRule(Ie.begin,{rule:Ie,type:"begin"})),ke.terminatorEnd&&Ee.addRule(ke.terminatorEnd,{type:"end"}),ke.illegal&&Ee.addRule(ke.illegal,{type:"illegal"}),Ee}function Et(ke,Ee){const Ie=ke;if(ke.isCompiled)return Ie;[ft,$i,Ri,Oi].forEach(Rt=>Rt(ke,Ee)),B.compilerExtensions.forEach(Rt=>Rt(ke,Ee)),ke.__beforeBegin=null,[di,Yn,tt].forEach(Rt=>Rt(ke,Ee)),ke.isCompiled=!0;let Kt=null;return typeof ke.keywords=="object"&&ke.keywords.$pattern&&(ke.keywords=Object.assign({},ke.keywords),Kt=ke.keywords.$pattern,delete ke.keywords.$pattern),Kt=Kt||/\w+/,ke.keywords&&(ke.keywords=ra(ke.keywords,B.case_insensitive)),Ie.keywordPatternRe=re(Kt,!0),Ee&&(ke.begin||(ke.begin=/\B|\b/),Ie.beginRe=re(Ie.begin),!ke.end&&!ke.endsWithParent&&(ke.end=/\B|\b/),ke.end&&(Ie.endRe=re(Ie.end)),Ie.terminatorEnd=m(Ie.end)||"",ke.endsWithParent&&Ee.terminatorEnd&&(Ie.terminatorEnd+=(ke.end?"|":"")+Ee.terminatorEnd)),ke.illegal&&(Ie.illegalRe=re(ke.illegal)),ke.contains||(ke.contains=[]),ke.contains=[].concat(...ke.contains.map(function(Rt){return mn(Rt==="self"?ke:Rt)})),ke.contains.forEach(function(Rt){Et(Rt,Ie)}),ke.starts&&Et(ke.starts,Ee),Ie.matcher=At(Ie),Ie}if(B.compilerExtensions||(B.compilerExtensions=[]),B.contains&&B.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return B.classNameAliases=a(B.classNameAliases||{}),Et(B)}function Pt(B){return B?B.endsWithParent||Pt(B.starts):!1}function mn(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(re){return a(B,{variants:null},re)})),B.cachedVariants?B.cachedVariants:Pt(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var ht="11.11.1";class qi extends Error{constructor(re,ve){super(re),this.name="HTMLInjectionError",this.html=ve}}const kn=n,Fc=a,jr=Symbol("nomatch"),ks=7,Mr=function(B){const re=Object.create(null),ve=Object.create(null),ze=[];let At=!0;const Et="Could not find the language '{}', did you forget to load/include a language module?",ke={disableAutodetect:!0,name:"Plain text",contains:[]};let Ee={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function Ie(pe){return Ee.noHighlightRe.test(pe)}function Kt(pe){let Ae=pe.className+" ";Ae+=pe.parentNode?pe.parentNode.className:"";const Qe=Ee.languageDetectRe.exec(Ae);if(Qe){const pt=Nn(Qe[1]);return pt||(Ss(Et.replace("{}",Qe[1])),Ss("Falling back to no-highlight mode for this block.",pe)),pt?Qe[1]:"no-highlight"}return Ae.split(/\s+/).find(pt=>Ie(pt)||Nn(pt))}function Rt(pe,Ae,Qe){let pt="",Vt="";typeof Ae=="object"?(pt=pe,Qe=Ae.ignoreIllegals,Vt=Ae.language):(ie("10.7.0","highlight(lang, code, ...args) has been deprecated."),ie("10.7.0",`Please use highlight(code, options) instead.
558
+ https://github.com/highlightjs/highlight.js/issues/2277`),Vt=pe,pt=Ae),Qe===void 0&&(Qe=!0);const bn={code:pt,language:Vt};Lr("before:highlight",bn);const Wn=bn.result?bn.result:sa(bn.language,bn.code,Qe);return Wn.code=bn.code,Lr("after:highlight",Wn),Wn}function sa(pe,Ae,Qe,pt){const Vt=Object.create(null);function bn(xe,Ne){return xe.keywords[Ne]}function Wn(){if(!Le.keywords){Xt.addText(mt);return}let xe=0;Le.keywordPatternRe.lastIndex=0;let Ne=Le.keywordPatternRe.exec(mt),$e="";for(;Ne;){$e+=mt.substring(xe,Ne.index);const Ze=un.case_insensitive?Ne[0].toLowerCase():Ne[0],It=bn(Le,Ze);if(It){const[hi,lo]=It;if(Xt.addText($e),$e="",Vt[Ze]=(Vt[Ze]||0)+1,Vt[Ze]<=ks&&(Ua+=lo),hi.startsWith("_"))$e+=Ne[0];else{const Qc=un.classNameAliases[hi]||hi;Xn(Ne[0],Qc)}}else $e+=Ne[0];xe=Le.keywordPatternRe.lastIndex,Ne=Le.keywordPatternRe.exec(mt)}$e+=mt.substring(xe),Xt.addText($e)}function Mn(){if(mt==="")return;let xe=null;if(typeof Le.subLanguage=="string"){if(!re[Le.subLanguage]){Xt.addText(mt);return}xe=sa(Le.subLanguage,mt,!0,Vc[Le.subLanguage]),Vc[Le.subLanguage]=xe._top}else xe=_s(mt,Le.subLanguage.length?Le.subLanguage:null);Le.relevance>0&&(Ua+=xe.relevance),Xt.__addSublanguage(xe._emitter,xe.language)}function _t(){Le.subLanguage!=null?Mn():Wn(),mt=""}function Xn(xe,Ne){xe!==""&&(Xt.startScope(Ne),Xt.addText(xe),Xt.endScope())}function Kc(xe,Ne){let $e=1;const Ze=Ne.length-1;for(;$e<=Ze;){if(!xe._emit[$e]){$e++;continue}const It=un.classNameAliases[xe[$e]]||xe[$e],hi=Ne[$e];It?Xn(hi,It):(mt=hi,Wn(),mt=""),$e++}}function As(xe,Ne){return xe.scope&&typeof xe.scope=="string"&&Xt.openNode(un.classNameAliases[xe.scope]||xe.scope),xe.beginScope&&(xe.beginScope._wrap?(Xn(mt,un.classNameAliases[xe.beginScope._wrap]||xe.beginScope._wrap),mt=""):xe.beginScope._multi&&(Kc(xe.beginScope,Ne),mt="")),Le=Object.create(xe,{parent:{value:Le}}),Le}function ao(xe,Ne,$e){let Ze=A(xe.endRe,$e);if(Ze){if(xe["on:end"]){const It=new t(xe);xe["on:end"](Ne,It),It.isMatchIgnored&&(Ze=!1)}if(Ze){for(;xe.endsParent&&xe.parent;)xe=xe.parent;return xe}}if(xe.endsWithParent)return ao(xe.parent,Ne,$e)}function Ts(xe){return Le.matcher.regexIndex===0?(mt+=xe[0],1):(Pa=!0,0)}function Sf(xe){const Ne=xe[0],$e=xe.rule,Ze=new t($e),It=[$e.__beforeBegin,$e["on:begin"]];for(const hi of It)if(hi&&(hi(xe,Ze),Ze.isMatchIgnored))return Ts(Ne);return $e.skip?mt+=Ne:($e.excludeBegin&&(mt+=Ne),_t(),!$e.returnBegin&&!$e.excludeBegin&&(mt=Ne)),As($e,xe),$e.returnBegin?0:Ne.length}function Dn(xe){const Ne=xe[0],$e=Ae.substring(xe.index),Ze=ao(Le,xe,$e);if(!Ze)return jr;const It=Le;Le.endScope&&Le.endScope._wrap?(_t(),Xn(Ne,Le.endScope._wrap)):Le.endScope&&Le.endScope._multi?(_t(),Kc(Le.endScope,xe)):It.skip?mt+=Ne:(It.returnEnd||It.excludeEnd||(mt+=Ne),_t(),It.excludeEnd&&(mt=Ne));do Le.scope&&Xt.closeNode(),!Le.skip&&!Le.subLanguage&&(Ua+=Le.relevance),Le=Le.parent;while(Le!==Ze.parent);return Ze.starts&&As(Ze.starts,xe),It.returnEnd?0:Ne.length}function ro(){const xe=[];for(let Ne=Le;Ne!==un;Ne=Ne.parent)Ne.scope&&xe.unshift(Ne.scope);xe.forEach(Ne=>Xt.openNode(Ne))}let Ir={};function Os(xe,Ne){const $e=Ne&&Ne[0];if(mt+=xe,$e==null)return _t(),0;if(Ir.type==="begin"&&Ne.type==="end"&&Ir.index===Ne.index&&$e===""){if(mt+=Ae.slice(Ne.index,Ne.index+1),!At){const Ze=new Error(`0 width match regex (${pe})`);throw Ze.languageName=pe,Ze.badRule=Ir.rule,Ze}return 1}if(Ir=Ne,Ne.type==="begin")return Sf(Ne);if(Ne.type==="illegal"&&!Qe){const Ze=new Error('Illegal lexeme "'+$e+'" for mode "'+(Le.scope||"<unnamed>")+'"');throw Ze.mode=Le,Ze}else if(Ne.type==="end"){const Ze=Dn(Ne);if(Ze!==jr)return Ze}if(Ne.type==="illegal"&&$e==="")return mt+=`
559
+ `,1;if(so>1e5&&so>Ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return mt+=$e,$e.length}const un=Nn(pe);if(!un)throw Lt(Et.replace("{}",pe)),new Error('Unknown language: "'+pe+'"');const Gc=cn(un);let Rs="",Le=pt||Gc;const Vc={},Xt=new Ee.__emitter(Ee);ro();let mt="",Ua=0,ca=0,so=0,Pa=!1;try{if(un.__emitTokens)un.__emitTokens(Ae,Xt);else{for(Le.matcher.considerAll();;){so++,Pa?Pa=!1:Le.matcher.considerAll(),Le.matcher.lastIndex=ca;const xe=Le.matcher.exec(Ae);if(!xe)break;const Ne=Ae.substring(ca,xe.index),$e=Os(Ne,xe);ca=xe.index+$e}Os(Ae.substring(ca))}return Xt.finalize(),Rs=Xt.toHTML(),{language:pe,value:Rs,relevance:Ua,illegal:!1,_emitter:Xt,_top:Le}}catch(xe){if(xe.message&&xe.message.includes("Illegal"))return{language:pe,value:kn(Ae),illegal:!0,relevance:0,_illegalBy:{message:xe.message,index:ca,context:Ae.slice(ca-100,ca+100),mode:xe.mode,resultSoFar:Rs},_emitter:Xt};if(At)return{language:pe,value:kn(Ae),illegal:!1,relevance:0,errorRaised:xe,_emitter:Xt,_top:Le};throw xe}}function Ns(pe){const Ae={value:kn(pe),illegal:!1,relevance:0,_top:ke,_emitter:new Ee.__emitter(Ee)};return Ae._emitter.addText(pe),Ae}function _s(pe,Ae){Ae=Ae||Ee.languages||Object.keys(re);const Qe=Ns(pe),pt=Ae.filter(Nn).filter(za).map(_t=>sa(_t,pe,!1));pt.unshift(Qe);const Vt=pt.sort((_t,Xn)=>{if(_t.relevance!==Xn.relevance)return Xn.relevance-_t.relevance;if(_t.language&&Xn.language){if(Nn(_t.language).supersetOf===Xn.language)return 1;if(Nn(Xn.language).supersetOf===_t.language)return-1}return 0}),[bn,Wn]=Vt,Mn=bn;return Mn.secondBest=Wn,Mn}function Ki(pe,Ae,Qe){const pt=Ae&&ve[Ae]||Qe;pe.classList.add("hljs"),pe.classList.add(`language-${pt}`)}function Gt(pe){let Ae=null;const Qe=Kt(pe);if(Ie(Qe))return;if(Lr("before:highlightElement",{el:pe,language:Qe}),pe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",pe);return}if(pe.children.length>0&&(Ee.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(pe)),Ee.throwUnescapedHTML))throw new qi("One of your code blocks includes unescaped HTML.",pe.innerHTML);Ae=pe;const pt=Ae.textContent,Vt=Qe?Rt(pt,{language:Qe,ignoreIllegals:!0}):_s(pt);pe.innerHTML=Vt.value,pe.dataset.highlighted="yes",Ki(pe,Qe,Vt.language),pe.result={language:Vt.language,re:Vt.relevance,relevance:Vt.relevance},Vt.secondBest&&(pe.secondBest={language:Vt.secondBest.language,relevance:Vt.secondBest.relevance}),Lr("after:highlightElement",{el:pe,result:Vt,text:pt})}function gn(pe){Ee=Fc(Ee,pe)}const Ia=()=>{Cs(),ie("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function no(){Cs(),ie("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let $c=!1;function Cs(){function pe(){Cs()}if(document.readyState==="loading"){$c||window.addEventListener("DOMContentLoaded",pe,!1),$c=!0;return}document.querySelectorAll(Ee.cssSelector).forEach(Gt)}function Hc(pe,Ae){let Qe=null;try{Qe=Ae(B)}catch(pt){if(Lt("Language definition for '{}' could not be registered.".replace("{}",pe)),At)Lt(pt);else throw pt;Qe=ke}Qe.name||(Qe.name=pe),re[pe]=Qe,Qe.rawDefinition=Ae.bind(null,B),Qe.aliases&&la(Qe.aliases,{languageName:pe})}function Dr(pe){delete re[pe];for(const Ae of Object.keys(ve))ve[Ae]===pe&&delete ve[Ae]}function io(){return Object.keys(re)}function Nn(pe){return pe=(pe||"").toLowerCase(),re[pe]||re[ve[pe]]}function la(pe,{languageName:Ae}){typeof pe=="string"&&(pe=[pe]),pe.forEach(Qe=>{ve[Qe.toLowerCase()]=Ae})}function za(pe){const Ae=Nn(pe);return Ae&&!Ae.disableAutodetect}function Ba(pe){pe["before:highlightBlock"]&&!pe["before:highlightElement"]&&(pe["before:highlightElement"]=Ae=>{pe["before:highlightBlock"](Object.assign({block:Ae.el},Ae))}),pe["after:highlightBlock"]&&!pe["after:highlightElement"]&&(pe["after:highlightElement"]=Ae=>{pe["after:highlightBlock"](Object.assign({block:Ae.el},Ae))})}function Wt(pe){Ba(pe),ze.push(pe)}function qc(pe){const Ae=ze.indexOf(pe);Ae!==-1&&ze.splice(Ae,1)}function Lr(pe,Ae){const Qe=pe;ze.forEach(function(pt){pt[Qe]&&pt[Qe](Ae)})}function oa(pe){return ie("10.7.0","highlightBlock will be removed entirely in v12.0"),ie("10.7.0","Please use highlightElement now."),Gt(pe)}Object.assign(B,{highlight:Rt,highlightAuto:_s,highlightAll:Cs,highlightElement:Gt,highlightBlock:oa,configure:gn,initHighlighting:Ia,initHighlightingOnLoad:no,registerLanguage:Hc,unregisterLanguage:Dr,listLanguages:io,getLanguage:Nn,registerAliases:la,autoDetection:za,inherit:Fc,addPlugin:Wt,removePlugin:qc}),B.debugMode=function(){At=!1},B.safeMode=function(){At=!0},B.versionString=ht,B.regex={concat:w,lookahead:x,either:N,optional:E,anyNumberOfTimes:v};for(const pe in Oe)typeof Oe[pe]=="object"&&e(Oe[pe]);return Object.assign(B,Oe),B},jn=Mr({});return jn.newInstance=()=>Mr({}),fm=jn,jn.HighlightJS=jn,jn.default=jn,fm}var s9=r9();const l9=ag(s9),Q1={},o9="hljs-";function c9(e){const t=l9.newInstance();return e&&l(e),{highlight:n,highlightAuto:a,listLanguages:s,register:l,registerAlias:c,registered:d};function n(f,h,b){const m=b||Q1,x=typeof m.prefix=="string"?m.prefix:o9;if(!t.getLanguage(f))throw new Error("Unknown language: `"+f+"` is not registered");t.configure({__emitter:u9,classPrefix:x});const v=t.highlight(h,{ignoreIllegals:!0,language:f});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const E=v._emitter.root,w=E.data;return w.language=v.language,w.relevance=v.relevance,E}function a(f,h){const m=(h||Q1).subset||s();let x=-1,v=0,E;for(;++x<m.length;){const w=m[x];if(!t.getLanguage(w))continue;const k=n(w,f,h);k.data&&k.data.relevance!==void 0&&k.data.relevance>v&&(v=k.data.relevance,E=k)}return E||{type:"root",children:[],data:{language:void 0,relevance:v}}}function s(){return t.listLanguages()}function l(f,h){if(typeof f=="string")t.registerLanguage(f,h);else{let b;for(b in f)Object.hasOwn(f,b)&&t.registerLanguage(b,f[b])}}function c(f,h){if(typeof f=="string")t.registerAliases(typeof h=="string"?h:[...h],{languageName:f});else{let b;for(b in f)if(Object.hasOwn(f,b)){const m=f[b];t.registerAliases(typeof m=="string"?m:[...m],{languageName:b})}}}function d(f){return!!t.getLanguage(f)}}class u9{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 n=this.stack[this.stack.length-1],a=n.children[n.children.length-1];a&&a.type==="text"?a.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const a=this.stack[this.stack.length-1],s=t.root.children;n?a.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):a.children.push(...s)}openNode(t){const n=this,a=t.split(".").map(function(c,d){return d?c+"_".repeat(d):n.options.classPrefix+c}),s=this.stack[this.stack.length-1],l={type:"element",tagName:"span",properties:{className:a},children:[]};s.children.push(l),this.stack.push(l)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const d9={};function ob(e){const t=e||d9,n=t.aliases,a=t.detect||!1,s=t.languages||a9,l=t.plainText,c=t.prefix,d=t.subset;let f="hljs";const h=c9(s);if(n&&h.registerAlias(n),c){const b=c.indexOf("-");f=b===-1?c:c.slice(0,b)}return function(b,m){Ef(b,"element",function(x,v,E){if(x.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const w=f9(x);if(w===!1||!w&&!a||w&&l&&l.includes(w))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(f)||x.properties.className.unshift(f);const k=R5(x,{whitespace:"pre"});let N;try{N=w?h.highlight(w,k,{prefix:c}):h.highlightAuto(k,{prefix:c,subset:d})}catch(C){const A=C;if(w&&/Unknown language/.test(A.message)){m.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[E,x],cause:A,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw A}!w&&N.data&&N.data.language&&x.properties.className.push("language-"+N.data.language),N.children.length>0&&(x.children=N.children)})}}function f9(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let a;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!a&&s.slice(0,5)==="lang-"&&(a=s.slice(5)),!a&&s.slice(0,9)==="language-"&&(a=s.slice(9))}return a}function h9({name:e,projects:t,onClose:n,onChange:a}){const{t:s}=Fe("skills"),{confirm:l,alert:c}=ui(),{data:d,isLoading:f,isError:h,error:b,refetch:m}=ct({queryKey:["skill",e],queryFn:()=>J3(e)});O.useEffect(()=>{const C=A=>{A.key==="Escape"&&n()};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[n]);const x=async(C,A)=>{try{await A(),await m(),a()}catch(T){c({title:s("modal.labelFailed",{label:C}),body:T instanceof Error?T.message:String(T)})}},v=C=>x("link",()=>tz(e,C)),E=async C=>{await l({title:s("modal.removeTitle",{name:e,project:C}),body:s("modal.removeBody"),confirm:s("modal.removeConfirm"),danger:!0})&&await x("unlink",()=>nz(e,C))},w=C=>x("freeze",()=>iz(e,C)),k=async C=>{await l({title:s("modal.unfreezeTitle",{name:e,project:C}),body:s("modal.unfreezeBody"),confirm:s("modal.unfreezeConfirm"),danger:!0})&&await x("unfreeze",()=>az(e,C))},N=new Map(((d==null?void 0:d.linkedProjects)??[]).map(C=>[C.project,C.state]));return p.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",children:p.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl",children:[p.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),d&&p.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[d.category," · ",d.origin||"local"]})]}),p.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":s("modal.closeAria"),type:"button",children:p.jsx(Ci,{size:16,strokeWidth:3})})]}),f&&p.jsx("p",{children:s("modal.loading")}),h&&p.jsx("p",{className:"text-[var(--color-crashed)]",children:s("modal.loadFailed",{error:b instanceof Error?b.message:String(b)})}),d&&p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-3 uppercase tracking-wider",children:s("modal.linkStatus")}),p.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(C=>{const A=N.get(C);return p.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:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:C}),A==="linked"&&p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),A==="frozen"&&p.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!A&&p.jsx("span",{className:"nb-status",style:{background:"var(--color-idle-bg)",color:"var(--color-idle)"},children:"absent"})]}),p.jsxs("div",{className:"flex gap-2",children:[!A&&p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(C),type:"button",children:[p.jsx(j2,{size:11})," link"]}),A==="linked"&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>w(C),type:"button",children:[p.jsx(tO,{size:11})," freeze"]}),p.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>E(C),type:"button",children:"unlink"})]}),A==="frozen"&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>k(C),type:"button",children:[p.jsx(d2,{size:11})," unfreeze"]}),p.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>E(C),type:"button",children:"unlink"})]})]})]},C)}),t.length===0&&p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:s("modal.noProjects")})]})]}),p.jsxs("div",{children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("modal.preview")}),p.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:d.body?p.jsx(tb,{remarkPlugins:[rb],rehypePlugins:[ob],children:d.body}):p.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),d.references.length>0&&p.jsxs("div",{children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),p.jsx("ul",{className:"flex flex-col gap-2",children:d.references.map(C=>p.jsx(p9,{skillName:e,file:C.name,lines:C.lines},C.name))})]})]})]})})}function p9({skillName:e,file:t,lines:n}){const{t:a}=Fe("skills"),[s,l]=O.useState(!1),{data:c,isLoading:d,isError:f,error:h}=ct({queryKey:["skill-ref",e,t],queryFn:()=>ez(e,t),enabled:s,staleTime:1/0});return p.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[p.jsxs("button",{type:"button",onClick:()=>l(b=>!b),"aria-label":a("modal.fileToggleAria",{action:a(s?"modal.collapse":"modal.expand"),file:t}),"aria-expanded":s,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:[p.jsx(ef,{size:12,strokeWidth:3,className:["transition-transform",s?"rotate-90":""].join(" ")}),p.jsx(Mc,{size:12,strokeWidth:2.5}),p.jsx("span",{className:"flex-1 text-left font-bold",children:t}),p.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),s&&p.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[d&&p.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:a("modal.loading")}),f&&p.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:a("modal.loadFailed",{error:h instanceof Error?h.message:String(h)})}),c&&p.jsx("div",{className:"prose-chat text-sm",children:p.jsx(tb,{remarkPlugins:[rb],rehypePlugins:[ob],children:c.content})})]})]})}const m9=[{value:"all",label:"All"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],g9={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function b9(){var v;const{t:e}=Fe("skills"),[t,n]=O.useState("all"),[a,s]=O.useState(""),[l,c]=O.useState(null),d=Vn(),{data:f,isLoading:h}=ct({queryKey:["skills"],queryFn:()=>zg()}),b=ct({queryKey:["projects"],queryFn:Ar}),m=O.useMemo(()=>((f==null?void 0:f.data)??[]).filter(w=>!(t!=="all"&&w.category!==t||a&&!w.name.toLowerCase().includes(a.toLowerCase()))),[f,t,a]),x=O.useMemo(()=>{const E=(f==null?void 0:f.data)??[],w={all:E.length};for(const k of E)w[k.category]=(w[k.category]??0)+1;return w},[f]);return p.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[p.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("title")}),p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:h?e("loading"):e("summary",{count:(f==null?void 0:f.data.length)??0})})]}),p.jsx("div",{className:"flex gap-3 items-center",children:p.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await rz(),d.invalidateQueries({queryKey:["skills"]})},type:"button",children:[p.jsx(zl,{size:14,strokeWidth:2.5}),e("syncBundled")]})})]}),p.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[p.jsxs("div",{className:"relative flex-1 max-w-md",children:[p.jsx(Dd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),p.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("searchPlaceholder"),value:a,onChange:E=>s(E.target.value),"aria-label":e("search")})]}),p.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:m9.map(E=>p.jsxs("button",{type:"button",onClick:()=>n(E.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",t===E.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[E.label," ",x[E.value]]},E.value))})]}),p.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:m.map(E=>{var w;return p.jsx(y9,{skill:E,projectCount:((w=b.data)==null?void 0:w.data.length)??0,onOpen:()=>c(E.name)},E.name)})}),l&&p.jsx(h9,{name:l,projects:((v=b.data)==null?void 0:v.data.map(E=>E.name))??[],onClose:()=>c(null),onChange:()=>d.invalidateQueries({queryKey:["skills"]})})]})}function y9({skill:e,projectCount:t,onOpen:n}){const a=g9[e.category];return p.jsxs("article",{onClick:n,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),p.jsx("span",{className:"nb-badge text-[10px]",style:{background:a},children:e.category})]}),p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),p.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:[p.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),p.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function x9(){var l;const{t:e}=Fe("system"),t=ct({queryKey:["system-info"],queryFn:cE}),n=ct({queryKey:["system-env"],queryFn:tI}),[a,s]=O.useState(!1);return p.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[p.jsx("header",{children:p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("title")})}),p.jsx(v9,{current:(l=t.data)==null?void 0:l.version}),p.jsxs("section",{className:"nb-card",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("runtime")}),t.data?p.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[p.jsx("dt",{className:"font-bold",children:"Node"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.nodeVersion}),p.jsx("dt",{className:"font-bold",children:"Platform"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.platform}),p.jsx("dt",{className:"font-bold",children:"PID"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.pid??"—"}),p.jsx("dt",{className:"font-bold",children:"Uptime"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:k9(t.data.uptimeMs)})]}):p.jsx("p",{className:"text-[var(--color-text-muted)]",children:e("loading")})]}),p.jsxs("section",{className:"nb-card",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:[e("envSection"),p.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"})]}),a?p.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:e("envEditing")}):p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>s(!0),type:"button","aria-label":e("envEditAria"),children:[p.jsx(xg,{size:12,strokeWidth:2.5})," ",e("envEdit")]})]}),a?p.jsx(w9,{onClose:()=>{s(!1),n.refetch()}}):n.data&&n.data.exists?p.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:n.data.entries.map(c=>p.jsxs("div",{className:"contents",children:[p.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[c.masked&&p.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),c.key]}),p.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:c.value})]},c.key))}):p.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:[e("envMissing"),p.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"})]})]}),p.jsx(E9,{})]})}function v9({current:e}){var w;const{t}=Fe("system"),{confirm:n,alert:a}=ui(),[s,l]=O.useState(!1),[c,d]=O.useState(null),f=ct({queryKey:["latest-version"],queryFn:aI,enabled:!1}),[h,b]=O.useState(null),[m,x]=O.useState("npm i -g @coralai/sps-cli@latest"),v=async()=>{var N;if(await n({title:t("upgradeTitle"),body:t("upgradeBody",{current:e,latest:(N=f.data)==null?void 0:N.latest}),confirm:t("upgradeConfirm")})){l(!0),d(null),b(null);try{const C=await rI();if(d(C.output),b(C.installedVersion),x(C.command),C.ok)a({title:t("upgradeDoneTitle"),body:t("upgradeDoneBody",{version:C.installedVersion})});else{const A=C.installedVersion&&C.installedVersion===e?t("upgradeIneffectiveSameVersion",{version:C.installedVersion}):t("upgradeIneffectiveNoInstall");a({title:t("upgradeIneffectiveTitle"),body:A})}}catch(C){d(C.message),a({title:t("upgradeFailed"),body:C.message})}finally{l(!1)}}},E=async()=>{const k=f.data&&!f.data.upToDate?`npm i -g @coralai/sps-cli@${f.data.latest}`:m;try{await navigator.clipboard.writeText(k),a({title:t("cmdCopiedTitle"),body:t("cmdCopiedBody",{cmd:k})})}catch{a({title:t("copyFailedTitle"),body:t("copyFailedBody",{cmd:k})})}};return p.jsxs("section",{className:"nb-card",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:t("version")}),p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f.refetch(),disabled:f.isFetching||!e,type:"button","aria-label":t("checkUpdateAria"),children:[f.isFetching?p.jsx(Bt,{size:12,strokeWidth:3,className:"animate-spin"}):p.jsx(zl,{size:12,strokeWidth:2.5}),t("checkUpdate")]})]}),p.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[p.jsx("dt",{className:"font-bold",children:t("spsCliCurrent")}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),f.data&&p.jsxs(p.Fragment,{children:[p.jsx("dt",{className:"font-bold",children:t("npmLatest")}),p.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2 flex-wrap",children:[f.data.latest,f.data.upToDate?p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("latestBadge")}):p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:v,disabled:s,type:"button","aria-label":t("upgradeAria"),children:[s?p.jsx(Bt,{size:11,strokeWidth:3,className:"animate-spin"}):p.jsx(Gw,{size:11,strokeWidth:2.5}),t("upgrade")]}),p.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:E,type:"button","aria-label":t("copyCmdAria"),title:t("copyCmdTitle"),children:[p.jsx(a2,{size:11,strokeWidth:2.5})," ",t("copyCmd")]})]})]})]}),h&&p.jsxs(p.Fragment,{children:[p.jsx("dt",{className:"font-bold",children:t("installed")}),p.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[h,h===((w=f.data)==null?void 0:w.latest)?p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("installedActive")}):h===e?p.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:t("installedFailed")}):null]})]}),f.isError&&p.jsxs(p.Fragment,{children:[p.jsx("dt",{className:"font-bold",children:t("checkLabel")}),p.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),c&&p.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:c})]})}function w9({onClose:e}){const{t}=Fe("system"),n=Vn(),{alert:a}=ui(),s=ct({queryKey:["system-env-raw"],queryFn:nI}),[l,c]=O.useState(null),[d,f]=O.useState(null);O.useEffect(()=>{s.data&&l===null&&(c(s.data.content),f(s.data.etag))},[s.data,l]);const h=l!==null&&s.data&&l!==s.data.content,b=Gn({mutationFn:()=>{if(l===null)throw new Error("no draft");return iI(l,d??"")},onSuccess:()=>{n.invalidateQueries({queryKey:["system-env"]}),n.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:m=>{const x=m.status;a({title:t(x===409?"envEtagConflict":"envSaveFailed"),body:x===409?t("envEtagBody"):m instanceof Error?m.message:String(m)})}});return s.isLoading?p.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("loading")}):p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:t("envWarn")}),p.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:l??"",onChange:m=>c(m.target.value),spellCheck:!1,"aria-label":t("envEditorAria")}),p.jsxs("div",{className:"flex items-center justify-between mt-3",children:[p.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[d?`etag: ${d}`:"",h?t("envUnsaved"):""]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:b.isPending,type:"button",children:[p.jsx(Ci,{size:12,strokeWidth:3})," ",t("envCancel")]}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>b.mutate(),disabled:!h||b.isPending,type:"button","aria-label":t("envSaveAria"),children:[b.isPending?p.jsx(Bt,{size:12,strokeWidth:3,className:"animate-spin"}):p.jsx(tf,{size:12,strokeWidth:3}),t("envSave")]})]})]})]})}function E9(){var x;const{t:e}=Fe("system"),{alert:t}=ui(),n=ct({queryKey:["projects"],queryFn:Ar}),[a,s]=O.useState({}),[l,c]=O.useState({}),[d,f]=O.useState({}),h=(((x=n.data)==null?void 0:x.data)??[]).map(v=>({project:v.name})),b=async(v,E)=>{c(w=>({...w,[v]:E?"fix":"check"}));try{const w=await sI(v,E);s(k=>({...k,[v]:w})),f(k=>({...k,[v]:!0}))}catch(w){t({title:e("doctor.doctorActionFailed",{action:e(E?"doctor.actionFix":"doctor.actionCheck")}),body:w instanceof Error?w.message:String(w)})}finally{c(w=>({...w,[v]:null}))}},m=async()=>{for(const v of h)await b(v.project,!1)};return p.jsxs("section",{className:"nb-card",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:e("doctor.title")}),p.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{m()},disabled:h.length===0||Object.values(l).some(Boolean),type:"button",children:[p.jsx(zl,{size:12,strokeWidth:2.5}),e("doctor.checkAll")]})]}),h.length===0?p.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:e("doctor.noProjects")}):p.jsx("ul",{className:"flex flex-col gap-2",children:h.map(v=>{const E=a[v.project],w=l[v.project],k=E?E.checks.filter(T=>T.status==="fail").length:0,N=E?E.checks.filter(T=>T.status==="warn").length:0,C=d[v.project]??!1,A=E!=null;return p.jsxs("li",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[p.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[p.jsxs("button",{type:"button",onClick:()=>f(T=>({...T,[v.project]:!C})),disabled:!A,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":e(C?"doctor.collapse":"doctor.expand"),children:[A&&E.ok?p.jsx(Dm,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):A?p.jsx(gc,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):p.jsx(Dm,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),A&&(C?p.jsx(jc,{size:12}):p.jsx(ef,{size:12})),p.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:v.project}),A?E.ok?p.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"}):p.jsxs("span",{className:"text-xs text-[var(--color-stuck)] font-semibold",children:[k," fail · ",N," warn"]}):p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("doctor.clickCheck")})]}),p.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{b(v.project,!1)},disabled:!!w,type:"button","aria-label":e("doctor.checkAria"),children:[w==="check"?p.jsx(Bt,{size:11,strokeWidth:3,className:"animate-spin"}):p.jsx(zl,{size:11,strokeWidth:2.5}),e("doctor.check")]}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{b(v.project,!0)},disabled:!!w||A&&E.ok,type:"button","aria-label":e("doctor.fixAria"),title:A&&E.ok?e("doctor.fixNothing"):e("doctor.fixHint"),children:[w==="fix"?p.jsx(Bt,{size:11,strokeWidth:3,className:"animate-spin"}):p.jsx(nE,{size:11,strokeWidth:2.5}),e("doctor.fix")]})]}),C&&A&&p.jsxs("div",{className:"border-t-2 border-dashed border-[var(--color-text)] px-3 py-2",children:[p.jsx("ul",{className:"flex flex-col gap-1 text-xs font-[family-name:var(--font-mono)]",children:E.checks.map((T,L)=>p.jsx(S9,{check:T},`${T.name}-${L}`))}),E.fixes.length>0&&p.jsxs("div",{className:"mt-3 bg-[var(--color-running-bg)] border-2 border-[var(--color-running)] rounded p-2",children:[p.jsx("div",{className:"text-xs font-bold text-[var(--color-running)] mb-1",children:e("doctor.fixed")}),p.jsx("ul",{className:"text-xs list-disc pl-4",children:E.fixes.map((T,L)=>p.jsx("li",{children:T},L))})]})]})]},v.project)})})]})}function S9({check:e}){const t=e.status==="pass"?p.jsx(Dm,{size:12,className:"text-[var(--color-running)]",strokeWidth:2.5}):e.status==="fail"?p.jsx(gc,{size:12,className:"text-[var(--color-crashed)]",strokeWidth:2.5}):e.status==="warn"?p.jsx(gc,{size:12,className:"text-[var(--color-stuck)]",strokeWidth:2.5}):p.jsx("span",{className:"w-3 h-3 rounded-full bg-[var(--color-text-subtle)] inline-block"});return p.jsxs("li",{className:"flex items-start gap-2",children:[p.jsx("span",{className:"pt-0.5 shrink-0",children:t}),p.jsx("span",{className:"font-bold w-32 shrink-0",children:e.name}),p.jsx("span",{className:"text-[var(--color-text-muted)] break-words",children:e.message})]})}function k9(e){const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m ${s}s`:a>0?`${a}m ${s}s`:`${s}s`}function N9(){return qt("/api/chat/sessions")}function _9(e){return qt(`/api/chat/sessions/${e}`)}async function hm(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 C9(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function A9(e,t,n){const a=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,attachments:n})});if(!a.ok)throw new Error(`${a.status}: ${await a.text()}`);return await a.json()}async function T9(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 O9(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return qt(`/api/chat/sessions/${e}/messages${n}`)}function Y1(){var oe,ce,ne,j,D,Y,R,ye;const{t:e}=Fe("chat"),{sessionId:t}=jw(),n=Cr(),a=Vn(),{confirm:s,alert:l}=ui(),c=ct({queryKey:["chat-sessions"],queryFn:N9}),d=ct({queryKey:["chat-session",t],queryFn:()=>_9(t??""),enabled:!!t}),[f,h]=O.useState(null),[b,m]=O.useState(""),[x,v]=O.useState(!1),E=O.useRef(null),[w,k]=O.useState(!1),[N,C]=O.useState([]),[A,T]=O.useState(!1),[L,M]=O.useState(!1),[U,$]=O.useState(!1),[te,P]=O.useState(null);O.useEffect(()=>{if(!t)return;const X=new EventSource(`/stream/chat/${encodeURIComponent(t)}`);let fe=!0;return X.addEventListener("open",()=>{if(fe){fe=!1;return}const he=a.getQueryData(["chat-session",t]),K=he!=null&&he.messages.length?he.messages[he.messages.length-1].ts:void 0;O9(t,K).then(ue=>{ue.data.length!==0&&a.setQueryData(["chat-session",t],Oe=>{if(!Oe)return Oe;const dt=new Set(Oe.messages.map(di=>di.id)),ft=ue.data.filter(di=>!dt.has(di.id));return ft.length===0?Oe:{...Oe,messages:[...Oe.messages,...ft],lastMessageAt:ft[ft.length-1].ts,messageCount:Oe.messageCount+ft.length}})}).catch(()=>{})}),X.addEventListener("chat.message",he=>{try{const K=JSON.parse(he.data);a.setQueryData(["chat-session",t],ue=>{if(!ue||ue.messages.some(ft=>ft.id===K.message.id))return ue;const dt=ue.messages.findIndex(ft=>ft.role==="user"&&ft.id.startsWith("optim-")&&ft.content===K.message.content);if(dt>=0){const ft=[...ue.messages];return ft[dt]=K.message,{...ue,messages:ft}}return{...ue,messages:[...ue.messages,K.message]}})}catch{}}),X.addEventListener("chat.message.pending",he=>{try{const K=JSON.parse(he.data);h({id:K.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),X.addEventListener("chat.message.chunk.text",he=>{try{const K=JSON.parse(he.data);h(ue=>{if(!ue||ue.id!==K.assistantId)return ue;const Oe=[...ue.blocks],dt=Oe[Oe.length-1];return dt&&dt.type==="text"?Oe[Oe.length-1]={...dt,target:dt.target+K.text}:Oe.push({type:"text",target:K.text,displayed:""}),{...ue,blocks:Oe}})}catch{}}),X.addEventListener("chat.message.chunk.tool_use",he=>{try{const K=JSON.parse(he.data);h(ue=>!ue||ue.id!==K.assistantId?ue:{...ue,blocks:[...ue.blocks,{type:"tool_use",id:K.id,title:K.title,kind:K.kind,status:K.status}]})}catch{}}),X.addEventListener("chat.message.chunk.tool_update",he=>{try{const K=JSON.parse(he.data);h(ue=>!ue||ue.id!==K.assistantId?ue:{...ue,blocks:ue.blocks.map(Oe=>Oe.type==="tool_use"&&Oe.id===K.id?{...Oe,status:K.status}:Oe)})}catch{}}),X.addEventListener("chat.message.complete",he=>{try{const K=JSON.parse(he.data);h(ue=>ue&&ue.id===K.assistantId?{...ue,done:!0,finalMessage:K.message}:ue)}catch{}}),()=>X.close()},[t,a]),O.useEffect(()=>{if(!f)return;const X=f.blocks.reduce((he,K)=>K.type==="text"?he+(K.target.length-K.displayed.length):he,0);if(X<=0){if(f.done&&f.finalMessage){const he=f.finalMessage;a.setQueryData(["chat-session",t],K=>!K||K.messages.some(ue=>ue.id===he.id)?K:{...K,messages:[...K.messages,he],lastMessageAt:he.ts,messageCount:K.messageCount+1}),a.invalidateQueries({queryKey:["chat-sessions"]}),h(null),v(!1)}return}const fe=setTimeout(()=>{h(he=>{if(!he)return he;let K=Math.max(1,Math.ceil(X/40));const ue=he.blocks.map(Oe=>{if(Oe.type!=="text"||K<=0)return Oe;const dt=Oe.target.length-Oe.displayed.length;if(dt<=0)return Oe;const ft=Math.min(dt,K);return K-=ft,{...Oe,displayed:Oe.target.slice(0,Oe.displayed.length+ft)}});return{...he,blocks:ue}})},25);return()=>clearTimeout(fe)},[f,a,t]),O.useEffect(()=>{const X=E.current;X&&(X.scrollTop=X.scrollHeight)},[d.data,f]);const Q=O.useCallback(async(X={})=>{var fe,he;try{const K=await hm({cwd:((fe=X.cwd)==null?void 0:fe.trim())||void 0,title:((he=X.title)==null?void 0:he.trim())||void 0});a.invalidateQueries({queryKey:["chat-sessions"]}),n(`/chat/${K.id}`),k(!1)}catch(K){l({title:e("session.createFailed"),body:K instanceof Error?K.message:String(K)})}},[a,n,l]),J=O.useCallback(async()=>{const X=b.trim();if(!X&&N.length===0||x)return;let fe=t;if(!fe){const ue=await hm();a.invalidateQueries({queryKey:["chat-sessions"]}),fe=ue.id,n(`/chat/${fe}`,{replace:!0})}const he=N.map(ue=>ue.path),K={id:`optim-${Date.now()}`,role:"user",content:X||e("fallback.attachment"),ts:new Date().toISOString(),status:"complete",attachments:he.length>0?he:void 0};a.setQueryData(["chat-session",fe],ue=>ue?{...ue,messages:[...ue.messages,K],lastMessageAt:K.ts,messageCount:ue.messageCount+1}:{id:fe,createdAt:K.ts,lastMessageAt:K.ts,title:X.slice(0,60)||e("fallback.attachmentTitle"),project:null,messageCount:1,messages:[K]}),m(""),C([]),v(!0);try{await A9(fe,X||e("fallback.seeAttachments"),he.length>0?he:void 0)}catch(ue){v(!1),console.error("sendMessage failed",ue),l({title:e("errors.send"),body:ue instanceof Error?ue.message:String(ue)})}},[b,N,x,t,a,n,l]),me=O.useCallback(async X=>{if(X.size>uE){l({title:e("errors.fileTooLarge"),body:e("errors.fileTooLargeBody",{size:(X.size/1024/1024).toFixed(2),name:X.name})});return}let fe=t;if(!fe){const he=await hm();a.invalidateQueries({queryKey:["chat-sessions"]}),fe=he.id,n(`/chat/${fe}`,{replace:!0})}T(!0);try{const he=await OI(fe,X);C(K=>[...K,{path:he.path,name:he.name}])}catch(he){l({title:e("errors.uploadFailed"),body:he instanceof Error?he.message:String(he)})}finally{T(!1)}},[t,a,n,l]),le=O.useCallback(X=>{C(fe=>fe.filter(he=>he.path!==X))},[]),ee=O.useCallback(async X=>{await s({title:e("session.delete"),body:"The session will be permanently deleted and cannot be recovered.",confirm:"Delete",danger:!0})&&(await C9(X),a.invalidateQueries({queryKey:["chat-sessions"]}),t===X&&n("/chat"))},[a,t,n,s]),H=O.useCallback(async()=>{if(t)try{await T9(t)}catch(X){l({title:e("errors.cancelFailed"),body:X instanceof Error?X.message:String(X)})}},[t,l]);return p.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[p.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[p.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:()=>k(!0),type:"button",children:[p.jsx(Pi,{size:14,strokeWidth:3}),"New chat"]}),p.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:[e("history")," ",((oe=c.data)==null?void 0:oe.data.length)??0]}),p.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((ce=c.data)==null?void 0:ce.data)??[]).map(X=>p.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",t===X.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:[p.jsxs("button",{type:"button","aria-label":X.cwd?e("session.openAriaWithCwd",{title:X.title,cwd:X.cwd}):e("session.openAria",{title:X.title}),onClick:()=>n(`/chat/${X.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[p.jsx(x0,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"text-sm font-semibold truncate",children:X.title}),p.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[X.messageCount," msg · ",Uk(X.lastMessageAt??X.createdAt,e("time.justNow"))]}),X.cwd&&p.jsxs("p",{className:"text-[10px] text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate flex items-center gap-1",title:X.cwd,children:[p.jsx(yc,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),p.jsx("span",{className:"truncate",dir:"rtl",children:X.cwd})]})]})]}),p.jsx("button",{type:"button","aria-label":e("session.deleteAria"),className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:fe=>{fe.stopPropagation(),ee(X.id)},children:p.jsx(Kl,{size:12})})]},X.id)),(((ne=c.data)==null?void 0:ne.data)??[]).length===0&&p.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"No sessions yet. Click above to create one."})]})]}),p.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:t?p.jsxs(p.Fragment,{children:[p.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((j=d.data)==null?void 0:j.title)??e("newSession")}),p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:t}),((D=d.data)==null?void 0:D.cwd)&&p.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1 mt-1",title:d.data.cwd,children:[p.jsx(yc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),p.jsx("span",{className:"truncate",children:d.data.cwd})]})]}),p.jsxs("div",{ref:E,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((Y=d.data)==null?void 0:Y.messages)??[]).map(X=>p.jsx(M9,{msg:X,sessionId:t??null,onPreviewAttachment:fe=>P(fe)},X.id)),f&&p.jsx(L9,{pending:f}),!d.isLoading&&(((R=d.data)==null?void 0:R.messages)??[]).length===0&&!f&&!x&&p.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"Type below to start a chat · Enter to send · Shift+Enter for newline"})]}),p.jsxs("div",{className:["border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)] transition-colors",U?"bg-[var(--color-accent-mint)]":""].join(" "),onDragOver:X=>{X.dataTransfer.types.includes("Files")&&(X.preventDefault(),X.dataTransfer.dropEffect="copy",U||$(!0))},onDragLeave:()=>$(!1),onDrop:X=>{if(!X.dataTransfer.types.includes("Files"))return;X.preventDefault(),$(!1);const fe=Array.from(X.dataTransfer.files??[]);for(const he of fe)me(he)},children:[(N.length>0||A)&&p.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[N.map(X=>p.jsxs("button",{type:"button",className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)] group",onClick:()=>P(X.path),title:`${X.name}
560
+ ${X.path}
561
+ Click to preview`,children:[Yd(X.path)?p.jsx(_2,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}):p.jsx(Mc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),p.jsx("span",{className:"truncate max-w-[180px]",children:X.name}),p.jsx("span",{role:"button","aria-label":e("input.ariaRemoveAttachment",{name:X.name}),className:"ml-1 hover:text-[var(--color-crashed)] cursor-pointer",onClick:fe=>{fe.stopPropagation(),le(X.path)},children:p.jsx(Ci,{size:11,strokeWidth:3})})]},X.path)),A&&p.jsxs("span",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[p.jsx(Bt,{size:11,strokeWidth:2.5,className:"animate-spin"}),e("input.uploading")]})]}),p.jsxs("div",{className:"flex gap-2 items-end",children:[p.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>M(!0),disabled:x,"aria-label":e("input.attach"),title:e("input.attachHint"),children:p.jsx(B2,{size:14,strokeWidth:2.5})}),p.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:e(U?"input.placeholderDragOver":"input.placeholder"),rows:2,value:b,onChange:X=>m(X.target.value),onKeyDown:X=>{X.key==="Enter"&&!X.shiftKey&&!X.nativeEvent.isComposing&&(X.preventDefault(),J())},onPaste:X=>{const he=Array.from(X.clipboardData.items??[]).filter(K=>K.kind==="file"&&K.type.startsWith("image/"));if(he.length!==0){X.preventDefault();for(const K of he){const ue=K.getAsFile();ue&&me(ue)}}},"aria-label":e("input.ariaInput")}),f?p.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:H,type:"button","aria-label":e("input.ariaStop"),children:[p.jsx(Zw,{size:14,strokeWidth:3}),e("input.stop")]}):p.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:J,disabled:!b.trim()&&N.length===0||x,type:"button","aria-label":e("input.ariaSend"),children:[x?p.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(W2,{size:14,strokeWidth:3}),e("input.send")]})]})]})]}):p.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:p.jsxs("div",{className:"text-center max-w-md",children:[p.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:p.jsx(x0,{size:32,strokeWidth:2.5})}),p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("empty.heading")}),p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:e("empty.hint1")}),p.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:e("empty.hint2")})]})})}),w&&p.jsx(j9,{onCancel:()=>k(!1),onCreate:X=>Q(X)}),L&&p.jsx(wg,{mode:"file",title:e("newDialog.filePicker"),initialPath:((ye=d.data)==null?void 0:ye.cwd)??void 0,onCancel:()=>M(!1),onSelect:X=>{C(fe=>{if(fe.some(K=>K.path===X))return fe;const he=X.split(/[\\/]/).pop()||X;return[...fe,{path:X,name:he}]}),M(!1)}}),te&&t&&p.jsx(R9,{sessionId:t,path:te,onClose:()=>P(null)})]})}function Yd(e){return/\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function W1(e){return/\.pdf$/i.test(e)}function pm(e){return/\.(txt|md|log|json|yaml|yml|csv|html|xml|tsx?|jsx?|css|sh|ya?ml|conf|toml|ini|env|gitignore|sql|py|rb|go|rs|java|kt|swift|c|cc|cpp|h|hpp)$/i.test(e)}function R9({sessionId:e,path:t,onClose:n}){const{t:a}=Fe("chat"),[s,l]=O.useState(null),[c,d]=O.useState(null);O.useEffect(()=>{const b=m=>{m.key==="Escape"&&(m.preventDefault(),n())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[n]),O.useEffect(()=>{if(!pm(t))return;let b=!1;return fetch(zm(e,t)).then(async m=>{if(!m.ok)throw new Error(`${m.status}`);return m.text()}).then(m=>{b||l(m.length>2e5?m.slice(0,2e5)+`
562
+
563
+ …(truncated)`:m)}).catch(m=>{b||d(m instanceof Error?m.message:String(m))}),()=>{b=!0}},[e,t]);const f=zm(e,t),h=t.split(/[\\/]/).pop()??t;return p.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.6)] p-4",role:"presentation",children:p.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-3xl w-full p-5 flex flex-col",style:{maxHeight:"85vh"},role:"dialog","aria-modal":"true","aria-label":`Preview ${h}`,children:[p.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(l2,{size:16,strokeWidth:2.5,className:"flex-shrink-0"}),p.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base truncate",children:h})]}),p.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded flex-shrink-0",onClick:n,"aria-label":a("preview.closeAria"),children:p.jsx(Ci,{size:16,strokeWidth:3})})]}),p.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate mb-2 shrink-0",title:t,dir:"rtl",children:t}),p.jsxs("div",{className:"flex-1 overflow-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[Yd(t)&&p.jsx("div",{className:"flex items-center justify-center p-4",children:p.jsx("img",{src:f,alt:`Preview: ${h}`,className:"max-w-full max-h-[60vh] object-contain"})}),W1(t)&&p.jsx("iframe",{src:f,title:`PDF: ${h}`,className:"w-full",style:{height:"60vh",border:0}}),pm(t)&&p.jsx("pre",{className:"p-3 text-xs font-[family-name:var(--font-mono)] whitespace-pre-wrap break-words",children:c?p.jsx("span",{className:"text-[var(--color-crashed)]",children:a("preview.readFailed",{error:String(c)})}):s===null?p.jsx("span",{className:"text-[var(--color-text-muted)]",children:a("preview.loading")}):s}),!Yd(t)&&!W1(t)&&!pm(t)&&p.jsxs("div",{className:"p-6 text-center text-sm text-[var(--color-text-muted)]",children:[p.jsx("p",{className:"mb-3",children:a("preview.unsupported")}),p.jsx("a",{href:f,download:h,className:"nb-btn nb-btn-primary inline-flex",children:a("preview.download")})]})]})]})})}function j9({onCancel:e,onCreate:t}){const{t:n}=Fe("chat"),{t:a}=Fe("common"),[s,l]=O.useState(""),[c,d]=O.useState(""),[f,h]=O.useState(!1),[b,m]=O.useState(!1);O.useEffect(()=>{if(b)return;const v=E=>{E.key==="Escape"&&(E.preventDefault(),e())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e,b]);const x=async()=>{if(!f){h(!0);try{t({title:s.trim()||void 0,cwd:c.trim()||void 0})}finally{h(!1)}}};return p.jsxs("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-[rgba(45,55,72,0.4)] p-4",role:"presentation",children:[p.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-md w-full p-5",role:"dialog","aria-modal":"true","aria-label":n("newDialog.ariaLabel"),children:[p.jsxs("header",{className:"flex items-center justify-between mb-4",children:[p.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:n("newDialog.title")}),p.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":n("newDialog.closeAria"),children:p.jsx(Ci,{size:16,strokeWidth:3})})]}),p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("div",{children:[p.jsx("label",{htmlFor:"new-session-title",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("newDialog.titleField")}),p.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:n("newDialog.titlePlaceholder"),value:s,onChange:v=>l(v.target.value),autoFocus:!0})]}),p.jsxs("div",{children:[p.jsx("label",{htmlFor:"new-session-cwd",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("cwd.label")}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx("input",{id:"new-session-cwd",type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)] text-sm",placeholder:n("cwd.placeholder"),value:c,onChange:v=>d(v.target.value)}),p.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>m(!0),"aria-label":n("cwd.selectAria"),title:n("cwd.selectAria"),children:[p.jsx(Vw,{size:14,strokeWidth:2.5}),n("cwd.select")]})]}),p.jsxs("p",{className:"text-[11px] text-[var(--color-text-muted)] mt-1.5 leading-relaxed",children:[p.jsx(yc,{size:10,strokeWidth:2.5,className:"inline mr-1 -mt-0.5"}),n("cwd.hint1")," ",n("cwd.hint2")]})]}),p.jsxs("div",{className:"flex gap-2 justify-end pt-2",children:[p.jsx("button",{type:"button",className:"nb-btn",onClick:e,children:a("actions.cancel")}),p.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:x,disabled:f,children:[f?p.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(Pi,{size:14,strokeWidth:3}),a("actions.create")]})]})]})]}),b&&p.jsx(wg,{initialPath:c.trim()||void 0,onCancel:()=>m(!1),onSelect:v=>{d(v),m(!1)}})]})}function M9({msg:e,sessionId:t,onPreviewAttachment:n}){const{t:a}=Fe("chat"),s=e.role==="user",l=e.role==="error",c=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}],d=e.attachments??[];return p.jsx("div",{className:s?"self-end max-w-3xl":"self-start max-w-3xl",children:p.jsxs("div",{className:["nb-card",s?"bg-[var(--color-secondary)]":l?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[p.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[a(s?"bubble.you":l?"bubble.error":"bubble.assistant"),p.jsx("span",{className:"font-normal",children:"·"}),p.jsx("span",{className:"font-normal",children:Uk(e.ts,a("time.justNow"))})]}),p.jsx("div",{className:"flex flex-col gap-2",children:c.map((f,h)=>p.jsx(I9,{block:f},h))}),d.length>0&&t&&p.jsx("div",{className:"mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)]/30 flex flex-wrap gap-2",children:d.map(f=>p.jsx(D9,{sessionId:t,path:f,onPreview:()=>n(f)},f))}),e.truncated&&p.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:a("bubble.outputTruncated")})]})})}function D9({sessionId:e,path:t,onPreview:n}){const a=t.split(/[\\/]/).pop()??t;return Yd(t)?p.jsx("button",{type:"button",onClick:n,className:"block rounded-md overflow-hidden border-2 border-[var(--color-text)] hover:shadow-[2px_2px_0_var(--color-text)] transition-shadow",title:`${a}
564
+ Click to enlarge`,children:p.jsx("img",{src:zm(e,t),alt:a,className:"block max-h-40 max-w-[12rem] object-cover",loading:"lazy"})}):p.jsxs("button",{type:"button",onClick:n,className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)]",title:`${a}
565
+ ${t}
566
+ Click to preview`,children:[p.jsx(Mc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),p.jsx("span",{className:"truncate max-w-[200px]",children:a})]})}function L9({pending:e}){const t=(()=>{for(let n=e.blocks.length-1;n>=0;n--)if(e.blocks[n].type==="text")return n;return-1})();return p.jsx("div",{className:"self-start max-w-3xl",children:p.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[p.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",p.jsx("span",{className:"font-normal",children:"·"}),p.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[p.jsx(Bt,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((n,a)=>{if(n.type==="text"){const s=a===t;return p.jsxs("div",{className:"relative",children:[p.jsx(zk,{text:n.displayed}),s&&p.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},a)}return p.jsx(Bk,{tool:n},a)})]})]})})}function I9({block:e}){return e.type==="text"?p.jsx(zk,{text:e.text}):p.jsx(Bk,{tool:e})}function zk({text:e}){return e?p.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:p.jsx(tb,{remarkPlugins:[rb],rehypePlugins:[ob],children:e})}):null}function Bk({tool:e}){const[t,n]=O.useState(!1),a=e.status==="completed",s=e.status==="failed",l=!a&&!s;return p.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[p.jsxs("button",{type:"button",onClick:()=>n(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:[p.jsx(ef,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),p.jsx(nE,{size:12,strokeWidth:2.5}),p.jsx("span",{className:"font-bold",children:e.kind}),p.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),l&&p.jsx(Bt,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),a&&p.jsx(bc,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&p.jsx(e2,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&p.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:[p.jsxs("div",{children:["id: ",p.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),p.jsxs("div",{children:["status: ",p.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function Uk(e,t="just now",n){if(!e)return"";const a=new Date(e),s=Date.now()-a.getTime();return s<6e4?t:s<36e5?`${Math.floor(s/6e4)}m`:s<864e5?`${Math.floor(s/36e5)}h`:a.toLocaleDateString(n)}function z9(){const{t:e}=Fe("common");return p.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:e("notFound.title")}),p.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:e("notFound.body")}),p.jsx(bs,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:e("notFound.back")})]})}function B9(){return p.jsx(SI,{children:p.jsx(BA,{children:p.jsxs(Fn,{element:p.jsx(wI,{}),children:[p.jsx(Fn,{index:!0,element:p.jsx(LA,{to:"/projects",replace:!0})}),p.jsx(Fn,{path:"/projects",element:p.jsx(kI,{})}),p.jsx(Fn,{path:"/projects/new",element:p.jsx(LI,{})}),p.jsx(Fn,{path:"/projects/:name",element:p.jsx(Q3,{})}),p.jsx(Fn,{path:"/board",element:p.jsx(Dz,{})}),p.jsx(Fn,{path:"/workers",element:p.jsx(Yz,{})}),p.jsx(Fn,{path:"/logs",element:p.jsx(eB,{})}),p.jsx(Fn,{path:"/skills",element:p.jsx(b9,{})}),p.jsx(Fn,{path:"/system",element:p.jsx(x9,{})}),p.jsx(Fn,{path:"/chat",element:p.jsx(Y1,{})}),p.jsx(Fn,{path:"/chat/:sessionId",element:p.jsx(Y1,{})}),p.jsx(Fn,{path:"*",element:p.jsx(z9,{})})]})})})}EI();const U9=new NC({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),Pk=document.getElementById("root");if(!Pk)throw new Error("#root not found");eC.createRoot(Pk).render(p.jsx(O.StrictMode,{children:p.jsx(_C,{client:U9,children:p.jsx(cT,{children:p.jsx(jI,{children:p.jsx(B9,{})})})})}));