@coralai/sps-cli 0.51.10 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README-CN.md +131 -457
- package/README.md +131 -460
- package/dist/commands/skillCommand.js +17 -17
- package/dist/commands/skillCommand.js.map +1 -1
- package/dist/console/routes/chat.js +3 -3
- package/dist/console/routes/chat.js.map +1 -1
- package/dist/console/routes/fs.js +2 -2
- package/dist/console/routes/fs.js.map +1 -1
- package/dist/console-assets/assets/index-DVmciGET.css +10 -0
- package/dist/console-assets/assets/index-mm4gDnm8.js +553 -0
- package/dist/console-assets/index.html +2 -2
- package/dist/core/wiki/hot.js +2 -2
- package/dist/core/wiki/hot.js.map +1 -1
- package/dist/core/wiki/reader.js +4 -4
- package/dist/core/wiki/reader.js.map +1 -1
- package/dist/core/wiki/scaffold.js +1 -1
- package/dist/main.js +79 -79
- package/dist/main.js.map +1 -1
- package/dist/providers/MarkdownTaskBackend.d.ts +6 -2
- package/dist/providers/MarkdownTaskBackend.d.ts.map +1 -1
- package/dist/providers/MarkdownTaskBackend.js +32 -20
- package/dist/providers/MarkdownTaskBackend.js.map +1 -1
- package/dist/services/CardService.js +14 -14
- package/dist/services/CardService.js.map +1 -1
- package/dist/services/ChatService.js +11 -11
- package/dist/services/ChatService.js.map +1 -1
- package/dist/services/LogService.js +2 -2
- package/dist/services/LogService.js.map +1 -1
- package/dist/services/PipelineService.js +33 -33
- package/dist/services/PipelineService.js.map +1 -1
- package/dist/services/ProjectService.js +16 -16
- package/dist/services/ProjectService.js.map +1 -1
- package/dist/services/SkillService.js +9 -9
- package/dist/services/SkillService.js.map +1 -1
- package/dist/services/SystemService.js +11 -11
- package/dist/services/SystemService.js.map +1 -1
- package/dist/services/WorkerService.js +11 -11
- package/dist/services/WorkerService.js.map +1 -1
- package/package.json +2 -2
- package/skills/sps-memory/SKILL.md +1 -1
- package/skills/sps-pipeline/SKILL.md +35 -15
- package/dist/console-assets/assets/index-BJ1T4p1K.css +0 -10
- package/dist/console-assets/assets/index-DKc9idxO.js +0 -553
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
var q_=Object.defineProperty;var Bv=e=>{throw TypeError(e)};var H_=(e,t,n)=>t in e?q_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kp=(e,t,n)=>H_(e,typeof t!="symbol"?t+"":t,n),Np=(e,t,n)=>t.has(e)||Bv("Cannot "+n);var z=(e,t,n)=>(Np(e,t,"read from private field"),n?n.call(e):t.get(e)),Ae=(e,t,n)=>t.has(e)?Bv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ee=(e,t,n,a)=>(Np(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),He=(e,t,n)=>(Np(e,t,"access private method"),n);var af=(e,t,n,a)=>({set _(s){Ee(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 $v;function K_(){if($v)return Wo;$v=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 f in s)f!=="key"&&(l[f]=s[f])}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 Pv;function G_(){return Pv||(Pv=1,_p.exports=K_()),_p.exports}var p=G_(),Cp={exports:{}},Be={};/**
|
|
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 Fv;function Q_(){if(Fv)return Be;Fv=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"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=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,N={};function k(D,X,O){this.props=D,this.context=X,this.refs=N,this.updater=O||E}k.prototype.isReactComponent={},k.prototype.setState=function(D,X){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,X,"setState")},k.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function T(){}T.prototype=k.prototype;function C(D,X,O){this.props=D,this.context=X,this.refs=N,this.updater=O||E}var R=C.prototype=new T;R.constructor=C,w(R,k.prototype),R.isPureReactComponent=!0;var B=Array.isArray;function j(){}var $={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function ee(D,X,O){var ye=O.ref;return{$$typeof:e,type:D,key:X,ref:ye!==void 0?ye:null,props:O}}function L(D,X){return ee(D.type,X,D.props)}function Z(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function ie(D){var X={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(O){return X[O]})}var be=/\/+/g;function ue(D,X){return typeof D=="object"&&D!==null&&D.key!=null?ie(""+D.key):X.toString(36)}function te(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(j,j):(D.status="pending",D.then(function(X){D.status==="pending"&&(D.status="fulfilled",D.value=X)},function(X){D.status==="pending"&&(D.status="rejected",D.reason=X)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function F(D,X,O,ye,W){var fe=typeof D;(fe==="undefined"||fe==="boolean")&&(D=null);var G=!1;if(D===null)G=!0;else switch(fe){case"bigint":case"string":case"number":G=!0;break;case"object":switch(D.$$typeof){case e:case t:G=!0;break;case m:return G=D._init,F(G(D._payload),X,O,ye,W)}}if(G)return W=W(D),G=ye===""?"."+ue(D,0):ye,B(W)?(O="",G!=null&&(O=G.replace(be,"$&/")+"/"),F(W,X,O,"",function(Re){return Re})):W!=null&&(Z(W)&&(W=L(W,O+(W.key==null||D&&D.key===W.key?"":(""+W.key).replace(be,"$&/")+"/")+G)),X.push(W)),1;G=0;var se=ye===""?".":ye+":";if(B(D))for(var de=0;de<D.length;de++)ye=D[de],fe=se+ue(ye,de),G+=F(ye,X,O,fe,W);else if(de=v(D),typeof de=="function")for(D=de.call(D),de=0;!(ye=D.next()).done;)ye=ye.value,fe=se+ue(ye,de++),G+=F(ye,X,O,fe,W);else if(fe==="object"){if(typeof D.then=="function")return F(te(D),X,O,ye,W);throw X=String(D),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return G}function oe(D,X,O){if(D==null)return D;var ye=[],W=0;return F(D,ye,"","",function(fe){return X.call(O,fe,W++)}),ye}function K(D){if(D._status===-1){var X=D._result;X=X(),X.then(function(O){(D._status===0||D._status===-1)&&(D._status=1,D._result=O)},function(O){(D._status===0||D._status===-1)&&(D._status=2,D._result=O)}),D._status===-1&&(D._status=0,D._result=X)}if(D._status===1)return D._result.default;throw D._result}var pe=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=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(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},M={map:oe,forEach:function(D,X,O){oe(D,function(){X.apply(this,arguments)},O)},count:function(D){var X=0;return oe(D,function(){X++}),X},toArray:function(D){return oe(D,function(X){return X})||[]},only:function(D){if(!Z(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Be.Activity=b,Be.Children=M,Be.Component=k,Be.Fragment=n,Be.Profiler=s,Be.PureComponent=C,Be.StrictMode=a,Be.Suspense=d,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Be.__COMPILER_RUNTIME={__proto__:null,c:function(D){return $.H.useMemoCache(D)}},Be.cache=function(D){return function(){return D.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(D,X,O){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ye=w({},D.props),W=D.key;if(X!=null)for(fe in X.key!==void 0&&(W=""+X.key),X)!q.call(X,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&X.ref===void 0||(ye[fe]=X[fe]);var fe=arguments.length-2;if(fe===1)ye.children=O;else if(1<fe){for(var G=Array(fe),se=0;se<fe;se++)G[se]=arguments[se+2];ye.children=G}return ee(D.type,W,ye)},Be.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},Be.createElement=function(D,X,O){var ye,W={},fe=null;if(X!=null)for(ye in X.key!==void 0&&(fe=""+X.key),X)q.call(X,ye)&&ye!=="key"&&ye!=="__self"&&ye!=="__source"&&(W[ye]=X[ye]);var G=arguments.length-2;if(G===1)W.children=O;else if(1<G){for(var se=Array(G),de=0;de<G;de++)se[de]=arguments[de+2];W.children=se}if(D&&D.defaultProps)for(ye in G=D.defaultProps,G)W[ye]===void 0&&(W[ye]=G[ye]);return ee(D,fe,W)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(D){return{$$typeof:f,render:D}},Be.isValidElement=Z,Be.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:K}},Be.memo=function(D,X){return{$$typeof:h,type:D,compare:X===void 0?null:X}},Be.startTransition=function(D){var X=$.T,O={};$.T=O;try{var ye=D(),W=$.S;W!==null&&W(O,ye),typeof ye=="object"&&ye!==null&&typeof ye.then=="function"&&ye.then(j,pe)}catch(fe){pe(fe)}finally{X!==null&&O.types!==null&&(X.types=O.types),$.T=X}},Be.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Be.use=function(D){return $.H.use(D)},Be.useActionState=function(D,X,O){return $.H.useActionState(D,X,O)},Be.useCallback=function(D,X){return $.H.useCallback(D,X)},Be.useContext=function(D){return $.H.useContext(D)},Be.useDebugValue=function(){},Be.useDeferredValue=function(D,X){return $.H.useDeferredValue(D,X)},Be.useEffect=function(D,X){return $.H.useEffect(D,X)},Be.useEffectEvent=function(D){return $.H.useEffectEvent(D)},Be.useId=function(){return $.H.useId()},Be.useImperativeHandle=function(D,X,O){return $.H.useImperativeHandle(D,X,O)},Be.useInsertionEffect=function(D,X){return $.H.useInsertionEffect(D,X)},Be.useLayoutEffect=function(D,X){return $.H.useLayoutEffect(D,X)},Be.useMemo=function(D,X){return $.H.useMemo(D,X)},Be.useOptimistic=function(D,X){return $.H.useOptimistic(D,X)},Be.useReducer=function(D,X,O){return $.H.useReducer(D,X,O)},Be.useRef=function(D){return $.H.useRef(D)},Be.useState=function(D){return $.H.useState(D)},Be.useSyncExternalStore=function(D,X,O){return $.H.useSyncExternalStore(D,X,O)},Be.useTransition=function(){return $.H.useTransition()},Be.version="19.2.5",Be}var qv;function rg(){return qv||(qv=1,Cp.exports=Q_()),Cp.exports}var A=rg(),Tp={exports:{}},Xo={},Ap={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 Hv;function V_(){return Hv||(Hv=1,(function(e){function t(F,oe){var K=F.length;F.push(oe);e:for(;0<K;){var pe=K-1>>>1,M=F[pe];if(0<s(M,oe))F[pe]=oe,F[K]=M,K=pe;else break e}}function n(F){return F.length===0?null:F[0]}function a(F){if(F.length===0)return null;var oe=F[0],K=F.pop();if(K!==oe){F[0]=K;e:for(var pe=0,M=F.length,D=M>>>1;pe<D;){var X=2*(pe+1)-1,O=F[X],ye=X+1,W=F[ye];if(0>s(O,K))ye<M&&0>s(W,O)?(F[pe]=W,F[ye]=K,pe=ye):(F[pe]=O,F[X]=K,pe=X);else if(ye<M&&0>s(W,K))F[pe]=W,F[ye]=K,pe=ye;else break e}}return oe}function s(F,oe){var K=F.sortIndex-oe.sortIndex;return K!==0?K:F.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,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],m=1,b=null,x=3,v=!1,E=!1,w=!1,N=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function R(F){for(var oe=n(h);oe!==null;){if(oe.callback===null)a(h);else if(oe.startTime<=F)a(h),oe.sortIndex=oe.expirationTime,t(d,oe);else break;oe=n(h)}}function B(F){if(w=!1,R(F),!E)if(n(d)!==null)E=!0,j||(j=!0,ie());else{var oe=n(h);oe!==null&&te(B,oe.startTime-F)}}var j=!1,$=-1,q=5,ee=-1;function L(){return N?!0:!(e.unstable_now()-ee<q)}function Z(){if(N=!1,j){var F=e.unstable_now();ee=F;var oe=!0;try{e:{E=!1,w&&(w=!1,T($),$=-1),v=!0;var K=x;try{t:{for(R(F),b=n(d);b!==null&&!(b.expirationTime>F&&L());){var pe=b.callback;if(typeof pe=="function"){b.callback=null,x=b.priorityLevel;var M=pe(b.expirationTime<=F);if(F=e.unstable_now(),typeof M=="function"){b.callback=M,R(F),oe=!0;break t}b===n(d)&&a(d),R(F)}else a(d);b=n(d)}if(b!==null)oe=!0;else{var D=n(h);D!==null&&te(B,D.startTime-F),oe=!1}}break e}finally{b=null,x=K,v=!1}oe=void 0}}finally{oe?ie():j=!1}}}var ie;if(typeof C=="function")ie=function(){C(Z)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,ue=be.port2;be.port1.onmessage=Z,ie=function(){ue.postMessage(null)}}else ie=function(){k(Z,0)};function te(F,oe){$=k(function(){F(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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(F){switch(x){case 1:case 2:case 3:var oe=3;break;default:oe=x}var K=x;x=oe;try{return F()}finally{x=K}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(F,oe){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var K=x;x=F;try{return oe()}finally{x=K}},e.unstable_scheduleCallback=function(F,oe,K){var pe=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?pe+K:pe):K=pe,F){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=K+M,F={id:m++,callback:oe,priorityLevel:F,startTime:K,expirationTime:M,sortIndex:-1},K>pe?(F.sortIndex=K,t(h,F),n(d)===null&&F===n(h)&&(w?(T($),$=-1):w=!0,te(B,K-pe))):(F.sortIndex=M,t(d,F),E||v||(E=!0,j||(j=!0,ie()))),F},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(F){var oe=x;return function(){var K=x;x=oe;try{return F.apply(this,arguments)}finally{x=K}}}})(Op)),Op}var Kv;function Y_(){return Kv||(Kv=1,Ap.exports=V_()),Ap.exports}var Rp={exports:{}},gn={};/**
|
|
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 gn;Gv=1;var e=rg();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function 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(d,h,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:d,containerInfo:h,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,gn.createPortal=function(d,h){var m=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(d,h,null,m)},gn.flushSync=function(d){var h=c.T,m=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=h,a.p=m,a.d.f()}},gn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(d,h))},gn.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},gn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,b=f(m,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?a.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:x,fetchPriority:v}):m==="script"&&a.d.X(d,{crossOrigin:b,integrity:x,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},gn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);a.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(d)},gn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,b=f(m,h.crossOrigin);a.d.L(d,m,{crossOrigin:b,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})}},gn.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=f(h.as,h.crossOrigin);a.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(d)},gn.requestFormReset=function(d){a.d.r(d)},gn.unstable_batchedUpdates=function(d,h){return d(h)},gn.useFormState=function(d,h,m){return c.H.useFormState(d,h,m)},gn.useFormStatus=function(){return c.H.useHostTransitionStatus()},gn.version="19.2.5",gn}var Qv;function X_(){if(Qv)return Rp.exports;Qv=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 Vv;function Z_(){if(Vv)return Xo;Vv=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 f(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 d(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 d(g),i;if(y===u)return d(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 m(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=m(i),r!==null)return r;i=i.sibling}return null}var b=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),C=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Z&&i[Z]||i["@@iterator"],typeof i=="function"?i:null)}var be=Symbol.for("react.client.reference");function ue(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===be?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case k:return"Profiler";case N:return"StrictMode";case B:return"Suspense";case j:return"SuspenseList";case ee:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case C:return i.displayName||"Context";case T:return(i._context.displayName||"Context")+".Consumer";case R:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case $:return r=i.displayName||null,r!==null?r:ue(i.type)||"Memo";case q:r=i._payload,i=i._init;try{return ue(i(r))}catch{}}return null}var te=Array.isArray,F=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,K={pending:!1,data:null,method:null,action:null},pe=[],M=-1;function D(i){return{current:i}}function X(i){0>M||(i.current=pe[M],pe[M]=null,M--)}function O(i,r){M++,pe[M]=i.current,i.current=r}var ye=D(null),W=D(null),fe=D(null),G=D(null);function se(i,r){switch(O(fe,r),O(W,i),O(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}}X(ye),O(ye,i)}function de(){X(ye),X(W),X(fe)}function Re(i){i.memoizedState!==null&&O(G,i);var r=ye.current,o=cv(r,i.type);r!==o&&(O(W,i),O(ye,o))}function mt(i){W.current===i&&(X(ye),X(W)),G.current===i&&(X(G),Go._currentValue=K)}var vt,ui;function Vn(i){if(vt===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);vt=r&&r[1]||"",ui=-1<o.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+vt+i+ui}var Pi=!1;function et(i,r){if(!i||Pi)return"";Pi=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(J){var Y=J}Reflect.construct(i,[],ce)}else{try{ce.call()}catch(J){Y=J}i.call(ce.prototype)}}else{try{throw Error()}catch(J){Y=J}(ce=i())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(J){if(J&&Y&&typeof J.stack=="string")return[J.stack,Y.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{Pi=!1,Error.prepareStackTrace=o}return(o=i?i.displayName||i.name:"")?Vn(o):""}function Ai(i,r){switch(i.tag){case 26:case 27:case 5:return Vn(i.type);case 16:return Vn("Lazy");case 13:return i.child!==r&&r!==null?Vn("Suspense Fallback"):Vn("Suspense");case 19:return Vn("SuspenseList");case 0:case 15:return et(i.type,!1);case 11:return et(i.type.render,!1);case 1:return et(i.type,!0);case 31:return Vn("Activity");default:return""}}function fi(i){try{var r="",o=null;do r+=Ai(i,o),o=i,i=i.return;while(i);return r}catch(u){return`
|
|
47
|
+
Error generating stack: `+u.message+`
|
|
48
|
+
`+u.stack}}var Fi=Object.prototype.hasOwnProperty,aa=e.unstable_scheduleCallback,Or=e.unstable_cancelCallback,to=e.unstable_shouldYield,Ss=e.unstable_requestPaint,Lt=e.unstable_now,ws=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,ge=e.unstable_UserBlockingPriority,Me=e.unstable_NormalPriority,Ge=e.unstable_LowPriority,at=e.unstable_IdlePriority,Sn=e.log,Oi=e.unstable_setDisableYieldValue,ln=null,Bt=null;function hn(i){if(typeof Sn=="function"&&Oi(i),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(ln,i)}catch{}}var ut=Math.clz32?Math.clz32:Pc,qi=Math.log,wn=Math.LN2;function Pc(i){return i>>>=0,i===0?32:31-(qi(i)/wn|0)|0}var Rr=256,ks=262144,jr=4194304;function Rn(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 U(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=Rn(u):(S&=_,S!==0?g=Rn(S):o||(o=_&~i,o!==0&&(g=Rn(o))))):(_=u&~y,_!==0?g=Rn(_):S!==0?g=Rn(S):o||(o=u&~i,o!==0&&(g=Rn(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=jr;return jr<<=1,(jr&62914560)===0&&(jr=4194304),i}function Ct(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-ut(o),ce=1<<ae;_[ae]=0,I[ae]=-1;var Y=V[ae];if(Y!==null)for(V[ae]=null,ae=0;ae<Y.length;ae++){var J=Y[ae];J!==null&&(J.lane&=-536870913)}o&=~ce}u!==0&&Se(i,u,0),y!==0&&g===0&&i.tag!==0&&(i.suspendedLanes|=y&~(S&~r))}function Se(i,r,o){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-ut(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-ut(o),g=1<<u;g&r|i[u]&r&&(i[u]|=r),o&=~g}}function Ht(i,r){var o=r&-r;return o=(o&42)!==0?1:Ot(o),(o&(i.suspendedLanes|r))!==0?0:o}function Ot(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 ra(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 Hi=Math.random().toString(36).slice(2),Kt="__reactFiber$"+Hi,pn="__reactProps$"+Hi,Da="__reactContainer$"+Hi,no="__reactEvents$"+Hi,Fc="__reactListeners$"+Hi,Cs="__reactHandles$"+Hi,qc="__reactResources$"+Hi,Mr="__reactMarker$"+Hi;function io(i){delete i[Kt],delete i[pn],delete i[no],delete i[Fc],delete i[Cs]}function kn(i){var r=i[Kt];if(r)return r;for(var o=i.parentNode;o;){if(r=o[Da]||o[Kt]){if(o=r.alternate,r.child!==null||o!==null&&o.child!==null)for(i=gv(i);i!==null;){if(o=i[Kt])return o;i=gv(i)}return r}i=o,o=i.parentNode}return null}function sa(i){if(i=i[Kt]||i[Da]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function Ia(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(a(33))}function za(i){var r=i[qc];return r||(r=i[qc]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Yt(i){i[Mr]=!0}var Hc=new Set,Lr={};function la(i,r){he(i,r),he(i+"Capture",r)}function he(i,r){for(Lr[i]=r,i=0;i<r.length;i++)Hc.add(r[i])}var Te=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={},ft={};function Gt(i){return Fi.call(ft,i)?!0:Fi.call(Qe,i)?!1:Te.test(i)?ft[i]=!0:(Qe[i]=!0,!1)}function mn(i,r,o){if(Gt(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 Yn(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 jn(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 Nt(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Wn(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 Ts(i){if(!i._valueTracker){var r=Wn(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=Wn(i)?i.checked?"true":"false":i.value),i=u,i!==o?(r.setValue(i),!0):!1}function As(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 wd=/[\n"\\]/g;function Mn(i){return i.replace(wd,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=""+Nt(r)):i.value!==""+Nt(r)&&(i.value=""+Nt(r)):S!=="submit"&&S!=="reset"||i.removeAttribute("value"),r!=null?Os(i,S,Nt(r)):o!=null?Os(i,S,Nt(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=""+Nt(_):i.removeAttribute("name")}function Dr(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)){Ts(i);return}o=o!=null?""+Nt(o):"",r=r!=null?""+Nt(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),Ts(i)}function Os(i,r,o){r==="number"&&As(i.ownerDocument)===i||i.defaultValue===""+o||(i.defaultValue=""+o)}function on(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=""+Nt(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=""+Nt(r),r!==i.value&&(i.value=r),o==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=o!=null?""+Nt(o):""}function Rs(i,r,o,u){if(r==null){if(u!=null){if(o!=null)throw Error(a(92));if(te(u)){if(1<u.length)throw Error(a(93));u=u[0]}o=u}o==null&&(o=""),r=o}o=Nt(r),i.defaultValue=o,u=i.textContent,u===o&&u!==""&&u!==null&&(i.value=u),Ts(i)}function De(i,r){if(r){var o=i.firstChild;if(o&&o===i.lastChild&&o.nodeType===3){o.nodeValue=r;return}}i.textContent=r}var Qc=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 Wt(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||Qc.has(r)?r==="float"?i.cssFloat=o:i[r]=(""+o).trim():i[r]=o+"px"}function dt(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&&Wt(i,g,u)}else for(var y in r)r.hasOwnProperty(y)&&Wt(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 oa=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 Ba(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 Pe(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Xe=null,Dt=null;function di(i){var r=sa(i);if(r&&(i=r.stateNode)){var o=i[pn]||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="'+Mn(""+r)+'"][type="radio"]'),r=0;r<o.length;r++){var u=o[r];if(u!==i&&u.form===i.form){var g=u[pn]||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&&on(i,!!o.multiple,r,!1)}}}var lo=!1;function Vc(i,r,o){if(lo)return i(r,o);lo=!0;try{var u=i(r);return u}finally{if(lo=!1,(Xe!==null||Dt!==null)&&(Du(),Xe&&(r=Xe,i=Dt,Dt=Xe=null,di(r),i)))for(r=0;r<i.length;r++)di(i[r])}}function oo(i,r){var o=i.stateNode;if(o===null)return null;var u=o[pn]||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 ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kd=!1;if(ca)try{var co={};Object.defineProperty(co,"passive",{get:function(){kd=!0}}),window.addEventListener("test",co,co),window.removeEventListener("test",co,co)}catch{kd=!1}var $a=null,Nd=null,Yc=null;function cb(){if(Yc)return Yc;var i,r=Nd,o=r.length,u,g="value"in $a?$a.value:$a.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 b(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 Ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zc=Ln(Ir),uo=b({},Ir,{view:0,detail:0}),Pk=Ln(uo),_d,Cd,fo,Jc=b({},uo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ad,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"?(_d=i.screenX-fo.screenX,Cd=i.screenY-fo.screenY):Cd=_d=0,fo=i),_d)},movementY:function(i){return"movementY"in i?i.movementY:Cd}}),fb=Ln(Jc),Fk=b({},Jc,{dataTransfer:0}),qk=Ln(Fk),Hk=b({},uo,{relatedTarget:0}),Td=Ln(Hk),Kk=b({},Ir,{animationName:0,elapsedTime:0,pseudoElement:0}),Gk=Ln(Kk),Qk=b({},Ir,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Vk=Ln(Qk),Yk=b({},Ir,{data:0}),db=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 Ad(){return Jk}var eN=b({},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:Ad,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=b({},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=b({},uo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ad}),aN=Ln(iN),rN=b({},Ir,{propertyName:0,elapsedTime:0,pseudoElement:0}),sN=Ln(rN),lN=b({},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=b({},Ir,{newState:0,oldState:0}),uN=Ln(cN),fN=[9,13,27,32],Od=ca&&"CompositionEvent"in window,ho=null;ca&&"documentMode"in document&&(ho=document.documentMode);var dN=ca&&"TextEvent"in window&&!ho,pb=ca&&(!Od||ho&&8<ho&&11>=ho),mb=" ",gb=!1;function bb(i,r){switch(i){case"keyup":return fN.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"||!Od&&bb(i,r)?(i=cb(),Yc=Nd=$a=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){Xe?Dt?Dt.push(u):Dt=[u]:Xe=u,r=Fu(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=Ia(i);if(ao(r))return i}function Eb(i,r){if(i==="change")return r}var Sb=!1;if(ca){var Rd;if(ca){var jd="oninput"in document;if(!jd){var wb=document.createElement("div");wb.setAttribute("oninput","return;"),jd=typeof wb.oninput=="function"}Rd=jd}else Rd=!1;Sb=Rd&&(!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,Pe(i)),Vc(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 EN(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Xn=typeof Object.is=="function"?Object.is:EN;function go(i,r){if(Xn(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(!Fi.call(r,g)||!Xn(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 Tb(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?Tb(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function Ab(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=As(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=As(i.document)}return r}function Md(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 SN=ca&&"documentMode"in document&&11>=document.documentMode,Ms=null,Ld=null,bo=null,Dd=!1;function Ob(i,r,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Dd||Ms==null||Ms!==As(u)||(u=Ms,"selectionStart"in u&&Md(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=Fu(Ld,"onSelect"),0<u.length&&(r=new Zc("onSelect","select",null,r,o),i.push({event:r,listeners:u}),r.target=Ms)))}function zr(i,r){var o={};return o[i.toLowerCase()]=r.toLowerCase(),o["Webkit"+i]="webkit"+r,o["Moz"+i]="moz"+r,o}var Ls={animationend:zr("Animation","AnimationEnd"),animationiteration:zr("Animation","AnimationIteration"),animationstart:zr("Animation","AnimationStart"),transitionrun:zr("Transition","TransitionRun"),transitionstart:zr("Transition","TransitionStart"),transitioncancel:zr("Transition","TransitionCancel"),transitionend:zr("Transition","TransitionEnd")},Id={},Rb={};ca&&(Rb=document.createElement("div").style,"AnimationEvent"in window||(delete Ls.animationend.animation,delete Ls.animationiteration.animation,delete Ls.animationstart.animation),"TransitionEvent"in window||delete Ls.transitionend.transition);function Ur(i){if(Id[i])return Id[i];if(!Ls[i])return i;var r=Ls[i],o;for(o in r)if(r.hasOwnProperty(o)&&o in Rb)return Id[i]=r[o];return i}var jb=Ur("animationend"),Mb=Ur("animationiteration"),Lb=Ur("animationstart"),wN=Ur("transitionrun"),kN=Ur("transitionstart"),NN=Ur("transitioncancel"),Db=Ur("transitionend"),Ib=new Map,zd="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(" ");zd.push("scrollEnd");function Ri(i,r){Ib.set(i,r),la(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)},hi=[],Ds=0,Ud=0;function nu(){for(var i=Ds,r=Ud=Ds=0;r<i;){var o=hi[r];hi[r++]=null;var u=hi[r];hi[r++]=null;var g=hi[r];hi[r++]=null;var y=hi[r];if(hi[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){hi[Ds++]=i,hi[Ds++]=r,hi[Ds++]=o,hi[Ds++]=u,Ud|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function Bd(i,r,o,u){return iu(i,r,o,u),au(i)}function Br(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-ut(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<Bo)throw Bo=0,Vh=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 Zn(i,r,o,u){return new _N(i,r,o,u)}function $d(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ua(i,r){var o=i.alternate;return o===null?(o=Zn(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 Ub(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")$d(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 ee:return i=Zn(31,o,r,g),i.elementType=ee,i.lanes=y,i;case w:return $r(o.children,g,y,r);case N:S=8,g|=24;break;case k:return i=Zn(12,o,r,g|2),i.elementType=k,i.lanes=y,i;case B:return i=Zn(13,o,r,g),i.elementType=B,i.lanes=y,i;case j:return i=Zn(19,o,r,g),i.elementType=j,i.lanes=y,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case C:S=10;break e;case T:S=9;break e;case R:S=11;break e;case $:S=14;break e;case q:S=16,u=null;break e}S=29,o=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Zn(S,o,r,g),r.elementType=i,r.type=u,r.lanes=y,r}function $r(i,r,o,u){return i=Zn(7,i,u,r),i.lanes=o,i}function Pd(i,r,o){return i=Zn(6,i,null,r),i.lanes=o,i}function Bb(i){var r=Zn(18,null,null,0);return r.stateNode=i,r}function Fd(i,r,o){return r=Zn(4,i.children!==null?i.children:[],i.key,r),r.lanes=o,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var $b=new WeakMap;function pi(i,r){if(typeof i=="object"&&i!==null){var o=$b.get(i);return o!==void 0?o:(r={value:i,source:r,stack:fi(r)},$b.set(i,r),r)}return{value:i,source:r,stack:fi(r)}}var zs=[],Us=0,su=null,yo=0,mi=[],gi=0,Pa=null,Ki=1,Gi="";function fa(i,r){zs[Us++]=yo,zs[Us++]=su,su=i,yo=r}function Pb(i,r,o){mi[gi++]=Ki,mi[gi++]=Gi,mi[gi++]=Pa,Pa=i;var u=Ki;i=Gi;var g=32-ut(u)-1;u&=~(1<<g),o+=1;var y=32-ut(r)+g;if(30<y){var S=g-g%5;y=(u&(1<<S)-1).toString(32),u>>=S,g-=S,Ki=1<<32-ut(r)+g|o<<g|u,Gi=y+i}else Ki=1<<y|o<<g|u,Gi=i}function qd(i){i.return!==null&&(fa(i,1),Pb(i,1,0))}function Hd(i){for(;i===su;)su=zs[--Us],zs[Us]=null,yo=zs[--Us],zs[Us]=null;for(;i===Pa;)Pa=mi[--gi],mi[gi]=null,Gi=mi[--gi],mi[gi]=null,Ki=mi[--gi],mi[gi]=null}function Fb(i,r){mi[gi++]=Ki,mi[gi++]=Gi,mi[gi++]=Pa,Ki=r.id,Gi=r.overflow,Pa=i}var cn=null,Tt=null,tt=!1,Fa=null,bi=!1,Kd=Error(a(519));function qa(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xo(pi(r,i)),Kd}function qb(i){var r=i.stateNode,o=i.type,u=i.memoizedProps;switch(r[Kt]=i,r[pn]=u,o){case"dialog":Ye("cancel",r),Ye("close",r);break;case"iframe":case"object":case"embed":Ye("load",r);break;case"video":case"audio":for(o=0;o<Po.length;o++)Ye(Po[o],r);break;case"source":Ye("error",r);break;case"img":case"image":case"link":Ye("error",r),Ye("load",r);break;case"details":Ye("toggle",r);break;case"input":Ye("invalid",r),Dr(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ye("invalid",r);break;case"textarea":Ye("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&&(Ye("beforetoggle",r),Ye("toggle",r)),u.onScroll!=null&&Ye("scroll",r),u.onScrollEnd!=null&&Ye("scrollend",r),u.onClick!=null&&(r.onclick=xe),r=!0):r=!1,r||qa(i,!0)}function Hb(i){for(cn=i.return;cn;)switch(cn.tag){case 5:case 31:case 13:bi=!1;return;case 27:case 3:bi=!0;return;default:cn=cn.return}}function Bs(i){if(i!==cn)return!1;if(!tt)return Hb(i),tt=!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),Hb(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,ir(i.type)?(i=pp,pp=null,Tt=i):Tt=r):Tt=cn?xi(i.stateNode.nextSibling):null;return!0}function Pr(){Tt=cn=null,tt=!1}function Gd(){var i=Fa;return i!==null&&(Un===null?Un=i:Un.push.apply(Un,i),Fa=null),i}function xo(i){Fa===null?Fa=[i]:Fa.push(i)}var Qd=D(null),Fr=null,da=null;function Ha(i,r,o){O(Qd,r._currentValue),r._currentValue=o}function ha(i){i._currentValue=Qd.current,X(Qd)}function Vd(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 Yd(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),Vd(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),Vd(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 $s(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;Xn(g.pendingProps.value,S.value)||(i!==null?i.push(_):i=[_])}}else if(g===G.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&&Yd(r,i,o,u),r.flags|=262144}function lu(i){for(i=i.firstContext;i!==null;){if(!Xn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function qr(i){Fr=i,da=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function un(i){return Kb(Fr,i)}function ou(i,r){return Fr===null&&qr(i),Kb(i,r)}function Kb(i,r){var o=r._currentValue;if(r={context:r,memoizedValue:o,next:null},da===null){if(i===null)throw Error(a(308));da=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else da=da.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()})}},TN=e.unstable_scheduleCallback,AN=e.unstable_NormalPriority,Xt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wd(){return{controller:new CN,data:new Map,refCount:0}}function vo(i){i.refCount--,i.refCount===0&&TN(AN,function(){i.controller.abort()})}var Eo=null,Xd=0,Ps=0,Fs=null;function ON(i,r){if(Eo===null){var o=Eo=[];Xd=0,Ps=ep(),Fs={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Xd++,r.then(Gb,Gb),r}function Gb(){if(--Xd===0&&Eo!==null){Fs!==null&&(Fs.status="fulfilled");var i=Eo;Eo=null,Ps=0,Fs=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 Qb=F.S;F.S=function(i,r){Ox=Lt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&ON(i,r),Qb!==null&&Qb(i,r)};var Hr=D(null);function Zd(){var i=Hr.current;return i!==null?i:St.pooledCache}function cu(i,r){r===null?O(Hr,Hr.current):O(Hr,r.pool)}function Vb(){var i=Zd();return i===null?null:{parent:Xt._currentValue,pool:i}}var qs=Error(a(460)),Jd=Error(a(474)),uu=Error(a(542)),fu={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 Gr=r,qs}}function Kr(i){try{var r=i._init;return r(i._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Gr=o,qs):o}}var Gr=null;function Xb(){if(Gr===null)throw Error(a(459));var i=Gr;return Gr=null,i}function Zb(i){if(i===qs||i===uu)throw Error(a(483))}var Hs=null,So=0;function du(i){var r=So;return So+=1,Hs===null&&(Hs=[]),Wb(Hs,i,r)}function wo(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(H,P){if(i){var Q=H.deletions;Q===null?(H.deletions=[P],H.flags|=16):Q.push(P)}}function o(H,P){if(!i)return null;for(;P!==null;)r(H,P),P=P.sibling;return null}function u(H){for(var P=new Map;H!==null;)H.key!==null?P.set(H.key,H):P.set(H.index,H),H=H.sibling;return P}function g(H,P){return H=ua(H,P),H.index=0,H.sibling=null,H}function y(H,P,Q){return H.index=Q,i?(Q=H.alternate,Q!==null?(Q=Q.index,Q<P?(H.flags|=67108866,P):Q):(H.flags|=67108866,P)):(H.flags|=1048576,P)}function S(H){return i&&H.alternate===null&&(H.flags|=67108866),H}function _(H,P,Q,le){return P===null||P.tag!==6?(P=Pd(Q,H.mode,le),P.return=H,P):(P=g(P,Q),P.return=H,P)}function I(H,P,Q,le){var Oe=Q.type;return Oe===w?ae(H,P,Q.props.children,le,Q.key):P!==null&&(P.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===q&&Kr(Oe)===P.type)?(P=g(P,Q.props),wo(P,Q),P.return=H,P):(P=ru(Q.type,Q.key,Q.props,null,H.mode,le),wo(P,Q),P.return=H,P)}function V(H,P,Q,le){return P===null||P.tag!==4||P.stateNode.containerInfo!==Q.containerInfo||P.stateNode.implementation!==Q.implementation?(P=Fd(Q,H.mode,le),P.return=H,P):(P=g(P,Q.children||[]),P.return=H,P)}function ae(H,P,Q,le,Oe){return P===null||P.tag!==7?(P=$r(Q,H.mode,le,Oe),P.return=H,P):(P=g(P,Q),P.return=H,P)}function ce(H,P,Q){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Pd(""+P,H.mode,Q),P.return=H,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case v:return Q=ru(P.type,P.key,P.props,null,H.mode,Q),wo(Q,P),Q.return=H,Q;case E:return P=Fd(P,H.mode,Q),P.return=H,P;case q:return P=Kr(P),ce(H,P,Q)}if(te(P)||ie(P))return P=$r(P,H.mode,Q,null),P.return=H,P;if(typeof P.then=="function")return ce(H,du(P),Q);if(P.$$typeof===C)return ce(H,ou(H,P),Q);hu(H,P)}return null}function Y(H,P,Q,le){var Oe=P!==null?P.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Oe!==null?null:_(H,P,""+Q,le);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return Q.key===Oe?I(H,P,Q,le):null;case E:return Q.key===Oe?V(H,P,Q,le):null;case q:return Q=Kr(Q),Y(H,P,Q,le)}if(te(Q)||ie(Q))return Oe!==null?null:ae(H,P,Q,le,null);if(typeof Q.then=="function")return Y(H,P,du(Q),le);if(Q.$$typeof===C)return Y(H,P,ou(H,Q),le);hu(H,Q)}return null}function J(H,P,Q,le,Oe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return H=H.get(Q)||null,_(P,H,""+le,Oe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case v:return H=H.get(le.key===null?Q:le.key)||null,I(P,H,le,Oe);case E:return H=H.get(le.key===null?Q:le.key)||null,V(P,H,le,Oe);case q:return le=Kr(le),J(H,P,Q,le,Oe)}if(te(le)||ie(le))return H=H.get(Q)||null,ae(P,H,le,Oe,null);if(typeof le.then=="function")return J(H,P,Q,du(le),Oe);if(le.$$typeof===C)return J(H,P,Q,ou(P,le),Oe);hu(P,le)}return null}function we(H,P,Q,le){for(var Oe=null,rt=null,_e=P,qe=P=0,Je=null;_e!==null&&qe<Q.length;qe++){_e.index>qe?(Je=_e,_e=null):Je=_e.sibling;var st=Y(H,_e,Q[qe],le);if(st===null){_e===null&&(_e=Je);break}i&&_e&&st.alternate===null&&r(H,_e),P=y(st,P,qe),rt===null?Oe=st:rt.sibling=st,rt=st,_e=Je}if(qe===Q.length)return o(H,_e),tt&&fa(H,qe),Oe;if(_e===null){for(;qe<Q.length;qe++)_e=ce(H,Q[qe],le),_e!==null&&(P=y(_e,P,qe),rt===null?Oe=_e:rt.sibling=_e,rt=_e);return tt&&fa(H,qe),Oe}for(_e=u(_e);qe<Q.length;qe++)Je=J(_e,H,qe,Q[qe],le),Je!==null&&(i&&Je.alternate!==null&&_e.delete(Je.key===null?qe:Je.key),P=y(Je,P,qe),rt===null?Oe=Je:rt.sibling=Je,rt=Je);return i&&_e.forEach(function(or){return r(H,or)}),tt&&fa(H,qe),Oe}function Le(H,P,Q,le){if(Q==null)throw Error(a(151));for(var Oe=null,rt=null,_e=P,qe=P=0,Je=null,st=Q.next();_e!==null&&!st.done;qe++,st=Q.next()){_e.index>qe?(Je=_e,_e=null):Je=_e.sibling;var or=Y(H,_e,st.value,le);if(or===null){_e===null&&(_e=Je);break}i&&_e&&or.alternate===null&&r(H,_e),P=y(or,P,qe),rt===null?Oe=or:rt.sibling=or,rt=or,_e=Je}if(st.done)return o(H,_e),tt&&fa(H,qe),Oe;if(_e===null){for(;!st.done;qe++,st=Q.next())st=ce(H,st.value,le),st!==null&&(P=y(st,P,qe),rt===null?Oe=st:rt.sibling=st,rt=st);return tt&&fa(H,qe),Oe}for(_e=u(_e);!st.done;qe++,st=Q.next())st=J(_e,H,qe,st.value,le),st!==null&&(i&&st.alternate!==null&&_e.delete(st.key===null?qe:st.key),P=y(st,P,qe),rt===null?Oe=st:rt.sibling=st,rt=st);return i&&_e.forEach(function(F_){return r(H,F_)}),tt&&fa(H,qe),Oe}function yt(H,P,Q,le){if(typeof Q=="object"&&Q!==null&&Q.type===w&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:e:{for(var Oe=Q.key;P!==null;){if(P.key===Oe){if(Oe=Q.type,Oe===w){if(P.tag===7){o(H,P.sibling),le=g(P,Q.props.children),le.return=H,H=le;break e}}else if(P.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===q&&Kr(Oe)===P.type){o(H,P.sibling),le=g(P,Q.props),wo(le,Q),le.return=H,H=le;break e}o(H,P);break}else r(H,P);P=P.sibling}Q.type===w?(le=$r(Q.props.children,H.mode,le,Q.key),le.return=H,H=le):(le=ru(Q.type,Q.key,Q.props,null,H.mode,le),wo(le,Q),le.return=H,H=le)}return S(H);case E:e:{for(Oe=Q.key;P!==null;){if(P.key===Oe)if(P.tag===4&&P.stateNode.containerInfo===Q.containerInfo&&P.stateNode.implementation===Q.implementation){o(H,P.sibling),le=g(P,Q.children||[]),le.return=H,H=le;break e}else{o(H,P);break}else r(H,P);P=P.sibling}le=Fd(Q,H.mode,le),le.return=H,H=le}return S(H);case q:return Q=Kr(Q),yt(H,P,Q,le)}if(te(Q))return we(H,P,Q,le);if(ie(Q)){if(Oe=ie(Q),typeof Oe!="function")throw Error(a(150));return Q=Oe.call(Q),Le(H,P,Q,le)}if(typeof Q.then=="function")return yt(H,P,du(Q),le);if(Q.$$typeof===C)return yt(H,P,ou(H,Q),le);hu(H,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,P!==null&&P.tag===6?(o(H,P.sibling),le=g(P,Q),le.return=H,H=le):(o(H,P),le=Pd(Q,H.mode,le),le.return=H,H=le),S(H)):o(H,P)}return function(H,P,Q,le){try{So=0;var Oe=yt(H,P,Q,le);return Hs=null,Oe}catch(_e){if(_e===qs||_e===uu)throw _e;var rt=Zn(29,_e,null,H.mode);return rt.lanes=le,rt.return=H,rt}finally{}}}var Qr=Jb(!0),ey=Jb(!1),Ka=!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 Ga(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,(lt&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=Fs;if(i!==null)throw i}}function _o(i,r,o,u){ih=!1;var g=i.updateQueue;Ka=!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 ce=g.baseState;S=0,ae=V=I=null,_=y;do{var Y=_.lane&-536870913,J=Y!==_.lane;if(J?(Ze&Y)===Y:(u&Y)===Y){Y!==0&&Y===Ps&&(ih=!0),ae!==null&&(ae=ae.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var we=i,Le=_;Y=r;var yt=o;switch(Le.tag){case 1:if(we=Le.payload,typeof we=="function"){ce=we.call(yt,ce,Y);break e}ce=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Le.payload,Y=typeof we=="function"?we.call(yt,ce,Y):we,Y==null)break e;ce=b({},ce,Y);break e;case 2:Ka=!0}}Y=_.callback,Y!==null&&(i.flags|=64,J&&(i.flags|=8192),J=g.callbacks,J===null?g.callbacks=[Y]:J.push(Y))}else J={lane:Y,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ae===null?(V=ae=J,I=ce):ae=ae.next=J,S|=Y;if(_=_.next,_===null){if(_=g.shared.pending,_===null)break;J=_,_=J.next,J.next=null,g.lastBaseUpdate=J,g.shared.pending=null}}while(!0);ae===null&&(I=ce),g.baseState=I,g.firstBaseUpdate=V,g.lastBaseUpdate=ae,y===null&&(g.shared.lanes=0),Za|=S,i.lanes=S,i.memoizedState=ce}}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,O(pu,i),O(Ks,r),Sa=i|r.baseLanes}function ah(){O(pu,Sa),O(Ks,Ks.current)}function rh(){Sa=pu.current,X(Ks),X(pu)}var Jn=D(null),yi=null;function Va(i){var r=i.alternate;O(Qt,Qt.current&1),O(Jn,i),yi===null&&(r===null||Ks.current!==null||r.memoizedState!==null)&&(yi=i)}function sh(i){O(Qt,Qt.current),O(Jn,i),yi===null&&(yi=i)}function ay(i){i.tag===22?(O(Qt,Qt.current),O(Jn,i),yi===null&&(yi=i)):Ya()}function Ya(){O(Qt,Qt.current),O(Jn,Jn.current)}function ei(i){X(Jn),yi===i&&(yi=null),X(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||dp(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 pa=0,Fe=null,gt=null,Zt=null,gu=!1,Gs=!1,Vr=!1,bu=0,Co=0,Qs=null,jN=0;function $t(){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(!Xn(i[o],r[o]))return!1;return!0}function oh(i,r,o,u,g,y){return pa=y,Fe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,F.H=i===null||i.memoizedState===null?Py:wh,Vr=!1,y=o(u,g),Vr=!1,Gs&&(y=sy(r,o,u,g)),ry(i),y}function ry(i){F.H=Oo;var r=gt!==null&>.next!==null;if(pa=0,Zt=gt=Fe=null,gu=!1,Co=0,Qs=null,r)throw Error(a(300));i===null||Jt||(i=i.dependencies,i!==null&&lu(i)&&(Jt=!0))}function sy(i,r,o,u){Fe=i;var g=0;do{if(Gs&&(Qs=null),Co=0,Gs=!1,25<=g)throw Error(a(301));if(g+=1,Zt=gt=null,i.updateQueue!=null){var y=i.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}F.H=Fy,y=r(o,u)}while(Gs);return y}function MN(){var i=F.H,r=i.useState()[0];return r=typeof r.then=="function"?To(r):r,i=i.useState()[0],(gt!==null?gt.memoizedState:null)!==i&&(Fe.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 fh(i){if(gu){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}gu=!1}pa=0,Zt=gt=Fe=null,Gs=!1,Co=bu=0,Qs=null}function Nn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Fe.memoizedState=Zt=i:Zt=Zt.next=i,Zt}function Vt(){if(gt===null){var i=Fe.alternate;i=i!==null?i.memoizedState:null}else i=gt.next;var r=Zt===null?Fe.memoizedState:Zt.next;if(r!==null)Zt=r,gt=i;else{if(i===null)throw Fe.alternate===null?Error(a(467)):Error(a(310));gt=i,i={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},Zt===null?Fe.memoizedState=Zt=i:Zt=Zt.next=i}return Zt}function yu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function To(i){var r=Co;return Co+=1,Qs===null&&(Qs=[]),i=Wb(Qs,i,r),r=Fe,(Zt===null?r.memoizedState:Zt.next)===null&&(r=r.alternate,F.H=r===null||r.memoizedState===null?Py:wh),i}function xu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return To(i);if(i.$$typeof===C)return un(i)}throw Error(a(438,String(i)))}function dh(i){var r=null,o=Fe.updateQueue;if(o!==null&&(r=o.memoCache),r==null){var u=Fe.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(),Fe.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]=L;return r.index++,o}function ma(i,r){return typeof r=="function"?r(i):r}function vu(i){var r=Vt();return hh(r,gt,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 ce=V.lane&-536870913;if(ce!==V.lane?(Ze&ce)===ce:(pa&ce)===ce){var Y=V.revertLane;if(Y===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),ce===Ps&&(ae=!0);else if((pa&Y)===Y){V=V.next,Y===Ps&&(ae=!0);continue}else ce={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},I===null?(_=I=ce,S=y):I=I.next=ce,Fe.lanes|=Y,Za|=Y;ce=V.action,Vr&&o(y,ce),y=V.hasEagerState?V.eagerState:o(y,ce)}else Y={lane:ce,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},I===null?(_=I=Y,S=y):I=I.next=Y,Fe.lanes|=ce,Za|=ce;V=V.next}while(V!==null&&V!==r);if(I===null?S=y:I.next=_,!Xn(y,i.memoizedState)&&(Jt=!0,ae&&(o=Fs,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=Vt(),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);Xn(y,r.memoizedState)||(Jt=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),o.lastRenderedState=y}return[y,u]}function ly(i,r,o){var u=Fe,g=Vt(),y=tt;if(y){if(o===void 0)throw Error(a(407));o=o()}else o=r();var S=!Xn((gt||g).memoizedState,o);if(S&&(g.memoizedState=o,Jt=!0),g=g.queue,bh(uy.bind(null,u,g,i),[i]),g.getSnapshot!==r||S||Zt!==null&&Zt.memoizedState.tag&1){if(u.flags|=2048,Vs(9,{destroy:void 0},cy.bind(null,u,g,o,r),null),St===null)throw Error(a(349));y||(pa&127)!==0||oy(u,r,o)}return o}function oy(i,r,o){i.flags|=16384,i={getSnapshot:r,value:o},r=Fe.updateQueue,r===null?(r=yu(),Fe.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,fy(r)&&dy(i)}function uy(i,r,o){return o(function(){fy(r)&&dy(i)})}function fy(i){var r=i.getSnapshot;i=i.value;try{var o=r();return!Xn(i,o)}catch{return!0}}function dy(i){var r=Br(i,2);r!==null&&Bn(r,i,2)}function mh(i){var r=Nn();if(typeof i=="function"){var o=i;if(i=o(),Vr){hn(!0);try{o()}finally{hn(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:i},r}function hy(i,r,o,u){return i.baseState=o,hh(i,gt,typeof u=="function"?u:ma)}function LN(i,r,o,u,g){if(wu(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)}};F.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=F.T,S={};F.T=S;try{var _=o(g,u),I=F.S;I!==null&&I(S,_),my(i,r,_)}catch(V){gh(i,r,V)}finally{y!==null&&S.types!==null&&(y.types=S.types),F.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(tt){var o=St.formState;if(o!==null){e:{var u=Fe;if(tt){if(Tt){t:{for(var g=Tt,y=bi;g.nodeType!==8;){if(!y){g=null;break t}if(g=xi(g.nextSibling),g===null){g=null;break t}}y=g.data,g=y==="F!"||y==="F"?g:null}if(g){Tt=xi(g.nextSibling),u=g.data==="F!";break e}}qa(u)}u=!1}u&&(r=o[0])}}return o=Nn(),o.memoizedState=o.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yy,lastRenderedState:r},o.queue=u,o=Uy.bind(null,Fe,u),u.dispatch=o,u=mh(!1),y=Sh.bind(null,Fe,!1,u.queue),u=Nn(),g={state:r,dispatch:null,action:i,pending:null},u.queue=g,o=LN.bind(null,Fe,g,y,o),g.dispatch=o,u.memoizedState=i,[r,o,!1]}function vy(i){var r=Vt();return Ey(r,gt,i)}function Ey(i,r,o){if(r=hh(i,r,yy)[0],i=vu(ma)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=To(r)}catch(S){throw S===qs?uu:S}else u=r;r=Vt();var g=r.queue,y=g.dispatch;return o!==r.memoizedState&&(Fe.flags|=2048,Vs(9,{destroy:void 0},DN.bind(null,g,o),null)),[u,y,i]}function DN(i,r){i.action=r}function Sy(i){var r=Vt(),o=gt;if(o!==null)return Ey(r,o,i);Vt(),r=r.memoizedState,o=Vt();var u=o.queue.dispatch;return o.memoizedState=i,[r,u,!1]}function Vs(i,r,o,u){return i={tag:i,create:o,deps:u,inst:r,next:null},r=Fe.updateQueue,r===null&&(r=yu(),Fe.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 wy(){return Vt().memoizedState}function Eu(i,r,o,u){var g=Nn();Fe.flags|=i,g.memoizedState=Vs(1|r,{destroy:void 0},o,u===void 0?null:u)}function Su(i,r,o,u){var g=Vt();u=u===void 0?null:u;var y=g.memoizedState.inst;gt!==null&&u!==null&&lh(u,gt.memoizedState.deps)?g.memoizedState=Vs(r,y,o,u):(Fe.flags|=i,g.memoizedState=Vs(1|r,y,o,u))}function ky(i,r){Eu(8390656,8,i,r)}function bh(i,r){Su(2048,8,i,r)}function IN(i){Fe.flags|=4;var r=Fe.updateQueue;if(r===null)r=yu(),Fe.updateQueue=r,r.events=[i];else{var o=r.events;o===null?r.events=[i]:o.push(i)}}function Ny(i){var r=Vt().memoizedState;return IN({ref:r,nextImpl:i}),function(){if((lt&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function _y(i,r){return Su(4,2,i,r)}function Cy(i,r){return Su(4,4,i,r)}function Ty(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 Ay(i,r,o){o=o!=null?o.concat([i]):null,Su(4,4,Ty.bind(null,r,i),o)}function yh(){}function Oy(i,r){var o=Vt();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=Vt();r=r===void 0?null:r;var u=o.memoizedState;if(r!==null&&lh(r,u[1]))return u[0];if(u=i(),Vr){hn(!0);try{i()}finally{hn(!1)}}return o.memoizedState=[u,r],u}function xh(i,r,o){return o===void 0||(pa&1073741824)!==0&&(Ze&261930)===0?i.memoizedState=r:(i.memoizedState=o,i=jx(),Fe.lanes|=i,Za|=i,o)}function jy(i,r,o,u){return Xn(o,r)?o:Ks.current!==null?(i=xh(i,o,u),Xn(i,r)||(Jt=!0),i):(pa&42)===0||(pa&1073741824)!==0&&(Ze&261930)===0?(Jt=!0,i.memoizedState=o):(i=jx(),Fe.lanes|=i,Za|=i,r)}function My(i,r,o,u,g){var y=oe.p;oe.p=y!==0&&8>y?y:8;var S=F.T,_={};F.T=_,Sh(i,!1,r,o);try{var I=g(),V=F.S;if(V!==null&&V(_,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ae=RN(I,u);Ao(i,r,ae,ii(i))}else Ao(i,r,u,ii(i))}catch(ce){Ao(i,r,{then:function(){},status:"rejected",reason:ce},ii())}finally{oe.p=y,S!==null&&_.types!==null&&(S.types=_.types),F.T=S}}function zN(){}function vh(i,r,o,u){if(i.tag!==5)throw Error(a(476));var g=Ly(i).queue;My(i,g,r,K,o===null?zN:function(){return Dy(i),o(u)})}function Ly(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:K},next:null};var o={};return r.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:o},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function Dy(i){var r=Ly(i);r.next===null&&(r=i.alternate.memoizedState),Ao(i,r.next.queue,{},ii())}function Eh(){return un(Go)}function Iy(){return Vt().memoizedState}function zy(){return Vt().memoizedState}function UN(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var o=ii();i=Ga(o);var u=Qa(r,i,o);u!==null&&(Bn(u,r,o),ko(u,r,o)),r={cache:Wd()},i.payload=r;return}r=r.return}}function BN(i,r,o){var u=ii();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},wu(i)?By(r,o):(o=Bd(i,r,o,u),o!==null&&(Bn(o,i,u),$y(o,r,u)))}function Uy(i,r,o){var u=ii();Ao(i,r,o,u)}function Ao(i,r,o,u){var g={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(wu(i))By(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=_,Xn(_,S))return iu(i,r,g,0),St===null&&nu(),!1}catch{}finally{}if(o=Bd(i,r,g,u),o!==null)return Bn(o,i,u),$y(o,r,u),!0}return!1}function Sh(i,r,o,u){if(u={lane:2,revertLane:ep(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},wu(i)){if(r)throw Error(a(479))}else r=Bd(i,o,u,2),r!==null&&Bn(r,i,2)}function wu(i){var r=i.alternate;return i===Fe||r!==null&&r===Fe}function By(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 $y(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:un,use:xu,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useLayoutEffect:$t,useInsertionEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useSyncExternalStore:$t,useId:$t,useHostTransitionStatus:$t,useFormState:$t,useActionState:$t,useOptimistic:$t,useMemoCache:$t,useCacheRefresh:$t};Oo.useEffectEvent=$t;var Py={readContext:un,use:xu,useCallback:function(i,r){return Nn().memoizedState=[i,r===void 0?null:r],i},useContext:un,useEffect:ky,useImperativeHandle:function(i,r,o){o=o!=null?o.concat([i]):null,Eu(4194308,4,Ty.bind(null,r,i),o)},useLayoutEffect:function(i,r){return Eu(4194308,4,i,r)},useInsertionEffect:function(i,r){Eu(4,2,i,r)},useMemo:function(i,r){var o=Nn();r=r===void 0?null:r;var u=i();if(Vr){hn(!0);try{i()}finally{hn(!1)}}return o.memoizedState=[u,r],u},useReducer:function(i,r,o){var u=Nn();if(o!==void 0){var g=o(r);if(Vr){hn(!0);try{o(r)}finally{hn(!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=BN.bind(null,Fe,i),[u.memoizedState,i]},useRef:function(i){var r=Nn();return i={current:i},r.memoizedState=i},useState:function(i){i=mh(i);var r=i.queue,o=Uy.bind(null,Fe,r);return r.dispatch=o,[i.memoizedState,o]},useDebugValue:yh,useDeferredValue:function(i,r){var o=Nn();return xh(o,i,r)},useTransition:function(){var i=mh(!1);return i=My.bind(null,Fe,i.queue,!0,!1),Nn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,o){var u=Fe,g=Nn();if(tt){if(o===void 0)throw Error(a(407));o=o()}else{if(o=r(),St===null)throw Error(a(349));(Ze&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,Vs(9,{destroy:void 0},cy.bind(null,u,y,o,r),null),o},useId:function(){var i=Nn(),r=St.identifierPrefix;if(tt){var o=Gi,u=Ki;o=(u&~(1<<32-ut(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:Eh,useFormState:xy,useActionState:xy,useOptimistic:function(i){var r=Nn();r.memoizedState=r.baseState=i;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=o,r=Sh.bind(null,Fe,!0,o),o.dispatch=r,[i,r]},useMemoCache:dh,useCacheRefresh:function(){return Nn().memoizedState=UN.bind(null,Fe)},useEffectEvent:function(i){var r=Nn(),o={impl:i};return r.memoizedState=o,function(){if((lt&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},wh={readContext:un,use:xu,useCallback:Oy,useContext:un,useEffect:bh,useImperativeHandle:Ay,useInsertionEffect:_y,useLayoutEffect:Cy,useMemo:Ry,useReducer:vu,useRef:wy,useState:function(){return vu(ma)},useDebugValue:yh,useDeferredValue:function(i,r){var o=Vt();return jy(o,gt.memoizedState,i,r)},useTransition:function(){var i=vu(ma)[0],r=Vt().memoizedState;return[typeof i=="boolean"?i:To(i),r]},useSyncExternalStore:ly,useId:Iy,useHostTransitionStatus:Eh,useFormState:vy,useActionState:vy,useOptimistic:function(i,r){var o=Vt();return hy(o,gt,i,r)},useMemoCache:dh,useCacheRefresh:zy};wh.useEffectEvent=Ny;var Fy={readContext:un,use:xu,useCallback:Oy,useContext:un,useEffect:bh,useImperativeHandle:Ay,useInsertionEffect:_y,useLayoutEffect:Cy,useMemo:Ry,useReducer:ph,useRef:wy,useState:function(){return ph(ma)},useDebugValue:yh,useDeferredValue:function(i,r){var o=Vt();return gt===null?xh(o,i,r):jy(o,gt.memoizedState,i,r)},useTransition:function(){var i=ph(ma)[0],r=Vt().memoizedState;return[typeof i=="boolean"?i:To(i),r]},useSyncExternalStore:ly,useId:Iy,useHostTransitionStatus:Eh,useFormState:Sy,useActionState:Sy,useOptimistic:function(i,r){var o=Vt();return gt!==null?hy(o,gt,i,r):(o.baseState=i,[i,o.queue.dispatch])},useMemoCache:dh,useCacheRefresh:zy};Fy.useEffectEvent=Ny;function kh(i,r,o,u){r=i.memoizedState,o=o(u,r),o=o==null?r:b({},r,o),i.memoizedState=o,i.lanes===0&&(i.updateQueue.baseState=o)}var Nh={enqueueSetState:function(i,r,o){i=i._reactInternals;var u=ii(),g=Ga(u);g.payload=r,o!=null&&(g.callback=o),r=Qa(i,g,u),r!==null&&(Bn(r,i,u),ko(r,i,u))},enqueueReplaceState:function(i,r,o){i=i._reactInternals;var u=ii(),g=Ga(u);g.tag=1,g.payload=r,o!=null&&(g.callback=o),r=Qa(i,g,u),r!==null&&(Bn(r,i,u),ko(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var o=ii(),u=Ga(o);u.tag=2,r!=null&&(u.callback=r),r=Qa(i,u,o),r!==null&&(Bn(r,i,o),ko(r,i,o))}};function qy(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 Hy(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 Yr(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=b({},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 Qy(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 Vy(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=Ga(o),o.tag=3,o.payload={element:null},o.callback=function(){ku(i,r)},o}function Yy(i){return i=Ga(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(){Vy(r,o,u)}}var S=o.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(i.callback=function(){Vy(r,o,u),typeof g!="function"&&(Ja===null?Ja=new Set([this]):Ja.add(this));var _=u.stack;this.componentDidCatch(u.value,{componentStack:_!==null?_:""})})}function $N(i,r,o,u,g){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=o.alternate,r!==null&&$s(r,o,g,!0),o=Jn.current,o!==null){switch(o.tag){case 31:case 13:return yi===null?Iu():o.alternate===null&&Pt===0&&(Pt=3),o.flags&=-257,o.flags|=65536,o.lanes=g,u===fu?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===fu?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(tt)return r=Jn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=g,u!==Kd&&(i=Error(a(422),{cause:u}),xo(pi(i,o)))):(u!==Kd&&(r=Error(a(423),{cause:u}),xo(pi(r,o))),i=i.current.alternate,i.flags|=65536,g&=-g,i.lanes|=g,u=pi(u,o),g=_h(i.stateNode,u,g),nh(i,g),Pt!==4&&(Pt=2)),!1;var y=Error(a(520),{cause:u});if(y=pi(y,o),Uo===null?Uo=[y]:Uo.push(y),Pt!==4&&(Pt=2),r===null)return!0;u=pi(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"&&(Ja===null||!Ja.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)),Jt=!1;function fn(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&&!Jt?(uh(i,r,g),ga(i,r,g)):(tt&&_&&qd(r),r.flags|=1,fn(i,r,u,g),r.child)}function Zy(i,r,o,u,g){if(i===null){var y=o.type;return typeof y=="function"&&!$d(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,!Dh(i,g)){var S=y.memoizedProps;if(o=o.compare,o=o!==null?o:go,o(S,u)&&i.ref===r.ref)return ga(i,r,g)}return r.flags|=1,i=ua(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(Jt=!1,r.pendingProps=u=y,Dh(i,g))(i.flags&131072)!==0&&(Jt=!0);else return r.lanes=i.lanes,ga(i,r,g)}return Th(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),Ya(),r.memoizedState=null):(i!==null&&cu(r,null),ah(),Ya());return fn(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=Zd();return y=y===null?null:{parent:Xt._currentValue,pool:y},r.memoizedState={baseLanes:o,cachePool:y},i!==null&&cu(r,null),ah(),ay(r),i!==null&&$s(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,ei(r),r.memoizedState=null,i}function PN(i,r,o){var u=r.pendingProps,g=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(tt){if(u.mode==="hidden")return i=Nu(r,u),r.lanes=536870912,Ro(null,i);if(sh(r),(i=Tt)?(i=pv(i,bi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Pa!==null?{id:Ki,overflow:Gi}:null,retryLane:536870912,hydrationErrors:null},o=Bb(i),o.return=r,r.child=o,cn=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(Jt||$s(i,r,o,!1),g=(o&i.childLanes)!==0,Jt||g){if(u=St,u!==null&&(S=Ht(u,o),S!==0&&S!==y.retryLane))throw y.retryLane=S,Br(i,S),Bn(u,i,S),Ch;Iu(),r=nx(i,r,o)}else i=y.treeContext,Tt=xi(S.nextSibling),cn=r,tt=!0,Fa=null,bi=!1,i!==null&&Fb(r,i),r=Nu(r,u),r.flags|=4096;return r}return i=ua(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 Th(i,r,o,u,g){return qr(r),o=oh(i,r,o,u,void 0,g),u=ch(),i!==null&&!Jt?(uh(i,r,g),ga(i,r,g)):(tt&&u&&qd(r),r.flags|=1,fn(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&&!Jt?(uh(i,r,y),ga(i,r,y)):(tt&&u&&qd(r),r.flags|=1,fn(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=un(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?un(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=Yr(o,_);y.props=I;var V=y.context,ae=o.contextType;S=Is,typeof ae=="object"&&ae!==null&&(S=un(ae));var ce=o.getDerivedStateFromProps;ae=typeof ce=="function"||typeof y.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,ae||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(_||V!==S)&&Hy(r,y,u,S),Ka=!1;var Y=r.memoizedState;y.state=Y,_o(r,u,y,g),No(),V=r.memoizedState,_||Y!==V||Ka?(typeof ce=="function"&&(kh(r,o,ce,u),V=r.memoizedState),(I=Ka||qy(r,o,I,u,Y,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=Yr(o,S),y.props=ae,ce=r.pendingProps,Y=y.context,V=o.contextType,I=Is,typeof V=="object"&&V!==null&&(I=un(V)),_=o.getDerivedStateFromProps,(V=typeof _=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==ce||Y!==I)&&Hy(r,y,u,I),Ka=!1,Y=r.memoizedState,y.state=Y,_o(r,u,y,g),No();var J=r.memoizedState;S!==ce||Y!==J||Ka||i!==null&&i.dependencies!==null&&lu(i.dependencies)?(typeof _=="function"&&(kh(r,o,_,u),J=r.memoizedState),(ae=Ka||qy(r,o,ae,u,Y,J,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,J,I),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,J,I)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||S===i.memoizedProps&&Y===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&Y===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=J),y.props=u,y.state=J,y.context=I,u=ae):(typeof y.componentDidUpdate!="function"||S===i.memoizedProps&&Y===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&Y===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)):fn(i,r,o,g),r.memoizedState=y.state,i=r.child):i=ga(i,r,g),i}function rx(i,r,o,u){return Pr(),r.flags|=256,fn(i,r,o,u),r.child}var Ah={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oh(i){return{baseLanes:i,cachePool:Vb()}}function Rh(i,r,o){return i=i!==null?i.childLanes&~o:0,r&&(i|=ni),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(tt){if(g?Va(r):Ya(),(i=Tt)?(i=pv(i,bi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Pa!==null?{id:Ki,overflow:Gi}:null,retryLane:536870912,hydrationErrors:null},o=Bb(i),o.return=r,r.child=o,cn=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?(Ya(),g=r.mode,_=Cu({mode:"hidden",children:_},g),u=$r(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=Ah,Ro(null,u)):(Va(r),jh(r,_))}var I=i.memoizedState;if(I!==null&&(_=I.dehydrated,_!==null)){if(y)r.flags&256?(Va(r),r.flags&=-257,r=Mh(i,r,o)):r.memoizedState!==null?(Ya(),r.child=i.child,r.flags|=128,r=null):(Ya(),_=u.fallback,g=r.mode,u=Cu({mode:"visible",children:u.children},g),_=$r(_,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=Ah,r=Ro(null,u));else if(Va(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(Jt||$s(i,r,o,!1),S=(o&i.childLanes)!==0,Jt||S){if(S=St,S!==null&&(u=Ht(S,o),u!==0&&u!==I.retryLane))throw I.retryLane=u,Br(i,u),Bn(S,i,u),Ch;dp(_)||Iu(),r=Mh(i,r,o)}else dp(_)?(r.flags|=192,r.child=i.child,r=null):(i=I.treeContext,Tt=xi(_.nextSibling),cn=r,tt=!0,Fa=null,bi=!1,i!==null&&Fb(r,i),r=jh(r,u.children),r.flags|=4096);return r}return g?(Ya(),_=u.fallback,g=r.mode,I=i.child,V=I.sibling,u=ua(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,V!==null?_=ua(V,_):(_=$r(_,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=Xt._currentValue,g=g.parent!==I?{parent:I,pool:I}:g):g=Vb(),_={baseLanes:_.baseLanes|o,cachePool:g}),u.memoizedState=_,u.childLanes=Rh(i,S,o),r.memoizedState=Ah,Ro(i.child,u)):(Va(r),o=i.child,i=o.sibling,o=ua(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=Zn(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),Vd(i.return,r,o)}function Lh(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,O(Qt,S),fn(i,r,u,o),u=tt?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),Lh(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}Lh(r,!0,o,null,y,u);break;case"together":Lh(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function ga(i,r,o){if(i!==null&&(r.dependencies=i.dependencies),Za|=r.lanes,(o&r.childLanes)===0)if(i!==null){if($s(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=ua(i,i.pendingProps),r.child=o,o.return=r;i.sibling!==null;)i=i.sibling,o=o.sibling=ua(i,i.pendingProps),o.return=r;o.sibling=null}return r.child}function Dh(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&lu(i)))}function FN(i,r,o){switch(r.tag){case 3:se(r,r.stateNode.containerInfo),Ha(r,Xt,i.memoizedState.cache),Pr();break;case 27:case 5:Re(r);break;case 4:se(r,r.stateNode.containerInfo);break;case 10:Ha(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?(Va(r),r.flags|=128,null):(o&r.child.childLanes)!==0?sx(i,r,o):(Va(r),i=ga(i,r,o),i!==null?i.sibling:null);Va(r);break;case 19:var g=(i.flags&128)!==0;if(u=(o&r.childLanes)!==0,u||($s(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),O(Qt,Qt.current),u)break;return null;case 22:return r.lanes=0,ex(i,r,o,r.pendingProps);case 24:Ha(r,Xt,i.memoizedState.cache)}return ga(i,r,o)}function cx(i,r,o){if(i!==null)if(i.memoizedProps!==r.pendingProps)Jt=!0;else{if(!Dh(i,o)&&(r.flags&128)===0)return Jt=!1,FN(i,r,o);Jt=(i.flags&131072)!==0}else Jt=!1,tt&&(r.flags&1048576)!==0&&Pb(r,yo,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(i=Kr(r.elementType),r.type=i,typeof i=="function")$d(i)?(u=Yr(i,u),r.tag=1,r=ax(null,r,i,u,o)):(r.tag=0,r=Th(null,r,i,u,o));else{if(i!=null){var g=i.$$typeof;if(g===R){r.tag=11,r=Xy(null,r,i,u,o);break e}else if(g===$){r.tag=14,r=Zy(null,r,i,u,o);break e}}throw r=ue(i)||i,Error(a(306,r,""))}}return r;case 0:return Th(i,r,r.type,r.pendingProps,o);case 1:return u=r.type,g=Yr(u,r.pendingProps),ax(i,r,u,g,o);case 3:e:{if(se(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,Ha(r,Xt,u),u!==y.cache&&Yd(r,[Xt],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=pi(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=xi(i.firstChild),cn=r,tt=!0,Fa=null,bi=!0,o=ey(r,null,u,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Pr(),u===g){r=ga(i,r,o);break e}fn(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:tt||(o=r.type,i=r.pendingProps,u=qu(fe.current).createElement(o),u[Kt]=r,u[pn]=i,dn(u,o,i),Yt(u),r.stateNode=u):r.memoizedState=vv(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Re(r),i===null&&tt&&(u=r.stateNode=bv(r.type,r.pendingProps,fe.current),cn=r,bi=!0,g=Tt,ir(r.type)?(pp=g,Tt=xi(u.firstChild)):Tt=g),fn(i,r,r.pendingProps.children,o),_u(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&tt&&((g=u=Tt)&&(u=y_(u,r.type,r.pendingProps,bi),u!==null?(r.stateNode=u,cn=r,Tt=xi(u.firstChild),bi=!1,g=!0):g=!1),g||qa(r)),Re(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),fn(i,r,u,o),r.child;case 6:return i===null&&tt&&((i=o=Tt)&&(o=x_(o,r.pendingProps,bi),o!==null?(r.stateNode=o,cn=r,Tt=null,i=!0):i=!1),i||qa(r)),null;case 13:return sx(i,r,o);case 4:return se(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=Qr(r,null,u,o):fn(i,r,u,o),r.child;case 11:return Xy(i,r,r.type,r.pendingProps,o);case 7:return fn(i,r,r.pendingProps,o),r.child;case 8:return fn(i,r,r.pendingProps.children,o),r.child;case 12:return fn(i,r,r.pendingProps.children,o),r.child;case 10:return u=r.pendingProps,Ha(r,r.type,u.value),fn(i,r,u.children,o),r.child;case 9:return g=r.type._context,u=r.pendingProps.children,qr(r),g=un(g),u=u(g),r.flags|=1,fn(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 PN(i,r,o);case 22:return ex(i,r,o,r.pendingProps);case 24:return qr(r),u=un(Xt),i===null?(g=Zd(),g===null&&(g=St,y=Wd(),g.pooledCache=y,y.refCount++,y!==null&&(g.pooledCacheLanes|=o),g=y),r.memoizedState={parent:u,cache:g},eh(r),Ha(r,Xt,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),Ha(r,Xt,u)):(u=y.cache,Ha(r,Xt,u),u!==g.cache&&Yd(r,[Xt],o,!0))),fn(i,r,r.pendingProps.children,o),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ba(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 Gr=fu,Jd}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 Gr=fu,Jd}function Tu(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(!tt)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 At(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 qN(i,r,o){var u=r.pendingProps;switch(Hd(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(r),null;case 1:return At(r),null;case 3:return o=r.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),ha(Xt),de(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(i===null||i.child===null)&&(Bs(r)?ba(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Gd())),At(r),null;case 26:var g=r.type,y=r.memoizedState;return i===null?(ba(r),y!==null?(At(r),ux(r,y)):(At(r),Ih(r,g,null,u,o))):y?y!==i.memoizedState?(ba(r),At(r),ux(r,y)):(At(r),r.flags&=-16777217):(i=i.memoizedProps,i!==u&&ba(r),At(r),Ih(r,g,i,u,o)),null;case 27:if(mt(r),o=fe.current,g=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ba(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return At(r),null}i=ye.current,Bs(r)?qb(r):(i=bv(g,u,o),r.stateNode=i,ba(r))}return At(r),null;case 5:if(mt(r),g=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ba(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return At(r),null}if(y=ye.current,Bs(r))qb(r);else{var S=qu(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[Kt]=r,y[pn]=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(dn(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&&ba(r)}}return At(r),Ih(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,o),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==u&&ba(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(i=fe.current,Bs(r)){if(i=r.stateNode,o=r.memoizedProps,u=null,g=cn,g!==null)switch(g.tag){case 27:case 5:u=g.memoizedProps}i[Kt]=r,i=!!(i.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||sv(i.nodeValue,o)),i||qa(r,!0)}else i=qu(i).createTextNode(u),i[Kt]=r,r.stateNode=i}return At(r),null;case 31:if(o=r.memoizedState,i===null||i.memoizedState!==null){if(u=Bs(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[Kt]=r}else Pr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;At(r),i=!1}else o=Gd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=o),i=!0;if(!i)return r.flags&256?(ei(r),r):(ei(r),null);if((r.flags&128)!==0)throw Error(a(558))}return At(r),null;case 13:if(u=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(g=Bs(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[Kt]=r}else Pr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;At(r),g=!1}else g=Gd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=g),g=!0;if(!g)return r.flags&256?(ei(r),r):(ei(r),null)}return ei(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),Tu(r,r.updateQueue),At(r),null);case 4:return de(),i===null&&ap(r.stateNode.containerInfo),At(r),null;case 10:return ha(r.type),At(r),null;case 19:if(X(Qt),u=r.memoizedState,u===null)return At(r),null;if(g=(r.flags&128)!==0,y=u.rendering,y===null)if(g)jo(u,!1);else{if(Pt!==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,Tu(r,i),r.subtreeFlags=0,i=o,o=r.child;o!==null;)Ub(o,i),o=o.sibling;return O(Qt,Qt.current&1|2),tt&&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,Tu(r,i),jo(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!tt)return At(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,O(Qt,g?o&1|2:o&1),tt&&fa(r,u.treeForkCount),i):(At(r),null);case 22:case 23:return ei(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&&(At(r),r.subtreeFlags&6&&(r.flags|=8192)):At(r),o=r.updateQueue,o!==null&&Tu(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&&X(Hr),null;case 24:return o=null,i!==null&&(o=i.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),ha(Xt),At(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function HN(i,r){switch(Hd(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return ha(Xt),de(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return mt(r),null;case 31:if(r.memoizedState!==null){if(ei(r),r.alternate===null)throw Error(a(340));Pr()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(ei(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Pr()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return X(Qt),null;case 4:return de(),null;case 10:return ha(r.type),null;case 22:case 23:return ei(r),rh(),i!==null&&X(Hr),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return ha(Xt),null;case 25:return null;default:return null}}function fx(i,r){switch(Hd(r),r.tag){case 3:ha(Xt),de();break;case 26:case 27:case 5:mt(r);break;case 4:de();break;case 31:r.memoizedState!==null&&ei(r);break;case 13:ei(r);break;case 19:X(Qt);break;case 10:ha(r.type);break;case 22:case 23:ei(r),rh(),i!==null&&X(Hr);break;case 24:ha(Xt)}}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(_){pt(r,r.return,_)}}function Wa(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){pt(g,I,ae)}}}u=u.next}while(u!==y)}}catch(ae){pt(r,r.return,ae)}}function dx(i){var r=i.updateQueue;if(r!==null){var o=i.stateNode;try{ny(r,o)}catch(u){pt(i,i.return,u)}}}function hx(i,r,o){o.props=Yr(i.type,i.memoizedProps),o.state=i.memoizedState;try{o.componentWillUnmount()}catch(u){pt(i,r,u)}}function Lo(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){pt(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){pt(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){pt(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){pt(i,i.return,g)}}function zh(i,r,o){try{var u=i.stateNode;d_(u,i.type,o,r),u[pn]=r}catch(g){pt(i,i.return,g)}}function mx(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ir(i.type)||i.tag===4}function Uh(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&&ir(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 Bh(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&&ir(i.type)&&(o=i.stateNode,r=null),i=i.child,i!==null))for(Bh(i,r,o),i=i.sibling;i!==null;)Bh(i,r,o),i=i.sibling}function Au(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&&ir(i.type)&&(o=i.stateNode),i=i.child,i!==null))for(Au(i,r,o),i=i.sibling;i!==null;)Au(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]);dn(r,u,o),r[Kt]=i,r[pn]=o}catch(y){pt(i,i.return,y)}}var ya=!1,en=!1,$h=!1,bx=typeof WeakSet=="function"?WeakSet:Set,rn=null;function KN(i,r){if(i=i.containerInfo,lp=Wu,i=Ab(i),Md(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,ce=i,Y=null;t:for(;;){for(var J;ce!==o||g!==0&&ce.nodeType!==3||(_=S+g),ce!==y||u!==0&&ce.nodeType!==3||(I=S+u),ce.nodeType===3&&(S+=ce.nodeValue.length),(J=ce.firstChild)!==null;)Y=ce,ce=J;for(;;){if(ce===i)break t;if(Y===o&&++V===g&&(_=S),Y===y&&++ae===u&&(I=S),(J=ce.nextSibling)!==null)break;ce=Y,Y=ce.parentNode}ce=J}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,rn=r;rn!==null;)if(r=rn,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,rn=i;else for(;rn!==null;){switch(r=rn,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 we=Yr(o.type,g);i=u.getSnapshotBeforeUpdate(we,y),u.__reactInternalSnapshotBeforeUpdate=i}catch(Le){pt(o,o.return,Le)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,o=i.nodeType,o===9)fp(i);else if(o===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":fp(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,rn=i;break}rn=r.return}}function yx(i,r,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:va(i,o),u&4&&Mo(5,o);break;case 1:if(va(i,o),u&4)if(i=o.stateNode,r===null)try{i.componentDidMount()}catch(S){pt(o,o.return,S)}else{var g=Yr(o.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(g,r,i.__reactInternalSnapshotBeforeUpdate)}catch(S){pt(o,o.return,S)}}u&64&&dx(o),u&512&&Lo(o,o.return);break;case 3:if(va(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){pt(o,o.return,S)}}break;case 27:r===null&&u&4&&gx(o);case 26:case 5:va(i,o),r===null&&u&4&&px(o),u&512&&Lo(o,o.return);break;case 12:va(i,o);break;case 31:va(i,o),u&4&&Ex(i,o);break;case 13:va(i,o),u&4&&Sx(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||ya,!u){r=r!==null&&r.memoizedState!==null||en,g=ya;var y=en;ya=u,(en=r)&&!y?Ea(i,o,(o.subtreeFlags&8772)!==0):va(i,o),ya=g,en=y}break;case 30:break;default:va(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 Rt=null,Dn=!1;function xa(i,r,o){for(o=o.child;o!==null;)vx(i,r,o),o=o.sibling}function vx(i,r,o){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(ln,o)}catch{}switch(o.tag){case 26:en||Qi(o,r),xa(i,r,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:en||Qi(o,r);var u=Rt,g=Dn;ir(o.type)&&(Rt=o.stateNode,Dn=!1),xa(i,r,o),qo(o.stateNode),Rt=u,Dn=g;break;case 5:en||Qi(o,r);case 6:if(u=Rt,g=Dn,Rt=null,xa(i,r,o),Rt=u,Dn=g,Rt!==null)if(Dn)try{(Rt.nodeType===9?Rt.body:Rt.nodeName==="HTML"?Rt.ownerDocument.body:Rt).removeChild(o.stateNode)}catch(y){pt(o,r,y)}else try{Rt.removeChild(o.stateNode)}catch(y){pt(o,r,y)}break;case 18:Rt!==null&&(Dn?(i=Rt,dv(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,o.stateNode),sl(i)):dv(Rt,o.stateNode));break;case 4:u=Rt,g=Dn,Rt=o.stateNode.containerInfo,Dn=!0,xa(i,r,o),Rt=u,Dn=g;break;case 0:case 11:case 14:case 15:Wa(2,o,r),en||Wa(4,o,r),xa(i,r,o);break;case 1:en||(Qi(o,r),u=o.stateNode,typeof u.componentWillUnmount=="function"&&hx(o,r,u)),xa(i,r,o);break;case 21:xa(i,r,o);break;case 22:en=(u=en)||o.memoizedState!==null,xa(i,r,o),en=u;break;default:xa(i,r,o)}}function Ex(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{sl(i)}catch(o){pt(r,r.return,o)}}}function Sx(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){pt(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 In(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(ir(_.type)){Rt=_.stateNode,Dn=!1;break e}break;case 5:Rt=_.stateNode,Dn=!1;break e;case 3:case 4:Rt=_.stateNode.containerInfo,Dn=!0;break e}_=_.return}if(Rt===null)throw Error(a(160));vx(y,S,g),Rt=null,Dn=!1,y=g.alternate,y!==null&&(y.return=null),g.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)wx(r,i),r=r.sibling}var ji=null;function wx(i,r){var o=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:In(r,i),zn(i),u&4&&(Wa(3,i,i.return),Mo(3,i),Wa(5,i,i.return));break;case 1:In(r,i),zn(i),u&512&&(en||o===null||Qi(o,o.return)),u&64&&ya&&(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=ji;if(In(r,i),zn(i),u&512&&(en||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[Mr]||y[Kt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=g.createElement(u),g.head.insertBefore(y,g.querySelector("head > title"))),dn(y,u,o),y[Kt]=i,Yt(y),u=y;break e;case"link":var S=wv("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),dn(y,u,o),g.head.appendChild(y);break;case"meta":if(S=wv("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),dn(y,u,o),g.head.appendChild(y);break;default:throw Error(a(468,u))}y[Kt]=i,Yt(y),u=y}i.stateNode=u}else kv(g,i.type,i.stateNode);else i.stateNode=Sv(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):Sv(g,u,i.memoizedProps)):u===null&&i.stateNode!==null&&zh(i,i.memoizedProps,o.memoizedProps)}break;case 27:In(r,i),zn(i),u&512&&(en||o===null||Qi(o,o.return)),o!==null&&u&4&&zh(i,i.memoizedProps,o.memoizedProps);break;case 5:if(In(r,i),zn(i),u&512&&(en||o===null||Qi(o,o.return)),i.flags&32){g=i.stateNode;try{De(g,"")}catch(we){pt(i,i.return,we)}}u&4&&i.stateNode!=null&&(g=i.memoizedProps,zh(i,g,o!==null?o.memoizedProps:g)),u&1024&&($h=!0);break;case 6:if(In(r,i),zn(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,o=i.stateNode;try{o.nodeValue=u}catch(we){pt(i,i.return,we)}}break;case 3:if(Gu=null,g=ji,ji=Hu(r.containerInfo),In(r,i),ji=g,zn(i),u&4&&o!==null&&o.memoizedState.isDehydrated)try{sl(r.containerInfo)}catch(we){pt(i,i.return,we)}$h&&($h=!1,kx(i));break;case 4:u=ji,ji=Hu(i.stateNode.containerInfo),In(r,i),zn(i),ji=u;break;case 12:In(r,i),zn(i);break;case 31:In(r,i),zn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,Ou(i,u)));break;case 13:In(r,i),zn(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=ya,ae=en;if(ya=V||g,en=ae||I,In(r,i),en=ae,ya=V,zn(i),u&8192)e:for(r=i.stateNode,r._visibility=g?r._visibility&-2:r._visibility|1,g&&(o===null||I||ya||en||Wr(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 ce=I.memoizedProps.style,Y=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;_.style.display=Y==null||typeof Y=="boolean"?"":(""+Y).trim()}}catch(we){pt(I,I.return,we)}}}else if(r.tag===6){if(o===null){I=r;try{I.stateNode.nodeValue=g?"":I.memoizedProps}catch(we){pt(I,I.return,we)}}}else if(r.tag===18){if(o===null){I=r;try{var J=I.stateNode;g?hv(J,!0):hv(I.stateNode,!1)}catch(we){pt(I,I.return,we)}}}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:In(r,i),zn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,Ou(i,u)));break;case 30:break;case 21:break;default:In(r,i),zn(i)}}function zn(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=Uh(i);Au(i,y,g);break;case 5:var S=o.stateNode;o.flags&32&&(De(S,""),o.flags&=-33);var _=Uh(i);Au(i,_,S);break;case 3:case 4:var I=o.stateNode.containerInfo,V=Uh(i);Bh(i,V,I);break;default:throw Error(a(161))}}catch(ae){pt(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 va(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)yx(i,r.alternate,r),r=r.sibling}function Wr(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:Wa(4,r,r.return),Wr(r);break;case 1:Qi(r,r.return);var o=r.stateNode;typeof o.componentWillUnmount=="function"&&hx(r,r.return,o),Wr(r);break;case 27:qo(r.stateNode);case 26:case 5:Qi(r,r.return),Wr(r);break;case 22:r.memoizedState===null&&Wr(r);break;case 30:Wr(r);break;default:Wr(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){pt(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){pt(u,u.return,V)}}o&&S&64&&dx(y),Lo(y,y.return);break;case 27:gx(y);case 26:case 5:Ea(g,y,o),o&&u===null&&S&4&&px(y),Lo(y,y.return);break;case 12:Ea(g,y,o);break;case 31:Ea(g,y,o),o&&S&4&&Ex(g,y);break;case 13:Ea(g,y,o),o&&S&4&&Sx(g,y);break;case 22:y.memoizedState===null&&Ea(g,y,o),Lo(y,y.return);break;case 30:break;default:Ea(g,y,o)}r=r.sibling}}function Ph(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 Fh(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 Mi(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:Mi(i,r,o,u),g&2048&&Mo(9,r);break;case 1:Mi(i,r,o,u);break;case 3:Mi(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){Mi(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){pt(r,r.return,I)}}else Mi(i,r,o,u);break;case 31:Mi(i,r,o,u);break;case 13:Mi(i,r,o,u);break;case 23:break;case 22:y=r.stateNode,S=r.alternate,r.memoizedState!==null?y._visibility&2?Mi(i,r,o,u):Do(i,r):y._visibility&2?Mi(i,r,o,u):(y._visibility|=2,Ys(i,r,o,u,(r.subtreeFlags&10256)!==0||!1)),g&2048&&Ph(S,r);break;case 24:Mi(i,r,o,u),g&2048&&Fh(r.alternate,r);break;default:Mi(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):Do(y,S):(ae._visibility|=2,Ys(y,S,_,I,g)),g&&V&2048&&Ph(S.alternate,S);break;case 24:Ys(y,S,_,I,g),g&&V&2048&&Fh(S.alternate,S);break;default:Ys(y,S,_,I,g)}r=r.sibling}}function Do(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:Do(o,u),g&2048&&Ph(u.alternate,u);break;case 24:Do(o,u),g&2048&&Fh(u.alternate,u);break;default:Do(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,ji,i.memoizedState,i.memoizedProps);break;case 5:Ws(i,r,o);break;case 3:case 4:var u=ji;ji=Hu(i.stateNode.containerInfo),Ws(i,r,o),ji=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];rn=u,Ax(u,i)}Cx(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Tx(i),i=i.sibling}function Tx(i){switch(i.tag){case 0:case 11:case 15:zo(i),i.flags&2048&&Wa(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];rn=u,Ax(u,i)}Cx(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Wa(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 Ax(i,r){for(;rn!==null;){var o=rn;switch(o.tag){case 0:case 11:case 15:Wa(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,rn=u;else e:for(o=i;rn!==null;){u=rn;var g=u.sibling,y=u.return;if(xx(u),u===o){rn=null;break e}if(g!==null){g.return=y,rn=g;break e}rn=y}}}var QN={getCacheForType:function(i){var r=un(Xt),o=r.data.get(i);return o===void 0&&(o=i(),r.data.set(i,o)),o},cacheSignal:function(){return un(Xt).controller.signal}},VN=typeof WeakMap=="function"?WeakMap:Map,lt=0,St=null,Ve=null,Ze=0,ht=0,ti=null,Xa=!1,Xs=!1,qh=!1,Sa=0,Pt=0,Za=0,Xr=0,Hh=0,ni=0,Zs=0,Uo=null,Un=null,Kh=!1,ju=0,Ox=0,Mu=1/0,Lu=null,Ja=null,nn=0,er=null,Js=null,wa=0,Gh=0,Qh=null,Rx=null,Bo=0,Vh=null;function ii(){return(lt&2)!==0&&Ze!==0?Ze&-Ze:F.T!==null?ep():Ns()}function jx(){if(ni===0)if((Ze&536870912)===0||tt){var i=ks;ks<<=1,(ks&3932160)===0&&(ks=262144),ni=i}else ni=536870912;return i=Jn.current,i!==null&&(i.flags|=32),ni}function Bn(i,r,o){(i===St&&(ht===2||ht===9)||i.cancelPendingCommit!==null)&&(el(i,0),tr(i,Ze,ni,!1)),Et(i,o),((lt&2)===0||i!==St)&&(i===St&&((lt&2)===0&&(Xr|=o),Pt===4&&tr(i,Ze,ni,!1)),Vi(i))}function Mx(i,r,o){if((lt&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&&tr(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=Uo;var I=_.current.memoizedState.isDehydrated;if(I&&(el(_,S).flags|=256),S=Wh(_,S,!1),S!==2){if(qh&&!I){_.errorRecoveryDisabledLanes|=y,Xr|=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),tr(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:tr(u,r,ni,!Xa);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(tr(u,r,ni,!Xa),U(u,0,!0)!==0)break e;wa=r,u.timeoutHandle=uv(Lx.bind(null,u,o,Un,Lu,Kh,r,ni,Xr,Zs,Xa,y,"Throttled",-0,0),g);break e}Lx(u,o,Un,Lu,Kh,r,ni,Xr,Zs,Xa,y,null,-0,0)}}break}while(!0);Vi(i)}function Lx(i,r,o,u,g,y,S,_,I,V,ae,ce,Y,J){if(i.timeoutHandle=-1,ce=r.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xe},_x(r,y,ce);var we=(y&62914560)===y?ju-Lt():(y&4194048)===y?Ox-Lt():0;if(we=M_(ce,we),we!==null){wa=y,i.cancelPendingCommit=we(Fx.bind(null,i,r,y,o,u,g,S,_,I,ae,ce,null,Y,J)),tr(i,y,S,!V);return}}Fx(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(!Xn(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 tr(i,r,o,u){r&=~Hh,r&=~Xr,i.suspendedLanes|=r,i.pingedLanes&=~r,u&&(i.warmLanes|=r),u=i.expirationTimes;for(var g=r;0<g;){var y=31-ut(g),S=1<<y;u[y]=-1,g&=~S}o!==0&&Se(i,o,r)}function Du(){return(lt&6)===0?($o(0),!1):!0}function Yh(){if(Ve!==null){if(ht===0)var i=Ve.return;else i=Ve,da=Fr=null,fh(i),Hs=null,So=0,i=Ve;for(;i!==null;)fx(i.alternate,i),i=i.return;Ve=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()),wa=0,Yh(),St=i,Ve=o=ua(i.current,null),Ze=r,ht=0,ti=null,Xa=!1,Xs=re(i,r),qh=!1,Zs=ni=Hh=Xr=Za=Pt=0,Un=Uo=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-ut(u),y=1<<g;r|=i[g],u&=~y}return Sa=r,nu(),o}function Dx(i,r){Fe=null,F.H=Oo,r===qs||r===uu?(r=Xb(),ht=3):r===Jd?(r=Xb(),ht=4):ht=r===Ch?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ti=r,Ve===null&&(Pt=1,ku(i,pi(r,i.current)))}function Ix(){var i=Jn.current;return i===null?!0:(Ze&4194048)===Ze?yi===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?i===yi:!1}function zx(){var i=F.H;return F.H=Oo,i===null?Oo:i}function Ux(){var i=F.A;return F.A=QN,i}function Iu(){Pt=4,Xa||(Ze&4194048)!==Ze&&Jn.current!==null||(Xs=!0),(Za&134217727)===0&&(Xr&134217727)===0||St===null||tr(St,Ze,ni,!1)}function Wh(i,r,o){var u=lt;lt|=2;var g=zx(),y=Ux();(St!==i||Ze!==r)&&(Lu=null,el(i,r)),r=!1;var S=Pt;e:do try{if(ht!==0&&Ve!==null){var _=Ve,I=ti;switch(ht){case 8:Yh(),S=6;break e;case 3:case 2:case 9:case 6:Jn.current===null&&(r=!0);var V=ht;if(ht=0,ti=null,tl(i,_,I,V),o&&Xs){S=0;break e}break;default:V=ht,ht=0,ti=null,tl(i,_,I,V)}}WN(),S=Pt;break}catch(ae){Dx(i,ae)}while(!0);return r&&i.shellSuspendCounter++,da=Fr=null,lt=u,F.H=g,F.A=y,Ve===null&&(St=null,Ze=0,nu()),S}function WN(){for(;Ve!==null;)Bx(Ve)}function XN(i,r){var o=lt;lt|=2;var u=zx(),g=Ux();St!==i||Ze!==r?(Lu=null,Mu=Lt()+500,el(i,r)):Xs=re(i,r);e:do try{if(ht!==0&&Ve!==null){r=Ve;var y=ti;t:switch(ht){case 1:ht=0,ti=null,tl(i,r,y,1);break;case 2:case 9:if(Yb(y)){ht=0,ti=null,$x(r);break}r=function(){ht!==2&&ht!==9||St!==i||(ht=7),Vi(i)},y.then(r,r);break e;case 3:ht=7;break e;case 4:ht=5;break e;case 7:Yb(y)?(ht=0,ti=null,$x(r)):(ht=0,ti=null,tl(i,r,y,7));break;case 5:var S=null;switch(Ve.tag){case 26:S=Ve.memoizedState;case 5:case 27:var _=Ve;if(S?Nv(S):_.stateNode.complete){ht=0,ti=null;var I=_.sibling;if(I!==null)Ve=I;else{var V=_.return;V!==null?(Ve=V,zu(V)):Ve=null}break t}}ht=0,ti=null,tl(i,r,y,5);break;case 6:ht=0,ti=null,tl(i,r,y,6);break;case 8:Yh(),Pt=6;break e;default:throw Error(a(462))}}ZN();break}catch(ae){Dx(i,ae)}while(!0);return da=Fr=null,F.H=u,F.A=g,lt=o,Ve!==null?0:(St=null,Ze=0,nu(),Pt)}function ZN(){for(;Ve!==null&&!to();)Bx(Ve)}function Bx(i){var r=cx(i.alternate,i,Sa);i.memoizedProps=i.pendingProps,r===null?zu(i):Ve=r}function $x(i){var r=i,o=r.alternate;switch(r.tag){case 15:case 0:r=ix(o,r,r.pendingProps,r.type,void 0,Ze);break;case 11:r=ix(o,r,r.pendingProps,r.type.render,r.ref,Ze);break;case 5:fh(r);default:fx(o,r),r=Ve=Ub(r,Sa),r=cx(o,r,Sa)}i.memoizedProps=i.pendingProps,r===null?zu(i):Ve=r}function tl(i,r,o,u){da=Fr=null,fh(r),Hs=null,So=0;var g=r.return;try{if($N(i,g,r,o,Ze)){Pt=1,ku(i,pi(o,i.current)),Ve=null;return}}catch(y){if(g!==null)throw Ve=g,y;Pt=1,ku(i,pi(o,i.current)),Ve=null;return}r.flags&32768?(tt||u===1?i=!0:Xs||(Ze&536870912)!==0?i=!1:(Xa=i=!0,(u===2||u===9||u===3||u===6)&&(u=Jn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Px(r,i)):zu(r)}function zu(i){var r=i;do{if((r.flags&32768)!==0){Px(r,Xa);return}i=r.return;var o=qN(r.alternate,r,Sa);if(o!==null){Ve=o;return}if(r=r.sibling,r!==null){Ve=r;return}Ve=r=i}while(r!==null);Pt===0&&(Pt=5)}function Px(i,r){do{var o=HN(i.alternate,i);if(o!==null){o.flags&=32767,Ve=o;return}if(o=i.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!r&&(i=i.sibling,i!==null)){Ve=i;return}Ve=i=o}while(i!==null);Pt=6,Ve=null}function Fx(i,r,o,u,g,y,S,_,I){i.cancelPendingCommit=null;do Uu();while(nn!==0);if((lt&6)!==0)throw Error(a(327));if(r!==null){if(r===i.current)throw Error(a(177));if(y=r.lanes|r.childLanes,y|=Ud,ke(i,o,y,S,_,I),i===St&&(Ve=St=null,Ze=0),Js=r,er=i,wa=o,Gh=y,Qh=g,Rx=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,n_(Me,function(){return Qx(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=F.T,F.T=null,g=oe.p,oe.p=2,S=lt,lt|=4;try{KN(i,r,o)}finally{lt=S,oe.p=g,F.T=u}}nn=1,qx(),Hx(),Kx()}}function qx(){if(nn===1){nn=0;var i=er,r=Js,o=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||o){o=F.T,F.T=null;var u=oe.p;oe.p=2;var g=lt;lt|=4;try{wx(r,i);var y=op,S=Ab(i.containerInfo),_=y.focusedElem,I=y.selectionRange;if(S!==_&&_&&_.ownerDocument&&Tb(_.ownerDocument.documentElement,_)){if(I!==null&&Md(_)){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 ce=_.ownerDocument||document,Y=ce&&ce.defaultView||window;if(Y.getSelection){var J=Y.getSelection(),we=_.textContent.length,Le=Math.min(I.start,we),yt=I.end===void 0?Le:Math.min(I.end,we);!J.extend&&Le>yt&&(S=yt,yt=Le,Le=S);var H=Cb(_,Le),P=Cb(_,yt);if(H&&P&&(J.rangeCount!==1||J.anchorNode!==H.node||J.anchorOffset!==H.offset||J.focusNode!==P.node||J.focusOffset!==P.offset)){var Q=ce.createRange();Q.setStart(H.node,H.offset),J.removeAllRanges(),Le>yt?(J.addRange(Q),J.extend(P.node,P.offset)):(Q.setEnd(P.node,P.offset),J.addRange(Q))}}}}for(ce=[],J=_;J=J.parentNode;)J.nodeType===1&&ce.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ce.length;_++){var le=ce[_];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Wu=!!lp,op=lp=null}finally{lt=g,oe.p=u,F.T=o}}i.current=r,nn=2}}function Hx(){if(nn===2){nn=0;var i=er,r=Js,o=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||o){o=F.T,F.T=null;var u=oe.p;oe.p=2;var g=lt;lt|=4;try{yx(i,r.alternate,r)}finally{lt=g,oe.p=u,F.T=o}}nn=3}}function Kx(){if(nn===4||nn===3){nn=0,Ss();var i=er,r=Js,o=wa,u=Rx;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?nn=5:(nn=0,Js=er=null,Gx(i,i.pendingLanes));var g=i.pendingLanes;if(g===0&&(Ja=null),ra(o),r=r.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(ln,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=F.T,g=oe.p,oe.p=2,F.T=null;try{for(var y=i.onRecoverableError,S=0;S<u.length;S++){var _=u[S];y(_.value,{componentStack:_.stack})}}finally{F.T=r,oe.p=g}}(wa&3)!==0&&Uu(),Vi(i),g=i.pendingLanes,(o&261930)!==0&&(g&42)!==0?i===Vh?Bo++:(Bo=0,Vh=i):Bo=0,$o(0)}}function Gx(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,vo(r)))}function Uu(){return qx(),Hx(),Kx(),Qx()}function Qx(){if(nn!==5)return!1;var i=er,r=Gh;Gh=0;var o=ra(wa),u=F.T,g=oe.p;try{oe.p=32>o?32:o,F.T=null,o=Qh,Qh=null;var y=er,S=wa;if(nn=0,Js=er=null,wa=0,(lt&6)!==0)throw Error(a(331));var _=lt;if(lt|=4,Tx(y.current),Nx(y,y.current,S,o),lt=_,$o(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(ln,y)}catch{}return!0}finally{oe.p=g,F.T=u,Gx(i,r)}}function Vx(i,r,o){r=pi(o,r),r=_h(i.stateNode,r,2),i=Qa(i,r,2),i!==null&&(Et(i,2),Vi(i))}function pt(i,r,o){if(i.tag===3)Vx(i,i,o);else for(;r!==null;){if(r.tag===3){Vx(r,i,o);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ja===null||!Ja.has(u))){i=pi(o,i),o=Yy(2),u=Qa(r,o,2),u!==null&&(Wy(o,u,r,i),Et(u,2),Vi(u));break}}r=r.return}}function Xh(i,r,o){var u=i.pingCache;if(u===null){u=i.pingCache=new VN;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)||(qh=!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&&(Ze&o)===o&&(Pt===4||Pt===3&&(Ze&62914560)===Ze&&300>Lt()-ju?(lt&2)===0&&el(i,0):Hh|=o,Zs===Ze&&(Zs=0)),Vi(i)}function Yx(i,r){r===0&&(r=ze()),i=Br(i,r),i!==null&&(Et(i,r),Vi(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 aa(i,r)}var Bu=null,nl=null,Zh=!1,$u=!1,Jh=!1,nr=0;function Vi(i){i!==nl&&i.next===null&&(nl===null?Bu=nl=i:nl=nl.next=i),$u=!0,Zh||(Zh=!0,a_())}function $o(i,r){if(!Jh&&$u){Jh=!0;do for(var o=!1,u=Bu;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-ut(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=Ze,y=U(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(){$u=Zh=!1;var i=0;nr!==0&&p_()&&(i=nr);for(var r=Lt(),o=null,u=Bu;u!==null;){var g=u.next,y=Xx(u,r);y===0?(u.next=null,o===null?Bu=g:o.next=g,g===null&&(nl=o)):(o=u,(i!==0||(y&3)!==0)&&($u=!0)),u=g}nn!==0&&nn!==5||$o(i),nr!==0&&(nr=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-ut(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=Ze,o=U(i,i===r?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,o===0||i===r&&(ht===2||ht===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&Or(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&&Or(u),ra(o)){case 2:case 8:o=ge;break;case 32:o=Me;break;case 268435456:o=at;break;default:o=Me}return u=Zx.bind(null,i),o=aa(o,u),i.callbackPriority=r,i.callbackNode=o,r}return u!==null&&u!==null&&Or(u),i.callbackPriority=2,i.callbackNode=null,2}function Zx(i,r){if(nn!==0&&nn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var o=i.callbackNode;if(Uu()&&i.callbackNode!==o)return null;var u=Ze;return u=U(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(Uu())return null;Mx(i,r,!0)}function a_(){g_(function(){(lt&6)!==0?aa(ne,i_):Wx()})}function ep(){if(nr===0){var i=Ps;i===0&&(i=Rr,Rr<<=1,(Rr&261888)===0&&(Rr=256)),nr=i}return nr}function ev(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ba(""+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[pn]||null).action),S=u.submitter;S&&(r=(r=S[pn]||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(nr!==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<zd.length;tp++){var np=zd[tp],s_=np.toLowerCase(),l_=np[0].toUpperCase()+np.slice(1);Ri(s_,"on"+l_)}Ri(jb,"onAnimationEnd"),Ri(Mb,"onAnimationIteration"),Ri(Lb,"onAnimationStart"),Ri("dblclick","onDoubleClick"),Ri("focusin","onFocus"),Ri("focusout","onBlur"),Ri(wN,"onTransitionRun"),Ri(kN,"onTransitionStart"),Ri(NN,"onTransitionCancel"),Ri(Db,"onTransitionEnd"),he("onMouseEnter",["mouseout","mouseover"]),he("onMouseLeave",["mouseout","mouseover"]),he("onPointerEnter",["pointerout","pointerover"]),he("onPointerLeave",["pointerout","pointerover"]),la("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),la("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),la("onBeforeInput",["compositionend","keypress","textInput","paste"]),la("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),la("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),la("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Po="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(Po));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 Ye(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 Pu="_reactListening"+Math.random().toString(36).slice(2);function ap(i){if(!i[Pu]){i[Pu]=!0,Hc.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[Pu]||(r[Pu]=!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,!kd||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=kn(_),S===null)return;if(I=S.tag,I===5||I===6||I===26||I===27){u=y=S;continue e}_=_.parentNode}}u=u.return}Vc(function(){var V=y,ae=Pe(o),ce=[];e:{var Y=Ib.get(i);if(Y!==void 0){var J=Zc,we=i;switch(i){case"keypress":if(Wc(o)===0)break e;case"keydown":case"keyup":J=tN;break;case"focusin":we="focus",J=Td;break;case"focusout":we="blur",J=Td;break;case"beforeblur":case"afterblur":J=Td;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":J=fb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=qk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=aN;break;case jb:case Mb:case Lb:J=Gk;break;case Db:J=sN;break;case"scroll":case"scrollend":J=Pk;break;case"wheel":J=oN;break;case"copy":case"cut":case"paste":J=Vk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=hb;break;case"toggle":case"beforetoggle":J=uN}var Le=(r&4)!==0,yt=!Le&&(i==="scroll"||i==="scrollend"),H=Le?Y!==null?Y+"Capture":null:Y;Le=[];for(var P=V,Q;P!==null;){var le=P;if(Q=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||Q===null||H===null||(le=oo(P,H),le!=null&&Le.push(Fo(P,le,Q))),yt)break;P=P.return}0<Le.length&&(Y=new J(Y,we,null,o,ae),ce.push({event:Y,listeners:Le}))}}if((r&7)===0){e:{if(Y=i==="mouseover"||i==="pointerover",J=i==="mouseout"||i==="pointerout",Y&&o!==Ne&&(we=o.relatedTarget||o.fromElement)&&(kn(we)||we[Da]))break e;if((J||Y)&&(Y=ae.window===ae?ae:(Y=ae.ownerDocument)?Y.defaultView||Y.parentWindow:window,J?(we=o.relatedTarget||o.toElement,J=V,we=we?kn(we):null,we!==null&&(yt=l(we),Le=we.tag,we!==yt||Le!==5&&Le!==27&&Le!==6)&&(we=null)):(J=null,we=V),J!==we)){if(Le=fb,le="onMouseLeave",H="onMouseEnter",P="mouse",(i==="pointerout"||i==="pointerover")&&(Le=hb,le="onPointerLeave",H="onPointerEnter",P="pointer"),yt=J==null?Y:Ia(J),Q=we==null?Y:Ia(we),Y=new Le(le,P+"leave",J,o,ae),Y.target=yt,Y.relatedTarget=Q,le=null,kn(ae)===V&&(Le=new Le(H,P+"enter",we,o,ae),Le.target=Q,Le.relatedTarget=yt,le=Le),yt=le,J&&we)t:{for(Le=c_,H=J,P=we,Q=0,le=H;le;le=Le(le))Q++;le=0;for(var Oe=P;Oe;Oe=Le(Oe))le++;for(;0<Q-le;)H=Le(H),Q--;for(;0<le-Q;)P=Le(P),le--;for(;Q--;){if(H===P||P!==null&&H===P.alternate){Le=H;break t}H=Le(H),P=Le(P)}Le=null}else Le=null;J!==null&&av(ce,Y,J,Le,!1),we!==null&&yt!==null&&av(ce,yt,we,Le,!0)}}e:{if(Y=V?Ia(V):window,J=Y.nodeName&&Y.nodeName.toLowerCase(),J==="select"||J==="input"&&Y.type==="file")var rt=Eb;else if(xb(Y))if(Sb)rt=vN;else{rt=yN;var _e=bN}else J=Y.nodeName,!J||J.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?V&&Ua(V.elementType)&&(rt=Eb):rt=xN;if(rt&&(rt=rt(i,V))){vb(ce,rt,o,ae);break e}_e&&_e(i,Y,V),i==="focusout"&&V&&Y.type==="number"&&V.memoizedProps.value!=null&&Os(Y,"number",Y.value)}switch(_e=V?Ia(V):window,i){case"focusin":(xb(_e)||_e.contentEditable==="true")&&(Ms=_e,Ld=V,bo=null);break;case"focusout":bo=Ld=Ms=null;break;case"mousedown":Dd=!0;break;case"contextmenu":case"mouseup":case"dragend":Dd=!1,Ob(ce,o,ae);break;case"selectionchange":if(SN)break;case"keydown":case"keyup":Ob(ce,o,ae)}var qe;if(Od)e:{switch(i){case"compositionstart":var Je="onCompositionStart";break e;case"compositionend":Je="onCompositionEnd";break e;case"compositionupdate":Je="onCompositionUpdate";break e}Je=void 0}else js?bb(i,o)&&(Je="onCompositionEnd"):i==="keydown"&&o.keyCode===229&&(Je="onCompositionStart");Je&&(pb&&o.locale!=="ko"&&(js||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&js&&(qe=cb()):($a=ae,Nd="value"in $a?$a.value:$a.textContent,js=!0)),_e=Fu(V,Je),0<_e.length&&(Je=new db(Je,i,null,o,ae),ce.push({event:Je,listeners:_e}),qe?Je.data=qe:(qe=yb(o),qe!==null&&(Je.data=qe)))),(qe=dN?hN(i,o):pN(i,o))&&(Je=Fu(V,"onBeforeInput"),0<Je.length&&(_e=new db("onBeforeInput","beforeinput",null,o,ae),ce.push({event:_e,listeners:Je}),_e.data=qe)),r_(ce,i,V,o,ae)}nv(ce,r)})}function Fo(i,r,o){return{instance:i,listener:r,currentTarget:o}}function Fu(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(Fo(i,g,y)),g=oo(i,r),g!=null&&u.push(Fo(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(Fo(o,V,I))):g||(V=oo(o,y),V!=null&&S.push(Fo(o,V,I)))),o=o.return}S.length!==0&&i.push({event:r,listeners:S})}var u_=/\r\n?/g,f_=/\u0000|\uFFFD/g;function rv(i){return(typeof i=="string"?i:""+i).replace(u_,`
|
|
49
|
+
`).replace(f_,"")}function sv(i,r){return r=rv(r),rv(i)===r}function bt(i,r,o,u,g,y){switch(o){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||De(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&De(i,""+u);break;case"className":Yn(i,"class",u);break;case"tabIndex":Yn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Yn(i,o,u);break;case"style":dt(i,u,y);break;case"data":if(r!=="object"){Yn(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=Ba(""+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"&&bt(i,r,"name",g.name,g,null),bt(i,r,"formEncType",g.formEncType,g,null),bt(i,r,"formMethod",g.formMethod,g,null),bt(i,r,"formTarget",g.formTarget,g,null)):(bt(i,r,"encType",g.encType,g,null),bt(i,r,"method",g.method,g,null),bt(i,r,"target",g.target,g,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(o);break}u=Ba(""+u),i.setAttribute(o,u);break;case"onClick":u!=null&&(i.onclick=xe);break;case"onScroll":u!=null&&Ye("scroll",i);break;case"onScrollEnd":u!=null&&Ye("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=Ba(""+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":Ye("beforetoggle",i),Ye("toggle",i),mn(i,"popover",u);break;case"xlinkActuate":jn(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":jn(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":jn(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":jn(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":jn(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":jn(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":jn(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":jn(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":jn(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":mn(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=oa.get(o)||o,mn(i,o,u))}}function sp(i,r,o,u,g,y){switch(o){case"style":dt(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"?De(i,u):(typeof u=="number"||typeof u=="bigint")&&De(i,""+u);break;case"onScroll":u!=null&&Ye("scroll",i);break;case"onScrollEnd":u!=null&&Ye("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[pn]||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,""):mn(i,o,u)}}}function dn(i,r,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",i),Ye("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:bt(i,r,y,S,o,null)}}g&&bt(i,r,"srcSet",o.srcSet,o,null),u&&bt(i,r,"src",o.src,o,null);return;case"input":Ye("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:bt(i,r,u,ae,o,null)}}Dr(i,y,_,I,V,S,g,!1);return;case"select":Ye("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:bt(i,r,g,_,o,null)}r=y,o=S,i.multiple=!!u,r!=null?on(i,!!u,r,!1):o!=null&&on(i,!!u,o,!0);return;case"textarea":Ye("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:bt(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:bt(i,r,I,u,o,null)}return;case"dialog":Ye("beforetoggle",i),Ye("toggle",i),Ye("cancel",i),Ye("close",i);break;case"iframe":case"object":Ye("load",i);break;case"video":case"audio":for(u=0;u<Po.length;u++)Ye(Po[u],i);break;case"image":Ye("error",i),Ye("load",i);break;case"details":Ye("toggle",i);break;case"embed":case"source":case"link":Ye("error",i),Ye("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:bt(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&&bt(i,r,_,u,o,null))}function d_(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(J in o){var ce=o[J];if(o.hasOwnProperty(J)&&ce!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":I=ce;default:u.hasOwnProperty(J)||bt(i,r,J,null,u,ce)}}for(var Y in u){var J=u[Y];if(ce=o[Y],u.hasOwnProperty(Y)&&(J!=null||ce!=null))switch(Y){case"type":y=J;break;case"name":g=J;break;case"checked":V=J;break;case"defaultChecked":ae=J;break;case"value":S=J;break;case"defaultValue":_=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(a(137,r));break;default:J!==ce&&bt(i,r,Y,J,u,ce)}}ro(i,S,_,I,V,ae,y,g);return;case"select":J=S=_=Y=null;for(y in o)if(I=o[y],o.hasOwnProperty(y)&&I!=null)switch(y){case"value":break;case"multiple":J=I;default:u.hasOwnProperty(y)||bt(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":Y=y;break;case"defaultValue":_=y;break;case"multiple":S=y;default:y!==I&&bt(i,r,g,y,u,I)}r=_,o=S,u=J,Y!=null?on(i,!!o,Y,!1):!!u!=!!o&&(r!=null?on(i,!!o,r,!0):on(i,!!o,o?[]:"",!1));return;case"textarea":J=Y=null;for(_ in o)if(g=o[_],o.hasOwnProperty(_)&&g!=null&&!u.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:bt(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":Y=g;break;case"defaultValue":J=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(a(91));break;default:g!==y&&bt(i,r,S,g,u,y)}Gc(i,Y,J);return;case"option":for(var we in o)if(Y=o[we],o.hasOwnProperty(we)&&Y!=null&&!u.hasOwnProperty(we))switch(we){case"selected":i.selected=!1;break;default:bt(i,r,we,null,u,Y)}for(I in u)if(Y=u[I],J=o[I],u.hasOwnProperty(I)&&Y!==J&&(Y!=null||J!=null))switch(I){case"selected":i.selected=Y&&typeof Y!="function"&&typeof Y!="symbol";break;default:bt(i,r,I,Y,u,J)}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 Le in o)Y=o[Le],o.hasOwnProperty(Le)&&Y!=null&&!u.hasOwnProperty(Le)&&bt(i,r,Le,null,u,Y);for(V in u)if(Y=u[V],J=o[V],u.hasOwnProperty(V)&&Y!==J&&(Y!=null||J!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(a(137,r));break;default:bt(i,r,V,Y,u,J)}return;default:if(Ua(r)){for(var yt in o)Y=o[yt],o.hasOwnProperty(yt)&&Y!==void 0&&!u.hasOwnProperty(yt)&&sp(i,r,yt,void 0,u,Y);for(ae in u)Y=u[ae],J=o[ae],!u.hasOwnProperty(ae)||Y===J||Y===void 0&&J===void 0||sp(i,r,ae,Y,u,J);return}}for(var H in o)Y=o[H],o.hasOwnProperty(H)&&Y!=null&&!u.hasOwnProperty(H)&&bt(i,r,H,null,u,Y);for(ce in u)Y=u[ce],J=o[ce],!u.hasOwnProperty(ce)||Y===J||Y==null&&J==null||bt(i,r,ce,Y,u,J)}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,ce=I.initiatorType;ae&&lv(ce)&&(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 qu(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,fv=typeof Promise=="function"?Promise:void 0,g_=typeof queueMicrotask=="function"?queueMicrotask:typeof fv<"u"?function(i){return fv.resolve(null).then(i).catch(b_)}:uv;function b_(i){setTimeout(function(){throw i})}function ir(i){return i==="head"}function dv(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")qo(i.ownerDocument.documentElement);else if(o==="head"){o=i.ownerDocument.head,qo(o);for(var y=o.firstChild;y;){var S=y.nextSibling,_=y.nodeName;y[Mr]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=S}}else o==="body"&&qo(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 fp(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":fp(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[Mr])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=xi(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=xi(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=xi(i.nextSibling),i===null))return null;return i}function dp(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 xi(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 xi(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=qu(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 qo(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);io(i)}var vi=new Map,yv=new Set;function Hu(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ka=oe.d;oe.d={f:E_,r:S_,D:w_,C:k_,L:N_,m:__,X:T_,S:C_,M:A_};function E_(){var i=ka.f(),r=Du();return i||r}function S_(i){var r=sa(i);r!==null&&r.tag===5&&r.type==="form"?Dy(r):ka.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=Mn(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"),dn(r,"link",i),Yt(r),u.head.appendChild(r)))}}function w_(i){ka.D(i),xv("dns-prefetch",i,null)}function k_(i,r){ka.C(i,r),xv("preconnect",i,r)}function N_(i,r,o){ka.L(i,r,o);var u=il;if(u&&i&&r){var g='link[rel="preload"][as="'+Mn(r)+'"]';r==="image"&&o&&o.imageSrcSet?(g+='[imagesrcset="'+Mn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(g+='[imagesizes="'+Mn(o.imageSizes)+'"]')):g+='[href="'+Mn(i)+'"]';var y=g;switch(r){case"style":y=al(i);break;case"script":y=rl(i)}vi.has(y)||(i=b({rel:"preload",href:r==="image"&&o&&o.imageSrcSet?void 0:i,as:r},o),vi.set(y,i),u.querySelector(g)!==null||r==="style"&&u.querySelector(Ho(y))||r==="script"&&u.querySelector(Ko(y))||(r=u.createElement("link"),dn(r,"link",i),Yt(r),u.head.appendChild(r)))}}function __(i,r){ka.m(i,r);var o=il;if(o&&i){var u=r&&typeof r.as=="string"?r.as:"script",g='link[rel="modulepreload"][as="'+Mn(u)+'"][href="'+Mn(i)+'"]',y=g;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=rl(i)}if(!vi.has(y)&&(i=b({rel:"modulepreload",href:i},r),vi.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"),dn(u,"link",i),Yt(u),o.head.appendChild(u)}}}function C_(i,r,o){ka.S(i,r,o);var u=il;if(u&&i){var g=za(u).hoistableStyles,y=al(i);r=r||"default";var S=g.get(y);if(!S){var _={loading:0,preload:null};if(S=u.querySelector(Ho(y)))_.loading=5;else{i=b({rel:"stylesheet",href:i,"data-precedence":r},o),(o=vi.get(y))&&mp(i,o);var I=S=u.createElement("link");Yt(I),dn(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 T_(i,r){ka.X(i,r);var o=il;if(o&&i){var u=za(o).hoistableScripts,g=rl(i),y=u.get(g);y||(y=o.querySelector(Ko(g)),y||(i=b({src:i,async:!0},r),(r=vi.get(g))&&gp(i,r),y=o.createElement("script"),Yt(y),dn(y,"link",i),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(g,y))}}function A_(i,r){ka.M(i,r);var o=il;if(o&&i){var u=za(o).hoistableScripts,g=rl(i),y=u.get(g);y||(y=o.querySelector(Ko(g)),y||(i=b({src:i,async:!0,type:"module"},r),(r=vi.get(g))&&gp(i,r),y=o.createElement("script"),Yt(y),dn(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)?Hu(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=za(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=za(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(Ho(i)))&&!y._p&&(S.instance=y,S.state.loading=5),vi.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},vi.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=za(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="'+Mn(i)+'"'}function Ho(i){return'link[rel="stylesheet"]['+i+"]"}function Ev(i){return b({},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}),dn(r,"link",o),Yt(r),i.head.appendChild(r))}function rl(i){return'[src="'+Mn(i)+'"]'}function Ko(i){return"script[async]"+i}function Sv(i,r,o){if(r.count++,r.instance===null)switch(r.type){case"style":var u=i.querySelector('style[data-href~="'+Mn(o.href)+'"]');if(u)return r.instance=u,Yt(u),u;var g=b({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(i.ownerDocument||i).createElement("style"),Yt(u),dn(u,"style",g),Ku(u,o.precedence,i),r.instance=u;case"stylesheet":g=al(o.href);var y=i.querySelector(Ho(g));if(y)return r.state.loading|=4,r.instance=y,Yt(y),y;u=Ev(o),(g=vi.get(g))&&mp(u,g),y=(i.ownerDocument||i).createElement("link"),Yt(y);var S=y;return S._p=new Promise(function(_,I){S.onload=_,S.onerror=I}),dn(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,Yt(g),g):(u=o,(g=vi.get(y))&&(u=b({},o),gp(u,g)),i=i.ownerDocument||i,g=i.createElement("script"),Yt(g),dn(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 wv(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[Mr]||y[Kt]||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(Ho(g));if(y){r=y._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=Qu.bind(i),r.then(i,i)),o.state.loading|=4,o.instance=y,Yt(y);return}y=r.ownerDocument||r,u=Ev(u),(g=vi.get(g))&&mp(u,g),y=y.createElement("link"),Yt(y);var S=y;S._p=new Promise(function(_,I){S.onload=_,S.onerror=I}),dn(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=Qu.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 Qu(){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 Vu=null;function Yu(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Vu=new Map,r.forEach(L_,i),Vu=null,Qu.call(i))}function L_(i,r){if(!(r.state.loading&4)){var o=Vu.get(i);if(o)var u=o.get(null);else{o=new Map,Vu.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=Qu.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:C,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function D_(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=Ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ct(0),this.hiddenUpdates=Ct(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,ce){return i=new D_(i,r,o,S,I,V,ae,ce,_),r=1,y===!0&&(r|=24),y=Zn(3,null,null,r),i.current=y,y.stateNode=i,r=Wd(),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 Tv(i,r,o,u,g,y){g=Cv(g),u.context===null?u.context=g:u.pendingContext=g,u=Ga(r),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Qa(i,u,r),o!==null&&(Bn(o,i,r),ko(o,i,r))}function Av(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){Av(i,r),(i=i.alternate)&&Av(i,r)}function Ov(i){if(i.tag===13||i.tag===31){var r=Br(i,67108864);r!==null&&Bn(r,i,67108864),yp(i,67108864)}}function Rv(i){if(i.tag===13||i.tag===31){var r=ii();r=Ot(r);var o=Br(i,r);o!==null&&Bn(o,i,r),yp(i,r)}}var Wu=!0;function I_(i,r,o,u){var g=F.T;F.T=null;var y=oe.p;try{oe.p=2,xp(i,r,o,u)}finally{oe.p=y,F.T=g}}function z_(i,r,o,u){var g=F.T;F.T=null;var y=oe.p;try{oe.p=8,xp(i,r,o,u)}finally{oe.p=y,F.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(B_(g,i,r,o,u))u.stopPropagation();else if(Mv(i,u),r&4&&-1<U_.indexOf(i)){for(;g!==null;){var y=sa(g);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var S=Rn(y.pendingLanes);if(S!==0){var _=y;for(_.pendingLanes|=2,_.entangledLanes|=2;S;){var I=1<<31-ut(S);_.entanglements[1]|=I,S&=~I}Vi(y),(lt&6)===0&&(Mu=Lt()+500,$o(0))}}break;case 31:case 13:_=Br(y,2),_!==null&&Bn(_,y,2),Du(),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=Pe(i),Ep(i)}var Xu=null;function Ep(i){if(Xu=null,i=kn(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=f(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(ws()){case ne:return 2;case ge:return 8;case Me:case Ge:return 32;case at:return 268435456;default:return 32}default:return 32}}var Sp=!1,ar=null,rr=null,sr=null,Qo=new Map,Vo=new Map,lr=[],U_="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":ar=null;break;case"dragenter":case"dragleave":rr=null;break;case"mouseover":case"mouseout":sr=null;break;case"pointerover":case"pointerout":Qo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vo.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=sa(r),r!==null&&Ov(r)),i):(i.eventSystemFlags|=u,r=i.targetContainers,g!==null&&r.indexOf(g)===-1&&r.push(g),i)}function B_(i,r,o,u,g){switch(r){case"focusin":return ar=Yo(ar,i,r,o,u,g),!0;case"dragenter":return rr=Yo(rr,i,r,o,u,g),!0;case"mouseover":return sr=Yo(sr,i,r,o,u,g),!0;case"pointerover":var y=g.pointerId;return Qo.set(y,Yo(Qo.get(y)||null,i,r,o,u,g)),!0;case"gotpointercapture":return y=g.pointerId,Vo.set(y,Yo(Vo.get(y)||null,i,r,o,u,g)),!0}return!1}function Lv(i){var r=kn(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=f(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=sa(o),r!==null&&Ov(r),i.blockedOn=o,!1;r.shift()}return!0}function Dv(i,r,o){Zu(i)&&o.delete(r)}function $_(){Sp=!1,ar!==null&&Zu(ar)&&(ar=null),rr!==null&&Zu(rr)&&(rr=null),sr!==null&&Zu(sr)&&(sr=null),Qo.forEach(Dv),Vo.forEach(Dv)}function Ju(i,r){i.blockedOn===r&&(i.blockedOn=null,Sp||(Sp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$_)))}var ef=null;function Iv(i){ef!==i&&(ef=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ef===i&&(ef=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(Ep(u||o)===null)continue;break}var y=sa(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)}ar!==null&&Ju(ar,i),rr!==null&&Ju(rr,i),sr!==null&&Ju(sr,i),Qo.forEach(r),Vo.forEach(r);for(var o=0;o<lr.length;o++){var u=lr[o];u.blockedOn===i&&(u.blockedOn=null)}for(;0<lr.length&&(o=lr[0],o.blockedOn===null);)Lv(o),o.blockedOn===null&&lr.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[pn]||null;if(typeof y=="function")S||Iv(o);else if(S){var _=null;if(y&&y.hasAttribute("formAction")){if(g=y,S=y[pn]||null)_=S.formAction;else if(Ep(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 wp(i){this._internalRoot=i}tf.prototype.render=wp.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(a(409));var o=r.current,u=ii();Tv(o,u,i,r,null,null)},tf.prototype.unmount=wp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;Tv(i.current,2,null,i,null,null),Du(),r[Da]=null}};function tf(i){this._internalRoot=i}tf.prototype.unstable_scheduleHydration=function(i){if(i){var r=Ns();i={blockedOn:null,target:i,priority:r};for(var o=0;o<lr.length&&r!==0&&r<lr[o].priority;o++);lr.splice(o,0,i),o===0&&Lv(i)}};var Uv=t.version;if(Uv!=="19.2.5")throw Error(a(527,Uv,"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?m(i):null,i=i===null?null:i.stateNode,i};var P_={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nf.isDisabled&&nf.supportsFiber)try{ln=nf.inject(P_),Bt=nf}catch{}}return Xo.createRoot=function(i,r){if(!s(i))throw Error(a(299));var o=!1,u="",g=Ky,y=Gy,S=Qy;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[Da]=r.current,ap(i),new wp(r)},Xo.hydrateRoot=function(i,r,o){if(!s(i))throw Error(a(299));var u=!1,g="",y=Ky,S=Gy,_=Qy,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=ii(),u=Ot(u),g=Ga(u),g.callback=null,Qa(o,g,u),o=u,r.current.lanes=o,Et(r,o),Vi(r),i[Da]=r.current,ap(i),new tf(r)},Xo.version="19.2.5",Xo}var Yv;function J_(){if(Yv)return Tp.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(),Tp.exports=Z_(),Tp.exports}var eC=J_(),Pl=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(){}},is,pr,Nl,X1,tC=(X1=class extends Pl{constructor(){super();Ae(this,is);Ae(this,pr);Ae(this,Nl);Ee(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,pr)||this.setEventListener(z(this,Nl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,pr))==null||t.call(this),Ee(this,pr,void 0))}setEventListener(t){var n;Ee(this,Nl,t),(n=z(this,pr))==null||n.call(this),Ee(this,pr,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){z(this,is)!==t&&(Ee(this,is,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,is)=="boolean"?z(this,is):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},is=new WeakMap,pr=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)},mr,ig,Z1,iC=(Z1=class{constructor(){Ae(this,mr,nC);Ae(this,ig,!1)}setTimeoutProvider(e){Ee(this,mr,e)}setTimeout(e,t){return z(this,mr).setTimeout(e,t)}clearTimeout(e){z(this,mr).clearTimeout(e)}setInterval(e,t){return z(this,mr).setInterval(e,t)}clearInterval(e){z(this,mr).clearInterval(e)}},mr=new WeakMap,ig=new WeakMap,Z1),Jr=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 oE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function wr(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:f}=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 d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||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(hs(t.options.mutationKey)!==hs(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)||hs)(e)}function hs(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 cE(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),f=c.length,d=a?new Array(f):{};let h=0;for(let m=0;m<f;m++){const b=a?m:c[m],x=e[b],v=t[b];if(x===v){d[b]=x,(a?m<l:lC.call(e,b))&&h++;continue}if(x===null||v===null||typeof x!="object"||typeof v!="object"){d[b]=v;continue}const E=cE(x,v,n+1);d[b]=E,E===x&&h++}return l===f&&h===l?e:d}function Rf(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=>{Jr.setTimeout(t,e)})}function bm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?cE(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 uE(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 fC(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 dC=aC;function hC(){let e=[],t=0,n=f=>{f()},a=f=>{f()},s=dC;const l=f=>{t?e.push(f):s(()=>{n(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{a(()=>{f.forEach(d=>{n(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||c()}return d},batchCalls:f=>(...d)=>{l(()=>{f(...d)})},schedule:l,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{s=f}}}var an=hC(),_l,gr,Cl,J1,pC=(J1=class extends Pl{constructor(){super();Ae(this,_l,!0);Ae(this,gr);Ae(this,Cl);Ee(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,gr)||this.setEventListener(z(this,Cl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,gr))==null||t.call(this),Ee(this,gr,void 0))}setEventListener(t){var n;Ee(this,Cl,t),(n=z(this,gr))==null||n.call(this),Ee(this,gr,t(this.setOnline.bind(this)))}setOnline(t){z(this,_l)!==t&&(Ee(this,_l,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return z(this,_l)}},_l=new WeakMap,gr=new WeakMap,Cl=new WeakMap,J1),jf=new pC;function mC(e){return Math.min(1e3*2**e,3e4)}function fE(e){return(e??"online")==="online"?jf.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 dE(e){let t=!1,n=0,a;const s=ym(),l=()=>s.status!=="pending",c=w=>{var N;if(!l()){const k=new xm(w);x(k),(N=e.onCancel)==null||N.call(e,k)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>sg.isFocused()&&(e.networkMode==="always"||jf.isOnline())&&e.canRun(),m=()=>fE(e.networkMode)&&e.canRun(),b=w=>{l()||(a==null||a(),s.resolve(w))},x=w=>{l()||(a==null||a(),s.reject(w))},v=()=>new Promise(w=>{var N;a=k=>{(l()||h())&&w(k)},(N=e.onPause)==null||N.call(e)}).then(()=>{var w;a=void 0,l()||(w=e.onContinue)==null||w.call(e)}),E=()=>{if(l())return;let w;const N=n===0?e.initialPromise:void 0;try{w=N??e.fn()}catch(k){w=Promise.reject(k)}Promise.resolve(w).then(b).catch(k=>{var j;if(l())return;const T=e.retry??(pc.isServer()?0:3),C=e.retryDelay??mC,R=typeof C=="function"?C(n,k):C,B=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,k);if(t||!B){x(k);return}n++,(j=e.onFail)==null||j.call(e,n,k),oC(R).then(()=>h()?void 0:v()).then(()=>{t?x(k):E()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:f,continueRetry:d,canStart:m,start:()=>(m()?E():v().then(E),s)}}var as,eE,hE=(eE=class{constructor(){Ae(this,as)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mm(this.gcTime)&&Ee(this,as,Jr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pc.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,as)!==void 0&&(Jr.clearTimeout(z(this,as)),Ee(this,as,void 0))}},as=new WeakMap,eE),rs,Tl,Ei,ss,sn,Nc,ls,ri,pE,Na,tE,gC=(tE=class extends hE{constructor(t){super();Ae(this,ri);Ae(this,rs);Ae(this,Tl);Ae(this,Ei);Ae(this,ss);Ae(this,sn);Ae(this,Nc);Ae(this,ls);Ee(this,ls,!1),Ee(this,Nc,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ee(this,ss,t.client),Ee(this,Ei,z(this,ss).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ee(this,rs,t0(this.options)),this.state=t.state??z(this,rs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,sn))==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)),Ee(this,rs,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 He(this,ri,Na).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){He(this,ri,Na).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=z(this,sn))==null?void 0:a.promise;return(s=z(this,sn))==null||s.cancel(t),n?n.then(Tn).catch(Tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,rs)}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=>wr(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:!oE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,sn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,sn))==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,sn)&&(z(this,ls)||He(this,ri,pE).call(this)?z(this,sn).cancel({revert:!0}):z(this,sn).cancelRetry()),this.scheduleGc()),z(this,Ei).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,ri,Na).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,m,b,x,v,E,w,N,k,T,C;if(this.state.fetchStatus!=="idle"&&((d=z(this,sn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,sn))return z(this,sn).continueRetry(),z(this,sn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(B=>B.options.queryFn);R&&this.setOptions(R.options)}const a=new AbortController,s=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(Ee(this,ls,!0),a.signal)})},l=()=>{const R=uE(this.options,n),j=(()=>{const $={client:z(this,ss),queryKey:this.queryKey,meta:this.meta};return s($),$})();return Ee(this,ls,!1),this.options.persister?this.options.persister(R,j,this):R(j)},f=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,ss),state:this.state,fetchFn:l};return s(R),R})();(h=this.options.behavior)==null||h.onFetch(f,this),Ee(this,Tl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=f.fetchOptions)==null?void 0:m.meta))&&He(this,ri,Na).call(this,{type:"fetch",meta:(b=f.fetchOptions)==null?void 0:b.meta}),Ee(this,sn,dE({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:R=>{R instanceof xm&&R.revert&&this.setState({...z(this,Tl),fetchStatus:"idle"}),a.abort()},onFail:(R,B)=>{He(this,ri,Na).call(this,{type:"failed",failureCount:R,error:B})},onPause:()=>{He(this,ri,Na).call(this,{type:"pause"})},onContinue:()=>{He(this,ri,Na).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const R=await z(this,sn).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(v=(x=z(this,Ei).config).onSuccess)==null||v.call(x,R,this),(w=(E=z(this,Ei).config).onSettled)==null||w.call(E,R,this.state.error,this),R}catch(R){if(R instanceof xm){if(R.silent)return z(this,sn).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw He(this,ri,Na).call(this,{type:"error",error:R}),(k=(N=z(this,Ei).config).onError)==null||k.call(N,R,this),(C=(T=z(this,Ei).config).onSettled)==null||C.call(T,this.state.data,R,this),R}finally{this.scheduleGc()}}},rs=new WeakMap,Tl=new WeakMap,Ei=new WeakMap,ss=new WeakMap,sn=new WeakMap,Nc=new WeakMap,ls=new WeakMap,ri=new WeakSet,pE=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Na=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,...mE(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 Ee(this,Tl,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),an.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),z(this,Ei).notify({query:this,type:"updated",action:t})})},tE);function mE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fE(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 Fn,nt,_c,_n,os,Al,_a,br,Cc,Ol,Rl,cs,us,yr,jl,ct,sc,vm,Em,Sm,wm,km,Nm,_m,gE,nE,bC=(nE=class extends Pl{constructor(t,n){super();Ae(this,ct);Ae(this,Fn);Ae(this,nt);Ae(this,_c);Ae(this,_n);Ae(this,os);Ae(this,Al);Ae(this,_a);Ae(this,br);Ae(this,Cc);Ae(this,Ol);Ae(this,Rl);Ae(this,cs);Ae(this,us);Ae(this,yr);Ae(this,jl,new Set);this.options=n,Ee(this,Fn,t),Ee(this,br,null),Ee(this,_a,ym()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,nt).addObserver(this),n0(z(this,nt),this.options)?He(this,ct,sc).call(this):this.updateResult(),He(this,ct,wm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cm(z(this,nt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cm(z(this,nt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,ct,km).call(this),He(this,ct,Nm).call(this),z(this,nt).removeObserver(this)}setOptions(t){const n=this.options,a=z(this,nt);if(this.options=z(this,Fn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Si(this.options.enabled,z(this,nt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,ct,_m).call(this),z(this,nt).setOptions(this.options),n._defaulted&&!Rf(this.options,n)&&z(this,Fn).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,nt),observer:this});const s=this.hasListeners();s&&i0(z(this,nt),a,this.options,n)&&He(this,ct,sc).call(this),this.updateResult(),s&&(z(this,nt)!==a||Si(this.options.enabled,z(this,nt))!==Si(n.enabled,z(this,nt))||wr(this.options.staleTime,z(this,nt))!==wr(n.staleTime,z(this,nt)))&&He(this,ct,vm).call(this);const l=He(this,ct,Em).call(this);s&&(z(this,nt)!==a||Si(this.options.enabled,z(this,nt))!==Si(n.enabled,z(this,nt))||l!==z(this,yr))&&He(this,ct,Sm).call(this,l)}getOptimisticResult(t){const n=z(this,Fn).getQueryCache().build(z(this,Fn),t),a=this.createResult(n,t);return xC(this,a)&&(Ee(this,_n,a),Ee(this,Al,this.options),Ee(this,os,z(this,nt).state)),a}getCurrentResult(){return z(this,_n)}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,_a).status==="pending"&&z(this,_a).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,nt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,Fn).defaultQueryOptions(t),a=z(this,Fn).getQueryCache().build(z(this,Fn),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return He(this,ct,sc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,_n)))}createResult(t,n){var ee;const a=z(this,nt),s=this.options,l=z(this,_n),c=z(this,os),f=z(this,Al),h=t!==a?t.state:z(this,_c),{state:m}=t;let b={...m},x=!1,v;if(n._optimisticResults){const L=this.hasListeners(),Z=!L&&n0(t,n),ie=L&&i0(t,a,n,s);(Z||ie)&&(b={...b,...mE(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:E,errorUpdatedAt:w,status:N}=b;v=b.data;let k=!1;if(n.placeholderData!==void 0&&v===void 0&&N==="pending"){let L;l!=null&&l.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(L=l.data,k=!0):L=typeof n.placeholderData=="function"?n.placeholderData((ee=z(this,Rl))==null?void 0:ee.state.data,z(this,Rl)):n.placeholderData,L!==void 0&&(N="success",v=bm(l==null?void 0:l.data,L,n),x=!0)}if(n.select&&v!==void 0&&!k)if(l&&v===(c==null?void 0:c.data)&&n.select===z(this,Cc))v=z(this,Ol);else try{Ee(this,Cc,n.select),v=n.select(v),v=bm(l==null?void 0:l.data,v,n),Ee(this,Ol,v),Ee(this,br,null)}catch(L){Ee(this,br,L)}z(this,br)&&(E=z(this,br),v=z(this,Ol),w=Date.now(),N="error");const T=b.fetchStatus==="fetching",C=N==="pending",R=N==="error",B=C&&T,j=v!==void 0,q={status:N,fetchStatus:b.fetchStatus,isPending:C,isSuccess:N==="success",isError:R,isInitialLoading:B,isLoading:B,data:v,dataUpdatedAt:b.dataUpdatedAt,error:E,errorUpdatedAt:w,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:b.dataUpdateCount>h.dataUpdateCount||b.errorUpdateCount>h.errorUpdateCount,isFetching:T,isRefetching:T&&!C,isLoadingError:R&&!j,isPaused:b.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:R&&j,isStale:ug(t,n),refetch:this.refetch,promise:z(this,_a),isEnabled:Si(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=q.data!==void 0,Z=q.status==="error"&&!L,ie=te=>{Z?te.reject(q.error):L&&te.resolve(q.data)},be=()=>{const te=Ee(this,_a,q.promise=ym());ie(te)},ue=z(this,_a);switch(ue.status){case"pending":t.queryHash===a.queryHash&&ie(ue);break;case"fulfilled":(Z||q.data!==ue.value)&&be();break;case"rejected":(!Z||q.error!==ue.reason)&&be();break}}return q}updateResult(){const t=z(this,_n),n=this.createResult(z(this,nt),this.options);if(Ee(this,os,z(this,nt).state),Ee(this,Al,this.options),z(this,os).data!==void 0&&Ee(this,Rl,z(this,nt)),Rf(n,t))return;Ee(this,_n,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,_n)).some(f=>{const d=f;return z(this,_n)[d]!==t[d]&&c.has(d)})};He(this,ct,gE).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,ct,wm).call(this)}},Fn=new WeakMap,nt=new WeakMap,_c=new WeakMap,_n=new WeakMap,os=new WeakMap,Al=new WeakMap,_a=new WeakMap,br=new WeakMap,Cc=new WeakMap,Ol=new WeakMap,Rl=new WeakMap,cs=new WeakMap,us=new WeakMap,yr=new WeakMap,jl=new WeakMap,ct=new WeakSet,sc=function(t){He(this,ct,_m).call(this);let n=z(this,nt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Tn)),n},vm=function(){He(this,ct,km).call(this);const t=wr(this.options.staleTime,z(this,nt));if(pc.isServer()||z(this,_n).isStale||!mm(t))return;const a=oE(z(this,_n).dataUpdatedAt,t)+1;Ee(this,cs,Jr.setTimeout(()=>{z(this,_n).isStale||this.updateResult()},a))},Em=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,nt)):this.options.refetchInterval)??!1},Sm=function(t){He(this,ct,Nm).call(this),Ee(this,yr,t),!(pc.isServer()||Si(this.options.enabled,z(this,nt))===!1||!mm(z(this,yr))||z(this,yr)===0)&&Ee(this,us,Jr.setInterval(()=>{(this.options.refetchIntervalInBackground||sg.isFocused())&&He(this,ct,sc).call(this)},z(this,yr)))},wm=function(){He(this,ct,vm).call(this),He(this,ct,Sm).call(this,He(this,ct,Em).call(this))},km=function(){z(this,cs)!==void 0&&(Jr.clearTimeout(z(this,cs)),Ee(this,cs,void 0))},Nm=function(){z(this,us)!==void 0&&(Jr.clearInterval(z(this,us)),Ee(this,us,void 0))},_m=function(){const t=z(this,Fn).getQueryCache().build(z(this,Fn),this.options);if(t===z(this,nt))return;const n=z(this,nt);Ee(this,nt,t),Ee(this,_c,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},gE=function(t){an.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,_n))}),z(this,Fn).getQueryCache().notify({query:z(this,nt),type:"observerResultsUpdated"})})},nE);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&&wr(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(wr(t.staleTime,e))}function xC(e,t){return!Rf(e.getCurrentResult(),t)}function a0(e){return{onFetch:(t,n)=>{var m,b,x,v,E;const a=t.options,s=(x=(b=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:b.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 f={pages:[],pageParams:[]},d=0;const h=async()=>{let w=!1;const N=C=>{fC(C,()=>t.signal,()=>w=!0)},k=uE(t.options,t.fetchOptions),T=async(C,R,B)=>{if(w)return Promise.reject();if(R==null&&C.pages.length)return Promise.resolve(C);const $=(()=>{const Z={client:t.client,queryKey:t.queryKey,pageParam:R,direction:B?"backward":"forward",meta:t.options.meta};return N(Z),Z})(),q=await k($),{maxPages:ee}=t.options,L=B?uC:cC;return{pages:L(C.pages,q,ee),pageParams:L(C.pageParams,R,ee)}};if(s&&l.length){const C=s==="backward",R=C?vC:r0,B={pages:l,pageParams:c},j=R(a,B);f=await T(B,j,C)}else{const C=e??l.length;do{const R=d===0?c[0]??a.initialPageParam:r0(a,f);if(d>0&&R==null)break;f=await T(f,R),d++}while(d<C)}return f};t.options.persister?t.fetchFn=()=>{var w,N;return(N=(w=t.options).persister)==null?void 0:N.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 Tc,Xi,bn,fs,Zi,dr,iE,EC=(iE=class extends hE{constructor(t){super();Ae(this,Zi);Ae(this,Tc);Ae(this,Xi);Ae(this,bn);Ae(this,fs);Ee(this,Tc,t.client),this.mutationId=t.mutationId,Ee(this,bn,t.mutationCache),Ee(this,Xi,[]),this.state=t.state||bE(),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,Xi).includes(t)||(z(this,Xi).push(t),this.clearGcTimeout(),z(this,bn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ee(this,Xi,z(this,Xi).filter(n=>n!==t)),this.scheduleGc(),z(this,bn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Xi).length||(this.state.status==="pending"?this.scheduleGc():z(this,bn).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,f,d,h,m,b,x,v,E,w,N,k,T,C,R,B,j,$;const n=()=>{He(this,Zi,dr).call(this,{type:"continue"})},a={client:z(this,Tc),meta:this.options.meta,mutationKey:this.options.mutationKey};Ee(this,fs,dE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(q,ee)=>{He(this,Zi,dr).call(this,{type:"failed",failureCount:q,error:ee})},onPause:()=>{He(this,Zi,dr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,bn).canRun(this)}));const s=this.state.status==="pending",l=!z(this,fs).canStart();try{if(s)n();else{He(this,Zi,dr).call(this,{type:"pending",variables:t,isPaused:l}),z(this,bn).config.onMutate&&await z(this,bn).config.onMutate(t,this,a);const ee=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,a));ee!==this.state.context&&He(this,Zi,dr).call(this,{type:"pending",context:ee,variables:t,isPaused:l})}const q=await z(this,fs).start();return await((h=(d=z(this,bn).config).onSuccess)==null?void 0:h.call(d,q,t,this.state.context,this,a)),await((b=(m=this.options).onSuccess)==null?void 0:b.call(m,q,t,this.state.context,a)),await((v=(x=z(this,bn).config).onSettled)==null?void 0:v.call(x,q,null,this.state.variables,this.state.context,this,a)),await((w=(E=this.options).onSettled)==null?void 0:w.call(E,q,null,t,this.state.context,a)),He(this,Zi,dr).call(this,{type:"success",data:q}),q}catch(q){try{await((k=(N=z(this,bn).config).onError)==null?void 0:k.call(N,q,t,this.state.context,this,a))}catch(ee){Promise.reject(ee)}try{await((C=(T=this.options).onError)==null?void 0:C.call(T,q,t,this.state.context,a))}catch(ee){Promise.reject(ee)}try{await((B=(R=z(this,bn).config).onSettled)==null?void 0:B.call(R,void 0,q,this.state.variables,this.state.context,this,a))}catch(ee){Promise.reject(ee)}try{await(($=(j=this.options).onSettled)==null?void 0:$.call(j,void 0,q,t,this.state.context,a))}catch(ee){Promise.reject(ee)}throw He(this,Zi,dr).call(this,{type:"error",error:q}),q}finally{z(this,bn).runNext(this)}}},Tc=new WeakMap,Xi=new WeakMap,bn=new WeakMap,fs=new WeakMap,Zi=new WeakSet,dr=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),an.batch(()=>{z(this,Xi).forEach(a=>{a.onMutationUpdate(t)}),z(this,bn).notify({mutation:this,type:"updated",action:t})})},iE);function bE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ca,Di,Ac,aE,SC=(aE=class extends Pl{constructor(t={}){super();Ae(this,Ca);Ae(this,Di);Ae(this,Ac);this.config=t,Ee(this,Ca,new Set),Ee(this,Di,new Map),Ee(this,Ac,0)}build(t,n,a){const s=new EC({client:t,mutationCache:this,mutationId:++af(this,Ac)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){z(this,Ca).add(t);const n=rf(t);if(typeof n=="string"){const a=z(this,Di).get(n);a?a.push(t):z(this,Di).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,Ca).delete(t)){const n=rf(t);if(typeof n=="string"){const a=z(this,Di).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,Di).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=rf(t);if(typeof n=="string"){const a=z(this,Di).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=rf(t);if(typeof n=="string"){const s=(a=z(this,Di).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(){an.batch(()=>{z(this,Ca).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,Ca).clear(),z(this,Di).clear()})}getAll(){return Array.from(z(this,Ca))}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){an.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return an.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tn))))}},Ca=new WeakMap,Di=new WeakMap,Ac=new WeakMap,aE);function rf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ta,xr,qn,Aa,ja,wf,Tm,rE,wC=(rE=class extends Pl{constructor(n,a){super();Ae(this,ja);Ae(this,Ta);Ae(this,xr);Ae(this,qn);Ae(this,Aa);Ee(this,Ta,n),this.setOptions(a),this.bindMethods(),He(this,ja,wf).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),Rf(this.options,a)||z(this,Ta).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,qn),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&hs(a.mutationKey)!==hs(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){He(this,ja,wf).call(this),He(this,ja,Tm).call(this,n)}getCurrentResult(){return z(this,xr)}reset(){var n;(n=z(this,qn))==null||n.removeObserver(this),Ee(this,qn,void 0),He(this,ja,wf).call(this),He(this,ja,Tm).call(this)}mutate(n,a){var s;return Ee(this,Aa,a),(s=z(this,qn))==null||s.removeObserver(this),Ee(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,xr=new WeakMap,qn=new WeakMap,Aa=new WeakMap,ja=new WeakSet,wf=function(){var a;const n=((a=z(this,qn))==null?void 0:a.state)??bE();Ee(this,xr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Tm=function(n){an.batch(()=>{var a,s,l,c,f,d,h,m;if(z(this,Aa)&&this.hasListeners()){const b=z(this,xr).variables,x=z(this,xr).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,Aa)).onSuccess)==null||s.call(a,n.data,b,x,v)}catch(E){Promise.reject(E)}try{(c=(l=z(this,Aa)).onSettled)==null||c.call(l,n.data,null,b,x,v)}catch(E){Promise.reject(E)}}else if((n==null?void 0:n.type)==="error"){try{(d=(f=z(this,Aa)).onError)==null||d.call(f,n.error,b,x,v)}catch(E){Promise.reject(E)}try{(m=(h=z(this,Aa)).onSettled)==null||m.call(h,void 0,n.error,b,x,v)}catch(E){Promise.reject(E)}}}this.listeners.forEach(b=>{b(z(this,xr))})})},rE),Ji,sE,kC=(sE=class extends Pl{constructor(t={}){super();Ae(this,Ji);this.config=t,Ee(this,Ji,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,Ji).has(t.queryHash)||(z(this,Ji).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,Ji).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,Ji).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){an.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Ji).get(t)}getAll(){return[...z(this,Ji).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){an.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){an.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){an.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ji=new WeakMap,sE),Ft,vr,Er,Ml,Ll,Sr,Dl,Il,lE,NC=(lE=class{constructor(e={}){Ae(this,Ft);Ae(this,vr);Ae(this,Er);Ae(this,Ml);Ae(this,Ll);Ae(this,Sr);Ae(this,Dl);Ae(this,Il);Ee(this,Ft,e.queryCache||new kC),Ee(this,vr,e.mutationCache||new SC),Ee(this,Er,e.defaultOptions||{}),Ee(this,Ml,new Map),Ee(this,Ll,new Map),Ee(this,Sr,0)}mount(){af(this,Sr)._++,z(this,Sr)===1&&(Ee(this,Dl,sg.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Ft).onFocus())})),Ee(this,Il,jf.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Ft).onOnline())})))}unmount(){var e,t;af(this,Sr)._--,z(this,Sr)===0&&((e=z(this,Dl))==null||e.call(this),Ee(this,Dl,void 0),(t=z(this,Il))==null||t.call(this),Ee(this,Il,void 0))}isFetching(e){return z(this,Ft).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,vr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,Ft).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,Ft).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(wr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return z(this,Ft).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,Ft).get(a.queryHash),l=s==null?void 0:s.state.data,c=sC(t,l);if(c!==void 0)return z(this,Ft).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return an.batch(()=>z(this,Ft).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,Ft).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,Ft);an.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,Ft);return an.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=an.batch(()=>z(this,Ft).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(Tn).catch(Tn)}invalidateQueries(e,t={}){return an.batch(()=>(z(this,Ft).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=an.batch(()=>z(this,Ft).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,Ft).build(this,t);return n.isStaleByTime(wr(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 jf.isOnline()?z(this,vr).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,Ft)}getMutationCache(){return z(this,vr)}getDefaultOptions(){return z(this,Er)}setDefaultOptions(e){Ee(this,Er,e)}setQueryDefaults(e,t){z(this,Ml).set(hs(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,Ll).set(hs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,Ll).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,Ft).clear(),z(this,vr).clear()}},Ft=new WeakMap,vr=new WeakMap,Er=new WeakMap,Ml=new WeakMap,Ll=new WeakMap,Sr=new WeakMap,Dl=new WeakMap,Il=new WeakMap,lE),yE=A.createContext(void 0),Gn=e=>{const t=A.useContext(yE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_C=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(yE.Provider,{value:e,children:t})),xE=A.createContext(!1),CC=()=>A.useContext(xE);xE.Provider;function TC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var AC=A.createContext(TC()),OC=()=>A.useContext(AC),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=>{A.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])),LC=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))}},DC=(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=Gn(),c=l.defaultQueryOptions(e);(v=(x=l.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||v.call(x,c);const f=l.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",LC(c),RC(c,s,f),jC(s);const d=!l.getQueryCache().get(c.queryHash),[h]=A.useState(()=>new t(l,c)),m=h.getOptimisticResult(c),b=!a&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(N=>{const k=b?h.subscribe(an.batchCalls(N)):Tn;return h.updateResult(),k},[h,b]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),A.useEffect(()=>{h.setOptions(c)},[c,h]),IC(c,m))throw s0(c,h,s);if(MC({result:m,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw m.error;if((w=(E=l.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||w.call(E,c,m),c.experimental_prefetchInRender&&!pc.isServer()&&DC(m,a)){const N=d?s0(c,h,s):f==null?void 0:f.promise;N==null||N.catch(Tn).finally(()=>{h.updateResult()})}return c.notifyOnChangeProps?m:h.trackResult(m)}function ot(e,t){return zC(e,bC)}function Kn(e,t){const n=Gn(),[a]=A.useState(()=>new wC(n,e));A.useEffect(()=>{a.setOptions(e)},[a,e]);const s=A.useSyncExternalStore(A.useCallback(c=>a.subscribe(an.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),l=A.useCallback((c,f)=>{a.mutate(c,f).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 UC(e={}){function t(a,s){var h;let l=(h=s.state)==null?void 0:h.masked,{pathname:c,search:f,hash:d}=l||a.location;return Am("",{pathname:c,search:f,hash:d},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 $C(t,n,null,e)}function jt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ni(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function BC(){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 Am(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Fl(t):t,state:n,key:t&&t.key||a||BC(),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 Fl(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 $C(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,f="POP",d=null,h=m();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function m(){return(c.state||{idx:null}).idx}function b(){f="POP";let N=m(),k=N==null?null:N-h;h=N,d&&d({action:f,location:w.location,delta:k})}function x(N,k){f="PUSH";let T=o0(N)?N:Am(w.location,N,k);h=m()+1;let C=c0(T,h),R=w.createHref(T.unstable_mask||T);try{c.pushState(C,"",R)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;s.location.assign(R)}l&&d&&d({action:f,location:w.location,delta:1})}function v(N,k){f="REPLACE";let T=o0(N)?N:Am(w.location,N,k);h=m();let C=c0(T,h),R=w.createHref(T.unstable_mask||T);c.replaceState(C,"",R),l&&d&&d({action:f,location:w.location,delta:0})}function E(N){return PC(N)}let w={get action(){return f},get location(){return e(s,c)},listen(N){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(l0,b),d=N,()=>{s.removeEventListener(l0,b),d=null}},createHref(N){return t(s,N)},createURL:E,encodeLocation(N){let k=E(N);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:x,replace:v,go(N){return c.go(N)}};return w}function PC(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),jt(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 vE(e,t,n="/"){return FC(e,t,n,!1)}function FC(e,t,n,a){let s=typeof t=="string"?Fl(t):t,l=Ma(s.pathname||"/",n);if(l==null)return null;let c=EE(e);qC(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=e2(l);f=ZC(c[d],h,a)}return f}function EE(e,t=[],n=[],a="",s=!1){let l=(c,f,d=s,h)=>{let m={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(a)&&d)return;jt(m.relativePath.startsWith(a),`Absolute route path "${m.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(a.length)}let b=Ii([a,m.relativePath]),x=n.concat(m);c.children&&c.children.length>0&&(jt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),EE(c.children,t,x,b,d)),!(c.path==null&&!c.index)&&t.push({path:b,score:WC(b,c.index),routesMeta:x})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))l(c,f);else for(let h of SE(c.path))l(c,f,!0,h)}),t}function SE(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=SE(a.join("/")),f=[];return f.push(...c.map(d=>d===""?l:[l,d].join("/"))),s&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function qC(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 HC=/^:[\w-]+$/,KC=3,GC=2,QC=1,VC=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+(HC.test(l)?KC:l===""?QC:VC),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 f=0;f<a.length;++f){let d=a[f],h=f===a.length-1,m=l==="/"?t:t.slice(l.length)||"/",b=Mf({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},m),x=d.route;if(!b&&h&&n&&!a[a.length-1].route.index&&(b=Mf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!b)return null;Object.assign(s,b.params),c.push({params:s,pathname:Ii([l,b.pathname]),pathnameBase:a2(Ii([l,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(l=Ii([l,b.pathnameBase]))}return c}function Mf(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"),f=s.slice(1);return{params:a.reduce((h,{paramName:m,isOptional:b},x)=>{if(m==="*"){let E=f[x]||"";c=l.slice(0,l.length-E.length).replace(/(.)\/+$/,"$1")}const v=f[x];return b&&!v?h[m]=void 0:h[m]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:c,pattern:e}}function JC(e,t=!1,n=!0){Ni(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,f,d,h,m)=>{if(a.push({paramName:f,isOptional:d!=null}),d){let b=m.charAt(h+c.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 e2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ni(!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 Ma(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 t2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function n2(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?Fl(e):e,l;return n?(n=wE(n),n.startsWith("/")?l=f0(n.substring(1),"/"):l=f0(n,t)):l=t,{pathname:l,search:r2(a),hash:s2(s)}}function f0(e,t){let n=Lf(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 i2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function fg(e){let t=i2(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Xf(e,t,n,a=!1){let s;typeof e=="string"?s=Fl(e):(s={...e},jt(!s.pathname||!s.pathname.includes("?"),jp("?","pathname","search",s)),jt(!s.pathname||!s.pathname.includes("#"),jp("#","pathname","hash",s)),jt(!s.search||!s.search.includes("#"),jp("#","search","hash",s)));let l=e===""||s.pathname==="",c=l?"/":s.pathname,f;if(c==null)f=n;else{let b=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),b-=1;s.pathname=x.join("/")}f=b>=0?t[b]:"/"}let d=n2(s,f),h=c&&c!=="/"&&c.endsWith("/"),m=(l||c===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var wE=e=>e.replace(/\/\/+/g,"/"),Ii=e=>wE(e.join("/")),Lf=e=>e.replace(/\/+$/,""),a2=e=>Lf(e).replace(/^\/*/,"/"),r2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,s2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,l2=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 o2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function c2(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ii(t)||"/"}var kE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function NE(e,t){let n=e;if(typeof n!="string"||!t2.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(kE)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),f=Ma(c.pathname,t);c.origin===l.origin&&f!=null?n=f+c.search+c.hash:s=!0}catch{Ni(!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 _E=["POST","PUT","PATCH","DELETE"];new Set(_E);var u2=["GET",..._E];new Set(u2);var ql=A.createContext(null);ql.displayName="DataRouter";var Zf=A.createContext(null);Zf.displayName="DataRouterState";var CE=A.createContext(!1);function f2(){return A.useContext(CE)}var TE=A.createContext({isTransitioning:!1});TE.displayName="ViewTransition";var d2=A.createContext(new Map);d2.displayName="Fetchers";var h2=A.createContext(null);h2.displayName="Await";var oi=A.createContext(null);oi.displayName="Navigation";var Oc=A.createContext(null);Oc.displayName="Location";var Ti=A.createContext({outlet:null,matches:[],isDataRoute:!1});Ti.displayName="Route";var dg=A.createContext(null);dg.displayName="RouteError";var AE="REACT_ROUTER_ERROR",p2="REDIRECT",m2="ROUTE_ERROR_RESPONSE";function g2(e){if(e.startsWith(`${AE}:${p2}:{`))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 b2(e){if(e.startsWith(`${AE}:${m2}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new l2(t.status,t.statusText,t.data)}catch{}}function y2(e,{relative:t}={}){jt(Hl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=A.useContext(oi),{hash:s,pathname:l,search:c}=Rc(e,{relative:t}),f=l;return n!=="/"&&(f=l==="/"?n:Ii([n,l])),a.createHref({pathname:f,search:c,hash:s})}function Hl(){return A.useContext(Oc)!=null}function Ui(){return jt(Hl(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(Oc).location}var OE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function RE(e){A.useContext(oi).static||A.useLayoutEffect(e)}function _r(){let{isDataRoute:e}=A.useContext(Ti);return e?M2():x2()}function x2(){jt(Hl(),"useNavigate() may be used only in the context of a <Router> component.");let e=A.useContext(ql),{basename:t,navigator:n}=A.useContext(oi),{matches:a}=A.useContext(Ti),{pathname:s}=Ui(),l=JSON.stringify(fg(a)),c=A.useRef(!1);return RE(()=>{c.current=!0}),A.useCallback((d,h={})=>{if(Ni(c.current,OE),!c.current)return;if(typeof d=="number"){n.go(d);return}let m=Xf(d,JSON.parse(l),s,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Ii([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,l,s,e])}var v2=A.createContext(null);function E2(e){let t=A.useContext(Ti).outlet;return A.useMemo(()=>t&&A.createElement(v2.Provider,{value:e},t),[t,e])}function jE(){let{matches:e}=A.useContext(Ti),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Rc(e,{relative:t}={}){let{matches:n}=A.useContext(Ti),{pathname:a}=Ui(),s=JSON.stringify(fg(n));return A.useMemo(()=>Xf(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function S2(e,t){return ME(e,t)}function ME(e,t,n){var N;jt(Hl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=A.useContext(oi),{matches:s}=A.useContext(Ti),l=s[s.length-1],c=l?l.params:{},f=l?l.pathname:"/",d=l?l.pathnameBase:"/",h=l&&l.route;{let k=h&&h.path||"";DE(f,!h||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let m=Ui(),b;if(t){let k=typeof t=="string"?Fl(t):t;jt(d==="/"||((N=k.pathname)==null?void 0:N.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${k.pathname}" was given in the \`location\` prop.`),b=k}else b=m;let x=b.pathname||"/",v=x;if(d!=="/"){let k=d.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(k.length).join("/")}let E=vE(e,{pathname:v});Ni(h||E!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Ni(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 "${b.pathname}${b.search}${b.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=C2(E&&E.map(k=>Object.assign({},k,{params:Object.assign({},c,k.params),pathname:Ii([d,a.encodeLocation?a.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?d:Ii([d,a.encodeLocation?a.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),s,n);return t&&w?A.createElement(Oc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},w):w}function w2(){let e=j2(),t=o2(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=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:l},"ErrorBoundary")," or"," ",A.createElement("code",{style:l},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:s},n):null,c)}var k2=A.createElement(w2,null),LE=class extends A.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=b2(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(Ti.Provider,{value:this.props.routeContext},A.createElement(dg.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(N2,{error:e},t):t}};LE.contextType=CE;var Mp=new WeakMap;function N2({children:e,error:t}){let{basename:n}=A.useContext(oi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=g2(t.digest);if(a){let s=Mp.get(t);if(s)throw s;let l=NE(a.location,n);if(kE&&!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 A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function _2({routeContext:e,match:t,children:n}){let a=A.useContext(ql);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(Ti.Provider,{value:e},n)}function C2(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 m=s.findIndex(b=>b.route.id&&(l==null?void 0:l[b.route.id])!==void 0);jt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,m+1))}let c=!1,f=-1;if(n&&a){c=a.renderFallback;for(let m=0;m<s.length;m++){let b=s[m];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(f=m),b.route.id){let{loaderData:x,errors:v}=a,E=b.route.loader&&!x.hasOwnProperty(b.route.id)&&(!v||v[b.route.id]===void 0);if(b.route.lazy||E){n.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let d=n==null?void 0:n.onError,h=a&&d?(m,b)=>{var x,v;d(m,{location:a.location,params:((v=(x=a.matches)==null?void 0:x[0])==null?void 0:v.params)??{},unstable_pattern:c2(a.matches),errorInfo:b})}:void 0;return s.reduceRight((m,b,x)=>{let v,E=!1,w=null,N=null;a&&(v=l&&b.route.id?l[b.route.id]:void 0,w=b.route.errorElement||k2,c&&(f<0&&x===0?(DE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,N=null):f===x&&(E=!0,N=b.route.hydrateFallbackElement||null)));let k=t.concat(s.slice(0,x+1)),T=()=>{let C;return v?C=w:E?C=N:b.route.Component?C=A.createElement(b.route.Component,null):b.route.element?C=b.route.element:C=m,A.createElement(_2,{match:b,routeContext:{outlet:m,matches:k,isDataRoute:a!=null},children:C})};return a&&(b.route.ErrorBoundary||b.route.errorElement||x===0)?A.createElement(LE,{location:a.location,revalidation:a.revalidation,component:w,error:v,children:T(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:h}):T()},null)}function hg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function T2(e){let t=A.useContext(ql);return jt(t,hg(e)),t}function A2(e){let t=A.useContext(Zf);return jt(t,hg(e)),t}function O2(e){let t=A.useContext(Ti);return jt(t,hg(e)),t}function pg(e){let t=O2(e),n=t.matches[t.matches.length-1];return jt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function R2(){return pg("useRouteId")}function j2(){var a;let e=A.useContext(dg),t=A2("useRouteError"),n=pg("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function M2(){let{router:e}=T2("useNavigate"),t=pg("useNavigate"),n=A.useRef(!1);return RE(()=>{n.current=!0}),A.useCallback(async(s,l={})=>{Ni(n.current,OE),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var d0={};function DE(e,t,n){!t&&!d0[e]&&(d0[e]=!0,Ni(!1,n))}A.memo(L2);function L2({routes:e,future:t,state:n,isStatic:a,onError:s}){return ME(e,void 0,{state:n,isStatic:a,onError:s})}function D2({to:e,replace:t,state:n,relative:a}){jt(Hl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=A.useContext(oi);Ni(!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}=A.useContext(Ti),{pathname:c}=Ui(),f=_r(),d=Xf(e,fg(l),c,a==="path"),h=JSON.stringify(d);return A.useEffect(()=>{f(JSON.parse(h),{replace:t,state:n,relative:a})},[f,h,a,t,n]),null}function I2(e){return E2(e.context)}function $n(e){jt(!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 z2({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:l=!1,unstable_useTransitions:c}){jt(!Hl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=A.useMemo(()=>({basename:f,navigator:s,static:l,unstable_useTransitions:c,future:{}}),[f,s,l,c]);typeof n=="string"&&(n=Fl(n));let{pathname:h="/",search:m="",hash:b="",state:x=null,key:v="default",unstable_mask:E}=n,w=A.useMemo(()=>{let N=Ma(h,f);return N==null?null:{location:{pathname:N,search:m,hash:b,state:x,key:v,unstable_mask:E},navigationType:a}},[f,h,m,b,x,v,a,E]);return Ni(w!=null,`<Router basename="${f}"> is not able to match the URL "${h}${m}${b}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:A.createElement(oi.Provider,{value:d},A.createElement(Oc.Provider,{children:t,value:w}))}function U2({children:e,location:t}){return S2(Om(e),t)}function Om(e,t=[]){let n=[];return A.Children.forEach(e,(a,s)=>{if(!A.isValidElement(a))return;let l=[...t,s];if(a.type===A.Fragment){n.push.apply(n,Om(a.props.children,l));return}jt(a.type===$n,`[${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>`),jt(!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 kf="get",Nf="application/x-www-form-urlencoded";function Jf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function B2(e){return Jf(e)&&e.tagName.toLowerCase()==="button"}function $2(e){return Jf(e)&&e.tagName.toLowerCase()==="form"}function P2(e){return Jf(e)&&e.tagName.toLowerCase()==="input"}function F2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function q2(e,t){return e.button===0&&(!t||t==="_self")&&!F2(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 H2(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 sf=null;function K2(){if(sf===null)try{new FormData(document.createElement("form"),0),sf=!1}catch{sf=!0}return sf}var G2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lp(e){return e!=null&&!G2.has(e)?(Ni(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Nf}"`),null):e}function Q2(e,t){let n,a,s,l,c;if($2(e)){let f=e.getAttribute("action");a=f?Ma(f,t):null,n=e.getAttribute("method")||kf,s=Lp(e.getAttribute("enctype"))||Nf,l=new FormData(e)}else if(B2(e)||P2(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(a=d?Ma(d,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||kf,s=Lp(e.getAttribute("formenctype"))||Lp(f.getAttribute("enctype"))||Nf,l=new FormData(f,e),!K2()){let{name:h,type:m,value:b}=e;if(m==="image"){let x=h?`${h}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else h&&l.append(h,b)}}else{if(Jf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=kf,a=null,s=Nf,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 IE(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&&Ma(s.pathname,t)==="/"?s.pathname=`${Lf(t)}/_root.${a}`:s.pathname=`${Lf(s.pathname)}.${a}`,s}async function V2(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 Y2(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 W2(e,t,n){let a=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let c=await V2(l,n);return c.links?c.links():[]}return[]}));return eT(a.flat(1).filter(Y2).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=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,f=(d,h)=>{var m;return n[h].pathname!==d.pathname||((m=n[h].route.path)==null?void 0:m.endsWith("*"))&&n[h].params["*"]!==d.params["*"]};return l==="assets"?t.filter((d,h)=>c(d,h)||f(d,h)):l==="data"?t.filter((d,h)=>{var b;let m=a.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let x=d.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((b=n[0])==null?void 0:b.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function X2(e,t,{includeHydrateFallback:n}={}){return Z2(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 Z2(e){return[...new Set(e)]}function J2(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(J2(s));return n.has(l)||(n.add(l),a.push({key:l,link:s})),a},[])}function gg(){let e=A.useContext(ql);return mg(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tT(){let e=A.useContext(Zf);return mg(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bg=A.createContext(void 0);bg.displayName="FrameworkContext";function yg(){let e=A.useContext(bg);return mg(e,"You must render this element inside a <HydratedRouter> element"),e}function nT(e,t){let n=A.useContext(bg),[a,s]=A.useState(!1),[l,c]=A.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:m,onTouchStart:b}=t,x=A.useRef(null);A.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=k=>{k.forEach(T=>{c(T.isIntersecting)})},N=new IntersectionObserver(w,{threshold:.5});return x.current&&N.observe(x.current),()=>{N.disconnect()}}},[e]),A.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(f,v),onBlur:Zo(d,E),onMouseEnter:Zo(h,v),onMouseLeave:Zo(m,E),onTouchStart:Zo(b,v)}]:[!1,x,{}]}function Zo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function iT({page:e,...t}){let n=f2(),{router:a}=gg(),s=A.useMemo(()=>vE(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?A.createElement(rT,{page:e,matches:s,...t}):A.createElement(sT,{page:e,matches:s,...t}):null}function aT(e){let{manifest:t,routeModules:n}=yg(),[a,s]=A.useState([]);return A.useEffect(()=>{let l=!1;return W2(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=A.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=IE(e,l,s.unstable_trailingSlashAwareDataRequests,"rsc"),d=!1,h=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?d=!0:h.push(m.route.id);return d&&h.length>0&&f.searchParams.set("_routes",h.join(",")),[f.pathname+f.search]},[l,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return A.createElement(A.Fragment,null,c.map(f=>A.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...n})))}function sT({page:e,matches:t,...n}){let a=Ui(),{future:s,manifest:l,routeModules:c}=yg(),{basename:f}=gg(),{loaderData:d,matches:h}=tT(),m=A.useMemo(()=>h0(e,t,h,l,a,"data"),[e,t,h,l,a]),b=A.useMemo(()=>h0(e,t,h,l,a,"assets"),[e,t,h,l,a]),x=A.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,N=!1;if(t.forEach(T=>{var R;let C=l.routes[T.route.id];!C||!C.hasLoader||(!m.some(B=>B.route.id===T.route.id)&&T.route.id in d&&((R=c[T.route.id])!=null&&R.shouldRevalidate)||C.hasClientLoader?N=!0:w.add(T.route.id))}),w.size===0)return[];let k=IE(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return N&&w.size>0&&k.searchParams.set("_routes",t.filter(T=>w.has(T.route.id)).map(T=>T.route.id).join(",")),[k.pathname+k.search]},[f,s.unstable_trailingSlashAwareDataRequests,d,a,l,m,t,e,c]),v=A.useMemo(()=>X2(b,l),[b,l]),E=aT(b);return A.createElement(A.Fragment,null,x.map(w=>A.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),v.map(w=>A.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),E.map(({key:w,link:N})=>A.createElement("link",{key:w,nonce:n.nonce,...N,crossOrigin:N.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=A.useRef();s.current==null&&(s.current=UC({window:a,v5Compat:!0}));let l=s.current,[c,f]=A.useState({action:l.action,location:l.location}),d=A.useCallback(h=>{n===!1?f(h):A.startTransition(()=>f(h))},[n]);return A.useLayoutEffect(()=>l.listen(d),[l,d]),A.createElement(z2,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,unstable_useTransitions:n})}var zE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bs=A.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:l,replace:c,unstable_mask:f,state:d,target:h,to:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:v,...E},w){let{basename:N,navigator:k,unstable_useTransitions:T}=A.useContext(oi),C=typeof m=="string"&&zE.test(m),R=NE(m,N);m=R.to;let B=y2(m,{relative:s}),j=Ui(),$=null;if(f){let te=Xf(f,[],j.unstable_mask?j.unstable_mask.pathname:"/",!0);N!=="/"&&(te.pathname=te.pathname==="/"?N:Ii([N,te.pathname])),$=k.createHref(te)}let[q,ee,L]=nT(a,E),Z=dT(m,{replace:c,unstable_mask:f,state:d,target:h,preventScrollReset:b,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:T});function ie(te){t&&t(te),te.defaultPrevented||Z(te)}let be=!(R.isExternal||l),ue=A.createElement("a",{...E,...L,href:(be?$:void 0)||R.absoluteURL||B,onClick:be?ie:t,ref:lT(w,ee),target:h,"data-discover":!C&&n==="render"?"true":void 0});return q&&!C?A.createElement(A.Fragment,null,ue,A.createElement(iT,{page:B})):ue});bs.displayName="Link";var UE=A.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:l,to:c,viewTransition:f,children:d,...h},m){let b=Rc(c,{relative:h.relative}),x=Ui(),v=A.useContext(Zf),{navigator:E,basename:w}=A.useContext(oi),N=v!=null&&bT(b)&&f===!0,k=E.encodeLocation?E.encodeLocation(b).pathname:b.pathname,T=x.pathname,C=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(T=T.toLowerCase(),C=C?C.toLowerCase():null,k=k.toLowerCase()),C&&w&&(C=Ma(C,w)||C);const R=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let B=T===k||!s&&T.startsWith(k)&&T.charAt(R)==="/",j=C!=null&&(C===k||!s&&C.startsWith(k)&&C.charAt(k.length)==="/"),$={isActive:B,isPending:j,isTransitioning:N},q=B?t:void 0,ee;typeof a=="function"?ee=a($):ee=[a,B?"active":null,j?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let L=typeof l=="function"?l($):l;return A.createElement(bs,{...h,"aria-current":q,className:ee,ref:m,style:L,to:c,viewTransition:f},typeof d=="function"?d($):d)});UE.displayName="NavLink";var uT=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:l,method:c=kf,action:f,onSubmit:d,relative:h,preventScrollReset:m,viewTransition:b,unstable_defaultShouldRevalidate:x,...v},E)=>{let{unstable_useTransitions:w}=A.useContext(oi),N=mT(),k=gT(f,{relative:h}),T=c.toLowerCase()==="get"?"get":"post",C=typeof f=="string"&&zE.test(f),R=B=>{if(d&&d(B),B.defaultPrevented)return;B.preventDefault();let j=B.nativeEvent.submitter,$=(j==null?void 0:j.getAttribute("formmethod"))||c,q=()=>N(j||B.currentTarget,{fetcherKey:t,method:$,navigate:n,replace:s,state:l,relative:h,preventScrollReset:m,viewTransition:b,unstable_defaultShouldRevalidate:x});w&&n!==!1?A.startTransition(()=>q()):q()};return A.createElement("form",{ref:E,method:T,action:k,onSubmit:a?d:R,...v,"data-discover":!C&&e==="render"?"true":void 0})});uT.displayName="Form";function fT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function BE(e){let t=A.useContext(ql);return jt(t,fT(e)),t}function dT(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h}={}){let m=_r(),b=Ui(),x=Rc(e,{relative:c});return A.useCallback(v=>{if(q2(v,t)){v.preventDefault();let E=n!==void 0?n:mc(b)===mc(x),w=()=>m(e,{replace:E,unstable_mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});h?A.startTransition(()=>w()):w()}},[b,m,x,n,a,s,t,e,l,c,f,d,h])}function $E(e){Ni(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=A.useRef(Rm(e)),n=A.useRef(!1),a=Ui(),s=A.useMemo(()=>H2(a.search,n.current?null:t.current),[a.search]),l=_r(),c=A.useCallback((f,d)=>{const h=Rm(typeof f=="function"?f(new URLSearchParams(s)):f);n.current=!0,l("?"+h,d)},[l,s]);return[s,c]}var hT=0,pT=()=>`__${String(++hT)}__`;function mT(){let{router:e}=BE("useSubmit"),{basename:t}=A.useContext(oi),n=R2(),a=e.fetch,s=e.navigate;return A.useCallback(async(l,c={})=>{let{action:f,method:d,encType:h,formData:m,body:b}=Q2(l,t);if(c.navigate===!1){let x=c.fetcherKey||pT();await a(x,n,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:m,body:b,formMethod:c.method||d,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:m,body:b,formMethod:c.method||d,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}=A.useContext(oi),a=A.useContext(Ti);jt(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 f=new URLSearchParams(l.search),d=f.getAll("index");if(d.some(m=>m==="")){f.delete("index"),d.filter(b=>b).forEach(b=>f.append("index",b));let m=f.toString();l.search=m?`?${m}`:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:Ii([n,l.pathname])),mc(l)}function bT(e,{relative:t}={}){let n=A.useContext(TE);jt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=BE("useViewTransitionState"),s=Rc(e,{relative:t});if(!n.isTransitioning)return!1;let l=Ma(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Ma(n.nextLocation.pathname,a)||n.nextLocation.pathname;return Mf(s.pathname,c)!=null||Mf(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];ds(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];ds(t[0])&&p0[t[0]]||(ds(t[0])&&(p0[t[0]]=new Date),yT(...t))}const PE=(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,PE(e,n))},g0=(e,t,n,a)=>{ds(n)&&(n=[n]),n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,PE(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=(f,d)=>{const h=t.services.backendConnector.state[`${f}|${d}`];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)},ds=e=>typeof e=="string",ET=e=>typeof e=="object"&&e!==null,ST=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,wT={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},kT=e=>wT[e],NT=e=>e.replace(ST,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 FE;const TT=e=>{FE=e},AT=()=>FE,OT={type:"3rdParty",init(e){_T(e.options.react),TT(e)}},RT=A.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=A.useRef();return A.useEffect(()=>{n.current=e},[e,t]),n.current},qE=(e,t,n,a)=>e.getFixedT(t,n,a),LT=(e,t,n,a)=>A.useCallback(qE(e,t,n,a),[e,t,n,a]),ps=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:a,defaultNS:s}=A.useContext(RT)||{},l=n||a||AT();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new jT),!l){jm("You will need to pass in an i18next instance by using initReactI18next");const R=(j,$)=>ds($)?$:ET($)&&ds($.defaultValue)?$.defaultValue:Array.isArray(j)?j[j.length-1]:j,B=[R,{},!1];return B.t=R,B.i18n={},B.ready=!1,B}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:f,keyPrefix:d}=c;let h=e||s||l.options&&l.options.defaultNS;h=ds(h)?[h]:h||["translation"],l.reportNamespaces.addUsedNamespaces&&l.reportNamespaces.addUsedNamespaces(h);const m=(l.isInitialized||l.initializedStoreOnce)&&h.every(R=>vT(R,l,c)),b=LT(l,t.lng||null,c.nsMode==="fallback"?h:h[0],d),x=()=>b,v=()=>qE(l,t.lng||null,c.nsMode==="fallback"?h:h[0],d),[E,w]=A.useState(x);let N=h.join();t.lng&&(N=`${t.lng}${N}`);const k=MT(N),T=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:B}=c;T.current=!0,!m&&!f&&(t.lng?g0(l,t.lng,h,()=>{T.current&&w(v)}):m0(l,h,()=>{T.current&&w(v)})),m&&k&&k!==N&&T.current&&w(v);const j=()=>{T.current&&w(v)};return R&&l&&l.on(R,j),B&&l&&l.store.on(B,j),()=>{T.current=!1,R&&l&&R.split(" ").forEach($=>l.off($,j)),B&&l&&B.split(" ").forEach($=>l.store.off($,j))}},[l,N]),A.useEffect(()=>{T.current&&m&&w(x)},[l,d,m]);const C=[E,l,m];if(C.t=E,C.i18n=l,C.ready=m,m||!m&&!f)return C;throw new Promise(R=>{t.lng?g0(l,t.lng,h,()=>R()):m0(l,h,()=>R())})};/**
|
|
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 DT=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)},HE=(...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 UT={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 BT=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:l,iconNode:c,...f},d)=>A.createElement("svg",{ref:d,...UT,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:HE("lucide",s),...!l&&!zT(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>A.createElement(h,m)),...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=A.forwardRef(({className:a,...s},l)=>A.createElement(BT,{ref:l,iconNode:t,className:HE(`lucide-${DT(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 $T=[["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"}]],ed=Ce("activity",$T);/**
|
|
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 PT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],KE=Ce("arrow-left",PT);/**
|
|
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 FT=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],qT=Ce("arrow-up",FT);/**
|
|
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 HT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],KT=Ce("check",HT);/**
|
|
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 QT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],td=Ce("chevron-right",QT);/**
|
|
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 VT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],YT=Ce("chevron-up",VT);/**
|
|
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"}]],Lm=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"}]],eA=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 tA=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nA=Ce("clock",tA);/**
|
|
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 iA=[["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"}]],aA=Ce("copy",iA);/**
|
|
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 rA=[["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"}]],GE=Ce("download",rA);/**
|
|
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 sA=[["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"}]],lA=Ce("eye",sA);/**
|
|
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 oA=[["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",oA);/**
|
|
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 cA=[["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",cA);/**
|
|
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 uA=[["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"}]],fA=Ce("flame",uA);/**
|
|
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 dA=[["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"}]],hA=Ce("folder-git-2",dA);/**
|
|
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 pA=[["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"}]],QE=Ce("folder-open",pA);/**
|
|
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 mA=[["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",mA);/**
|
|
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 gA=[["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"}]],bA=Ce("funnel",gA);/**
|
|
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 yA=[["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"}]],xA=Ce("git-branch",yA);/**
|
|
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 vA=[["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"}]],VE=Ce("globe",vA);/**
|
|
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 EA=[["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"}]],SA=Ce("history",EA);/**
|
|
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 wA=[["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"}]],kA=Ce("house",wA);/**
|
|
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 NA=[["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"}]],_A=Ce("image",NA);/**
|
|
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 CA=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],TA=Ce("kanban",CA);/**
|
|
221
|
+
* @license lucide-react v0.544.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const AA=[["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"}]],OA=Ce("layout-grid",AA);/**
|
|
226
|
+
* @license lucide-react v0.544.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const RA=[["path",{d:"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"}]],jA=Ce("link",RA);/**
|
|
231
|
+
* @license lucide-react v0.544.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const MA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],zt=Ce("loader-circle",MA);/**
|
|
236
|
+
* @license lucide-react v0.544.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const LA=[["path",{d:"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",LA);/**
|
|
241
|
+
* @license lucide-react v0.544.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const DA=[["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"}]],IA=Ce("message-square",DA);/**
|
|
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 zA=[["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"}]],UA=Ce("paperclip",zA);/**
|
|
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 BA=[["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"}]],$A=Ce("pause",BA);/**
|
|
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 PA=[["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",PA);/**
|
|
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 FA=[["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",FA);/**
|
|
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 qA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bi=Ce("plus",qA);/**
|
|
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 HA=[["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"}]],YE=Ce("radio",HA);/**
|
|
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 KA=[["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",KA);/**
|
|
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 GA=[["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"}]],WE=Ce("rotate-ccw",GA);/**
|
|
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 QA=[["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"}]],nd=Ce("save",QA);/**
|
|
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 VA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Df=Ce("search",VA);/**
|
|
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 YA=[["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"}]],WA=Ce("send",YA);/**
|
|
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 XA=[["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"}]],XE=Ce("settings",XA);/**
|
|
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 ZA=[["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"}]],JA=Ce("skull",ZA);/**
|
|
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"}]],ZE=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"}]],JE=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"}]],eS=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"}]],tS=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 fO=[["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"}]],nS=Ce("wrench",fO);/**
|
|
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 dO=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_i=Ce("x",dO);/**
|
|
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),Ue=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,E0=e=>e&&e.indexOf("###")>-1?e.replace(gO,"."):e,S0=e=>!e||Ue(e),oc=(e,t,n)=>{const a=Ue(t)?t.split("."):t;let s=0;for(;s<a.length-1;){if(S0(e))return{};const l=E0(a[s]);!e[l]&&n&&(e[l]=new n),Object.prototype.hasOwnProperty.call(e,l)?e=e[l]:e={},++s}return S0(e)?{}:{obj:e,k:E0(a[s])}},w0=(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),f=oc(e,c,Object);for(;f.obj===void 0&&c.length;)l=`${c[c.length-1]}.${l}`,c=c.slice(0,c.length-1),f=oc(e,c,Object),f&&f.obj&&typeof f.obj[`${f.k}.${l}`]<"u"&&(f.obj=void 0);f.obj[`${f.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)},If=(e,t)=>{const{obj:n,k:a}=oc(e,t);if(n)return n[a]},yO=(e,t,n)=>{const a=If(e,n);return a!==void 0?a:If(t,n)},iS=(e,t,n)=>{for(const a in t)a!=="__proto__"&&a!=="constructor"&&(a in e?Ue(e[a])||e[a]instanceof String||Ue(t[a])||t[a]instanceof String?n&&(e[a]=t[a]):iS(e[a],t[a],n):e[a]=t[a]);return e},ll=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var xO={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const vO=e=>Ue(e)?e.replace(/[&<>"'\/]/g,t=>xO[t]):e;class EO{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 SO=[" ",",","?","!",";"],wO=new EO(20),kO=(e,t,n)=>{t=t||"",n=n||"";const a=SO.filter(c=>t.indexOf(c)<0&&n.indexOf(c)<0);if(a.length===0)return!0;const s=wO.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},Dm=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,f="";for(let d=l;d<a.length;++d)if(d!==l&&(f+=n),f+=a[d],c=s[f],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&d<a.length-1)continue;l+=d-l+1;break}s=c}return s},zf=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 Uf{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:(Ue(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Uf(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Uf(this.logger,t)}}var ea=new Uf;class id{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[f,d]=c;for(let h=0;h<d;h++)f(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(c=>{let[f,d]=c;for(let h=0;h<d;h++)f.apply(f,[t,...a])})}}class k0 extends id{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 f;t.indexOf(".")>-1?f=t.split("."):(f=[t,n],a&&(Array.isArray(a)?f.push(...a):Ue(a)&&l?f.push(...a.split(l)):f.push(a)));const d=If(this.data,f);return!d&&!n&&!a&&t.indexOf(".")>-1&&(t=f[0],n=f[1],a=f.slice(2).join(".")),d||!c||!Ue(a)?d:Dm(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 f=[t,n];a&&(f=f.concat(c?a.split(c):a)),t.indexOf(".")>-1&&(f=t.split("."),s=n,n=f[1]),this.addNamespaces(n),w0(this.data,f,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)(Ue(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},f=[t,n];t.indexOf(".")>-1&&(f=t.split("."),s=a,a=n,n=f[1]),this.addNamespaces(n);let d=If(this.data,f)||{};c.skipCopy||(a=JSON.parse(JSON.stringify(a))),s?iS(d,a,l):d={...d,...a},w0(this.data,f,d),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 aS={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 Bf extends id{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=ea.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,f=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!kO(t,a,s);if(c&&!f){const d=t.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:t,namespaces:Ue(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:Ue(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:f}=this.extractFromKey(t[t.length-1],n),d=f[f.length-1],h=n.lng||this.language,m=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(m){const R=n.nsSeparator||this.options.nsSeparator;return s?{res:`${d}${R}${c}`,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:`${d}${R}${c}`}return s?{res:c,usedKey:c,exactUsedKey:c,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:c}const b=this.resolve(t,n);let x=b&&b.res;const v=b&&b.usedKey||c,E=b&&b.exactUsedKey||c,w=Object.prototype.toString.apply(x),N=["[object Number]","[object Function]","[object RegExp]"],k=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,C=!Ue(x)&&typeof x!="boolean"&&typeof x!="number";if(T&&x&&C&&N.indexOf(w)<0&&!(Ue(k)&&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 R=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,x,{...n,ns:f}):`key '${c} (${this.language})' returned an object instead of string.`;return s?(b.res=R,b.usedParams=this.getUsedParamsDetails(n),b):R}if(l){const R=Array.isArray(x),B=R?[]:{},j=R?E:v;for(const $ in x)if(Object.prototype.hasOwnProperty.call(x,$)){const q=`${j}${l}${$}`;B[$]=this.translate(q,{...n,joinArrays:!1,ns:f}),B[$]===q&&(B[$]=x[$])}x=B}}else if(T&&Ue(k)&&Array.isArray(x))x=x.join(k),x&&(x=this.extendTranslation(x,t,n,a));else{let R=!1,B=!1;const j=n.count!==void 0&&!Ue(n.count),$=Bf.hasDefaultValue(n),q=j?this.pluralResolver.getSuffix(h,n.count,n):"",ee=n.ordinal&&j?this.pluralResolver.getSuffix(h,n.count,{ordinal:!1}):"",L=j&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Z=L&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${q}`]||n[`defaultValue${ee}`]||n.defaultValue;!this.isValidLookup(x)&&$&&(R=!0,x=Z),this.isValidLookup(x)||(B=!0,x=c);const be=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:x,ue=$&&Z!==x&&this.options.updateMissing;if(B||R||ue){if(this.logger.log(ue?"updateKey":"missingKey",h,d,c,ue?Z:x),l){const K=this.resolve(c,{...n,keySeparator:!1});K&&K.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 te=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let K=0;K<F.length;K++)te.push(F[K]);else this.options.saveMissingTo==="all"?te=this.languageUtils.toResolveHierarchy(n.lng||this.language):te.push(n.lng||this.language);const oe=(K,pe,M)=>{const D=$&&M!==x?M:be;this.options.missingKeyHandler?this.options.missingKeyHandler(K,d,pe,D,ue,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(K,d,pe,D,ue,n),this.emit("missingKey",K,d,pe,x)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?te.forEach(K=>{const pe=this.pluralResolver.getSuffixes(K,n);L&&n[`defaultValue${this.options.pluralSeparator}zero`]&&pe.indexOf(`${this.options.pluralSeparator}zero`)<0&&pe.push(`${this.options.pluralSeparator}zero`),pe.forEach(M=>{oe([K],c+M,n[`defaultValue${M}`]||Z)})}):oe(te,c,Z))}x=this.extendTranslation(x,t,n,b,a),B&&x===c&&this.options.appendNamespaceToMissingKey&&(x=`${d}:${c}`),(B||R)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?x=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}:${c}`:c,R?x:void 0):x=this.options.parseMissingKeyHandler(x))}return s?(b.res=x,b.usedParams=this.getUsedParamsDetails(n),b):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=Ue(t)&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(h){const x=t.match(this.interpolator.nestingRegexp);m=x&&x.length}let b=a.replace&&!Ue(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),t=this.interpolator.interpolate(t,b,a.lng||this.language||s.usedLng,a),h){const x=t.match(this.interpolator.nestingRegexp),v=x&&x.length;m<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 f=a.postProcess||this.options.postProcess,d=Ue(f)?[f]:f;return t!=null&&d&&d.length&&a.applyPostProcessor!==!1&&(t=aS.handle(d,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,f;return Ue(t)&&(t=[t]),t.forEach(d=>{if(this.isValidLookup(a))return;const h=this.extractFromKey(d,n),m=h.key;s=m;let b=h.namespaces;this.options.fallbackNS&&(b=b.concat(this.options.fallbackNS));const x=n.count!==void 0&&!Ue(n.count),v=x&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),E=n.context!==void 0&&(Ue(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);b.forEach(N=>{this.isValidLookup(a)||(f=N,!N0[`${w[0]}-${N}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(f)&&(N0[`${w[0]}-${N}`]=!0,this.logger.warn(`key "${s}" for languages "${w.join(", ")}" won't get resolved as namespace "${f}" 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(k=>{if(this.isValidLookup(a))return;c=k;const T=[m];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(T,m,k,N,n);else{let R;x&&(R=this.pluralResolver.getSuffix(k,n.count,n));const B=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(T.push(m+R),n.ordinal&&R.indexOf(j)===0&&T.push(m+R.replace(j,this.options.pluralSeparator)),v&&T.push(m+B)),E){const $=`${m}${this.options.contextSeparator}${n.context}`;T.push($),x&&(T.push($+R),n.ordinal&&R.indexOf(j)===0&&T.push($+R.replace(j,this.options.pluralSeparator)),v&&T.push($+B))}}let C;for(;C=T.pop();)this.isValidLookup(a)||(l=C,a=this.getResource(k,N,C,n))}))})}),{res:a,usedKey:s,exactUsedKey:l,usedLng:c,usedNS:f}}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&&!Ue(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 Dp=e=>e.charAt(0).toUpperCase()+e.slice(1);class _0{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ea.create("languageUtils")}getScriptPartFromCode(t){if(t=zf(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=zf(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Ue(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]=Dp(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]=Dp(a[1].toLowerCase())),n.indexOf(a[2].toLowerCase())>-1&&(a[2]=Dp(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)),Ue(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 Ue(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))):Ue(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 TO=["v1","v2","v3"],AO=["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=ea.create("pluralResolver"),(!this.options.compatibilityJSON||AO.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=zf(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 d=this.languageUtils.getLanguagePartFromCode(t);c=this.getRule(d,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!TO.includes(this.options.compatibilityJSON)}}const T0=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&&Ue(n)&&(l=Dm(e,n,a),l===void 0&&(l=Dm(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=ea.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:f,suffixEscaped:d,formatSeparator:h,unescapeSuffix:m,unescapePrefix:b,nestingPrefix:x,nestingPrefixEscaped:v,nestingSuffix:E,nestingSuffixEscaped:w,nestingOptionsSeparator:N,maxReplaces:k,alwaysFormat:T}=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=f?ll(f):d||"}}",this.formatSeparator=h||",",this.unescapePrefix=m?"":b||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=x?ll(x):v||ll("$t("),this.nestingSuffix=E?ll(E):w||ll(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=k||1e3,this.alwaysFormat=T!==void 0?T:!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,f;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=v=>{if(v.indexOf(this.formatSeparator)<0){const k=T0(n,d,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,a,{...s,...n,interpolationkey:v}):k}const E=v.split(this.formatSeparator),w=E.shift().trim(),N=E.join(this.formatSeparator).trim();return this.format(T0(n,d,w,this.options.keySeparator,this.options.ignoreJSONStructure),N,a,{...s,...n,interpolationkey:w})};this.resetRegExp();const m=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,b=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(f=0;l=v.regex.exec(t);){const E=l[1].trim();if(c=h(E),c===void 0)if(typeof m=="function"){const N=m(t,l,s);c=Ue(N)?N:""}else if(s&&Object.prototype.hasOwnProperty.call(s,E))c="";else if(b){c=l[0];continue}else this.logger.warn(`missed to pass in variable ${E} for interpolating ${t}`),c="";else!Ue(c)&&!this.useRawValueToEscape&&(c=v0(c));const w=v.safeValue(c);if(t=t.replace(l[0],w),b?(v.regex.lastIndex+=c.length,v.regex.lastIndex-=l[0].length):v.regex.lastIndex=0,f++,f>=this.maxReplaces)break}}),t}nest(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,l,c;const f=(d,h)=>{const m=this.nestingOptionsSeparator;if(d.indexOf(m)<0)return d;const b=d.split(new RegExp(`${m}[ ]*{`));let x=`{${b[1]}`;d=b[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 ${d}`,w),`${d}${m}${x}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,d};for(;s=this.nestingRegexp.exec(t);){let d=[];c={...a},c=c.replace&&!Ue(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 m=s[1].split(this.formatSeparator).map(b=>b.trim());s[1]=m.shift(),d=m,h=!0}if(l=n(f.call(this,s[1].trim(),c),c),l&&s[0]===t&&!Ue(l))return l;Ue(l)||(l=v0(l)),l||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),l=""),h&&(l=d.reduce((m,b)=>this.format(m,b,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[f,...d]=c.split(":"),h=d.join(":").trim().replace(/^'+|'+$/g,""),m=f.trim();n[m]||(n[m]=h),h==="false"&&(n[m]=!1),h==="true"&&(n[m]=!0),isNaN(h)||(n[m]=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 f=t[c];return f||(f=e(zf(a),s),t[c]=f),f(n)}};class LO{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ea.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(f=>f.indexOf(")")>-1)){const f=l.findIndex(d=>d.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,f)].join(this.formatSeparator)}return l.reduce((f,d)=>{const{formatName:h,formatOptions:m}=MO(d);if(this.formats[h]){let b=f;try{const x=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},v=x.locale||x.lng||s.locale||s.lng||a;b=this.formats[h](f,v,{...m,...s,...x})}catch(x){this.logger.warn(x)}return b}else this.logger.warn(`there was no format function for ${h}`);return f},t)}}const DO=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class IO extends id{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=ea.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={},f={},d={};return t.forEach(h=>{let m=!0;n.forEach(b=>{const x=`${h}|${b}`;!a.reload&&this.store.hasResourceBundle(h,b)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?c[x]===void 0&&(c[x]=!0):(this.state[x]=1,m=!1,c[x]===void 0&&(c[x]=!0),l[x]===void 0&&(l[x]=!0),d[b]===void 0&&(d[b]=!0)))}),m||(f[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(f),toLoadNamespaces:Object.keys(d)}}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 f={};this.queue.forEach(d=>{bO(d.loaded,[l],c),DO(d,t),n&&d.errors.push(n),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(h=>{f[h]||(f[h]={});const m=d.loaded[h];m.length&&m.forEach(b=>{f[h][b]===void 0&&(f[h][b]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(d=>!d.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 f=(h,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const b=this.waitingReads.shift();this.read(b.lng,b.ns,b.fcName,b.tried,b.wait,b.callback)}if(h&&m&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,a,s+1,l*2,c)},l);return}c(h,m)},d=this.backend[a].bind(this.backend);if(d.length===2){try{const h=d(t,n);h&&typeof h.then=="function"?h.then(m=>f(null,m)).catch(f):f(null,h)}catch(h){f(h)}return}return d(t,n,f)}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();Ue(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ue(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,f)=>{c&&this.logger.warn(`${n}loading namespace ${l} for language ${s} failed`,c),!c&&f&&this.logger.log(`${n}loaded namespace ${l} for language ${s}`,f),this.loaded(t,c,f)})}saveMissing(t,n,a,s,l){let c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},f=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 d={...c,isUpdate:l},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(t,n,a,s,d):m=h(t,n,a,s),m&&typeof m.then=="function"?m.then(b=>f(null,b)).catch(f):f(null,m)}catch(m){f(m)}else h(t,n,a,s,f,d)}!t||!t[0]||this.store.addResource(t[0],n,a,s)}}}const A0=()=>({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]),Ue(e[1])&&(t.defaultValue=e[1]),Ue(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=>(Ue(e.ns)&&(e.ns=[e.ns]),Ue(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ue(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),lf=()=>{},zO=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class xc extends id{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=ea,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&&(Ue(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=A0();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=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?ea.init(l(this.modules.logger),this.options):ea.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:typeof Intl<"u"&&(m=LO);const b=new _0(this.options);this.store=new k0(this.options.resources,this.options);const x=this.services;x.logger=ea,x.resourceStore=this.store,x.languageUtils=b,x.pluralResolver=new RO(b,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(x.formatter=l(m),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),N=1;N<E;N++)w[N-1]=arguments[N];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 Bf(this.services,this.options),this.translator.on("*",function(v){for(var E=arguments.length,w=new Array(E>1?E-1:0),N=1;N<E;N++)w[N-1]=arguments[N];t.emit(v,...w)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,a||(a=lf),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=function(){return t.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return t.store[m](...arguments),t}});const d=Jo(),h=()=>{const m=(b,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),d.resolve(x),a(b,x)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}loadResources(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lf;const s=Ue(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=f=>{if(!f||f==="cimode")return;this.services.languageUtils.toResolveHierarchy(f).forEach(h=>{h!=="cimode"&&l.indexOf(h)<0&&l.push(h)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>c(d)),this.options.preload&&this.options.preload.forEach(f=>c(f)),this.services.backendConnector.load(l,this.options.ns,f=>{!f&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(f)})}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=lf),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"&&aS.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=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},c=(d,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(d,function(){return a.t(...arguments)})},f=d=>{!t&&!d&&this.services.languageDetector&&(d=[]);const h=Ue(d)?d:this.services.languageUtils.getBestMatchFromCodes(d);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,m=>{c(m,h)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(t),s}getFixedT(t,n,a){var s=this;const l=function(c,f){let d;if(typeof f!="object"){for(var h=arguments.length,m=new Array(h>2?h-2:0),b=2;b<h;b++)m[b-2]=arguments[b];d=s.options.overloadTranslationOptionHandler([c,f].concat(m))}else d={...f};d.lng=d.lng||l.lng,d.lngs=d.lngs||l.lngs,d.ns=d.ns||l.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||a||l.keyPrefix);const x=s.options.keySeparator||".";let v;return d.keyPrefix&&Array.isArray(c)?v=c.map(E=>`${d.keyPrefix}${x}${E}`):v=d.keyPrefix?`${d.keyPrefix}${x}${c}`:c,s.t(v,d)};return Ue(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=(f,d)=>{const h=this.services.backendConnector.state[`${f}|${d}`];return h===-1||h===0||h===2};if(n.precheck){const f=n.precheck(this,c);if(f!==void 0)return f}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?(Ue(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();Ue(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(A0());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]:lf;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(f=>{l[f]=this[f]}),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 Bf(l.services,s),l.translator.on("*",function(f){for(var d=arguments.length,h=new Array(d>1?d-1:0),m=1;m<d;m++)h[m-1]=arguments[m];l.emit(f,...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 vn=xc.createInstance();vn.createInstance=xc.createInstance;vn.createInstance;vn.dir;vn.init;vn.loadResources;vn.reloadResources;vn.use;vn.changeLanguage;vn.getFixedT;vn.t;vn.exists;vn.setDefaultNamespace;vn.hasLoadedNamespace;vn.loadNamespaces;vn.loadLanguages;const{slice:UO,forEach:BO}=[];function $O(e){return BO.call(UO.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function PO(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]+$/,FO=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=FO(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 qO={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)}},HO={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 f=0;f<c.length;f++){const d=c[f].indexOf("=");d>0&&c[f].substring(0,d)===t&&(n=c[f].substring(d+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 f=c.split("&");for(let d=0;d<f.length;d++){const h=f[d].indexOf("=");h>0&&f[d].substring(0,h)===t&&(a=f[d].substring(h+1))}}if(a)return a;if(!a&&n>-1){const f=l.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?(s=f[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 L0=()=>{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 QO={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&L0())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&L0()&&window.sessionStorage.setItem(n,e)}},VO={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 rS=!1;try{document.cookie,rS=!0}catch{}const sS=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];rS||sS.splice(1,1);const ZO=()=>({order:sS,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class lS{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=$O(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(qO),this.addDetector(HO),this.addDetector(GO),this.addDetector(QO),this.addDetector(VO),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&&!PO(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)}))}}lS.type="languageDetector";const JO="SPS Console",eR="New chat",tR="History",nR="{{count}} session",iR="{{count}} sessions",aR="{{count}} msg",rR="{{count}} msgs",sR={placeholder:"Say something… (Enter to send · Shift+Enter newline · drop or paste files)",send:"Send",stop:"Stop",stopped:"Stopped",attach:"Attach",removeAttachment:"Remove"},lR={streaming:"STREAMING",thinking:"Thinking…",tool:"Tool",toolResult:"Tool result"},oR={untitled:"New chat",rename:"Rename",delete:"Delete session",deleteConfirm:"Delete this session permanently?",switch:"Switch session",loadFailed:"Failed to load session",createFailed:"Failed to create session"},cR={label:"Working directory",placeholder:"Working directory (absolute path)",select:"Choose…",invalidAbsolute:"Working directory must be an absolute path",notFound:"Working directory not found"},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."},fR={title:JO,newSession:eR,history:tR,historyCount_one:nR,historyCount_other:iR,msgCount_one:aR,msgCount_other:rR,input:sR,assistant:lR,session:oR,cwd:cR,errors:uR},dR="Board",hR={Planning:"Planning",Backlog:"Backlog",Todo:"Todo",Inprogress:"In progress",QA:"QA Review",Done:"Done"},pR="{{count}} card",mR="{{count}} cards",gR="{{count}} active",bR="{{count}} active",yR="New card",xR={start:"Start",stop:"Stop",reset:"Reset",edit:"Edit",delete:"Delete",move:"Move",moveTo:"Move to {{state}}"},vR={title:"Title",description:"Description",checklist:"Checklist",log:"Log",skills:"Skills",labels:"Labels",created:"Created",claimed:"Claimed by",seq:"Seq"},ER={create:"Create card",edit:"Edit card",delete:"Delete card",deleteConfirm:"Delete card #{{seq}}?",deleteCannotUndo:"This action cannot be undone.",titleRequired:"Title is required",titlePlaceholder:"Short, imperative title",descPlaceholder:"Describe the task (optional)",checklistPlaceholder:"Add a checklist item",addItem:"Add item"},SR={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",isRunning:"Card is running; kill the worker or move it out of In progress first."},wR={title:dR,columns:hR,cardCount_one:pR,cardCount_other:mR,active_one:gR,active_other:bR,newCard:yR,actions:xR,card:vR,modal:ER,errors:SR},kR="Projects",NR={empty:"No projects yet — create one to get started.",create:"New project",name:"Name",repo:"Repository",status:"Status",cards:"Cards",lastTick:"Last tick"},_R={title:"Create project",name:"Project name",namePlaceholder:"e.g. my-app",nameHint:"Letters, digits, _ and - only.",repo:"Repository path",repoPlaceholder:"Absolute path to existing git repo",branch:"Default branch",enableGit:"Enable Git integration",enableWiki:"Enable Wiki knowledge base",enableWikiHint:"Adds wiki/ to the repo and auto-injects context into prompts.",create:"Create",cancel:"Cancel",creating:"Creating…",createFailed:"Failed to create project"},CR={overview:"Overview",config:"Configuration",pipeline:"Pipeline",danger:"Danger zone",delete:"Delete project",deleteConfirm:"Delete project {{name}}? This cannot be undone.",deleteHint:"Removes ~/.coral/projects/{{name}}/ but leaves the repo untouched.",deleteFailed:"Failed to delete project",deleteRunningPipeline:"Pipeline is running; stop it before deleting.",edit:"Edit conf",save:"Save",reload:"Reload",etagConflict:"Conf was modified by another editor; please reload."},TR={title:"Pipeline editor",active:"Active pipeline",switch:"Switch active",newPipeline:"New pipeline",namePlaceholder:"pipeline name (no extension)",namespaces:"Pipelines",save:"Save",delete:"Delete",deleteConfirm:"Delete pipeline {{name}}?",yamlInvalid:"Invalid YAML syntax",saveFailed:"Save failed",etagConflict:"Pipeline was modified by someone else; please reload.",filenameInvalid:"Invalid pipeline filename, or it must not be project.yaml"},AR={title:kR,list:NR,newProject:_R,detail:CR,pipelineEditor:TR},OR="Workers",RR="Capacity",jR="Running",MR="Free",LR="Total",DR="Stage",IR="PID",zR="Started",UR="Runtime",BR="Marker",$R="Kill worker",PR="Kill worker {{slot}}?",FR="Launch worker",qR="Log",HR="No active workers",KR="Select a project",GR={loadFailed:"Failed to load workers",killFailed:"Failed to kill worker",launchFailed:"Failed to launch worker"},QR={title:OR,capacity:RR,running:jR,free:MR,total:LR,stage:DR,pid:IR,started:zR,runtime:UR,marker:BR,kill:$R,killConfirm:PR,launch:FR,log:qR,noWorkers:HR,selectProject:KR,errors:GR},VR="Logs",YR={project:"Project",level:"Level",lines:"Lines",errOnly:"Errors only",clear:"Clear"},WR="Follow tail",XR="Paused",ZR="No logs to show",JR={loadFailed:"Failed to load logs"},ej={title:VR,filter:YR,follow:WR,paused:XR,noLogs:ZR,errors:JR},tj="Skills",nj="Sync bundled",ij="Syncing…",aj="Sync complete",rj="Sync failed",sj="Search skills",lj={all:"All",language:"Language",spec:"Spec",workflow:"Workflow",persona:"Persona"},oj={linked:"Linked in {{count}} project",linked_other:"Linked in {{count}} projects",freezeable:"Freezable",frozen:"Frozen",bundled:"Bundled",user:"User"},cj={link:"Link",unlink:"Unlink",freeze:"Freeze",unfreeze:"Unfreeze"},uj={loadFailed:"Failed to load skills",linkFailed:"Failed to link skill",unlinkFailed:"Failed to unlink skill"},fj={title:tj,syncBundled:nj,syncing:ij,syncDone:aj,syncFailed:rj,search:sj,filter:lj,card:oj,actions:cj,errors:uj},dj="System",hj={current:"Current version",latest:"Latest on npm",upgradeAvailable:"Upgrade available",upToDate:"Up to date",checking:"Checking…",upgrade:"Upgrade",upgrading:"Upgrading…"},pj={title:"Environment (~/.coral/env)",edit:"Edit",save:"Save",reload:"Reload",etagConflict:"Env was modified by another editor; please reload.",saveFailed:"Failed to save env"},mj={title:"Doctor",run:"Run health check",running:"Running…",lastRun:"Last run",passed:"passed",failed:"failed",warnings:"warnings"},gj={title:"Language",description:"Choose the console language. The CLI is always English."},bj={loadFailed:"Failed to load system info",pipelineRunning:"A pipeline is running; stop it before upgrading."},yj={title:dj,version:hj,env:pj,doctor:mj,locale:gj,errors:bj},xj={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"},vj={online:"online",offline:"offline",connecting:"connecting",ready:"ready",running:"running",stopped:"stopped",error:"error",idle:"idle"},Ej={chat:"Chat",projects:"Projects",board:"Board",workers:"Workers",logs:"Logs",skills:"Skills",system:"System"},Sj={generic:"Something went wrong",networkOffline:"Network is offline",notFound:"Not found",unauthorized:"Unauthorized",badRequest:"Bad request"},wj={noData:"No data",noResults:"No results"},kj={label:"Language",en:"English",zh:"中文"},Nj={actions:xj,status:vj,nav:Ej,errors:Sj,empty:wj,locale:kj},_j="SPS Console",Cj="新建对话",Tj="历史",Aj="{{count}} 个会话",Oj="{{count}} 个会话",Rj="{{count}} 条消息",jj="{{count}} 条消息",Mj={placeholder:"说点什么…(Enter 发送,Shift+Enter 换行,可拖入文件 / 粘贴图片)",send:"发送",stop:"中断",stopped:"已停止",attach:"附件",removeAttachment:"移除"},Lj={streaming:"STREAMING",thinking:"思考中…",tool:"工具",toolResult:"工具结果"},Dj={untitled:"新对话",rename:"重命名",delete:"删除会话",deleteConfirm:"永久删除该会话?",switch:"切换会话",loadFailed:"会话加载失败",createFailed:"会话创建失败"},Ij={label:"工作目录",placeholder:"工作目录(绝对路径)",select:"选择…",invalidAbsolute:"工作目录必须是绝对路径",notFound:"工作目录不存在"},zj={stillStreaming:"上一条消息还在生成中,先等完成或点中断",tooManyConcurrent:"最多同时 {{max}} 个 chat 会话在生成。先等其它完成或中断。"},Uj={title:_j,newSession:Cj,history:Tj,historyCount_one:Aj,historyCount_other:Oj,msgCount_one:Rj,msgCount_other:jj,input:Mj,assistant:Lj,session:Dj,cwd:Ij,errors:zj},Bj="看板",$j={Planning:"Planning",Backlog:"Backlog",Todo:"Todo",Inprogress:"进行中",QA:"QA Review",Done:"已完成"},Pj="{{count}} 张卡",Fj="{{count}} 张卡",qj="{{count}} 活跃",Hj="{{count}} 活跃",Kj="新建卡片",Gj={start:"启动",stop:"停止",reset:"重置",edit:"编辑",delete:"删除",move:"移动",moveTo:"移动到 {{state}}"},Qj={title:"标题",description:"描述",checklist:"检查清单",log:"日志",skills:"Skills",labels:"标签",created:"创建时间",claimed:"认领者",seq:"Seq"},Vj={create:"新建卡片",edit:"编辑卡片",delete:"删除卡片",deleteConfirm:"删除卡片 #{{seq}}?",deleteCannotUndo:"此操作无法撤销。",titleRequired:"标题不能为空",titlePlaceholder:"简短的、动词开头的标题",descPlaceholder:"描述任务(可选)",checklistPlaceholder:"添加一项检查",addItem:"添加"},Yj={loadFailed:"卡片加载失败",createFailed:"卡片创建失败",updateFailed:"卡片更新失败",deleteFailed:"卡片删除失败",moveFailed:"卡片移动失败",isRunning:"卡片正在运行,请先 kill worker 或移出 Inprogress"},Wj={title:Bj,columns:$j,cardCount_one:Pj,cardCount_other:Fj,active_one:qj,active_other:Hj,newCard:Kj,actions:Gj,card:Qj,modal:Vj,errors:Yj},Xj="项目",Zj={empty:"还没有项目 —— 创建一个开始吧。",create:"新建项目",name:"名称",repo:"仓库",status:"状态",cards:"卡片",lastTick:"上次 tick"},Jj={title:"创建项目",name:"项目名",namePlaceholder:"例如 my-app",nameHint:"只允许字母、数字、_ 和 -。",repo:"仓库路径",repoPlaceholder:"已存在的 git 仓库的绝对路径",branch:"默认分支",enableGit:"启用 Git 集成",enableWiki:"启用 Wiki 知识库",enableWikiHint:"在仓库下加 wiki/,并自动注入上下文到 prompt。",create:"创建",cancel:"取消",creating:"创建中…",createFailed:"项目创建失败"},eM={overview:"概览",config:"配置",pipeline:"流水线",danger:"危险操作",delete:"删除项目",deleteConfirm:"删除项目 {{name}}?此操作无法撤销。",deleteHint:"会移除 ~/.coral/projects/{{name}}/,但仓库本身不动。",deleteFailed:"项目删除失败",deleteRunningPipeline:"项目 pipeline 正在运行,先停止再删除",edit:"编辑 conf",save:"保存",reload:"重新加载",etagConflict:"Conf 已被其它编辑修改,请重新加载"},tM={title:"Pipeline 编辑器",active:"当前 pipeline",switch:"切换",newPipeline:"新建 pipeline",namePlaceholder:"pipeline 名(不带后缀)",namespaces:"Pipeline 列表",save:"保存",delete:"删除",deleteConfirm:"删除 pipeline {{name}}?",yamlInvalid:"YAML 语法错误",saveFailed:"保存失败",etagConflict:"Pipeline 被其它人修改,请重新加载",filenameInvalid:"pipeline 文件名非法或不能是 project.yaml"},nM={title:Xj,list:Zj,newProject:Jj,detail:eM,pipelineEditor:tM},iM="Workers",aM="容量",rM="运行中",sM="空闲",lM="总数",oM="阶段",cM="PID",uM="启动时间",fM="运行时长",dM="Marker",hM="Kill worker",pM="终止 worker {{slot}}?",mM="启动 worker",gM="日志",bM="没有活跃的 worker",yM="请选择项目",xM={loadFailed:"Worker 列表加载失败",killFailed:"Worker 终止失败",launchFailed:"Worker 启动失败"},vM={title:iM,capacity:aM,running:rM,free:sM,total:lM,stage:oM,pid:cM,started:uM,runtime:fM,marker:dM,kill:hM,killConfirm:pM,launch:mM,log:gM,noWorkers:bM,selectProject:yM,errors:xM},EM="日志",SM={project:"项目",level:"级别",lines:"行数",errOnly:"仅错误",clear:"清空"},wM="实时跟随",kM="已暂停",NM="暂无日志",_M={loadFailed:"日志加载失败"},CM={title:EM,filter:SM,follow:wM,paused:kM,noLogs:NM,errors:_M},TM="Skills",AM="同步内置",OM="同步中…",RM="同步完成",jM="同步失败",MM="搜索 skill",LM={all:"全部",language:"语言",spec:"规范",workflow:"工作流",persona:"角色"},DM={linked:"已 link 到 {{count}} 个项目",linked_other:"已 link 到 {{count}} 个项目",freezeable:"可冻结",frozen:"已冻结",bundled:"内置",user:"用户"},IM={link:"Link",unlink:"取消 Link",freeze:"冻结",unfreeze:"解冻"},zM={loadFailed:"Skill 列表加载失败",linkFailed:"Link 失败",unlinkFailed:"取消 Link 失败"},UM={title:TM,syncBundled:AM,syncing:OM,syncDone:RM,syncFailed:jM,search:MM,filter:LM,card:DM,actions:IM,errors:zM},BM="系统",$M={current:"当前版本",latest:"npm 最新版",upgradeAvailable:"有更新可用",upToDate:"已是最新",checking:"检查中…",upgrade:"升级",upgrading:"升级中…"},PM={title:"环境变量(~/.coral/env)",edit:"编辑",save:"保存",reload:"重新加载",etagConflict:"Env 已被其它编辑修改,请重新加载",saveFailed:"Env 保存失败"},FM={title:"Doctor",run:"运行健康检查",running:"运行中…",lastRun:"上次运行",passed:"通过",failed:"失败",warnings:"警告"},qM={title:"语言",description:"选择 Console 语言。CLI 始终为英文。"},HM={loadFailed:"系统信息加载失败",pipelineRunning:"有 pipeline 在跑,升级前请先停止"},KM={title:BM,version:$M,env:PM,doctor:FM,locale:qM,errors:HM},GM={cancel:"取消",confirm:"确认",save:"保存",delete:"删除",edit:"编辑",close:"关闭",create:"创建",refresh:"刷新",retry:"重试",loading:"加载中…",search:"搜索",more:"更多",back:"返回",next:"下一步",previous:"上一步",yes:"是",no:"否",ok:"确定"},QM={online:"在线",offline:"离线",connecting:"连接中",ready:"就绪",running:"运行中",stopped:"已停止",error:"错误",idle:"空闲"},VM={chat:"对话",projects:"项目",board:"看板",workers:"Workers",logs:"日志",skills:"Skills",system:"系统"},YM={generic:"出错了",networkOffline:"网络未连接",notFound:"未找到",unauthorized:"未授权",badRequest:"请求无效"},WM={noData:"暂无数据",noResults:"没有结果"},XM={label:"语言",en:"English",zh:"中文"},ZM={actions:GM,status:QM,nav:VM,errors:YM,empty:WM,locale:XM},JM=["common","chat","board","projects","workers","logs","skills","system"],oS=["en","zh"],eL={en:{common:Nj,chat:fR,board:wR,projects:AR,workers:QR,logs:ej,skills:fj,system:yj},zh:{common:ZM,chat:Uj,board:Wj,projects:nM,workers:vM,logs:CM,skills:UM,system:KM}};vn.use(lS).use(OT).init({resources:eL,fallbackLng:"en",supportedLngs:oS,ns:JM,defaultNS:"common",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],lookupLocalStorage:"sps.locale",caches:["localStorage"]},returnNull:!1});function tL(){const{i18n:e,t}=ps("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(VE,{size:12,strokeWidth:2.5,className:"ml-1.5 mr-0.5 text-[var(--color-text-muted)]"}),oS.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 nL=[{to:"/chat",key:"chat",icon:IA},{to:"/projects",key:"projects",icon:OA},{to:"/board",key:"board",icon:TA},{to:"/workers",key:"workers",icon:eS},{to:"/logs",key:"logs",icon:Mc},{to:"/skills",key:"skills",icon:VE},{to:"/system",key:"system",icon:XE}];function iL(){const{t:e}=ps("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:nL.map(t=>{const n=t.icon;return p.jsxs(UE,{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(tL,{})})]})}class aL 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 aL(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function cS(){return qt("/api/system/info")}function rL(){return qt("/api/system/env")}function sL(){return qt("/api/system/env/raw")}async function lL(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 oL(){return qt("/api/system/latest-version")}async function cL(){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 uL(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 Cr(){return qt("/api/projects")}function fL(e){return qt(`/api/projects/${encodeURIComponent(e)}`)}async function dL(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 hL(e){return qt(`/api/projects/${encodeURIComponent(e)}/conf`)}async function pL(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 mL(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 gL(e){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function bL(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 yL(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function xL(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 vL(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 EL(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 SL(){var f;const e=ot({queryKey:["system-info"],queryFn:cS,refetchInterval:3e4}),t=ot({queryKey:["projects"],queryFn:Cr,refetchInterval:1e4}),n=kL(),a=!e.isError,s=((f=t.data)==null?void 0:f.data)??[],l=s.filter(d=>d.pipelineStatus==="running").length,c=s.reduce((d,h)=>d+h.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:a?"var(--color-running-bg)":"var(--color-crashed-bg)",color:a?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:a?"server":"offline"}),p.jsx(wL,{state:n}),p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{className:"flex items-center gap-1",title:"Active pipelines",children:[p.jsx(ed,{size:10,strokeWidth:2.5}),p.jsx("span",{className:"font-bold text-[var(--color-text)]",children:l})," pipeline"]}),p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{className:"flex items-center gap-1",title:"Active workers",children:[p.jsx(YE,{size:10,strokeWidth:2.5}),p.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," worker"]}),p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{children:["localhost:",window.location.port]}),e.data&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{children:["v",e.data.version]}),p.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),p.jsxs("span",{children:["node ",e.data.nodeVersion]})]})]})}function wL({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 kL(){const[e,t]=A.useState("connecting");return A.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 NL(){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(iL,{})}),p.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:p.jsx(I2,{})}),p.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:p.jsx(SL,{})})]})}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 _L(){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 CL extends A.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 TL(){const e=_r(),{data:t,isLoading:n,isError:a,error:s,refetch:l}=ot({queryKey:["projects"],queryFn:Cr});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:"Projects 🎯"}),p.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:t?`${t.data.length} local projects`:n?"Loading…":"Click refresh to retry"})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>l(),type:"button",children:[p.jsx(ed,{size:16,strokeWidth:2.5}),"Refresh"]}),p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>e("/projects/new"),"aria-label":"New project",children:[p.jsx(Bi,{size:16,strokeWidth:3}),"New project"]})]})]}),n&&p.jsx(RL,{}),a&&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:"Load failed"}),p.jsx("p",{className:"text-sm text-[var(--color-text)]",children:s instanceof Error?s.message:String(s)}),p.jsx("button",{className:"nb-btn mt-4",onClick:()=>l(),type:"button",children:"Retry"})]}),t&&t.data.length===0&&p.jsx(jL,{}),t&&t.data.length>0&&p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.data.map(c=>p.jsx(AL,{project:c},c.name))})]})}function AL({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(OL,{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 OL({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 RL(){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 jL(){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(eS,{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:"No projects yet ✨"}),p.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:["Run ",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>"})," to create your first project."]}),p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[p.jsx(Bi,{size:16,strokeWidth:3}),"New project"]})]})]})}function ML(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return qt(`/api/fs/browse${t}`)}const uS=50*1024*1024;async function LL(e,t){if(t.size>uS)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 Eg({initialPath:e,onCancel:t,onSelect:n,title:a="Select directory",mode:s="directory"}){var v,E,w;const[l,c]=A.useState(e??null),[f,d]=A.useState(null),h=ot({queryKey:["fs-browse",l],queryFn:()=>ML(l??void 0),staleTime:0,gcTime:0}),m=((v=h.data)==null?void 0:v.path)??l??"",b=((E=h.data)==null?void 0:E.parent)??null,x=((w=h.data)==null?void 0:w.home)??null;return A.useEffect(()=>{const N=k=>{k.key==="Escape"&&(k.preventDefault(),t())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[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":a,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:a}),p.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":"Close",children:p.jsx(_i,{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:()=>b&&c(b),disabled:!b||h.isLoading,"aria-label":"Parent directory",title:"Parent directory",children:p.jsx(qT,{size:12,strokeWidth:3})}),p.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>x&&c(x),disabled:!x||h.isLoading,"aria-label":"Go to home",title:"Go to home",children:p.jsx(kA,{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:m,dir:"rtl",children:m||"..."})]}),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(zt,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),"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:"Read failed"}),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:"— empty —"}),h.data.entries.map(N=>{const k=(()=>{const R=m.endsWith("/")||m.endsWith("\\")?"":"/";return`${m}${R}${N.name}`})(),T=s==="file"&&f===k,C=N.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:!C,onClick:()=>{N.isDirectory?(d(null),c(k)):s==="file"&&d(k)},onDoubleClick:()=>{s==="file"&&!N.isDirectory&&n(k)},title:N.isDirectory?`Enter ${N.name}/`:s==="file"?`Select ${N.name} (double-click to confirm)`:"File not selectable",children:[N.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:N.name}),N.isDirectory&&p.jsx(td,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},N.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:"Cancel"}),s==="file"?p.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>f&&n(f),disabled:!f||h.isLoading||h.isError,title:f??"Pick a file first",children:[p.jsx(bc,{size:14,strokeWidth:3}),"Use this file"]}):p.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(m),disabled:!m||h.isLoading||h.isError,children:[p.jsx(bc,{size:14,strokeWidth:3}),"Use this directory"]})]})]})})}function DL({title:e,body:t,confirm:n,onConfirm:a,onCancel:s,danger:l}){const{t:c}=ps("common");return A.useEffect(()=>{const f=d=>{d.key==="Escape"&&s()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[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 fS=A.createContext(null);function IL({children:e}){const[t,n]=A.useState(null),a=A.useCallback(f=>new Promise(d=>{n({kind:"confirm",opts:f,resolve:h=>{n(null),d(h)}})}),[]),s=A.useCallback(f=>new Promise(d=>{n({kind:"alert",opts:f,resolve:()=>{n(null),d()}})}),[]),l=A.useCallback(f=>new Promise(d=>{n({kind:"prompt",opts:f,resolve:h=>{n(null),d(h)}})}),[]),{t:c}=ps("common");return p.jsxs(fS.Provider,{value:{confirm:a,alert:s,prompt:l},children:[e,(t==null?void 0:t.kind)==="confirm"&&p.jsx(DL,{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(zL,{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(UL,{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:f=>t.resolve(f),onCancel:()=>t.resolve(null)})]})}function ci(){const e=A.useContext(fS);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function zL({title:e,body:t,confirm:n,onClose:a}){return A.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 UL({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:l,onConfirm:c,onCancel:f}){const[d,h]=A.useState(a??""),m=A.useRef(null);A.useEffect(()=>{var v,E;(v=m.current)==null||v.focus(),(E=m.current)==null||E.select();const x=w=>{w.key==="Escape"&&f()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[f]);const b=()=>{const x=d.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:m,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:d,onChange:x=>h(x.target.value),onKeyDown:x=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&(x.preventDefault(),b())}}),p.jsxs("div",{className:"flex gap-3 justify-end",children:[p.jsx("button",{className:"nb-btn",onClick:f,type:"button",children:l}),p.jsx("button",{className:"nb-btn nb-btn-primary",onClick:b,type:"button",disabled:!d.trim(),children:s})]})]})})}function BL(){const e=_r(),t=Gn(),{alert:n}=ci(),[a,s]=A.useState({name:"",projectDir:"",enableGit:!0,createIfMissing:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5"}),[l,c]=A.useState(!1),f=Kn({mutationFn:m=>dL(m),onSuccess:m=>{t.invalidateQueries({queryKey:["projects"]}),e(`/projects/${encodeURIComponent(m.name)}`)},onError:m=>{n({title:"Create failed",body:m instanceof Error?m.message:String(m)})}}),d=/^[a-zA-Z0-9_-]+$/.test(a.name),h=d&&a.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:()=>e("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"Back to projects",children:[p.jsx(KE,{size:14,strokeWidth:3}),"Back"]}),p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:"New project"})]}),p.jsx("div",{className:"nb-card",children:p.jsxs("form",{onSubmit:m=>{m.preventDefault(),h&&f.mutate(a)},className:"flex flex-col gap-5",children:[p.jsxs(cr,{label:"Project name",hint:"Letters, digits, _ and - only. e.g. acme-web",children:[p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"e.g. acme-web",value:a.name,onChange:m=>s({...a,name:m.target.value}),autoFocus:!0,required:!0}),a.name&&!d&&p.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:"Name may only contain a-z A-Z 0-9 _ -"})]}),p.jsxs(cr,{label:"Project directory",hint:"Absolute path on this machine (code or docs are both fine). Independent of the git toggle.",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:a.projectDir,onChange:m=>s({...a,projectDir:m.target.value}),required:!0}),p.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>c(!0),"aria-label":"Browse for project directory",title:"Browse for project directory",children:[p.jsx(QE,{size:14,strokeWidth:2.5}),"Browse"]})]}),p.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer select-none",children:[p.jsx("input",{type:"checkbox",checked:a.createIfMissing!==!1,onChange:m=>s({...a,createIfMissing:m.target.checked}),className:"w-4 h-4 cursor-pointer"}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"Auto-create the directory if missing (recommended — otherwise .claude/ and wiki/ install are skipped)"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(cr,{label:"Max workers",children:p.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.maxWorkers,onChange:m=>s({...a,maxWorkers:m.target.value})})}),p.jsx(cr,{label:"ACK timeout (minutes)",hint:"How long after launch with no ACK before the worker is treated as failed",children:p.jsx("input",{type:"number",min:"1",max:"30",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.ackTimeoutMin??"5",onChange:m=>s({...a,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:a.enableGit??!0,onChange:m=>s({...a,enableGit:m.target.checked}),className:"w-4 h-4 cursor-pointer"}),p.jsx("span",{className:"text-sm font-bold",children:"Enable Git (Worker auto-commits + pushes)"})]}),p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:"When off, the Worker just runs the task without version control; good for docs/data projects."}),a.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(cr,{label:"Merge branch",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.mergeBranch??"main",onChange:m=>s({...a,mergeBranch:m.target.value})})}),p.jsx(cr,{label:"Git remote project path",hint:"e.g. user/repo. Empty skips the remote API (local commit/push only).",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"user/repo",value:a.gitlabProject??"",onChange:m=>s({...a,gitlabProject:m.target.value})})}),a.gitlabProject&&p.jsx(cr,{label:"GitLab project ID",hint:"numeric; GitHub users leave empty",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"42",value:a.gitlabProjectId??"",onChange:m=>s({...a,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:a.enableWiki===!0,onChange:m=>s({...a,enableWiki:m.target.checked}),className:"w-4 h-4 cursor-pointer"}),p.jsx("span",{className:"text-sm font-bold",children:"Enable Wiki knowledge base (per-project)"})]}),p.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Scaffolds ",p.jsx("code",{className:"font-mono",children:"wiki/"})," dir and injects 5-layer retrieval context plus wiki-update hints into Worker prompts. You can also enable later with ",p.jsx("code",{className:"font-mono",children:"sps wiki init"})," ."]})]}),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:"Notifications"}),p.jsx(cr,{label:"Matrix room ID",hint:"empty = use global config; blank = no notifications",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"!abc:matrix.example.com",value:a.matrixRoomId??"",onChange:m=>s({...a,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:()=>e("/projects"),disabled:f.isPending,children:"Cancel"}),p.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!h,"aria-label":"Create project",children:f.isPending?p.jsxs(p.Fragment,{children:[p.jsx(zt,{size:14,strokeWidth:3,className:"animate-spin"}),"Creating…"]}):p.jsxs(p.Fragment,{children:[p.jsx(Bi,{size:14,strokeWidth:3}),"Create"]})})]})]})}),l&&p.jsx(Eg,{title:"Select project directory",initialPath:a.projectDir.trim()||void 0,onCancel:()=>c(!1),onSelect:m=>{s({...a,projectDir:m}),c(!1)}})]})}function cr({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 Sg=Symbol.for("yaml.alias"),Um=Symbol.for("yaml.document"),kr=Symbol.for("yaml.map"),dS=Symbol.for("yaml.pair"),na=Symbol.for("yaml.scalar"),Gl=Symbol.for("yaml.seq"),Ci=Symbol.for("yaml.node.type"),Tr=e=>!!e&&typeof e=="object"&&e[Ci]===Sg,ys=e=>!!e&&typeof e=="object"&&e[Ci]===Um,Ql=e=>!!e&&typeof e=="object"&&e[Ci]===kr,Mt=e=>!!e&&typeof e=="object"&&e[Ci]===dS,kt=e=>!!e&&typeof e=="object"&&e[Ci]===na,Vl=e=>!!e&&typeof e=="object"&&e[Ci]===Gl;function It(e){if(e&&typeof e=="object")switch(e[Ci]){case kr:case Gl:return!0}return!1}function Ut(e){if(e&&typeof e=="object")switch(e[Ci]){case Sg:case kr:case na:case Gl:return!0}return!1}const hS=e=>(kt(e)||It(e))&&!!e.anchor,Hn=Symbol("break visit"),pS=Symbol("skip children"),ta=Symbol("remove node");function xs(e,t){const n=mS(t);ys(e)?yl(null,e.contents,n,Object.freeze([e]))===ta&&(e.contents=null):yl(null,e,n,Object.freeze([]))}xs.BREAK=Hn;xs.SKIP=pS;xs.REMOVE=ta;function yl(e,t,n,a){const s=gS(e,t,n,a);if(Ut(s)||Mt(s))return bS(e,a,s),yl(e,s,n,a);if(typeof s!="symbol"){if(It(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===Hn)return Hn;c===ta&&(t.items.splice(l,1),l-=1)}}}else if(Mt(t)){a=Object.freeze(a.concat(t));const l=yl("key",t.key,n,a);if(l===Hn)return Hn;l===ta&&(t.key=null);const c=yl("value",t.value,n,a);if(c===Hn)return Hn;c===ta&&(t.value=null)}}return s}async function ad(e,t){const n=mS(t);ys(e)?await xl(null,e.contents,n,Object.freeze([e]))===ta&&(e.contents=null):await xl(null,e,n,Object.freeze([]))}ad.BREAK=Hn;ad.SKIP=pS;ad.REMOVE=ta;async function xl(e,t,n,a){const s=await gS(e,t,n,a);if(Ut(s)||Mt(s))return bS(e,a,s),xl(e,s,n,a);if(typeof s!="symbol"){if(It(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===Hn)return Hn;c===ta&&(t.items.splice(l,1),l-=1)}}}else if(Mt(t)){a=Object.freeze(a.concat(t));const l=await xl("key",t.key,n,a);if(l===Hn)return Hn;l===ta&&(t.key=null);const c=await xl("value",t.value,n,a);if(c===Hn)return Hn;c===ta&&(t.value=null)}}return s}function mS(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 gS(e,t,n,a){var s,l,c,f,d;if(typeof n=="function")return n(e,t,a);if(Ql(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Vl(t))return(l=n.Seq)==null?void 0:l.call(n,e,t,a);if(Mt(t))return(c=n.Pair)==null?void 0:c.call(n,e,t,a);if(kt(t))return(f=n.Scalar)==null?void 0:f.call(n,e,t,a);if(Tr(t))return(d=n.Alias)==null?void 0:d.call(n,e,t,a)}function bS(e,t,n){const a=t[t.length-1];if(It(a))a.items[e]=n;else if(Mt(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 $L={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},PL=e=>e.replace(/[!,[\]{}]/g,t=>$L[t]);class An{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},An.defaultYaml,t),this.tags=Object.assign({},An.defaultTags,n)}clone(){const t=new An(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new An(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:An.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},An.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:An.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},An.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+PL(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,f)=>{Ut(f)&&f.tag&&(l[f.tag]=!0)}),s=Object.keys(l)}else s=[];for(const[l,c]of a)l==="!!"&&c==="tag:yaml.org,2002:"||(!t||s.some(f=>f.startsWith(c)))&&n.push(`%TAG ${l} ${c}`);return n.join(`
|
|
366
|
+
`)}}An.defaultYaml={explicit:!1,version:"1.2"};An.defaultTags={"!!":"tag:yaml.org,2002:"};function yS(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 xS(e){const t=new Set;return xs(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function vS(e,t){for(let n=1;;++n){const a=`${e}${n}`;if(!t.has(a))return a}}function FL(e,t){const n=[],a=new Map;let s=null;return{onAnchor:l=>{n.push(l),s??(s=xS(e));const c=vS(t,s);return s.add(c),c},setAnchors:()=>{for(const l of n){const c=a.get(l);if(typeof c=="object"&&c.anchor&&(kt(c.node)||It(c.node)))c.node.anchor=c.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=l,f}}},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],f=vl(e,a,String(s),c);f===void 0?delete a[s]:f!==c&&(a[s]=f)}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 ki(e,t,n){if(Array.isArray(e))return e.map((a,s)=>ki(a,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!hS(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 wg{constructor(t){Object.defineProperty(this,Ci,{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},f=ki(this,"",c);if(typeof s=="function")for(const{count:d,res:h}of c.anchors.values())s(h,d);return typeof l=="function"?vl(l,{"":f},"",f):f}}class rd extends wg{constructor(t){super(Sg),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)||hS(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 d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=a.get(c);if(f||(ki(c,null,n),f=a.get(c)),(f==null?void 0:f.res)===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(l>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=_f(s,c,a)),f.count*f.aliasCount>l)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(t,n,a){const s=`*${this.source}`;if(t){if(yS(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 _f(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(It(t)){let a=0;for(const s of t.items){const l=_f(e,s,n);l>a&&(a=l)}return a}else if(Mt(t)){const a=_f(e,t.key,n),s=_f(e,t.value,n);return Math.max(a,s)}return 1}const ES=e=>!e||typeof e!="function"&&typeof e!="object";class $e extends wg{constructor(t){super(na),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:ki(this.value,t,n)}toString(){return String(this.value)}}$e.BLOCK_FOLDED="BLOCK_FOLDED";$e.BLOCK_LITERAL="BLOCK_LITERAL";$e.PLAIN="PLAIN";$e.QUOTE_DOUBLE="QUOTE_DOUBLE";$e.QUOTE_SINGLE="QUOTE_SINGLE";const qL="tag:yaml.org,2002:";function HL(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 b,x,v;if(ys(e)&&(e=e.contents),Ut(e))return e;if(Mt(e)){const E=(x=(b=n.schema[kr]).createNode)==null?void 0:x.call(b,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:f}=n;let d;if(a&&e&&typeof e=="object"){if(d=f.get(e),d)return d.anchor??(d.anchor=s(e)),new rd(d.anchor);d={anchor:null,node:null},f.set(e,d)}t!=null&&t.startsWith("!!")&&(t=qL+t.slice(2));let h=HL(e,t,c.tags);if(!h){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const E=new $e(e);return d&&(d.node=E),E}h=e instanceof Map?c[kr]:Symbol.iterator in Object(e)?c[Gl]:c[kr]}l&&(l(h),delete n.onTagObj);const m=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 $e(e);return t?m.tag=t:h.default||(m.tag=h.tag),d&&(d.node=m),m}function $f(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 SS extends wg{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)||Mt(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(It(l))l.addIn(s,n);else if(l===void 0&&this.schema)this.set(a,$f(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(It(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&&kt(l)?l.value:l:It(l)?l.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Mt(n))return!1;const a=n.value;return a==null||t&&kt(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 It(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(It(l))l.setIn(s,n);else if(l===void 0&&this.schema)this.set(a,$f(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}}const KL=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Oa(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const es=(e,t,n)=>e.endsWith(`
|
|
367
|
+
`)?Oa(n,t):n.includes(`
|
|
368
|
+
`)?`
|
|
369
|
+
`+Oa(n,t):(e.endsWith(" ")?"":" ")+n,wS="flow",Bm="block",Cf="quoted";function sd(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:l=20,onFold:c,onOverflow:f}={}){if(!s||s<0)return e;s<l&&(l=0);const d=Math.max(1+l,1+s-t.length);if(e.length<=d)return e;const h=[],m={};let b=s-t.length;typeof a=="number"&&(a>s-Math.max(2,l)?h.push(0):b=s-a);let x,v,E=!1,w=-1,N=-1,k=-1;n===Bm&&(w=D0(e,w,t.length),w!==-1&&(b=w+d));for(let C;C=e[w+=1];){if(n===Cf&&C==="\\"){switch(N=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}k=w}if(C===`
|
|
370
|
+
`)n===Bm&&(w=D0(e,w,t.length)),b=w+t.length+d,x=void 0;else{if(C===" "&&v&&v!==" "&&v!==`
|
|
371
|
+
`&&v!==" "){const R=e[w+1];R&&R!==" "&&R!==`
|
|
372
|
+
`&&R!==" "&&(x=w)}if(w>=b)if(x)h.push(x),b=x+d,x=void 0;else if(n===Cf){for(;v===" "||v===" ";)v=C,C=e[w+=1],E=!0;const R=w>k+1?w-2:N-1;if(m[R])return e;h.push(R),m[R]=!0,b=R+d,x=void 0}else E=!0}v=C}if(E&&f&&f(),h.length===0)return e;c&&c();let T=e.slice(0,h[0]);for(let C=0;C<h.length;++C){const R=h[C],B=h[C+1]||e.length;R===0?T=`
|
|
373
|
+
${t}${e.slice(0,B)}`:(n===Cf&&m[R]&&(T+=`${e[R]}\\`),T+=`
|
|
374
|
+
${t}${e.slice(R+1,B)}`)}return T}function D0(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!==`
|
|
375
|
+
`);a=t,s=t+1,l=e[s]}return a}const ld=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),od=e=>/^(%|---|\.\.\.)/m.test(e);function GL(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]===`
|
|
376
|
+
`){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||(od(e)?" ":"");let c="",f=0;for(let d=0,h=n[d];h;h=n[++d])if(h===" "&&n[d+1]==="\\"&&n[d+2]==="n"&&(c+=n.slice(f,d)+"\\ ",d+=1,f=d,h="\\"),h==="\\")switch(n[d+1]){case"u":{c+=n.slice(f,d);const m=n.substr(d+2,4);switch(m){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:m.substr(0,2)==="00"?c+="\\x"+m.substr(2):c+=n.substr(d,6)}d+=5,f=d+1}break;case"n":if(a||n[d+2]==='"'||n.length<s)d+=1;else{for(c+=n.slice(f,d)+`
|
|
377
|
+
|
|
378
|
+
`;n[d+2]==="\\"&&n[d+3]==="n"&&n[d+4]!=='"';)c+=`
|
|
379
|
+
`,d+=2;c+=l,n[d+2]===" "&&(c+="\\"),d+=1,f=d+1}break;default:d+=1}return c=f?c+n.slice(f):n,a?c:sd(c,l,Cf,ld(t,!1))}function $m(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
380
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return cc(e,t);const n=t.indent||(od(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
381
|
+
${n}`)+"'";return t.implicitKey?a:sd(a,n,wS,ld(t,!1))}function El(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=$m:l&&!s?a=cc:a=n?$m:cc}return a(e,t)}let Pm;try{Pm=new RegExp(`(^|(?<!
|
|
382
|
+
))
|
|
383
|
+
+(?!
|
|
384
|
+
|$)`,"g")}catch{Pm=/\n+(?!\n|$)/g}function Tf({comment:e,type:t,value:n},a,s,l){const{blockQuote:c,commentString:f,lineWidth:d}=a.options;if(!c||/\n[\t ]+$/.test(n))return El(n,a);const h=a.indent||(a.forceBlockIndent||od(n)?" ":""),m=c==="literal"?!0:c==="folded"||t===$e.BLOCK_FOLDED?!1:t===$e.BLOCK_LITERAL?!0:!GL(n,d,h.length);if(!n)return m?`|
|
|
385
|
+
`:`>
|
|
386
|
+
`;let b,x;for(x=n.length;x>0;--x){const B=n[x-1];if(B!==`
|
|
387
|
+
`&&B!==" "&&B!==" ")break}let v=n.substring(x);const E=v.indexOf(`
|
|
388
|
+
`);E===-1?b="-":n===v||E!==v.length-1?(b="+",l&&l()):b="",v&&(n=n.slice(0,-v.length),v[v.length-1]===`
|
|
389
|
+
`&&(v=v.slice(0,-1)),v=v.replace(Pm,`$&${h}`));let w=!1,N,k=-1;for(N=0;N<n.length;++N){const B=n[N];if(B===" ")w=!0;else if(B===`
|
|
390
|
+
`)k=N;else break}let T=n.substring(0,k<N?k+1:N);T&&(n=n.substring(T.length),T=T.replace(/\n+/g,`$&${h}`));let R=(w?h?"2":"1":"")+b;if(e&&(R+=" "+f(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!m){const B=n.replace(/\n+/g,`
|
|
391
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let j=!1;const $=ld(a,!0);c!=="folded"&&t!==$e.BLOCK_FOLDED&&($.onOverflow=()=>{j=!0});const q=sd(`${T}${B}${v}`,h,Bm,$);if(!j)return`>${R}
|
|
392
|
+
${h}${q}`}return n=n.replace(/\n+/g,`$&${h}`),`|${R}
|
|
393
|
+
${h}${T}${n}${v}`}function QL(e,t,n,a){const{type:s,value:l}=e,{actualString:c,implicitKey:f,indent:d,indentStep:h,inFlow:m}=t;if(f&&l.includes(`
|
|
394
|
+
`)||m&&/[[\]{},]/.test(l))return El(l,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return f||m||!l.includes(`
|
|
395
|
+
`)?El(l,t):Tf(e,t,n,a);if(!f&&!m&&s!==$e.PLAIN&&l.includes(`
|
|
396
|
+
`))return Tf(e,t,n,a);if(od(l)){if(d==="")return t.forceBlockIndent=!0,Tf(e,t,n,a);if(f&&d===h)return El(l,t)}const b=l.replace(/\n+/g,`$&
|
|
397
|
+
${d}`);if(c){const x=w=>{var N;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((N=w.test)==null?void 0:N.test(b))},{compat:v,tags:E}=t.doc.schema;if(E.some(x)||v!=null&&v.some(x))return El(l,t)}return f?b:sd(b,d,wS,ld(t,!1))}function Lc(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:f}=e;f!==$e.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(f=$e.QUOTE_DOUBLE);const d=m=>{switch(m){case $e.BLOCK_FOLDED:case $e.BLOCK_LITERAL:return s||l?El(c.value,t):Tf(c,t,n,a);case $e.QUOTE_DOUBLE:return cc(c.value,t);case $e.QUOTE_SINGLE:return $m(c.value,t);case $e.PLAIN:return QL(c,t,n,a);default:return null}};let h=d(f);if(h===null){const{defaultKeyType:m,defaultStringType:b}=t.options,x=s&&m||b;if(h=d(x),h===null)throw new Error(`Unsupported default string type ${x}`)}return h}function kS(e,t){const n=Object.assign({blockQuote:!0,commentString:KL,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 VL(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(kt(t)){a=t.value;let l=e.filter(c=>{var f;return(f=c.identify)==null?void 0:f.call(c,a)});if(l.length>1){const c=l.filter(f=>f.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 YL(e,t,{anchors:n,doc:a}){if(!a.directives)return"";const s=[],l=(kt(e)||It(e))&&e.anchor;l&&yS(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 Ul(e,t,n,a){var d;if(Mt(e))return e.toString(t,n,a);if(Tr(e)){if(t.doc.directives)return e.toString(t);if((d=t.resolvedAliases)!=null&&d.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const l=Ut(e)?e:t.doc.createNode(e,{onTagObj:h=>s=h});s??(s=VL(t.doc.schema.tags,l));const c=YL(l,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const f=typeof s.stringify=="function"?s.stringify(l,t,n,a):kt(l)?Lc(l,t,n,a):l.toString(t,n,a);return c?kt(l)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
|
|
398
|
+
${t.indent}${f}`:f}function WL({key:e,value:t},n,a,s){const{allNullValues:l,doc:c,indent:f,indentStep:d,options:{commentString:h,indentSeq:m,simpleKeys:b}}=n;let x=Ut(e)&&e.comment||null;if(b){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(It(e)||!Ut(e)&&typeof e=="object"){const $="With simple keys, collection cannot be used as a key value";throw new Error($)}}let v=!b&&(!e||x&&t==null&&!n.inFlow||It(e)||(kt(e)?e.type===$e.BLOCK_FOLDED||e.type===$e.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!v&&(b||!l),indent:f+d});let E=!1,w=!1,N=Ul(e,n,()=>E=!0,()=>w=!0);if(!v&&!n.inFlow&&N.length>1024){if(b)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(),N===""?"?":v?`? ${N}`:N}else if(l&&!b||t==null&&v)return N=`? ${N}`,x&&!E?N+=es(N,n.indent,h(x)):w&&s&&s(),N;E&&(x=null),v?(x&&(N+=es(N,n.indent,h(x))),N=`? ${N}
|
|
399
|
+
${f}:`):(N=`${N}:`,x&&(N+=es(N,n.indent,h(x))));let k,T,C;Ut(t)?(k=!!t.spaceBefore,T=t.commentBefore,C=t.comment):(k=!1,T=null,C=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!v&&!x&&kt(t)&&(n.indentAtStart=N.length+1),w=!1,!m&&d.length>=2&&!n.inFlow&&!v&&Vl(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let R=!1;const B=Ul(t,n,()=>R=!0,()=>w=!0);let j=" ";if(x||k||T){if(j=k?`
|
|
400
|
+
`:"",T){const $=h(T);j+=`
|
|
401
|
+
${Oa($,n.indent)}`}B===""&&!n.inFlow?j===`
|
|
402
|
+
`&&C&&(j=`
|
|
403
|
+
|
|
404
|
+
`):j+=`
|
|
405
|
+
${n.indent}`}else if(!v&&It(t)){const $=B[0],q=B.indexOf(`
|
|
406
|
+
`),ee=q!==-1,L=n.inFlow??t.flow??t.items.length===0;if(ee||!L){let Z=!1;if(ee&&($==="&"||$==="!")){let ie=B.indexOf(" ");$==="&"&&ie!==-1&&ie<q&&B[ie+1]==="!"&&(ie=B.indexOf(" ",ie+1)),(ie===-1||q<ie)&&(Z=!0)}Z||(j=`
|
|
407
|
+
${n.indent}`)}}else(B===""||B[0]===`
|
|
408
|
+
`)&&(j="");return N+=j+B,n.inFlow?R&&a&&a():C&&!R?N+=es(N,n.indent,h(C)):w&&s&&s(),N}function NS(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const of="<<",Ra={identify:e=>e===of||typeof e=="symbol"&&e.description===of,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new $e(Symbol(of)),{addToJSMap:_S}),stringify:()=>of},XL=(e,t)=>(Ra.identify(t)||kt(t)&&(!t.type||t.type===$e.PLAIN)&&Ra.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Ra.tag&&n.default));function _S(e,t,n){if(n=e&&Tr(n)?n.resolve(e.doc):n,Vl(n))for(const a of n.items)Up(e,t,a);else if(Array.isArray(n))for(const a of n)Up(e,t,a);else Up(e,t,n)}function Up(e,t,n){const a=e&&Tr(n)?n.resolve(e.doc):n;if(!Ql(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 CS(e,t,{key:n,value:a}){if(Ut(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(XL(e,n))_S(e,t,a);else{const s=ki(n,"",e);if(t instanceof Map)t.set(s,ki(a,s,e));else if(t instanceof Set)t.add(s);else{const l=ZL(n,s,e),c=ki(a,l,e);l in t?Object.defineProperty(t,l,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[l]=c}}return t}function ZL(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Ut(e)&&(n!=null&&n.doc)){const a=kS(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)+'..."'),NS(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 xn(a,s)}class xn{constructor(t,n=null){Object.defineProperty(this,Ci,{value:dS}),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 xn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return CS(n,a,this)}toString(t,n,a){return t!=null&&t.doc?WL(this,t,n,a):JSON.stringify(this)}}function TS(e,t,n){return(t.inFlow??e.flow?eD:JL)(e,t,n)}function JL({comment:e,items:t},n,{blockItemPrefix:a,flowChars:s,itemIndent:l,onChompKeep:c,onComment:f}){const{indent:d,options:{commentString:h}}=n,m=Object.assign({},n,{indent:l,type:null});let b=!1;const x=[];for(let E=0;E<t.length;++E){const w=t[E];let N=null;if(Ut(w))!b&&w.spaceBefore&&x.push(""),Pf(n,x,w.commentBefore,b),w.comment&&(N=w.comment);else if(Mt(w)){const T=Ut(w.key)?w.key:null;T&&(!b&&T.spaceBefore&&x.push(""),Pf(n,x,T.commentBefore,b))}b=!1;let k=Ul(w,m,()=>N=null,()=>b=!0);N&&(k+=es(k,l,h(N))),b&&N&&(b=!1),x.push(a+k)}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?`
|
|
409
|
+
${d}${w}`:`
|
|
410
|
+
`}}return e?(v+=`
|
|
411
|
+
`+Oa(h(e),d),f&&f()):b&&c&&c(),v}function eD({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:l,flowCollectionPadding:c,options:{commentString:f}}=t;a+=l;const d=Object.assign({},t,{indent:a,inFlow:!0,type:null});let h=!1,m=0;const b=[];for(let E=0;E<e.length;++E){const w=e[E];let N=null;if(Ut(w))w.spaceBefore&&b.push(""),Pf(t,b,w.commentBefore,!1),w.comment&&(N=w.comment);else if(Mt(w)){const T=Ut(w.key)?w.key:null;T&&(T.spaceBefore&&b.push(""),Pf(t,b,T.commentBefore,!1),T.comment&&(h=!0));const C=Ut(w.value)?w.value:null;C?(C.comment&&(N=C.comment),C.commentBefore&&(h=!0)):w.value==null&&(T!=null&&T.comment)&&(N=T.comment)}N&&(h=!0);let k=Ul(w,d,()=>N=null);h||(h=b.length>m||k.includes(`
|
|
412
|
+
`)),E<e.length-1?k+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=b.reduce((T,C)=>T+C.length+2,2)+(k.length+2)>t.options.lineWidth)),h&&(k+=",")),N&&(k+=es(k,a,f(N))),b.push(k),m=b.length}const{start:x,end:v}=n;if(b.length===0)return x+v;if(!h){const E=b.reduce((w,N)=>w+N.length+2,2);h=t.options.lineWidth>0&&E>t.options.lineWidth}if(h){let E=x;for(const w of b)E+=w?`
|
|
413
|
+
${l}${s}${w}`:`
|
|
414
|
+
`;return`${E}
|
|
415
|
+
${s}${v}`}else return`${x}${c}${b.join(" ")}${c}${v}`}function Pf({indent:e,options:{commentString:t}},n,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){const l=Oa(t(a),e);n.push(l.trimStart())}}function ts(e,t){const n=kt(t)?t.value:t;for(const a of e)if(Mt(a)&&(a.key===t||a.key===n||kt(a.key)&&a.key.value===n))return a}class si extends SS{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(kr,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:l}=a,c=new this(t),f=(d,h)=>{if(typeof l=="function")h=l.call(n,d,h);else if(Array.isArray(l)&&!l.includes(d))return;(h!==void 0||s)&&c.items.push(kg(d,h,a))};if(n instanceof Map)for(const[d,h]of n)f(d,h);else if(n&&typeof n=="object")for(const d of Object.keys(n))f(d,n[d]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;Mt(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new xn(t,t==null?void 0:t.value):a=new xn(t.key,t.value);const s=ts(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`);kt(s.value)&&ES(a.value)?s.value.value=a.value:s.value=a.value}else if(l){const f=this.items.findIndex(d=>l(a,d)<0);f===-1?this.items.push(a):this.items.splice(f,0,a)}else this.items.push(a)}delete(t){const n=ts(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const a=ts(this.items,t),s=a==null?void 0:a.value;return(!n&&kt(s)?s.value:s)??void 0}has(t){return!!ts(this.items,t)}set(t,n){this.add(new xn(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)CS(n,s,l);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!Mt(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})),TS(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const Yl={collection:"map",default:!0,nodeClass:si,tag:"tag:yaml.org,2002:map",resolve(e,t){return Ql(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>si.from(e,t,n)};class Nr extends SS{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=cf(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const a=cf(t);if(typeof a!="number")return;const s=this.items[a];return!n&&kt(s)?s.value:s}has(t){const n=cf(t);return typeof n=="number"&&n<this.items.length}set(t,n){const a=cf(t);if(typeof a!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[a];kt(s)&&ES(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(ki(l,String(s++),n));return a}toString(t,n,a){return t?TS(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 f of n){if(typeof s=="function"){const d=n instanceof Set?f:String(c++);f=s.call(n,d,f)}l.items.push(vc(f,void 0,a))}}return l}}function cf(e){let t=kt(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:Nr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Vl(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Nr.from(e,t,n)},cd={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),Lc(e,t,n,a)}},ud={identify:e=>e==null,createNode:()=>new $e(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new $e(null),stringify:({source:e},t)=>typeof e=="string"&&ud.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 $e(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 $i({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 f=t-(l.length-c-1);for(;f-- >0;)l+="0"}return l}const AS={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:$i},OS={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():$i(e)}},RS={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 $e(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:$i},fd=e=>typeof e=="bigint"||Number.isInteger(e),_g=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function jS(e,t,n){const{value:a}=e;return fd(a)&&a>=0?n+a.toString(t):$i(e)}const MS={identify:e=>fd(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=>jS(e,8,"0o")},LS={identify:fd,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>_g(e,0,10,n),stringify:$i},DS={identify:e=>fd(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=>jS(e,16,"0x")},tD=[Yl,Wl,cd,ud,Ng,MS,LS,DS,AS,OS,RS];function I0(e){return typeof e=="bigint"||Number.isInteger(e)}const uf=({value:e})=>JSON.stringify(e),nD=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:uf},{identify:e=>e==null,createNode:()=>new $e(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:uf},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:uf},{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:uf}],iD={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},aD=[Yl,Wl].concat(nD,iD),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 f;if(typeof btoa=="function"){let d="";for(let h=0;h<c.length;++h)d+=String.fromCharCode(c[h]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=$e.BLOCK_LITERAL),t!==$e.QUOTE_DOUBLE){const d=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),h=Math.ceil(f.length/d),m=new Array(h);for(let b=0,x=0;b<h;++b,x+=d)m[b]=f.substr(x,d);f=m.join(t===$e.BLOCK_LITERAL?`
|
|
416
|
+
`:" ")}return Lc({comment:e,type:t,value:f},a,s,l)}};function IS(e,t){if(Vl(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!Mt(a)){if(Ql(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const s=a.items[0]||new xn(new $e(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
|
|
417
|
+
${s.key.commentBefore}`:a.commentBefore),a.comment){const l=s.value??s.key;l.comment=l.comment?`${a.comment}
|
|
418
|
+
${l.comment}`:a.comment}a=s}e.items[n]=Mt(a)?a:new xn(a)}}else t("Expected a sequence for this tag");return e}function zS(e,t,n){const{replacer:a}=n,s=new Nr(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 f,d;if(Array.isArray(c))if(c.length===2)f=c[0],d=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const h=Object.keys(c);if(h.length===1)f=h[0],d=c[f];else throw new TypeError(`Expected tuple with one key, not ${h.length} keys`)}else f=c;s.items.push(kg(f,d,n))}return s}const Tg={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:IS,createNode:zS};class Sl extends Nr{constructor(){super(),this.add=si.prototype.add.bind(this),this.delete=si.prototype.delete.bind(this),this.get=si.prototype.get.bind(this),this.has=si.prototype.has.bind(this),this.set=si.prototype.set.bind(this),this.tag=Sl.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(Mt(s)?(l=ki(s.key,"",n),c=ki(s.value,l,n)):l=ki(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=zS(t,n,a),l=new this;return l.items=s.items,l}}Sl.tag="tag:yaml.org,2002:omap";const Ag={collection:"seq",identify:e=>e instanceof Map,nodeClass:Sl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=IS(e,t),a=[];for(const{key:s}of n.items)kt(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new Sl,n)},createNode:(e,t,n)=>Sl.from(e,t,n)};function US({value:e,source:t},n){return t&&(e?BS:$S).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const BS={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 $e(!0),stringify:US},$S={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 $e(!1),stringify:US},rD={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:$i},sD={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():$i(e)}},lD={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 $e(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:$i},Dc=e=>typeof e=="bigint"||Number.isInteger(e);function dd(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(Dc(a)){const s=a.toString(t);return a<0?"-"+n+s.substr(1):n+s}return $i(e)}const oD={identify:Dc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>dd(e,2,2,n),stringify:e=>Og(e,2,"0b")},cD={identify:Dc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>dd(e,1,8,n),stringify:e=>Og(e,8,"0")},uD={identify:Dc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>dd(e,0,10,n),stringify:$i},fD={identify:Dc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>dd(e,2,16,n),stringify:e=>Og(e,16,"0x")};class wl extends si{constructor(t){super(t),this.tag=wl.tag}add(t){let n;Mt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new xn(t.key,null):n=new xn(t,null),ts(this.items,n.key)||this.items.push(n)}get(t,n){const a=ts(this.items,t);return!n&&Mt(a)?kt(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=ts(this.items,t);a&&!n?this.items.splice(this.items.indexOf(a),1):!a&&n&&this.items.push(new xn(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}}wl.tag="tag:yaml.org,2002:set";const Rg={collection:"map",identify:e=>e instanceof Set,nodeClass:wl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>wl.from(e,t,n),resolve(e,t){if(Ql(e)){if(e.hasAllNullValues(!0))return Object.assign(new wl,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,f)=>c*s(60)+s(f),s(0));return n==="-"?s(-1)*l:l}function PS(e){let{value:t}=e,n=c=>c;if(typeof t=="bigint")n=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return $i(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 FS={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:PS},qS={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:PS},hd={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(hd.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,a,s,l,c,f]=t.map(Number),d=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(n,a-1,s,l||0,c||0,f||0,d);const m=t[8];if(m&&m!=="Z"){let b=jg(m,!1);Math.abs(b)<30&&(b*=60),h-=6e4*b}return new Date(h)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},z0=[Yl,Wl,cd,ud,BS,$S,oD,cD,uD,fD,rD,sD,lD,Cg,Ra,Ag,Tg,Rg,FS,qS,hd],U0=new Map([["core",tD],["failsafe",[Yl,Wl,cd]],["json",aD],["yaml11",z0],["yaml-1.1",z0]]),B0={binary:Cg,bool:Ng,float:RS,floatExp:OS,floatNaN:AS,floatTime:qS,int:LS,intHex:DS,intOct:MS,intTime:FS,map:Yl,merge:Ra,null:ud,omap:Ag,pairs:Tg,seq:Wl,set:Rg,timestamp:hd},dD={"tag:yaml.org,2002:binary":Cg,"tag:yaml.org,2002:merge":Ra,"tag:yaml.org,2002:omap":Ag,"tag:yaml.org,2002:pairs":Tg,"tag:yaml.org,2002:set":Rg,"tag:yaml.org,2002:timestamp":hd};function Bp(e,t,n){const a=U0.get(t);if(a&&!e)return n&&!a.includes(Ra)?a.concat(Ra):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{const l=Array.from(U0.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(Ra)),s.reduce((l,c)=>{const f=typeof c=="string"?B0[c]:c;if(!f){const d=JSON.stringify(c),h=Object.keys(B0).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${h}`)}return l.includes(f)||l.push(f),l},[])}const hD=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let HS=class KS{constructor({compat:t,customTags:n,merge:a,resolveKnownTags:s,schema:l,sortMapEntries:c,toStringDefaults:f}){this.compat=Array.isArray(t)?Bp(t,"compat"):t?Bp(null,t):null,this.name=typeof l=="string"&&l||"core",this.knownTags=s?dD:{},this.tags=Bp(n,this.name,a),this.toStringOptions=f??null,Object.defineProperty(this,kr,{value:Yl}),Object.defineProperty(this,na,{value:cd}),Object.defineProperty(this,Gl,{value:Wl}),this.sortMapEntries=typeof c=="function"?c:c===!0?hD:null}clone(){const t=Object.create(KS.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function pD(e,t){var d;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=kS(e,t),{commentString:l}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const h=l(e.commentBefore);n.unshift(Oa(h,""))}let c=!1,f=null;if(e.contents){if(Ut(e.contents)){if(e.contents.spaceBefore&&a&&n.push(""),e.contents.commentBefore){const b=l(e.contents.commentBefore);n.push(Oa(b,""))}s.forceBlockIndent=!!e.comment,f=e.contents.comment}const h=f?void 0:()=>c=!0;let m=Ul(e.contents,s,()=>f=null,h);f&&(m+=es(m,"",l(f))),(m[0]==="|"||m[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${m}`:n.push(m)}else n.push(Ul(e.contents,s));if((d=e.directives)!=null&&d.docEnd)if(e.comment){const h=l(e.comment);h.includes(`
|
|
419
|
+
`)?(n.push("..."),n.push(Oa(h,""))):n.push(`... ${h}`)}else n.push("...");else{let h=e.comment;h&&c&&(h=h.replace(/^\n+/,"")),h&&((!c||f)&&n[n.length-1]!==""&&n.push(""),n.push(Oa(l(h),"")))}return n.join(`
|
|
420
|
+
`)+`
|
|
421
|
+
`}class Xl{constructor(t,n,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ci,{value:Um});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 An({version:c}),this.setSchema(c,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){const t=Object.create(Xl.prototype,{[Ci]:{value:Um}});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){fl(this.contents)&&this.contents.add(t)}addIn(t,n){fl(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const a=xS(this);t.anchor=!n||a.has(n)?vS(n||"a",a):n}return new rd(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 N=T=>typeof T=="number"||T instanceof String||T instanceof Number,k=n.filter(N).map(String);k.length>0&&(n=n.concat(k)),s=n}else a===void 0&&n&&(a=n,n=void 0);const{aliasDuplicateObjects:l,anchorPrefix:c,flow:f,keepUndefined:d,onTagObj:h,tag:m}=a??{},{onAnchor:b,setAnchors:x,sourceObjects:v}=FL(this,c||"a"),E={aliasDuplicateObjects:l??!0,keepUndefined:d??!1,onAnchor:b,onTagObj:h,replacer:s,schema:this.schema,sourceObjects:v},w=vc(t,m,E);return f&&It(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 xn(s,l)}delete(t){return fl(this.contents)?this.contents.delete(t):!1}deleteIn(t){return lc(t)?this.contents==null?!1:(this.contents=null,!0):fl(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return It(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return lc(t)?!n&&kt(this.contents)?this.contents.value:this.contents:It(this.contents)?this.contents.getIn(t,n):void 0}has(t){return It(this.contents)?this.contents.has(t):!1}hasIn(t){return lc(t)?this.contents!==void 0:It(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=$f(this.schema,[t],n):fl(this.contents)&&this.contents.set(t,n)}setIn(t,n){lc(t)?this.contents=n:this.contents==null?this.contents=$f(this.schema,Array.from(t),n):fl(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 An({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 An({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 HS(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 f={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},d=ki(this.contents,n??"",f);if(typeof l=="function")for(const{count:h,res:m}of f.anchors.values())l(m,h);return typeof c=="function"?vl(c,{"":d},"",d):d}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 pD(this,t)}}function fl(e){if(It(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 ns extends Mg{constructor(t,n,a){super("YAMLParseError",t,n,a)}}class GS extends Mg{constructor(t,n,a){super("YAMLWarning",t,n,a)}}const Ff=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(f=>t.linePos(f));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 f=Math.min(l-39,c.length-79);c="…"+c.substring(f),l-=f-1}if(c.length>80&&(c=c.substring(0,79)+"…"),a>1&&/^ *$/.test(c.substring(0,l))){let f=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);f.length>80&&(f=f.substring(0,79)+`…
|
|
422
|
+
`),c=f+c}if(/[^ ]/.test(c)){let f=1;const d=n.linePos[1];(d==null?void 0:d.line)===a&&d.col>s&&(f=Math.max(1,Math.min(d.col-s,80-l)));const h=" ".repeat(l)+"^".repeat(f);n.message+=`:
|
|
423
|
+
|
|
424
|
+
${c}
|
|
425
|
+
${h}
|
|
426
|
+
`}};function Bl(e,{flow:t,indicator:n,next:a,offset:s,onError:l,parentIndent:c,startOnNewline:f}){let d=!1,h=f,m=f,b="",x="",v=!1,E=!1,w=null,N=null,k=null,T=null,C=null,R=null,B=null;for(const q of e)switch(E&&(q.type!=="space"&&q.type!=="newline"&&q.type!=="comma"&&l(q.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),w&&(h&&q.type!=="comment"&&q.type!=="newline"&&l(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),q.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&q.source.includes(" ")&&(w=q),m=!0;break;case"comment":{m||l(q,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const ee=q.source.substring(1)||" ";b?b+=x+ee:b=ee,x="",h=!1;break}case"newline":h?b?b+=q.source:(!R||n!=="seq-item-ind")&&(d=!0):x+=q.source,h=!0,v=!0,(N||k)&&(T=q),m=!0;break;case"anchor":N&&l(q,"MULTIPLE_ANCHORS","A node can have at most one anchor"),q.source.endsWith(":")&&l(q.offset+q.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),N=q,B??(B=q.offset),h=!1,m=!1,E=!0;break;case"tag":{k&&l(q,"MULTIPLE_TAGS","A node can have at most one tag"),k=q,B??(B=q.offset),h=!1,m=!1,E=!0;break}case n:(N||k)&&l(q,"BAD_PROP_ORDER",`Anchors and tags must be after the ${q.source} indicator`),R&&l(q,"UNEXPECTED_TOKEN",`Unexpected ${q.source} in ${t??"collection"}`),R=q,h=n==="seq-item-ind"||n==="explicit-key-ind",m=!1;break;case"comma":if(t){C&&l(q,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),C=q,h=!1,m=!1;break}default:l(q,"UNEXPECTED_TOKEN",`Unexpected ${q.type} token`),h=!1,m=!1}const j=e[e.length-1],$=j?j.offset+j.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:C,found:R,spaceBefore:d,comment:b,hasNewline:v,anchor:N,tag:k,newlineAfterProp:T,end:$,start:B??$}}function Ec(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
427
|
+
`))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(Ec(t.key)||Ec(t.value))return!0}return!1;default:return!0}}function Fm(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&Ec(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function QS(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(l,c)=>l===c||kt(l)&&kt(c)&&l.value===c.value;return t.some(l=>s(l.key,n))}const $0="All mapping items must start at the same column";function mD({composeNode:e,composeEmptyNode:t},n,a,s,l){var m;const c=(l==null?void 0:l.nodeClass)??si,f=new c(n.schema);n.atRoot&&(n.atRoot=!1);let d=a.offset,h=null;for(const b of a.items){const{start:x,key:v,sep:E,value:w}=b,N=Bl(x,{indicator:"explicit-key-ind",next:v??(E==null?void 0:E[0]),offset:d,onError:s,parentIndent:a.indent,startOnNewline:!0}),k=!N.found;if(k){if(v&&(v.type==="block-seq"?s(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==a.indent&&s(d,"BAD_INDENT",$0)),!N.anchor&&!N.tag&&!E){h=N.end,N.comment&&(f.comment?f.comment+=`
|
|
428
|
+
`+N.comment:f.comment=N.comment);continue}(N.newlineAfterProp||Ec(v))&&s(v??x[x.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=N.found)==null?void 0:m.indent)!==a.indent&&s(d,"BAD_INDENT",$0);n.atKey=!0;const T=N.end,C=v?e(n,v,N,s):t(n,T,x,null,N,s);n.schema.compat&&Fm(a.indent,v,s),n.atKey=!1,QS(n,f.items,C)&&s(T,"DUPLICATE_KEY","Map keys must be unique");const R=Bl(E??[],{indicator:"map-value-ind",next:w,offset:C.range[2],onError:s,parentIndent:a.indent,startOnNewline:!v||v.type==="block-scalar"});if(d=R.end,R.found){k&&((w==null?void 0:w.type)==="block-map"&&!R.hasNewline&&s(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&N.start<R.found.offset-1024&&s(C.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const B=w?e(n,w,R,s):t(n,d,E,null,R,s);n.schema.compat&&Fm(a.indent,w,s),d=B.range[2];const j=new xn(C,B);n.options.keepSourceTokens&&(j.srcToken=b),f.items.push(j)}else{k&&s(C.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),R.comment&&(C.comment?C.comment+=`
|
|
429
|
+
`+R.comment:C.comment=R.comment);const B=new xn(C);n.options.keepSourceTokens&&(B.srcToken=b),f.items.push(B)}}return h&&h<d&&s(h,"IMPOSSIBLE","Map comment with trailing content"),f.range=[a.offset,d,h??d],f}function gD({composeNode:e,composeEmptyNode:t},n,a,s,l){const c=(l==null?void 0:l.nodeClass)??Nr,f=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=a.offset,h=null;for(const{start:m,value:b}of a.items){const x=Bl(m,{indicator:"seq-item-ind",next:b,offset:d,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!x.found)if(x.anchor||x.tag||b)(b==null?void 0:b.type)==="block-seq"?s(x.end,"BAD_INDENT","All sequence items must start at the same column"):s(d,"MISSING_CHAR","Sequence item without - indicator");else{h=x.end,x.comment&&(f.comment=x.comment);continue}const v=b?e(n,b,x,s):t(n,x.end,m,null,x,s);n.schema.compat&&Fm(a.indent,b,s),d=v.range[2],f.items.push(v)}return f.range=[a.offset,d,h??d],f}function Ic(e,t,n,a){let s="";if(e){let l=!1,c="";for(const f of e){const{source:d,type:h}=f;switch(h){case"space":l=!0;break;case"comment":{n&&!l&&a(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";s?s+=c+m:s=m,c="";break}case"newline":s&&(c+=d),l=!0;break;default:a(f,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}t+=d.length}}return{comment:s,offset:t}}const $p="Block collections are not allowed within flow collections",Pp=e=>e&&(e.type==="block-map"||e.type==="block-seq");function bD({composeNode:e,composeEmptyNode:t},n,a,s,l){var N;const c=a.start.source==="{",f=c?"flow map":"flow sequence",d=(l==null?void 0:l.nodeClass)??(c?si:Nr),h=new d(n.schema);h.flow=!0;const m=n.atRoot;m&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let b=a.offset+a.start.source.length;for(let k=0;k<a.items.length;++k){const T=a.items[k],{start:C,key:R,sep:B,value:j}=T,$=Bl(C,{flow:f,indicator:"explicit-key-ind",next:R??(B==null?void 0:B[0]),offset:b,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!$.found){if(!$.anchor&&!$.tag&&!B&&!j){k===0&&$.comma?s($.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):k<a.items.length-1&&s($.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),$.comment&&(h.comment?h.comment+=`
|
|
430
|
+
`+$.comment:h.comment=$.comment),b=$.end;continue}!c&&n.options.strict&&Ec(R)&&s(R,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)$.comma&&s($.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if($.comma||s($.start,"MISSING_CHAR",`Missing , between ${f} items`),$.comment){let q="";e:for(const ee of C)switch(ee.type){case"comma":case"space":break;case"comment":q=ee.source.substring(1);break e;default:break e}if(q){let ee=h.items[h.items.length-1];Mt(ee)&&(ee=ee.value??ee.key),ee.comment?ee.comment+=`
|
|
431
|
+
`+q:ee.comment=q,$.comment=$.comment.substring(q.length+1)}}if(!c&&!B&&!$.found){const q=j?e(n,j,$,s):t(n,$.end,B,null,$,s);h.items.push(q),b=q.range[2],Pp(j)&&s(q.range,"BLOCK_IN_FLOW",$p)}else{n.atKey=!0;const q=$.end,ee=R?e(n,R,$,s):t(n,q,C,null,$,s);Pp(R)&&s(ee.range,"BLOCK_IN_FLOW",$p),n.atKey=!1;const L=Bl(B??[],{flow:f,indicator:"map-value-ind",next:j,offset:ee.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(L.found){if(!c&&!$.found&&n.options.strict){if(B)for(const be of B){if(be===L.found)break;if(be.type==="newline"){s(be,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}$.start<L.found.offset-1024&&s(L.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else j&&("source"in j&&((N=j.source)==null?void 0:N[0])===":"?s(j,"MISSING_CHAR",`Missing space after : in ${f}`):s(L.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const Z=j?e(n,j,L,s):L.found?t(n,L.end,B,null,L,s):null;Z?Pp(j)&&s(Z.range,"BLOCK_IN_FLOW",$p):L.comment&&(ee.comment?ee.comment+=`
|
|
432
|
+
`+L.comment:ee.comment=L.comment);const ie=new xn(ee,Z);if(n.options.keepSourceTokens&&(ie.srcToken=T),c){const be=h;QS(n,be.items,ee)&&s(q,"DUPLICATE_KEY","Map keys must be unique"),be.items.push(ie)}else{const be=new si(n.schema);be.flow=!0,be.items.push(ie);const ue=(Z??ee).range;be.range=[ee.range[0],ue[1],ue[2]],h.items.push(be)}b=Z?Z.range[2]:L.end}}const x=c?"}":"]",[v,...E]=a.end;let w=b;if((v==null?void 0:v.source)===x)w=v.offset+v.source.length;else{const k=f[0].toUpperCase()+f.substring(1),T=m?`${k} must end with a ${x}`:`${k} in block collection must be sufficiently indented and end with a ${x}`;s(b,m?"MISSING_CHAR":"BAD_INDENT",T),v&&v.source.length!==1&&E.unshift(v)}if(E.length>0){const k=Ic(E,w,n.options.strict,s);k.comment&&(h.comment?h.comment+=`
|
|
433
|
+
`+k.comment:h.comment=k.comment),h.range=[a.offset,w,k.offset]}else h.range=[a.offset,w,w];return h}function Fp(e,t,n,a,s,l){const c=n.type==="block-map"?mD(e,t,n,a,l):n.type==="block-seq"?gD(e,t,n,a,l):bD(e,t,n,a,l),f=c.constructor;return s==="!"||s===f.tagName?(c.tag=f.tagName,c):(s&&(c.tag=s),c)}function yD(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 f=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!c||c==="!"||c===si.tagName&&f==="map"||c===Nr.tagName&&f==="seq")return Fp(e,t,n,s,c);let d=t.schema.tags.find(v=>v.tag===c&&v.collection===f);if(!d){const v=t.schema.knownTags[c];if((v==null?void 0:v.collection)===f)t.schema.tags.push(Object.assign({},v,{default:!1})),d=v;else return v?s(l,"BAD_COLLECTION_TYPE",`${v.tag} used for ${f} collection, but expects ${v.collection??"scalar"}`,!0):s(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),Fp(e,t,n,s,c)}const h=Fp(e,t,n,s,c,d),m=((x=d.resolve)==null?void 0:x.call(d,h,v=>s(l,"TAG_RESOLVE_FAILED",v),t.options))??h,b=Ut(m)?m:new $e(m);return b.range=h.range,b.tag=c,d!=null&&d.format&&(b.format=d.format),b}function VS(e,t,n){const a=t.offset,s=xD(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};const l=s.mode===">"?$e.BLOCK_FOLDED:$e.BLOCK_LITERAL,c=t.source?vD(t.source):[];let f=c.length;for(let w=c.length-1;w>=0;--w){const N=c[w][1];if(N===""||N==="\r")f=w;else break}if(f===0){const w=s.chomp==="+"&&c.length>0?`
|
|
434
|
+
`.repeat(Math.max(1,c.length-1)):"";let N=a+s.length;return t.source&&(N+=t.source.length),{value:w,type:l,comment:s.comment,range:[a,N,N]}}let d=t.indent+s.indent,h=t.offset+s.length,m=0;for(let w=0;w<f;++w){const[N,k]=c[w];if(k===""||k==="\r")s.indent===0&&N.length>d&&(d=N.length);else{N.length<d&&n(h+N.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(d=N.length),m=w,d===0&&!e.atRoot&&n(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=N.length+k.length+1}for(let w=c.length-1;w>=f;--w)c[w][0].length>d&&(f=w+1);let b="",x="",v=!1;for(let w=0;w<m;++w)b+=c[w][0].slice(d)+`
|
|
435
|
+
`;for(let w=m;w<f;++w){let[N,k]=c[w];h+=N.length+k.length+1;const T=k[k.length-1]==="\r";if(T&&(k=k.slice(0,-1)),k&&N.length<d){const R=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(h-k.length-(T?2:1),"BAD_INDENT",R),N=""}l===$e.BLOCK_LITERAL?(b+=x+N.slice(d)+k,x=`
|
|
436
|
+
`):N.length>d||k[0]===" "?(x===" "?x=`
|
|
437
|
+
`:!v&&x===`
|
|
438
|
+
`&&(x=`
|
|
439
|
+
|
|
440
|
+
`),b+=x+N.slice(d)+k,x=`
|
|
441
|
+
`,v=!0):k===""?x===`
|
|
442
|
+
`?b+=`
|
|
443
|
+
`:x=`
|
|
444
|
+
`:(b+=x+k,x=" ",v=!1)}switch(s.chomp){case"-":break;case"+":for(let w=f;w<c.length;++w)b+=`
|
|
445
|
+
`+c[w][0].slice(d);b[b.length-1]!==`
|
|
446
|
+
`&&(b+=`
|
|
447
|
+
`);break;default:b+=`
|
|
448
|
+
`}const E=a+s.length+t.source.length;return{value:b,type:l,comment:s.comment,range:[a,E,E]}}function xD({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,f="",d=-1;for(let x=1;x<s.length;++x){const v=s[x];if(!f&&(v==="-"||v==="+"))f=v;else{const E=Number(v);!c&&E?c=E:d===-1&&(d=e+x)}}d!==-1&&a(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let h=!1,m="",b=s.length;for(let x=1;x<t.length;++x){const v=t[x];switch(v.type){case"space":h=!0;case"newline":b+=v.source.length;break;case"comment":n&&!h&&a(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),b+=v.source.length,m=v.source.substring(1);break;case"error":a(v,"UNEXPECTED_TOKEN",v.message),b+=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"&&(b+=w.length)}}}return{mode:l,indent:c,chomp:f,comment:m,length:b}}function vD(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 YS(e,t,n){const{offset:a,type:s,source:l,end:c}=e;let f,d;const h=(x,v,E)=>n(a+x,v,E);switch(s){case"scalar":f=$e.PLAIN,d=ED(l,h);break;case"single-quoted-scalar":f=$e.QUOTE_SINGLE,d=SD(l,h);break;case"double-quoted-scalar":f=$e.QUOTE_DOUBLE,d=wD(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 m=a+l.length,b=Ic(c,m,t,n);return{value:d,type:f,comment:b.comment,range:[a,m,b.offset]}}function ED(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}`),WS(e)}function SD(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),WS(e.slice(1,-1)).replace(/''/g,"'")}function WS(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
449
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
450
|
+
`,"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===`
|
|
451
|
+
`?s+=l:l=`
|
|
452
|
+
`:(s+=l+a[1],l=" "),c=n.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=c,a=f.exec(e),s+l+((a==null?void 0:a[1])??"")}function wD(e,t){let n="";for(let a=1;a<e.length-1;++a){const s=e[a];if(!(s==="\r"&&e[a+1]===`
|
|
453
|
+
`))if(s===`
|
|
454
|
+
`){const{fold:l,offset:c}=kD(e,a);n+=l,a=c}else if(s==="\\"){let l=e[++a];const c=ND[l];if(c)n+=c;else if(l===`
|
|
455
|
+
`)for(l=e[a+1];l===" "||l===" ";)l=e[++a+1];else if(l==="\r"&&e[a+1]===`
|
|
456
|
+
`)for(l=e[++a+1];l===" "||l===" ";)l=e[++a+1];else if(l==="x"||l==="u"||l==="U"){const f={x:2,u:4,U:8}[l];n+=_D(e,a+1,f,t),a+=f}else{const f=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),n+=f}}else if(s===" "||s===" "){const l=a;let c=e[a+1];for(;c===" "||c===" ";)c=e[++a+1];c!==`
|
|
457
|
+
`&&!(c==="\r"&&e[a+2]===`
|
|
458
|
+
`)&&(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 kD(e,t){let n="",a=e[t+1];for(;(a===" "||a===" "||a===`
|
|
459
|
+
`||a==="\r")&&!(a==="\r"&&e[t+2]!==`
|
|
460
|
+
`);)a===`
|
|
461
|
+
`&&(n+=`
|
|
462
|
+
`),t+=1,a=e[t+1];return n||(n=" "),{fold:n,offset:t}}const ND={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
463
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function _D(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 f=e.substr(t-2,n+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(c)}function XS(e,t,n,a){const{value:s,type:l,comment:c,range:f}=t.type==="block-scalar"?VS(e,t,a):YS(t,e.options.strict,a),d=n?e.directives.tagName(n.source,b=>a(n,"TAG_RESOLVE_FAILED",b)):null;let h;e.options.stringKeys&&e.atKey?h=e.schema[na]:d?h=CD(e.schema,s,d,n,a):t.type==="scalar"?h=TD(e,s,t,a):h=e.schema[na];let m;try{const b=h.resolve(s,x=>a(n??t,"TAG_RESOLVE_FAILED",x),e.options);m=kt(b)?b:new $e(b)}catch(b){const x=b instanceof Error?b.message:String(b);a(n??t,"TAG_RESOLVE_FAILED",x),m=new $e(s)}return m.range=f,m.source=s,l&&(m.type=l),d&&(m.tag=d),h.format&&(m.format=h.format),c&&(m.comment=c),m}function CD(e,t,n,a,s){var f;if(n==="!")return e[na];const l=[];for(const d of e.tags)if(!d.collection&&d.tag===n)if(d.default&&d.test)l.push(d);else return d;for(const d of l)if((f=d.test)!=null&&f.test(t))return d;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[na])}function TD({atKey:e,directives:t,schema:n},a,s,l){const c=n.tags.find(f=>{var d;return(f.default===!0||e&&f.default==="key")&&((d=f.test)==null?void 0:d.test(a))})||n[na];if(n.compat){const f=n.compat.find(d=>{var h;return d.default&&((h=d.test)==null?void 0:h.test(a))})??n[na];if(c.tag!==f.tag){const d=t.tagString(c.tag),h=t.tagString(f.tag),m=`Value may be parsed as either ${d} or ${h}`;l(s,"TAG_RESOLVE_FAILED",m,!0)}}return c}function AD(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 OD={composeNode:ZS,composeEmptyNode:Lg};function ZS(e,t,n,a){const s=e.atKey,{spaceBefore:l,comment:c,anchor:f,tag:d}=n;let h,m=!0;switch(t.type){case"alias":h=RD(e,t,a),(f||d)&&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=XS(e,t,d,a),f&&(h.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{h=yD(OD,e,t,n,a),f&&(h.anchor=f.source.substring(1))}catch(b){const x=b instanceof Error?b.message:String(b);a(t,"RESOURCE_EXHAUSTION",x)}break;default:{const b=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;a(t,"UNEXPECTED_TOKEN",b),m=!1}}return h??(h=Lg(e,t.offset,void 0,null,n,a)),f&&h.anchor===""&&a(f,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!kt(h)||typeof h.value!="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str")&&a(d??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&&m&&(h.srcToken=t),h}function Lg(e,t,n,a,{spaceBefore:s,comment:l,anchor:c,tag:f,end:d},h){const m={type:"scalar",offset:AD(t,n,a),indent:-1,source:""},b=XS(e,m,f,h);return c&&(b.anchor=c.source.substring(1),b.anchor===""&&h(c,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(b.spaceBefore=!0),l&&(b.comment=l,b.range[2]=d),b}function RD({options:e},{offset:t,source:n,end:a},s){const l=new rd(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,f=Ic(a,c,e.strict,s);return l.range=[t,c,f.offset],f.comment&&(l.comment=f.comment),l}function jD(e,t,{offset:n,start:a,value:s,end:l},c){const f=Object.assign({_directives:t},e),d=new Xl(void 0,f),h={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=Bl(a,{indicator:"doc-start",next:s??(l==null?void 0:l[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!m.hasNewline&&c(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=s?ZS(h,s,m,c):Lg(h,m.end,a,null,m,c);const b=d.contents.range[2],x=Ic(l,b,!1,c);return x.comment&&(d.comment=x.comment),d.range=[n,b,x.offset],d}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 P0(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?`
|
|
464
|
+
|
|
465
|
+
`:`
|
|
466
|
+
`)+(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 Dg{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 GS(c,a,s)):this.errors.push(new ns(c,a,s))},this.directives=new An({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:a,afterEmptyLine:s}=P0(this.prelude);if(a){const l=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
467
|
+
${a}`:a;else if(s||t.directives.docStart||!l)t.commentBefore=a;else if(It(l)&&!l.flow&&l.items.length>0){let c=l.items[0];Mt(c)&&(c=c.key);const f=c.commentBefore;c.commentBefore=f?`${a}
|
|
468
|
+
${f}`:a}else{const c=l.commentBefore;l.commentBefore=c?`${a}
|
|
469
|
+
${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:P0(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=jD(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 ns(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 ns(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}
|
|
470
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new ns(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 MD(e,t=!0,n){if(e){const a=(s,l,c)=>{const f=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(f,l,c);else throw new ns([f,f+1],l,c)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return YS(e,t,a);case"block-scalar":return VS({options:{strict:t}},e,a)}}return null}function LD(e,t){const{implicitKey:n=!1,indent:a,inFlow:s=!1,offset:l=-1,type:c="PLAIN"}=t,f=Lc({type:c,value:e},{implicitKey:n,indent:a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),d=t.end??[{type:"newline",offset:-1,indent:a,source:`
|
|
471
|
+
`}];switch(f[0]){case"|":case">":{const h=f.indexOf(`
|
|
472
|
+
`),m=f.substring(0,h),b=f.substring(h+1)+`
|
|
473
|
+
`,x=[{type:"block-scalar-header",offset:l,indent:a,source:m}];return JS(x,d)||x.push({type:"newline",offset:-1,indent:a,source:`
|
|
474
|
+
`}),{type:"block-scalar",offset:l,indent:a,props:x,source:b}}case'"':return{type:"double-quoted-scalar",offset:l,indent:a,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:l,indent:a,source:f,end:d};default:return{type:"scalar",offset:l,indent:a,source:f,end:d}}}function DD(e,t,n={}){let{afterKey:a=!1,implicitKey:s=!1,inFlow:l=!1,type:c}=n,f="indent"in e?e.indent:null;if(a&&typeof f=="number"&&(f+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const h=e.props[0];if(h.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=h.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=Lc({type:c,value:t},{implicitKey:s||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":ID(e,d);break;case'"':qp(e,d,"double-quoted-scalar");break;case"'":qp(e,d,"single-quoted-scalar");break;default:qp(e,d,"scalar")}}function ID(e,t){const n=t.indexOf(`
|
|
475
|
+
`),a=t.substring(0,n),s=t.substring(n+1)+`
|
|
476
|
+
`;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,f=[{type:"block-scalar-header",offset:l,indent:c,source:a}];JS(f,"end"in e?e.end:void 0)||f.push({type:"newline",offset:-1,indent:c,source:`
|
|
477
|
+
`});for(const d of Object.keys(e))d!=="type"&&d!=="offset"&&delete e[d];Object.assign(e,{type:"block-scalar",indent:c,props:f,source:s})}}function JS(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 qp(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:`
|
|
478
|
+
`};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 zD=e=>"type"in e?qf(e):Af(e);function qf(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=qf(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=Af(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=Af(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=Af(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 Af({start:e,key:t,sep:n,value:a}){let s="";for(const l of e)s+=l.source;if(t&&(s+=qf(t)),n)for(const l of n)s+=l.source;return a&&(s+=qf(a)),s}const qm=Symbol("break visit"),UD=Symbol("skip children"),ew=Symbol("remove item");function ms(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),tw(Object.freeze([]),e,t)}ms.BREAK=qm;ms.SKIP=UD;ms.REMOVE=ew;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 tw(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 f=tw(Object.freeze(e.concat([[s,c]])),l.items[c],n);if(typeof f=="number")c=f-1;else{if(f===qm)return qm;f===ew&&(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 pd="\uFEFF",md="",gd="",Sc="",BD=e=>!!e&&"items"in e,$D=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function PD(e){switch(e){case pd:return"<BOM>";case md:return"<DOC>";case gd:return"<FLOW_END>";case Sc:return"<SCALAR>";default:return JSON.stringify(e)}}function nw(e){switch(e){case pd:return"byte-order-mark";case md:return"doc-mode";case gd:return"flow-error-end";case Sc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
479
|
+
`:case`\r
|
|
480
|
+
`: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 FD=Object.freeze(Object.defineProperty({__proto__:null,BOM:pd,DOCUMENT:md,FLOW_END:gd,SCALAR:Sc,createScalarToken:LD,isCollection:BD,isScalar:$D,prettyToken:PD,resolveAsScalar:MD,setScalarValue:DD,stringify:zD,tokenType:nw,visit:ms},Symbol.toStringTag,{value:"Module"}));function Li(e){switch(e){case void 0:case" ":case`
|
|
481
|
+
`:case"\r":case" ":return!0;default:return!1}}const F0=new Set("0123456789ABCDEFabcdef"),qD=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ff=new Set(",[]{}"),HD=new Set(` ,[]{}
|
|
482
|
+
\r `),Hp=e=>!e||HD.has(e);class iw{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===`
|
|
483
|
+
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
484
|
+
`:!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===`
|
|
485
|
+
`||!s&&!this.atEnd)return t+a+1}return n===`
|
|
486
|
+
`||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(`
|
|
487
|
+
`,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]===pd&&(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 md,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(Hp),"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 gd,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(Hp),"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(`
|
|
488
|
+
`,this.pos);if(s!==-1){for(;s!==-1;){const l=this.continueScalar(s+1);if(l===-1)break;s=a.indexOf(`
|
|
489
|
+
`,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`
|
|
490
|
+
`:t=l,n=0;break;case"\r":{const c=this.buffer[l+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
|
|
491
|
+
`)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(`
|
|
492
|
+
`,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===`
|
|
493
|
+
`;)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 f=l;for(;c===" ";)c=this.buffer[--l];if(c===`
|
|
494
|
+
`&&l>=this.pos&&l+1+n>f)t=l;else break}while(!0);return yield Sc,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&&ff.has(l))break;n=a}else if(Li(s)){let l=this.buffer[a+1];if(s==="\r"&&(l===`
|
|
495
|
+
`?(a+=1,s=`
|
|
496
|
+
`,l=this.buffer[a+1]):n=a),l==="#"||t&&ff.has(l))break;if(s===`
|
|
497
|
+
`){const c=this.continueScalar(a+1);if(c===-1)break;a=Math.max(a,c-2)}}else{if(t&&ff.has(s))break;n=a}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield Sc,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(Hp))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Li(n)||t&&ff.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(qD.has(n))n=this.buffer[++t];else if(n==="%"&&F0.has(this.buffer[t+1])&&F0.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===`
|
|
498
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
499
|
+
`?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 aw{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 hr(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function q0(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 rw(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 df(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 dl(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 H0(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!hr(t.start,"explicit-key-ind")&&!hr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,rw(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 iw,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=nw(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"&&H0(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&&q0(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":{q0(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=df(this.peek(2)),a=dl(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(`
|
|
500
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
501
|
+
`,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 f=[];for(let d=0;d<n.sep.length;++d){const h=n.sep[d];switch(h.type){case"newline":f.push(d);break;case"space":break;case"comment":h.indent>t.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(c=n.sep.splice(f[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(hr(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(rw(n.key)&&!hr(n.sep,"newline")){const f=dl(n.start),d=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:f,key:d,sep:h}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(hr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const f=dl(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?t.items.push({start:c,key:null,sep:[this.sourceToken]}):hr(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 f=this.flowScalar(this.type);l||n.value?(t.items.push({start:c,key:f,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(f):(Object.assign(n,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(t);if(f){if(f.type==="block-seq"){if(!n.explicitKey&&n.sep&&!hr(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(f);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||hr(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=df(a),l=dl(s);H0(t);const c=t.end.splice(1,t.end.length);c.push(this.sourceToken);const f={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:l,key:t,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
502
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
503
|
+
`,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=df(t),a=dl(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=df(t),a=dl(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 sw(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new aw||null,prettyErrors:t}}function KD(e,t={}){const{lineCounter:n,prettyErrors:a}=sw(t),s=new Ig(n==null?void 0:n.addNewLine),l=new Dg(t),c=Array.from(l.compose(s.parse(e)));if(a&&n)for(const f of c)f.errors.forEach(Ff(e,n)),f.warnings.forEach(Ff(e,n));return c.length>0?c:Object.assign([],{empty:!0},l.streamInfo())}function lw(e,t={}){const{lineCounter:n,prettyErrors:a}=sw(t),s=new Ig(n==null?void 0:n.addNewLine),l=new Dg(t);let c=null;for(const f of l.compose(s.parse(e),!0,e.length))if(!c)c=f;else if(c.options.logLevel!=="silent"){c.errors.push(new ns(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&n&&(c.errors.forEach(Ff(e,n)),c.warnings.forEach(Ff(e,n))),c}function GD(e,t,n){let a;typeof t=="function"?a=t:n===void 0&&t&&typeof t=="object"&&(n=t);const s=lw(e,n);if(!s)return null;if(s.warnings.forEach(l=>NS(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 QD(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:rd,CST:FD,Composer:Dg,Document:Xl,Lexer:iw,LineCounter:aw,Pair:xn,Parser:Ig,Scalar:$e,Schema:HS,YAMLError:Mg,YAMLMap:si,YAMLParseError:ns,YAMLSeq:Nr,YAMLWarning:GS,isAlias:Tr,isCollection:It,isDocument:ys,isMap:Ql,isNode:Ut,isPair:Mt,isScalar:kt,isSeq:Vl,parse:GD,parseAllDocuments:KD,parseDocument:lw,stringify:QD,visit:xs,visitAsync:ad},Symbol.toStringTag,{value:"Module"}));function VD({projectName:e,file:t,onClose:n,onSaved:a}){const s=Gn(),{alert:l}=ci(),{data:c,isLoading:f,isError:d,error:h,refetch:m}=ot({queryKey:["pipeline-file",e,t],queryFn:()=>yL(e,t)}),[b,x]=A.useState("structured"),[v,E]=A.useState(null),[w,N]=A.useState(null);A.useEffect(()=>{c&&v===null&&(E(c.content),N(c.etag),c.parseError&&x("yaml"))},[c,v]),A.useEffect(()=>{const j=$=>{$.key==="Escape"&&n()};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[n]);const k=Kn({mutationFn:()=>{if(v===null||w===null)throw new Error("no draft");return xL(e,t,v,w)},onSuccess:j=>{N(j.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:j=>{const $=j.status;l({title:$===409?"File was modified elsewhere":$===422?"Invalid YAML syntax":"Save failed",body:j instanceof Error?j.message:String(j)})}}),T=v!==null&&c&&v!==c.content,{parsed:C,parseError:R}=A.useMemo(()=>{if(v===null)return{parsed:null,parseError:null};try{return{parsed:K0.parse(v)??{},parseError:null}}catch(j){return{parsed:null,parseError:j instanceof Error?j.message:String(j)}}},[v]),B=j=>{try{const $=K0.stringify(j,{lineWidth:0});E($)}catch($){l({title:"YAML serialization failed",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}),(c==null?void 0:c.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,w&&` · etag ${w}`]})]}),p.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"Close",children:p.jsx(_i,{size:14,strokeWidth:3})})]}),f&&p.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading…"}),d&&p.jsxs("p",{className:"text-[var(--color-crashed)]",children:["Load failed: ",h instanceof Error?h.message:String(h)]}),c&&v!==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:()=>x("structured"),"aria-pressed":b==="structured",disabled:!!R,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",b==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",R?"opacity-50 cursor-not-allowed":""].join(" "),title:R??void 0,children:[p.jsx(Mc,{size:11,strokeWidth:2.5}),"Structured"]}),p.jsxs("button",{type:"button",onClick:()=>x("yaml"),"aria-pressed":b==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",b==="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}),"Raw YAML"]})]}),R&&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: ",R]}),(c==null?void 0:c.isActive)&&p.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:"⚠ This is the active pipeline; takes effect on the next tick after save"})]}),p.jsxs("div",{className:"flex-1 overflow-auto",children:[b==="structured"&&C&&p.jsx(YD,{parsed:C,onChange:B}),b==="yaml"&&p.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:v,onChange:j=>E(j.target.value),spellCheck:!1,"aria-label":"Pipeline YAML editor"})]}),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:T?p.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● unsaved"}):k.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})," Saved"]}):"No changes"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{E(null),m()},disabled:k.isPending,type:"button",children:"Reload"}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>k.mutate(),disabled:!T||k.isPending,type:"button","aria-label":"Save pipeline",children:[k.isPending?p.jsx(zt,{size:13,strokeWidth:3,className:"animate-spin"}):p.jsx(nd,{size:13,strokeWidth:3}),"Save"]})]})]})]})]})})}function YD({parsed:e,onChange:t}){const n=e.stages??[],a=d=>{t({...e,stages:d})},s=()=>{a([...n,{name:`stage-${n.length+1}`,on_complete:"move_card Done"}])},l=d=>{a(n.filter((h,m)=>m!==d))},c=(d,h)=>{const m=[...n],b=d+h;b<0||b>=m.length||([m[d],m[b]]=[m[b],m[d]],a(m))},f=(d,h)=>{a(n.map((m,b)=>b===d?{...m,...h}: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:d=>t({...e,mode:d.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:"project = event-driven pipeline (default) · steps = sequential script"})]}),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 (",n.length,")"]}),p.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:s,"aria-label":"Add stage",children:[p.jsx(Bi,{size:11,strokeWidth:3})," Add stage"]})]}),n.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:'No stages yet. Click "Add stage" to start.'}):p.jsx("div",{className:"flex flex-col gap-3",children:n.map((d,h)=>p.jsx(WD,{stage:d,index:h,total:n.length,onChange:m=>f(h,m),onRemove:()=>l(h),onMoveUp:()=>c(h,-1),onMoveDown:()=>c(h,1)},h))})]})]})}function WD({stage:e,index:t,total:n,onChange:a,onRemove:s,onMoveUp:l,onMoveDown:c}){const 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":"Move up",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":"Move down",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":"Delete stage",children:p.jsx(Kl,{size:12,strokeWidth:3})})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[p.jsx(ur,{label:"name",hint:"unique stage name",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:d=>a({name:d.target.value}),placeholder:"develop"})}),p.jsx(ur,{label:"profile",hint:"skill profile (optional)",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:d=>a({profile:d.target.value||void 0}),placeholder:"fullstack"})}),p.jsx(ur,{label:"card_state",hint:"card state during this stage",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:d=>a({card_state:d.target.value||void 0}),placeholder:"Inprogress"})}),p.jsx(ur,{label:"timeout",hint:"optional, e.g. 30m 2h",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:d=>a({timeout:d.target.value||void 0}),placeholder:"2h"})}),p.jsx(ur,{label:"trigger",hint:"trigger condition (optional, defaults applied)",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:d=>a({trigger:d.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),p.jsx(ur,{label:"on_complete",hint:"action on success",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:d=>a({on_complete:d.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(ur,{label:"action",hint:"action on failure, e.g. label NEEDS-FIX",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:d=>a({on_fail:{...f,action:d.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),p.jsx(ur,{label:"comment",hint:"comment written into the card",children:p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:d=>a({on_fail:{...f,comment:d.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:d=>a({on_fail:{...f,halt:d.target.checked}})}),p.jsx("span",{className:"font-bold",children:"halt"}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(stops the pipeline on failure; remove to continue with the next card)"})]})]})]})}function ur({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 XD({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const[l,c]=A.useState(""),[f,d]=A.useState("blank");A.useEffect(()=>{const v=E=>{E.key==="Escape"&&e()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e]);const h=l.trim(),m=h.endsWith(".yaml")?h:h?`${h}.yaml`:"",b=m&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(m),x=()=>{!b||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:"New pipeline"}),p.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":"Close",children:p.jsx(_i,{size:14,strokeWidth:3})})]}),p.jsxs("form",{onSubmit:v=>{v.preventDefault(),x()},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:"Filename"}),p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"e.g. ci",value:l,onChange:v=>c(v.target.value),autoFocus:!0}),p.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["Saved as ",p.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:m||"xxx.yaml"}),"。 Allowed: a-z A-Z 0-9 _ -. A duplicate name returns 409."]})]}),p.jsxs("fieldset",{className:"flex flex-col gap-2",children:[p.jsx("legend",{className:"text-sm font-bold mb-1",children:"Initial contents"}),p.jsx(Kp,{value:"blank",current:f,label:"Blank template",desc:"Minimal 1-stage pipeline (develop → Done)",onSelect:d}),p.jsx(Kp,{value:"sample",current:f,label:"Tutorial template",desc:"Copy from sample.yaml.example (commented, explains every field)",onSelect:d,disabled:!a,disabledReason:"sample.yaml.example not found"}),p.jsx(Kp,{value:"active",current:f,label:"Copy from current",desc:"Copy from project.yaml (start from the current config)",onSelect:d,disabled:!n,disabledReason:"project.yaml not found"})]}),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:"Cancel"}),p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!b||s,"aria-label":"Create pipeline",children:[s?p.jsx(zt,{size:13,strokeWidth:3,className:"animate-spin"}):p.jsx(Bi,{size:13,strokeWidth:3}),"Create"]})]})]})]})})}function Kp({value:e,current:t,label:n,desc:a,onSelect:s,disabled:l,disabledReason:c}){const f=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":f?"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:f,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 ZD(){var l;const{name:e=""}=jE(),t=_r(),[n,a]=A.useState("overview"),s=ot({queryKey:["project",e],queryFn:()=>fL(e),enabled:!!e});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:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"Back to projects",children:[p.jsx(KE,{size:14,strokeWidth:3}),"Back"]}),p.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:e}),p.jsx(bs,{to:`/board?project=${encodeURIComponent(e)}`,className:"nb-btn nb-btn-mint",children:"Board"})]}),p.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[p.jsx(hf,{current:n,value:"overview",onSelect:a,icon:hA,children:"Overview"}),p.jsx(hf,{current:n,value:"config",onSelect:a,icon:XE,children:"Config"}),p.jsx(hf,{current:n,value:"pipelines",onSelect:a,icon:tS,children:"Pipelines"}),p.jsx(hf,{current:n,value:"danger",onSelect:a,icon:Kl,children:"Danger zone"})]}),n==="overview"&&p.jsx(JD,{name:e,data:s.data,loading:s.isLoading}),n==="config"&&p.jsx(eI,{name:e}),n==="pipelines"&&p.jsx(tI,{name:e}),n==="danger"&&p.jsx(nI,{name:e,repoDir:((l=s.data)==null?void 0:l.repoDir)??null})]})}function hf({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 JD({name:e,data:t,loading:n}){return n?p.jsx("div",{className:"nb-card",children:p.jsx("p",{className:"text-[var(--color-text-muted)]",children:"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:"Repository"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),p.jsx("dt",{className:"font-bold",children:"PM backend"}),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:"Cards"}),p.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.cards.total," total · ",t.cards.inprogress," in progress · ",t.cards.done," done"]}),p.jsx("dt",{className:"font-bold",children:"Worker"}),p.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.workers.total," (",t.workers.active," 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:"Last activity"}),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.jsxs("p",{children:["Project ",e," not found or unreadable."]})})}function eI({name:e}){const t=Gn(),{alert:n}=ci(),{data:a,isLoading:s,isError:l,error:c,refetch:f}=ot({queryKey:["project-conf",e],queryFn:()=>hL(e)}),[d,h]=A.useState(null),[m,b]=A.useState(null);A.useEffect(()=>{a&&d===null&&(h(a.content),b(a.etag))},[a,d]);const x=d!==null&&a!==void 0&&d!==a.content,v=Kn({mutationFn:()=>{if(d===null||m===null)throw new Error("no draft");return pL(e,d,m)},onSuccess:E=>{b(E.etag),t.invalidateQueries({queryKey:["project-conf",e]}),t.invalidateQueries({queryKey:["project",e]})},onError:E=>{const w=E.status;n({title:w===409?"Config was modified elsewhere":"Save failed",body:w===409?'The conf file was modified while you were editing. Click "Reload" before editing again.':E instanceof Error?E.message:String(E)})}});return s?p.jsx("div",{className:"nb-card",children:p.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading…"})}):l?p.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:p.jsxs("p",{children:["Load failed: ",c instanceof Error?c.message:String(c)]})}):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:()=>{h(null),f()},disabled:v.isPending,"aria-label":"Reload",children:[p.jsx(zl,{size:13,strokeWidth:2.5}),"Reload"]}),p.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>v.mutate(),disabled:!x||v.isPending,"aria-label":"Save config",children:[v.isPending?p.jsx(zt,{size:13,strokeWidth:3,className:"animate-spin"}):v.isSuccess&&!x?p.jsx(KT,{size:13,strokeWidth:3}):p.jsx(nd,{size:13,strokeWidth:3}),"Save"]})]})]}),p.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:d??"",onChange:E=>h(E.target.value),spellCheck:!1,"aria-label":"Conf file editor"}),x&&p.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:"● unsaved changes"})]})}function tI({name:e}){const t=Gn(),{confirm:n,alert:a}=ci(),{data:s,isLoading:l}=ot({queryKey:["project-pipelines",e],queryFn:()=>gL(e)}),[c,f]=A.useState(null),[d,h]=A.useState(!1),m=Kn({mutationFn:E=>bL(e,E),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:E=>{a({title:"Switch failed",body:E instanceof Error?E.message:String(E)})}}),b=Kn({mutationFn:E=>EL(e,E),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:E=>{a({title:"Delete failed",body:E instanceof Error?E.message:String(E)})}}),x=Kn({mutationFn:E=>vL(e,E.name,E.template),onSuccess:E=>{t.invalidateQueries({queryKey:["project-pipelines",e]}),h(!1),f(E.name)},onError:E=>{a({title:"Create failed",body:E instanceof Error?E.message:String(E)})}});if(l)return p.jsx("div",{className:"nb-card",children:p.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading…"})});const v=[];s!=null&&s.active&&v.push({name:s.active,isActive:!0});for(const E of(s==null?void 0:s.available)??[])v.push({name:E.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:()=>h(!0),disabled:x.isPending,"aria-label":"New pipeline",children:[p.jsx(Bi,{size:12,strokeWidth:3}),"New pipeline"]})]}),v.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:'No pipeline files yet. Click "New pipeline" to start.'}):p.jsx("ul",{className:"flex flex-col gap-2",children:v.map(E=>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(tS,{size:16,strokeWidth:2.5}),p.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:E.name}),E.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(E.name),"aria-label":`Edit ${E.name}`,children:[p.jsx(xg,{size:11,strokeWidth:2.5}),"Edit"]}),!E.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 n({title:`Switch to ${E.name}`,body:`Current project.yaml will be overwritten with the contents of ${E.name}. Continue?`,confirm:"Switch"})&&m.mutate(E.name)},disabled:m.isPending,"aria-label":`Switch to ${E.name}`,children:"Switch"}),p.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await n({title:`Delete ${E.name}`,body:"This pipeline file will be permanently deleted.",confirm:"Delete",danger:!0})&&b.mutate(E.name)},disabled:b.isPending,"aria-label":`Delete ${E.name}`,children:p.jsx(Kl,{size:11,strokeWidth:2.5})})]})]})]},E.name))})]}),c&&p.jsx(VD,{projectName:e,file:c,onClose:()=>f(null),onSaved:()=>{t.invalidateQueries({queryKey:["project-pipelines",e]})}}),d&&p.jsx(XD,{hasActive:!!(s!=null&&s.active),hasSample:!0,isPending:x.isPending,onCancel:()=>h(!1),onCreate:(E,w)=>x.mutate({name:E,template:w})})]})}function nI({name:e,repoDir:t}){const n=_r(),a=Gn(),{alert:s}=ci(),[l,c]=A.useState(""),[f,d]=A.useState(!0),h=Kn({mutationFn:()=>mL(e,{includeClaudeDir:f}),onSuccess:m=>{a.invalidateQueries({queryKey:["projects"]});const b=m.claudeRemoved.filter(x=>x.ok).map(x=>x.path);s({title:"Deleted",body:b.length>0?`Project deleted. Also cleaned up:
|
|
504
|
+
${b.join(`
|
|
505
|
+
`)}`:"Project deleted."}).then(()=>n("/projects"))},onError:m=>{s({title:"Delete failed",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:"Delete project"}),p.jsxs("p",{className:"text-sm mb-4",children:["This will clean up ",p.jsxs("code",{className:"font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-1.5 py-0.5 rounded",children:["~/.coral/projects/",e,"/"]}),"(including all cards, runtime, logs)."]}),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=>d(m.target.checked),className:"mt-0.5"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("div",{className:"text-sm font-bold",children:"Also clean up the repo's .claude/"}),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:"The repo itself is untouched; only this directory is cleaned."})]})]}),p.jsx("div",{className:"mb-4",children:p.jsxs("label",{className:"flex flex-col gap-1.5",children:[p.jsxs("span",{className:"text-sm font-bold",children:["Type the project name ",p.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e})," to confirm:"]}),p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:l,onChange:m=>c(m.target.value),placeholder:e})]})}),p.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:l!==e||h.isPending,onClick:()=>h.mutate(),"aria-label":"Permanently delete project",children:[h.isPending?p.jsx(zt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(Kl,{size:14,strokeWidth:3}),"Permanently delete"]})]})}function zg(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return qt(`/api/skills${t}`)}function iI(e){return qt(`/api/skills/${encodeURIComponent(e)}`)}function aI(e,t){return qt(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function bd(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 rI(e,t){return bd(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function sI(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 lI(e,t){return bd(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function oI(e,t){return bd(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function cI(){return bd("/api/skills/sync")}function uI({project:e,isPending:t,onCancel:n,onCreate:a}){var T;const[s,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(new Set),[m,b]=A.useState(!1),x=ot({queryKey:["skills-all",e],queryFn:()=>zg(e)});A.useEffect(()=>{const C=R=>{R.key==="Escape"&&n()};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[n]);const E=s.trim().length>0&&s.trim().length<=200&&!t,w=C=>{const R=new Set(d);R.has(C)?R.delete(C):R.add(C),h(R)},N=()=>{E&&a({title:s.trim(),description:c.trim(),skills:[...d],labels:["AI-PIPELINE"],initialState:m?"Backlog":"Planning"})},k=((T=x.data)==null?void 0:T.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:"New card"}),p.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"Close",children:p.jsx(_i,{size:14,strokeWidth:3})})]}),p.jsxs("form",{onSubmit:C=>{C.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:"Title *"}),p.jsx("input",{type:"text",className:"nb-input w-full",placeholder:"e.g. Wire up GitHub OAuth login",value:s,onChange:C=>l(C.target.value),maxLength:200,autoFocus:!0,required:!0}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"Short, focused goal ( 写简短明了的目标(<200 字符)lt;200 chars)"})]}),p.jsxs("label",{className:"flex flex-col gap-1.5",children:[p.jsx("span",{className:"text-sm font-bold",children:"Description"}),p.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:"User story, requirements, acceptance criteria, references… Claude reads this on launch.",value:c,onChange:C=>f(C.target.value)}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"Markdown supported. If empty, Claude only has the title to work from."})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("span",{className:"text-sm font-bold",children:"Skills"}),p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"Which skills to load (frontmatter `skills:`). Optional — workers fall back to project-level skills."}),x.isLoading&&p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"Loading skills…"}),x.isError&&p.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["Failed to load skills (won''t block create): ",x.error instanceof Error?x.error.message:String(x.error)]}),k.length>0&&p.jsx("div",{className:"flex flex-wrap gap-2",children:k.map(C=>{const R=d.has(C.name);return p.jsx("button",{type:"button",onClick:()=>w(C.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",R?"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":R,children:C.name},C.name)})}),d.size>0&&p.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Selected ",d.size," of: ",[...d].join(", ")]})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("span",{className:"text-sm font-bold",children:"Dispatch"}),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:C=>b(C.target.checked)}),p.jsxs("div",{className:"flex-1",children:[p.jsx("div",{className:"text-sm font-bold",children:"Dispatch immediately (goes straight to Backlog)"}),p.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:["Default off: card lands in ",p.jsx("code",{className:"font-mono",children:"Planning"}),"; drag it to ",p.jsx("code",{className:"font-mono",children:"Backlog"})," to start work. Checked: skip staging — the next tick dispatches a worker."]})]})]})]})]}),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:"Cancel"}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:N,disabled:!E,type:"button","aria-label":"Create card",children:[t?p.jsx(zt,{size:13,strokeWidth:3,className:"animate-spin"}):p.jsx(Bi,{size:13,strokeWidth:3}),"Create"]})]})]})})}function fI(e){return qt(`/api/projects/${encodeURIComponent(e)}/cards`)}function dI(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 hI(e,t){return Zl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function pI(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 mI(e,t){return Zl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function gI(e,t){const n=typeof t=="string"?{title:t}:t;return Zl(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function bI(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 yI(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 xI(e){return Zl(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function vI(e){return Zl(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function EI(e,t){return Zl(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function SI(e){const t=Gn();A.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",d.project]}),t.invalidateQueries({queryKey:["card",d.project,d.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},l=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["workers",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["pipeline-status",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return 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 wI=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),kI=new Set(["frontend","backend","mobile","database","devops"]),NI=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),_I=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function CI(e){return wI.has(e)?"lang":kI.has(e)?"end":NI.has(e)?"persona":_I.has(e)?"workflow":"other"}const TI={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function ow({name:e}){const t=TI[CI(e)];return p.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function cw({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 AI({card:e,onClick:t,done:n,draggable:a}){const s=e.labels.some(l=>l.startsWith("STARTED-"))&&!n;return p.jsxs("article",{onClick:t,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),t())},draggable:a,onDragStart:l=>{l.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),l.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]}),s&&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(l=>p.jsx(ow,{name:l},l)),e.labels.filter(l=>l==="NEEDS-FIX").map(l=>p.jsx(cw,{label:l,kind:"warn"},l))]}),e.checklist&&e.checklist.total>0&&p.jsx(OI,{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:RI(e.updatedAt??e.createdAt)}),e.branch&&p.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function OI({stats:e}){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.jsxs("span",{className:"font-bold",children:["Checklist ",e.done,"/",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((t,n)=>p.jsxs("li",{className:`flex items-start gap-1 ${t.done?"opacity-60 line-through":""}`,children:[p.jsx("span",{className:"flex-shrink-0 mt-0.5",children:t.done?"✓":"○"}),p.jsx("span",{className:"line-clamp-1",children:t.text})]},n)),e.items.length>3&&p.jsxs("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:["… ",e.items.length-3," more"]})]})]})}function RI(e){if(!e)return"—";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"just now":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleDateString()}function jI({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const[l,c]=A.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:f=>{!s||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",l||c(!0))},onDragLeave:()=>c(!1),onDrop:f=>{if(c(!1),!s)return;const d=f.dataTransfer.getData("application/x-sps-card-seq"),h=Number.parseInt(d,10);Number.isFinite(h)&&(f.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(f=>p.jsx(AI,{card:f,onClick:()=>a(f),done:e==="Done",draggable:!!s},f.seq))]})]})}function Hm(e,t){if(!e)return"";const n=Array.isArray(t)?t:[t],a=e.split(`
|
|
506
|
+
`);for(const s of n){const l=new RegExp(`^##\\s+${s}\\s*$`),c=a.findIndex(d=>l.test(d));if(c===-1)continue;let f=a.length;for(let d=c+1;d<a.length;d++)if(/^##\s+/.test(a[d]??"")){f=d;break}return a.slice(c+1,f).join(`
|
|
507
|
+
`).trim()}return""}function Gp(e){return Hm(e,["Description","描述"])}function MI({project:e,seq:t,onClose:n,onChanged:a}){var F,oe,K,pe,M,D,X,O,ye,W,fe;const s=Gn(),{confirm:l,alert:c}=ci(),{data:f,isLoading:d,isError:h,error:m,refetch:b}=ot({queryKey:["card",e,t],queryFn:()=>dI(e,t)}),[x,v]=A.useState(!1),[E,w]=A.useState(""),[N,k]=A.useState(""),[T,C]=A.useState(new Set),[R,B]=A.useState([]),[j,$]=A.useState(""),q=ot({queryKey:["skills-all",e],queryFn:()=>zg(e),enabled:x}),L=((oe=(F=ot({queryKey:["projects"],queryFn:Cr,refetchInterval:1e4}).data)==null?void 0:F.data.find(G=>G.name===e))==null?void 0:oe.pipelineStatus)==="running";A.useEffect(()=>{x&&f&&(w(f.title),k(Gp(f.body)),C(new Set(f.skills)),B([...f.labels]))},[x,f]),A.useEffect(()=>{const G=se=>{se.key==="Escape"&&(x?v(!1):n())};return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[n,x]);const Z=Kn({mutationFn:()=>{if(!f)throw new Error("no data");const G={},se=E.trim();se&&se!==f.title&&(G.title=se);const de=Gp(f.body);N!==de&&(G.description=N);const Re=[...T].sort(),mt=[...f.skills].sort();return JSON.stringify(Re)!==JSON.stringify(mt)&&(G.skills=Re),JSON.stringify(R)!==JSON.stringify(f.labels)&&(G.labels=R),Object.keys(G).length===0?Promise.resolve({ok:!0,noop:!0}):yI(e,t,G)},onSuccess:()=>{s.invalidateQueries({queryKey:["card",e,t]}),s.invalidateQueries({queryKey:["cards",e]}),v(!1),a()},onError:G=>{c({title:"Save failed",body:G instanceof Error?G.message:String(G)})}}),ie=A.useMemo(()=>{if(!x||!f)return!1;if(E.trim()!==f.title||N!==Gp(f.body))return!0;const G=[...T].sort(),se=[...f.skills].sort();return JSON.stringify(G)!==JSON.stringify(se)||JSON.stringify(R)!==JSON.stringify(f.labels)},[x,f,E,N,T,R]),be=G=>{const se=new Set(T);se.has(G)?se.delete(G):se.add(G),C(se)},ue=()=>{const G=j.trim();if(G){if(R.includes(G)){$("");return}B([...R,G]),$("")}},te=G=>{B(R.filter(se=>se!==G))};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}),x&&p.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:"⚠ editing"})]}),x?p.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:E,onChange:G=>w(G.target.value),maxLength:200,"aria-label":"Card title"}):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)??"Loading…"})]}),p.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!x&&f&&p.jsxs("button",{onClick:()=>v(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":"Edit card",children:[p.jsx(xg,{size:12,strokeWidth:2.5})," Edit"]}),p.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"Close",type:"button",children:p.jsx(_i,{size:14,strokeWidth:3})})]})]}),d&&p.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading…"}),h&&p.jsxs("p",{className:"text-[var(--color-crashed)]",children:["Load failed: ",m instanceof Error?m.message:String(m)]}),f&&p.jsxs("div",{className:"flex flex-col gap-4",children:[f.branch&&!x&&p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx(xA,{size:14}),p.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),x?p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),q.isLoading&&p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"Loading skills…"}),q.data&&q.data.data.length>0&&p.jsx("div",{className:"flex flex-wrap gap-1.5",children:q.data.data.map(G=>{const se=T.has(G.name);return p.jsx("button",{type:"button",onClick:()=>be(G.name),"aria-pressed":se,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",se?"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:G.name},G.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:[R.map(G=>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:[G,p.jsx("button",{type:"button",onClick:()=>te(G),className:"hover:text-[var(--color-crashed)]","aria-label":`Remove ${G}`,children:p.jsx(_i,{size:10,strokeWidth:3})})]},G)),p.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:"+ add label",value:j,onChange:G=>$(G.target.value),onKeyDown:G=>{G.key==="Enter"&&!G.nativeEvent.isComposing&&(G.preventDefault(),ue())}}),j&&p.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:ue,"aria-label":"Add label",children:p.jsx(Bi,{size:10,strokeWidth:3})})]}),p.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:"Note: AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX are managed by the pipeline — manual edits may be overwritten."})]})]}):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(G=>p.jsx(ow,{name:G},G))})]}),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(G=>p.jsx(cw,{label:G,kind:G==="NEEDS-FIX"?"warn":"default"},G))})]})]}),x?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:"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:G=>k(G.target.value),"aria-label":"Card description"}),p.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:'Replaces only the "## Description" section; Checklist and Log sections are untouched.'})]}),(((O=f.checklist)==null?void 0:O.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.jsxs("span",{className:"font-bold text-sm",children:["Checklist ",((ye=f.checklist)==null?void 0:ye.done)??0,"/",((W=f.checklist)==null?void 0:W.total)??0]})}),p.jsx("ul",{className:"text-sm space-y-1",children:(((fe=f.checklist)==null?void 0:fe.items)??[]).map((G,se)=>p.jsxs("li",{className:`flex items-start gap-2 ${G.done?"opacity-60 line-through":""}`,children:[p.jsx("span",{children:G.done?"✓":"○"}),p.jsx("span",{children:G.text})]},se))})]})]}):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:"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:Hm(f.body,["Description","描述"])||"(empty)"})]}),p.jsxs("div",{children:[p.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["Checklist ",p.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[((K=f.checklist)==null?void 0:K.done)??0,"/",((pe=f.checklist)==null?void 0:pe.total)??0]})]}),p.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((M=f.checklist)==null?void 0:M.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:`${((D=f.checklist)==null?void 0:D.percent)??0}%`}})})}),p.jsx("ul",{className:"text-sm space-y-1",children:(((X=f.checklist)==null?void 0:X.items)??[]).map((G,se)=>p.jsxs("li",{className:`flex items-start gap-2 ${G.done?"opacity-60 line-through":""}`,children:[p.jsx("span",{children:G.done?"✓":"○"}),p.jsx("span",{children:G.text})]},se))})]}):p.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:["No checklist items. Add them in the description with ",p.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:"- [ ] item"})," syntax."]})})]}),p.jsxs("div",{children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"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:Hm(f.body,["Log","日志"])||"(empty)"})]})]}),p.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:x?p.jsxs(p.Fragment,{children:[p.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{v(!1),b()},disabled:Z.isPending,children:"Cancel"}),p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>Z.mutate(),disabled:!ie||!E.trim()||Z.isPending,"aria-label":"Save card changes",children:[Z.isPending?p.jsx(zt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(nd,{size:14,strokeWidth:3}),"Save"]})]}):p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:f.state==="Done"||L,title:f.state==="Done"?"Card is done — drag it back to Todo before starting":L?"Pipeline is running — supervisor dispatches automatically, no manual start needed":void 0,onClick:async()=>{try{await mI(e,t),a()}catch(G){c({title:"Failed to launch worker",body:G instanceof Error?G.message:String(G)})}},children:[p.jsx(vg,{size:14,strokeWidth:3}),"Launch worker"]}),p.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await l({title:`Reset card #${t}`,body:"Card state will reset to initial, and completed checklist items will be cleared.",confirm:"Reset",danger:!0}))try{await hI(e,t),a(),n()}catch(se){c({title:"Reset failed",body:se instanceof Error?se.message:String(se)})}},children:[p.jsx(WE,{size:14,strokeWidth:2.5}),"Reset card"]}),p.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await l({title:`Delete card #${t}`,body:`About to delete "${f.title}". This is permanent — the md file will be physically removed. Continue?`,confirm:"Continue",danger:!0})||!await l({title:"Final confirmation",body:`Please confirm again to delete card #${t}.`,confirm:"Confirm delete",danger:!0})))try{await pI(e,t),a(),n()}catch(de){c({title:"Delete failed",body:de instanceof Error?de.message:String(de)})}},"aria-label":"Delete card",children:[p.jsx(Kl,{size:14,strokeWidth:2.5}),"Delete card"]})]})})]})]})})}function LI({current:e,onChange:t}){const[n,a]=A.useState(!1),s=A.useRef(null),{data:l}=ot({queryKey:["projects"],queryFn:Cr});return A.useEffect(()=>{const c=f=>{var d;(d=s.current)!=null&&d.contains(f.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 DI=[{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)"}],uw="sps-console:last-board-project";function II(){if(typeof window>"u")return null;try{return localStorage.getItem(uw)}catch{return null}}function zI(e){if(!(typeof window>"u"))try{localStorage.setItem(uw,e)}catch{}}function UI(){var te,F,oe;const[e,t]=$E(),n=e.get("project"),[a,s]=A.useState(null),[l,c]=A.useState(""),[f,d]=A.useState(()=>new Set),[h,m]=A.useState(()=>new Set),{confirm:b,alert:x}=ci();SI(n);const v=ot({queryKey:["projects"],queryFn:Cr}),E=ot({queryKey:["cards",n],queryFn:()=>fI(n??""),enabled:!!n}),w=Gn(),N=()=>{w.invalidateQueries({queryKey:["cards",n]}),w.invalidateQueries({queryKey:["projects"]}),w.invalidateQueries({queryKey:["pipeline-status",n]})},k=K=>{t({project:K})};A.useEffect(()=>{var pe;if(n){zI(n);return}const K=II();K&&((pe=v.data)!=null&&pe.data.some(M=>M.name===K))&&t({project:K},{replace:!0})},[n,v.data,t]);const T=Kn({mutationFn:()=>xI(n),onSuccess:()=>{N()},onError:K=>{x({title:"Failed to start pipeline",body:K instanceof Error?K.message:String(K)})}}),C=Kn({mutationFn:()=>vI(n),onSuccess:()=>N(),onError:K=>{x({title:"Failed to stop pipeline",body:K instanceof Error?K.message:String(K)})}}),R=Kn({mutationFn:()=>EI(n,{all:!0}),onSuccess:()=>N(),onError:K=>{x({title:"Reset failed",body:K instanceof Error?K.message:String(K)})}}),[B,j]=A.useState(!1),$=Kn({mutationFn:K=>gI(n,K),onSuccess:()=>{N(),j(!1)},onError:K=>{x({title:"Failed to create card",body:K instanceof Error?K.message:String(K)})}}),q=Kn({mutationFn:({seq:K,state:pe})=>bI(n,K,pe),onMutate:async({seq:K,state:pe})=>{await w.cancelQueries({queryKey:["cards",n]});const M=w.getQueryData(["cards",n]);return M&&w.setQueryData(["cards",n],{...M,data:M.data.map(D=>D.seq===K?{...D,state:pe}:D)}),{prev:M}},onError:(K,pe,M)=>{M!=null&&M.prev&&w.setQueryData(["cards",n],M.prev),x({title:"Failed to move card",body:K instanceof Error?K.message:String(K)})},onSettled:()=>{w.invalidateQueries({queryKey:["cards",n]})}}),ee=((te=E.data)==null?void 0:te.data)??[],{allSkills:L,allLabels:Z}=A.useMemo(()=>{const K=new Set,pe=new Set;for(const M of ee){for(const D of M.skills)K.add(D);for(const D of M.labels)pe.add(D)}return{allSkills:[...K].sort(),allLabels:[...pe].sort()}},[ee]);if(!n)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:"Board"}),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:"Select a project 🎯"}),p.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:"The board is per-project. Pick one to start:"}),p.jsx("div",{className:"flex flex-wrap gap-2",children:(F=v.data)==null?void 0:F.data.map(K=>p.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>k(K.name),type:"button",children:K.name},K.name))})]})]});const ie=ee.filter(K=>{if(l){const pe=l.toLowerCase();if(!(K.title.toLowerCase().includes(pe)||K.skills.some(D=>D.toLowerCase().includes(pe))||K.labels.some(D=>D.toLowerCase().includes(pe))))return!1}return!(f.size>0&&!K.skills.some(M=>f.has(M))||h.size>0&&!K.labels.some(M=>h.has(M)))}),be=(oe=v.data)==null?void 0:oe.data.find(K=>K.name===n),ue=(be==null?void 0:be.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:"Board ✨"}),p.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:be?`${be.name} · ${be.cards.total} cards · ${be.workers.active} workers active`:"Loading…"})]}),p.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[p.jsx(LI,{current:n,onChange:k}),p.jsxs("button",{className:ue?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>ue?C.mutate():T.mutate(),disabled:T.isPending||C.isPending,type:"button","aria-label":ue?"Stop pipeline":"Start pipeline",title:ue?"Stop pipeline":"Start pipeline",children:[T.isPending||C.isPending?p.jsx(zt,{size:14,strokeWidth:3,className:"animate-spin"}):ue?p.jsx(ZE,{size:14,strokeWidth:3}):p.jsx(vg,{size:14,strokeWidth:3}),ue?"Stop":"Start"]}),p.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await b({title:"Reset entire pipeline",body:"This clears every card's run state, worker markers, and branches. Cannot be undone.",confirm:"Reset all",danger:!0})&&R.mutate()},disabled:R.isPending,children:[R.isPending?p.jsx(zt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(WE,{size:14,strokeWidth:2.5}),"Reset"]}),p.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>j(!0),disabled:$.isPending,children:[$.isPending?p.jsx(zt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(Bi,{size:14,strokeWidth:3}),"New card"]})]})]}),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(Df,{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:"Search title / skill / label…",value:l,onChange:K=>c(K.target.value),"aria-label":"Search cards"})]}),p.jsx(G0,{label:"skill",options:L,selected:f,onChange:d}),p.jsx(G0,{label:"label",options:Z,selected:h,onChange:m}),(l||f.size>0||h.size>0)&&p.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{c(""),d(new Set),m(new Set)},type:"button","aria-label":"Clear filters",children:[p.jsx(_i,{size:11,strokeWidth:3}),"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(bA,{size:12}),ie.length," / ",ee.length]})]}),E.isError&&p.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[p.jsx("p",{className:"font-semibold",children:"Failed to load cards"}),p.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:E.error instanceof Error?E.error.message:String(E.error)})]}),!E.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:DI.map(K=>p.jsx(jI,{label:K.label,bg:K.bg,cards:ie.filter(BI(K.state)),onCardClick:pe=>s(pe.seq),onDropCard:pe=>q.mutate({seq:pe,state:K.state})},K.state))}),a!==null&&p.jsx(MI,{project:n,seq:a,onClose:()=>s(null),onChanged:N}),B&&p.jsx(uI,{project:n,isPending:$.isPending,onCancel:()=>j(!1),onCreate:K=>$.mutate(K)})]})}function BI(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[s,l]=A.useState(!1),c=A.useRef(null);A.useEffect(()=>{if(!s)return;const m=x=>{var v;(v=c.current)!=null&&v.contains(x.target)||l(!1)},b=x=>{x.key==="Escape"&&l(!1)};return window.addEventListener("click",m),window.addEventListener("keydown",b),()=>{window.removeEventListener("click",m),window.removeEventListener("keydown",b)}},[s]);const f=m=>{const b=new Set(n);b.has(m)?b.delete(m):b.add(m),a(b)},d=t.length===0,h=n.size;return p.jsxs("div",{ref:c,className:"relative",children:[p.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!d&&l(m=>!m),disabled:d,"aria-haspopup":"listbox","aria-expanded":s,"aria-label":`Filter by ${e}`,children:[e,h>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:h}),p.jsx(jc,{size:11,strokeWidth:3,className:["transition-transform",s?"rotate-180":""].join(" ")})]}),s&&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 b=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)]",b?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[p.jsx("input",{type:"checkbox",checked:b,onChange:()=>f(m),className:"flex-shrink-0"}),p.jsx("span",{className:"truncate",children:m})]},m)}),h>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:"Clear selection"})]})]})}function $I(){return qt("/api/workers/all")}function PI(e){return qt(`/api/projects/${encodeURIComponent(e)}/workers`)}function FI(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function fw(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 Q0(e,t){return fw(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function qI(e,t,n){return fw(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function Ug({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(zt,{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(JA,{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 Bg(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 HI(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 $g(e){const t=Date.now()-new Date(e).getTime();return t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:`${Math.floor(t/36e5)}h ago`}function KI({alerts:e,selected:t,onSelect:n}){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:"All workers healthy"})]}):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(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==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx(Ug,{state:a.state}),p.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[a.project,"/worker-",a.slot]}),a.card&&p.jsxs("span",{className:"truncate",children:["#",a.card.seq," ",a.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(nA,{size:10,strokeWidth:2.5}),Bg(a.runtimeMs)]})]}),a.markerUpdatedAt&&p.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:a.state==="crashed"?"PID is dead.":`marker stalled for ${$g(a.markerUpdatedAt)}.`})]},`${a.project}-${a.slot}`)})})]})}function GI({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(ed,{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(Ug,{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)] ${HI(a.runtimeMs)}`,children:Bg(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 ",$g(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(JE,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function QI({capacity:e,selected:t,onSelect:n}){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:"Capacity"}),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:"Project"}),p.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"In use"}),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:"Other"}),p.jsx("th",{className:"px-3 py-2"})]})}),p.jsx("tbody",{children:e.map(a=>{const s=a.running+a.starting+a.stuck+a.crashed,l=(t==null?void 0:t.project)===a.project;return p.jsxs("tr",{onClick:()=>n(a.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",l?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[p.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:a.project}),p.jsx("td",{className:"px-3 py-2",children:p.jsx(VI,{total:a.total,cap:a})}),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:a.running}),p.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",a.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:[a.starting>0&&p.jsxs("span",{className:"mr-2",children:["starting ",a.starting]}),a.stuck>0&&p.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",a.stuck]}),a.crashed>0&&p.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",a.crashed]}),s===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:"Details →"})})]},a.project)})})]})})]})}function VI({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:YI(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 YI(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 WI({project:e,initialSlot:t,onChange:n}){var d;const a=ot({queryKey:["workers",e],queryFn:()=>PI(e),refetchInterval:3e3}),s=((d=a.data)==null?void 0:d.data)??[],[l,c]=A.useState(null);A.useEffect(()=>{if(s.length===0){c(null);return}const h=s[0].slot;c(m=>m!=null&&s.some(b=>b.slot===m)?m:t!=null&&s.some(b=>b.slot===t)?t:h)},[e,t,s.length]);const f=s.find(h=>h.slot===l)??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:"Board →"})]}),a.isLoading&&s.length===0?p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"Loading workers…"}):s.length===0?p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"This project has no worker slots."}):p.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(h=>p.jsx(XI,{worker:h,active:h.slot===l,onClick:()=>c(h.slot)},h.slot))})]}),f?p.jsx(ZI,{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:s.length===0?"No workers":"Select a worker"})})]})}function XI({worker:e,active:t,onClick:n}){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(Ug,{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:"idle"})]})}function ZI({project:e,worker:t,onChange:n}){var h,m;const{confirm:a,alert:s}=ci(),l=t.state==="crashed"||t.state==="stuck",c=ot({queryKey:["worker-detail",e,t.slot],queryFn:()=>FI(e,t.slot),refetchInterval:3e3}),f=((h=c.data)==null?void 0:h.recentOutput)??[],d=((m=c.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:"Current card"}),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:"slot is idle — no current card."}),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:Bg(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?$g(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(JE,{size:10,strokeWidth:2.5}),"Claude output · last ",f.length," lines"]}),c.isLoading&&f.length===0?p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"Loading…"}):f.length===0?p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"No session output yet. Worker takes a few seconds after launch."}):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(b=>`${b.ts?`${b.ts} [${b.kind}] `:`[${b.kind}] `}${b.text}`).join(`
|
|
508
|
+
`)})]}),d.length>0&&p.jsxs("div",{children:[p.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:["Supervisor heartbeat · last ",d.length," lines"]}),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:d.map(b=>`${b.ts??""} [${b.level}] ${b.msg}`).join(`
|
|
509
|
+
`)}),p.jsx(bs,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:"View full log →"})]})]}),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:[l&&t.card&&p.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:`Restart worker-${t.slot}`,body:`Kills the process, then re-launches to #${t.card.seq}`,confirm:"Restart"})){try{await Q0(e,t.slot)}catch{}try{await qI(e,t.slot,t.card.seq),n()}catch(x){s({title:"Restart failed",body:x instanceof Error?x.message:String(x)})}}},children:[p.jsx(rO,{size:11,strokeWidth:2.5})," 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 a({title:`Terminate worker-${t.slot}`,body:"Current task will be force-cancelled.",confirm:"Terminate",danger:!0}))try{await Q0(e,t.slot),n()}catch(x){s({title:"Terminate failed",body:x instanceof Error?x.message:String(x)})}},children:[p.jsx(pO,{size:11,strokeWidth:2.5})," Terminate"]})]})]})}function JI(){var l;const e=Gn(),[t,n]=A.useState(null),a=ot({queryKey:["workers-agg"],queryFn:$I,refetchInterval:5e3});A.useEffect(()=>{if(!a.data)return;const c=a.data.capacity.map(d=>d.project),f=[];for(const d of c){const h=new EventSource(`/stream/projects/${encodeURIComponent(d)}`),m=()=>{e.invalidateQueries({queryKey:["workers-agg"]})};h.addEventListener("worker.updated",m),h.addEventListener("worker.added",m),h.addEventListener("worker.deleted",m),h.addEventListener("card.updated",m),f.push(h)}return()=>{for(const d of f)d.close()}},[(l=a.data)==null?void 0:l.capacity.map(c=>c.project).join(","),e]);const s=A.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const c={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const f of a.data.capacity)c.running+=f.running,c.starting+=f.starting,c.stuck+=f.stuck,c.crashed+=f.crashed,c.idle+=f.idle;return c},[a.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.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),p.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:["Across ",s.projects," projects · ",s.running," running · ",s.starting," starting ·"," ",p.jsxs("span",{className:"text-[var(--color-stuck)]",children:[s.stuck," stuck"]})," ·"," ",p.jsxs("span",{className:"text-[var(--color-crashed)]",children:[s.crashed," crashed"]})," · ",s.idle," idle"]})]}),p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a.refetch(),disabled:a.isFetching,type:"button","aria-label":"Refresh",children:[a.isFetching?p.jsx(zt,{size:12,strokeWidth:3,className:"animate-spin"}):p.jsx(zl,{size:12,strokeWidth:2.5}),"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:[a.isLoading&&p.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"Loading…"}),a.isError&&p.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:p.jsxs("p",{children:["Load failed: ",a.error instanceof Error?a.error.message:String(a.error)]})}),a.data&&p.jsxs(p.Fragment,{children:[p.jsx(KI,{alerts:a.data.alerts,selected:t,onSelect:(c,f)=>n({project:c,slot:f})}),p.jsx(GI,{active:a.data.active,selected:t,onSelect:(c,f)=>n({project:c,slot:f})}),p.jsx(QI,{capacity:a.data.capacity,selected:t,onSelect:c=>n({project:c})})]})]}),p.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:t?p.jsx(WI,{project:t.project,initialSlot:t.slot,onChange:()=>e.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(ed,{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:"Click a project / worker for details"})]})})})]})]})}function e3(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 t3(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const n3=["error","warn","info","debug"],i3=["error","warn","info"];function a3(){var q,ee;const[e,t]=$E(),n=e.get("project"),a=e.get("worker")??"",[s,l]=A.useState([]),[c,f]=A.useState(!1),[d,h]=A.useState(!0),[m,b]=A.useState(()=>new Set(i3)),[x,v]=A.useState(""),[E,w]=A.useState("live"),[N,k]=A.useState(()=>{const L=new Date(Date.now()-36e5),Z=ie=>String(ie).padStart(2,"0");return`${L.getFullYear()}-${Z(L.getMonth()+1)}-${Z(L.getDate())}T${Z(L.getHours())}:${Z(L.getMinutes())}`}),T=A.useRef(null),C=!n,R=ot({queryKey:["projects"],queryFn:Cr}),{data:B,refetch:j}=ot({queryKey:["logs",n??"agg",a,E,E==="history"?N:"live"],queryFn:()=>e3({project:n||void 0,worker:a||void 0,limit:E==="history"?2e3:500,since:E==="history"?new Date(N).toISOString():void 0}),refetchInterval:C&&E==="live"?5e3:!1});A.useEffect(()=>{B!=null&&B.data&&l(B.data)},[B]),A.useEffect(()=>{if(!n||E!=="live")return;const L=t3({project:n,worker:a||void 0}),Z=new EventSource(L);return Z.addEventListener("log.line",ie=>{if(!c)try{const be=JSON.parse(ie.data);l(ue=>{const te=[...ue,be];return te.length>5e3&&te.splice(0,te.length-5e3),te})}catch{}}),()=>Z.close()},[n,a,c,E]),A.useEffect(()=>{if(!d)return;const L=T.current;L&&(L.scrollTop=L.scrollHeight)},[s,d]);const $=A.useMemo(()=>{const L=x.toLowerCase();return s.filter(Z=>!(!m.has(Z.level)||L&&!Z.msg.toLowerCase().includes(L)))},[s,m,x]);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.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),p.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[C?`All projects (${((q=R.data)==null?void 0:q.data.length)??0})`:n,a&&` · worker-${a}`," · ",C&&E==="live"?"5s polling":"tail -f"," · ",s.length," lines",c&&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:()=>w("live"),"aria-pressed":E==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",E==="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(YE,{size:11,strokeWidth:2.5}),"Live"]}),p.jsxs("button",{type:"button",onClick:()=>w("history"),"aria-pressed":E==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",E==="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(SA,{size:11,strokeWidth:2.5}),"History"]})]}),E==="history"&&p.jsxs(p.Fragment,{children:[p.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:N,onChange:L=>k(L.target.value),"aria-label":"Query start time"}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>j(),type:"button","aria-label":"Query",children:[p.jsx(Df,{size:11,strokeWidth:3}),"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:n??"",onChange:L=>{const Z=L.target.value;t(Z?{project:Z}:{})},"aria-label":"Filter project",children:[p.jsx("option",{value:"",children:"All projects"}),(ee=R.data)==null?void 0:ee.data.map(L=>p.jsx("option",{value:L.name,children:L.name},L.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(Df,{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:"Filter keyword…",value:x,onChange:L=>v(L.target.value),"aria-label":"Filter logs"})]}),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:n3.map(L=>p.jsx(r3,{level:L,enabled:m.has(L),onToggle:()=>{b(Z=>{const ie=new Set(Z);return ie.has(L)?ie.delete(L):ie.add(L),ie})}},L))}),p.jsxs("div",{className:"ml-auto flex gap-2",children:[E==="live"&&p.jsxs(p.Fragment,{children:[p.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(L=>!L),type:"button",children:d?"✓ Auto-scroll":"Auto-scroll"}),p.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(L=>!L),type:"button",children:c?p.jsxs(p.Fragment,{children:[p.jsx(vg,{size:12,strokeWidth:3})," Resume"]}):p.jsxs(p.Fragment,{children:[p.jsx($A,{size:12,strokeWidth:3})," Pause"]})})]}),p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const L=new Blob([$.map(be=>be.raw).join(`
|
|
510
|
+
`)],{type:"text/plain"}),Z=URL.createObjectURL(L),ie=document.createElement("a");ie.href=Z,ie.download=`${n}-log-${Date.now()}.log`,ie.click(),URL.revokeObjectURL(Z)},type:"button",children:[p.jsx(GE,{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:(B==null?void 0:B.file)??"~/.coral/projects/.../logs/*.log"}),E==="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:T,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:L=>{const Z=L.currentTarget;!(Z.scrollHeight-Z.scrollTop-Z.clientHeight<40)&&d&&h(!1)},children:[$.map((L,Z)=>p.jsx(s3,{line:L},Z)),$.length===0&&p.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"No matching logs"})]})]})]})}function r3({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 s3({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 l3(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const o3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u3={};function V0(e,t){return(u3.jsx?c3:o3).test(e)}const f3=/[ \t\n\f\r]/g;function d3(e){return typeof e=="object"?e.type==="text"?Y0(e.value):!1:Y0(e)}function Y0(e){return e.replace(f3,"")===""}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 dw(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 h3=0;const Ke=vs(),tn=vs(),Gm=vs(),me=vs(),_t=vs(),kl=vs(),ai=vs();function vs(){return 2**++h3}const Qm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:tn,commaOrSpaceSeparated:ai,commaSeparated:kl,number:me,overloadedBoolean:Gm,spaceSeparated:_t},Symbol.toStringTag,{value:"Module"})),Qp=Object.keys(Qm);class Pg extends Qn{constructor(t,n,a,s){let l=-1;if(super(t,n),W0(this,"space",s),typeof a=="number")for(;++l<Qp.length;){const c=Qp[l];W0(this,Qp[l],(a&Qm[c])===Qm[c])}}}Pg.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 Pg(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 hw=Jl({properties:{ariaActiveDescendant:null,ariaAtomic:tn,ariaAutoComplete:null,ariaBusy:tn,ariaChecked:tn,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:_t,ariaCurrent:null,ariaDescribedBy:_t,ariaDetails:null,ariaDisabled:tn,ariaDropEffect:_t,ariaErrorMessage:null,ariaExpanded:tn,ariaFlowTo:_t,ariaGrabbed:tn,ariaHasPopup:null,ariaHidden:tn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_t,ariaLevel:me,ariaLive:null,ariaModal:tn,ariaMultiLine:tn,ariaMultiSelectable:tn,ariaOrientation:null,ariaOwns:_t,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:tn,ariaReadOnly:tn,ariaRelevant:null,ariaRequired:tn,ariaRoleDescription:_t,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:tn,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function pw(e,t){return t in e?e[t]:t}function mw(e,t){return pw(e,t.toLowerCase())}const p3=Jl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kl,acceptCharset:_t,accessKey:_t,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:_t,autoFocus:Ke,autoPlay:Ke,blocking:_t,capture:null,charSet:null,checked:Ke,cite:null,className:_t,cols:me,colSpan:null,content:null,contentEditable:tn,controls:Ke,controlsList:_t,coords:me|kl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:Gm,draggable:tn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:_t,height:me,hidden:Gm,high:me,href:null,hrefLang:null,htmlFor:_t,httpEquiv:_t,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:_t,itemRef:_t,itemScope:Ke,itemType:_t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,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:Ke,optimum:me,pattern:null,ping:_t,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:_t,required:Ke,reversed:Ke,rows:me,rowSpan:me,sandbox:_t,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:tn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:tn,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_t,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:tn,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ke,disableRemotePlayback:Ke,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:mw}),m3=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:ai,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:_t,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:ai,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ai,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ai,rev:ai,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ai,requiredFeatures:ai,requiredFonts:ai,requiredFormats:ai,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:ai,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ai,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ai,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:pw}),gw=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()}}),bw=Jl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mw}),yw=Jl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),g3={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"},b3=/[A-Z]/g,X0=/-[a-z]/g,y3=/^data[-\w.:]+$/i;function x3(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"&&y3.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(X0,E3);a="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!X0.test(l)){let c=l.replace(b3,v3);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=Pg}return new s(a,t)}function v3(e){return"-"+e.toLowerCase()}function E3(e){return e.charAt(1).toUpperCase()}const S3=dw([hw,p3,gw,bw,yw],"html"),Fg=dw([hw,m3,gw,bw,yw],"svg");function w3(e){return e.join(" ").trim()}var hl={},Vp,Z0;function k3(){if(Z0)return Vp;Z0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
511
|
+
`,h="/",m="*",b="",x="comment",v="declaration";function E(N,k){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];k=k||{};var T=1,C=1;function R(ue){var te=ue.match(t);te&&(T+=te.length);var F=ue.lastIndexOf(d);C=~F?ue.length-F:C+ue.length}function B(){var ue={line:T,column:C};return function(te){return te.position=new j(ue),ee(),te}}function j(ue){this.start=ue,this.end={line:T,column:C},this.source=k.source}j.prototype.content=N;function $(ue){var te=new Error(k.source+":"+T+":"+C+": "+ue);if(te.reason=ue,te.filename=k.source,te.line=T,te.column=C,te.source=N,!k.silent)throw te}function q(ue){var te=ue.exec(N);if(te){var F=te[0];return R(F),N=N.slice(F.length),te}}function ee(){q(n)}function L(ue){var te;for(ue=ue||[];te=Z();)te!==!1&&ue.push(te);return ue}function Z(){var ue=B();if(!(h!=N.charAt(0)||m!=N.charAt(1))){for(var te=2;b!=N.charAt(te)&&(m!=N.charAt(te)||h!=N.charAt(te+1));)++te;if(te+=2,b===N.charAt(te-1))return $("End of comment missing");var F=N.slice(2,te-2);return C+=2,R(F),N=N.slice(te),C+=2,ue({type:x,comment:F})}}function ie(){var ue=B(),te=q(a);if(te){if(Z(),!q(s))return $("property missing ':'");var F=q(l),oe=ue({type:v,property:w(te[0].replace(e,b)),value:F?w(F[0].replace(e,b)):b});return q(c),oe}}function be(){var ue=[];L(ue);for(var te;te=ie();)te!==!1&&(ue.push(te),L(ue));return ue}return ee(),be()}function w(N){return N?N.replace(f,b):b}return Vp=E,Vp}var J0;function N3(){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(k3());function n(a,s){let l=null;if(!a||typeof a!="string")return l;const c=(0,t.default)(a),f=typeof s=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:m}=d;f?s(h,m,d):m&&(l=l||{},l[h]=m)}),l}return hl}var tc={},e1;function _3(){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,m){return m.toUpperCase()},f=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),l(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,f):h=h.replace(a,f),h.replace(t,c))};return tc.camelCase=d,tc}var nc,t1;function C3(){if(t1)return nc;t1=1;var e=nc&&nc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(N3()),n=_3();function a(s,l){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(f,d){f&&d&&(c[(0,n.camelCase)(f,l)]=d)}),c}return a.default=a,nc=a,nc}var T3=C3();const A3=ag(T3),xw=vw("end"),qg=vw("start");function vw(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 O3(e){const t=qg(e),n=xw(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?Vm(e):""}function Vm(e){return i1(e&&e.line)+":"+i1(e&&e.column)}function n1(e){return Vm(e&&e.start)+"-"+Vm(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 d=a.indexOf(":");d===-1?l.ruleId=a:(l.source=a.slice(0,d),l.ruleId=a.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.position)}const f=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=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.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 Hg={}.hasOwnProperty,R3=new Map,j3=/[A-Z]/g,M3=new Set(["table","tbody","thead","tfoot","tr"]),L3=new Set(["td","th"]),Ew="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function D3(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=q3(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=F3(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"?Fg:S3,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Sw(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function Sw(e,t,n){if(t.type==="element")return I3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return z3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return B3(e,t,n);if(t.type==="mdxjsEsm")return U3(e,t);if(t.type==="root")return $3(e,t,n);if(t.type==="text")return P3(e,t)}function I3(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=Fg,e.schema=s),e.ancestors.push(t);const l=kw(e,t.tagName,!1),c=H3(e,t);let f=Gg(e,t);return M3.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!d3(d):!0})),ww(e,c,l,t),Kg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,l,c,n)}function z3(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)}wc(e,t.position)}function U3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wc(e,t.position)}function B3(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=Fg,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:kw(e,t.name,!0),c=K3(e,t),f=Gg(e,t);return ww(e,c,l,t),Kg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,l,c,n)}function $3(e,t,n){const a={};return Kg(a,Gg(e,t)),e.create(t,e.Fragment,a,n)}function P3(e,t){return t.value}function ww(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 F3(e,t,n){return a;function a(s,l,c,f){const h=Array.isArray(c.children)?n:t;return f?h(l,c,f):h(l,c)}}function q3(e,t){return n;function n(a,s,l,c){const f=Array.isArray(l.children),d=qg(a);return t(s,l,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function H3(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&Hg.call(t.properties,s)){const l=G3(e,s,t.properties[s]);if(l){const[c,f]=l;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&L3.has(t.tagName)?a=f:n[c]=f}}if(a){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function K3(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 f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else wc(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 f=a.value.data.estree.body[0];f.type,l=e.evaluater.evaluateExpression(f.expression)}else wc(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:R3;for(;++a<t.children.length;){const l=t.children[a];let c;if(e.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const h=s.get(d)||0;c=d+"-"+h,s.set(d,h+1)}}const f=Sw(e,l,c);f!==void 0&&n.push(f)}return n}function G3(e,t,n){const a=x3(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?l3(n):w3(n)),a.property==="style"){let s=typeof n=="object"?n:Q3(e,String(n));return e.stylePropertyNameCase==="css"&&(s=V3(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?g3[a.property]||a.property:a.attribute,n]}}function Q3(e,t){try{return A3(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=Ew+"#cannot-parse-style-attribute",s}}function kw(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 f=V0(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(l&&f.type==="Literal"),optional:!1}:f}a=c}else a=V0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return Hg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);wc(e)}function wc(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=Ew+"#cannot-handle-mdx-estrees-without-createevaluater",n}function V3(e){const t={};let n;for(n in e)Hg.call(e,n)&&(t[Y3(n)]=e[n]);return t}function Y3(e){let t=e.replace(j3,W3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function W3(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"]},X3={};function Qg(e,t){const n=X3,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Nw(e,a,s)}function Nw(e,t,n){if(Z3(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]=Nw(e[s],t,n);return a.join("")}function Z3(e){return!!(e&&typeof e=="object")}const r1=document.createElement("i");function Vg(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 li(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 wi(e,t){return e.length>0?(li(e,e.length,0,t),e):t}const s1={}.hasOwnProperty;function _w(e){const t={};let n=-1;for(;++n<e.length;)J3(t,e[n]);return t}function J3(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 f=l[c];ez(s[c],Array.isArray(f)?f:f?[f]:[])}}}function ez(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);li(e,0,0,a)}function Cw(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 zi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const On=Ar(/[A-Za-z]/),yn=Ar(/[\dA-Za-z]/),tz=Ar(/[#-'*+\--9=?A-Z^-~]/);function Hf(e){return e!==null&&(e<32||e===127)}const Ym=Ar(/\d/),nz=Ar(/[\dA-Fa-f]/),iz=Ar(/[!-/:-@[-`{-~]/);function je(e){return e!==null&&e<-2}function wt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const yd=Ar(new RegExp("\\p{P}|\\p{S}","u")),gs=Ar(/\s/);function Ar(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&&yn(e.charCodeAt(n+1))&&yn(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 f=e.charCodeAt(n+1);l<56320&&f>56319&&f<57344?(c=String.fromCharCode(l,f),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 it(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(d){return We(d)?(e.enter(n),f(d)):t(d)}function f(d){return We(d)&&l++<s?(e.consume(d),f):(e.exit(n),t(d))}}const az={tokenize:rz};function rz(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),it(e,t,"linePrefix")}function s(f){return e.enter("paragraph"),l(f)}function l(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return je(f)?(e.consume(f),e.exit("chunkText"),l):(e.consume(f),c)}}const sz={tokenize:lz},l1={tokenize:oz};function lz(e){const t=this,n=[];let a=0,s,l,c;return f;function f(C){if(a<n.length){const R=n[a];return t.containerState=R[1],e.attempt(R[0].continuation,d,h)(C)}return h(C)}function d(C){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&T();const R=t.events.length;let B=R,j;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){j=t.events[B][1].end;break}k(a);let $=R;for(;$<t.events.length;)t.events[$][1].end={...j},$++;return li(t.events,B+1,0,t.events.slice(R)),t.events.length=$,h(C)}return f(C)}function h(C){if(a===n.length){if(!s)return x(C);if(s.currentConstruct&&s.currentConstruct.concrete)return E(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(l1,m,b)(C)}function m(C){return s&&T(),k(a),x(C)}function b(C){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,E(C)}function x(C){return t.containerState={},e.attempt(l1,v,E)(C)}function v(C){return a++,n.push([t.currentConstruct,t.containerState]),x(C)}function E(C){if(C===null){s&&T(),k(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),w(C)}function w(C){if(C===null){N(e.exit("chunkFlow"),!0),k(0),e.consume(C);return}return je(C)?(e.consume(C),N(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(C),w)}function N(C,R){const B=t.sliceStream(C);if(R&&B.push(null),C.previous=l,l&&(l.next=C),l=C,s.defineSkip(C.start),s.write(B),t.parser.lazy[C.start.line]){let j=s.events.length;for(;j--;)if(s.events[j][1].start.offset<c&&(!s.events[j][1].end||s.events[j][1].end.offset>c))return;const $=t.events.length;let q=$,ee,L;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(ee){L=t.events[q][1].end;break}ee=!0}for(k(a),j=$;j<t.events.length;)t.events[j][1].end={...L},j++;li(t.events,q+1,0,t.events.slice($)),t.events.length=j}}function k(C){let R=n.length;for(;R-- >C;){const B=n[R];t.containerState=B[1],B[0].exit.call(t,e)}n.length=C}function T(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function oz(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $l(e){if(e===null||wt(e)||gs(e))return 1;if(yd(e))return 2}function xd(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:cz,tokenize:uz};function cz(e,t){let n=-1,a,s,l,c,f,d,h,m;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;d=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 b={...e[a][1].end},x={...e[n][1].start};o1(b,-d),o1(x,d),c={type:d>1?"strongSequence":"emphasisSequence",start:b,end:{...e[a][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},l={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[n][1].start={...f.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=wi(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=wi(h,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",l,t]]),h=wi(h,xd(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=wi(h,[["exit",l,t],["enter",f,t],["exit",f,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=wi(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,li(e,a-1,n-a+3,h),n=a+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function uz(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=$l(a);let l;return c;function c(d){return l=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===l)return e.consume(d),f;const h=e.exit("attentionSequence"),m=$l(d),b=!m||m===2&&s||n.includes(d),x=!s||s===2&&m||n.includes(a);return h._open=!!(l===42?b:b&&(s||!x)),h._close=!!(l===42?x:x&&(m||!b)),t(d)}}function o1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fz={name:"autolink",tokenize:dz};function dz(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 On(v)?(e.consume(v),c):v===64?n(v):h(v)}function c(v){return v===43||v===45||v===46||yn(v)?(a=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),a=0,d):(v===43||v===45||v===46||yn(v))&&a++<32?(e.consume(v),f):(a=0,h(v))}function d(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||Hf(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),m):tz(v)?(e.consume(v),h):n(v)}function m(v){return yn(v)?b(v):n(v)}function b(v){return v===46?(e.consume(v),a=0,m):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||yn(v))&&a++<63){const E=v===45?x:b;return e.consume(v),E}return n(v)}}const Uc={partial:!0,tokenize:hz};function hz(e,t,n){return a;function a(l){return We(l)?it(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||je(l)?t(l):n(l)}}const Tw={continuation:{tokenize:mz},exit:gz,name:"blockQuote",tokenize:pz};function pz(e,t,n){const a=this;return s;function s(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),l}return n(c)}function l(c){return We(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function mz(e,t,n){const a=this;return s;function s(c){return We(c)?it(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(Tw,t,n)(c)}}function gz(e){e.exit("blockQuote")}const Aw={name:"characterEscape",tokenize:bz};function bz(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 iz(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Ow={name:"characterReference",tokenize:yz};function yz(e,t,n){const a=this;let s=0,l,c;return f;function f(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),d}function d(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,c=yn,m(b))}function h(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=nz,m):(e.enter("characterReferenceValue"),l=7,c=Ym,m(b))}function m(b){if(b===59&&s){const x=e.exit("characterReferenceValue");return c===yn&&!Vg(a.sliceSerialize(x))?n(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(b)&&s++<l?(e.consume(b),m):n(b)}}const c1={partial:!0,tokenize:vz},u1={concrete:!0,name:"codeFenced",tokenize:xz};function xz(e,t,n){const a=this,s={partial:!0,tokenize:B};let l=0,c=0,f;return d;function d(j){return h(j)}function h(j){const $=a.events[a.events.length-1];return l=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(j)}function m(j){return j===f?(c++,e.consume(j),m):c<3?n(j):(e.exit("codeFencedFenceSequence"),We(j)?it(e,b,"whitespace")(j):b(j))}function b(j){return j===null||je(j)?(e.exit("codeFencedFence"),a.interrupt?t(j):e.check(c1,w,R)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(j))}function x(j){return j===null||je(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(j)):We(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,v,"whitespace")(j)):j===96&&j===f?n(j):(e.consume(j),x)}function v(j){return j===null||je(j)?b(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(j))}function E(j){return j===null||je(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(j)):j===96&&j===f?n(j):(e.consume(j),E)}function w(j){return e.attempt(s,R,N)(j)}function N(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),k}function k(j){return l>0&&We(j)?it(e,T,"linePrefix",l+1)(j):T(j)}function T(j){return j===null||je(j)?e.check(c1,w,R)(j):(e.enter("codeFlowValue"),C(j))}function C(j){return j===null||je(j)?(e.exit("codeFlowValue"),T(j)):(e.consume(j),C)}function R(j){return e.exit("codeFenced"),t(j)}function B(j,$,q){let ee=0;return L;function L(te){return j.enter("lineEnding"),j.consume(te),j.exit("lineEnding"),Z}function Z(te){return j.enter("codeFencedFence"),We(te)?it(j,ie,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):ie(te)}function ie(te){return te===f?(j.enter("codeFencedFenceSequence"),be(te)):q(te)}function be(te){return te===f?(ee++,j.consume(te),be):ee>=c?(j.exit("codeFencedFenceSequence"),We(te)?it(j,ue,"whitespace")(te):ue(te)):q(te)}function ue(te){return te===null||je(te)?(j.exit("codeFencedFence"),$(te)):q(te)}}}function vz(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:Sz},Ez={partial:!0,tokenize:wz};function Sz(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),it(e,l,"linePrefix",5)(h)}function l(h){const m=a.events[a.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(h):n(h)}function c(h){return h===null?d(h):je(h)?e.attempt(Ez,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||je(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function wz(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):it(e,l,"linePrefix",5)(c)}function l(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):je(c)?s(c):n(c)}}const kz={name:"codeText",previous:_z,resolve:Nz,tokenize:Cz};function Nz(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 _z(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Cz(e,t,n){let a=0,s,l;return c;function c(b){return e.enter("codeText"),e.enter("codeTextSequence"),f(b)}function f(b){return b===96?(e.consume(b),a++,f):(e.exit("codeTextSequence"),d(b))}function d(b){return b===null?n(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),d):b===96?(l=e.enter("codeTextSequence"),s=0,m(b)):je(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(b))}function h(b){return b===null||b===32||b===96||je(b)?(e.exit("codeTextData"),d(b)):(e.consume(b),h)}function m(b){return b===96?(e.consume(b),s++,m):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(b)):(l.type="codeTextData",h(b))}}class Tz{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 Rw(e){const t={};let n=-1,a,s,l,c,f,d,h;const m=new Tz(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(a=m.get(n),n&&a[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=a[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,Az(m,n)),n=t[n],h=!0);else if(a[1]._container){for(l=n,s=void 0;l--;)if(c=m.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(m.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={...m.get(s)[1].start},f=m.slice(s,n),f.unshift(a),m.splice(s,n-s+1,f))}}return li(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function Az(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 f=c.events,d=[],h={};let m,b,x=-1,v=n,E=0,w=0;const N=[w];for(;v;){for(;e.get(++s)[1]!==v;);l.push(s),v._tokenizer||(m=a.sliceStream(v),v.next||m.push(null),b&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=v,v=v.next}for(v=n;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(w=x+1,N.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):N.pop(),x=N.length;x--;){const k=f.slice(N[x],N[x+1]),T=l.pop();d.push([T,T+k.length-1]),e.splice(T,2,k)}for(d.reverse(),x=-1;++x<d.length;)h[E+d[x][0]]=E+d[x][1],E+=d[x][1]-d[x][0]-1;return h}const Oz={resolve:jz,tokenize:Mz},Rz={partial:!0,tokenize:Lz};function jz(e){return Rw(e),e}function Mz(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?l(f):je(f)?e.check(Rz,c,l)(f):(e.consume(f),s)}function l(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function Lz(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),it(e,l,"linePrefix")}function l(c){if(c===null||je(c))return n(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function jw(e,t,n,a,s,l,c,f,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return b;function b(k){return k===60?(e.enter(a),e.enter(s),e.enter(l),e.consume(k),e.exit(l),x):k===null||k===32||k===41||Hf(k)?n(k):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(k))}function x(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===62?(e.exit("chunkString"),e.exit(f),x(k)):k===null||k===60||je(k)?n(k):(e.consume(k),k===92?E:v)}function E(k){return k===60||k===62||k===92?(e.consume(k),v):v(k)}function w(k){return!m&&(k===null||k===41||wt(k))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(k)):m<h&&k===40?(e.consume(k),m++,w):k===41?(e.consume(k),m--,w):k===null||k===32||k===40||Hf(k)?n(k):(e.consume(k),k===92?N:w)}function N(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function Mw(e,t,n,a,s,l){const c=this;let f=0,d;return h;function h(v){return e.enter(a),e.enter(s),e.consume(v),e.exit(s),e.enter(l),m}function m(v){return f>999||v===null||v===91||v===93&&!d||v===94&&!f&&"_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"),m):(e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===null||v===91||v===93||je(v)||f++>999?(e.exit("chunkString"),m(v)):(e.consume(v),d||(d=!We(v)),v===92?x:b)}function x(v){return v===91||v===92||v===93?(e.consume(v),f++,b):b(v)}}function Lw(e,t,n,a,s,l){let c;return f;function f(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,d):n(x)}function d(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),d(c)):x===null?n(x):je(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),it(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===c||x===null||je(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?b:m)}function b(x){return x===c||x===92?(e.consume(x),m):m(x)}}function fc(e,t){let n;return a;function a(s){return je(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):We(s)?it(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const Dz={name:"definition",tokenize:zz},Iz={partial:!0,tokenize:Uz};function zz(e,t,n){const a=this;let s;return l;function l(v){return e.enter("definition"),c(v)}function c(v){return Mw.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=zi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return wt(v)?fc(e,h)(v):h(v)}function h(v){return jw(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function m(v){return e.attempt(Iz,b,b)(v)}function b(v){return We(v)?it(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 Uz(e,t,n){return a;function a(f){return wt(f)?fc(e,s)(f):n(f)}function s(f){return Lw(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function l(f){return We(f)?it(e,c,"whitespace")(f):c(f)}function c(f){return f===null||je(f)?t(f):n(f)}}const Bz={name:"hardBreakEscape",tokenize:$z};function $z(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 Pz={name:"headingAtx",resolve:Fz,tokenize:qz};function Fz(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"},li(e,a,n-a+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function qz(e,t,n){let a=0;return s;function s(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&a++<6?(e.consume(m),c):m===null||wt(m)?(e.exit("atxHeadingSequence"),f(m)):n(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||je(m)?(e.exit("atxHeading"),t(m)):We(m)?it(e,f,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),f(m))}function h(m){return m===null||m===35||wt(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),h)}}const Hz=["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"],f1=["pre","script","style","textarea"],Kz={concrete:!0,name:"htmlFlow",resolveTo:Vz,tokenize:Yz},Gz={partial:!0,tokenize:Xz},Qz={partial:!0,tokenize:Wz};function Vz(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 Yz(e,t,n){const a=this;let s,l,c,f,d;return h;function h(O){return m(O)}function m(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),b}function b(O){return O===33?(e.consume(O),x):O===47?(e.consume(O),l=!0,w):O===63?(e.consume(O),s=3,a.interrupt?t:M):On(O)?(e.consume(O),c=String.fromCharCode(O),N):n(O)}function x(O){return O===45?(e.consume(O),s=2,v):O===91?(e.consume(O),s=5,f=0,E):On(O)?(e.consume(O),s=4,a.interrupt?t:M):n(O)}function v(O){return O===45?(e.consume(O),a.interrupt?t:M):n(O)}function E(O){const ye="CDATA[";return O===ye.charCodeAt(f++)?(e.consume(O),f===ye.length?a.interrupt?t:ie:E):n(O)}function w(O){return On(O)?(e.consume(O),c=String.fromCharCode(O),N):n(O)}function N(O){if(O===null||O===47||O===62||wt(O)){const ye=O===47,W=c.toLowerCase();return!ye&&!l&&f1.includes(W)?(s=1,a.interrupt?t(O):ie(O)):Hz.includes(c.toLowerCase())?(s=6,ye?(e.consume(O),k):a.interrupt?t(O):ie(O)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(O):l?T(O):C(O))}return O===45||yn(O)?(e.consume(O),c+=String.fromCharCode(O),N):n(O)}function k(O){return O===62?(e.consume(O),a.interrupt?t:ie):n(O)}function T(O){return We(O)?(e.consume(O),T):L(O)}function C(O){return O===47?(e.consume(O),L):O===58||O===95||On(O)?(e.consume(O),R):We(O)?(e.consume(O),C):L(O)}function R(O){return O===45||O===46||O===58||O===95||yn(O)?(e.consume(O),R):B(O)}function B(O){return O===61?(e.consume(O),j):We(O)?(e.consume(O),B):C(O)}function j(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,$):We(O)?(e.consume(O),j):q(O)}function $(O){return O===d?(e.consume(O),d=null,ee):O===null||je(O)?n(O):(e.consume(O),$)}function q(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||wt(O)?B(O):(e.consume(O),q)}function ee(O){return O===47||O===62||We(O)?C(O):n(O)}function L(O){return O===62?(e.consume(O),Z):n(O)}function Z(O){return O===null||je(O)?ie(O):We(O)?(e.consume(O),Z):n(O)}function ie(O){return O===45&&s===2?(e.consume(O),F):O===60&&s===1?(e.consume(O),oe):O===62&&s===4?(e.consume(O),D):O===63&&s===3?(e.consume(O),M):O===93&&s===5?(e.consume(O),pe):je(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Gz,X,be)(O)):O===null||je(O)?(e.exit("htmlFlowData"),be(O)):(e.consume(O),ie)}function be(O){return e.check(Qz,ue,X)(O)}function ue(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),te}function te(O){return O===null||je(O)?be(O):(e.enter("htmlFlowData"),ie(O))}function F(O){return O===45?(e.consume(O),M):ie(O)}function oe(O){return O===47?(e.consume(O),c="",K):ie(O)}function K(O){if(O===62){const ye=c.toLowerCase();return f1.includes(ye)?(e.consume(O),D):ie(O)}return On(O)&&c.length<8?(e.consume(O),c+=String.fromCharCode(O),K):ie(O)}function pe(O){return O===93?(e.consume(O),M):ie(O)}function M(O){return O===62?(e.consume(O),D):O===45&&s===2?(e.consume(O),M):ie(O)}function D(O){return O===null||je(O)?(e.exit("htmlFlowData"),X(O)):(e.consume(O),D)}function X(O){return e.exit("htmlFlow"),t(O)}}function Wz(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 Xz(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Uc,t,n)}}const Zz={name:"htmlText",tokenize:Jz};function Jz(e,t,n){const a=this;let s,l,c;return f;function f(M){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(M),d}function d(M){return M===33?(e.consume(M),h):M===47?(e.consume(M),B):M===63?(e.consume(M),C):On(M)?(e.consume(M),q):n(M)}function h(M){return M===45?(e.consume(M),m):M===91?(e.consume(M),l=0,E):On(M)?(e.consume(M),T):n(M)}function m(M){return M===45?(e.consume(M),v):n(M)}function b(M){return M===null?n(M):M===45?(e.consume(M),x):je(M)?(c=b,oe(M)):(e.consume(M),b)}function x(M){return M===45?(e.consume(M),v):b(M)}function v(M){return M===62?F(M):M===45?x(M):b(M)}function E(M){const D="CDATA[";return M===D.charCodeAt(l++)?(e.consume(M),l===D.length?w:E):n(M)}function w(M){return M===null?n(M):M===93?(e.consume(M),N):je(M)?(c=w,oe(M)):(e.consume(M),w)}function N(M){return M===93?(e.consume(M),k):w(M)}function k(M){return M===62?F(M):M===93?(e.consume(M),k):w(M)}function T(M){return M===null||M===62?F(M):je(M)?(c=T,oe(M)):(e.consume(M),T)}function C(M){return M===null?n(M):M===63?(e.consume(M),R):je(M)?(c=C,oe(M)):(e.consume(M),C)}function R(M){return M===62?F(M):C(M)}function B(M){return On(M)?(e.consume(M),j):n(M)}function j(M){return M===45||yn(M)?(e.consume(M),j):$(M)}function $(M){return je(M)?(c=$,oe(M)):We(M)?(e.consume(M),$):F(M)}function q(M){return M===45||yn(M)?(e.consume(M),q):M===47||M===62||wt(M)?ee(M):n(M)}function ee(M){return M===47?(e.consume(M),F):M===58||M===95||On(M)?(e.consume(M),L):je(M)?(c=ee,oe(M)):We(M)?(e.consume(M),ee):F(M)}function L(M){return M===45||M===46||M===58||M===95||yn(M)?(e.consume(M),L):Z(M)}function Z(M){return M===61?(e.consume(M),ie):je(M)?(c=Z,oe(M)):We(M)?(e.consume(M),Z):ee(M)}function ie(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),s=M,be):je(M)?(c=ie,oe(M)):We(M)?(e.consume(M),ie):(e.consume(M),ue)}function be(M){return M===s?(e.consume(M),s=void 0,te):M===null?n(M):je(M)?(c=be,oe(M)):(e.consume(M),be)}function ue(M){return M===null||M===34||M===39||M===60||M===61||M===96?n(M):M===47||M===62||wt(M)?ee(M):(e.consume(M),ue)}function te(M){return M===47||M===62||wt(M)?ee(M):n(M)}function F(M){return M===62?(e.consume(M),e.exit("htmlTextData"),e.exit("htmlText"),t):n(M)}function oe(M){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),K}function K(M){return We(M)?it(e,pe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):pe(M)}function pe(M){return e.enter("htmlTextData"),c(M)}}const Yg={name:"labelEnd",resolveAll:i4,resolveTo:a4,tokenize:r4},e4={tokenize:s4},t4={tokenize:l4},n4={tokenize:o4};function i4(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&&li(e,0,e.length,n),e}function a4(e,t){let n=e.length,a=0,s,l,c,f;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 d={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}},m={type:"labelText",start:{...e[l+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=wi(f,e.slice(l+1,l+a+3)),f=wi(f,[["enter",m,t]]),f=wi(f,xd(t.parser.constructs.insideSpan.null,e.slice(l+a+4,c-3),t)),f=wi(f,[["exit",m,t],e[c-2],e[c-1],["exit",h,t]]),f=wi(f,e.slice(c+1)),f=wi(f,[["exit",d,t]]),li(e,l,e.length,f),e}function r4(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 f;function f(x){return l?l._inactive?b(x):(c=a.parser.defined.includes(zi(a.sliceSerialize({start:l.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(e4,m,c?m:b)(x):x===91?e.attempt(t4,m,c?h:b)(x):c?m(x):b(x)}function h(x){return e.attempt(n4,m,b)(x)}function m(x){return t(x)}function b(x){return l._balanced=!0,n(x)}}function s4(e,t,n){return a;function a(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),s}function s(b){return wt(b)?fc(e,l)(b):l(b)}function l(b){return b===41?m(b):jw(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return wt(b)?fc(e,d)(b):m(b)}function f(b){return n(b)}function d(b){return b===34||b===39||b===40?Lw(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):m(b)}function h(b){return wt(b)?fc(e,m)(b):m(b)}function m(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),t):n(b)}}function l4(e,t,n){const a=this;return s;function s(f){return Mw.call(a,e,l,c,"reference","referenceMarker","referenceString")(f)}function l(f){return a.parser.defined.includes(zi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function o4(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 c4={name:"labelStartImage",resolveAll:Yg.resolveAll,tokenize:u4};function u4(e,t,n){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),l}function l(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const f4={name:"labelStartLink",resolveAll:Yg.resolveAll,tokenize:d4};function d4(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:h4};function h4(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Of={name:"thematicBreak",tokenize:p4};function p4(e,t,n){let a=0,s;return l;function l(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,f(h)}function f(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):a>=3&&(h===null||je(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),a++,d):(e.exit("thematicBreakSequence"),We(h)?it(e,f,"whitespace")(h):f(h))}}const Pn={continuation:{tokenize:y4},exit:v4,name:"list",tokenize:b4},m4={partial:!0,tokenize:E4},g4={partial:!0,tokenize:x4};function b4(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 f;function f(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(Of,n,h)(v):h(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return Ym(v)&&++c<10?(e.consume(v),d):(!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(Uc,a.interrupt?n:m,e.attempt(m4,x,b))}function m(v){return a.containerState.initialBlankLine=!0,l++,x(v)}function b(v){return We(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 y4(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Uc,s,l);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,it(e,t,"listItemIndent",a.containerState.size+1)(f)}function l(f){return a.containerState.furtherBlankLines||!We(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(g4,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,it(e,e.attempt(Pn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function x4(e,t,n){const a=this;return it(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 v4(e){e.exit(this.containerState.type)}function E4(e,t,n){const a=this;return it(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!We(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const d1={name:"setextUnderline",resolveTo:S4,tokenize:w4};function S4(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 w4(e,t,n){const a=this;let s;return l;function l(h){let m=a.events.length,b;for(;m--;)if(a.events[m][1].type!=="lineEnding"&&a.events[m][1].type!=="linePrefix"&&a.events[m][1].type!=="content"){b=a.events[m][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||b)?(e.enter("setextHeadingLine"),s=h,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===s?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),We(h)?it(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||je(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const k4={tokenize:N4};function N4(e){const t=this,n=e.attempt(Uc,a,e.attempt(this.parser.constructs.flowInitial,s,it(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Oz,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 _4={resolveAll:Iw()},C4=Dw("string"),T4=Dw("text");function Dw(e){return{resolveAll:Iw(e==="text"?A4:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],l=n.attempt(s,c,f);return c;function c(m){return h(m)?l(m):f(m)}function f(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return h(m)?(n.exit("data"),l(m)):(n.consume(m),d)}function h(m){if(m===null)return!0;const b=s[m];let x=-1;if(b)for(;++x<b.length;){const v=b[x];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function Iw(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 A4(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,f=0,d;for(;l--;){const h=s[l];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const h={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:a.start._bufferIndex+c,_index:a.start._index+l,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},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 O4={42:Pn,43:Pn,45:Pn,48:Pn,49:Pn,50:Pn,51:Pn,52:Pn,53:Pn,54:Pn,55:Pn,56:Pn,57:Pn,62:Tw},R4={91:Dz},j4={[-2]:Wp,[-1]:Wp,32:Wp},M4={35:Pz,42:Of,45:[d1,Of],60:Kz,61:d1,95:Of,96:u1,126:u1},L4={38:Ow,92:Aw},D4={[-5]:Xp,[-4]:Xp,[-3]:Xp,33:c4,38:Ow,42:Wm,60:[fz,Zz],91:f4,92:[Bz,Aw],93:Yg,95:Wm,96:kz},I4={null:[Wm,_4]},z4={null:[42,95]},U4={null:[]},B4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:z4,contentInitial:R4,disable:U4,document:O4,flow:M4,flowInitial:j4,insideSpan:I4,string:L4,text:D4},Symbol.toStringTag,{value:"Module"}));function $4(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=[],f=[];const d={attempt:$(B),check:$(j),consume:T,enter:C,exit:R,interrupt:$(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:E,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:b};let m=t.tokenize.call(h,d);return t.resolveAll&&l.push(t),h;function b(Z){return c=wi(c,Z),N(),c[c.length-1]!==null?[]:(q(t,0),h.events=xd(l,h.events,h),h.events)}function x(Z,ie){return F4(v(Z),ie)}function v(Z){return P4(c,Z)}function E(){const{_bufferIndex:Z,_index:ie,line:be,column:ue,offset:te}=a;return{_bufferIndex:Z,_index:ie,line:be,column:ue,offset:te}}function w(Z){s[Z.line]=Z.column,L()}function N(){let Z;for(;a._index<c.length;){const ie=c[a._index];if(typeof ie=="string")for(Z=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===Z&&a._bufferIndex<ie.length;)k(ie.charCodeAt(a._bufferIndex));else k(ie)}}function k(Z){m=m(Z)}function T(Z){je(Z)?(a.line++,a.column=1,a.offset+=Z===-3?2:1,L()):Z!==-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=Z}function C(Z,ie){const be=ie||{};return be.type=Z,be.start=E(),h.events.push(["enter",be,h]),f.push(be),be}function R(Z){const ie=f.pop();return ie.end=E(),h.events.push(["exit",ie,h]),ie}function B(Z,ie){q(Z,ie.from)}function j(Z,ie){ie.restore()}function $(Z,ie){return be;function be(ue,te,F){let oe,K,pe,M;return Array.isArray(ue)?X(ue):"tokenize"in ue?X([ue]):D(ue);function D(fe){return G;function G(se){const de=se!==null&&fe[se],Re=se!==null&&fe.null,mt=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(Re)?Re:Re?[Re]:[]];return X(mt)(se)}}function X(fe){return oe=fe,K=0,fe.length===0?F:O(fe[K])}function O(fe){return G;function G(se){return M=ee(),pe=fe,fe.partial||(h.currentConstruct=fe),fe.name&&h.parser.constructs.disable.null.includes(fe.name)?W():fe.tokenize.call(ie?Object.assign(Object.create(h),ie):h,d,ye,W)(se)}}function ye(fe){return Z(pe,M),te}function W(fe){return M.restore(),++K<oe.length?O(oe[K]):F}}}function q(Z,ie){Z.resolveAll&&!l.includes(Z)&&l.push(Z),Z.resolve&&li(h.events,ie,h.events.length-ie,Z.resolve(h.events.slice(ie),h)),Z.resolveTo&&(h.events=Z.resolveTo(h.events,h))}function ee(){const Z=E(),ie=h.previous,be=h.currentConstruct,ue=h.events.length,te=Array.from(f);return{from:ue,restore:F};function F(){a=Z,h.previous=ie,h.currentConstruct=be,h.events.length=ue,f=te,L()}}function L(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function P4(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 f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}l>0&&c.push(e[s].slice(0,l))}return c}function F4(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=`
|
|
512
|
+
`;break}case-3:{c=`\r
|
|
513
|
+
`;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 q4(e){const a={constructs:_w([B4,...(e||{}).extensions||[]]),content:s(az),defined:[],document:s(sz),flow:s(k4),lazy:{},string:s(C4),text:s(T4)};return a;function s(l){return c;function c(f){return $4(a,l,f)}}}function H4(e){for(;!Rw(e););return e}const h1=/[\0\t\n\r]/g;function K4(){let e=1,t="",n=!0,a;return s;function s(l,c,f){const d=[];let h,m,b,x,v;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),b=0,t="",n&&(l.charCodeAt(0)===65279&&b++,n=void 0);b<l.length;){if(h1.lastIndex=b,h=h1.exec(l),x=h&&h.index!==void 0?h.index:l.length,v=l.charCodeAt(x),!h){t=l.slice(b);break}if(v===10&&b===x&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),b<x&&(d.push(l.slice(b,x)),e+=x-b),v){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}b=x+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const G4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Q4(e){return e.replace(G4,V4)}function V4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return Cw(n.slice(l?2:1),l?16:10)}return Vg(n)||e}const zw={}.hasOwnProperty;function Y4(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),W4(n)(H4(q4(n).document().write(K4()(e,t,!0))))}function W4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Fi),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:l(Pi),blockQuote:l(Re),characterEscape:ee,characterReference:ee,codeFenced:l(mt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(mt,c),codeText:l(vt,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:l(ui),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(Vn),hardBreakEscape:l(et),hardBreakTrailing:l(et),htmlFlow:l(Ai,c),htmlFlowData:ee,htmlText:l(Ai,c),htmlTextData:ee,image:l(fi),label:c,link:l(Fi),listItem:l(Or),listItemValue:x,listOrdered:l(aa,b),listUnordered:l(aa),paragraph:l(to),reference:O,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(Pi),strong:l(Ss),thematicBreak:l(ws)},exit:{atxHeading:d(),atxHeadingSequence:B,autolink:d(),autolinkEmail:de,autolinkProtocol:se,blockQuote:d(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:fe,characterReference:G,codeFenced:d(N),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:E,codeFlowValue:L,codeIndented:d(k),codeText:d(te),codeTextData:L,data:L,definition:d(),definitionDestinationString:R,definitionLabelString:T,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(ie),hardBreakTrailing:d(ie),htmlFlow:d(be),htmlFlowData:L,htmlText:d(ue),htmlTextData:L,image:d(oe),label:pe,labelText:K,lineEnding:Z,link:d(F),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ye,resourceDestinationString:M,resourceTitleString:D,resource:X,setextHeading:d(q),setextHeadingLineSequence:$,setextHeadingText:j,strong:d(),thematicBreak:d()}};Uw(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ne){let ge={type:"root",children:[]};const Me={stack:[ge],tokenStack:[],config:t,enter:f,exit:h,buffer:c,resume:m,data:n},Ge=[];let at=-1;for(;++at<ne.length;)if(ne[at][1].type==="listOrdered"||ne[at][1].type==="listUnordered")if(ne[at][0]==="enter")Ge.push(at);else{const Sn=Ge.pop();at=s(ne,Sn,at)}for(at=-1;++at<ne.length;){const Sn=t[ne[at][0]];zw.call(Sn,ne[at][1].type)&&Sn[ne[at][1].type].call(Object.assign({sliceSerialize:ne[at][2].sliceSerialize},Me),ne[at][1])}if(Me.tokenStack.length>0){const Sn=Me.tokenStack[Me.tokenStack.length-1];(Sn[1]||p1).call(Me,void 0,Sn[0])}for(ge.position={start:fr(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:fr(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},at=-1;++at<t.transforms.length;)ge=t.transforms[at](ge)||ge;return ge}function s(ne,ge,Me){let Ge=ge-1,at=-1,Sn=!1,Oi,ln,Bt,hn;for(;++Ge<=Me;){const ut=ne[Ge];switch(ut[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ut[0]==="enter"?at++:at--,hn=void 0;break}case"lineEndingBlank":{ut[0]==="enter"&&(Oi&&!hn&&!at&&!Bt&&(Bt=Ge),hn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:hn=void 0}if(!at&&ut[0]==="enter"&&ut[1].type==="listItemPrefix"||at===-1&&ut[0]==="exit"&&(ut[1].type==="listUnordered"||ut[1].type==="listOrdered")){if(Oi){let qi=Ge;for(ln=void 0;qi--;){const wn=ne[qi];if(wn[1].type==="lineEnding"||wn[1].type==="lineEndingBlank"){if(wn[0]==="exit")continue;ln&&(ne[ln][1].type="lineEndingBlank",Sn=!0),wn[1].type="lineEnding",ln=qi}else if(!(wn[1].type==="linePrefix"||wn[1].type==="blockQuotePrefix"||wn[1].type==="blockQuotePrefixWhitespace"||wn[1].type==="blockQuoteMarker"||wn[1].type==="listItemIndent"))break}Bt&&(!ln||Bt<ln)&&(Oi._spread=!0),Oi.end=Object.assign({},ln?ne[ln][1].start:ut[1].end),ne.splice(ln||Ge,0,["exit",Oi,ut[2]]),Ge++,Me++}if(ut[1].type==="listItemPrefix"){const qi={type:"listItem",_spread:!1,start:Object.assign({},ut[1].start),end:void 0};Oi=qi,ne.splice(Ge,0,["enter",qi,ut[2]]),Ge++,Me++,Bt=void 0,hn=!0}}}return ne[ge][1]._spread=Sn,Me}function l(ne,ge){return Me;function Me(Ge){f.call(this,ne(Ge),Ge),ge&&ge.call(this,Ge)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ne,ge,Me){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([ge,Me||void 0]),ne.position={start:fr(ge.start),end:void 0}}function d(ne){return ge;function ge(Me){ne&&ne.call(this,Me),h.call(this,Me)}}function h(ne,ge){const Me=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==ne.type&&(ge?ge.call(this,ne,Ge[0]):(Ge[1]||p1).call(this,ne,Ge[0]));else throw new Error("Cannot close `"+ne.type+"` ("+uc({start:ne.start,end:ne.end})+"): it’s not open");Me.position.end=fr(ne.end)}function m(){return Qg(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function x(ne){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ne}function E(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ne}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne.replace(/(\r?\n|\r)$/g,"")}function T(ne){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.label=ge,Me.identifier=zi(this.sliceSerialize(ne)).toLowerCase()}function C(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ne}function R(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ne}function B(ne){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Me=this.sliceSerialize(ne).length;ge.depth=Me}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function $(ne){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(ne){const Me=this.stack[this.stack.length-1].children;let Ge=Me[Me.length-1];(!Ge||Ge.type!=="text")&&(Ge=Lt(),Ge.position={start:fr(ne.start),end:void 0},Me.push(Ge)),this.stack.push(Ge)}function L(ne){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ne),ge.position.end=fr(ne.end)}function Z(ne){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=ge.children[ge.children.length-1];Me.position.end=fr(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(ee.call(this,ne),L.call(this,ne))}function ie(){this.data.atHardBreak=!0}function be(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne}function ue(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne}function te(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne}function F(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=ge,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function oe(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=ge,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function K(ne){const ge=this.sliceSerialize(ne),Me=this.stack[this.stack.length-2];Me.label=Q4(ge),Me.identifier=zi(ge).toLowerCase()}function pe(){const ne=this.stack[this.stack.length-1],ge=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const Ge=ne.children;Me.children=Ge}else Me.alt=ge}function M(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ne}function D(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ne}function X(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ye(ne){const ge=this.resume(),Me=this.stack[this.stack.length-1];Me.label=ge,Me.identifier=zi(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function W(ne){this.data.characterReferenceType=ne.type}function fe(ne){const ge=this.sliceSerialize(ne),Me=this.data.characterReferenceType;let Ge;Me?(Ge=Cw(ge,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=Vg(ge);const at=this.stack[this.stack.length-1];at.value+=Ge}function G(ne){const ge=this.stack.pop();ge.position.end=fr(ne.end)}function se(ne){L.call(this,ne);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ne)}function de(ne){L.call(this,ne);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ne)}function Re(){return{type:"blockquote",children:[]}}function mt(){return{type:"code",lang:null,meta:null,value:""}}function vt(){return{type:"inlineCode",value:""}}function ui(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Vn(){return{type:"emphasis",children:[]}}function Pi(){return{type:"heading",depth:0,children:[]}}function et(){return{type:"break"}}function Ai(){return{type:"html",value:""}}function fi(){return{type:"image",title:null,url:"",alt:null}}function Fi(){return{type:"link",title:null,url:"",children:[]}}function aa(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Or(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function to(){return{type:"paragraph",children:[]}}function Ss(){return{type:"strong",children:[]}}function Lt(){return{type:"text",value:""}}function ws(){return{type:"thematicBreak"}}}function fr(e){return{line:e.line,column:e.column,offset:e.offset}}function Uw(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?Uw(e,a):X4(e,a)}}function X4(e,t){let n;for(n in t)if(zw.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 Z4(e){const t=this;t.parser=n;function n(a){return Y4(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function J4(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 eU(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
514
|
+
`}]}function tU(e,t){const n=t.value?t.value+`
|
|
515
|
+
`:"",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 nU(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iU(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aU(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,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=l+1,f+=1,e.footnoteCounts.set(a,f);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function rU(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 sU(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Bw(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 lU(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Bw(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 oU(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 cU(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 uU(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Bw(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 fU(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 dU(e,t,n){const a=e.all(t),s=n?hU(n):$w(t),l={},c=[];if(typeof t.checked=="boolean"){const m=a[0];let b;m&&m.type==="element"&&m.tagName==="p"?b=m:(b={type:"element",tagName:"p",properties:{},children:[]},a.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const m=a[f];(s||f!==0||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
516
|
+
`}),m.type==="element"&&m.tagName==="p"&&!s?c.push(...m.children):c.push(m)}const d=a[a.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
|
|
517
|
+
`});const h={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,h),e.applyData(t,h)}function hU(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=$w(n[a])}return t}function $w(e){const t=e.spread;return t??e.children.length>1}function pU(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 mU(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gU(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function bU(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yU(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)},f=qg(t.children[1]),d=xw(t.children[t.children.length-1]);f&&d&&(c.position={start:f,end:d}),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 xU(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,f=c?c.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const b=t.children[d],x={},v=c?c[d]:void 0;v&&(x.align=v);let E={type:"element",tagName:l,properties:x,children:[]};b&&(E.children=e.all(b),e.patch(b,E),E=e.applyData(b,E)),h.push(E)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function vU(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 EU(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 SU(e,t){const n={type:"text",value:EU(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wU(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const kU={blockquote:J4,break:eU,code:tU,delete:nU,emphasis:iU,footnoteReference:aU,heading:rU,html:sU,imageReference:lU,image:oU,inlineCode:cU,linkReference:uU,link:fU,listItem:dU,list:pU,paragraph:mU,root:gU,strong:bU,table:yU,tableCell:vU,tableRow:xU,text:SU,thematicBreak:wU,toml:pf,yaml:pf,definition:pf,footnoteDefinition:pf};function pf(){}const Pw=-1,vd=0,dc=1,Kf=2,Wg=3,Xg=4,Zg=5,Jg=6,Fw=7,qw=8,y1=typeof self=="object"?self:globalThis,NU=(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 vd:case Pw:return n(c,s);case dc:{const f=n([],s);for(const d of c)f.push(a(d));return f}case Kf:{const f=n({},s);for(const[d,h]of c)f[a(d)]=a(h);return f}case Wg:return n(new Date(c),s);case Xg:{const{source:f,flags:d}=c;return n(new RegExp(f,d),s)}case Zg:{const f=n(new Map,s);for(const[d,h]of c)f.set(a(d),a(h));return f}case Jg:{const f=n(new Set,s);for(const d of c)f.add(a(d));return f}case Fw:{const{name:f,message:d}=c;return n(new y1[f](d),s)}case qw: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:f}=new Uint8Array(c);return n(new DataView(f),c)}}return n(new y1[l](c),s)};return a},x1=e=>NU(new Map,e)(0),pl="",{toString:_U}={},{keys:CU}=Object,ac=e=>{const t=typeof e;if(t!=="object"||!e)return[vd,t];const n=_U.call(e).slice(8,-1);switch(n){case"Array":return[dc,pl];case"Object":return[Kf,pl];case"Date":return[Wg,pl];case"RegExp":return[Xg,pl];case"Map":return[Zg,pl];case"Set":return[Jg,pl];case"DataView":return[dc,n]}return n.includes("Array")?[dc,n]:n.includes("Error")?[Fw,n]:[Kf,n]},mf=([e,t])=>e===vd&&(t==="function"||t==="symbol"),TU=(e,t,n,a)=>{const s=(c,f)=>{const d=a.push(c)-1;return n.set(f,d),d},l=c=>{if(n.has(c))return n.get(c);let[f,d]=ac(c);switch(f){case vd:{let m=c;switch(d){case"bigint":f=qw,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return s([Pw],c)}return s([f,m],c)}case dc:{if(d){let x=c;return d==="DataView"?x=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(c)),s([d,[...x]],c)}const m=[],b=s([f,m],c);for(const x of c)m.push(l(x));return b}case Kf:{if(d)switch(d){case"BigInt":return s([d,c.toString()],c);case"Boolean":case"Number":case"String":return s([d,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const m=[],b=s([f,m],c);for(const x of CU(c))(e||!mf(ac(c[x])))&&m.push([l(x),l(c[x])]);return b}case Wg:return s([f,c.toISOString()],c);case Xg:{const{source:m,flags:b}=c;return s([f,{source:m,flags:b}],c)}case Zg:{const m=[],b=s([f,m],c);for(const[x,v]of c)(e||!(mf(ac(x))||mf(ac(v))))&&m.push([l(x),l(v)]);return b}case Jg:{const m=[],b=s([f,m],c);for(const x of c)(e||!mf(ac(x)))&&m.push(l(x));return b}}const{message:h}=c;return s([f,{name:d,message:h}],c)};return l},v1=(e,{json:t,lossy:n}={})=>{const a=[];return TU(!(t||n),!!t,new Map,a)(e),a},Gf=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 AU(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 OU(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function RU(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||AU,a=e.options.footnoteBackLabel||OU,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const m=e.all(h),b=String(h.identifier).toUpperCase(),x=eo(b.toLowerCase());let v=0;const E=[],w=e.footnoteCounts.get(b);for(;w!==void 0&&++v<=w;){E.length>0&&E.push({type:"text",value:" "});let T=typeof n=="string"?n:n(d,v);typeof T=="string"&&(T={type:"text",value:T}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(d,v),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const N=m[m.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const T=N.children[N.children.length-1];T&&T.type==="text"?T.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...E)}else m.push(...E);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(m,!0)};e.patch(h,k),f.push(k)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Gf(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
518
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
519
|
+
`}]}}const Bc=(function(e){if(e==null)return DU;if(typeof e=="function")return Ed(e);if(typeof e=="object")return Array.isArray(e)?jU(e):MU(e);if(typeof e=="string")return LU(e);throw new Error("Expected function, string, or object as test")});function jU(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Bc(e[n]);return Ed(a);function a(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function MU(e){const t=e;return Ed(n);function n(a){const s=a;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function LU(e){return Ed(t);function t(n){return n&&n.type===e}}function Ed(e){return t;function t(n,a,s){return!!(IU(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function DU(){return!0}function IU(e){return e!==null&&typeof e=="object"&&"type"in e}const Hw=[],zU=!0,Xm=!1,UU="skip";function Kw(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const l=Bc(s),c=a?-1:1;f(e,void 0,[])();function f(d,h,m){const b=d&&typeof d=="object"?d:{};if(typeof b.type=="string"){const v=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=Hw,E,w,N;if((!t||l(d,h,m[m.length-1]||void 0))&&(v=BU(n(d,m)),v[0]===Xm))return v;if("children"in d&&d.children){const k=d;if(k.children&&v[0]!==UU)for(w=(a?k.children.length:-1)+c,N=m.concat(k);w>-1&&w<k.children.length;){const T=k.children[w];if(E=f(T,w,N)(),E[0]===Xm)return E;w=typeof E[1]=="number"?E[1]:w+c}}return v}}}function BU(e){return Array.isArray(e)?e:typeof e=="number"?[zU,e]:e==null?Hw:[e]}function Sd(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),Kw(e,l,f,s);function f(d,h){const m=h[h.length-1],b=m?m.children.indexOf(d):void 0;return c(d,b,m)}}const Zm={}.hasOwnProperty,$U={};function PU(e,t){const n=t||$U,a=new Map,s=new Map,l=new Map,c={...kU,...n.handlers},f={all:h,applyData:qU,definitionById:a,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:c,one:d,options:n,patch:FU,wrap:KU};return Sd(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const b=m.type==="definition"?a:s,x=String(m.identifier).toUpperCase();b.has(x)||b.set(x,m)}}),f;function d(m,b){const x=m.type,v=f.handlers[x];if(Zm.call(f.handlers,x)&&v)return v(f,m,b);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in m){const{children:w,...N}=m,k=Gf(N);return k.children=f.all(m),k}return Gf(m)}return(f.options.unknownHandler||HU)(f,m,b)}function h(m){const b=[];if("children"in m){const x=m.children;let v=-1;for(;++v<x.length;){const E=f.one(x[v],m);if(E){if(v&&x[v-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=E1(E.value)),!Array.isArray(E)&&E.type==="element")){const w=E.children[0];w&&w.type==="text"&&(w.value=E1(w.value))}Array.isArray(E)?b.push(...E):b.push(E)}}}return b}}function FU(e,t){e.position&&(t.position=O3(e))}function qU(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,Gf(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function HU(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 KU(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
|
|
520
|
+
`});++a<e.length;)a&&n.push({type:"text",value:`
|
|
521
|
+
`}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
522
|
+
`}),n}function E1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function S1(e,t){const n=PU(e,t),a=n.one(e,void 0),s=RU(n),l=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
|
|
523
|
+
`},s),l}function GU(e,t){return e&&"run"in e?async function(n,a){const s=S1(n,{file:a,...t});await e.run(s,a)}:function(n,a){return S1(n,{file:a,...e||t})}}function w1(e){if(e)throw e}var Zp,k1;function QU(){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 m=e.call(h,"constructor"),b=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!b)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},c=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},f=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(a)return a(h,m).value}else return;return h[m]};return Zp=function d(){var h,m,b,x,v,E,w=arguments[0],N=1,k=arguments.length,T=!1;for(typeof w=="boolean"&&(T=w,w=arguments[1]||{},N=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});N<k;++N)if(h=arguments[N],h!=null)for(m in h)b=f(w,m),x=f(h,m),w!==x&&(T&&x&&(l(x)||(v=s(x)))?(v?(v=!1,E=b&&s(b)?b:[]):E=b&&l(b)?b:{},c(w,{name:m,newValue:d(T,E,x)})):typeof x<"u"&&c(w,{name:m,newValue:x}));return w},Zp}var VU=QU();const Jp=ag(VU);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 YU(){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);f(null,...s);function f(d,...h){const m=e[++l];let b=-1;if(d){c(d);return}for(;++b<s.length;)(h[b]===null||h[b]===void 0)&&(h[b]=s[b]);s=h,m?WU(m,f)(...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 WU(e,t){let n;return a;function a(...c){const f=e.length>c.length;let d;f&&c.push(s);try{d=e.apply(this,c)}catch(h){const m=h;if(f&&n)throw m;return s(m)}f||(d&&d.then&&typeof d.then=="function"?d.then(l,s):d instanceof Error?s(d):l(d))}function s(c,...f){n||(n=!0,t(c,...f))}function l(c){s(null,c)}}const Wi={basename:XU,dirname:ZU,extname:JU,join:eB,sep:"/"};function XU(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');$c(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,f=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else c<0&&(l=!0,c=s+1),f>-1&&(e.codePointAt(s)===t.codePointAt(f--)?f<0&&(a=s):(f=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function ZU(e){if($c(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 JU(e){$c(e);let t=e.length,n=-1,a=0,s=-1,l=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),f===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 eB(...e){let t=-1,n;for(;++t<e.length;)$c(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":tB(n)}function tB(e){$c(e);const t=e.codePointAt(0)===47;let n=nB(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function nB(e,t){let n="",a=0,s=-1,l=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(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(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",a=0):(n=n.slice(0,d),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 f===46&&l>-1?l++:l=-1}return n}function $c(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const iB={cwd:aB};function aB(){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 rB(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 sB(e)}function sB(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 Gw{constructor(t){let n;t?eg(t)?n={path:t}:typeof t=="string"||lB(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":iB.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"?Wi.basename(this.path):void 0}set basename(t){nm(t,"basename"),tm(t,"basename"),this.path=Wi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Wi.dirname(this.path):void 0}set dirname(t){N1(this.basename,"dirname"),this.path=Wi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Wi.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=Wi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){eg(t)&&(t=rB(t)),nm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Wi.basename(this.path,this.extname):void 0}set stem(t){nm(t,"stem"),tm(t,"stem"),this.path=Wi.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(Wi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wi.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 lB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oB=(function(e){const a=this.constructor.prototype,s=a[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,a),l}),cB={}.hasOwnProperty;class eb extends oB{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=YU()}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):cB.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=gf(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 f=gf(t),d=a.parse(f);a.run(d,f,function(m,b,x){if(m||!b||!x)return h(m);const v=b,E=a.stringify(v,x);dB(E)?x.value=E:x.result=E,h(m,x)});function h(m,b){m||!b?c(m):l?l(b):n(void 0,b)}}}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,w1(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,f){const d=gf(n);s.run(t,d,h);function h(m,b,x){const v=b||t;m?f(m):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,f){w1(c),s=f,a=!0}}stringify(t,n){this.freeze();const a=gf(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")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...b]=h;d(m,b)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(s.settings=Jp(!0,s.settings,h.settings))}function f(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const b=h[m];l(b)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,m){let b=-1,x=-1;for(;++b<a.length;)if(a[b][0]===h){x=b;break}if(x===-1)a.push([h,...m]);else if(m.length>0){let[v,...E]=m;const w=a[x][1];Jm(w)&&Jm(v)&&(v=Jp(!0,w,v)),a[x]=[h,v,...E]}}}}const uB=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 gf(e){return fB(e)?e:new Gw(e)}function fB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function dB(e){return typeof e=="string"||hB(e)}function hB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",T1=[],A1={allowDangerousHtml:!0},mB=/^(https?|ircs?|mailto|xmpp)$/i,gB=[{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=bB(e),n=yB(e);return xB(t.runSync(t.parse(n),n),e)}function bB(e){const t=e.rehypePlugins||T1,n=e.remarkPlugins||T1,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...A1}:A1;return uB().use(Z4).use(n).use(GU,a).use(t)}function yB(e){const t=e.children||"",n=new Gw;return typeof t=="string"&&(n.value=t),n}function xB(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,l=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||vB;for(const m of gB)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+pB+m.id,void 0);return Sd(e,h),D3(e,{Fragment:p.Fragment,components:s,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function h(m,b,x){if(m.type==="raw"&&x&&typeof b=="number")return c?x.children.splice(b,1):x.children[b]={type:"text",value:m.value},b;if(m.type==="element"){let v;for(v in Yp)if(Object.hasOwn(Yp,v)&&Object.hasOwn(m.properties,v)){const E=m.properties[v],w=Yp[v];(w===null||w.includes(m.tagName))&&(m.properties[v]=d(String(E||""),v,m))}}if(m.type==="element"){let v=n?!n.includes(m.tagName):l?l.includes(m.tagName):!1;if(!v&&a&&typeof b=="number"&&(v=!a(m,b,x)),v&&x&&typeof b=="number")return f&&m.children?x.children.splice(b,1,...m.children):x.children.splice(b,1),b}}}function vB(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||mB.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 EB(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function SB(e,t,n){const s=Bc((n||{}).ignore||[]),l=wB(t);let c=-1;for(;++c<l.length;)Kw(e,"text",f);function f(h,m){let b=-1,x;for(;++b<m.length;){const v=m[b],E=x?x.children:void 0;if(s(v,E?E.indexOf(v):void 0,x))return;x=v}if(x)return d(h,m)}function d(h,m){const b=m[m.length-1],x=l[c][0],v=l[c][1];let E=0;const N=b.children.indexOf(h);let k=!1,T=[];x.lastIndex=0;let C=x.exec(h.value);for(;C;){const R=C.index,B={index:C.index,input:C.input,stack:[...m,h]};let j=v(...C,B);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?x.lastIndex=R+1:(E!==R&&T.push({type:"text",value:h.value.slice(E,R)}),Array.isArray(j)?T.push(...j):j&&T.push(j),E=R+C[0].length,k=!0),!x.global)break;C=x.exec(h.value)}return k?(E<h.value.length&&T.push({type:"text",value:h.value.slice(E)}),b.children.splice(N,1,...T)):T=[h],N+T.length}}function wB(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([kB(s[0]),NB(s[1])])}return t}function kB(e){return typeof e=="string"?new RegExp(EB(e),"g"):e}function NB(e){return typeof e=="function"?e:function(){return e}}const sm="phrasing",lm=["autolink","link","image","label"];function _B(){return{transforms:[MB],enter:{literalAutolink:TB,literalAutolinkEmail:om,literalAutolinkHttp:om,literalAutolinkWww:om},exit:{literalAutolink:jB,literalAutolinkEmail:RB,literalAutolinkHttp:AB,literalAutolinkWww:OB}}}function CB(){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 TB(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function om(e){this.config.enter.autolinkProtocol.call(this,e)}function AB(e){this.config.exit.autolinkProtocol.call(this,e)}function OB(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 RB(e){this.config.exit.autolinkEmail.call(this,e)}function jB(e){this.exit(e)}function MB(e){SB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),DB]],{ignore:["link","linkReference"]})}function LB(e,t,n,a,s){let l="";if(!Qw(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!IB(n)))return!1;const c=zB(n+a);if(!c[0])return!1;const f={type:"link",title:null,url:l+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function DB(e,t,n,a){return!Qw(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function IB(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 zB(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 Qw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||gs(n)||yd(n))&&(!t||n!==47)}Vw.peek=GB;function UB(){this.buffer()}function BB(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $B(){this.buffer()}function PB(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function FB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qB(e){this.exit(e)}function HB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function KB(e){this.exit(e)}function GB(){return"["}function Vw(e,t,n,a){const s=n.createTracker(a);let l=s.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),f(),c(),l+=s.move("]"),l}function QB(){return{enter:{gfmFootnoteCallString:UB,gfmFootnoteCall:BB,gfmFootnoteDefinitionLabelString:$B,gfmFootnoteDefinition:PB},exit:{gfmFootnoteCallString:FB,gfmFootnoteCall:qB,gfmFootnoteDefinitionLabelString:HB,gfmFootnoteDefinition:KB}}}function VB(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Vw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,l,c){const f=l.createTracker(c);let d=f.move("[^");const h=l.enter("footnoteDefinition"),m=l.enter("label");return d+=f.move(l.safe(l.associationId(a),{before:d,after:"]"})),m(),d+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),d+=f.move((t?`
|
|
524
|
+
`:" ")+l.indentLines(l.containerFlow(a,f.current()),t?Yw:YB))),h(),d}}function YB(e,t,n){return t===0?e:Yw(e,t,n)}function Yw(e,t,n){return(n?"":" ")+e}const WB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ww.peek=t$;function XB(){return{canContainEols:["delete"],enter:{strikethrough:JB},exit:{strikethrough:e$}}}function ZB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:WB}],handlers:{delete:Ww}}}function JB(e){this.enter({type:"delete",children:[]},e)}function e$(e){this.exit(e)}function Ww(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 t$(){return"~"}function n$(e){return e.length}function i$(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||n$,l=[],c=[],f=[],d=[];let h=0,m=-1;for(;++m<e.length;){const w=[],N=[];let k=-1;for(e[m].length>h&&(h=e[m].length);++k<e[m].length;){const T=a$(e[m][k]);if(n.alignDelimiters!==!1){const C=s(T);N[k]=C,(d[k]===void 0||C>d[k])&&(d[k]=C)}w.push(T)}c[m]=w,f[m]=N}let b=-1;if(typeof a=="object"&&"length"in a)for(;++b<h;)l[b]=R1(a[b]);else{const w=R1(a);for(;++b<h;)l[b]=w}b=-1;const x=[],v=[];for(;++b<h;){const w=l[b];let N="",k="";w===99?(N=":",k=":"):w===108?N=":":w===114&&(k=":");let T=n.alignDelimiters===!1?1:Math.max(1,d[b]-N.length-k.length);const C=N+"-".repeat(T)+k;n.alignDelimiters!==!1&&(T=N.length+T+k.length,T>d[b]&&(d[b]=T),v[b]=T),x[b]=C}c.splice(1,0,x),f.splice(1,0,v),m=-1;const E=[];for(;++m<c.length;){const w=c[m],N=f[m];b=-1;const k=[];for(;++b<h;){const T=w[b]||"";let C="",R="";if(n.alignDelimiters!==!1){const B=d[b]-(N[b]||0),j=l[b];j===114?C=" ".repeat(B):j===99?B%2?(C=" ".repeat(B/2+.5),R=" ".repeat(B/2-.5)):(C=" ".repeat(B/2),R=C):R=" ".repeat(B)}n.delimiterStart!==!1&&!b&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||b)&&k.push(" "),n.alignDelimiters!==!1&&k.push(C),k.push(T),n.alignDelimiters!==!1&&k.push(R),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||b!==h-1)&&k.push("|")}E.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return E.join(`
|
|
525
|
+
`)}function a$(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 r$(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()),s$);return s(),c}function s$(e,t,n){return">"+(n?"":" ")+e}function l$(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===`
|
|
526
|
+
`&&l$(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
527
|
+
`}function o$(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 c$(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 u$(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 f$(e,t,n,a){const s=u$(n),l=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(c$(e,n)){const b=n.enter("codeIndented"),x=n.indentLines(l,d$);return b(),x}const f=n.createTracker(a),d=s.repeat(Math.max(o$(l,s)+1,3)),h=n.enter("codeFenced");let m=f.move(d);if(e.lang){const b=n.enter(`codeFencedLang${c}`);m+=f.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...f.current()})),b()}if(e.lang&&e.meta){const b=n.enter(`codeFencedMeta${c}`);m+=f.move(" "),m+=f.move(n.safe(e.meta,{before:m,after:`
|
|
528
|
+
`,encode:["`"],...f.current()})),b()}return m+=f.move(`
|
|
529
|
+
`),l&&(m+=f.move(l+`
|
|
530
|
+
`)),m+=f.move(d),h(),m}function d$(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 h$(e,t,n,a){const s=nb(n),l=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const d=n.createTracker(a);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
531
|
+
`,...d.current()}))),f(),e.title&&(f=n.enter(`title${l}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),f()),c(),h}function p$(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 Qf(e,t,n){const a=$l(e),s=$l(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}}Xw.peek=m$;function Xw(e,t,n,a){const s=p$(n),l=n.enter("emphasis"),c=n.createTracker(a),f=c.move(s);let d=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=d.charCodeAt(0),m=Qf(a.before.charCodeAt(a.before.length-1),h,s);m.inside&&(d=kc(h)+d.slice(1));const b=d.charCodeAt(d.length-1),x=Qf(a.after.charCodeAt(0),b,s);x.inside&&(d=d.slice(0,-1)+kc(b));const v=c.move(s);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},f+d+v}function m$(e,t,n){return n.options.emphasis||"*"}function g$(e,t){let n=!1;return Sd(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)&&Qg(e)&&(t.options.setext||n))}function b$(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(a);if(g$(e,n)){const m=n.enter("headingSetext"),b=n.enter("phrasing"),x=n.containerPhrasing(e,{...l.current(),before:`
|
|
532
|
+
`,after:`
|
|
533
|
+
`});return b(),m(),x+`
|
|
534
|
+
`+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
535
|
+
`))+1))}const c="#".repeat(s),f=n.enter("headingAtx"),d=n.enter("phrasing");l.move(c+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
536
|
+
`,...l.current()});return/^[\t ]/.test(h)&&(h=kc(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),d(),f(),h}Zw.peek=y$;function Zw(e){return e.value||""}function y$(){return"<"}Jw.peek=x$;function Jw(e,t,n,a){const s=nb(n),l=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const d=n.createTracker(a);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=n.enter(`title${l}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),f()),h+=d.move(")"),c(),h}function x$(){return"!"}ek.peek=v$;function ek(e,t,n,a){const s=e.referenceType,l=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(a);let d=f.move("![");const h=n.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const m=n.stack;n.stack=[],c=n.enter("reference");const b=n.safe(n.associationId(e),{before:d,after:"]",...f.current()});return c(),n.stack=m,l(),s==="full"||!h||h!==b?d+=f.move(b+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function v$(){return"!"}tk.peek=E$;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],f=n.compilePattern(c);let d;if(c.atBreak)for(;d=f.exec(a);){let h=d.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(d.index+1)}}return s+a+s}function E$(){return"`"}function nk(e,t){const n=Qg(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=S$;function ik(e,t,n,a){const s=nb(n),l=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,d;if(nk(e,n)){const m=n.stack;n.stack=[],f=n.enter("autolink");let b=c.move("<");return b+=c.move(n.containerPhrasing(e,{before:b,after:">",...c.current()})),b+=c.move(">"),f(),n.stack=m,b}f=n.enter("link"),d=n.enter("label");let h=c.move("[");return h+=c.move(n.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(n.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(d=n.enter("destinationRaw"),h+=c.move(n.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=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),d()),h+=c.move(")"),f(),h}function S$(e,t,n){return nk(e,n)?"<":"["}ak.peek=w$;function ak(e,t,n,a){const s=e.referenceType,l=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(a);let d=f.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const m=n.stack;n.stack=[],c=n.enter("reference");const b=n.safe(n.associationId(e),{before:d,after:"]",...f.current()});return c(),n.stack=m,l(),s==="full"||!h||h!==b?d+=f.move(b+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function w$(){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 k$(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 N$(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,t,n,a){const s=n.enter("list"),l=n.bulletCurrent;let c=e.ordered?N$(n):ib(n);const f=e.ordered?c==="."?")":".":k$(n);let d=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&m&&(!m.children||!m.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&&(d=!0),rk(n)===c&&m){let b=-1;for(;++b<e.children.length;){const x=e.children[b];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=f),n.bulletCurrent=c;const h=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=l,s(),h}function C$(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 T$(e,t,n,a){const s=C$(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 f=n.createTracker(a);f.move(l+" ".repeat(c-l.length)),f.shift(c);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,f.current()),m);return d(),h;function m(b,x,v){return x?(v?"":" ".repeat(c))+b:(v?l:l+" ".repeat(c-l.length))+b}}function A$(e,t,n,a){const s=n.enter("paragraph"),l=n.enter("phrasing"),c=n.containerPhrasing(e,a);return l(),s(),c}const O$=Bc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function R$(e,t,n,a){return(e.children.some(function(c){return O$(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function j$(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=M$;function sk(e,t,n,a){const s=j$(n),l=n.enter("strong"),c=n.createTracker(a),f=c.move(s+s);let d=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=d.charCodeAt(0),m=Qf(a.before.charCodeAt(a.before.length-1),h,s);m.inside&&(d=kc(h)+d.slice(1));const b=d.charCodeAt(d.length-1),x=Qf(a.after.charCodeAt(0),b,s);x.inside&&(d=d.slice(0,-1)+kc(b));const v=c.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},f+d+v}function M$(e,t,n){return n.options.strong||"*"}function L$(e,t,n,a){return n.safe(e.value,a)}function D$(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 I$(e,t,n){const a=(rk(n)+(n.options.ruleSpaces?" ":"")).repeat(D$(n));return n.options.ruleSpaces?a.slice(0,-1):a}const lk={blockquote:r$,break:M1,code:f$,definition:h$,emphasis:Xw,hardBreak:M1,heading:b$,html:Zw,image:Jw,imageReference:ek,inlineCode:tk,link:ik,linkReference:ak,list:_$,listItem:T$,paragraph:A$,root:R$,strong:sk,text:L$,thematicBreak:I$};function z$(){return{enter:{table:U$,tableData:L1,tableHeader:L1,tableRow:$$},exit:{codeText:P$,table:B$,tableData:cm,tableHeader:cm,tableRow:cm}}}function U$(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 B$(e){this.exit(e),this.data.inTable=void 0}function $$(e){this.enter({type:"tableRow",children:[]},e)}function cm(e){this.exit(e)}function L1(e){this.enter({type:"tableCell",children:[]},e)}function P$(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,F$));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function F$(e,t){return t==="|"?t:e}function q$(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
537
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:d,tableRow:f}};function c(v,E,w,N){return h(m(v,w,N),v.align)}function f(v,E,w,N){const k=b(v,w,N),T=h([k]);return T.slice(0,T.indexOf(`
|
|
538
|
+
`))}function d(v,E,w,N){const k=w.enter("tableCell"),T=w.enter("phrasing"),C=w.containerPhrasing(v,{...N,before:l,after:l});return T(),k(),C}function h(v,E){return i$(v,{align:E,alignDelimiters:a,padding:n,stringLength:s})}function m(v,E,w){const N=v.children;let k=-1;const T=[],C=E.enter("table");for(;++k<N.length;)T[k]=b(N[k],E,w);return C(),T}function b(v,E,w){const N=v.children;let k=-1;const T=[],C=E.enter("tableRow");for(;++k<N.length;)T[k]=d(N[k],v,E,w);return C(),T}function x(v,E,w){let N=lk.inlineCode(v,E,w);return w.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function H$(){return{exit:{taskListCheckValueChecked:D1,taskListCheckValueUnchecked:D1,paragraph:G$}}}function K$(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Q$}}}function D1(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function G$(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 f=s[l];if(f.type==="paragraph"){c=f;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 Q$(e,t,n,a){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);l&&f.move(c);let d=lk.listItem(e,t,n,{...a,...f.current()});return l&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+c}}function V$(){return[_B(),QB(),XB(),z$(),H$()]}function Y$(e){return{extensions:[CB(),VB(e),ZB(),q$(e),K$()]}}const W$={tokenize:n5,partial:!0},ok={tokenize:i5,partial:!0},ck={tokenize:a5,partial:!0},uk={tokenize:r5,partial:!0},X$={tokenize:s5,partial:!0},fk={name:"wwwAutolink",tokenize:e5,previous:hk},dk={name:"protocolAutolink",tokenize:t5,previous:pk},La={name:"emailAutolink",tokenize:J$,previous:mk},ia={};function Z$(){return{text:ia}}let Zr=48;for(;Zr<123;)ia[Zr]=La,Zr++,Zr===58?Zr=65:Zr===91&&(Zr=97);ia[43]=La;ia[45]=La;ia[46]=La;ia[95]=La;ia[72]=[La,dk];ia[104]=[La,dk];ia[87]=[La,fk];ia[119]=[La,fk];function J$(e,t,n){const a=this;let s,l;return c;function c(b){return!tg(b)||!mk.call(a,a.previous)||ab(a.events)?n(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(b))}function f(b){return tg(b)?(e.consume(b),f):b===64?(e.consume(b),d):n(b)}function d(b){return b===46?e.check(X$,m,h)(b):b===45||b===95||yn(b)?(l=!0,e.consume(b),d):m(b)}function h(b){return e.consume(b),s=!0,d}function m(b){return l&&s&&On(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(b)):n(b)}}function e5(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(W$,e.attempt(ok,e.attempt(ck,l),n),n)(c))}function l(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function t5(e,t,n){const a=this;let s="",l=!1;return c;function c(b){return(b===72||b===104)&&pk.call(a,a.previous)&&!ab(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(b),e.consume(b),f):n(b)}function f(b){if(On(b)&&s.length<5)return s+=String.fromCodePoint(b),e.consume(b),f;if(b===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(b),d}return n(b)}function d(b){return b===47?(e.consume(b),l?h:(l=!0,d)):n(b)}function h(b){return b===null||Hf(b)||wt(b)||gs(b)||yd(b)?n(b):e.attempt(ok,e.attempt(ck,m),n)(b)}function m(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(b)}}function n5(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 i5(e,t,n){let a,s,l;return c;function c(h){return h===46||h===95?e.check(uk,d,f)(h):h===null||wt(h)||gs(h)||h!==45&&yd(h)?d(h):(l=!0,e.consume(h),c)}function f(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),c}function d(h){return s||a||!l?n(h):t(h)}}function a5(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||wt(c)||gs(c)?t(c):(e.consume(c),s)}function l(c){return c===41&&a++,e.consume(c),s}}function r5(e,t,n){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),l):f===93?(e.consume(f),s):f===60||f===null||wt(f)||gs(f)?t(f):n(f)}function s(f){return f===null||f===40||f===91||wt(f)||gs(f)?t(f):a(f)}function l(f){return On(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),a):On(f)?(e.consume(f),c):n(f)}}function s5(e,t,n){return a;function a(l){return e.consume(l),s}function s(l){return yn(l)?n(l):t(l)}}function hk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||wt(e)}function pk(e){return!On(e)}function mk(e){return!(e===47||tg(e))}function tg(e){return e===43||e===45||e===46||e===95||yn(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 l5={tokenize:m5,partial:!0};function o5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:d5,continuation:{tokenize:h5},exit:p5}},text:{91:{name:"gfmFootnoteCall",tokenize:f5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:c5,resolveTo:u5}}}}function c5(e,t,n){const a=this;let s=a.events.length;const l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const d=a.events[s][1];if(d.type==="labelImage"){c=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!c||!c._balanced)return n(d);const h=zi(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function u5(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)},f=[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,...f),e}function f5(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l=0,c;return f;function f(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),d}function d(b){return b!==94?n(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(b){if(l>999||b===93&&!c||b===null||b===91||wt(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(zi(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(b)}return wt(b)||(c=!0),l++,e.consume(b),b===92?m:h}function m(b){return b===91||b===92||b===93?(e.consume(b),l++,h):h(b)}}function d5(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l,c=0,f;return d;function d(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",m):n(E)}function m(E){if(c>999||E===93&&!f||E===null||E===91||wt(E))return n(E);if(E===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return l=zi(a.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return wt(E)||(f=!0),c++,e.consume(E),E===92?b:m}function b(E){return E===91||E===92||E===93?(e.consume(E),c++,m):m(E)}function x(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),s.includes(l)||s.push(l),it(e,v,"gfmFootnoteDefinitionWhitespace")):n(E)}function v(E){return t(E)}}function h5(e,t,n){return e.check(Uc,t,e.attempt(l5,t,n))}function p5(e){e.exit("gfmFootnoteDefinition")}function m5(e,t,n){const a=this;return it(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 g5(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,f){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let h=d;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[d][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[d][1].end)},b={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[d][1].start)},x=[["enter",m,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",b,f]],v=f.parser.constructs.insideSpan.null;v&&li(x,x.length,0,xd(v,c.slice(h+1,d),f)),li(x,x.length,0,[["exit",b,f],["enter",c[d][1],f],["exit",c[d][1],f],["exit",m,f]]),li(c,h-1,d-h+3,x),d=h+x.length-2;break}}for(d=-1;++d<c.length;)c[d][1].type==="strikethroughSequenceTemporary"&&(c[d][1].type="data");return c}function l(c,f,d){const h=this.previous,m=this.events;let b=0;return x;function x(E){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(E):(c.enter("strikethroughSequenceTemporary"),v(E))}function v(E){const w=$l(h);if(E===126)return b>1?d(E):(c.consume(E),b++,v);if(b<2&&!n)return d(E);const N=c.exit("strikethroughSequenceTemporary"),k=$l(E);return N._open=!k||k===2&&!!w,N._close=!w||w===2&&!!k,f(E)}}}class b5{constructor(){this.map=[]}add(t,n,a){y5(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 y5(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 x5(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 v5(){return{flow:{null:{name:"table",tokenize:E5,resolveAll:S5}}}}function E5(e,t,n){const a=this;let s=0,l=0,c;return f;function f(L){let Z=a.events.length-1;for(;Z>-1;){const ue=a.events[Z][1].type;if(ue==="lineEnding"||ue==="linePrefix")Z--;else break}const ie=Z>-1?a.events[Z][1].type:null,be=ie==="tableHead"||ie==="tableRow"?j:d;return be===j&&a.parser.lazy[a.now().line]?n(L):be(L)}function d(L){return e.enter("tableHead"),e.enter("tableRow"),h(L)}function h(L){return L===124||(c=!0,l+=1),m(L)}function m(L){return L===null?n(L):je(L)?l>1?(l=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),v):n(L):We(L)?it(e,m,"whitespace")(L):(l+=1,c&&(c=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),b(L)))}function b(L){return L===null||L===124||wt(L)?(e.exit("data"),m(L)):(e.consume(L),L===92?x:b)}function x(L){return L===92||L===124?(e.consume(L),b):b(L)}function v(L){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(L):(e.enter("tableDelimiterRow"),c=!1,We(L)?it(e,E,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):E(L))}function E(L){return L===45||L===58?N(L):L===124?(c=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),w):B(L)}function w(L){return We(L)?it(e,N,"whitespace")(L):N(L)}function N(L){return L===58?(l+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),k):L===45?(l+=1,k(L)):L===null||je(L)?R(L):B(L)}function k(L){return L===45?(e.enter("tableDelimiterFiller"),T(L)):B(L)}function T(L){return L===45?(e.consume(L),T):L===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(L))}function C(L){return We(L)?it(e,R,"whitespace")(L):R(L)}function R(L){return L===124?E(L):L===null||je(L)?!c||s!==l?B(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):B(L)}function B(L){return n(L)}function j(L){return e.enter("tableRow"),$(L)}function $(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),$):L===null||je(L)?(e.exit("tableRow"),t(L)):We(L)?it(e,$,"whitespace")(L):(e.enter("data"),q(L))}function q(L){return L===null||L===124||wt(L)?(e.exit("data"),$(L)):(e.consume(L),L===92?ee:q)}function ee(L){return L===92||L===124?(e.consume(L),q):q(L)}}function S5(e,t){let n=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],f=!1,d=0,h,m,b;const x=new b5;for(;++n<e.length;){const v=e[n],E=v[1];v[0]==="enter"?E.type==="tableHead"?(f=!1,d!==0&&(I1(x,t,d,h,m),m=void 0,d=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,b=void 0,l=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,m={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(n,0,[["enter",m,t]])),s=E.type==="tableDelimiterRow"?2:m?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(l[1]!==0&&(c[0]=c[1],b=bf(x,t,l,s,void 0,b),l=[0,0,0,0]),c[2]=n)):E.type==="tableCellDivider"&&(a?a=!1:(l[1]!==0&&(c[0]=c[1],b=bf(x,t,l,s,void 0,b)),l=c,c=[l[1],n,0,0])):E.type==="tableHead"?(f=!0,d=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(d=n,l[1]!==0?(c[0]=c[1],b=bf(x,t,l,s,n,b)):c[1]!==0&&(b=bf(x,t,c,s,n,b)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=n)}for(d!==0&&I1(x,t,d,h,m),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=x5(t.events,n))}return e}function bf(e,t,n,a,s,l){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(l.end=Object.assign({},ml(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const d=ml(t.events,n[1]);if(l={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=ml(t.events,n[2]),m=ml(t.events,n[3]),b={type:f,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",b,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",b,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 w5={name:"tasklistCheck",tokenize:N5};function k5(){return{text:{91:w5}}}function N5(e,t,n){const a=this;return s;function s(d){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),l)}function l(d){return wt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),c):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),c):n(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(d)}function f(d){return je(d)?t(d):We(d)?e.check({tokenize:_5},t,n)(d):n(d)}}function _5(e,t,n){return it(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function C5(e){return _w([Z$(),o5(),g5(e),v5(),k5()])}const T5={};function rb(e){const t=this,n=e||T5,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),l=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(C5(n)),l.push(V$()),c.push(Y$(n))}const z1=(function(e,t,n){const a=Bc(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]}),Es=(function(e){if(e==null)return R5;if(typeof e=="string")return O5(e);if(typeof e=="object")return A5(e);if(typeof e=="function")return sb(e);throw new Error("Expected function, string, or array as `test`")});function A5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Es(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 O5(e){return sb(t);function t(n){return n.tagName===e}}function sb(e){return t;function t(n,a,s){return!!(j5(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function R5(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function j5(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const U1=/\n/g,B1=/[\t ]+/g,ng=Es("br"),$1=Es($5),M5=Es("p"),P1=Es("tr"),L5=Es(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",B5,P5]),gk=Es(["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 D5(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 f=-1;for(;++f<a.length;)c.push(...bk(a[f],e,{whitespace:l,breakBefore:f?void 0:s,breakAfter:f<a.length-1?ng(a[f+1]):s}));const d=[];let h;for(f=-1;++f<c.length;){const m=c[f];typeof m=="number"?h!==void 0&&m>h&&(h=m):m&&(h!==void 0&&h>-1&&d.push(`
|
|
539
|
+
`.repeat(h)||" "),h=-1,d.push(m))}return d.join("")}function bk(e,t,n){return e.type==="element"?I5(e,t,n):e.type==="text"?n.whitespace==="normal"?yk(e,n):z5(e):[]}function I5(e,t,n){const a=xk(e,n),s=e.children||[];let l=-1,c=[];if(L5(e))return c;let f,d;for(ng(e)||P1(e)&&z1(t,e,P1)?d=`
|
|
540
|
+
`:M5(e)?(f=2,d=2):gk(e)&&(f=1,d=1);++l<s.length;)c=c.concat(bk(s[l],e,{whitespace:a,breakBefore:l?void 0:f,breakAfter:l<s.length-1?ng(s[l+1]):d}));return $1(e)&&z1(t,e,$1)&&c.push(" "),f&&c.unshift(f),d&&c.push(d),c}function yk(e,t){const n=String(e.value),a=[],s=[];let l=0;for(;l<=n.length;){U1.lastIndex=l;const d=U1.exec(n),h=d&&"index"in d?d.index:n.length;a.push(U5(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,f;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]),f=void 0):a[c]?(typeof f=="number"&&s.push(f),s.push(a[c]),f=0):(c===0||c===a.length-1)&&s.push(0);return s}function z5(e){return[String(e.value)]}function U5(e,t,n){const a=[];let s=0,l;for(;s<e.length;){B1.lastIndex=s;const c=B1.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 B5(e){return!!(e.properties||{}).hidden}function $5(e){return e.tagName==="td"||e.tagName==="th"}function P5(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function F5(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("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={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},b={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"],N=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],R={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},B={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},j=[B,b,f,n,e.C_BLOCK_COMMENT_MODE,m,h],$={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:R,contains:j.concat([{begin:/\(/,end:/\)/,keywords:R,contains:j.concat(["self"]),relevance:0}]),relevance:0},q={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:R,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:R,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,m]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:R,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,m,f,{begin:/\(/,end:/\)/,keywords:R,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,m,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,b]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:R,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat($,q,B,j,[b,{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:R,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:R},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function q5(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=F5(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 H5(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"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(f);const d={match:/\\"/},h={className:"string",begin:/'/,end:/'/},m={match:/\\'/},b={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"],N=["true","false"],k={match:/(\/[a-z._-]+)+/},T=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],C=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],R=["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"],B=["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:N,built_in:[...T,...C,"set","shopt",...R,...B]},contains:[v,e.SHEBANG(),E,b,l,c,k,f,d,h,m,n]}}function K5(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("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={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},b={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*\\(",N={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},k=[b,f,n,e.C_BLOCK_COMMENT_MODE,m,h],T={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:N,contains:k.concat([{begin:/\(/,end:/\)/,keywords:N,contains:k.concat(["self"]),relevance:0}]),relevance:0},C={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:N,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:N,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,m,f,{begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,m,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,b]};return{name:"C",aliases:["h"],keywords:N,disableAutodetect:!0,illegal:"</",contains:[].concat(T,C,k,[b,{begin:e.IDENT_RE+"::",keywords:N},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:b,strings:h,keywords:N}}}function G5(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("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={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},b={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"],N=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],R={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},B={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},j=[B,b,f,n,e.C_BLOCK_COMMENT_MODE,m,h],$={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:R,contains:j.concat([{begin:/\(/,end:/\)/,keywords:R,contains:j.concat(["self"]),relevance:0}]),relevance:0},q={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:R,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:R,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,m]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:R,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,m,f,{begin:/\(/,end:/\)/,keywords:R,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,m,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,b]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:R,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat($,q,B,j,[b,{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:R,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:R},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Q5(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},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},h={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},m={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},b=e.inherit(m,{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]},N=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[w,E,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],v.contains=[N,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const k={variants:[h,w,E,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},T={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},C=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",R={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},k,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,T,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,T,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:"("+C+"\\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,T],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[k,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},R]}}const V5=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_-]*/}}),Y5=["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"],W5=["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"],X5=[...Y5,...W5],Z5=["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(),J5=["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(),eP=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),tP=["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 nP(e){const t=e.regex,n=V5(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_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[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:":("+J5.join("|")+")"},{begin:":(:)?("+eP.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+tP.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},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:Z5.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+X5.join("|")+")\\b"}]}}function iP(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 aP(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 rP(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 sP(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:"'"}]},f={begin:/\[/,end:/\]/,contains:[a,l,s,c,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,m=/'[^']*'/,b=t.either(d,h,m),x=t.concat(b,"(\\s*\\.\\s*",b,")*",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,f,l,s,c,n]}}]}}var gl="[0-9](_*[0-9])*",yf=`\\.(${gl})`,xf="[0-9a-fA-F](_*[0-9a-fA-F])*",F1={className:"number",variants:[{begin:`(\\b(${gl})((${yf})|\\.)?|(${yf}))[eE][+-]?(${gl})[fFdD]?\\b`},{begin:`\\b(${gl})((${yf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${yf})[fFdD]?\\b`},{begin:`\\b(${gl})[fFdD]\\b`},{begin:`\\b0[xX]((${xf})\\.?|(${xf})?\\.(${xf}))[pP][+-]?(${gl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${xf})[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 lP(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+vk("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},h={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},m={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,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:[m,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:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,F1,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},F1,h]}}const q1="[A-Za-z$_][0-9A-Za-z$_]*",oP=["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"],cP=["true","false","null","undefined","NaN","Infinity"],Ek=["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"],Sk=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wk=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],uP=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],fP=[].concat(wk,Ek,Sk);function dP(e){const t=e.regex,n=(K,{after:pe})=>{const M="</"+K[0].slice(1);return K.input.indexOf(M,pe)!==-1},a=q1,s={begin:"<>",end:"</>"},l=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(K,pe)=>{const M=K[0].length+K.index,D=K.input[M];if(D==="<"||D===","){pe.ignoreMatch();return}D===">"&&(n(K,{after:M})||pe.ignoreMatch());let X;const O=K.input.substring(M);if(X=O.match(/^\s*=/)){pe.ignoreMatch();return}if((X=O.match(/^\s+extends\s+/))&&X.index===0){pe.ignoreMatch();return}}},f={$pattern:q1,keyword:oP,literal:cP,built_in:fP,"variable.language":uP},d="[0-9](_?[0-9])*",h=`\\.(${d})`,m="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",b={className:"number",variants:[{begin:`(\\b(${m})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${m})\\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:f,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"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},T={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]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,N,{match:/\$\d+/},b];x.contains=C.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(C)});const R=[].concat(T,x.contains),B=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(R)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:B},$={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"}}]},q={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:{_:[...Ek,...Sk]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ie(K){return t.concat("(?!",K.join("|"),")")}const be={match:t.concat(/\b/,ie([...wk,"super","import"].map(K=>`${K}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:q},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,N,T,{match:/\$\d+/},b,q,{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:[T,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:B}]}]},{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"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},ue,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},be,Z,$,te,{match:/\$[(.]/}]}}function hP(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])*",vf=`\\.(${bl})`,Ef="[0-9a-fA-F](_*[0-9a-fA-F])*",pP={className:"number",variants:[{begin:`(\\b(${bl})((${vf})|\\.)?|(${vf}))[eE][+-]?(${bl})[fFdD]?\\b`},{begin:`\\b(${bl})((${vf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${vf})[fFdD]?\\b`},{begin:`\\b(${bl})[fFdD]\\b`},{begin:`\\b0[xX]((${Ef})\\.?|(${Ef})?\\.(${Ef}))[pP][+-]?(${bl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Ef})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function mP(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 f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},h=pP,m=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),b={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},x=b;return x.variants[1].contains=[b],b.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,m,n,a,f,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[b,e.C_LINE_COMMENT_MODE,m],relevance:0},e.C_LINE_COMMENT_MODE,m,f,d,c,e.C_NUMBER_MODE]},m]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,d]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
541
|
+
`},h]}}const gP=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_-]*/}}),bP=["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"],yP=["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"],xP=[...bP,...yP],vP=["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(),EP=["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(),SP=kk.concat(Nk).sort().reverse();function wP(e){const t=gP(e),n=SP,a="and or not only",s="[\\w-]+",l="("+s+"|@\\{"+s+"\\})",c=[],f=[],d=function(C){return{className:"string",begin:"~?"+C+".*?"+C}},h=function(C,R,B){return{className:C,begin:R,relevance:B}},m={$pattern:/[a-z-]+/,keyword:a,attribute:vP.join(" ")},b={begin:"\\(",end:"\\)",contains:f,keywords:m,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,b,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=f.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},E={begin:l+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+EP.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},w={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:m,returnEnd:!0,contains:f,relevance:0}},N={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:x}},k={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("+xP.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]},T={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[k]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,N,T,E,k,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function kP(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 NP(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 _P(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}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},h={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},m={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},b=e.inherit(h,{contains:[]}),x=e.inherit(m,{contains:[]});h.contains.push(x),m.contains.push(b);let v=[n,d];return[h,m,b,x].forEach(k=>{k.contains=k.contains.concat(v)}),v=v.concat(h,m),{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,m,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},s,a,d,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function CP(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_]*/,f={"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"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function TP(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:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},h={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},m=[e.BACKSLASH_ESCAPE,l,d],b=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(w,N,k="\\1")=>{const T=k==="\\1"?k:t.concat(k,N);return t.concat(t.concat("(?:",w,")"),N,/(?:\\.|[^\\\/])*?/,T,/(?:\\.|[^\\\/])*?/,k,a)},v=(w,N,k)=>t.concat(t.concat("(?:",w,")"),N,/(?:\\.|[^\\\/])*?/,k,a),E=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:m,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(...b,{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(...b,{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,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,h]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return l.contains=E,c.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:E}}function AP(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},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=e.inherit(e.APOS_STRING_MODE,{illegal:null}),m=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),b={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(ue,te)=>{te.data._beginMatch=ue[1]||ue[2]},"on:end":(ue,te)=>{te.data._beginMatch!==ue[1]&&te.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
542
|
+
]`,E={scope:"string",variants:[m,h,b,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},N=["false","null","true"],k=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],T=["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"],R={keyword:k,literal:(ue=>{const te=[];return ue.forEach(F=>{te.push(F),F.toLowerCase()===F?te.push(F.toUpperCase()):te.push(F.toLowerCase())}),te})(N),built_in:T},B=ue=>ue.map(te=>te.replace(/\|\d+$/,"")),j={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",B(T).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},$=t.concat(a,"\\b(?!\\()"),q={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),$],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),$],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"}}]},ee={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:R,contains:[ee,c,q,e.C_BLOCK_COMMENT_MODE,E,w,j]},Z={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",B(k).join("\\b|"),"|",B(T).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(Z);const ie=[ee,q,e.C_BLOCK_COMMENT_MODE,E,w,j],be={begin:t.concat(/#\[\s*\\?/,t.either(s,l)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:N,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:N,keyword:["new","array"]},contains:["self",...ie]},...ie,{scope:"meta",variants:[{match:s},{match:l}]}]};return{case_insensitive:!1,keywords:R,contains:[be,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,Z,q,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},j,{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:R,contains:["self",be,c,q,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 OP(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 RP(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function jP(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"],f={$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"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},m={begin:/\{\{/,relevance:0},b={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,m,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,m,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,m,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,m,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})`}]},N={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},k={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",d,w,b,e.HASH_COMMENT_MODE]}]};return h.contains=[b,w,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[d,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},b,N,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[k]},{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,k,b]}]}}function MP(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function LP(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 DP(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"]},f={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},h=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],m={className:"subst",begin:/#\{/,end:/\}/,keywords:c},b={className:"string",contains:[e.BACKSLASH_ESCAPE,m],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,m]})]}]},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}]},j=[b,{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:[b,{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,m],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,h),relevance:0}].concat(d,h);m.contains=j,w.contains=j;const L=[{begin:/^\s*=>/,starts:{end:"$",contains:j}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:j}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(h).concat(j)}}function IP(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))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],h=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],m=["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:m,keyword:f,literal:d,built_in:h},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,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:m}},{className:"punctuation",begin:"->"},l]}}const zP=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_-]*/}}),UP=["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"],BP=["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"],$P=[...UP,...BP],PP=["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(),FP=["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(),qP=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),HP=["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 KP(e){const t=zP(e),n=qP,a=FP,s="@[a-z-]+",l="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+$P.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+HP.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:PP.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function GP(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function QP(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"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],h=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],m=["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"],b=["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=m,E=[...h,...d].filter(B=>!m.includes(B)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},N={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},k={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function T(B){return t.concat(/\b/,t.either(...B.map(j=>j.replace(/\s+/,"\\s+"))),/\b/)}const C={scope:"keyword",match:T(x),relevance:0};function R(B,{exceptions:j,when:$}={}){const q=$;return j=j||[],B.map(ee=>ee.match(/\|\d+$/)||j.includes(ee)?ee:q(ee)?`${ee}|0`:ee)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:R(E,{when:B=>B.length<3}),literal:l,type:f,built_in:b},contains:[{scope:"type",match:T(c)},C,k,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,N]}}function _k(e){return e?typeof e=="string"?e:e.source:null}function rc(e){return xt("(?=",e,")")}function xt(...e){return e.map(n=>_k(n)).join("")}function VP(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Cn(...e){return"("+(VP(e).capture?"":"?:")+e.map(a=>_k(a)).join("|")+")"}const lb=e=>xt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),YP=["Protocol","Type"].map(lb),H1=["init","self"].map(lb),WP=["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"],XP=["assignment","associativity","higherThan","left","lowerThan","none","right"],ZP=["#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=Cn(/[/=\-+!*%<>&|^~?]/,/[\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]/),Tk=Cn(Ck,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),fm=xt(Ck,Tk,"*"),Ak=Cn(/[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]/),Vf=Cn(Ak,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Yi=xt(Ak,Vf,"*"),Sf=xt(/[A-Z]/,Vf,"*"),JP=["attached","autoclosure",xt(/convention\(/,Cn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",xt(/objc\(/,Yi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],e6=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function t6(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,Cn(...YP,...H1)],className:{2:"keyword"}},l={match:xt(/\./,Cn(...um)),relevance:0},c=um.filter(et=>typeof et=="string").concat(["_|0"]),f=um.filter(et=>typeof et!="string").concat(WP).map(lb),d={variants:[{className:"keyword",match:Cn(...f,...H1)}]},h={$pattern:Cn(/\b\w+/,/#\w+/),keyword:c.concat(ZP),literal:K1},m=[s,l,d],b={match:xt(/\./,Cn(...G1)),relevance:0},x={className:"built_in",match:xt(/\b/,Cn(...G1),/(?=\()/)},v=[b,x],E={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:fm},{match:`\\.(\\.|${Tk})+`}]},N=[E,w],k="([0-9]_*)+",T="([0-9a-fA-F]_*)+",C={className:"number",relevance:0,variants:[{match:`\\b(${k})(\\.(${k}))?([eE][+-]?(${k}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${k}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},R=(et="")=>({className:"subst",variants:[{match:xt(/\\/,et,/[0\\tnr"']/)},{match:xt(/\\/,et,/u\{[0-9a-fA-F]{1,8}\}/)}]}),B=(et="")=>({className:"subst",match:xt(/\\/,et,/[\t ]*(?:[\r\n]|\r\n)/)}),j=(et="")=>({className:"subst",label:"interpol",begin:xt(/\\/,et,/\(/),end:/\)/}),$=(et="")=>({begin:xt(et,/"""/),end:xt(/"""/,et),contains:[R(et),B(et),j(et)]}),q=(et="")=>({begin:xt(et,/"/),end:xt(/"/,et),contains:[R(et),j(et)]}),ee={className:"string",variants:[$(),$("#"),$("##"),$("###"),q(),q("#"),q("##"),q("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],Z={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},ie=et=>{const Ai=xt(et,/\//),fi=xt(/\//,et);return{begin:Ai,end:fi,contains:[...L,{scope:"comment",begin:`#(?!.*${fi})`,end:/$/}]}},be={scope:"regexp",variants:[ie("###"),ie("##"),ie("#"),Z]},ue={match:xt(/`/,Yi,/`/)},te={className:"variable",match:/\$\d+/},F={className:"variable",match:`\\$${Vf}+`},oe=[ue,te,F],K={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:e6,contains:[...N,C,ee]}]}},pe={scope:"keyword",match:xt(/@/,Cn(...JP),rc(Cn(/\(/,/\s+/)))},M={scope:"meta",match:xt(/@/,Yi)},D=[K,pe,M],X={match:rc(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:xt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Vf,"+")},{className:"type",match:Sf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:xt(/\s+&\s+/,rc(Sf)),relevance:0}]},O={begin:/</,end:/>/,keywords:h,contains:[...a,...m,...D,E,X]};X.contains.push(O);const ye={match:xt(Yi,/\s*:/),keywords:"_|0",relevance:0},W={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",ye,...a,be,...m,...v,...N,C,ee,...oe,...D,X]},fe={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,X]},G={begin:Cn(rc(xt(Yi,/\s*:/)),rc(xt(Yi,/\s+/,Yi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Yi}]},se={begin:/\(/,end:/\)/,keywords:h,contains:[G,...a,...m,...N,C,ee,...D,X,W],endsParent:!0,illegal:/["']/},de={match:[/(func|macro)/,/\s+/,Cn(ue.match,Yi,fm)],className:{1:"keyword",3:"title.function"},contains:[fe,se,t],illegal:[/\[/,/%/]},Re={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[fe,se,t],illegal:/\[|%/},mt={match:[/operator/,/\s+/,fm],className:{1:"keyword",3:"title"}},vt={begin:[/precedencegroup/,/\s+/,Sf],className:{1:"keyword",3:"title"},contains:[X],keywords:[...XP,...K1],end:/}/},ui={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Vn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Pi={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Yi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[fe,...m,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:Sf},...m],relevance:0}]};for(const et of ee.variants){const Ai=et.contains.find(Fi=>Fi.label==="interpol");Ai.keywords=h;const fi=[...m,...v,...N,C,ee,...oe];Ai.contains=[...fi,{begin:/\(/,end:/\)/,contains:["self",...fi]}]}return{name:"Swift",keywords:h,contains:[...a,de,Re,ui,Vn,Pi,mt,vt,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},be,...m,...v,...N,C,ee,...oe,...D,X,W]}}const Yf="[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"],Lk=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Dk=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Ik=[].concat(Lk,jk,Mk);function n6(e){const t=e.regex,n=(K,{after:pe})=>{const M="</"+K[0].slice(1);return K.input.indexOf(M,pe)!==-1},a=Yf,s={begin:"<>",end:"</>"},l=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(K,pe)=>{const M=K[0].length+K.index,D=K.input[M];if(D==="<"||D===","){pe.ignoreMatch();return}D===">"&&(n(K,{after:M})||pe.ignoreMatch());let X;const O=K.input.substring(M);if(X=O.match(/^\s*=/)){pe.ignoreMatch();return}if((X=O.match(/^\s+extends\s+/))&&X.index===0){pe.ignoreMatch();return}}},f={$pattern:Yf,keyword:Ok,literal:Rk,built_in:Ik,"variable.language":Dk},d="[0-9](_?[0-9])*",h=`\\.(${d})`,m="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",b={className:"number",variants:[{begin:`(\\b(${m})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${m})\\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:f,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"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},T={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]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,N,{match:/\$\d+/},b];x.contains=C.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(C)});const R=[].concat(T,x.contains),B=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(R)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:B},$={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"}}]},q={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]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ie(K){return t.concat("(?!",K.join("|"),")")}const be={match:t.concat(/\b/,ie([...Lk,"super","import"].map(K=>`${K}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:q},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,N,T,{match:/\$\d+/},b,q,{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:[T,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:B}]}]},{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"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},ue,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},be,Z,$,te,{match:/\$[(.]/}]}}function i6(e){const t=e.regex,n=n6(e),a=Yf,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]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Yf,keyword:Ok.concat(d),literal:Rk,built_in:Ik.concat(s),"variable.language":Dk},m={className:"meta",begin:"@"+a},b=(w,N,k)=>{const T=w.contains.findIndex(C=>C.label===N);if(T===-1)throw new Error("can not find mode to replace");w.contains.splice(T,1,k)};Object.assign(n.keywords,h),n.exports.PARAMS_CONTAINS.push(m);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([m,l,c,v]),b(n,"shebang",e.SHEBANG()),b(n,"use_strict",f);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 a6(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)/,f=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(l,s),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(l,s),/ +/,t.either(c,f),/ *#/)}]},h={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},m={className:"label",begin:/^\w+:/},b=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,d,h,m,b,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 r6(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},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},h={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},l,c,s,e.QUOTE_STRING_MODE,d,h,f]}}function s6(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:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin: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,d,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[l,c,d,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(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 l6(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]},f=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},N=[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],k=[...N];return k.pop(),k.push(f),v.contains=k,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:N}}const o6={arduino:q5,bash:H5,c:K5,cpp:G5,csharp:Q5,css:nP,diff:iP,go:aP,graphql:rP,ini:sP,java:lP,javascript:dP,json:hP,kotlin:mP,less:wP,lua:kP,makefile:NP,markdown:_P,objectivec:CP,perl:TP,php:AP,"php-template":OP,plaintext:RP,python:jP,"python-repl":MP,r:LP,ruby:DP,rust:IP,scss:KP,shell:GP,sql:QP,swift:t6,typescript:i6,vbnet:a6,wasm:r6,xml:s6,yaml:l6};var dm,Q1;function c6(){if(Q1)return dm;Q1=1;function e(U){return U instanceof Map?U.clear=U.delete=U.set=function(){throw new Error("map is read-only")}:U instanceof Set&&(U.add=U.clear=U.delete=function(){throw new Error("set is read-only")}),Object.freeze(U),Object.getOwnPropertyNames(U).forEach(re=>{const ve=U[re],ze=typeof ve;(ze==="object"||ze==="function")&&!Object.isFrozen(ve)&&e(ve)}),U}class t{constructor(re){re.data===void 0&&(re.data={}),this.data=re.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(U){return U.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(U,...re){const ve=Object.create(null);for(const ze in U)ve[ze]=U[ze];return re.forEach(function(ze){for(const Ct in ze)ve[Ct]=ze[Ct]}),ve}const s="</span>",l=U=>!!U.scope,c=(U,{prefix:re})=>{if(U.startsWith("language:"))return U.replace("language:","language-");if(U.includes(".")){const ve=U.split(".");return[`${re}${ve.shift()}`,...ve.map((ze,Ct)=>`${ze}${"_".repeat(Ct+1)}`)].join(" ")}return`${re}${U}`};class f{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 d=(U={})=>{const re={children:[]};return Object.assign(re,U),re};class h{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(re){this.top.children.push(re)}openNode(re){const ve=d({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 m 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 f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function b(U){return U?typeof U=="string"?U:U.source:null}function x(U){return w("(?=",U,")")}function v(U){return w("(?:",U,")*")}function E(U){return w("(?:",U,")?")}function w(...U){return U.map(ve=>b(ve)).join("")}function N(U){const re=U[U.length-1];return typeof re=="object"&&re.constructor===Object?(U.splice(U.length-1,1),re):{}}function k(...U){return"("+(N(U).capture?"":"?:")+U.map(ze=>b(ze)).join("|")+")"}function T(U){return new RegExp(U.toString()+"|").exec("").length-1}function C(U,re){const ve=U&&U.exec(re);return ve&&ve.index===0}const R=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function B(U,{joinWith:re}){let ve=0;return U.map(ze=>{ve+=1;const Ct=ve;let Et=b(ze),ke="";for(;Et.length>0;){const Se=R.exec(Et);if(!Se){ke+=Et;break}ke+=Et.substring(0,Se.index),Et=Et.substring(Se.index+Se[0].length),Se[0][0]==="\\"&&Se[1]?ke+="\\"+String(Number(Se[1])+Ct):(ke+=Se[0],Se[0]==="("&&ve++)}return ke}).map(ze=>`(${ze})`).join(re)}const j=/\b\B/,$="[a-zA-Z]\\w*",q="[a-zA-Z_]\\w*",ee="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Z="\\b(0b[01]+)",ie="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",be=(U={})=>{const re=/^#![ ]*\//;return U.binary&&(U.begin=w(re,/.*\b/,U.binary,/\b.*/)),a({scope:"meta",begin:re,end:/$/,relevance:0,"on:begin":(ve,ze)=>{ve.index!==0&&ze.ignoreMatch()}},U)},ue={begin:"\\\\[\\s\\S]",relevance:0},te={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ue]},F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ue]},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/},K=function(U,re,ve={}){const ze=a({scope:"comment",begin:U,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 Ct=k("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return ze.contains.push({begin:w(/[ ]+/,"(",Ct,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ze},pe=K("//","$"),M=K("/\\*","\\*/"),D=K("#","$"),X={scope:"number",begin:ee,relevance:0},O={scope:"number",begin:L,relevance:0},ye={scope:"number",begin:Z,relevance:0},W={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ue,{begin:/\[/,end:/\]/,relevance:0,contains:[ue]}]},fe={scope:"title",begin:$,relevance:0},G={scope:"title",begin:q,relevance:0},se={begin:"\\.\\s*"+q,relevance:0};var Re=Object.freeze({__proto__:null,APOS_STRING_MODE:te,BACKSLASH_ESCAPE:ue,BINARY_NUMBER_MODE:ye,BINARY_NUMBER_RE:Z,COMMENT:K,C_BLOCK_COMMENT_MODE:M,C_LINE_COMMENT_MODE:pe,C_NUMBER_MODE:O,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(U){return Object.assign(U,{"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:$,MATCH_NOTHING_RE:j,METHOD_GUARD:se,NUMBER_MODE:X,NUMBER_RE:ee,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:F,REGEXP_MODE:W,RE_STARTERS_RE:ie,SHEBANG:be,TITLE_MODE:fe,UNDERSCORE_IDENT_RE:q,UNDERSCORE_TITLE_MODE:G});function mt(U,re){U.input[U.index-1]==="."&&re.ignoreMatch()}function vt(U,re){U.className!==void 0&&(U.scope=U.className,delete U.className)}function ui(U,re){re&&U.beginKeywords&&(U.begin="\\b("+U.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",U.__beforeBegin=mt,U.keywords=U.keywords||U.beginKeywords,delete U.beginKeywords,U.relevance===void 0&&(U.relevance=0))}function Vn(U,re){Array.isArray(U.illegal)&&(U.illegal=k(...U.illegal))}function Pi(U,re){if(U.match){if(U.begin||U.end)throw new Error("begin & end are not supported with match");U.begin=U.match,delete U.match}}function et(U,re){U.relevance===void 0&&(U.relevance=1)}const Ai=(U,re)=>{if(!U.beforeMatch)return;if(U.starts)throw new Error("beforeMatch cannot be used with starts");const ve=Object.assign({},U);Object.keys(U).forEach(ze=>{delete U[ze]}),U.keywords=ve.keywords,U.begin=w(ve.beforeMatch,x(ve.begin)),U.starts={relevance:0,contains:[Object.assign(ve,{endsParent:!0})]},U.relevance=0,delete ve.beforeMatch},fi=["of","and","for","in","not","or","if","then","parent","list","value"],Fi="keyword";function aa(U,re,ve=Fi){const ze=Object.create(null);return typeof U=="string"?Ct(ve,U.split(" ")):Array.isArray(U)?Ct(ve,U):Object.keys(U).forEach(function(Et){Object.assign(ze,aa(U[Et],re,Et))}),ze;function Ct(Et,ke){re&&(ke=ke.map(Se=>Se.toLowerCase())),ke.forEach(function(Se){const Ie=Se.split("|");ze[Ie[0]]=[Et,Or(Ie[0],Ie[1])]})}}function Or(U,re){return re?Number(re):to(U)?0:1}function to(U){return fi.includes(U.toLowerCase())}const Ss={},Lt=U=>{console.error(U)},ws=(U,...re)=>{console.log(`WARN: ${U}`,...re)},ne=(U,re)=>{Ss[`${U}/${re}`]||(console.log(`Deprecated as of ${U}. ${re}`),Ss[`${U}/${re}`]=!0)},ge=new Error;function Me(U,re,{key:ve}){let ze=0;const Ct=U[ve],Et={},ke={};for(let Se=1;Se<=re.length;Se++)ke[Se+ze]=Ct[Se],Et[Se+ze]=!0,ze+=T(re[Se-1]);U[ve]=ke,U[ve]._emit=Et,U[ve]._multi=!0}function Ge(U){if(Array.isArray(U.begin)){if(U.skip||U.excludeBegin||U.returnBegin)throw Lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ge;if(typeof U.beginScope!="object"||U.beginScope===null)throw Lt("beginScope must be object"),ge;Me(U,U.begin,{key:"beginScope"}),U.begin=B(U.begin,{joinWith:""})}}function at(U){if(Array.isArray(U.end)){if(U.skip||U.excludeEnd||U.returnEnd)throw Lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ge;if(typeof U.endScope!="object"||U.endScope===null)throw Lt("endScope must be object"),ge;Me(U,U.end,{key:"endScope"}),U.end=B(U.end,{joinWith:""})}}function Sn(U){U.scope&&typeof U.scope=="object"&&U.scope!==null&&(U.beginScope=U.scope,delete U.scope)}function Oi(U){Sn(U),typeof U.beginScope=="string"&&(U.beginScope={_wrap:U.beginScope}),typeof U.endScope=="string"&&(U.endScope={_wrap:U.endScope}),Ge(U),at(U)}function ln(U){function re(ke,Se){return new RegExp(b(ke),"m"+(U.case_insensitive?"i":"")+(U.unicodeRegex?"u":"")+(Se?"g":""))}class ve{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Se,Ie){Ie.position=this.position++,this.matchIndexes[this.matchAt]=Ie,this.regexes.push([Ie,Se]),this.matchAt+=T(Se)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Se=this.regexes.map(Ie=>Ie[1]);this.matcherRe=re(B(Se,{joinWith:"|"}),!0),this.lastIndex=0}exec(Se){this.matcherRe.lastIndex=this.lastIndex;const Ie=this.matcherRe.exec(Se);if(!Ie)return null;const Ht=Ie.findIndex((ra,Ns)=>Ns>0&&ra!==void 0),Ot=this.matchIndexes[Ht];return Ie.splice(0,Ht),Object.assign(Ie,Ot)}}class ze{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Se){if(this.multiRegexes[Se])return this.multiRegexes[Se];const Ie=new ve;return this.rules.slice(Se).forEach(([Ht,Ot])=>Ie.addRule(Ht,Ot)),Ie.compile(),this.multiRegexes[Se]=Ie,Ie}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Se,Ie){this.rules.push([Se,Ie]),Ie.type==="begin"&&this.count++}exec(Se){const Ie=this.getMatcher(this.regexIndex);Ie.lastIndex=this.lastIndex;let Ht=Ie.exec(Se);if(this.resumingScanAtSamePosition()&&!(Ht&&Ht.index===this.lastIndex)){const Ot=this.getMatcher(0);Ot.lastIndex=this.lastIndex+1,Ht=Ot.exec(Se)}return Ht&&(this.regexIndex+=Ht.position+1,this.regexIndex===this.count&&this.considerAll()),Ht}}function Ct(ke){const Se=new ze;return ke.contains.forEach(Ie=>Se.addRule(Ie.begin,{rule:Ie,type:"begin"})),ke.terminatorEnd&&Se.addRule(ke.terminatorEnd,{type:"end"}),ke.illegal&&Se.addRule(ke.illegal,{type:"illegal"}),Se}function Et(ke,Se){const Ie=ke;if(ke.isCompiled)return Ie;[vt,Pi,Oi,Ai].forEach(Ot=>Ot(ke,Se)),U.compilerExtensions.forEach(Ot=>Ot(ke,Se)),ke.__beforeBegin=null,[ui,Vn,et].forEach(Ot=>Ot(ke,Se)),ke.isCompiled=!0;let Ht=null;return typeof ke.keywords=="object"&&ke.keywords.$pattern&&(ke.keywords=Object.assign({},ke.keywords),Ht=ke.keywords.$pattern,delete ke.keywords.$pattern),Ht=Ht||/\w+/,ke.keywords&&(ke.keywords=aa(ke.keywords,U.case_insensitive)),Ie.keywordPatternRe=re(Ht,!0),Se&&(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=b(Ie.end)||"",ke.endsWithParent&&Se.terminatorEnd&&(Ie.terminatorEnd+=(ke.end?"|":"")+Se.terminatorEnd)),ke.illegal&&(Ie.illegalRe=re(ke.illegal)),ke.contains||(ke.contains=[]),ke.contains=[].concat(...ke.contains.map(function(Ot){return hn(Ot==="self"?ke:Ot)})),ke.contains.forEach(function(Ot){Et(Ot,Ie)}),ke.starts&&Et(ke.starts,Se),Ie.matcher=Ct(Ie),Ie}if(U.compilerExtensions||(U.compilerExtensions=[]),U.contains&&U.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return U.classNameAliases=a(U.classNameAliases||{}),Et(U)}function Bt(U){return U?U.endsWithParent||Bt(U.starts):!1}function hn(U){return U.variants&&!U.cachedVariants&&(U.cachedVariants=U.variants.map(function(re){return a(U,{variants:null},re)})),U.cachedVariants?U.cachedVariants:Bt(U)?a(U,{starts:U.starts?a(U.starts):null}):Object.isFrozen(U)?a(U):U}var ut="11.11.1";class qi extends Error{constructor(re,ve){super(re),this.name="HTMLInjectionError",this.html=ve}}const wn=n,Pc=a,Rr=Symbol("nomatch"),ks=7,jr=function(U){const re=Object.create(null),ve=Object.create(null),ze=[];let Ct=!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 Se={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:m};function Ie(he){return Se.noHighlightRe.test(he)}function Ht(he){let Te=he.className+" ";Te+=he.parentNode?he.parentNode.className:"";const Qe=Se.languageDetectRe.exec(Te);if(Qe){const ft=kn(Qe[1]);return ft||(ws(Et.replace("{}",Qe[1])),ws("Falling back to no-highlight mode for this block.",he)),ft?Qe[1]:"no-highlight"}return Te.split(/\s+/).find(ft=>Ie(ft)||kn(ft))}function Ot(he,Te,Qe){let ft="",Gt="";typeof Te=="object"?(ft=he,Qe=Te.ignoreIllegals,Gt=Te.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
|
|
543
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Gt=he,ft=Te),Qe===void 0&&(Qe=!0);const mn={code:ft,language:Gt};Lr("before:highlight",mn);const Yn=mn.result?mn.result:ra(mn.language,mn.code,Qe);return Yn.code=mn.code,Lr("after:highlight",Yn),Yn}function ra(he,Te,Qe,ft){const Gt=Object.create(null);function mn(xe,Ne){return xe.keywords[Ne]}function Yn(){if(!De.keywords){Wt.addText(dt);return}let xe=0;De.keywordPatternRe.lastIndex=0;let Ne=De.keywordPatternRe.exec(dt),Pe="";for(;Ne;){Pe+=dt.substring(xe,Ne.index);const Xe=on.case_insensitive?Ne[0].toLowerCase():Ne[0],Dt=mn(De,Xe);if(Dt){const[di,lo]=Dt;if(Wt.addText(Pe),Pe="",Gt[Xe]=(Gt[Xe]||0)+1,Gt[Xe]<=ks&&(Ua+=lo),di.startsWith("_"))Pe+=Ne[0];else{const Vc=on.classNameAliases[di]||di;Wn(Ne[0],Vc)}}else Pe+=Ne[0];xe=De.keywordPatternRe.lastIndex,Ne=De.keywordPatternRe.exec(dt)}Pe+=dt.substring(xe),Wt.addText(Pe)}function jn(){if(dt==="")return;let xe=null;if(typeof De.subLanguage=="string"){if(!re[De.subLanguage]){Wt.addText(dt);return}xe=ra(De.subLanguage,dt,!0,Qc[De.subLanguage]),Qc[De.subLanguage]=xe._top}else xe=_s(dt,De.subLanguage.length?De.subLanguage:null);De.relevance>0&&(Ua+=xe.relevance),Wt.__addSublanguage(xe._emitter,xe.language)}function Nt(){De.subLanguage!=null?jn():Yn(),dt=""}function Wn(xe,Ne){xe!==""&&(Wt.startScope(Ne),Wt.addText(xe),Wt.endScope())}function Kc(xe,Ne){let Pe=1;const Xe=Ne.length-1;for(;Pe<=Xe;){if(!xe._emit[Pe]){Pe++;continue}const Dt=on.classNameAliases[xe[Pe]]||xe[Pe],di=Ne[Pe];Dt?Wn(di,Dt):(dt=di,Yn(),dt=""),Pe++}}function Ts(xe,Ne){return xe.scope&&typeof xe.scope=="string"&&Wt.openNode(on.classNameAliases[xe.scope]||xe.scope),xe.beginScope&&(xe.beginScope._wrap?(Wn(dt,on.classNameAliases[xe.beginScope._wrap]||xe.beginScope._wrap),dt=""):xe.beginScope._multi&&(Kc(xe.beginScope,Ne),dt="")),De=Object.create(xe,{parent:{value:De}}),De}function ao(xe,Ne,Pe){let Xe=C(xe.endRe,Pe);if(Xe){if(xe["on:end"]){const Dt=new t(xe);xe["on:end"](Ne,Dt),Dt.isMatchIgnored&&(Xe=!1)}if(Xe){for(;xe.endsParent&&xe.parent;)xe=xe.parent;return xe}}if(xe.endsWithParent)return ao(xe.parent,Ne,Pe)}function As(xe){return De.matcher.regexIndex===0?(dt+=xe[0],1):(Ba=!0,0)}function wd(xe){const Ne=xe[0],Pe=xe.rule,Xe=new t(Pe),Dt=[Pe.__beforeBegin,Pe["on:begin"]];for(const di of Dt)if(di&&(di(xe,Xe),Xe.isMatchIgnored))return As(Ne);return Pe.skip?dt+=Ne:(Pe.excludeBegin&&(dt+=Ne),Nt(),!Pe.returnBegin&&!Pe.excludeBegin&&(dt=Ne)),Ts(Pe,xe),Pe.returnBegin?0:Ne.length}function Mn(xe){const Ne=xe[0],Pe=Te.substring(xe.index),Xe=ao(De,xe,Pe);if(!Xe)return Rr;const Dt=De;De.endScope&&De.endScope._wrap?(Nt(),Wn(Ne,De.endScope._wrap)):De.endScope&&De.endScope._multi?(Nt(),Kc(De.endScope,xe)):Dt.skip?dt+=Ne:(Dt.returnEnd||Dt.excludeEnd||(dt+=Ne),Nt(),Dt.excludeEnd&&(dt=Ne));do De.scope&&Wt.closeNode(),!De.skip&&!De.subLanguage&&(Ua+=De.relevance),De=De.parent;while(De!==Xe.parent);return Xe.starts&&Ts(Xe.starts,xe),Dt.returnEnd?0:Ne.length}function ro(){const xe=[];for(let Ne=De;Ne!==on;Ne=Ne.parent)Ne.scope&&xe.unshift(Ne.scope);xe.forEach(Ne=>Wt.openNode(Ne))}let Dr={};function Os(xe,Ne){const Pe=Ne&&Ne[0];if(dt+=xe,Pe==null)return Nt(),0;if(Dr.type==="begin"&&Ne.type==="end"&&Dr.index===Ne.index&&Pe===""){if(dt+=Te.slice(Ne.index,Ne.index+1),!Ct){const Xe=new Error(`0 width match regex (${he})`);throw Xe.languageName=he,Xe.badRule=Dr.rule,Xe}return 1}if(Dr=Ne,Ne.type==="begin")return wd(Ne);if(Ne.type==="illegal"&&!Qe){const Xe=new Error('Illegal lexeme "'+Pe+'" for mode "'+(De.scope||"<unnamed>")+'"');throw Xe.mode=De,Xe}else if(Ne.type==="end"){const Xe=Mn(Ne);if(Xe!==Rr)return Xe}if(Ne.type==="illegal"&&Pe==="")return dt+=`
|
|
544
|
+
`,1;if(so>1e5&&so>Ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return dt+=Pe,Pe.length}const on=kn(he);if(!on)throw Lt(Et.replace("{}",he)),new Error('Unknown language: "'+he+'"');const Gc=ln(on);let Rs="",De=ft||Gc;const Qc={},Wt=new Se.__emitter(Se);ro();let dt="",Ua=0,oa=0,so=0,Ba=!1;try{if(on.__emitTokens)on.__emitTokens(Te,Wt);else{for(De.matcher.considerAll();;){so++,Ba?Ba=!1:De.matcher.considerAll(),De.matcher.lastIndex=oa;const xe=De.matcher.exec(Te);if(!xe)break;const Ne=Te.substring(oa,xe.index),Pe=Os(Ne,xe);oa=xe.index+Pe}Os(Te.substring(oa))}return Wt.finalize(),Rs=Wt.toHTML(),{language:he,value:Rs,relevance:Ua,illegal:!1,_emitter:Wt,_top:De}}catch(xe){if(xe.message&&xe.message.includes("Illegal"))return{language:he,value:wn(Te),illegal:!0,relevance:0,_illegalBy:{message:xe.message,index:oa,context:Te.slice(oa-100,oa+100),mode:xe.mode,resultSoFar:Rs},_emitter:Wt};if(Ct)return{language:he,value:wn(Te),illegal:!1,relevance:0,errorRaised:xe,_emitter:Wt,_top:De};throw xe}}function Ns(he){const Te={value:wn(he),illegal:!1,relevance:0,_top:ke,_emitter:new Se.__emitter(Se)};return Te._emitter.addText(he),Te}function _s(he,Te){Te=Te||Se.languages||Object.keys(re);const Qe=Ns(he),ft=Te.filter(kn).filter(Ia).map(Nt=>ra(Nt,he,!1));ft.unshift(Qe);const Gt=ft.sort((Nt,Wn)=>{if(Nt.relevance!==Wn.relevance)return Wn.relevance-Nt.relevance;if(Nt.language&&Wn.language){if(kn(Nt.language).supersetOf===Wn.language)return 1;if(kn(Wn.language).supersetOf===Nt.language)return-1}return 0}),[mn,Yn]=Gt,jn=mn;return jn.secondBest=Yn,jn}function Hi(he,Te,Qe){const ft=Te&&ve[Te]||Qe;he.classList.add("hljs"),he.classList.add(`language-${ft}`)}function Kt(he){let Te=null;const Qe=Ht(he);if(Ie(Qe))return;if(Lr("before:highlightElement",{el:he,language:Qe}),he.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",he);return}if(he.children.length>0&&(Se.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(he)),Se.throwUnescapedHTML))throw new qi("One of your code blocks includes unescaped HTML.",he.innerHTML);Te=he;const ft=Te.textContent,Gt=Qe?Ot(ft,{language:Qe,ignoreIllegals:!0}):_s(ft);he.innerHTML=Gt.value,he.dataset.highlighted="yes",Hi(he,Qe,Gt.language),he.result={language:Gt.language,re:Gt.relevance,relevance:Gt.relevance},Gt.secondBest&&(he.secondBest={language:Gt.secondBest.language,relevance:Gt.secondBest.relevance}),Lr("after:highlightElement",{el:he,result:Gt,text:ft})}function pn(he){Se=Pc(Se,he)}const Da=()=>{Cs(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function no(){Cs(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Fc=!1;function Cs(){function he(){Cs()}if(document.readyState==="loading"){Fc||window.addEventListener("DOMContentLoaded",he,!1),Fc=!0;return}document.querySelectorAll(Se.cssSelector).forEach(Kt)}function qc(he,Te){let Qe=null;try{Qe=Te(U)}catch(ft){if(Lt("Language definition for '{}' could not be registered.".replace("{}",he)),Ct)Lt(ft);else throw ft;Qe=ke}Qe.name||(Qe.name=he),re[he]=Qe,Qe.rawDefinition=Te.bind(null,U),Qe.aliases&&sa(Qe.aliases,{languageName:he})}function Mr(he){delete re[he];for(const Te of Object.keys(ve))ve[Te]===he&&delete ve[Te]}function io(){return Object.keys(re)}function kn(he){return he=(he||"").toLowerCase(),re[he]||re[ve[he]]}function sa(he,{languageName:Te}){typeof he=="string"&&(he=[he]),he.forEach(Qe=>{ve[Qe.toLowerCase()]=Te})}function Ia(he){const Te=kn(he);return Te&&!Te.disableAutodetect}function za(he){he["before:highlightBlock"]&&!he["before:highlightElement"]&&(he["before:highlightElement"]=Te=>{he["before:highlightBlock"](Object.assign({block:Te.el},Te))}),he["after:highlightBlock"]&&!he["after:highlightElement"]&&(he["after:highlightElement"]=Te=>{he["after:highlightBlock"](Object.assign({block:Te.el},Te))})}function Yt(he){za(he),ze.push(he)}function Hc(he){const Te=ze.indexOf(he);Te!==-1&&ze.splice(Te,1)}function Lr(he,Te){const Qe=he;ze.forEach(function(ft){ft[Qe]&&ft[Qe](Te)})}function la(he){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),Kt(he)}Object.assign(U,{highlight:Ot,highlightAuto:_s,highlightAll:Cs,highlightElement:Kt,highlightBlock:la,configure:pn,initHighlighting:Da,initHighlightingOnLoad:no,registerLanguage:qc,unregisterLanguage:Mr,listLanguages:io,getLanguage:kn,registerAliases:sa,autoDetection:Ia,inherit:Pc,addPlugin:Yt,removePlugin:Hc}),U.debugMode=function(){Ct=!1},U.safeMode=function(){Ct=!0},U.versionString=ut,U.regex={concat:w,lookahead:x,either:k,optional:E,anyNumberOfTimes:v};for(const he in Re)typeof Re[he]=="object"&&e(Re[he]);return Object.assign(U,Re),U},Rn=jr({});return Rn.newInstance=()=>jr({}),dm=Rn,Rn.HighlightJS=Rn,Rn.default=Rn,dm}var u6=c6();const f6=ag(u6),V1={},d6="hljs-";function h6(e){const t=f6.newInstance();return e&&l(e),{highlight:n,highlightAuto:a,listLanguages:s,register:l,registerAlias:c,registered:f};function n(d,h,m){const b=m||V1,x=typeof b.prefix=="string"?b.prefix:d6;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:p6,classPrefix:x});const v=t.highlight(h,{ignoreIllegals:!0,language:d});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(d,h){const b=(h||V1).subset||s();let x=-1,v=0,E;for(;++x<b.length;){const w=b[x];if(!t.getLanguage(w))continue;const N=n(w,d,h);N.data&&N.data.relevance!==void 0&&N.data.relevance>v&&(v=N.data.relevance,E=N)}return E||{type:"root",children:[],data:{language:void 0,relevance:v}}}function s(){return t.listLanguages()}function l(d,h){if(typeof d=="string")t.registerLanguage(d,h);else{let m;for(m in d)Object.hasOwn(d,m)&&t.registerLanguage(m,d[m])}}function c(d,h){if(typeof d=="string")t.registerAliases(typeof h=="string"?h:[...h],{languageName:d});else{let m;for(m in d)if(Object.hasOwn(d,m)){const b=d[m];t.registerAliases(typeof b=="string"?b:[...b],{languageName:m})}}}function f(d){return!!t.getLanguage(d)}}class p6{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,f){return f?c+"_".repeat(f):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 m6={};function ob(e){const t=e||m6,n=t.aliases,a=t.detect||!1,s=t.languages||o6,l=t.plainText,c=t.prefix,f=t.subset;let d="hljs";const h=h6(s);if(n&&h.registerAlias(n),c){const m=c.indexOf("-");d=m===-1?c:c.slice(0,m)}return function(m,b){Sd(m,"element",function(x,v,E){if(x.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const w=g6(x);if(w===!1||!w&&!a||w&&l&&l.includes(w))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(d)||x.properties.className.unshift(d);const N=D5(x,{whitespace:"pre"});let k;try{k=w?h.highlight(w,N,{prefix:c}):h.highlightAuto(N,{prefix:c,subset:f})}catch(T){const C=T;if(w&&/Unknown language/.test(C.message)){b.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[E,x],cause:C,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw C}!w&&k.data&&k.data.language&&x.properties.className.push("language-"+k.data.language),k.children.length>0&&(x.children=k.children)})}}function g6(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 b6({name:e,projects:t,onClose:n,onChange:a}){const{confirm:s,alert:l}=ci(),{data:c,isLoading:f,isError:d,error:h,refetch:m}=ot({queryKey:["skill",e],queryFn:()=>iI(e)});A.useEffect(()=>{const k=T=>{T.key==="Escape"&&n()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[n]);const b=async(k,T)=>{try{await T(),await m(),a()}catch(C){l({title:`${k} failed`,body:C instanceof Error?C.message:String(C)})}},x=k=>b("link",()=>rI(e,k)),v=async k=>{await s({title:`Remove ${e} from ${k}`,body:"The skill link will be removed; this project will no longer load the skill on future runs.",confirm:"Remove",danger:!0})&&await b("unlink",()=>sI(e,k))},E=k=>b("freeze",()=>lI(e,k)),w=async k=>{await s({title:`Unfreeze ${e} @ ${k}`,body:"Local edits to this skill will be overwritten; it returns to the latest shared version.",confirm:"Unfreeze",danger:!0})&&await b("unfreeze",()=>oI(e,k))},N=new Map(((c==null?void 0:c.linkedProjects)??[]).map(k=>[k.project,k.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}),c&&p.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[c.category," · ",c.origin||"local"]})]}),p.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"Close",type:"button",children:p.jsx(_i,{size:16,strokeWidth:3})})]}),f&&p.jsx("p",{children:"Loading…"}),d&&p.jsxs("p",{className:"text-[var(--color-crashed)]",children:["Load failed: ",h instanceof Error?h.message:String(h)]}),c&&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:"Project link status"}),p.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(k=>{const T=N.get(k);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:k}),T==="linked"&&p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),T==="frozen"&&p.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!T&&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:[!T&&p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(k),type:"button",children:[p.jsx(jA,{size:11})," link"]}),T==="linked"&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>E(k),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:()=>v(k),type:"button",children:"unlink"})]}),T==="frozen"&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>w(k),type:"button",children:[p.jsx(fA,{size:11})," unfreeze"]}),p.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(k),type:"button",children:"unlink"})]})]})]},k)}),t.length===0&&p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"No projects yet. Create one first."})]})]}),p.jsxs("div",{children:[p.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"SKILL.md 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:c.body?p.jsx(tb,{remarkPlugins:[rb],rehypePlugins:[ob],children:c.body}):p.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),c.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:c.references.map(k=>p.jsx(y6,{skillName:e,file:k.name,lines:k.lines},k.name))})]})]})]})})}function y6({skillName:e,file:t,lines:n}){const[a,s]=A.useState(!1),{data:l,isLoading:c,isError:f,error:d}=ot({queryKey:["skill-ref",e,t],queryFn:()=>aI(e,t),enabled:a,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:()=>s(h=>!h),"aria-label":`${a?"Collapse":"Expand"} ${t}`,"aria-expanded":a,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(td,{size:12,strokeWidth:3,className:["transition-transform",a?"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"]})]}),a&&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:[c&&p.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"加载中…"}),f&&p.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["Load failed: ",d instanceof Error?d.message:String(d)]}),l&&p.jsx("div",{className:"prose-chat text-sm",children:p.jsx(tb,{remarkPlugins:[rb],rehypePlugins:[ob],children:l.content})})]})]})}const x6=[{value:"all",label:"All"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],v6={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function E6(){var x;const[e,t]=A.useState("all"),[n,a]=A.useState(""),[s,l]=A.useState(null),c=Gn(),{data:f,isLoading:d}=ot({queryKey:["skills"],queryFn:()=>zg()}),h=ot({queryKey:["projects"],queryFn:Cr}),m=A.useMemo(()=>((f==null?void 0:f.data)??[]).filter(E=>!(e!=="all"&&E.category!==e||n&&!E.name.toLowerCase().includes(n.toLowerCase()))),[f,e,n]),b=A.useMemo(()=>{const v=(f==null?void 0:f.data)??[],E={all:v.length};for(const w of v)E[w.category]=(E[w.category]??0)+1;return E},[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:"Skills 🎯"}),p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:d?"Loading…":`${(f==null?void 0:f.data.length)??0} user-level skills`})]}),p.jsx("div",{className:"flex gap-3 items-center",children:p.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await cI(),c.invalidateQueries({queryKey:["skills"]})},type:"button",children:[p.jsx(zl,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),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(Df,{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:"Search skill…",value:n,onChange:v=>a(v.target.value),"aria-label":"Search skill"})]}),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:x6.map(v=>p.jsxs("button",{type:"button",onClick:()=>t(v.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",e===v.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[v.label," ",b[v.value]]},v.value))})]}),p.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:m.map(v=>{var E;return p.jsx(S6,{skill:v,projectCount:((E=h.data)==null?void 0:E.data.length)??0,onOpen:()=>l(v.name)},v.name)})}),s&&p.jsx(b6,{name:s,projects:((x=h.data)==null?void 0:x.data.map(v=>v.name))??[],onClose:()=>l(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function S6({skill:e,projectCount:t,onOpen:n}){const a=v6[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 w6(){var s;const e=ot({queryKey:["system-info"],queryFn:cS}),t=ot({queryKey:["system-env"],queryFn:rL}),[n,a]=A.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:"System ⚙️"})}),p.jsx(k6,{current:(s=e.data)==null?void 0:s.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:"Runtime"}),e.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:e.data.nodeVersion}),p.jsx("dt",{className:"font-bold",children:"Platform"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.platform}),p.jsx("dt",{className:"font-bold",children:"PID"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.pid??"—"}),p.jsx("dt",{className:"font-bold",children:"Uptime"}),p.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:T6(e.data.uptimeMs)})]}):p.jsx("p",{className:"text-[var(--color-text-muted)]",children:"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:["Global config ",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"})]}),n?p.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:"⚠ Editing"}):p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a(!0),type:"button","aria-label":"Edit env file",children:[p.jsx(xg,{size:12,strokeWidth:2.5})," Edit"]})]}),n?p.jsx(N6,{onClose:()=>{a(!1),t.refetch()}}):t.data&&t.data.exists?p.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:t.data.entries.map(l=>p.jsxs("div",{className:"contents",children:[p.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[l.masked&&p.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),l.key]}),p.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:l.value})]},l.key))}):p.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:['env file does not exist. Click "Edit" or run in your terminal: ',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(_6,{})]})}function k6({current:e}){var E;const{confirm:t,alert:n}=ci(),[a,s]=A.useState(!1),[l,c]=A.useState(null),f=ot({queryKey:["latest-version"],queryFn:oL,enabled:!1}),[d,h]=A.useState(null),[m,b]=A.useState("npm i -g @coralai/sps-cli@latest"),x=async()=>{var N;if(await t({title:"Upgrade sps-cli",body:`Current ${e} → ${(N=f.data)==null?void 0:N.latest}. All pipelines must be stopped. Restart sps console after upgrade.`,confirm:"Upgrade"})){s(!0),c(null),h(null);try{const k=await cL();if(c(k.output),h(k.installedVersion),b(k.command),k.ok)n({title:"Upgrade complete",body:`Installed v${k.installedVersion}. Run \`pkill -f "sps console"\` and restart to apply.`});else{const T=k.installedVersion&&k.installedVersion===e?`npm finished but the version did not change (still ${k.installedVersion}) — likely permissions or registry issue. Copy the command below to run manually.`:"npm did not install a new version. Copy the command to run manually, or check the log below.";n({title:"Upgrade had no effect",body:T})}}catch(k){c(k.message),n({title:"Upgrade failed",body:k.message})}finally{s(!1)}}},v=async()=>{const w=f.data&&!f.data.upToDate?`npm i -g @coralai/sps-cli@${f.data.latest}`:m;try{await navigator.clipboard.writeText(w),n({title:"Command copied",body:`Paste it into your terminal to run:
|
|
545
|
+
${w}`})}catch{n({title:"Copy failed",body:`Copy manually:
|
|
546
|
+
${w}`})}};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:"Version"}),p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f.refetch(),disabled:f.isFetching||!e,type:"button","aria-label":"Check latest version",children:[f.isFetching?p.jsx(zt,{size:12,strokeWidth:3,className:"animate-spin"}):p.jsx(zl,{size:12,strokeWidth:2.5}),"Check for updates"]})]}),p.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[p.jsx("dt",{className:"font-bold",children:"sps-cli (current)"}),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:"npm (latest)"}),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:"Latest"}):p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:x,disabled:a,type:"button","aria-label":"Upgrade to latest",children:[a?p.jsx(zt,{size:11,strokeWidth:3,className:"animate-spin"}):p.jsx(GE,{size:11,strokeWidth:2.5}),"Upgrade"]}),p.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:v,type:"button","aria-label":"Copy upgrade command",title:"Run manually if auto-upgrade fails",children:[p.jsx(aA,{size:11,strokeWidth:2.5})," Copy command"]})]})]})]}),d&&p.jsxs(p.Fragment,{children:[p.jsx("dt",{className:"font-bold",children:"Installed"}),p.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[d,d===((E=f.data)==null?void 0:E.latest)?p.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"Active (visible after console restart)"}):d===e?p.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"Upgrade did not take effect"}):null]})]}),f.isError&&p.jsxs(p.Fragment,{children:[p.jsx("dt",{className:"font-bold",children:"Check"}),p.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),l&&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:l})]})}function N6({onClose:e}){const t=Gn(),{alert:n}=ci(),a=ot({queryKey:["system-env-raw"],queryFn:sL}),[s,l]=A.useState(null),[c,f]=A.useState(null);A.useEffect(()=>{a.data&&s===null&&(l(a.data.content),f(a.data.etag))},[a.data,s]);const d=s!==null&&a.data&&s!==a.data.content,h=Kn({mutationFn:()=>{if(s===null)throw new Error("no draft");return lL(s,c??"")},onSuccess:()=>{t.invalidateQueries({queryKey:["system-env"]}),t.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:m=>{const b=m.status;n({title:b===409?"env was modified elsewhere":"Save failed",body:b===409?"Click cancel and reopen the editor.":m instanceof Error?m.message:String(m)})}});return a.isLoading?p.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading…"}):p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:"⚠ File contains plaintext credentials. 0600 permissions preserved on save."}),p.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:s??"",onChange:m=>l(m.target.value),spellCheck:!1,"aria-label":"env file editor"}),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:[c?`etag: ${c}`:"",d?" · ● unsaved":""]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:h.isPending,type:"button",children:[p.jsx(_i,{size:12,strokeWidth:3})," Cancel"]}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>h.mutate(),disabled:!d||h.isPending,type:"button","aria-label":"Save env",children:[h.isPending?p.jsx(zt,{size:12,strokeWidth:3,className:"animate-spin"}):p.jsx(nd,{size:12,strokeWidth:3}),"Save"]})]})]})]})}function _6(){var b;const{alert:e}=ci(),t=ot({queryKey:["projects"],queryFn:Cr}),[n,a]=A.useState({}),[s,l]=A.useState({}),[c,f]=A.useState({}),d=(((b=t.data)==null?void 0:b.data)??[]).map(x=>({project:x.name})),h=async(x,v)=>{l(E=>({...E,[x]:v?"fix":"check"}));try{const E=await uL(x,v);a(w=>({...w,[x]:E})),f(w=>({...w,[x]:!0}))}catch(E){e({title:`doctor ${v?"fix":"check"} failed`,body:E instanceof Error?E.message:String(E)})}finally{l(E=>({...E,[x]:null}))}},m=async()=>{for(const x of d)await h(x.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:"Project health check"}),p.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{m()},disabled:d.length===0||Object.values(s).some(Boolean),type:"button",children:[p.jsx(zl,{size:12,strokeWidth:2.5}),"Check all"]})]}),d.length===0?p.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:"No projects yet."}):p.jsx("ul",{className:"flex flex-col gap-2",children:d.map(x=>{const v=n[x.project],E=s[x.project],w=v?v.checks.filter(C=>C.status==="fail").length:0,N=v?v.checks.filter(C=>C.status==="warn").length:0,k=c[x.project]??!1,T=v!=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(C=>({...C,[x.project]:!k})),disabled:!T,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":k?"Collapse":"Expand",children:[T&&v.ok?p.jsx(Lm,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):T?p.jsx(gc,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):p.jsx(Lm,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),T&&(k?p.jsx(jc,{size:12}):p.jsx(td,{size:12})),p.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:x.project}),T?v.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:[w," fail · ",N," warn"]}):p.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:'Click "Check" to run sps doctor'})]}),p.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{h(x.project,!1)},disabled:!!E,type:"button","aria-label":"Check",children:[E==="check"?p.jsx(zt,{size:11,strokeWidth:3,className:"animate-spin"}):p.jsx(zl,{size:11,strokeWidth:2.5}),"Check"]}),p.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{h(x.project,!0)},disabled:!!E||T&&v.ok,type:"button","aria-label":"Auto-fix",title:T&&v.ok?"Nothing to fix":"Runs sps doctor <proj> --fix: auto-creates .claude/hooks/stop.sh, state.json, etc.",children:[E==="fix"?p.jsx(zt,{size:11,strokeWidth:3,className:"animate-spin"}):p.jsx(nS,{size:11,strokeWidth:2.5}),"Fix"]})]}),k&&T&&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:v.checks.map((C,R)=>p.jsx(C6,{check:C},`${C.name}-${R}`))}),v.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:"Fixed"}),p.jsx("ul",{className:"text-xs list-disc pl-4",children:v.fixes.map((C,R)=>p.jsx("li",{children:C},R))})]})]})]},x.project)})})]})}function C6({check:e}){const t=e.status==="pass"?p.jsx(Lm,{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 T6(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 A6(){return qt("/api/chat/sessions")}function O6(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 R6(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function j6(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 M6(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 L6(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return qt(`/api/chat/sessions/${e}/messages${n}`)}function Y1(){var oe,K,pe,M,D,X,O,ye;const{t:e}=ps("chat"),{sessionId:t}=jE(),n=_r(),a=Gn(),{confirm:s,alert:l}=ci(),c=ot({queryKey:["chat-sessions"],queryFn:A6}),f=ot({queryKey:["chat-session",t],queryFn:()=>O6(t??""),enabled:!!t}),[d,h]=A.useState(null),[m,b]=A.useState(""),[x,v]=A.useState(!1),E=A.useRef(null),[w,N]=A.useState(!1),[k,T]=A.useState([]),[C,R]=A.useState(!1),[B,j]=A.useState(!1),[$,q]=A.useState(!1),[ee,L]=A.useState(null);A.useEffect(()=>{if(!t)return;const W=new EventSource(`/stream/chat/${encodeURIComponent(t)}`);let fe=!0;return W.addEventListener("open",()=>{if(fe){fe=!1;return}const G=a.getQueryData(["chat-session",t]),se=G!=null&&G.messages.length?G.messages[G.messages.length-1].ts:void 0;L6(t,se).then(de=>{de.data.length!==0&&a.setQueryData(["chat-session",t],Re=>{if(!Re)return Re;const mt=new Set(Re.messages.map(ui=>ui.id)),vt=de.data.filter(ui=>!mt.has(ui.id));return vt.length===0?Re:{...Re,messages:[...Re.messages,...vt],lastMessageAt:vt[vt.length-1].ts,messageCount:Re.messageCount+vt.length}})}).catch(()=>{})}),W.addEventListener("chat.message",G=>{try{const se=JSON.parse(G.data);a.setQueryData(["chat-session",t],de=>{if(!de||de.messages.some(vt=>vt.id===se.message.id))return de;const mt=de.messages.findIndex(vt=>vt.role==="user"&&vt.id.startsWith("optim-")&&vt.content===se.message.content);if(mt>=0){const vt=[...de.messages];return vt[mt]=se.message,{...de,messages:vt}}return{...de,messages:[...de.messages,se.message]}})}catch{}}),W.addEventListener("chat.message.pending",G=>{try{const se=JSON.parse(G.data);h({id:se.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),W.addEventListener("chat.message.chunk.text",G=>{try{const se=JSON.parse(G.data);h(de=>{if(!de||de.id!==se.assistantId)return de;const Re=[...de.blocks],mt=Re[Re.length-1];return mt&&mt.type==="text"?Re[Re.length-1]={...mt,target:mt.target+se.text}:Re.push({type:"text",target:se.text,displayed:""}),{...de,blocks:Re}})}catch{}}),W.addEventListener("chat.message.chunk.tool_use",G=>{try{const se=JSON.parse(G.data);h(de=>!de||de.id!==se.assistantId?de:{...de,blocks:[...de.blocks,{type:"tool_use",id:se.id,title:se.title,kind:se.kind,status:se.status}]})}catch{}}),W.addEventListener("chat.message.chunk.tool_update",G=>{try{const se=JSON.parse(G.data);h(de=>!de||de.id!==se.assistantId?de:{...de,blocks:de.blocks.map(Re=>Re.type==="tool_use"&&Re.id===se.id?{...Re,status:se.status}:Re)})}catch{}}),W.addEventListener("chat.message.complete",G=>{try{const se=JSON.parse(G.data);h(de=>de&&de.id===se.assistantId?{...de,done:!0,finalMessage:se.message}:de)}catch{}}),()=>W.close()},[t,a]),A.useEffect(()=>{if(!d)return;const W=d.blocks.reduce((G,se)=>se.type==="text"?G+(se.target.length-se.displayed.length):G,0);if(W<=0){if(d.done&&d.finalMessage){const G=d.finalMessage;a.setQueryData(["chat-session",t],se=>!se||se.messages.some(de=>de.id===G.id)?se:{...se,messages:[...se.messages,G],lastMessageAt:G.ts,messageCount:se.messageCount+1}),a.invalidateQueries({queryKey:["chat-sessions"]}),h(null),v(!1)}return}const fe=setTimeout(()=>{h(G=>{if(!G)return G;let se=Math.max(1,Math.ceil(W/40));const de=G.blocks.map(Re=>{if(Re.type!=="text"||se<=0)return Re;const mt=Re.target.length-Re.displayed.length;if(mt<=0)return Re;const vt=Math.min(mt,se);return se-=vt,{...Re,displayed:Re.target.slice(0,Re.displayed.length+vt)}});return{...G,blocks:de}})},25);return()=>clearTimeout(fe)},[d,a,t]),A.useEffect(()=>{const W=E.current;W&&(W.scrollTop=W.scrollHeight)},[f.data,d]);const Z=A.useCallback(async(W={})=>{var fe,G;try{const se=await hm({cwd:((fe=W.cwd)==null?void 0:fe.trim())||void 0,title:((G=W.title)==null?void 0:G.trim())||void 0});a.invalidateQueries({queryKey:["chat-sessions"]}),n(`/chat/${se.id}`),N(!1)}catch(se){l({title:e("session.createFailed"),body:se instanceof Error?se.message:String(se)})}},[a,n,l]),ie=A.useCallback(async()=>{const W=m.trim();if(!W&&k.length===0||x)return;let fe=t;if(!fe){const de=await hm();a.invalidateQueries({queryKey:["chat-sessions"]}),fe=de.id,n(`/chat/${fe}`,{replace:!0})}const G=k.map(de=>de.path),se={id:`optim-${Date.now()}`,role:"user",content:W||"(attachment)",ts:new Date().toISOString(),status:"complete",attachments:G.length>0?G:void 0};a.setQueryData(["chat-session",fe],de=>de?{...de,messages:[...de.messages,se],lastMessageAt:se.ts,messageCount:de.messageCount+1}:{id:fe,createdAt:se.ts,lastMessageAt:se.ts,title:W.slice(0,60)||"Attachment",project:null,messageCount:1,messages:[se]}),b(""),T([]),v(!0);try{await j6(fe,W||"(see attachments)",G.length>0?G:void 0)}catch(de){v(!1),console.error("sendMessage failed",de),l({title:"Send failed",body:de instanceof Error?de.message:String(de)})}},[m,k,x,t,a,n,l]),be=A.useCallback(async W=>{if(W.size>uS){l({title:"File too large",body:`Per-file limit is 50 MB; current ${(W.size/1024/1024).toFixed(2)} MB (${W.name})`});return}let fe=t;if(!fe){const G=await hm();a.invalidateQueries({queryKey:["chat-sessions"]}),fe=G.id,n(`/chat/${fe}`,{replace:!0})}R(!0);try{const G=await LL(fe,W);T(se=>[...se,{path:G.path,name:G.name}])}catch(G){l({title:"Attachment upload failed",body:G instanceof Error?G.message:String(G)})}finally{R(!1)}},[t,a,n,l]),ue=A.useCallback(W=>{T(fe=>fe.filter(G=>G.path!==W))},[]),te=A.useCallback(async W=>{await s({title:"Delete session",body:"The session will be permanently deleted and cannot be recovered.",confirm:"Delete",danger:!0})&&(await R6(W),a.invalidateQueries({queryKey:["chat-sessions"]}),t===W&&n("/chat"))},[a,t,n,s]),F=A.useCallback(async()=>{if(t)try{await M6(t)}catch(W){l({title:"Cancel failed",body:W instanceof Error?W.message:String(W)})}},[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:()=>N(!0),type:"button",children:[p.jsx(Bi,{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:["History ",((oe=c.data)==null?void 0:oe.data.length)??0]}),p.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((K=c.data)==null?void 0:K.data)??[]).map(W=>p.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",t===W.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":`Open session ${W.title}${W.cwd?` (cwd: ${W.cwd})`:""}`,onClick:()=>n(`/chat/${W.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:W.title}),p.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[W.messageCount," msg · ",Bk(W.lastMessageAt??W.createdAt)]}),W.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:W.cwd,children:[p.jsx(yc,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),p.jsx("span",{className:"truncate",dir:"rtl",children:W.cwd})]})]})]}),p.jsx("button",{type:"button","aria-label":"Delete session",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:fe=>{fe.stopPropagation(),te(W.id)},children:p.jsx(Kl,{size:12})})]},W.id)),(((pe=c.data)==null?void 0:pe.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:((M=f.data)==null?void 0:M.title)??"New chat"}),p.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:t}),((D=f.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:f.data.cwd,children:[p.jsx(yc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),p.jsx("span",{className:"truncate",children:f.data.cwd})]})]}),p.jsxs("div",{ref:E,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((X=f.data)==null?void 0:X.messages)??[]).map(W=>p.jsx(z6,{msg:W,sessionId:t??null,onPreviewAttachment:fe=>L(fe)},W.id)),d&&p.jsx(B6,{pending:d}),!f.isLoading&&(((O=f.data)==null?void 0:O.messages)??[]).length===0&&!d&&!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",$?"bg-[var(--color-accent-mint)]":""].join(" "),onDragOver:W=>{W.dataTransfer.types.includes("Files")&&(W.preventDefault(),W.dataTransfer.dropEffect="copy",$||q(!0))},onDragLeave:()=>q(!1),onDrop:W=>{if(!W.dataTransfer.types.includes("Files"))return;W.preventDefault(),q(!1);const fe=Array.from(W.dataTransfer.files??[]);for(const G of fe)be(G)},children:[(k.length>0||C)&&p.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[k.map(W=>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:()=>L(W.path),title:`${W.name}
|
|
547
|
+
${W.path}
|
|
548
|
+
Click to preview`,children:[Wf(W.path)?p.jsx(_A,{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:W.name}),p.jsx("span",{role:"button","aria-label":`Remove ${W.name}`,className:"ml-1 hover:text-[var(--color-crashed)] cursor-pointer",onClick:fe=>{fe.stopPropagation(),ue(W.path)},children:p.jsx(_i,{size:11,strokeWidth:3})})]},W.path)),C&&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(zt,{size:11,strokeWidth:2.5,className:"animate-spin"}),"Uploading…"]})]}),p.jsxs("div",{className:"flex gap-2 items-end",children:[p.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>j(!0),disabled:x,"aria-label":"Attach local file",title:"Attach local file (or drop / paste an image)",children:p.jsx(UA,{size:14,strokeWidth:2.5})}),p.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:$?"Release to attach…":"Say something… (Enter to send · Shift+Enter newline · drop or paste files)",rows:2,value:m,onChange:W=>b(W.target.value),onKeyDown:W=>{W.key==="Enter"&&!W.shiftKey&&!W.nativeEvent.isComposing&&(W.preventDefault(),ie())},onPaste:W=>{const G=Array.from(W.clipboardData.items??[]).filter(se=>se.kind==="file"&&se.type.startsWith("image/"));if(G.length!==0){W.preventDefault();for(const se of G){const de=se.getAsFile();de&&be(de)}}},"aria-label":"Message input"}),d?p.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:F,type:"button","aria-label":"Cancel streaming",children:[p.jsx(ZE,{size:14,strokeWidth:3}),e("input.stop")]}):p.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:ie,disabled:!m.trim()&&k.length===0||x,type:"button","aria-label":"Send",children:[x?p.jsx(zt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(WA,{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:"Chat 💬"}),p.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:'Click "New chat" above to start a session, or just type below to auto-create one.'}),p.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:"Enter to send · Shift+Enter for newline · streaming output"})]})})}),w&&p.jsx(I6,{onCancel:()=>N(!1),onCreate:W=>Z(W)}),B&&p.jsx(Eg,{mode:"file",title:"Select attachment",initialPath:((ye=f.data)==null?void 0:ye.cwd)??void 0,onCancel:()=>j(!1),onSelect:W=>{T(fe=>{if(fe.some(se=>se.path===W))return fe;const G=W.split(/[\\/]/).pop()||W;return[...fe,{path:W,name:G}]}),j(!1)}}),ee&&t&&p.jsx(D6,{sessionId:t,path:ee,onClose:()=>L(null)})]})}function Wf(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 D6({sessionId:e,path:t,onClose:n}){const[a,s]=A.useState(null),[l,c]=A.useState(null);A.useEffect(()=>{const h=m=>{m.key==="Escape"&&(m.preventDefault(),n())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[n]),A.useEffect(()=>{if(!pm(t))return;let h=!1;return fetch(zm(e,t)).then(async m=>{if(!m.ok)throw new Error(`${m.status}`);return m.text()}).then(m=>{h||s(m.length>2e5?m.slice(0,2e5)+`
|
|
549
|
+
|
|
550
|
+
…(truncated)`:m)}).catch(m=>{h||c(m instanceof Error?m.message:String(m))}),()=>{h=!0}},[e,t]);const f=zm(e,t),d=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 ${d}`,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(lA,{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:d})]}),p.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded flex-shrink-0",onClick:n,"aria-label":"Close",children:p.jsx(_i,{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:[Wf(t)&&p.jsx("div",{className:"flex items-center justify-center p-4",children:p.jsx("img",{src:f,alt:`Preview: ${d}`,className:"max-w-full max-h-[60vh] object-contain"})}),W1(t)&&p.jsx("iframe",{src:f,title:`PDF: ${d}`,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:l?p.jsxs("span",{className:"text-[var(--color-crashed)]",children:["Failed to read: ",l]}):a===null?p.jsx("span",{className:"text-[var(--color-text-muted)]",children:"Loading…"}):a}),!Wf(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:"This file type cannot be previewed inline."}),p.jsx("a",{href:f,download:d,className:"nb-btn nb-btn-primary inline-flex",children:"Download"})]})]})]})})}function I6({onCancel:e,onCreate:t}){const{t:n}=ps("chat"),{t:a}=ps("common"),[s,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(!1),[m,b]=A.useState(!1);A.useEffect(()=>{if(m)return;const v=E=>{E.key==="Escape"&&(E.preventDefault(),e())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e,m]);const x=async()=>{if(!d){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":"New chat",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:"New chat"}),p.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":"Close",children:p.jsx(_i,{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:"Title (optional)"}),p.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:"Leave blank to auto-generate from first message",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:"Working directory (optional)"}),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:"/home/coral/projects/my-app",value:c,onChange:v=>f(v.target.value)}),p.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>b(!0),"aria-label":"Browse for directory",title:"Browse for directory",children:[p.jsx(QE,{size:14,strokeWidth:2.5}),"Browse"]})]}),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"}),"Agent will read and write files in this directory. Absolute path required, must exist. Leave blank to use the daemon's startup directory."]})]}),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:d,children:[d?p.jsx(zt,{size:14,strokeWidth:3,className:"animate-spin"}):p.jsx(Bi,{size:14,strokeWidth:3}),a("actions.create")]})]})]})]}),m&&p.jsx(Eg,{initialPath:c.trim()||void 0,onCancel:()=>b(!1),onSelect:v=>{f(v),b(!1)}})]})}function z6({msg:e,sessionId:t,onPreviewAttachment:n}){const a=e.role==="user",s=e.role==="error",l=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}],c=e.attachments??[];return p.jsx("div",{className:a?"self-end max-w-3xl":"self-start max-w-3xl",children:p.jsxs("div",{className:["nb-card",a?"bg-[var(--color-secondary)]":s?"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?"You":s?"Error":"assistant",p.jsx("span",{className:"font-normal",children:"·"}),p.jsx("span",{className:"font-normal",children:Bk(e.ts)})]}),p.jsx("div",{className:"flex flex-col gap-2",children:l.map((f,d)=>p.jsx($6,{block:f},d))}),c.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:c.map(f=>p.jsx(U6,{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:"⚠ Output exceeds 10MB, truncated"})]})})}function U6({sessionId:e,path:t,onPreview:n}){const a=t.split(/[\\/]/).pop()??t;return Wf(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}
|
|
551
|
+
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}
|
|
552
|
+
${t}
|
|
553
|
+
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 B6({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(zt,{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(Uk,{tool:n},a)})]})]})})}function $6({block:e}){return e.type==="text"?p.jsx(zk,{text:e.text}):p.jsx(Uk,{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 Uk({tool:e}){const[t,n]=A.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(td,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),p.jsx(nS,{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(zt,{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(eA,{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 Bk(e){if(!e)return"";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"just now":n<36e5?`${Math.floor(n/6e4)}m`:n<864e5?`${Math.floor(n/36e5)}h`:t.toLocaleDateString()}function P6(){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:"404 · Page not found"}),p.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:"Could not find this page. The link may have expired."}),p.jsx(bs,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:"Back to home"})]})}function F6(){return p.jsx(CL,{children:p.jsx(U2,{children:p.jsxs($n,{element:p.jsx(NL,{}),children:[p.jsx($n,{index:!0,element:p.jsx(D2,{to:"/projects",replace:!0})}),p.jsx($n,{path:"/projects",element:p.jsx(TL,{})}),p.jsx($n,{path:"/projects/new",element:p.jsx(BL,{})}),p.jsx($n,{path:"/projects/:name",element:p.jsx(ZD,{})}),p.jsx($n,{path:"/board",element:p.jsx(UI,{})}),p.jsx($n,{path:"/workers",element:p.jsx(JI,{})}),p.jsx($n,{path:"/logs",element:p.jsx(a3,{})}),p.jsx($n,{path:"/skills",element:p.jsx(E6,{})}),p.jsx($n,{path:"/system",element:p.jsx(w6,{})}),p.jsx($n,{path:"/chat",element:p.jsx(Y1,{})}),p.jsx($n,{path:"/chat/:sessionId",element:p.jsx(Y1,{})}),p.jsx($n,{path:"*",element:p.jsx(P6,{})})]})})})}_L();const q6=new NC({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),$k=document.getElementById("root");if(!$k)throw new Error("#root not found");eC.createRoot($k).render(p.jsx(A.StrictMode,{children:p.jsx(_C,{client:q6,children:p.jsx(cT,{children:p.jsx(IL,{children:p.jsx(F6,{})})})})}));
|