@prsm/devtools 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,176 @@
1
+ var lf=Object.defineProperty;var af=Object.getPrototypeOf;var cf=Reflect.get;var zi=e=>{throw TypeError(e)};var uf=(e,t,n)=>t in e?lf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var P=(e,t,n)=>uf(e,typeof t!="symbol"?t+"":t,n),Yr=(e,t,n)=>t.has(e)||zi("Cannot "+n);var Je=(e,t,n)=>(Yr(e,t,"read from private field"),n?n.call(e):t.get(e)),gn=(e,t,n)=>t.has(e)?zi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),bt=(e,t,n,s)=>(Yr(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),Qr=(e,t,n)=>(Yr(e,t,"access private method"),n);var Ki=(e,t,n)=>cf(af(e),n,t);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/**
2
+ * @vue/shared v3.5.30
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function ai(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ae={},Bn=[],Lt=()=>{},Ta=()=>!1,Ir=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ci=e=>e.startsWith("onUpdate:"),He=Object.assign,ui=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ff=Object.prototype.hasOwnProperty,ke=(e,t)=>ff.call(e,t),re=Array.isArray,Fn=e=>Os(e)==="[object Map]",Nr=e=>Os(e)==="[object Set]",Xi=e=>Os(e)==="[object Date]",ce=e=>typeof e=="function",Le=e=>typeof e=="string",Dt=e=>typeof e=="symbol",Se=e=>e!==null&&typeof e=="object",Oa=e=>(Se(e)||ce(e))&&ce(e.then)&&ce(e.catch),Ma=Object.prototype.toString,Os=e=>Ma.call(e),df=e=>Os(e).slice(8,-1),La=e=>Os(e)==="[object Object]",fi=e=>Le(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ds=ai(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Pr=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},hf=/-\w/g,tt=Pr(e=>e.replace(hf,t=>t.slice(1).toUpperCase())),pf=/\B([A-Z])/g,In=Pr(e=>e.replace(pf,"-$1").toLowerCase()),Tr=Pr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Zr=Pr(e=>e?`on${Tr(e)}`:""),Mt=(e,t)=>!Object.is(e,t),Qs=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Da=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Or=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ji;const Mr=()=>Ji||(Ji=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Yt(e){if(re(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Le(s)?vf(s):Yt(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(Le(e)||Se(e))return e}const gf=/;(?![^(]*\))/g,mf=/:([^]+)/,yf=/\/\*[^]*?\*\//g;function vf(e){const t={};return e.replace(yf,"").split(gf).forEach(n=>{if(n){const s=n.split(mf);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function _e(e){let t="";if(Le(e))t=e;else if(re(e))for(let n=0;n<e.length;n++){const s=_e(e[n]);s&&(t+=s+" ")}else if(Se(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const _f="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",bf=ai(_f);function ja(e){return!!e||e===""}function wf(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Ms(e[s],t[s]);return n}function Ms(e,t){if(e===t)return!0;let n=Xi(e),s=Xi(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Dt(e),s=Dt(t),n||s)return e===t;if(n=re(e),s=re(t),n||s)return n&&s?wf(e,t):!1;if(n=Se(e),s=Se(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const i in e){const l=e.hasOwnProperty(i),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!Ms(e[i],t[i]))return!1}}return String(e)===String(t)}function Cf(e,t){return e.findIndex(n=>Ms(n,t))}const Ga=e=>!!(e&&e.__v_isRef===!0),E=e=>Le(e)?e:e==null?"":re(e)||Se(e)&&(e.toString===Ma||!ce(e.toString))?Ga(e)?E(e.value):JSON.stringify(e,Ba,2):String(e),Ba=(e,t)=>Ga(t)?Ba(e,t.value):Fn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[eo(s,o)+" =>"]=r,n),{})}:Nr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>eo(n))}:Dt(t)?eo(t):Se(t)&&!re(t)&&!La(t)?String(t):t,eo=(e,t="")=>{var n;return Dt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
+ * @vue/reactivity v3.5.30
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let it;class kf{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=it,!t&&it&&(this.index=(it.scopes||(it.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=it;try{return it=this,t()}finally{it=n}}}on(){++this._on===1&&(this.prevScope=it,it=this)}off(){this._on>0&&--this._on===0&&(it=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function xf(){return it}let Ie;const to=new WeakSet;class Fa{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,it&&it.active&&it.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,to.has(this)&&(to.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Wa(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Yi(this),Ha(this);const t=Ie,n=Ct;Ie=this,Ct=!0;try{return this.fn()}finally{Va(this),Ie=t,Ct=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)pi(t);this.deps=this.depsTail=void 0,Yi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?to.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ro(this)&&this.run()}get dirty(){return Ro(this)}}let Ua=0,hs,ps;function Wa(e,t=!1){if(e.flags|=8,t){e.next=ps,ps=e;return}e.next=hs,hs=e}function di(){Ua++}function hi(){if(--Ua>0)return;if(ps){let t=ps;for(ps=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;hs;){let t=hs;for(hs=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Ha(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Va(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),pi(s),Sf(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ro(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(qa(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function qa(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Cs)||(e.globalVersion=Cs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ro(e))))return;e.flags|=2;const t=e.dep,n=Ie,s=Ct;Ie=e,Ct=!0;try{Ha(e);const r=e.fn(e._value);(t.version===0||Mt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ie=n,Ct=s,Va(e),e.flags&=-3}}function pi(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)pi(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Sf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ct=!0;const za=[];function Qt(){za.push(Ct),Ct=!1}function Zt(){const e=za.pop();Ct=e===void 0?!0:e}function Yi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ie;Ie=void 0;try{t()}finally{Ie=n}}}let Cs=0;class Ef{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class gi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ie||!Ct||Ie===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ie)n=this.activeLink=new Ef(Ie,this),Ie.deps?(n.prevDep=Ie.depsTail,Ie.depsTail.nextDep=n,Ie.depsTail=n):Ie.deps=Ie.depsTail=n,Ka(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ie.depsTail,n.nextDep=void 0,Ie.depsTail.nextDep=n,Ie.depsTail=n,Ie.deps===n&&(Ie.deps=s)}return n}trigger(t){this.version++,Cs++,this.notify(t)}notify(t){di();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{hi()}}}function Ka(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ka(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const $o=new WeakMap,An=Symbol(""),Io=Symbol(""),ks=Symbol("");function qe(e,t,n){if(Ct&&Ie){let s=$o.get(e);s||$o.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new gi),r.map=s,r.key=n),r.track()}}function zt(e,t,n,s,r,o){const i=$o.get(e);if(!i){Cs++;return}const l=a=>{a&&a.trigger()};if(di(),t==="clear")i.forEach(l);else{const a=re(e),c=a&&fi(n);if(a&&n==="length"){const u=Number(s);i.forEach((f,d)=>{(d==="length"||d===ks||!Dt(d)&&d>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),c&&l(i.get(ks)),t){case"add":a?c&&l(i.get("length")):(l(i.get(An)),Fn(e)&&l(i.get(Io)));break;case"delete":a||(l(i.get(An)),Fn(e)&&l(i.get(Io)));break;case"set":Fn(e)&&l(i.get(An));break}}hi()}function Pn(e){const t=Ce(e);return t===e?t:(qe(t,"iterate",ks),yt(e)?t:t.map(St))}function Lr(e){return qe(e=Ce(e),"iterate",ks),e}function Tt(e,t){return en(e)?zn(Rn(e)?St(t):t):St(t)}const Af={__proto__:null,[Symbol.iterator](){return no(this,Symbol.iterator,e=>Tt(this,e))},concat(...e){return Pn(this).concat(...e.map(t=>re(t)?Pn(t):t))},entries(){return no(this,"entries",e=>(e[1]=Tt(this,e[1]),e))},every(e,t){return Bt(this,"every",e,t,void 0,arguments)},filter(e,t){return Bt(this,"filter",e,t,n=>n.map(s=>Tt(this,s)),arguments)},find(e,t){return Bt(this,"find",e,t,n=>Tt(this,n),arguments)},findIndex(e,t){return Bt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Bt(this,"findLast",e,t,n=>Tt(this,n),arguments)},findLastIndex(e,t){return Bt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Bt(this,"forEach",e,t,void 0,arguments)},includes(...e){return so(this,"includes",e)},indexOf(...e){return so(this,"indexOf",e)},join(e){return Pn(this).join(e)},lastIndexOf(...e){return so(this,"lastIndexOf",e)},map(e,t){return Bt(this,"map",e,t,void 0,arguments)},pop(){return rs(this,"pop")},push(...e){return rs(this,"push",e)},reduce(e,...t){return Qi(this,"reduce",e,t)},reduceRight(e,...t){return Qi(this,"reduceRight",e,t)},shift(){return rs(this,"shift")},some(e,t){return Bt(this,"some",e,t,void 0,arguments)},splice(...e){return rs(this,"splice",e)},toReversed(){return Pn(this).toReversed()},toSorted(e){return Pn(this).toSorted(e)},toSpliced(...e){return Pn(this).toSpliced(...e)},unshift(...e){return rs(this,"unshift",e)},values(){return no(this,"values",e=>Tt(this,e))}};function no(e,t,n){const s=Lr(e),r=s[t]();return s!==e&&!yt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Rf=Array.prototype;function Bt(e,t,n,s,r,o){const i=Lr(e),l=i!==e&&!yt(e),a=i[t];if(a!==Rf[t]){const f=a.apply(e,o);return l?St(f):f}let c=n;i!==e&&(l?c=function(f,d){return n.call(this,Tt(e,f),d,e)}:n.length>2&&(c=function(f,d){return n.call(this,f,d,e)}));const u=a.call(i,c,s);return l&&r?r(u):u}function Qi(e,t,n,s){const r=Lr(e),o=r!==e&&!yt(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(c,u,f){return l&&(l=!1,c=Tt(e,c)),n.call(this,c,Tt(e,u),f,e)}):n.length>3&&(i=function(c,u,f){return n.call(this,c,u,f,e)}));const a=r[t](i,...s);return l?Tt(e,a):a}function so(e,t,n){const s=Ce(e);qe(s,"iterate",ks);const r=s[t](...n);return(r===-1||r===!1)&&vi(n[0])?(n[0]=Ce(n[0]),s[t](...n)):r}function rs(e,t,n=[]){Qt(),di();const s=Ce(e)[t].apply(e,n);return hi(),Zt(),s}const $f=ai("__proto__,__v_isRef,__isVue"),Xa=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Dt));function If(e){Dt(e)||(e=String(e));const t=Ce(this);return qe(t,"has",e),t.hasOwnProperty(e)}class Ja{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Bf:ec:o?Za:Qa).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=re(t);if(!r){let a;if(i&&(a=Af[n]))return a;if(n==="hasOwnProperty")return If}const l=Reflect.get(t,n,Xe(t)?t:s);if((Dt(n)?Xa.has(n):$f(n))||(r||qe(t,"get",n),o))return l;if(Xe(l)){const a=i&&fi(n)?l:l.value;return r&&Se(a)?Po(a):a}return Se(l)?r?Po(l):Qn(l):l}}class Ya extends Ja{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=re(t)&&fi(n);if(!this._isShallow){const c=en(o);if(!yt(s)&&!en(s)&&(o=Ce(o),s=Ce(s)),!i&&Xe(o)&&!Xe(s))return c||(o.value=s),!0}const l=i?Number(n)<t.length:ke(t,n),a=Reflect.set(t,n,s,Xe(t)?t:r);return t===Ce(r)&&(l?Mt(s,o)&&zt(t,"set",n,s):zt(t,"add",n,s)),a}deleteProperty(t,n){const s=ke(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&zt(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Dt(n)||!Xa.has(n))&&qe(t,"has",n),s}ownKeys(t){return qe(t,"iterate",re(t)?"length":An),Reflect.ownKeys(t)}}class Nf extends Ja{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Pf=new Ya,Tf=new Nf,Of=new Ya(!0);const No=e=>e,Us=e=>Reflect.getPrototypeOf(e);function Mf(e,t,n){return function(...s){const r=this.__v_raw,o=Ce(r),i=Fn(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...s),u=n?No:t?zn:St;return!t&&qe(o,"iterate",a?Io:An),He(Object.create(c),{next(){const{value:f,done:d}=c.next();return d?{value:f,done:d}:{value:l?[u(f[0]),u(f[1])]:u(f),done:d}}})}}function Ws(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Lf(e,t){const n={get(r){const o=this.__v_raw,i=Ce(o),l=Ce(r);e||(Mt(r,l)&&qe(i,"get",r),qe(i,"get",l));const{has:a}=Us(i),c=t?No:e?zn:St;if(a.call(i,r))return c(o.get(r));if(a.call(i,l))return c(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&qe(Ce(r),"iterate",An),r.size},has(r){const o=this.__v_raw,i=Ce(o),l=Ce(r);return e||(Mt(r,l)&&qe(i,"has",r),qe(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,a=Ce(l),c=t?No:e?zn:St;return!e&&qe(a,"iterate",An),l.forEach((u,f)=>r.call(o,c(u),c(f),i))}};return He(n,e?{add:Ws("add"),set:Ws("set"),delete:Ws("delete"),clear:Ws("clear")}:{add(r){const o=Ce(this),i=Us(o),l=Ce(r),a=!t&&!yt(r)&&!en(r)?l:r;return i.has.call(o,a)||Mt(r,a)&&i.has.call(o,r)||Mt(l,a)&&i.has.call(o,l)||(o.add(a),zt(o,"add",a,a)),this},set(r,o){!t&&!yt(o)&&!en(o)&&(o=Ce(o));const i=Ce(this),{has:l,get:a}=Us(i);let c=l.call(i,r);c||(r=Ce(r),c=l.call(i,r));const u=a.call(i,r);return i.set(r,o),c?Mt(o,u)&&zt(i,"set",r,o):zt(i,"add",r,o),this},delete(r){const o=Ce(this),{has:i,get:l}=Us(o);let a=i.call(o,r);a||(r=Ce(r),a=i.call(o,r)),l&&l.call(o,r);const c=o.delete(r);return a&&zt(o,"delete",r,void 0),c},clear(){const r=Ce(this),o=r.size!==0,i=r.clear();return o&&zt(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Mf(r,e,t)}),n}function mi(e,t){const n=Lf(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(ke(n,r)&&r in s?n:s,r,o)}const Df={get:mi(!1,!1)},jf={get:mi(!1,!0)},Gf={get:mi(!0,!1)};const Qa=new WeakMap,Za=new WeakMap,ec=new WeakMap,Bf=new WeakMap;function Ff(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Uf(e){return e.__v_skip||!Object.isExtensible(e)?0:Ff(df(e))}function Qn(e){return en(e)?e:yi(e,!1,Pf,Df,Qa)}function tc(e){return yi(e,!1,Of,jf,Za)}function Po(e){return yi(e,!0,Tf,Gf,ec)}function yi(e,t,n,s,r){if(!Se(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Uf(e);if(o===0)return e;const i=r.get(e);if(i)return i;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function Rn(e){return en(e)?Rn(e.__v_raw):!!(e&&e.__v_isReactive)}function en(e){return!!(e&&e.__v_isReadonly)}function yt(e){return!!(e&&e.__v_isShallow)}function vi(e){return e?!!e.__v_raw:!1}function Ce(e){const t=e&&e.__v_raw;return t?Ce(t):e}function Wf(e){return!ke(e,"__v_skip")&&Object.isExtensible(e)&&Da(e,"__v_skip",!0),e}const St=e=>Se(e)?Qn(e):e,zn=e=>Se(e)?Po(e):e;function Xe(e){return e?e.__v_isRef===!0:!1}function ue(e){return nc(e,!1)}function Hf(e){return nc(e,!0)}function nc(e,t){return Xe(e)?e:new Vf(e,t)}class Vf{constructor(t,n){this.dep=new gi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ce(t),this._value=n?t:St(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||yt(t)||en(t);t=s?t:Ce(t),Mt(t,n)&&(this._rawValue=t,this._value=s?t:St(t),this.dep.trigger())}}function Oe(e){return Xe(e)?e.value:e}const qf={get:(e,t,n)=>t==="__v_raw"?e:Oe(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Xe(r)&&!Xe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function sc(e){return Rn(e)?e:new Proxy(e,qf)}class zf{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new gi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Cs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ie!==this)return Wa(this,!0),!0}get value(){const t=this.dep.track();return qa(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Kf(e,t,n=!1){let s,r;return ce(e)?s=e:(s=e.get,r=e.set),new zf(s,r,n)}const Hs={},ir=new WeakMap;let _n;function Xf(e,t=!1,n=_n){if(n){let s=ir.get(n);s||ir.set(n,s=[]),s.push(e)}}function Jf(e,t,n=Ae){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=n,c=I=>r?I:yt(I)||r===!1||r===0?Kt(I,1):Kt(I);let u,f,d,h,g=!1,v=!1;if(Xe(e)?(f=()=>e.value,g=yt(e)):Rn(e)?(f=()=>c(e),g=!0):re(e)?(v=!0,g=e.some(I=>Rn(I)||yt(I)),f=()=>e.map(I=>{if(Xe(I))return I.value;if(Rn(I))return c(I);if(ce(I))return a?a(I,2):I()})):ce(e)?t?f=a?()=>a(e,2):e:f=()=>{if(d){Qt();try{d()}finally{Zt()}}const I=_n;_n=u;try{return a?a(e,3,[h]):e(h)}finally{_n=I}}:f=Lt,t&&r){const I=f,V=r===!0?1/0:r;f=()=>Kt(I(),V)}const x=xf(),S=()=>{u.stop(),x&&x.active&&ui(x.effects,u)};if(o&&t){const I=t;t=(...V)=>{I(...V),S()}}let A=v?new Array(e.length).fill(Hs):Hs;const w=I=>{if(!(!(u.flags&1)||!u.dirty&&!I))if(t){const V=u.run();if(r||g||(v?V.some((N,C)=>Mt(N,A[C])):Mt(V,A))){d&&d();const N=_n;_n=u;try{const C=[V,A===Hs?void 0:v&&A[0]===Hs?[]:A,h];A=V,a?a(t,3,C):t(...C)}finally{_n=N}}}else u.run()};return l&&l(w),u=new Fa(f),u.scheduler=i?()=>i(w,!1):w,h=I=>Xf(I,!1,u),d=u.onStop=()=>{const I=ir.get(u);if(I){if(a)a(I,4);else for(const V of I)V();ir.delete(u)}},t?s?w(!0):A=u.run():i?i(w.bind(null,!0),!0):u.run(),S.pause=u.pause.bind(u),S.resume=u.resume.bind(u),S.stop=S,S}function Kt(e,t=1/0,n){if(t<=0||!Se(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Xe(e))Kt(e.value,t,n);else if(re(e))for(let s=0;s<e.length;s++)Kt(e[s],t,n);else if(Nr(e)||Fn(e))e.forEach(s=>{Kt(s,t,n)});else if(La(e)){for(const s in e)Kt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Kt(e[s],t,n)}return e}/**
10
+ * @vue/runtime-core v3.5.30
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function Ls(e,t,n,s){try{return s?e(...s):e()}catch(r){Dr(r,t,n)}}function jt(e,t,n,s){if(ce(e)){const r=Ls(e,t,n,s);return r&&Oa(r)&&r.catch(o=>{Dr(o,t,n)}),r}if(re(e)){const r=[];for(let o=0;o<e.length;o++)r.push(jt(e[o],t,n,s));return r}}function Dr(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Ae;if(t){let l=t.parent;const a=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const u=l.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,a,c)===!1)return}l=l.parent}if(o){Qt(),Ls(o,null,10,[e,a,c]),Zt();return}}Yf(e,n,r,s,i)}function Yf(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const Ze=[];let Pt=-1;const Un=[];let ln=null,Mn=0;const rc=Promise.resolve();let lr=null;function _i(e){const t=lr||rc;return e?t.then(this?e.bind(this):e):t}function Qf(e){let t=Pt+1,n=Ze.length;for(;t<n;){const s=t+n>>>1,r=Ze[s],o=xs(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function bi(e){if(!(e.flags&1)){const t=xs(e),n=Ze[Ze.length-1];!n||!(e.flags&2)&&t>=xs(n)?Ze.push(e):Ze.splice(Qf(t),0,e),e.flags|=1,oc()}}function oc(){lr||(lr=rc.then(lc))}function Zf(e){re(e)?Un.push(...e):ln&&e.id===-1?ln.splice(Mn+1,0,e):e.flags&1||(Un.push(e),e.flags|=1),oc()}function Zi(e,t,n=Pt+1){for(;n<Ze.length;n++){const s=Ze[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Ze.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function ic(e){if(Un.length){const t=[...new Set(Un)].sort((n,s)=>xs(n)-xs(s));if(Un.length=0,ln){ln.push(...t);return}for(ln=t,Mn=0;Mn<ln.length;Mn++){const n=ln[Mn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}ln=null,Mn=0}}const xs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function lc(e){try{for(Pt=0;Pt<Ze.length;Pt++){const t=Ze[Pt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ls(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Pt<Ze.length;Pt++){const t=Ze[Pt];t&&(t.flags&=-2)}Pt=-1,Ze.length=0,ic(),lr=null,(Ze.length||Un.length)&&lc()}}let ut=null,ac=null;function ar(e){const t=ut;return ut=e,ac=e&&e.type.__scopeId||null,t}function wi(e,t=ut,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&hr(-1);const o=ar(t);let i;try{i=e(...r)}finally{ar(o),s._d&&hr(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function cr(e,t){if(ut===null)return e;const n=Fr(ut),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,l,a=Ae]=t[r];o&&(ce(o)&&(o={mounted:o,updated:o}),o.deep&&Kt(i),s.push({dir:o,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function mn(e,t,n,s){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];o&&(l.oldValue=o[i].value);let a=l.dir[s];a&&(Qt(),jt(a,n,8,[e.el,l,e,t]),Zt())}}function Zs(e,t){if(ze){let n=ze.provides;const s=ze.parent&&ze.parent.provides;s===n&&(n=ze.provides=Object.create(s)),n[e]=t}}function kt(e,t,n=!1){const s=Zd();if(s||Wn){let r=Wn?Wn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&ce(t)?t.call(s&&s.proxy):t}}const ed=Symbol.for("v-scx"),td=()=>kt(ed);function et(e,t,n){return cc(e,t,n)}function cc(e,t,n=Ae){const{immediate:s,deep:r,flush:o,once:i}=n,l=He({},n),a=t&&s||!t&&o!=="post";let c;if(Es){if(o==="sync"){const h=td();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=Lt,h.resume=Lt,h.pause=Lt,h}}const u=ze;l.call=(h,g,v)=>jt(h,u,g,v);let f=!1;o==="post"?l.scheduler=h=>{ot(h,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(h,g)=>{g?h():bi(h)}),l.augmentJob=h=>{t&&(h.flags|=4),f&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const d=Jf(e,t,l);return Es&&(c?c.push(d):a&&d()),d}function nd(e,t,n){const s=this.proxy,r=Le(e)?e.includes(".")?uc(s,e):()=>s[e]:e.bind(s,s);let o;ce(t)?o=t:(o=t.handler,n=t);const i=Ds(this),l=cc(r,o.bind(s),n);return i(),l}function uc(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const sd=Symbol("_vte"),rd=e=>e.__isTeleport,od=Symbol("_leaveCb");function Ci(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ci(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function fc(e,t){return ce(e)?He({name:e.name},t,{setup:e}):e}function dc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function el(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ur=new WeakMap;function gs(e,t,n,s,r=!1){if(re(e)){e.forEach((v,x)=>gs(v,t&&(re(t)?t[x]:t),n,s,r));return}if(ms(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&gs(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?Fr(s.component):s.el,i=r?null:o,{i:l,r:a}=e,c=t&&t.r,u=l.refs===Ae?l.refs={}:l.refs,f=l.setupState,d=Ce(f),h=f===Ae?Ta:v=>el(u,v)?!1:ke(d,v),g=(v,x)=>!(x&&el(u,x));if(c!=null&&c!==a){if(tl(t),Le(c))u[c]=null,h(c)&&(f[c]=null);else if(Xe(c)){const v=t;g(c,v.k)&&(c.value=null),v.k&&(u[v.k]=null)}}if(ce(a))Ls(a,l,12,[i,u]);else{const v=Le(a),x=Xe(a);if(v||x){const S=()=>{if(e.f){const A=v?h(a)?f[a]:u[a]:g()||!e.k?a.value:u[e.k];if(r)re(A)&&ui(A,o);else if(re(A))A.includes(o)||A.push(o);else if(v)u[a]=[o],h(a)&&(f[a]=u[a]);else{const w=[o];g(a,e.k)&&(a.value=w),e.k&&(u[e.k]=w)}}else v?(u[a]=i,h(a)&&(f[a]=i)):x&&(g(a,e.k)&&(a.value=i),e.k&&(u[e.k]=i))};if(i){const A=()=>{S(),ur.delete(e)};A.id=-1,ur.set(e,A),ot(A,n)}else tl(e),S()}}}function tl(e){const t=ur.get(e);t&&(t.flags|=8,ur.delete(e))}Mr().requestIdleCallback;Mr().cancelIdleCallback;const ms=e=>!!e.type.__asyncLoader,hc=e=>e.type.__isKeepAlive;function id(e,t){pc(e,"a",t)}function ld(e,t){pc(e,"da",t)}function pc(e,t,n=ze){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(jr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)hc(r.parent.vnode)&&ad(s,t,n,r),r=r.parent}}function ad(e,t,n,s){const r=jr(t,e,s,!0);nn(()=>{ui(s[t],r)},n)}function jr(e,t,n=ze,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{Qt();const l=Ds(n),a=jt(t,n,e,i);return l(),Zt(),a});return s?r.unshift(o):r.push(o),o}}const tn=e=>(t,n=ze)=>{(!Es||e==="sp")&&jr(e,(...s)=>t(...s),n)},cd=tn("bm"),vt=tn("m"),ud=tn("bu"),fd=tn("u"),dd=tn("bum"),nn=tn("um"),hd=tn("sp"),pd=tn("rtg"),gd=tn("rtc");function md(e,t=ze){jr("ec",e,t)}const yd="components";function fr(e,t){return _d(yd,e,!0,t)||e}const vd=Symbol.for("v-ndc");function _d(e,t,n=!0,s=!1){const r=ut||ze;if(r){const o=r.type;{const l=rh(o,!1);if(l&&(l===t||l===tt(t)||l===Tr(tt(t))))return o}const i=nl(r[e]||o[e],t)||nl(r.appContext[e],t);return!i&&s?o:i}}function nl(e,t){return e&&(e[t]||e[tt(t)]||e[Tr(tt(t))])}function he(e,t,n,s){let r;const o=n,i=re(e);if(i||Le(e)){const l=i&&Rn(e);let a=!1,c=!1;l&&(a=!yt(e),c=en(e),e=Lr(e)),r=new Array(e.length);for(let u=0,f=e.length;u<f;u++)r[u]=t(a?c?zn(St(e[u])):St(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,o)}else if(Se(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,c=l.length;a<c;a++){const u=l[a];r[a]=t(e[u],u,a,o)}}else r=[];return r}const To=e=>e?Mc(e)?Fr(e):To(e.parent):null,ys=He(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>To(e.parent),$root:e=>To(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>mc(e),$forceUpdate:e=>e.f||(e.f=()=>{bi(e.update)}),$nextTick:e=>e.n||(e.n=_i.bind(e.proxy)),$watch:e=>nd.bind(e)}),ro=(e,t)=>e!==Ae&&!e.__isScriptSetup&&ke(e,t),bd={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const d=i[t];if(d!==void 0)switch(d){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(ro(s,t))return i[t]=1,s[t];if(r!==Ae&&ke(r,t))return i[t]=2,r[t];if(ke(o,t))return i[t]=3,o[t];if(n!==Ae&&ke(n,t))return i[t]=4,n[t];Oo&&(i[t]=0)}}const c=ys[t];let u,f;if(c)return t==="$attrs"&&qe(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==Ae&&ke(n,t))return i[t]=4,n[t];if(f=a.config.globalProperties,ke(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return ro(r,t)?(r[t]=n,!0):s!==Ae&&ke(s,t)?(s[t]=n,!0):ke(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let a;return!!(n[l]||e!==Ae&&l[0]!=="$"&&ke(e,l)||ro(t,l)||ke(o,l)||ke(s,l)||ke(ys,l)||ke(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ke(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function sl(e){return re(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Oo=!0;function wd(e){const t=mc(e),n=e.proxy,s=e.ctx;Oo=!1,t.beforeCreate&&rl(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:f,mounted:d,beforeUpdate:h,updated:g,activated:v,deactivated:x,beforeDestroy:S,beforeUnmount:A,destroyed:w,unmounted:I,render:V,renderTracked:N,renderTriggered:C,errorCaptured:z,serverPrefetch:se,expose:F,inheritAttrs:ie,components:j,directives:pe,filters:le}=t;if(c&&Cd(c,s,null),i)for(const T in i){const $=i[T];ce($)&&(s[T]=$.bind(n))}if(r){const T=r.call(n,n);Se(T)&&(e.data=Qn(T))}if(Oo=!0,o)for(const T in o){const $=o[T],Y=ce($)?$.bind(n,n):ce($.get)?$.get.bind(n,n):Lt,be=!ce($)&&ce($.set)?$.set.bind(n):Lt,ve=fe({get:Y,set:be});Object.defineProperty(s,T,{enumerable:!0,configurable:!0,get:()=>ve.value,set:Pe=>ve.value=Pe})}if(l)for(const T in l)gc(l[T],s,n,T);if(a){const T=ce(a)?a.call(n):a;Reflect.ownKeys(T).forEach($=>{Zs($,T[$])})}u&&rl(u,e,"c");function D(T,$){re($)?$.forEach(Y=>T(Y.bind(n))):$&&T($.bind(n))}if(D(cd,f),D(vt,d),D(ud,h),D(fd,g),D(id,v),D(ld,x),D(md,z),D(gd,N),D(pd,C),D(dd,A),D(nn,I),D(hd,se),re(F))if(F.length){const T=e.exposed||(e.exposed={});F.forEach($=>{Object.defineProperty(T,$,{get:()=>n[$],set:Y=>n[$]=Y,enumerable:!0})})}else e.exposed||(e.exposed={});V&&e.render===Lt&&(e.render=V),ie!=null&&(e.inheritAttrs=ie),j&&(e.components=j),pe&&(e.directives=pe),se&&dc(e)}function Cd(e,t,n=Lt){re(e)&&(e=Mo(e));for(const s in e){const r=e[s];let o;Se(r)?"default"in r?o=kt(r.from||s,r.default,!0):o=kt(r.from||s):o=kt(r),Xe(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function rl(e,t,n){jt(re(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function gc(e,t,n,s){let r=s.includes(".")?uc(n,s):()=>n[s];if(Le(e)){const o=t[e];ce(o)&&et(r,o)}else if(ce(e))et(r,e.bind(n));else if(Se(e))if(re(e))e.forEach(o=>gc(o,t,n,s));else{const o=ce(e.handler)?e.handler.bind(n):t[e.handler];ce(o)&&et(r,o,e)}}function mc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!r.length&&!n&&!s?a=t:(a={},r.length&&r.forEach(c=>dr(a,c,i,!0)),dr(a,t,i)),Se(t)&&o.set(t,a),a}function dr(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&dr(e,o,n,!0),r&&r.forEach(i=>dr(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=kd[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const kd={data:ol,props:il,emits:il,methods:cs,computed:cs,beforeCreate:Ye,created:Ye,beforeMount:Ye,mounted:Ye,beforeUpdate:Ye,updated:Ye,beforeDestroy:Ye,beforeUnmount:Ye,destroyed:Ye,unmounted:Ye,activated:Ye,deactivated:Ye,errorCaptured:Ye,serverPrefetch:Ye,components:cs,directives:cs,watch:Sd,provide:ol,inject:xd};function ol(e,t){return t?e?function(){return He(ce(e)?e.call(this,this):e,ce(t)?t.call(this,this):t)}:t:e}function xd(e,t){return cs(Mo(e),Mo(t))}function Mo(e){if(re(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ye(e,t){return e?[...new Set([].concat(e,t))]:t}function cs(e,t){return e?He(Object.create(null),e,t):t}function il(e,t){return e?re(e)&&re(t)?[...new Set([...e,...t])]:He(Object.create(null),sl(e),sl(t??{})):t}function Sd(e,t){if(!e)return t;if(!t)return e;const n=He(Object.create(null),e);for(const s in t)n[s]=Ye(e[s],t[s]);return n}function yc(){return{app:null,config:{isNativeTag:Ta,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ed=0;function Ad(e,t){return function(s,r=null){ce(s)||(s=He({},s)),r!=null&&!Se(r)&&(r=null);const o=yc(),i=new WeakSet,l=[];let a=!1;const c=o.app={_uid:Ed++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:ih,get config(){return o.config},set config(u){},use(u,...f){return i.has(u)||(u&&ce(u.install)?(i.add(u),u.install(c,...f)):ce(u)&&(i.add(u),u(c,...f))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,f){return f?(o.components[u]=f,c):o.components[u]},directive(u,f){return f?(o.directives[u]=f,c):o.directives[u]},mount(u,f,d){if(!a){const h=c._ceVNode||ye(s,r);return h.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),e(h,u,d),a=!0,c._container=u,u.__vue_app__=c,Fr(h.component)}},onUnmount(u){l.push(u)},unmount(){a&&(jt(l,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,f){return o.provides[u]=f,c},runWithContext(u){const f=Wn;Wn=c;try{return u()}finally{Wn=f}}};return c}}let Wn=null;const Rd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${tt(t)}Modifiers`]||e[`${In(t)}Modifiers`];function $d(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Ae;let r=n;const o=t.startsWith("update:"),i=o&&Rd(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>Le(u)?u.trim():u)),i.number&&(r=n.map(Or)));let l,a=s[l=Zr(t)]||s[l=Zr(tt(t))];!a&&o&&(a=s[l=Zr(In(t))]),a&&jt(a,e,6,r);const c=s[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,jt(c,e,6,r)}}const Id=new WeakMap;function vc(e,t,n=!1){const s=n?Id:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!ce(e)){const a=c=>{const u=vc(c,t,!0);u&&(l=!0,He(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(Se(e)&&s.set(e,null),null):(re(o)?o.forEach(a=>i[a]=null):He(i,o),Se(e)&&s.set(e,i),i)}function Gr(e,t){return!e||!Ir(t)?!1:(t=t.slice(2).replace(/Once$/,""),ke(e,t[0].toLowerCase()+t.slice(1))||ke(e,In(t))||ke(e,t))}function ll(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:f,data:d,setupState:h,ctx:g,inheritAttrs:v}=e,x=ar(e);let S,A;try{if(n.shapeFlag&4){const I=r||s,V=I;S=Ot(c.call(V,I,u,f,h,d,g)),A=l}else{const I=t;S=Ot(I.length>1?I(f,{attrs:l,slots:i,emit:a}):I(f,null)),A=t.props?l:Nd(l)}}catch(I){vs.length=0,Dr(I,e,1),S=ye(pn)}let w=S;if(A&&v!==!1){const I=Object.keys(A),{shapeFlag:V}=w;I.length&&V&7&&(o&&I.some(ci)&&(A=Pd(A,o)),w=Kn(w,A,!1,!0))}return n.dirs&&(w=Kn(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&Ci(w,n.transition),S=w,ar(x),S}const Nd=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ir(n))&&((t||(t={}))[n]=e[n]);return t},Pd=(e,t)=>{const n={};for(const s in e)(!ci(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Td(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:a}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?al(s,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const d=u[f];if(_c(i,s,d)&&!Gr(c,d))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?al(s,i,c):!0:!!i;return!1}function al(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const o=s[r];if(_c(t,e,o)&&!Gr(n,o))return!0}return!1}function _c(e,t,n){const s=e[n],r=t[n];return n==="style"&&Se(s)&&Se(r)?!Ms(s,r):s!==r}function Od({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const bc={},wc=()=>Object.create(bc),Cc=e=>Object.getPrototypeOf(e)===bc;function Md(e,t,n,s=!1){const r={},o=wc();e.propsDefaults=Object.create(null),kc(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:tc(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Ld(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=Ce(r),[a]=e.propsOptions;let c=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let d=u[f];if(Gr(e.emitsOptions,d))continue;const h=t[d];if(a)if(ke(o,d))h!==o[d]&&(o[d]=h,c=!0);else{const g=tt(d);r[g]=Lo(a,l,g,h,e,!1)}else h!==o[d]&&(o[d]=h,c=!0)}}}else{kc(e,t,r,o)&&(c=!0);let u;for(const f in l)(!t||!ke(t,f)&&((u=In(f))===f||!ke(t,u)))&&(a?n&&(n[f]!==void 0||n[u]!==void 0)&&(r[f]=Lo(a,l,f,void 0,e,!0)):delete r[f]);if(o!==l)for(const f in o)(!t||!ke(t,f))&&(delete o[f],c=!0)}c&&zt(e.attrs,"set","")}function kc(e,t,n,s){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(ds(a))continue;const c=t[a];let u;r&&ke(r,u=tt(a))?!o||!o.includes(u)?n[u]=c:(l||(l={}))[u]=c:Gr(e.emitsOptions,a)||(!(a in s)||c!==s[a])&&(s[a]=c,i=!0)}if(o){const a=Ce(n),c=l||Ae;for(let u=0;u<o.length;u++){const f=o[u];n[f]=Lo(r,a,f,c[f],e,!ke(c,f))}}return i}function Lo(e,t,n,s,r,o){const i=e[n];if(i!=null){const l=ke(i,"default");if(l&&s===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&ce(a)){const{propsDefaults:c}=r;if(n in c)s=c[n];else{const u=Ds(r);s=c[n]=a.call(null,t),u()}}else s=a;r.ce&&r.ce._setProp(n,s)}i[0]&&(o&&!l?s=!1:i[1]&&(s===""||s===In(n))&&(s=!0))}return s}const Dd=new WeakMap;function xc(e,t,n=!1){const s=n?Dd:t.propsCache,r=s.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!ce(e)){const u=f=>{a=!0;const[d,h]=xc(f,t,!0);He(i,d),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return Se(e)&&s.set(e,Bn),Bn;if(re(o))for(let u=0;u<o.length;u++){const f=tt(o[u]);cl(f)&&(i[f]=Ae)}else if(o)for(const u in o){const f=tt(u);if(cl(f)){const d=o[u],h=i[f]=re(d)||ce(d)?{type:d}:He({},d),g=h.type;let v=!1,x=!0;if(re(g))for(let S=0;S<g.length;++S){const A=g[S],w=ce(A)&&A.name;if(w==="Boolean"){v=!0;break}else w==="String"&&(x=!1)}else v=ce(g)&&g.name==="Boolean";h[0]=v,h[1]=x,(v||ke(h,"default"))&&l.push(f)}}const c=[i,l];return Se(e)&&s.set(e,c),c}function cl(e){return e[0]!=="$"&&!ds(e)}const ki=e=>e==="_"||e==="_ctx"||e==="$stable",xi=e=>re(e)?e.map(Ot):[Ot(e)],jd=(e,t,n)=>{if(t._n)return t;const s=wi((...r)=>xi(t(...r)),n);return s._c=!1,s},Sc=(e,t,n)=>{const s=e._ctx;for(const r in e){if(ki(r))continue;const o=e[r];if(ce(o))t[r]=jd(r,o,s);else if(o!=null){const i=xi(o);t[r]=()=>i}}},Ec=(e,t)=>{const n=xi(t);e.slots.default=()=>n},Ac=(e,t,n)=>{for(const s in t)(n||!ki(s))&&(e[s]=t[s])},Gd=(e,t,n)=>{const s=e.slots=wc();if(e.vnode.shapeFlag&32){const r=t._;r?(Ac(s,t,n),n&&Da(s,"_",r,!0)):Sc(t,s)}else t&&Ec(e,t)},Bd=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=Ae;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Ac(r,t,n):(o=!t.$stable,Sc(t,r)),i=t}else t&&(Ec(e,t),i={default:1});if(o)for(const l in r)!ki(l)&&i[l]==null&&delete r[l]},ot=Vd;function Fd(e){return Ud(e)}function Ud(e,t){const n=Mr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:f,nextSibling:d,setScopeId:h=Lt,insertStaticContent:g}=e,v=(m,y,k,O=null,L=null,M=null,K=void 0,q=null,U=!!y.dynamicChildren)=>{if(m===y)return;m&&!os(m,y)&&(O=R(m),Pe(m,L,M,!0),m=null),y.patchFlag===-2&&(U=!1,y.dynamicChildren=null);const{type:G,ref:te,shapeFlag:X}=y;switch(G){case Br:x(m,y,k,O);break;case pn:S(m,y,k,O);break;case er:m==null&&A(y,k,O,K);break;case ee:j(m,y,k,O,L,M,K,q,U);break;default:X&1?V(m,y,k,O,L,M,K,q,U):X&6?pe(m,y,k,O,L,M,K,q,U):(X&64||X&128)&&G.process(m,y,k,O,L,M,K,q,U,J)}te!=null&&L?gs(te,m&&m.ref,M,y||m,!y):te==null&&m&&m.ref!=null&&gs(m.ref,null,M,m,!0)},x=(m,y,k,O)=>{if(m==null)s(y.el=l(y.children),k,O);else{const L=y.el=m.el;y.children!==m.children&&c(L,y.children)}},S=(m,y,k,O)=>{m==null?s(y.el=a(y.children||""),k,O):y.el=m.el},A=(m,y,k,O)=>{[m.el,m.anchor]=g(m.children,y,k,O,m.el,m.anchor)},w=({el:m,anchor:y},k,O)=>{let L;for(;m&&m!==y;)L=d(m),s(m,k,O),m=L;s(y,k,O)},I=({el:m,anchor:y})=>{let k;for(;m&&m!==y;)k=d(m),r(m),m=k;r(y)},V=(m,y,k,O,L,M,K,q,U)=>{if(y.type==="svg"?K="svg":y.type==="math"&&(K="mathml"),m==null)N(y,k,O,L,M,K,q,U);else{const G=m.el&&m.el._isVueCE?m.el:null;try{G&&G._beginPatch(),se(m,y,L,M,K,q,U)}finally{G&&G._endPatch()}}},N=(m,y,k,O,L,M,K,q)=>{let U,G;const{props:te,shapeFlag:X,transition:Q,dirs:oe}=m;if(U=m.el=i(m.type,M,te&&te.is,te),X&8?u(U,m.children):X&16&&z(m.children,U,null,O,L,oo(m,M),K,q),oe&&mn(m,null,O,"created"),C(U,m,m.scopeId,K,O),te){for(const Re in te)Re!=="value"&&!ds(Re)&&o(U,Re,null,te[Re],M,O);"value"in te&&o(U,"value",null,te.value,M),(G=te.onVnodeBeforeMount)&&It(G,O,m)}oe&&mn(m,null,O,"beforeMount");const me=Wd(L,Q);me&&Q.beforeEnter(U),s(U,y,k),((G=te&&te.onVnodeMounted)||me||oe)&&ot(()=>{G&&It(G,O,m),me&&Q.enter(U),oe&&mn(m,null,O,"mounted")},L)},C=(m,y,k,O,L)=>{if(k&&h(m,k),O)for(let M=0;M<O.length;M++)h(m,O[M]);if(L){let M=L.subTree;if(y===M||Nc(M.type)&&(M.ssContent===y||M.ssFallback===y)){const K=L.vnode;C(m,K,K.scopeId,K.slotScopeIds,L.parent)}}},z=(m,y,k,O,L,M,K,q,U=0)=>{for(let G=U;G<m.length;G++){const te=m[G]=q?Vt(m[G]):Ot(m[G]);v(null,te,y,k,O,L,M,K,q)}},se=(m,y,k,O,L,M,K)=>{const q=y.el=m.el;let{patchFlag:U,dynamicChildren:G,dirs:te}=y;U|=m.patchFlag&16;const X=m.props||Ae,Q=y.props||Ae;let oe;if(k&&yn(k,!1),(oe=Q.onVnodeBeforeUpdate)&&It(oe,k,y,m),te&&mn(y,m,k,"beforeUpdate"),k&&yn(k,!0),(X.innerHTML&&Q.innerHTML==null||X.textContent&&Q.textContent==null)&&u(q,""),G?F(m.dynamicChildren,G,q,k,O,oo(y,L),M):K||$(m,y,q,null,k,O,oo(y,L),M,!1),U>0){if(U&16)ie(q,X,Q,k,L);else if(U&2&&X.class!==Q.class&&o(q,"class",null,Q.class,L),U&4&&o(q,"style",X.style,Q.style,L),U&8){const me=y.dynamicProps;for(let Re=0;Re<me.length;Re++){const xe=me[Re],st=X[xe],rt=Q[xe];(rt!==st||xe==="value")&&o(q,xe,st,rt,L,k)}}U&1&&m.children!==y.children&&u(q,y.children)}else!K&&G==null&&ie(q,X,Q,k,L);((oe=Q.onVnodeUpdated)||te)&&ot(()=>{oe&&It(oe,k,y,m),te&&mn(y,m,k,"updated")},O)},F=(m,y,k,O,L,M,K)=>{for(let q=0;q<y.length;q++){const U=m[q],G=y[q],te=U.el&&(U.type===ee||!os(U,G)||U.shapeFlag&198)?f(U.el):k;v(U,G,te,null,O,L,M,K,!0)}},ie=(m,y,k,O,L)=>{if(y!==k){if(y!==Ae)for(const M in y)!ds(M)&&!(M in k)&&o(m,M,y[M],null,L,O);for(const M in k){if(ds(M))continue;const K=k[M],q=y[M];K!==q&&M!=="value"&&o(m,M,q,K,L,O)}"value"in k&&o(m,"value",y.value,k.value,L)}},j=(m,y,k,O,L,M,K,q,U)=>{const G=y.el=m?m.el:l(""),te=y.anchor=m?m.anchor:l("");let{patchFlag:X,dynamicChildren:Q,slotScopeIds:oe}=y;oe&&(q=q?q.concat(oe):oe),m==null?(s(G,k,O),s(te,k,O),z(y.children||[],k,te,L,M,K,q,U)):X>0&&X&64&&Q&&m.dynamicChildren&&m.dynamicChildren.length===Q.length?(F(m.dynamicChildren,Q,k,L,M,K,q),(y.key!=null||L&&y===L.subTree)&&Rc(m,y,!0)):$(m,y,k,te,L,M,K,q,U)},pe=(m,y,k,O,L,M,K,q,U)=>{y.slotScopeIds=q,m==null?y.shapeFlag&512?L.ctx.activate(y,k,O,K,U):le(y,k,O,L,M,K,U):Ee(m,y,U)},le=(m,y,k,O,L,M,K)=>{const q=m.component=Qd(m,O,L);if(hc(m)&&(q.ctx.renderer=J),eh(q,!1,K),q.asyncDep){if(L&&L.registerDep(q,D,K),!m.el){const U=q.subTree=ye(pn);S(null,U,y,k),m.placeholder=U.el}}else D(q,m,y,k,L,M,K)},Ee=(m,y,k)=>{const O=y.component=m.component;if(Td(m,y,k))if(O.asyncDep&&!O.asyncResolved){T(O,y,k);return}else O.next=y,O.update();else y.el=m.el,O.vnode=y},D=(m,y,k,O,L,M,K)=>{const q=()=>{if(m.isMounted){let{next:X,bu:Q,u:oe,parent:me,vnode:Re}=m;{const Rt=$c(m);if(Rt){X&&(X.el=Re.el,T(m,X,K)),Rt.asyncDep.then(()=>{ot(()=>{m.isUnmounted||G()},L)});return}}let xe=X,st;yn(m,!1),X?(X.el=Re.el,T(m,X,K)):X=Re,Q&&Qs(Q),(st=X.props&&X.props.onVnodeBeforeUpdate)&&It(st,me,X,Re),yn(m,!0);const rt=ll(m),At=m.subTree;m.subTree=rt,v(At,rt,f(At.el),R(At),m,L,M),X.el=rt.el,xe===null&&Od(m,rt.el),oe&&ot(oe,L),(st=X.props&&X.props.onVnodeUpdated)&&ot(()=>It(st,me,X,Re),L)}else{let X;const{el:Q,props:oe}=y,{bm:me,m:Re,parent:xe,root:st,type:rt}=m,At=ms(y);yn(m,!1),me&&Qs(me),!At&&(X=oe&&oe.onVnodeBeforeMount)&&It(X,xe,y),yn(m,!0);{st.ce&&st.ce._hasShadowRoot()&&st.ce._injectChildStyle(rt,m.parent?m.parent.type:void 0);const Rt=m.subTree=ll(m);v(null,Rt,k,O,m,L,M),y.el=Rt.el}if(Re&&ot(Re,L),!At&&(X=oe&&oe.onVnodeMounted)){const Rt=y;ot(()=>It(X,xe,Rt),L)}(y.shapeFlag&256||xe&&ms(xe.vnode)&&xe.vnode.shapeFlag&256)&&m.a&&ot(m.a,L),m.isMounted=!0,y=k=O=null}};m.scope.on();const U=m.effect=new Fa(q);m.scope.off();const G=m.update=U.run.bind(U),te=m.job=U.runIfDirty.bind(U);te.i=m,te.id=m.uid,U.scheduler=()=>bi(te),yn(m,!0),G()},T=(m,y,k)=>{y.component=m;const O=m.vnode.props;m.vnode=y,m.next=null,Ld(m,y.props,O,k),Bd(m,y.children,k),Qt(),Zi(m),Zt()},$=(m,y,k,O,L,M,K,q,U=!1)=>{const G=m&&m.children,te=m?m.shapeFlag:0,X=y.children,{patchFlag:Q,shapeFlag:oe}=y;if(Q>0){if(Q&128){be(G,X,k,O,L,M,K,q,U);return}else if(Q&256){Y(G,X,k,O,L,M,K,q,U);return}}oe&8?(te&16&&ne(G,L,M),X!==G&&u(k,X)):te&16?oe&16?be(G,X,k,O,L,M,K,q,U):ne(G,L,M,!0):(te&8&&u(k,""),oe&16&&z(X,k,O,L,M,K,q,U))},Y=(m,y,k,O,L,M,K,q,U)=>{m=m||Bn,y=y||Bn;const G=m.length,te=y.length,X=Math.min(G,te);let Q;for(Q=0;Q<X;Q++){const oe=y[Q]=U?Vt(y[Q]):Ot(y[Q]);v(m[Q],oe,k,null,L,M,K,q,U)}G>te?ne(m,L,M,!0,!1,X):z(y,k,O,L,M,K,q,U,X)},be=(m,y,k,O,L,M,K,q,U)=>{let G=0;const te=y.length;let X=m.length-1,Q=te-1;for(;G<=X&&G<=Q;){const oe=m[G],me=y[G]=U?Vt(y[G]):Ot(y[G]);if(os(oe,me))v(oe,me,k,null,L,M,K,q,U);else break;G++}for(;G<=X&&G<=Q;){const oe=m[X],me=y[Q]=U?Vt(y[Q]):Ot(y[Q]);if(os(oe,me))v(oe,me,k,null,L,M,K,q,U);else break;X--,Q--}if(G>X){if(G<=Q){const oe=Q+1,me=oe<te?y[oe].el:O;for(;G<=Q;)v(null,y[G]=U?Vt(y[G]):Ot(y[G]),k,me,L,M,K,q,U),G++}}else if(G>Q)for(;G<=X;)Pe(m[G],L,M,!0),G++;else{const oe=G,me=G,Re=new Map;for(G=me;G<=Q;G++){const at=y[G]=U?Vt(y[G]):Ot(y[G]);at.key!=null&&Re.set(at.key,G)}let xe,st=0;const rt=Q-me+1;let At=!1,Rt=0;const ss=new Array(rt);for(G=0;G<rt;G++)ss[G]=0;for(G=oe;G<=X;G++){const at=m[G];if(st>=rt){Pe(at,L,M,!0);continue}let $t;if(at.key!=null)$t=Re.get(at.key);else for(xe=me;xe<=Q;xe++)if(ss[xe-me]===0&&os(at,y[xe])){$t=xe;break}$t===void 0?Pe(at,L,M,!0):(ss[$t-me]=G+1,$t>=Rt?Rt=$t:At=!0,v(at,y[$t],k,null,L,M,K,q,U),st++)}const Hi=At?Hd(ss):Bn;for(xe=Hi.length-1,G=rt-1;G>=0;G--){const at=me+G,$t=y[at],Vi=y[at+1],qi=at+1<te?Vi.el||Ic(Vi):O;ss[G]===0?v(null,$t,k,qi,L,M,K,q,U):At&&(xe<0||G!==Hi[xe]?ve($t,k,qi,2):xe--)}}},ve=(m,y,k,O,L=null)=>{const{el:M,type:K,transition:q,children:U,shapeFlag:G}=m;if(G&6){ve(m.component.subTree,y,k,O);return}if(G&128){m.suspense.move(y,k,O);return}if(G&64){K.move(m,y,k,J);return}if(K===ee){s(M,y,k);for(let X=0;X<U.length;X++)ve(U[X],y,k,O);s(m.anchor,y,k);return}if(K===er){w(m,y,k);return}if(O!==2&&G&1&&q)if(O===0)q.beforeEnter(M),s(M,y,k),ot(()=>q.enter(M),L);else{const{leave:X,delayLeave:Q,afterLeave:oe}=q,me=()=>{m.ctx.isUnmounted?r(M):s(M,y,k)},Re=()=>{M._isLeaving&&M[od](!0),X(M,()=>{me(),oe&&oe()})};Q?Q(M,me,Re):Re()}else s(M,y,k)},Pe=(m,y,k,O=!1,L=!1)=>{const{type:M,props:K,ref:q,children:U,dynamicChildren:G,shapeFlag:te,patchFlag:X,dirs:Q,cacheIndex:oe}=m;if(X===-2&&(L=!1),q!=null&&(Qt(),gs(q,null,k,m,!0),Zt()),oe!=null&&(y.renderCache[oe]=void 0),te&256){y.ctx.deactivate(m);return}const me=te&1&&Q,Re=!ms(m);let xe;if(Re&&(xe=K&&K.onVnodeBeforeUnmount)&&It(xe,y,m),te&6)_t(m.component,k,O);else{if(te&128){m.suspense.unmount(k,O);return}me&&mn(m,null,y,"beforeUnmount"),te&64?m.type.remove(m,y,k,J,O):G&&!G.hasOnce&&(M!==ee||X>0&&X&64)?ne(G,y,k,!1,!0):(M===ee&&X&384||!L&&te&16)&&ne(U,y,k),O&&De(m)}(Re&&(xe=K&&K.onVnodeUnmounted)||me)&&ot(()=>{xe&&It(xe,y,m),me&&mn(m,null,y,"unmounted")},k)},De=m=>{const{type:y,el:k,anchor:O,transition:L}=m;if(y===ee){nt(k,O);return}if(y===er){I(m);return}const M=()=>{r(k),L&&!L.persisted&&L.afterLeave&&L.afterLeave()};if(m.shapeFlag&1&&L&&!L.persisted){const{leave:K,delayLeave:q}=L,U=()=>K(k,M);q?q(m.el,M,U):U()}else M()},nt=(m,y)=>{let k;for(;m!==y;)k=d(m),r(m),m=k;r(y)},_t=(m,y,k)=>{const{bum:O,scope:L,job:M,subTree:K,um:q,m:U,a:G}=m;ul(U),ul(G),O&&Qs(O),L.stop(),M&&(M.flags|=8,Pe(K,m,y,k)),q&&ot(q,y),ot(()=>{m.isUnmounted=!0},y)},ne=(m,y,k,O=!1,L=!1,M=0)=>{for(let K=M;K<m.length;K++)Pe(m[K],y,k,O,L)},R=m=>{if(m.shapeFlag&6)return R(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const y=d(m.anchor||m.el),k=y&&y[sd];return k?d(k):y};let H=!1;const W=(m,y,k)=>{let O;m==null?y._vnode&&(Pe(y._vnode,null,null,!0),O=y._vnode.component):v(y._vnode||null,m,y,null,null,null,k),y._vnode=m,H||(H=!0,Zi(O),ic(),H=!1)},J={p:v,um:Pe,m:ve,r:De,mt:le,mc:z,pc:$,pbc:F,n:R,o:e};return{render:W,hydrate:void 0,createApp:Ad(W)}}function oo({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function yn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Wd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Rc(e,t,n=!1){const s=e.children,r=t.children;if(re(s)&&re(r))for(let o=0;o<s.length;o++){const i=s[o];let l=r[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[o]=Vt(r[o]),l.el=i.el),!n&&l.patchFlag!==-2&&Rc(i,l)),l.type===Br&&(l.patchFlag===-1&&(l=r[o]=Vt(l)),l.el=i.el),l.type===pn&&!l.el&&(l.el=i.el)}}function Hd(e){const t=e.slice(),n=[0];let s,r,o,i,l;const a=e.length;for(s=0;s<a;s++){const c=e[s];if(c!==0){if(r=n[n.length-1],e[r]<c){t[s]=r,n.push(s);continue}for(o=0,i=n.length-1;o<i;)l=o+i>>1,e[n[l]]<c?o=l+1:i=l;c<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function $c(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:$c(t)}function ul(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ic(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ic(t.subTree):null}const Nc=e=>e.__isSuspense;function Vd(e,t){t&&t.pendingBranch?re(e)?t.effects.push(...e):t.effects.push(e):Zf(e)}const ee=Symbol.for("v-fgt"),Br=Symbol.for("v-txt"),pn=Symbol.for("v-cmt"),er=Symbol.for("v-stc"),vs=[];let ft=null;function _(e=!1){vs.push(ft=e?null:[])}function qd(){vs.pop(),ft=vs[vs.length-1]||null}let Ss=1;function hr(e,t=!1){Ss+=e,e<0&&ft&&t&&(ft.hasOnce=!0)}function Pc(e){return e.dynamicChildren=Ss>0?ft||Bn:null,qd(),Ss>0&&ft&&ft.push(e),e}function b(e,t,n,s,r,o){return Pc(p(e,t,n,s,r,o,!0))}function pr(e,t,n,s,r){return Pc(ye(e,t,n,s,r,!0))}function gr(e){return e?e.__v_isVNode===!0:!1}function os(e,t){return e.type===t.type&&e.key===t.key}const Tc=({key:e})=>e??null,tr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Le(e)||Xe(e)||ce(e)?{i:ut,r:e,k:t,f:!!n}:e:null);function p(e,t=null,n=null,s=0,r=null,o=e===ee?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Tc(t),ref:t&&tr(t),scopeId:ac,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ut};return l?(Si(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=Le(n)?8:16),Ss>0&&!i&&ft&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&ft.push(a),a}const ye=zd;function zd(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===vd)&&(e=pn),gr(e)){const l=Kn(e,t,!0);return n&&Si(l,n),Ss>0&&!o&&ft&&(l.shapeFlag&6?ft[ft.indexOf(e)]=l:ft.push(l)),l.patchFlag=-2,l}if(oh(e)&&(e=e.__vccOpts),t){t=Kd(t);let{class:l,style:a}=t;l&&!Le(l)&&(t.class=_e(l)),Se(a)&&(vi(a)&&!re(a)&&(a=He({},a)),t.style=Yt(a))}const i=Le(e)?1:Nc(e)?128:rd(e)?64:Se(e)?4:ce(e)?2:0;return p(e,t,n,s,r,i,o,!0)}function Kd(e){return e?vi(e)||Cc(e)?He({},e):e:null}function Kn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?Xd(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Tc(c),ref:t&&t.ref?n&&o?re(o)?o.concat(tr(t)):[o,tr(t)]:tr(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ee?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Kn(e.ssContent),ssFallback:e.ssFallback&&Kn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&Ci(u,a.clone(u)),u}function fn(e=" ",t=0){return ye(Br,null,e,t)}function Oc(e,t){const n=ye(er,null,e);return n.staticCount=t,n}function Z(e="",t=!1){return t?(_(),pr(pn,null,e)):ye(pn,null,e)}function Ot(e){return e==null||typeof e=="boolean"?ye(pn):re(e)?ye(ee,null,e.slice()):gr(e)?Vt(e):ye(Br,null,String(e))}function Vt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Kn(e)}function Si(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(re(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Si(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Cc(t)?t._ctx=ut:r===3&&ut&&(ut.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ce(t)?(t={default:t,_ctx:ut},n=32):(t=String(t),s&64?(n=16,t=[fn(t)]):n=8);e.children=t,e.shapeFlag|=n}function Xd(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=_e([t.class,s.class]));else if(r==="style")t.style=Yt([t.style,s.style]);else if(Ir(r)){const o=t[r],i=s[r];i&&o!==i&&!(re(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=s[r])}return t}function It(e,t,n,s=null){jt(e,t,7,[n,s])}const Jd=yc();let Yd=0;function Qd(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Jd,o={uid:Yd++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new kf(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:xc(s,r),emitsOptions:vc(s,r),emit:null,emitted:null,propsDefaults:Ae,inheritAttrs:s.inheritAttrs,ctx:Ae,data:Ae,props:Ae,attrs:Ae,slots:Ae,refs:Ae,setupState:Ae,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=$d.bind(null,o),e.ce&&e.ce(o),o}let ze=null;const Zd=()=>ze||ut;let mr,Do;{const e=Mr(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};mr=t("__VUE_INSTANCE_SETTERS__",n=>ze=n),Do=t("__VUE_SSR_SETTERS__",n=>Es=n)}const Ds=e=>{const t=ze;return mr(e),e.scope.on(),()=>{e.scope.off(),mr(t)}},fl=()=>{ze&&ze.scope.off(),mr(null)};function Mc(e){return e.vnode.shapeFlag&4}let Es=!1;function eh(e,t=!1,n=!1){t&&Do(t);const{props:s,children:r}=e.vnode,o=Mc(e);Md(e,s,o,t),Gd(e,r,n||t);const i=o?th(e,t):void 0;return t&&Do(!1),i}function th(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,bd);const{setup:s}=n;if(s){Qt();const r=e.setupContext=s.length>1?sh(e):null,o=Ds(e),i=Ls(s,e,0,[e.props,r]),l=Oa(i);if(Zt(),o(),(l||e.sp)&&!ms(e)&&dc(e),l){if(i.then(fl,fl),t)return i.then(a=>{dl(e,a)}).catch(a=>{Dr(a,e,0)});e.asyncDep=i}else dl(e,i)}else Lc(e)}function dl(e,t,n){ce(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Se(t)&&(e.setupState=sc(t)),Lc(e)}function Lc(e,t,n){const s=e.type;e.render||(e.render=s.render||Lt);{const r=Ds(e);Qt();try{wd(e)}finally{Zt(),r()}}}const nh={get(e,t){return qe(e,"get",""),e[t]}};function sh(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,nh),slots:e.slots,emit:e.emit,expose:t}}function Fr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(sc(Wf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ys)return ys[n](e)},has(t,n){return n in t||n in ys}})):e.proxy}function rh(e,t=!0){return ce(e)?e.displayName||e.name:e.name||t&&e.__name}function oh(e){return ce(e)&&"__vccOpts"in e}const fe=(e,t)=>Kf(e,t,Es);function Dc(e,t,n){try{hr(-1);const s=arguments.length;return s===2?Se(t)&&!re(t)?gr(t)?ye(e,null,[t]):ye(e,t):ye(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&gr(n)&&(n=[n]),ye(e,t,n))}finally{hr(1)}}const ih="3.5.30";/**
14
+ * @vue/runtime-dom v3.5.30
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let jo;const hl=typeof window<"u"&&window.trustedTypes;if(hl)try{jo=hl.createPolicy("vue",{createHTML:e=>e})}catch{}const jc=jo?e=>jo.createHTML(e):e=>e,lh="http://www.w3.org/2000/svg",ah="http://www.w3.org/1998/Math/MathML",Ht=typeof document<"u"?document:null,pl=Ht&&Ht.createElement("template"),ch={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Ht.createElementNS(lh,e):t==="mathml"?Ht.createElementNS(ah,e):n?Ht.createElement(e,{is:n}):Ht.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Ht.createTextNode(e),createComment:e=>Ht.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ht.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{pl.innerHTML=jc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=pl.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},uh=Symbol("_vtc");function fh(e,t,n){const s=e[uh];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const gl=Symbol("_vod"),dh=Symbol("_vsh"),hh=Symbol(""),ph=/(?:^|;)\s*display\s*:/;function gh(e,t,n){const s=e.style,r=Le(n);let o=!1;if(n&&!r){if(t)if(Le(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&nr(s,l,"")}else for(const i in t)n[i]==null&&nr(s,i,"");for(const i in n)i==="display"&&(o=!0),nr(s,i,n[i])}else if(r){if(t!==n){const i=s[hh];i&&(n+=";"+i),s.cssText=n,o=ph.test(n)}}else t&&e.removeAttribute("style");gl in e&&(e[gl]=o?s.display:"",e[dh]&&(s.display="none"))}const ml=/\s*!important$/;function nr(e,t,n){if(re(n))n.forEach(s=>nr(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=mh(e,t);ml.test(n)?e.setProperty(In(s),n.replace(ml,""),"important"):e[s]=n}}const yl=["Webkit","Moz","ms"],io={};function mh(e,t){const n=io[t];if(n)return n;let s=tt(t);if(s!=="filter"&&s in e)return io[t]=s;s=Tr(s);for(let r=0;r<yl.length;r++){const o=yl[r]+s;if(o in e)return io[t]=o}return t}const vl="http://www.w3.org/1999/xlink";function _l(e,t,n,s,r,o=bf(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(vl,t.slice(6,t.length)):e.setAttributeNS(vl,t,n):n==null||o&&!ja(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Dt(n)?String(n):n)}function bl(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?jc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=ja(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(r||t)}function bn(e,t,n,s){e.addEventListener(t,n,s)}function yh(e,t,n,s){e.removeEventListener(t,n,s)}const wl=Symbol("_vei");function vh(e,t,n,s,r=null){const o=e[wl]||(e[wl]={}),i=o[t];if(s&&i)i.value=s;else{const[l,a]=_h(t);if(s){const c=o[t]=Ch(s,r);bn(e,l,c,a)}else i&&(yh(e,l,i,a),o[t]=void 0)}}const Cl=/(?:Once|Passive|Capture)$/;function _h(e){let t;if(Cl.test(e)){t={};let s;for(;s=e.match(Cl);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):In(e.slice(2)),t]}let lo=0;const bh=Promise.resolve(),wh=()=>lo||(bh.then(()=>lo=0),lo=Date.now());function Ch(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;jt(kh(s,n.value),t,5,[s])};return n.value=e,n.attached=wh(),n}function kh(e,t){if(re(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const kl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xh=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?fh(e,s,i):t==="style"?gh(e,n,s):Ir(t)?ci(t)||vh(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Sh(e,t,s,i))?(bl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&_l(e,t,s,i,o,t!=="value")):e._isVueCE&&(Eh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Le(s)))?bl(e,tt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),_l(e,t,s,i))};function Sh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&kl(t)&&ce(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return kl(t)&&Le(n)?!1:t in e}function Eh(e,t){const n=e._def.props;if(!n)return!1;const s=tt(t);return Array.isArray(n)?n.some(r=>tt(r)===s):Object.keys(n).some(r=>tt(r)===s)}const yr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return re(t)?n=>Qs(t,n):t};function Ah(e){e.target.composing=!0}function xl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Hn=Symbol("_assign");function Sl(e,t,n){return t&&(e=e.trim()),n&&(e=Or(e)),e}const Rh={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Hn]=yr(r);const o=s||r.props&&r.props.type==="number";bn(e,t?"change":"input",i=>{i.target.composing||e[Hn](Sl(e.value,n,o))}),(n||o)&&bn(e,"change",()=>{e.value=Sl(e.value,n,o)}),t||(bn(e,"compositionstart",Ah),bn(e,"compositionend",xl),bn(e,"change",xl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Hn]=yr(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Or(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===a)||(e.value=a))}},Go={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=Nr(t);bn(e,"change",()=>{const o=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?Or(vr(i)):vr(i));e[Hn](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,_i(()=>{e._assigning=!1})}),e[Hn]=yr(s)},mounted(e,{value:t}){El(e,t)},beforeUpdate(e,t,n){e[Hn]=yr(n)},updated(e,{value:t}){e._assigning||El(e,t)}};function El(e,t){const n=e.multiple,s=re(t);if(!(n&&!s&&!Nr(t))){for(let r=0,o=e.options.length;r<o;r++){const i=e.options[r],l=vr(i);if(n)if(s){const a=typeof l;a==="string"||a==="number"?i.selected=t.some(c=>String(c)===String(l)):i.selected=Cf(t,l)>-1}else i.selected=t.has(l);else if(Ms(vr(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function vr(e){return"_value"in e?e._value:e.value}const $h=["ctrl","shift","alt","meta"],Ih={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>$h.some(n=>e[`${n}Key`]&&!t.includes(n))},us=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...o)=>{for(let i=0;i<t.length;i++){const l=Ih[t[i]];if(l&&l(r,t))return}return e(r,...o)}))},Nh=He({patchProp:xh},ch);let Al;function Ph(){return Al||(Al=Fd(Nh))}const Th=((...e)=>{const t=Ph().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Mh(s);if(!r)return;const o=t._component;!ce(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,Oh(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function Oh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Mh(e){return Le(e)?document.querySelector(e):e}/*!
18
+ * vue-router v4.6.4
19
+ * (c) 2025 Eduardo San Martin Morote
20
+ * @license MIT
21
+ */const Ln=typeof document<"u";function Gc(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Lh(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Gc(e.default)}const we=Object.assign;function ao(e,t){const n={};for(const s in t){const r=t[s];n[s]=Et(r)?r.map(e):e(r)}return n}const _s=()=>{},Et=Array.isArray;function Rl(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Bc=/#/g,Dh=/&/g,jh=/\//g,Gh=/=/g,Bh=/\?/g,Fc=/\+/g,Fh=/%5B/g,Uh=/%5D/g,Uc=/%5E/g,Wh=/%60/g,Wc=/%7B/g,Hh=/%7C/g,Hc=/%7D/g,Vh=/%20/g;function Ei(e){return e==null?"":encodeURI(""+e).replace(Hh,"|").replace(Fh,"[").replace(Uh,"]")}function qh(e){return Ei(e).replace(Wc,"{").replace(Hc,"}").replace(Uc,"^")}function Bo(e){return Ei(e).replace(Fc,"%2B").replace(Vh,"+").replace(Bc,"%23").replace(Dh,"%26").replace(Wh,"`").replace(Wc,"{").replace(Hc,"}").replace(Uc,"^")}function zh(e){return Bo(e).replace(Gh,"%3D")}function Kh(e){return Ei(e).replace(Bc,"%23").replace(Bh,"%3F")}function Xh(e){return Kh(e).replace(jh,"%2F")}function As(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Jh=/\/$/,Yh=e=>e.replace(Jh,"");function co(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return a=l>=0&&a>l?-1:a,a>=0&&(s=t.slice(0,a),o=t.slice(a,l>0?l:t.length),r=e(o.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=tp(s??t,n),{fullPath:s+o+i,path:s,query:r,hash:As(i)}}function Qh(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function $l(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Zh(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Xn(t.matched[s],n.matched[r])&&Vc(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Xn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!ep(e[n],t[n]))return!1;return!0}function ep(e,t){return Et(e)?Il(e,t):Et(t)?Il(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Il(e,t){return Et(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function tp(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i<s.length;i++)if(l=s[i],l!==".")if(l==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const sn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Fo=(function(e){return e.pop="pop",e.push="push",e})({}),uo=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function np(e){if(!e)if(Ln){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Yh(e)}const sp=/^[^#]+#/;function rp(e,t){return e.replace(sp,"#")+t}function op(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Ur=()=>({left:window.scrollX,top:window.scrollY});function ip(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=op(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Nl(e,t){return(history.state?history.state.position-t:-1)+e}const Uo=new Map;function lp(e,t){Uo.set(e,t)}function ap(e){const t=Uo.get(e);return Uo.delete(e),t}function cp(e){return typeof e=="string"||e&&typeof e=="object"}function qc(e){return typeof e=="string"||typeof e=="symbol"}let Ne=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const zc=Symbol("");Ne.MATCHER_NOT_FOUND+"",Ne.NAVIGATION_GUARD_REDIRECT+"",Ne.NAVIGATION_ABORTED+"",Ne.NAVIGATION_CANCELLED+"",Ne.NAVIGATION_DUPLICATED+"";function Jn(e,t){return we(new Error,{type:e,[zc]:!0},t)}function Ft(e,t){return e instanceof Error&&zc in e&&(t==null||!!(e.type&t))}const up=["params","query","hash"];function fp(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of up)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function dp(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<n.length;++s){const r=n[s].replace(Fc," "),o=r.indexOf("="),i=As(o<0?r:r.slice(0,o)),l=o<0?null:As(r.slice(o+1));if(i in t){let a=t[i];Et(a)||(a=t[i]=[a]),a.push(l)}else t[i]=l}return t}function Pl(e){let t="";for(let n in e){const s=e[n];if(n=zh(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(Et(s)?s.map(r=>r&&Bo(r)):[s&&Bo(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function hp(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Et(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const pp=Symbol(""),Tl=Symbol(""),Wr=Symbol(""),Ai=Symbol(""),Wo=Symbol("");function is(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function an(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,a)=>{const c=d=>{d===!1?a(Jn(Ne.NAVIGATION_ABORTED,{from:n,to:t})):d instanceof Error?a(d):cp(d)?a(Jn(Ne.NAVIGATION_GUARD_REDIRECT,{from:t,to:d})):(i&&s.enterCallbacks[r]===i&&typeof d=="function"&&i.push(d),l())},u=o(()=>e.call(s&&s.instances[r],t,n,c));let f=Promise.resolve(u);e.length<3&&(f=f.then(c)),f.catch(d=>a(d))})}function fo(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let a=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Gc(a)){const c=(a.__vccOpts||a)[t];c&&o.push(an(c,n,s,i,l,r))}else{let c=a();o.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=Lh(u)?u.default:u;i.mods[l]=u,i.components[l]=f;const d=(f.__vccOpts||f)[t];return d&&an(d,n,s,i,l,r)()}))}}return o}function gp(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;i<o;i++){const l=t.matched[i];l&&(e.matched.find(c=>Xn(c,l))?s.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(c=>Xn(c,a))||r.push(a))}return[n,s,r]}/*!
22
+ * vue-router v4.6.4
23
+ * (c) 2025 Eduardo San Martin Morote
24
+ * @license MIT
25
+ */let mp=()=>location.protocol+"//"+location.host;function Kc(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),$l(l,"")}return $l(n,e)+s+r}function yp(e,t,n,s){let r=[],o=[],i=null;const l=({state:d})=>{const h=Kc(e,location),g=n.value,v=t.value;let x=0;if(d){if(n.value=h,t.value=d,i&&i===g){i=null;return}x=v?d.position-v.position:0}else s(h);r.forEach(S=>{S(n.value,g,{delta:x,type:Fo.pop,direction:x?x>0?uo.forward:uo.back:uo.unknown})})};function a(){i=n.value}function c(d){r.push(d);const h=()=>{const g=r.indexOf(d);g>-1&&r.splice(g,1)};return o.push(h),h}function u(){if(document.visibilityState==="hidden"){const{history:d}=window;if(!d.state)return;d.replaceState(we({},d.state,{scroll:Ur()}),"")}}function f(){for(const d of o)d();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:a,listen:c,destroy:f}}function Ol(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Ur():null}}function vp(e){const{history:t,location:n}=window,s={value:Kc(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(a,c,u){const f=e.indexOf("#"),d=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+a:mp()+e+a;try{t[u?"replaceState":"pushState"](c,"",d),r.value=c}catch(h){console.error(h),n[u?"replace":"assign"](d)}}function i(a,c){o(a,we({},t.state,Ol(r.value.back,a,r.value.forward,!0),c,{position:r.value.position}),!0),s.value=a}function l(a,c){const u=we({},r.value,t.state,{forward:a,scroll:Ur()});o(u.current,u,!0),o(a,we({},Ol(s.value,a,null),{position:u.position+1},c),!1),s.value=a}return{location:s,state:r,push:l,replace:i}}function _p(e){e=np(e);const t=vp(e),n=yp(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=we({location:"",base:e,go:s,createHref:rp.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Cn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var je=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(je||{});const bp={type:Cn.Static,value:""},wp=/[a-zA-Z0-9_]/;function Cp(e){if(!e)return[[]];if(e==="/")return[[bp]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=je.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,a,c="",u="";function f(){c&&(n===je.Static?o.push({type:Cn.Static,value:c}):n===je.Param||n===je.ParamRegExp||n===je.ParamRegExpEnd?(o.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:Cn.Param,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function d(){c+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==je.ParamRegExp){s=n,n=je.EscapeNext;continue}switch(n){case je.Static:a==="/"?(c&&f(),i()):a===":"?(f(),n=je.Param):d();break;case je.EscapeNext:d(),n=s;break;case je.Param:a==="("?n=je.ParamRegExp:wp.test(a)?d():(f(),n=je.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case je.ParamRegExp:a===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+a:n=je.ParamRegExpEnd:u+=a;break;case je.ParamRegExpEnd:f(),n=je.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--,u="";break;default:t("Unknown state");break}}return n===je.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),f(),i(),r}const Ml="[^/]+?",kp={sensitive:!1,strict:!1,start:!0,end:!0};var Qe=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Qe||{});const xp=/[.+*?^${}()[\]/\\]/g;function Sp(e,t){const n=we({},kp,t),s=[];let r=n.start?"^":"";const o=[];for(const c of e){const u=c.length?[]:[Qe.Root];n.strict&&!c.length&&(r+="/");for(let f=0;f<c.length;f++){const d=c[f];let h=Qe.Segment+(n.sensitive?Qe.BonusCaseSensitive:0);if(d.type===Cn.Static)f||(r+="/"),r+=d.value.replace(xp,"\\$&"),h+=Qe.Static;else if(d.type===Cn.Param){const{value:g,repeatable:v,optional:x,regexp:S}=d;o.push({name:g,repeatable:v,optional:x});const A=S||Ml;if(A!==Ml){h+=Qe.BonusCustomRegExp;try{`${A}`}catch(I){throw new Error(`Invalid custom RegExp for param "${g}" (${A}): `+I.message)}}let w=v?`((?:${A})(?:/(?:${A}))*)`:`(${A})`;f||(w=x&&c.length<2?`(?:/${w})`:"/"+w),x&&(w+="?"),r+=w,h+=Qe.Dynamic,x&&(h+=Qe.BonusOptional),v&&(h+=Qe.BonusRepeatable),A===".*"&&(h+=Qe.BonusWildcard)}u.push(h)}s.push(u)}if(n.strict&&n.end){const c=s.length-1;s[c][s[c].length-1]+=Qe.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function l(c){const u=c.match(i),f={};if(!u)return null;for(let d=1;d<u.length;d++){const h=u[d]||"",g=o[d-1];f[g.name]=h&&g.repeatable?h.split("/"):h}return f}function a(c){let u="",f=!1;for(const d of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const h of d)if(h.type===Cn.Static)u+=h.value;else if(h.type===Cn.Param){const{value:g,repeatable:v,optional:x}=h,S=g in c?c[g]:"";if(Et(S)&&!v)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const A=Et(S)?S.join("/"):S;if(!A)if(x)d.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${g}"`);u+=A}}return u||"/"}return{re:i,score:s,keys:o,parse:l,stringify:a}}function Ep(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===Qe.Static+Qe.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Qe.Static+Qe.Segment?1:-1:0}function Xc(e,t){let n=0;const s=e.score,r=t.score;for(;n<s.length&&n<r.length;){const o=Ep(s[n],r[n]);if(o)return o;n++}if(Math.abs(r.length-s.length)===1){if(Ll(s))return 1;if(Ll(r))return-1}return r.length-s.length}function Ll(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Ap={strict:!1,end:!0,sensitive:!1};function Rp(e,t,n){const s=Sp(Cp(e.path),n),r=we(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function $p(e,t){const n=[],s=new Map;t=Rl(Ap,t);function r(f){return s.get(f)}function o(f,d,h){const g=!h,v=jl(f);v.aliasOf=h&&h.record;const x=Rl(t,f),S=[v];if("alias"in f){const I=typeof f.alias=="string"?[f.alias]:f.alias;for(const V of I)S.push(jl(we({},v,{components:h?h.record.components:v.components,path:V,aliasOf:h?h.record:v})))}let A,w;for(const I of S){const{path:V}=I;if(d&&V[0]!=="/"){const N=d.record.path,C=N[N.length-1]==="/"?"":"/";I.path=d.record.path+(V&&C+V)}if(A=Rp(I,d,x),h?h.alias.push(A):(w=w||A,w!==A&&w.alias.push(A),g&&f.name&&!Gl(A)&&i(f.name)),Jc(A)&&a(A),v.children){const N=v.children;for(let C=0;C<N.length;C++)o(N[C],A,h&&h.children[C])}h=h||A}return w?()=>{i(w)}:_s}function i(f){if(qc(f)){const d=s.get(f);d&&(s.delete(f),n.splice(n.indexOf(d),1),d.children.forEach(i),d.alias.forEach(i))}else{const d=n.indexOf(f);d>-1&&(n.splice(d,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function a(f){const d=Pp(f,n);n.splice(d,0,f),f.record.name&&!Gl(f)&&s.set(f.record.name,f)}function c(f,d){let h,g={},v,x;if("name"in f&&f.name){if(h=s.get(f.name),!h)throw Jn(Ne.MATCHER_NOT_FOUND,{location:f});x=h.record.name,g=we(Dl(d.params,h.keys.filter(w=>!w.optional).concat(h.parent?h.parent.keys.filter(w=>w.optional):[]).map(w=>w.name)),f.params&&Dl(f.params,h.keys.map(w=>w.name))),v=h.stringify(g)}else if(f.path!=null)v=f.path,h=n.find(w=>w.re.test(v)),h&&(g=h.parse(v),x=h.record.name);else{if(h=d.name?s.get(d.name):n.find(w=>w.re.test(d.path)),!h)throw Jn(Ne.MATCHER_NOT_FOUND,{location:f,currentLocation:d});x=h.record.name,g=we({},d.params,f.params),v=h.stringify(g)}const S=[];let A=h;for(;A;)S.unshift(A.record),A=A.parent;return{name:x,path:v,params:g,matched:S,meta:Np(S)}}e.forEach(f=>o(f));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:c,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function Dl(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function jl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ip(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ip(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Gl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Np(e){return e.reduce((t,n)=>we(t,n.meta),{})}function Pp(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;Xc(e,t[o])<0?s=o:n=o+1}const r=Tp(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function Tp(e){let t=e;for(;t=t.parent;)if(Jc(t)&&Xc(e,t)===0)return t}function Jc({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Bl(e){const t=kt(Wr),n=kt(Ai),s=fe(()=>{const a=Oe(e.to);return t.resolve(a)}),r=fe(()=>{const{matched:a}=s.value,{length:c}=a,u=a[c-1],f=n.matched;if(!u||!f.length)return-1;const d=f.findIndex(Xn.bind(null,u));if(d>-1)return d;const h=Fl(a[c-2]);return c>1&&Fl(u)===h&&f[f.length-1].path!==h?f.findIndex(Xn.bind(null,a[c-2])):d}),o=fe(()=>r.value>-1&&jp(n.params,s.value.params)),i=fe(()=>r.value>-1&&r.value===n.matched.length-1&&Vc(n.params,s.value.params));function l(a={}){if(Dp(a)){const c=t[Oe(e.replace)?"replace":"push"](Oe(e.to)).catch(_s);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:s,href:fe(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function Op(e){return e.length===1?e[0]:e}const Mp=fc({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Bl,setup(e,{slots:t}){const n=Qn(Bl(e)),{options:s}=kt(Wr),r=fe(()=>({[Ul(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Ul(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Op(t.default(n));return e.custom?o:Dc("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),Lp=Mp;function Dp(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function jp(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Et(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function Fl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ul=(e,t,n)=>e??t??n,Gp=fc({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=kt(Wo),r=fe(()=>e.route||s.value),o=kt(Tl,0),i=fe(()=>{let c=Oe(o);const{matched:u}=r.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),l=fe(()=>r.value.matched[i.value]);Zs(Tl,fe(()=>i.value+1)),Zs(pp,l),Zs(Wo,r);const a=ue();return et(()=>[a.value,l.value,e.name],([c,u,f],[d,h,g])=>{u&&(u.instances[f]=c,h&&h!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Xn(u,h)||!d)&&(u.enterCallbacks[f]||[]).forEach(v=>v(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,f=l.value,d=f&&f.components[u];if(!d)return Wl(n.default,{Component:d,route:c});const h=f.props[u],g=h?h===!0?c.params:typeof h=="function"?h(c):h:null,x=Dc(d,we({},g,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(f.instances[u]=null)},ref:a}));return Wl(n.default,{Component:x,route:c})||x}}});function Wl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Bp=Gp;function Fp(e){const t=$p(e.routes,e),n=e.parseQuery||dp,s=e.stringifyQuery||Pl,r=e.history,o=is(),i=is(),l=is(),a=Hf(sn);let c=sn;Ln&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ao.bind(null,R=>""+R),f=ao.bind(null,Xh),d=ao.bind(null,As);function h(R,H){let W,J;return qc(R)?(W=t.getRecordMatcher(R),J=H):J=R,t.addRoute(J,W)}function g(R){const H=t.getRecordMatcher(R);H&&t.removeRoute(H)}function v(){return t.getRoutes().map(R=>R.record)}function x(R){return!!t.getRecordMatcher(R)}function S(R,H){if(H=we({},H||a.value),typeof R=="string"){const k=co(n,R,H.path),O=t.resolve({path:k.path},H),L=r.createHref(k.fullPath);return we(k,O,{params:d(O.params),hash:As(k.hash),redirectedFrom:void 0,href:L})}let W;if(R.path!=null)W=we({},R,{path:co(n,R.path,H.path).path});else{const k=we({},R.params);for(const O in k)k[O]==null&&delete k[O];W=we({},R,{params:f(k)}),H.params=f(H.params)}const J=t.resolve(W,H),ge=R.hash||"";J.params=u(d(J.params));const m=Qh(s,we({},R,{hash:qh(ge),path:J.path})),y=r.createHref(m);return we({fullPath:m,hash:ge,query:s===Pl?hp(R.query):R.query||{}},J,{redirectedFrom:void 0,href:y})}function A(R){return typeof R=="string"?co(n,R,a.value.path):we({},R)}function w(R,H){if(c!==R)return Jn(Ne.NAVIGATION_CANCELLED,{from:H,to:R})}function I(R){return C(R)}function V(R){return I(we(A(R),{replace:!0}))}function N(R,H){const W=R.matched[R.matched.length-1];if(W&&W.redirect){const{redirect:J}=W;let ge=typeof J=="function"?J(R,H):J;return typeof ge=="string"&&(ge=ge.includes("?")||ge.includes("#")?ge=A(ge):{path:ge},ge.params={}),we({query:R.query,hash:R.hash,params:ge.path!=null?{}:R.params},ge)}}function C(R,H){const W=c=S(R),J=a.value,ge=R.state,m=R.force,y=R.replace===!0,k=N(W,J);if(k)return C(we(A(k),{state:typeof k=="object"?we({},ge,k.state):ge,force:m,replace:y}),H||W);const O=W;O.redirectedFrom=H;let L;return!m&&Zh(s,J,W)&&(L=Jn(Ne.NAVIGATION_DUPLICATED,{to:O,from:J}),ve(J,J,!0,!1)),(L?Promise.resolve(L):F(O,J)).catch(M=>Ft(M)?Ft(M,Ne.NAVIGATION_GUARD_REDIRECT)?M:be(M):$(M,O,J)).then(M=>{if(M){if(Ft(M,Ne.NAVIGATION_GUARD_REDIRECT))return C(we({replace:y},A(M.to),{state:typeof M.to=="object"?we({},ge,M.to.state):ge,force:m}),H||O)}else M=j(O,J,!0,y,ge);return ie(O,J,M),M})}function z(R,H){const W=w(R,H);return W?Promise.reject(W):Promise.resolve()}function se(R){const H=nt.values().next().value;return H&&typeof H.runWithContext=="function"?H.runWithContext(R):R()}function F(R,H){let W;const[J,ge,m]=gp(R,H);W=fo(J.reverse(),"beforeRouteLeave",R,H);for(const k of J)k.leaveGuards.forEach(O=>{W.push(an(O,R,H))});const y=z.bind(null,R,H);return W.push(y),ne(W).then(()=>{W=[];for(const k of o.list())W.push(an(k,R,H));return W.push(y),ne(W)}).then(()=>{W=fo(ge,"beforeRouteUpdate",R,H);for(const k of ge)k.updateGuards.forEach(O=>{W.push(an(O,R,H))});return W.push(y),ne(W)}).then(()=>{W=[];for(const k of m)if(k.beforeEnter)if(Et(k.beforeEnter))for(const O of k.beforeEnter)W.push(an(O,R,H));else W.push(an(k.beforeEnter,R,H));return W.push(y),ne(W)}).then(()=>(R.matched.forEach(k=>k.enterCallbacks={}),W=fo(m,"beforeRouteEnter",R,H,se),W.push(y),ne(W))).then(()=>{W=[];for(const k of i.list())W.push(an(k,R,H));return W.push(y),ne(W)}).catch(k=>Ft(k,Ne.NAVIGATION_CANCELLED)?k:Promise.reject(k))}function ie(R,H,W){l.list().forEach(J=>se(()=>J(R,H,W)))}function j(R,H,W,J,ge){const m=w(R,H);if(m)return m;const y=H===sn,k=Ln?history.state:{};W&&(J||y?r.replace(R.fullPath,we({scroll:y&&k&&k.scroll},ge)):r.push(R.fullPath,ge)),a.value=R,ve(R,H,W,y),be()}let pe;function le(){pe||(pe=r.listen((R,H,W)=>{if(!_t.listening)return;const J=S(R),ge=N(J,_t.currentRoute.value);if(ge){C(we(ge,{replace:!0,force:!0}),J).catch(_s);return}c=J;const m=a.value;Ln&&lp(Nl(m.fullPath,W.delta),Ur()),F(J,m).catch(y=>Ft(y,Ne.NAVIGATION_ABORTED|Ne.NAVIGATION_CANCELLED)?y:Ft(y,Ne.NAVIGATION_GUARD_REDIRECT)?(C(we(A(y.to),{force:!0}),J).then(k=>{Ft(k,Ne.NAVIGATION_ABORTED|Ne.NAVIGATION_DUPLICATED)&&!W.delta&&W.type===Fo.pop&&r.go(-1,!1)}).catch(_s),Promise.reject()):(W.delta&&r.go(-W.delta,!1),$(y,J,m))).then(y=>{y=y||j(J,m,!1),y&&(W.delta&&!Ft(y,Ne.NAVIGATION_CANCELLED)?r.go(-W.delta,!1):W.type===Fo.pop&&Ft(y,Ne.NAVIGATION_ABORTED|Ne.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),ie(J,m,y)}).catch(_s)}))}let Ee=is(),D=is(),T;function $(R,H,W){be(R);const J=D.list();return J.length?J.forEach(ge=>ge(R,H,W)):console.error(R),Promise.reject(R)}function Y(){return T&&a.value!==sn?Promise.resolve():new Promise((R,H)=>{Ee.add([R,H])})}function be(R){return T||(T=!R,le(),Ee.list().forEach(([H,W])=>R?W(R):H()),Ee.reset()),R}function ve(R,H,W,J){const{scrollBehavior:ge}=e;if(!Ln||!ge)return Promise.resolve();const m=!W&&ap(Nl(R.fullPath,0))||(J||!W)&&history.state&&history.state.scroll||null;return _i().then(()=>ge(R,H,m)).then(y=>y&&ip(y)).catch(y=>$(y,R,H))}const Pe=R=>r.go(R);let De;const nt=new Set,_t={currentRoute:a,listening:!0,addRoute:h,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:x,getRoutes:v,resolve:S,options:e,push:I,replace:V,go:Pe,back:()=>Pe(-1),forward:()=>Pe(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:D.add,isReady:Y,install(R){R.component("RouterLink",Lp),R.component("RouterView",Bp),R.config.globalProperties.$router=_t,Object.defineProperty(R.config.globalProperties,"$route",{enumerable:!0,get:()=>Oe(a)}),Ln&&!De&&a.value===sn&&(De=!0,I(r.location).catch(J=>{}));const H={};for(const J in sn)Object.defineProperty(H,J,{get:()=>a.value[J],enumerable:!0});R.provide(Wr,_t),R.provide(Ai,tc(H)),R.provide(Wo,a);const W=R.unmount;nt.add(R),R.unmount=function(){nt.delete(R),nt.size<1&&(c=sn,pe&&pe(),pe=null,a.value=sn,De=!1,T=!1),W()}}};function ne(R){return R.reduce((H,W)=>H.then(()=>se(W)),Promise.resolve())}return _t}function Ri(){return kt(Wr)}function Hr(e){return kt(Ai)}const Hl=document.querySelector("base"),ho=Hl?Hl.getAttribute("href"):"/",Yc=ho.endsWith("/")?ho:ho+"/",Up=Yc.replace(/\/+$/,"");function We(e){return`${Up}/api${e}`}const Wp={class:"app"},Hp={class:"nav-bar"},Vp={key:1,class:"page-scroll"},qp={class:"page-content-wide"},zp={key:2,class:"page-scroll"},Kp={class:"page-content"},Xp={__name:"App",setup(e){const t=ue({queue:!1,cron:!1,limit:[],workflow:!1,realtime:!1,cells:[]}),n=Hr();vt(async()=>{const l=await fetch(We("/config"));l.ok&&(t.value=await l.json())});const s=fe(()=>{var a;const l=[{label:"overview",path:"/"}];return t.value.realtime&&l.push({label:"realtime",path:"/realtime"}),(a=t.value.cells)!=null&&a.length&&l.push({label:"cells",path:"/cells"}),t.value.queue&&l.push({label:"queue",path:"/queue"}),t.value.cron&&l.push({label:"cron",path:"/cron"}),t.value.limit.length&&l.push({label:"limits",path:"/limits"}),t.value.workflow&&(l.push({label:"workflows",path:"/workflows"}),l.push({label:"executions",path:"/executions"})),l});function r(l){return l.path==="/"?n.path==="/":n.path.startsWith(l.path)}const o=fe(()=>n.path.startsWith("/realtime")),i=fe(()=>n.path.startsWith("/cells"));return(l,a)=>{const c=fr("router-link"),u=fr("router-view");return _(),b("div",Wp,[a[0]||(a[0]=p("div",{class:"top-bar"},[p("div",{class:"top-bar-left"},[p("span",{class:"logo"},[fn("prsm "),p("span",null,"devtools")])])],-1)),p("div",Hp,[(_(!0),b(ee,null,he(s.value,f=>(_(),pr(c,{key:f.path,to:f.path,class:_e({active:r(f)})},{default:wi(()=>[fn(E(f.label),1)]),_:2},1032,["to","class"]))),128))]),o.value?(_(),pr(u,{key:0,config:t.value},null,8,["config"])):i.value?(_(),b("div",Vp,[p("div",qp,[ye(u,{config:t.value},null,8,["config"])])])):(_(),b("div",zp,[p("div",Kp,[ye(u,{config:t.value},null,8,["config"])])]))])}}};function js(){const e=ue([]);let t=null;return vt(()=>{t=new EventSource(We("/events"));for(const n of["queue:new","queue:complete","queue:retry","queue:failed","queue:drain","cron:fire","cron:error","workflow:execution:queued","workflow:execution:succeeded","workflow:execution:failed","workflow:execution:canceled","workflow:execution:lease-lost","workflow:step:started","workflow:step:succeeded","workflow:step:routed","workflow:step:retry","workflow:step:failed","cells:change"])t.addEventListener(n,s=>{const r=JSON.parse(s.data);e.value.unshift({type:n,data:r,ts:Date.now()}),e.value.length>400&&(e.value.length=400)})}),nn(()=>{t&&t.close()}),e}const Gt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Jp={class:"subsystems"},Yp=["disabled"],Qp=["disabled"],Zp=["disabled"],eg=["disabled"],tg=["disabled"],ng={key:0,class:"stream"},sg={class:"event-source"},rg={class:"event-data"},og={class:"event-time"},ig={key:1,class:"empty",style:{"text-align":"left",padding:"0"}},lg={__name:"Overview",props:{config:Object},setup(e){const t=e,n=js(),s=ue({queue:!0,cron:!0,limit:!0,workflow:!0,cells:!0});function r(c){return new Date(c).toLocaleTimeString()}function o(c){return c.split(":")[0]}function i(c){const u=c.split(":");return u[0]==="workflow"?u.slice(1).join(":"):u[1]}function l(c){s.value[c]=!s.value[c]}et(()=>t.config,c=>{var u,f;c&&(s.value={queue:!!c.queue,cron:!!c.cron,limit:!!((u=c.limit)!=null&&u.length),workflow:!!c.workflow,cells:!!((f=c.cells)!=null&&f.length)})},{immediate:!0,deep:!0});const a=fe(()=>n.value.filter(c=>s.value[o(c.type)]!==!1));return(c,u)=>{var f,d,h,g,v,x,S,A;return _(),b("div",null,[u[6]||(u[6]=p("div",{class:"section-title"},"subsystems",-1)),p("div",Jp,[p("button",{class:_e(["chip",{on:e.config.queue&&s.value.queue,off:e.config.queue&&!s.value.queue}]),disabled:!e.config.queue,onClick:u[0]||(u[0]=w=>l("queue"))}," queue ",10,Yp),p("button",{class:_e(["chip",{on:e.config.cron&&s.value.cron,off:e.config.cron&&!s.value.cron}]),disabled:!e.config.cron,onClick:u[1]||(u[1]=w=>l("cron"))}," cron ",10,Qp),p("button",{class:_e(["chip",{on:((f=e.config.limit)==null?void 0:f.length)&&s.value.limit,off:((d=e.config.limit)==null?void 0:d.length)&&!s.value.limit}]),disabled:!((h=e.config.limit)!=null&&h.length),onClick:u[2]||(u[2]=w=>l("limit"))}," limit"+E((g=e.config.limit)!=null&&g.length?` (${e.config.limit.length})`:""),11,Zp),p("button",{class:_e(["chip",{on:e.config.workflow&&s.value.workflow,off:e.config.workflow&&!s.value.workflow}]),disabled:!e.config.workflow,onClick:u[3]||(u[3]=w=>l("workflow"))}," workflow ",10,eg),p("button",{class:_e(["chip",{on:((v=e.config.cells)==null?void 0:v.length)&&s.value.cells,off:((x=e.config.cells)==null?void 0:x.length)&&!s.value.cells}]),disabled:!((S=e.config.cells)!=null&&S.length),onClick:u[4]||(u[4]=w=>l("cells"))}," cells"+E((A=e.config.cells)!=null&&A.length?` (${e.config.cells.length})`:""),11,tg)]),p("section",null,[u[5]||(u[5]=p("div",{class:"section-title"},"event stream",-1)),a.value.length?(_(),b("div",ng,[(_(!0),b(ee,null,he(a.value.slice(0,80),(w,I)=>(_(),b("div",{key:I,class:"event-row"},[p("span",sg,E(o(w.type)),1),p("span",{class:_e(["event-action",i(w.type).replace(":","-")])},E(i(w.type)),3),p("span",rg,E(JSON.stringify(w.data)),1),p("span",og,E(r(w.ts)),1)]))),128))])):(_(),b("p",ig,"waiting for events"))])])}}},ag=Gt(lg,[["__scopeId","data-v-5ee7e46a"]]),cg={class:"gauges"},ug={class:"gauge"},fg={class:"gauge"},dg={class:"gauge-value"},hg={class:"gauge"},pg={class:"gauge"},gg={class:"gauge-value"},mg={key:0,class:"stream"},yg={class:"event-data"},vg={class:"event-time"},_g={key:1,class:"empty",style:{"text-align":"left",padding:"0"}},bg={__name:"Queue",setup(e){const t=ue(0),n=js();let s=null;async function r(){const l=await fetch(We("/queue"));if(l.ok){const a=await l.json();t.value=a.inFlight}}vt(()=>{r(),s=setInterval(r,1e3)}),nn(()=>{s&&clearInterval(s)});const o=fe(()=>n.value.filter(l=>l.type.startsWith("queue:")).slice(0,100)),i=fe(()=>{let l=0,a=0,c=0;for(const u of n.value)u.type==="queue:complete"&&l++,u.type==="queue:failed"&&a++,u.type==="queue:retry"&&c++;return{completed:l,failed:a,retried:c}});return(l,a)=>(_(),b("div",null,[a[5]||(a[5]=p("div",{class:"section-title"},"queue",-1)),p("div",cg,[p("div",ug,[p("span",{class:_e(["gauge-value",{lit:t.value>0}])},E(t.value),3),a[0]||(a[0]=p("span",{class:"gauge-label"},"in-flight",-1))]),p("div",fg,[p("span",dg,E(i.value.completed),1),a[1]||(a[1]=p("span",{class:"gauge-label"},"completed",-1))]),p("div",hg,[p("span",{class:_e(["gauge-value",{warn:i.value.failed>0}])},E(i.value.failed),3),a[2]||(a[2]=p("span",{class:"gauge-label"},"failed",-1))]),p("div",pg,[p("span",gg,E(i.value.retried),1),a[3]||(a[3]=p("span",{class:"gauge-label"},"retried",-1))])]),a[6]||(a[6]=p("p",{class:"session-note"},"counts since page load",-1)),p("section",null,[a[4]||(a[4]=p("div",{class:"section-title"},"events",-1)),o.value.length?(_(),b("div",mg,[(_(!0),b(ee,null,he(o.value,(c,u)=>(_(),b("div",{key:u,class:"event-row"},[p("span",{class:_e(["event-action",c.type.split(":")[1]])},E(c.type.split(":")[1]),3),p("span",yg,E(JSON.stringify(c.data)),1),p("span",vg,E(new Date(c.ts).toLocaleTimeString()),1)]))),128))])):(_(),b("p",_g,"no queue events yet"))])]))}},wg=Gt(bg,[["__scopeId","data-v-74a2dfa0"]]),Cg={key:0,class:"card",style:{"margin-bottom":"24px"}},kg={class:"col-name"},xg={class:"col-next"},Sg={key:1,class:"empty",style:{"text-align":"left",padding:"0","margin-bottom":"24px"}},Eg={key:2,class:"stream"},Ag={class:"event-name"},Rg={class:"event-time"},$g={key:3,class:"empty",style:{"text-align":"left",padding:"0"}},Ig={__name:"Cron",setup(e){const t=ue([]),n=js();let s=null;async function r(){const l=await fetch(We("/cron"));if(l.ok){const a=await l.json();t.value=a.jobs}}vt(()=>{r(),s=setInterval(r,2e3)}),nn(()=>{s&&clearInterval(s)});const o=fe(()=>n.value.filter(l=>l.type.startsWith("cron:")).slice(0,100));function i(l){if(!l)return"-";const a=new Date(l).getTime()-Date.now();return a<0?"now":a<1e3?"<1s":`${Math.ceil(a/1e3)}s`}return(l,a)=>(_(),b("div",null,[a[1]||(a[1]=p("div",{class:"section-title"},"registered jobs",-1)),t.value.length?(_(),b("div",Cg,[a[0]||(a[0]=p("div",{class:"job-row header"},[p("span",{class:"col-name"},"name"),p("span",{class:"col-next"},"next fire"),p("span",{class:"col-in"},"in")],-1)),(_(!0),b(ee,null,he(t.value,c=>(_(),b("div",{key:c.name,class:"job-row"},[p("span",kg,E(c.name),1),p("span",xg,E(c.nextFireTime?new Date(c.nextFireTime).toLocaleTimeString():"-"),1),p("span",{class:_e(["col-in",{soon:i(c.nextFireTime)==="<1s"||i(c.nextFireTime)==="now"}])},E(i(c.nextFireTime)),3)]))),128))])):(_(),b("p",Sg,"no cron jobs registered")),a[2]||(a[2]=p("div",{class:"section-title"},"events",-1)),o.value.length?(_(),b("div",Eg,[(_(!0),b(ee,null,he(o.value,(c,u)=>(_(),b("div",{key:u,class:"event-row"},[p("span",{class:_e(["event-action",c.type.split(":")[1]])},E(c.type.split(":")[1]),3),p("span",Ag,E(c.data.name),1),p("span",Rg,E(new Date(c.ts).toLocaleTimeString()),1)]))),128))])):(_(),b("p",$g,"no cron events yet"))]))}},Ng=Gt(Ig,[["__scopeId","data-v-6d545d29"]]);let Fe=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Pg(e){return $i(e)}function $i(e){return Array.isArray(e)?Tg(e):e instanceof RegExp?e:typeof e=="object"?Og(e):e}function Tg(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=$i(e[n]);return t}function Og(e){let t={};for(let n in e)t[n]=$i(e[n]);return t}function Qc(e,...t){return t.forEach(n=>{for(let s in n)e[s]=n[s]}),e}function Zc(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Zc(e.substring(0,e.length-1)):e.substr(~t+1)}var po=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Vs=class{static hasCaptures(e){return e===null?!1:(po.lastIndex=0,po.test(e))}static replaceCaptures(e,t,n){return e.replace(po,(s,r,o,i)=>{let l=n[parseInt(r||o,10)];if(l){let a=t.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return s})}};function eu(e,t){return e<t?-1:e>t?1:0}function tu(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let r=0;r<n;r++){let o=eu(e[r],t[r]);if(o!==0)return o}return 0}return n-s}function Vl(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function nu(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var su=class{constructor(e){P(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},_r=class{constructor(e,t,n){P(this,"_cachedMatchRoot",new su(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Dg(e),t)}static createFromParsedTheme(e,t){return Gg(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,s=this._cachedMatchRoot.get(t).find(r=>Mg(e.parent,r.parentScopes));return s?new ru(s.fontStyle,s.foreground,s.background):null}},go=class sr{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const s of n)t=new sr(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new sr(n,t[s]);return n}push(t){return new sr(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let s=this;for(;s&&s!==t;)n.push(s.scopeName),s=s.parent;return s===t?n.reverse():void 0}};function Mg(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let s=t[n],r=!1;if(s===">"){if(n===t.length-1)return!1;s=t[++n],r=!0}for(;e&&!Lg(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Lg(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var ru=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Dg(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let r=0,o=t.length;r<o;r++){let i=t[r];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let f=i.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),l=f.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let f=i.settings.fontStyle.split(" ");for(let d=0,h=f.length;d<h;d++)switch(f[d]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&Vl(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&Vl(i.settings.background)&&(u=i.settings.background);for(let f=0,d=l.length;f<d;f++){let g=l[f].trim().split(" "),v=g[g.length-1],x=null;g.length>1&&(x=g.slice(0,g.length-1),x.reverse()),n[s++]=new jg(v,x,r,a,c,u)}}return n}var jg=class{constructor(e,t,n,s,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=o}},Ke=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Ke||{});function Gg(e,t){e.sort((a,c)=>{let u=eu(a.scope,c.scope);return u!==0||(u=tu(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,s="#000000",r="#ffffff";for(;e.length>=1&&e[0].scope==="";){let a=e.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(s=a.foreground),a.background!==null&&(r=a.background)}let o=new Bg(t),i=new ru(n,o.getId(s),o.getId(r)),l=new Ug(new Ho(0,null,-1,0,0),[]);for(let a=0,c=e.length;a<c;a++){let u=e[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new _r(o,i,l)}var Bg=class{constructor(e){P(this,"_isFrozen");P(this,"_lastColorId");P(this,"_id2color");P(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Fg=Object.freeze([]),Ho=class ou{constructor(t,n,s,r,o){P(this,"scopeDepth");P(this,"parentScopes");P(this,"fontStyle");P(this,"foreground");P(this,"background");this.scopeDepth=t,this.parentScopes=n||Fg,this.fontStyle=s,this.foreground=r,this.background=o}clone(){return new ou(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let s=0,r=t.length;s<r;s++)n[s]=t[s].clone();return n}acceptOverwrite(t,n,s,r){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},Ug=class Vo{constructor(t,n=[],s={}){P(this,"_rulesWithParentScopes");this._mainRule=t,this._children=s,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let s=0,r=0;for(;t.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=t.parentScopes.length||r>=n.parentScopes.length);){const o=n.parentScopes[r].length-t.parentScopes[s].length;if(o!==0)return o;s++,r++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let s=t.indexOf("."),r,o;if(s===-1?(r=t,o=""):(r=t.substring(0,s),o=t.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vo._cmpBySpecificity),n}insert(t,n,s,r,o,i){if(n===""){this._doInsertHere(t,s,r,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Vo(this._mainRule.clone(),Ho.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,c,s,r,o,i)}_doInsertHere(t,n,s,r,o){if(n===null){this._mainRule.acceptOverwrite(t,s,r,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(tu(a.parentScopes,n)===0){a.acceptOverwrite(t,s,r,o);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Ho(t,n,s,r,o))}},Yn=class dt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=dt.getLanguageId(t),s=dt.getTokenType(t),r=dt.getFontStyle(t),o=dt.getForeground(t),i=dt.getBackground(t);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:o,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,s,r,o,i,l){let a=dt.getLanguageId(t),c=dt.getTokenType(t),u=dt.containsBalancedBrackets(t)?1:0,f=dt.getFontStyle(t),d=dt.getForeground(t),h=dt.getBackground(t);return n!==0&&(a=n),s!==8&&(c=s),r!==null&&(u=r?1:0),o!==-1&&(f=o),i!==0&&(d=i),l!==0&&(h=l),(a<<0|c<<8|u<<10|f<<11|d<<15|h<<24)>>>0}};function br(e,t){const n=[],s=Wg(e);let r=s.next();for(;r!==null;){let a=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let c=i();if(n.push({matcher:c,priority:a}),r!==",")break;r=s.next()}return n;function o(){if(r==="-"){r=s.next();const a=o();return c=>!!a&&!a(c)}if(r==="("){r=s.next();const a=l();return r===")"&&(r=s.next()),a}if(ql(r)){const a=[];do a.push(r),r=s.next();while(ql(r));return c=>t(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(f=>f(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");c=i()}return u=>a.some(f=>f(u))}}function ql(e){return!!e&&!!e.match(/[\w\.:]+/)}function Wg(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}function iu(e){typeof e.dispose=="function"&&e.dispose()}var Rs=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Hg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Vg=class{constructor(){P(this,"_references",[]);P(this,"_seenReferenceKeys",new Set);P(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},qg=class{constructor(e,t){P(this,"seenFullScopeRequests",new Set);P(this,"seenPartialScopeRequests",new Set);P(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Rs(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Vg;for(const n of e)zg(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Rs){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function zg(e,t,n,s){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Rs?rr({baseGrammar:o,selfGrammar:r},s):qo(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},s);const i=n.injections(e.scopeName);if(i)for(const l of i)s.add(new Rs(l))}function qo(e,t,n){if(t.repository&&t.repository[e]){const s=t.repository[e];wr([s],t,n)}}function rr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&wr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&wr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function wr(e,t,n){for(const s of e){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?Qc({},t.repository,s.repository):t.repository;Array.isArray(s.patterns)&&wr(s.patterns,{...t,repository:r},n);const o=s.include;if(!o)continue;const i=lu(o);switch(i.kind){case 0:rr({...t,selfGrammar:t.baseGrammar},n);break;case 1:rr(t,n);break;case 2:qo(i.ruleName,{...t,repository:r},n);break;case 3:case 4:const l=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const a={baseGrammar:t.baseGrammar,selfGrammar:l,repository:r};i.kind===4?qo(i.ruleName,a,n):rr(a,n)}else i.kind===4?n.add(new Hg(i.scopeName,i.ruleName)):n.add(new Rs(i.scopeName));break}}}var Kg=class{constructor(){P(this,"kind",0)}},Xg=class{constructor(){P(this,"kind",1)}},Jg=class{constructor(e){P(this,"kind",2);this.ruleName=e}},Yg=class{constructor(e){P(this,"kind",3);this.scopeName=e}},Qg=class{constructor(e,t){P(this,"kind",4);this.scopeName=e,this.ruleName=t}};function lu(e){if(e==="$base")return new Kg;if(e==="$self")return new Xg;const t=e.indexOf("#");if(t===-1)return new Yg(e);if(t===0)return new Jg(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new Qg(n,s)}}var Zg=/\\(\d+)/,zl=/\\(\d+)/g,em=-1,au=-2;var Gs=class{constructor(e,t,n,s){P(this,"$location");P(this,"id");P(this,"_nameIsCapturing");P(this,"_name");P(this,"_contentNameIsCapturing");P(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Vs.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=Vs.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Zc(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Vs.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Vs.replaceCaptures(this._contentName,e,t)}},tm=class extends Gs{constructor(t,n,s,r,o){super(t,n,s,r);P(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,s,r){throw new Error("Not supported!")}},nm=class extends Gs{constructor(t,n,s,r,o){super(t,n,s,null);P(this,"_match");P(this,"captures");P(this,"_cachedCompiledPatterns");this._match=new $s(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Is,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Kl=class extends Gs{constructor(t,n,s,r,o){super(t,n,s,r);P(this,"hasMissingPatterns");P(this,"patterns");P(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const s of this.patterns)t.getRule(s).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Is,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zo=class extends Gs{constructor(t,n,s,r,o,i,l,a,c,u){super(t,n,s,r);P(this,"_begin");P(this,"beginCaptures");P(this,"_end");P(this,"endHasBackReferences");P(this,"endCaptures");P(this,"applyEndPatternLast");P(this,"hasMissingPatterns");P(this,"patterns");P(this,"_cachedCompiledPatterns");this._begin=new $s(o,this.id),this.beginCaptures=i,this._end=new $s(l||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t,n).compileAG(t,s,r)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Is;for(const s of this.patterns)t.getRule(s).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Cr=class extends Gs{constructor(t,n,s,r,o,i,l,a,c){super(t,n,s,r);P(this,"_begin");P(this,"beginCaptures");P(this,"whileCaptures");P(this,"_while");P(this,"whileHasBackReferences");P(this,"hasMissingPatterns");P(this,"patterns");P(this,"_cachedCompiledPatterns");P(this,"_cachedCompiledWhilePatterns");this._begin=new $s(o,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new $s(l,au),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Is;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,s,r){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,s,r)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Is,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},cu=class Ve{static createCaptureRule(t,n,s,r,o){return t.registerRule(i=>new tm(n,i,s,r,o))}static getCompiledRuleId(t,n,s){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new nm(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ve._compileCaptures(t.captures,n,s));if(typeof t.begin>"u"){t.repository&&(s=Qc({},s,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Kl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ve._compilePatterns(o,n,s))}return t.while?new Cr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ve._compileCaptures(t.beginCaptures||t.captures,n,s),t.while,Ve._compileCaptures(t.whileCaptures||t.captures,n,s),Ve._compilePatterns(t.patterns,n,s)):new zo(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ve._compileCaptures(t.beginCaptures||t.captures,n,s),t.end,Ve._compileCaptures(t.endCaptures||t.captures,n,s),t.applyEndPatternLast,Ve._compilePatterns(t.patterns,n,s))}),t.id}static _compileCaptures(t,n,s){let r=[];if(t){let o=0;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)r[i]=null;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;t[i].patterns&&(a=Ve.getCompiledRuleId(t[i],n,s)),r[l]=Ve.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return r}static _compilePatterns(t,n,s){let r=[];if(t)for(let o=0,i=t.length;o<i;o++){const l=t[o];let a=-1;if(l.include){const c=lu(l.include);switch(c.kind){case 0:case 1:a=Ve.getCompiledRuleId(s[l.include],n,s);break;case 2:let u=s[c.ruleName];u&&(a=Ve.getCompiledRuleId(u,n,s));break;case 3:case 4:const f=c.scopeName,d=c.kind===4?c.ruleName:null,h=n.getExternalGrammar(f,s);if(h)if(d){let g=h.repository[d];g&&(a=Ve.getCompiledRuleId(g,n,h.repository))}else a=Ve.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else a=Ve.getCompiledRuleId(l,n,s);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof Kl||c instanceof zo||c instanceof Cr)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},$s=class uu{constructor(t,n){P(this,"source");P(this,"ruleId");P(this,"hasAnchor");P(this,"hasBackReferences");P(this,"_anchorCache");if(t&&typeof t=="string"){const s=t.length;let r=0,o=[],i=!1;for(let l=0;l<s;l++)if(t.charAt(l)==="\\"&&l+1<s){const c=t.charAt(l+1);c==="z"?(o.push(t.substring(r,l)),o.push("$(?!\\n)(?<!\\n)"),r=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,r===0?this.source=t:(o.push(t.substring(r,s)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Zg.test(this.source):this.hasBackReferences=!1}clone(){return new uu(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let s=n.map(r=>t.substring(r.start,r.end));return zl.lastIndex=0,this.source.replace(zl,(r,o)=>nu(s[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],s=[],r=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),t[o]=l,n[o]=l,s[o]=l,r[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(t[o+1]="￿",n[o+1]="￿",s[o+1]="A",r[o+1]="A"):a==="G"?(t[o+1]="￿",n[o+1]="G",s[o+1]="￿",r[o+1]="G"):(t[o+1]=a,n[o+1]=a,s[o+1]=a,r[o+1]=a),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Is=class{constructor(){P(this,"_items");P(this,"_hasAnchors");P(this,"_cached");P(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Xl(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map(r=>r.resolveAnchors(t,n));return new Xl(e,s,this._items.map(r=>r.ruleId))}},Xl=class{constructor(e,t,n){P(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
26
+ `)}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},mo=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Xt,sm=(Xt=class{constructor(t,n){P(this,"_defaultAttributes");P(this,"_embeddedLanguagesMatcher");P(this,"_getBasicScopeAttributes",new su(t=>{const n=this._scopeToLanguage(t),s=this._toStandardTokenType(t);return new mo(n,s)}));this._defaultAttributes=new mo(t,8),this._embeddedLanguagesMatcher=new rm(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Xt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Xt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},P(Xt,"_NULL_SCOPE_METADATA",new mo(0,0)),P(Xt,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Xt),rm=class{constructor(e){P(this,"values");P(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,s])=>nu(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Jl=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function fu(e,t,n,s,r,o,i,l){const a=t.content.length;let c=!1,u=-1;if(i){const h=om(e,t,n,s,r,o);r=h.stack,s=h.linePos,n=h.isFirstLine,u=h.anchorPosition}const f=Date.now();for(;!c;){if(l!==0&&Date.now()-f>l)return new Jl(r,!0);d()}return new Jl(r,!1);function d(){const h=im(e,t,n,s,r,u);if(!h){o.produce(r,a),c=!0;return}const g=h.captureIndices,v=h.matchedRuleId,x=g&&g.length>0?g[0].end>s:!1;if(v===em){const S=r.getRule(e);o.produce(r,g[0].start),r=r.withContentNameScopesList(r.nameScopesList),fs(e,t,n,r,o,S.endCaptures,g),o.produce(r,g[0].end);const A=r;if(r=r.parent,u=A.getAnchorPos(),!x&&A.getEnterPos()===s){r=A,o.produce(r,a),c=!0;return}}else{const S=e.getRule(v);o.produce(r,g[0].start);const A=r,w=S.getName(t.content,g),I=r.contentNameScopesList.pushAttributed(w,e);if(r=r.push(v,s,u,g[0].end===a,null,I,I),S instanceof zo){const V=S;fs(e,t,n,r,o,V.beginCaptures,g),o.produce(r,g[0].end),u=g[0].end;const N=V.getContentName(t.content,g),C=I.pushAttributed(N,e);if(r=r.withContentNameScopesList(C),V.endHasBackReferences&&(r=r.withEndRule(V.getEndWithResolvedBackReferences(t.content,g))),!x&&A.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(S instanceof Cr){const V=S;fs(e,t,n,r,o,V.beginCaptures,g),o.produce(r,g[0].end),u=g[0].end;const N=V.getContentName(t.content,g),C=I.pushAttributed(N,e);if(r=r.withContentNameScopesList(C),V.whileHasBackReferences&&(r=r.withEndRule(V.getWhileWithResolvedBackReferences(t.content,g))),!x&&A.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(fs(e,t,n,r,o,S.captures,g),o.produce(r,g[0].end),r=r.pop(),!x){r=r.safePop(),o.produce(r,a),c=!0;return}}g[0].end>s&&(s=g[0].end,n=!1)}}function om(e,t,n,s,r,o){let i=r.beginRuleCapturedEOL?0:-1;const l=[];for(let a=r;a;a=a.pop()){const c=a.getRule(e);c instanceof Cr&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=cm(a.rule,e,a.stack.endRule,n,s===i),f=c.findNextMatchSync(t,s,u);if(f){if(f.ruleId!==au){r=a.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(o.produce(a.stack,f.captureIndices[0].start),fs(e,t,n,a.stack,o,a.rule.whileCaptures,f.captureIndices),o.produce(a.stack,f.captureIndices[0].end),i=f.captureIndices[0].end,f.captureIndices[0].end>s&&(s=f.captureIndices[0].end,n=!1))}else{r=a.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}function im(e,t,n,s,r,o){const i=lm(e,t,n,s,r,o),l=e.getInjections();if(l.length===0)return i;const a=am(l,e,t,n,s,r,o);if(!a)return i;if(!i)return a;const c=i.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:i}function lm(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:l,findOptions:a}=du(i,e,r.endRule,n,s===o),c=l.findNextMatchSync(t,s,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function am(e,t,n,s,r,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const f=o.contentNameScopesList.getScopeNames();for(let d=0,h=e.length;d<h;d++){const g=e[d];if(!g.matcher(f))continue;const v=t.getRule(g.ruleId),{ruleScanner:x,findOptions:S}=du(v,t,null,s,r===i),A=x.findNextMatchSync(n,r,S);if(!A)continue;const w=A.captureIndices[0].start;if(!(w>=l)&&(l=w,a=A.captureIndices,c=A.ruleId,u=g.priority,l===r))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function du(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function cm(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function fs(e,t,n,s,r,o,i){if(o.length===0)return;const l=t.content,a=Math.min(o.length,i.length),c=[],u=i[0].end;for(let f=0;f<a;f++){const d=o[f];if(d===null)continue;const h=i[f];if(h.length===0)continue;if(h.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=h.start;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?r.produceFromScopes(c[c.length-1].scopes,h.start):r.produce(s,h.start),d.retokenizeCapturedWithRuleId){const v=d.getName(l,i),x=s.contentNameScopesList.pushAttributed(v,e),S=d.getContentName(l,i),A=x.pushAttributed(S,e),w=s.push(d.retokenizeCapturedWithRuleId,h.start,-1,!1,null,x,A),I=e.createOnigString(l.substring(0,h.end));fu(e,I,n&&h.start===0,h.start,w,r,!1,0),iu(I);continue}const g=d.getName(l,i);if(g!==null){const x=(c.length>0?c[c.length-1].scopes:s.contentNameScopesList).pushAttributed(g,e);c.push(new um(x,h.end))}}for(;c.length>0;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var um=class{constructor(e,t){P(this,"scopes");P(this,"endPos");this.scopes=e,this.endPos=t}};function fm(e,t,n,s,r,o,i,l){return new hm(e,t,n,s,r,o,i,l)}function Yl(e,t,n,s,r){const o=br(t,kr),i=cu.getCompiledRuleId(n,s,r.repository);for(const l of o)e.push({debugSelector:t,matcher:l.matcher,ruleId:i,grammar:r,priority:l.priority})}function kr(e,t){if(t.length<e.length)return!1;let n=0;return e.every(s=>{for(let r=n;r<t.length;r++)if(dm(t[r],s))return n=r+1,!0;return!1})}function dm(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var hm=class{constructor(e,t,n,s,r,o,i,l){P(this,"_rootId");P(this,"_lastRuleId");P(this,"_ruleId2desc");P(this,"_includedGrammars");P(this,"_grammarRepository");P(this,"_grammar");P(this,"_injections");P(this,"_basicScopeAttributesProvider");P(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new sm(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=Ql(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const a of Object.keys(r)){const c=br(a,kr);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:r[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},t=[],n=this._rootScopeName,s=e.lookup(n);if(s){const r=s.injections;if(r)for(let i in r)Yl(t,i,r[i],this,s);const o=this._grammarRepository.injections(n);o&&o.forEach(i=>{const l=this.getExternalGrammar(i);if(l){const a=l.injectionSelector;a&&Yl(t,a,l,this,l)}})}return t.sort((r,o)=>r.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Ql(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){this._rootId===-1&&(this._rootId=cu.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!t||t===Ko.NULL){r=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),f=Yn.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null);let h;d?h=bs.createRootAndLookUpScopeName(d,f,this):h=bs.createRoot("unknown",f),t=new Ko(null,this._rootId,-1,-1,!1,null,h,h)}else r=!1,t.reset();e=e+`
27
+ `;const o=this.createOnigString(e),i=o.content.length,l=new gm(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=fu(this,o,r,0,t,l,!0,s);return iu(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Ql(e,t){return e=Pg(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var bs=class Nt{constructor(t,n,s){this.parent=t,this.scopePath=n,this.tokenAttributes=s}static fromExtension(t,n){let s=t,r=(t==null?void 0:t.scopePath)??null;for(const o of n)r=go.push(r,o.scopeNames),s=new Nt(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new Nt(null,new go(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new go(null,t),i=s.themeProvider.themeMatch(o),l=Nt.mergeAttributes(n,r,i);return new Nt(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Nt.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,s){let r=-1,o=0,i=0;return s!==null&&(r=s.fontStyle,o=s.foregroundId,i=s.backgroundId),Yn.set(t,n.languageId,n.tokenType,null,r,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Nt._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=Nt._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,s){const r=s.getMetadataForScope(n),o=t.scopePath.push(n),i=s.themeProvider.themeMatch(o),l=Nt.mergeAttributes(t.tokenAttributes,r,i);return new Nt(t,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var r;const n=[];let s=this;for(;s&&s!==t;)n.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(((r=s.parent)==null?void 0:r.scopePath)??null)}),s=s.parent;return s===t?n.reverse():void 0}},ht,Ko=(ht=class{constructor(t,n,s,r,o,i,l,a){P(this,"_stackElementBrand");P(this,"_enterPos");P(this,"_anchorPos");P(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}equals(t){return t===null?!1:ht._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?bs.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ht._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,l){return new ht(this,t,n,s,r,o,i,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var s,r;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(s=this.nameScopesList)==null?void 0:s.toString()}, ${(r=this.contentNameScopesList)==null?void 0:r.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ht(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,s;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((s=this.contentNameScopesList)==null?void 0:s.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const s=bs.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new ht(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,bs.fromExtension(s,n.contentNameScopesList))}},P(ht,"NULL",new ht(null,0,0,0,!1,null,null,null)),ht),pm=class{constructor(e,t){P(this,"balancedBracketScopes");P(this,"unbalancedBracketScopes");P(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):br(n,kr).map(s=>s.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>br(n,kr).map(s=>s.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},gm=class{constructor(e,t,n,s){P(this,"_emitBinaryTokens");P(this,"_lineText");P(this,"_tokens");P(this,"_binaryTokens");P(this,"_lastTokenEndIndex");P(this,"_tokenTypeOverrides");this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var s;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((s=this.balancedBracketSelectors)!=null&&s.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=(e==null?void 0:e.getScopeNames())??[];for(const l of this._tokenTypeOverrides)l.matcher(i)&&(r=Yn.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=Yn.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},mm=class{constructor(e,t){P(this,"_grammars",new Map);P(this,"_rawGrammars",new Map);P(this,"_injectionGrammars",new Map);P(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,s,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,fm(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},ym=class{constructor(t){P(this,"_options");P(this,"_syncRegistry");P(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new mm(_r.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(_r.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,s){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:s})}loadGrammarWithConfiguration(t,n,s){return this._loadGrammar(t,n,s.embeddedLanguages,s.tokenTypes,new pm(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,s,r,o){const i=new qg(this._syncRegistry,t);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(t,n,s,r,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const s=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(t,n=[],s=0,r=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,s,r)}_grammarForScopeName(t,n=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,s,r,o)}},Xo=Ko.NULL;const vm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Bs{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}Bs.prototype.normal={};Bs.prototype.property={};Bs.prototype.space=void 0;function hu(e,t){const n={},s={};for(const r of e)Object.assign(n,r.property),Object.assign(s,r.normal);return new Bs(n,s,t)}function Jo(e){return e.toLowerCase()}class lt{constructor(t,n){this.attribute=n,this.property=t}}lt.prototype.attribute="";lt.prototype.booleanish=!1;lt.prototype.boolean=!1;lt.prototype.commaOrSpaceSeparated=!1;lt.prototype.commaSeparated=!1;lt.prototype.defined=!1;lt.prototype.mustUseProperty=!1;lt.prototype.number=!1;lt.prototype.overloadedBoolean=!1;lt.prototype.property="";lt.prototype.spaceSeparated=!1;lt.prototype.space=void 0;let _m=0;const de=Nn(),Me=Nn(),Yo=Nn(),B=Nn(),$e=Nn(),Vn=Nn(),ct=Nn();function Nn(){return 2**++_m}const Qo=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:Me,commaOrSpaceSeparated:ct,commaSeparated:Vn,number:B,overloadedBoolean:Yo,spaceSeparated:$e},Symbol.toStringTag,{value:"Module"})),yo=Object.keys(Qo);class Ii extends lt{constructor(t,n,s,r){let o=-1;if(super(t,n),Zl(this,"space",r),typeof s=="number")for(;++o<yo.length;){const i=yo[o];Zl(this,yo[o],(s&Qo[i])===Qo[i])}}}Ii.prototype.defined=!0;function Zl(e,t,n){n&&(e[t]=n)}function Zn(e){const t={},n={};for(const[s,r]of Object.entries(e.properties)){const o=new Ii(s,e.transform(e.attributes||{},s),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[Jo(s)]=s,n[Jo(o.attribute)]=s}return new Bs(t,n,e.space)}const pu=Zn({properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:$e,ariaCurrent:null,ariaDescribedBy:$e,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:$e,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:$e,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$e,ariaLevel:B,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:$e,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:$e,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:Me,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function gu(e,t){return t in e?e[t]:t}function mu(e,t){return gu(e,t.toLowerCase())}const bm=Zn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vn,acceptCharset:$e,accessKey:$e,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:$e,autoFocus:de,autoPlay:de,blocking:$e,capture:null,charSet:null,checked:de,cite:null,className:$e,cols:B,colSpan:null,content:null,contentEditable:Me,controls:de,controlsList:$e,coords:B|Vn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Yo,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:$e,height:B,hidden:Yo,high:B,href:null,hrefLang:null,htmlFor:$e,httpEquiv:$e,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:$e,itemRef:$e,itemScope:de,itemType:$e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,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:de,optimum:B,pattern:null,ping:$e,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:$e,required:de,reversed:de,rows:B,rowSpan:B,sandbox:$e,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:Me,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$e,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:B,security:null,unselectable:null},space:"html",transform:mu}),wm=Zn({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:ct,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:$e,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:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,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:Vn,g2:Vn,glyphName:Vn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:ct,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,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:B,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:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ct,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ct,rev:ct,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ct,requiredFeatures:ct,requiredFonts:ct,requiredFormats:ct,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:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:ct,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ct,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ct,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:gu}),yu=Zn({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()}}),vu=Zn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mu}),_u=Zn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Cm=/[A-Z]/g,ea=/-[a-z]/g,km=/^data[-\w.:]+$/i;function xm(e,t){const n=Jo(t);let s=t,r=lt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&km.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ea,Em);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ea.test(o)){let i=o.replace(Cm,Sm);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}r=Ii}return new r(s,t)}function Sm(e){return"-"+e.toLowerCase()}function Em(e){return e.charAt(1).toUpperCase()}const Am=hu([pu,bm,yu,vu,_u],"html"),bu=hu([pu,wm,yu,vu,_u],"svg"),ta={}.hasOwnProperty;function Rm(e,t){const n=t||{};function s(r,...o){let i=s.invalid;const l=s.handlers;if(r&&ta.call(r,e)){const a=String(r[e]);i=ta.call(l,a)?l[a]:s.unknown}if(i)return i.call(this,r,...o)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}const $m=/["&'<>`]/g,Im=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Nm=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Pm=/[|\\{}()[\]^$+*?.]/g,na=new WeakMap;function Tm(e,t){if(e=e.replace(t.subset?Om(t.subset):$m,s),t.subset||t.escapeOnly)return e;return e.replace(Im,n).replace(Nm,s);function n(r,o,i){return t.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),t)}function s(r,o,i){return t.format(r.charCodeAt(0),i.charCodeAt(o+1),t)}}function Om(e){let t=na.get(e);return t||(t=Mm(e),na.set(e,t)),t}function Mm(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Pm,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Lm=/[\dA-Fa-f]/;function Dm(e,t,n){const s="&#x"+e.toString(16).toUpperCase();return n&&t&&!Lm.test(String.fromCharCode(t))?s:s+";"}const jm=/\d/;function Gm(e,t,n){const s="&#"+String(e);return n&&t&&!jm.test(String.fromCharCode(t))?s:s+";"}const Bm=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],vo={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Fm=["cent","copy","divide","gt","lt","not","para","times"],wu={}.hasOwnProperty,Zo={};let qs;for(qs in vo)wu.call(vo,qs)&&(Zo[vo[qs]]=qs);const Um=/[^\dA-Za-z]/;function Wm(e,t,n,s){const r=String.fromCharCode(e);if(wu.call(Zo,r)){const o=Zo[r],i="&"+o;return n&&Bm.includes(o)&&!Fm.includes(o)&&(!s||t&&t!==61&&Um.test(String.fromCharCode(t)))?i:i+";"}return""}function Hm(e,t,n){let s=Dm(e,t,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=Wm(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const o=Gm(e,t,n.omitOptionalSemicolons);o.length<s.length&&(s=o)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function qn(e,t){return Tm(e,Object.assign({format:Hm},t))}const Vm=/^>|^->|<!--|-->|--!>|<!-$/g,qm=[">"],zm=["<",">"];function Km(e,t,n,s){return s.settings.bogusComments?"<?"+qn(e.value,Object.assign({},s.settings.characterReferences,{subset:qm}))+">":"<!--"+e.value.replace(Vm,r)+"-->";function r(o){return qn(o,Object.assign({},s.settings.characterReferences,{subset:zm}))}}function Xm(e,t,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}function sa(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,r=n.indexOf(t);for(;r!==-1;)s++,r=n.indexOf(t,r+t.length);return s}function Jm(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Ym(e){return e.join(" ").trim()}const Qm=/[ \t\n\f\r]/g;function Ni(e){return typeof e=="object"?e.type==="text"?ra(e.value):!1:ra(e)}function ra(e){return e.replace(Qm,"")===""}const Be=ku(1),Cu=ku(-1),Zm=[];function ku(e){return t;function t(n,s,r){const o=n?n.children:Zm;let i=(s||0)+e,l=o[i];if(!r)for(;l&&Ni(l);)i+=e,l=o[i];return l}}const ey={}.hasOwnProperty;function xu(e){return t;function t(n,s,r){return ey.call(e,n.tagName)&&e[n.tagName](n,s,r)}}const Pi=xu({body:ny,caption:_o,colgroup:_o,dd:iy,dt:oy,head:_o,html:ty,li:ry,optgroup:ly,option:ay,p:sy,rp:oa,rt:oa,tbody:uy,td:ia,tfoot:fy,th:ia,thead:cy,tr:dy});function _o(e,t,n){const s=Be(n,t,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&Ni(s.value.charAt(0)))}function ty(e,t,n){const s=Be(n,t);return!s||s.type!=="comment"}function ny(e,t,n){const s=Be(n,t);return!s||s.type!=="comment"}function sy(e,t,n){const s=Be(n,t);return s?s.type==="element"&&(s.tagName==="address"||s.tagName==="article"||s.tagName==="aside"||s.tagName==="blockquote"||s.tagName==="details"||s.tagName==="div"||s.tagName==="dl"||s.tagName==="fieldset"||s.tagName==="figcaption"||s.tagName==="figure"||s.tagName==="footer"||s.tagName==="form"||s.tagName==="h1"||s.tagName==="h2"||s.tagName==="h3"||s.tagName==="h4"||s.tagName==="h5"||s.tagName==="h6"||s.tagName==="header"||s.tagName==="hgroup"||s.tagName==="hr"||s.tagName==="main"||s.tagName==="menu"||s.tagName==="nav"||s.tagName==="ol"||s.tagName==="p"||s.tagName==="pre"||s.tagName==="section"||s.tagName==="table"||s.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ry(e,t,n){const s=Be(n,t);return!s||s.type==="element"&&s.tagName==="li"}function oy(e,t,n){const s=Be(n,t);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function iy(e,t,n){const s=Be(n,t);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function oa(e,t,n){const s=Be(n,t);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function ly(e,t,n){const s=Be(n,t);return!s||s.type==="element"&&s.tagName==="optgroup"}function ay(e,t,n){const s=Be(n,t);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function cy(e,t,n){const s=Be(n,t);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function uy(e,t,n){const s=Be(n,t);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function fy(e,t,n){return!Be(n,t)}function dy(e,t,n){const s=Be(n,t);return!s||s.type==="element"&&s.tagName==="tr"}function ia(e,t,n){const s=Be(n,t);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const hy=xu({body:my,colgroup:yy,head:gy,html:py,tbody:vy});function py(e){const t=Be(e,-1);return!t||t.type!=="comment"}function gy(e){const t=new Set;for(const s of e.children)if(s.type==="element"&&(s.tagName==="base"||s.tagName==="title")){if(t.has(s.tagName))return!1;t.add(s.tagName)}const n=e.children[0];return!n||n.type==="element"}function my(e){const t=Be(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Ni(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function yy(e,t,n){const s=Cu(n,t),r=Be(e,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&Pi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function vy(e,t,n){const s=Cu(n,t),r=Be(e,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&Pi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const zs={name:[[`
28
+ \f\r &/=>`.split(""),`
29
+ \f\r "&'/=>\``.split("")],[`\0
30
+ \f\r "&'/<=>`.split(""),`\0
31
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
32
+ \f\r &>`.split(""),`\0
33
+ \f\r "&'<=>\``.split("")],[`\0
34
+ \f\r "&'<=>\``.split(""),`\0
35
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function _y(e,t,n,s){const r=s.schema,o=r.space==="svg"?!1:s.settings.omitOptionalTags;let i=r.space==="svg"?s.settings.closeEmptyElements:s.settings.voids.includes(e.tagName.toLowerCase());const l=[];let a;r.space==="html"&&e.tagName==="svg"&&(s.schema=bu);const c=by(s,e.properties),u=s.all(r.space==="html"&&e.tagName==="template"?e.content:e);return s.schema=r,u&&(i=!1),(c||!o||!hy(e,t,n))&&(l.push("<",e.tagName,c?" "+c:""),i&&(r.space==="svg"||s.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!s.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!i&&(!o||!Pi(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function by(e,t){const n=[];let s=-1,r;if(t){for(r in t)if(t[r]!==null&&t[r]!==void 0){const o=wy(e,r,t[r]);o&&n.push(o)}}for(;++s<n.length;){const o=e.settings.tightAttributes?n[s].charAt(n[s].length-1):void 0;s!==n.length-1&&o!=='"'&&o!=="'"&&(n[s]+=" ")}return n.join("")}function wy(e,t,n){const s=xm(e.schema,t),r=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let i=e.quote,l;if(s.overloadedBoolean&&(n===s.attribute||n==="")?n=!0:(s.boolean||s.overloadedBoolean)&&(typeof n!="string"||n===s.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=qn(s.attribute,Object.assign({},e.settings.characterReferences,{subset:zs.name[r][o]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?Jm:Ym)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(l=qn(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:zs.unquoted[r][o]}))),l!==n&&(e.settings.quoteSmart&&sa(n,i)>sa(n,e.alternative)&&(i=e.alternative),l=i+qn(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?zs.single:zs.double)[r][o],attribute:!0}))+i),a+(l&&"="+l))}const Cy=["<","&"];function Su(e,t,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:qn(e.value,Object.assign({},s.settings.characterReferences,{subset:Cy}))}function ky(e,t,n,s){return s.settings.allowDangerousHtml?e.value:Su(e,t,n,s)}function xy(e,t,n,s){return s.all(e)}const Sy=Rm("type",{invalid:Ey,unknown:Ay,handlers:{comment:Km,doctype:Xm,element:_y,raw:ky,root:xy,text:Su}});function Ey(e){throw new Error("Expected node, not `"+e+"`")}function Ay(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Ry={},$y={},Iy=[];function Ny(e,t){const n=t||Ry,s=n.quote||'"',r=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:Py,all:Ty,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||vm,characterReferences:n.characterReferences||$y,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?bu:Am,quote:s,alternative:r}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Py(e,t,n){return Sy(e,t,n,this)}function Ty(e){const t=[],n=e&&e.children||Iy;let s=-1;for(;++s<n.length;)t[s]=this.one(n[s],s,e);return t.join("")}function xr(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},s=typeof e=="string"?e:e.name;for(const[r,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[r]=o:r===s&&Object.assign(n,o);return n}function dn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function Oy(e){return Array.isArray(e)?e:[e]}async function Eu(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Ti(e){return!e||["plaintext","txt","text","plain"].includes(e)}function My(e){return e==="ansi"||Ti(e)}function Oi(e){return e==="none"}function Ly(e){return Oi(e)}function Au(e,t){var s;if(!t)return e;e.properties||(e.properties={}),(s=e.properties).class||(s.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function Vr(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let s=0;const r=[];for(let i=0;i<n.length;i+=2){const l=t?n[i]+(n[i+1]||""):n[i];r.push([l,s]),s+=n[i].length,s+=((o=n[i+1])==null?void 0:o.length)||0}return r}function Dy(e){const t=Vr(e,!0).map(([r])=>r);function n(r){if(r===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=r,i=0;for(const l of t){if(o<l.length)break;o-=l.length,i++}return{line:i,character:o}}function s(r,o){let i=0;for(let l=0;l<r;l++)i+=t[l].length;return i+=o,i}return{lines:t,indexToPos:n,posToIndex:s}}const Mi="light-dark()",jy=["color","background-color"];function Gy(e,t){let n=0;const s=[];for(const r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s}function By(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((s,r)=>s-r);return n.length?e.map(s=>s.flatMap(r=>{const o=n.filter(i=>r.offset<i&&i<r.offset+r.content.length).map(i=>i-r.offset).sort((i,l)=>i-l);return o.length?Gy(r,o):r})):e}function Fy(e,t,n,s,r="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},i=t.map(u=>Sr(e.variants[u])),l=new Set(i.flatMap(u=>Object.keys(u))),a={},c=(u,f)=>{const d=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+t[u]+(f==="color"?"":d)};return i.forEach((u,f)=>{for(const d of l){const h=u[d]||"inherit";if(f===0&&s&&jy.includes(d))if(s===Mi&&i.length>1){const g=t.findIndex(A=>A==="light"),v=t.findIndex(A=>A==="dark");if(g===-1||v===-1)throw new Fe('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const x=i[g][d]||"inherit",S=i[v][d]||"inherit";a[d]=`light-dark(${x}, ${S})`,r==="css-vars"&&(a[c(f,d)]=h)}else a[d]=h;else r==="css-vars"&&(a[c(f,d)]=h)}}),o.htmlStyle=a,o}function Sr(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Ke.Italic&&(t["font-style"]="italic"),e.fontStyle&Ke.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Ke.Underline&&n.push("underline"),e.fontStyle&Ke.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function ei(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Ru=new WeakMap;function qr(e,t){Ru.set(e,t)}function Ns(e){return Ru.get(e)}class es{constructor(...t){P(this,"_stacks",{});P(this,"lang");if(t.length===2){const[n,s]=t;this.lang=s,this._stacks=n}else{const[n,s,r]=t;this.lang=s,this._stacks={[r]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new es(Object.fromEntries(Oy(n).map(s=>[s,Xo])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Uy(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Uy(e){const t=[],n=new Set;function s(r){var i;if(n.has(r))return;n.add(r);const o=(i=r==null?void 0:r.nameScopesList)==null?void 0:i.scopeName;o&&t.push(o),r.parent&&s(r.parent)}return s(e),t}function Wy(e,t){if(!(e instanceof es))throw new Fe("Invalid grammar state");return e.getInternalStack(t)}function Hy(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let s=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new Fe(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...r.indexToPos(i),offset:i}}else{const l=r.lines[i.line];if(l===void 0)throw new Fe(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${r.lines.length}`);let a=i.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new Fe(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${l.length}`);return{...i,character:a,offset:r.posToIndex(i.line,a)}}};const r=Dy(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));Vy(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var i;if(!((i=this.options.decorations)!=null&&i.length))return;const r=t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return By(n,r)},code(n){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const s=t(this),r=Array.from(n.children).filter(f=>f.type==="element"&&f.tagName==="span");if(r.length!==s.converter.lines.length)throw new Fe(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function o(f,d,h,g){const v=r[f];let x="",S=-1,A=-1;if(d===0&&(S=0),h===0&&(A=0),h===Number.POSITIVE_INFINITY&&(A=v.children.length),S===-1||A===-1)for(let I=0;I<v.children.length;I++)x+=$u(v.children[I]),S===-1&&x.length===d&&(S=I+1),A===-1&&x.length===h&&(A=I+1);if(S===-1)throw new Fe(`Failed to find start index for decoration ${JSON.stringify(g.start)}`);if(A===-1)throw new Fe(`Failed to find end index for decoration ${JSON.stringify(g.end)}`);const w=v.children.slice(S,A);if(!g.alwaysWrap&&w.length===v.children.length)l(v,g,"line");else if(!g.alwaysWrap&&w.length===1&&w[0].type==="element")l(w[0],g,"token");else{const I={type:"element",tagName:"span",properties:{},children:w};l(I,g,"wrapper"),v.children.splice(S,w.length,I)}}function i(f,d){r[f]=l(r[f],d,"line")}function l(f,d,h){var x;const g=d.properties||{},v=d.transform||(S=>S);return f.tagName=d.tagName||"span",f.properties={...f.properties,...g,class:f.properties.class},(x=d.properties)!=null&&x.class&&Au(f,d.properties.class),f=v(f,h)||f,f}const a=[],c=s.decorations.sort((f,d)=>d.start.offset-f.start.offset||f.end.offset-d.end.offset);for(const f of c){const{start:d,end:h}=f;if(d.line===h.line)o(d.line,d.character,h.character,f);else if(d.line<h.line){o(d.line,d.character,Number.POSITIVE_INFINITY,f);for(let g=d.line+1;g<h.line;g++)a.unshift(()=>i(g,f));o(h.line,0,h.character,f)}}a.forEach(f=>f())}}}function Vy(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Fe(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let s=t+1;s<e.length;s++){const r=e[s],o=n.start.offset<=r.start.offset&&r.start.offset<n.end.offset,i=n.start.offset<r.end.offset&&r.end.offset<=n.end.offset,l=r.start.offset<=n.start.offset&&n.start.offset<r.end.offset,a=r.start.offset<n.end.offset&&n.end.offset<=r.end.offset;if(o||i||l||a){if(o&&i||l&&a||l&&n.start.offset===n.end.offset||i&&r.start.offset===r.end.offset)continue;throw new Fe(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function $u(e){return e.type==="text"?e.value:e.type==="element"?e.children.map($u).join(""):""}const qy=[Hy()];function Er(e){const t=zy(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...qy]}function zy(e){const t=[],n=[],s=[];for(const r of e)switch(r.enforce){case"pre":t.push(r);break;case"post":n.push(r);break;default:s.push(r)}return{pre:t,post:n,normal:s}}var kn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],bo={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Ky(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const s=e.indexOf("m",n);if(s!==-1)return{sequence:e.substring(n+2,s).split(";"),startPosition:n,position:s+1}}return{position:e.length}}function la(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(s=>Number.parseInt(s));return n.length!==3||n.some(s=>Number.isNaN(s))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function Xy(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(s===0)t.push({type:"resetAll"});else if(s<=9)bo[s]&&t.push({type:"setDecoration",value:bo[s]});else if(s<=29){const r=bo[s-20];r&&(t.push({type:"resetDecoration",value:r}),r==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:kn[s-30]}});else if(s===38){const r=la(e);r&&t.push({type:"setForegroundColor",value:r})}else if(s===39)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:kn[s-40]}});else if(s===48){const r=la(e);r&&t.push({type:"setBackgroundColor",value:r})}else s===49?t.push({type:"resetBackgroundColor"}):s===53?t.push({type:"setDecoration",value:"overline"}):s===55?t.push({type:"resetDecoration",value:"overline"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:kn[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:kn[s-100+8]}})}return t}function Jy(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let o=0;do{const i=Ky(s,o),l=i.sequence?s.substring(o,i.startPosition):s.substring(o);if(l.length>0&&r.push({value:l,foreground:e,background:t,decorations:new Set(n)}),i.sequence){const a=Xy(i.sequence);for(const c of a)c.type==="resetAll"?(e=null,t=null,n.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of a)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&n.add(c.value)}o=i.position}while(o<s.length);return r}}}var Yy={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Qy(e=Yy){function t(l){return e[l]}function n(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let s;function r(){if(s)return s;s=[];for(let c=0;c<kn.length;c++)s.push(t(kn[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let f=0;f<6;f++)s.push(n([l[c],l[u],l[f]]));let a=8;for(let c=0;c<24;c++,a+=10)s.push(n([a,a,a]));return s}function o(l){return r()[l]}function i(l){switch(l.type){case"named":return t(l.name);case"rgb":return n(l.rgb);case"table":return o(l.index)}}return{value:i}}const Zy={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function ev(e,t,n){const s=xr(e,n),r=Vr(t),o=Object.fromEntries(kn.map(a=>{var f;const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=(f=e.colors)==null?void 0:f[c];return[a,u||Zy[a]]})),i=Qy(o),l=Jy();return r.map(a=>l.parse(a[0]).map(c=>{let u,f;c.decorations.has("reverse")?(u=c.background?i.value(c.background):e.bg,f=c.foreground?i.value(c.foreground):e.fg):(u=c.foreground?i.value(c.foreground):e.fg,f=c.background?i.value(c.background):void 0),u=dn(u,s),f=dn(f,s),c.decorations.has("dim")&&(u=tv(u));let d=Ke.None;return c.decorations.has("bold")&&(d|=Ke.Bold),c.decorations.has("italic")&&(d|=Ke.Italic),c.decorations.has("underline")&&(d|=Ke.Underline),c.decorations.has("strikethrough")&&(d|=Ke.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:f,fontStyle:d}}))}function tv(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const s=t[1];if(s.length===8){const r=Math.round(Number.parseInt(s.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${s.slice(0,6)}${r}`}else{if(s.length===6)return`#${s}80`;if(s.length===4){const r=s[0],o=s[1],i=s[2],l=s[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${r}${r}${o}${o}${i}${i}${a}`}else if(s.length===3){const r=s[0],o=s[1],i=s[2];return`#${r}${r}${o}${o}${i}${i}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Li(e,t,n={}){const{theme:s=e.getLoadedThemes()[0]}=n,r=e.resolveLangAlias(n.lang||"text");if(Ti(r)||Oi(s))return Vr(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:i}=e.setTheme(s);if(r==="ansi")return ev(o,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new Fe(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Fe(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return sv(t,l,o,i,n)}function nv(...e){if(e.length===2)return Ns(e[1]);const[t,n,s={}]=e,{lang:r="text",theme:o=t.getLoadedThemes()[0]}=s;if(Ti(r)||Oi(o))throw new Fe("Plain language does not have grammar state");if(r==="ansi")throw new Fe("ANSI language does not have grammar state");const{theme:i,colorMap:l}=t.setTheme(o),a=t.getLanguage(r);return new es(Di(n,a,i,l,s).stateStack,a.name,i.name)}function sv(e,t,n,s,r){const o=Di(e,t,n,s,r),i=new es(o.stateStack,t.name,n.name);return qr(o.tokens,i),o.tokens}function Di(e,t,n,s,r){const o=xr(n,r),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500}=r,a=Vr(e);let c=r.grammarState?Wy(r.grammarState,n.name)??Xo:r.grammarContextCode!=null?Di(r.grammarContextCode,t,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Xo,u=[];const f=[];for(let d=0,h=a.length;d<h;d++){const[g,v]=a[d];if(g===""){u=[],f.push([]);continue}if(i>0&&g.length>=i){u=[],f.push([{content:g,offset:v,color:"",fontStyle:0}]);continue}let x,S,A;r.includeExplanation&&(x=t.tokenizeLine(g,c,l),S=x.tokens,A=0);const w=t.tokenizeLine2(g,c,l),I=w.tokens.length/2;for(let V=0;V<I;V++){const N=w.tokens[2*V],C=V+1<I?w.tokens[2*V+2]:g.length;if(N===C)continue;const z=w.tokens[2*V+1],se=dn(s[Yn.getForeground(z)],o),F=Yn.getFontStyle(z),ie={content:g.substring(N,C),offset:v+N,color:se,fontStyle:F};if(r.includeExplanation){const j=[];if(r.includeExplanation!=="scopeName")for(const le of n.settings){let Ee;switch(typeof le.scope){case"string":Ee=le.scope.split(/,/).map(D=>D.trim());break;case"object":Ee=le.scope;break;default:continue}j.push({settings:le,selectors:Ee.map(D=>D.split(/ /))})}ie.explanation=[];let pe=0;for(;N+pe<C;){const le=S[A],Ee=g.substring(le.startIndex,le.endIndex);pe+=Ee.length,ie.explanation.push({content:Ee,scopes:r.includeExplanation==="scopeName"?rv(le.scopes):ov(j,le.scopes)}),A+=1}}u.push(ie)}f.push(u),u=[],c=w.ruleStack}return{tokens:f,stateStack:c}}function rv(e){return e.map(t=>({scopeName:t}))}function ov(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const o=t[s];n[s]={scopeName:o,themeMatches:lv(e,o,t.slice(0,s))}}return n}function aa(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function iv(e,t,n){if(!aa(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)aa(e[s],n[r])&&(s-=1),r-=1;return s===-1}function lv(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const i of r)if(iv(i,t,n)){s.push(o);break}return s}function Iu(e,t,n){const s=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),r=s.map(a=>{const c=Li(e,t,{...n,theme:a.theme}),u=Ns(c),f=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:f}}),o=av(...r.map(a=>a.tokens)),i=o[0].map((a,c)=>a.map((u,f)=>{const d={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=u.explanation),o.forEach((h,g)=>{const{content:v,explanation:x,offset:S,...A}=h[c][f];d.variants[s[g].color]=A}),d})),l=r[0].state?new es(Object.fromEntries(r.map(a=>{var c;return[a.theme,(c=a.state)==null?void 0:c.getInternalStack(a.theme)]})),r[0].state.lang):void 0;return l&&qr(i,l),i}function av(...e){const t=e.map(()=>[]),n=e.length;for(let s=0;s<e[0].length;s++){const r=e.map(a=>a[s]),o=t.map(()=>[]);t.forEach((a,c)=>a.push(o[c]));const i=r.map(()=>0),l=r.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(o[c].push(u),i[c]+=1,l[c]=r[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return t}function Ar(e,t,n){let s,r,o,i,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:f="css-vars"}=n,d=Object.entries(n.themes).filter(S=>S[1]).map(S=>({color:S[0],theme:S[1]})).sort((S,A)=>S.color===c?-1:A.color===c?1:0);if(d.length===0)throw new Fe("`themes` option must not be empty");const h=Iu(e,t,n);if(a=Ns(h),c&&Mi!==c&&!d.find(S=>S.color===c))throw new Fe(`\`themes\` option must contain the defaultColor key \`${c}\``);const g=d.map(S=>e.getTheme(S.theme)),v=d.map(S=>S.color);o=h.map(S=>S.map(A=>Fy(A,v,u,c,f))),a&&qr(o,a);const x=d.map(S=>xr(S.theme,n));r=ca(d,g,x,u,c,"fg",f),s=ca(d,g,x,u,c,"bg",f),i=`shiki-themes ${g.map(S=>S.name).join(" ")}`,l=c?void 0:[r,s].join(";")}else if("theme"in n){const c=xr(n.theme,n);o=Li(e,t,n);const u=e.getTheme(n.theme);s=dn(u.bg,c),r=dn(u.fg,c),i=u.name,a=Ns(o)}else throw new Fe("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:r,bg:s,themeName:i,rootStyle:l,grammarState:a}}function ca(e,t,n,s,r,o,i){return e.map((l,a)=>{const c=dn(t[a][o],n[a])||"inherit",u=`${s+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&r){if(r===Mi&&e.length>1){const f=e.findIndex(v=>v.color==="light"),d=e.findIndex(v=>v.color==="dark");if(f===-1||d===-1)throw new Fe('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const h=dn(t[f][o],n[f])||"inherit",g=dn(t[d][o],n[d])||"inherit";return`light-dark(${h}, ${g});${u}`}return c}return i==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Rr(e,t,n,s={meta:{},options:n,codeToHast:(r,o)=>Rr(e,r,o),codeToTokens:(r,o)=>Ar(e,r,o)}){var g,v;let r=t;for(const x of Er(n))r=((g=x.preprocess)==null?void 0:g.call(s,r,n))||r;let{tokens:o,fg:i,bg:l,themeName:a,rootStyle:c,grammarState:u}=Ar(e,r,n);const{mergeWhitespaces:f=!0,mergeSameStyleTokens:d=!1}=n;f===!0?o=uv(o):f==="never"&&(o=fv(o)),d&&(o=dv(o));const h={...s,get source(){return r}};for(const x of Er(n))o=((v=x.tokens)==null?void 0:v.call(h,o))||o;return cv(o,{...n,fg:i,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},h,u)}function cv(e,t,n,s=Ns(e)){var v,x,S,A;const r=Er(t),o=[],i={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[w,I]of Object.entries(t.meta||{}))w.startsWith("_")||(c[w]=I);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},f={type:"element",tagName:"code",properties:{},children:o};const d=[],h={...n,structure:l,addClassToHast:Au,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return f},get lines(){return d}};if(e.forEach((w,I)=>{var C,z;I&&(l==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
36
+ `}));let V={type:"element",tagName:"span",properties:{class:"line"},children:[]},N=0;for(const se of w){let F={type:"element",tagName:"span",properties:{...se.htmlAttrs},children:[{type:"text",value:se.content}]};const ie=ei(se.htmlStyle||Sr(se));ie&&(F.properties.style=ie);for(const j of r)F=((C=j==null?void 0:j.span)==null?void 0:C.call(h,F,I+1,N,V,se))||F;l==="inline"?i.children.push(F):l==="classic"&&V.children.push(F),N+=se.content.length}if(l==="classic"){for(const se of r)V=((z=se==null?void 0:se.line)==null?void 0:z.call(h,V,I+1))||V;d.push(V),o.push(V)}else l==="inline"&&d.push(V)}),l==="classic"){for(const w of r)f=((v=w==null?void 0:w.code)==null?void 0:v.call(h,f))||f;u.children.push(f);for(const w of r)u=((x=w==null?void 0:w.pre)==null?void 0:x.call(h,u))||u;i.children.push(u)}else if(l==="inline"){const w=[];let I={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const C of i.children)C.type==="element"&&C.tagName==="br"?(w.push(I),I={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(C.type==="element"||C.type==="text")&&I.children.push(C);w.push(I);let N={type:"element",tagName:"code",properties:{},children:w};for(const C of r)N=((S=C==null?void 0:C.code)==null?void 0:S.call(h,N))||N;i.children=[];for(let C=0;C<N.children.length;C++){C>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const z=N.children[C];z.type==="element"&&i.children.push(...z.children)}}let g=i;for(const w of r)g=((A=w==null?void 0:w.root)==null?void 0:A.call(h,g))||g;return s&&qr(g,s),g}function uv(e){return e.map(t=>{const n=[];let s="",r;return t.forEach((o,i)=>{const a=!(o.fontStyle&&(o.fontStyle&Ke.Underline||o.fontStyle&Ke.Strikethrough));a&&o.content.match(/^\s+$/)&&t[i+1]?(r===void 0&&(r=o.offset),s+=o.content):s?(a?n.push({...o,offset:r,content:s+o.content}):n.push({content:s,offset:r},o),r=void 0,s=""):n.push(o)}),n})}function fv(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const s=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!s)return n;const[,r,o,i]=s;if(!r&&!i)return n;const l=[{...n,offset:n.offset+r.length,content:o}];return r&&l.unshift({content:r,offset:n.offset}),i&&l.push({content:i,offset:n.offset+r.length+o.length}),l}))}function dv(e){return e.map(t=>{const n=[];for(const s of t){if(n.length===0){n.push({...s});continue}const r=n[n.length-1],o=ei(r.htmlStyle||Sr(r)),i=ei(s.htmlStyle||Sr(s)),l=r.fontStyle&&(r.fontStyle&Ke.Underline||r.fontStyle&Ke.Strikethrough),a=s.fontStyle&&(s.fontStyle&Ke.Underline||s.fontStyle&Ke.Strikethrough);!l&&!a&&o===i?r.content+=s.content:n.push({...s})}return n})}const hv=Ny;function pv(e,t,n){var o;const s={meta:{},options:n,codeToHast:(i,l)=>Rr(e,i,l),codeToTokens:(i,l)=>Ar(e,i,l)};let r=hv(Rr(e,t,n,s));for(const i of Er(n))r=((o=i.postprocess)==null?void 0:o.call(s,r,n))||r;return r}const ua={light:"#333333",dark:"#bbbbbb"},fa={light:"#fffffe",dark:"#1e1e1e"},da="__shiki_resolved";function ji(e){var l,a,c,u,f;if(e!=null&&e[da])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:s}=t;if(!n||!s){const d=t.settings?t.settings.find(h=>!h.name&&!h.scope):void 0;(l=d==null?void 0:d.settings)!=null&&l.foreground&&(s=d.settings.foreground),(a=d==null?void 0:d.settings)!=null&&a.background&&(n=d.settings.background),!s&&((c=t==null?void 0:t.colors)!=null&&c["editor.foreground"])&&(s=t.colors["editor.foreground"]),!n&&((u=t==null?void 0:t.colors)!=null&&u["editor.background"])&&(n=t.colors["editor.background"]),s||(s=t.type==="light"?ua.light:ua.dark),n||(n=t.type==="light"?fa.light:fa.dark),t.fg=s,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let r=0;const o=new Map;function i(d){var g;if(o.has(d))return o.get(d);r+=1;const h=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(g=t.colorReplacements)!=null&&g[`#${h}`]?i(d):(o.set(d,h),h)}t.settings=t.settings.map(d=>{var x,S;const h=((x=d.settings)==null?void 0:x.foreground)&&!d.settings.foreground.startsWith("#"),g=((S=d.settings)==null?void 0:S.background)&&!d.settings.background.startsWith("#");if(!h&&!g)return d;const v={...d,settings:{...d.settings}};if(h){const A=i(d.settings.foreground);t.colorReplacements[A]=d.settings.foreground,v.settings.foreground=A}if(g){const A=i(d.settings.background);t.colorReplacements[A]=d.settings.background,v.settings.background=A}return v});for(const d of Object.keys(t.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!((f=t.colors[d])!=null&&f.startsWith("#"))){const h=i(t.colors[d]);t.colorReplacements[h]=t.colors[d],t.colors[d]=h}return Object.defineProperty(t,da,{enumerable:!1,writable:!1,value:!0}),t}async function Nu(e){return Array.from(new Set((await Promise.all(e.filter(t=>!My(t)).map(async t=>await Eu(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Pu(e){return(await Promise.all(e.map(async n=>Ly(n)?null:ji(await Eu(n))))).filter(n=>!!n)}let gv=3;function mv(e,t=3){t>gv||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class Gn extends Error{constructor(t){super(t),this.name="ShikiError"}}function Tu(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Gn(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class yv extends ym{constructor(n,s,r,o={}){super(n);P(this,"_resolvedThemes",new Map);P(this,"_resolvedGrammars",new Map);P(this,"_langMap",new Map);P(this,"_langGraph",new Map);P(this,"_textmateThemeCache",new WeakMap);P(this,"_loadedThemesCache",null);P(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=s,this._langs=r,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const s=ji(n);return s.name&&(this._resolvedThemes.set(s.name,s),this._loadedThemesCache=null),s}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let s=this._textmateThemeCache.get(n);s||(s=_r.createFromRawTheme(n),this._textmateThemeCache.set(n,s)),this._syncRegistry.setTheme(s)}getGrammar(n){return n=Tu(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var i,l,a,c;if(this.getGrammar(n.name))return;const s=new Set([...this._langMap.values()].filter(u=>{var f;return(f=u.embeddedLangsLazy)==null?void 0:f.includes(n.name)}));this._resolver.addLanguage(n);const r={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,r);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(u=>{this._alias[u]=n.name}),this._loadedLanguagesCache=null,s.size)for(const u of s)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(l=(i=this._syncRegistry)==null?void 0:i._injectionGrammars)==null||l.delete(u.scopeName),(c=(a=this._syncRegistry)==null?void 0:a._grammars)==null||c.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const s=Array.from(this._langGraph.entries()),r=s.filter(([o,i])=>!i);if(r.length){const o=s.filter(([i,l])=>{if(!l)return!1;const a=l.embeddedLanguages||l.embeddedLangs;return a==null?void 0:a.some(c=>r.map(([u])=>u).includes(c))}).filter(i=>!r.includes(i));throw new Gn(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of s)this._resolver.addLanguage(i);for(const[o,i]of s)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const s=n.embeddedLanguages??n.embeddedLangs;if(s)for(const r of s)this._langGraph.set(r,this._langMap.get(r))}}class vv{constructor(t,n){P(this,"_langs",new Map);P(this,"_scopeToLang",new Map);P(this,"_injections",new Map);P(this,"_onigLib");this._onigLib={createOnigScanner:s=>t.createScanner(s),createOnigString:s=>t.createString(s)},n.forEach(s=>this.addLanguage(s))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let s=[];for(let r=1;r<=n.length;r++){const o=n.slice(0,r).join(".");s=[...s,...this._injections.get(o)||[]]}return s}}let ls=0;function _v(e){ls+=1,e.warnings!==!1&&ls>=10&&ls%10===0&&console.warn(`[Shiki] ${ls} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Gn("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(ji),r=new vv(e.engine,n),o=new yv(r,s,n,e.langAlias);let i;function l(w){return Tu(w,e.langAlias)}function a(w){S();const I=o.getGrammar(typeof w=="string"?w:w.name);if(!I)throw new Gn(`Language \`${w}\` not found, you may need to load it first`);return I}function c(w){if(w==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};S();const I=o.getTheme(w);if(!I)throw new Gn(`Theme \`${w}\` not found, you may need to load it first`);return I}function u(w){S();const I=c(w);i!==w&&(o.setTheme(I),i=w);const V=o.getColorMap();return{theme:I,colorMap:V}}function f(){return S(),o.getLoadedThemes()}function d(){return S(),o.getLoadedLanguages()}function h(...w){S(),o.loadLanguages(w.flat(1))}async function g(...w){return h(await Nu(w))}function v(...w){S();for(const I of w.flat(1))o.loadTheme(I)}async function x(...w){return S(),v(await Pu(w))}function S(){if(t)throw new Gn("Shiki instance has been disposed")}function A(){t||(t=!0,o.dispose(),ls-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:f,getLoadedLanguages:d,resolveLangAlias:l,loadLanguage:g,loadLanguageSync:h,loadTheme:x,loadThemeSync:v,dispose:A,[Symbol.dispose]:A}}async function bv(e){e.engine||mv("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,s]=await Promise.all([Pu(e.themes||[]),Nu(e.langs||[]),e.engine]);return _v({...e,themes:t,langs:n,engine:s})}async function wv(e){const t=await bv(e);return{getLastGrammarState:(...n)=>nv(t,...n),codeToTokensBase:(n,s)=>Li(t,n,s),codeToTokensWithThemes:(n,s)=>Iu(t,n,s),codeToTokens:(n,s)=>Ar(t,n,s),codeToHast:(n,s)=>Rr(t,n,s),codeToHtml:(n,s)=>pv(t,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function ts(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Cv(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Gi=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Ue=String.raw;function ns(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Ou=Ue`\[\^?`,Mu=`c.? | C(?:-.?)?|${Ue`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Ue`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Ue`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Ue`o\{[^\}]*\}?`}|${Ue`\d{1,3}`}`,Bi=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Ks=new RegExp(Ue`
37
+ \\ (?:
38
+ ${Mu}
39
+ | [gk]<[^>]*>?
40
+ | [gk]'[^']*'?
41
+ | .
42
+ )
43
+ | \( (?:
44
+ \? (?:
45
+ [:=!>({]
46
+ | <[=!]
47
+ | <[^>]*>
48
+ | '[^']*'
49
+ | ~\|?
50
+ | #(?:[^)\\]|\\.?)*
51
+ | [^:)]*[:)]
52
+ )?
53
+ | \*[^\)]*\)?
54
+ )?
55
+ | (?:${Bi.source})+
56
+ | ${Ou}
57
+ | .
58
+ `.replace(/\s+/g,""),"gsu"),wo=new RegExp(Ue`
59
+ \\ (?:
60
+ ${Mu}
61
+ | .
62
+ )
63
+ | \[:(?:\^?\p{Alpha}+|\^):\]
64
+ | ${Ou}
65
+ | &&
66
+ | .
67
+ `.replace(/\s+/g,""),"gsu");function kv(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const s=Uv(n.flags),r=[s.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return r.at(-1)},numOpenGroups:0,popModX(){r.pop()},pushModX(f){r.push(f)},replaceCurrentModX(f){r[r.length-1]=f},singleline:n.rules.singleline};let i=[],l;for(Ks.lastIndex=0;l=Ks.exec(e);){const f=xv(o,e,l[0],Ks.lastIndex);f.tokens?i.push(...f.tokens):f.token&&i.push(f.token),f.lastIndex!==void 0&&(Ks.lastIndex=f.lastIndex)}const a=[];let c=0;i.filter(f=>f.type==="GroupOpen").forEach(f=>{f.kind==="capturing"?f.number=++c:f.raw==="("&&a.push(f)}),c||a.forEach((f,d)=>{f.kind="capturing",f.number=d+1});const u=c||a.length;return{tokens:i.map(f=>f.type==="EscapedNumber"?Hv(f,u):f).flat(),flags:s}}function xv(e,t,n,s){const[r,o]=n;if(n==="["||n==="[^"){const i=Sv(t,n,s);return{tokens:i.tokens,lastIndex:i.lastIndex}}if(r==="\\"){if("AbBGyYzZ".includes(o))return{token:ha(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Mv(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Du(n)}}if(o==="K")return{token:ju("keep",n)};if(o==="N"||o==="R")return{token:xn("newline",n,{negate:o==="N"})};if(o==="O")return{token:xn("any",n)};if(o==="X")return{token:xn("text_segment",n)};const i=Lu(n,{inCharClass:!1});return Array.isArray(i)?{tokens:i}:{token:i}}if(r==="("){if(o==="*")return{token:Gv(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[s]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:s+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:jv(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Dn("group",n)};if(n==="(?>")return{token:Dn("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Dn(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Dn("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Dn("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Pv(n)}}if(e.getCurrentModX()){if(n==="#"){const i=t.indexOf(`
68
+ `,s);return{lastIndex:i===-1?t.length:i}}if(/^\s$/.test(n)){const i=/\s+/y;return i.lastIndex=s,{lastIndex:i.exec(t)?i.lastIndex:s}}}if(n===".")return{token:xn("dot",n)};if(n==="^"||n==="$"){const i=e.singleline?{"^":Ue`\A`,$:Ue`\Z`}[n]:n;return{token:ha(i,n)}}return n==="|"?{token:Av(n)}:Bi.test(n)?{tokens:Vv(n)}:{token:Jt(ts(n),n)}}function Sv(e,t,n){const s=[pa(t[1]==="^",t)];let r=1,o;for(wo.lastIndex=n;o=wo.exec(e);){const i=o[0];if(i[0]==="["&&i[1]!==":")r++,s.push(pa(i[1]==="^",i));else if(i==="]"){if(s.at(-1).type==="CharacterClassOpen")s.push(Jt(93,i));else if(r--,s.push(Rv(i)),!r)break}else{const l=Ev(i);Array.isArray(l)?s.push(...l):s.push(l)}}return{tokens:s,lastIndex:wo.lastIndex||e.length}}function Ev(e){if(e[0]==="\\")return Lu(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Gi.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return xn("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?$v(e):e==="&&"?Iv(e):Jt(ts(e),e)}function Lu(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Dv(e);if("dDhHsSwW".includes(n))return Bv(e);if(e.startsWith(Ue`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return Fv(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const s=e.split(/\\x/).slice(1).map(i=>parseInt(i,16)),r=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(s)),o=new TextEncoder;return[...r].map(i=>{const l=[...o.encode(i)].map(a=>`\\x${a.toString(16)}`).join("");return Jt(ts(i),l)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Jt(Wv(e),e);if(ga.has(n))return Jt(ga.get(n),e);if(/\d/.test(n))return Nv(t,e);if(e==="\\")throw new Error(Ue`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Jt(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Av(e){return{type:"Alternator",raw:e}}function ha(e,t){return{type:"Assertion",kind:e,raw:t}}function Du(e){return{type:"Backreference",raw:e}}function Jt(e,t){return{type:"Character",value:e,raw:t}}function Rv(e){return{type:"CharacterClassClose",raw:e}}function $v(e){return{type:"CharacterClassHyphen",raw:e}}function Iv(e){return{type:"CharacterClassIntersector",raw:e}}function pa(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function xn(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function ju(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:ns(n.flags),raw:t}}function Nv(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Pv(e){return{type:"GroupClose",raw:e}}function Dn(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function Tv(e,t,n,s){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:s}}function Ov(e,t,n,s){return{type:"Quantifier",kind:e,min:t,max:n,raw:s}}function Mv(e){return{type:"Subroutine",raw:e}}const Lv=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),ga=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Dv(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Jt(ts(t.toUpperCase())-64,e)}function jv(e,t){let{on:n,off:s}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;s??(s="");const r=(t.getCurrentModX()||n.includes("x"))&&!s.includes("x"),o=ya(n),i=ya(s),l={};if(o&&(l.enable=o),i&&(l.disable=i),e.endsWith(")"))return t.replaceCurrentModX(r),ju("flags",e,{flags:l});if(e.endsWith(":"))return t.pushModX(r),t.numOpenGroups++,Dn("group",e,{...(o||i)&&{flags:l}});throw new Error(`Unexpected flag modifier "${e}"`)}function Gv(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:s,args:r}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(s==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=r?r.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[i,l,a]=o,c=Lv.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof i=="string")throw new Error(`Named callout argument must be a number "${i}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(o.length===2&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${l}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof i=="number"||!/^[<>X]$/.test(i)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${i}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(typeof l=="number"||!/^(?:[<>!=]=|[<>])$/.test(l))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${l}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument three must be a tag or number "${a}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return Tv(c,s??null,(r==null?void 0:r.split(","))??null,e)}function ma(e){let t=null,n,s;if(e[0]==="{"){const{minStr:r,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,i=1e5;if(+r>i||o&&+o>i)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+r,s=o===void 0?+r:o===""?1/0:+o,n>s&&(t="possessive",[n,s]=[s,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,s=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Ov(t,n,s,e)}function Bv(e){const t=e[1].toLowerCase();return xn({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Fv(e){const{p:t,neg:n,value:s}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return xn("property",e,{value:s,negate:t==="P"&&!n||t==="p"&&!!n})}function ya(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function Uv(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const s=e[n];if(!"imxDPSWy".includes(s))throw new Error(`Invalid flag "${s}"`);if(s==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[s]]=!0}return t}function Wv(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Hv(e,t){const{raw:n,inCharClass:s}=e,r=n.slice(1);if(!s&&(r!=="0"&&r.length===1||r[0]!=="0"&&+r<=t))return[Du(n)];const o=[],i=r.match(/^[0-7]+|\d/g);for(let l=0;l<i.length;l++){const a=i[l];let c;if(l===0&&a!=="8"&&a!=="9"){if(c=parseInt(a,8),c>127)throw new Error(Ue`Octal encoded byte above 177 unsupported "${n}"`)}else c=ts(a);o.push(Jt(c,(l===0?"\\":"")+a))}return o}function Vv(e){const t=[],n=new RegExp(Bi,"gy");let s;for(;s=n.exec(e);){const r=s[0];if(r[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(r);if(o){const{min:i,max:l}=o.groups;if(+i>+l&&r.endsWith("?")){n.lastIndex--,t.push(ma(r.slice(0,-1)));continue}}}t.push(ma(r))}return t}function Gu(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(s=>t[s]===n[s])}function qv(e){return zv.has(e.type)}const zv=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Bu(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},s=kv(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),r=(d,h)=>{const g=s.tokens[o.nextIndex];switch(o.parent=d,o.nextIndex++,g.type){case"Alternator":return $n();case"Assertion":return Kv(g);case"Backreference":return Xv(g,o);case"Character":return zr(g.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return Jv(g,o,h);case"CharacterClassOpen":return Yv(g,o,h);case"CharacterSet":return Qv(g,o);case"Directive":return r_(g.kind,{flags:g.flags});case"GroupOpen":return Zv(g,o,h);case"NamedCallout":return i_(g.kind,g.tag,g.arguments);case"Quantifier":return e_(g,o);case"Subroutine":return t_(g,o);default:throw new Error(`Unexpected token type "${g.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:s.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:r},i=a_(o_(s.flags));let l=i.body[0];for(;o.nextIndex<s.tokens.length;){const d=r(l,{});d.type==="Alternative"?(i.body.push(d),l=d):l.body.push(d)}const{capturingGroups:a,hasNumberedRef:c,namedGroupsByName:u,subroutines:f}=o;if(c&&u.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:d}of f)if(typeof d=="number"){if(d>a.length)throw new Error("Subroutine uses a group number that's not defined");d&&(a[d-1].isSubroutined=!0)}else if(u.has(d)){if(u.get(d).length>1)throw new Error(Ue`Subroutine uses a duplicate group name "\g<${d}>"`);u.get(d)[0].isSubroutined=!0}else throw new Error(Ue`Subroutine uses a group name that's not defined "\g<${d}>"`);return i}function Kv({kind:e}){return ti(ns({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Ue`\B`||e===Ue`\Y`})}function Xv({raw:e},t){const n=/^\\k[<']/.test(e),s=n?e.slice(3,-1):e.slice(1),r=(o,i=!1)=>{const l=t.capturingGroups.length;let a=!1;if(o>l)if(t.skipBackrefValidation)a=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,ni(i?l+1-o:o,{orphan:a})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(s);if(o)return r(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(s))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(s))throw new Error(`Group name not defined to the left "${e}"`);return ni(s)}return r(+s)}function Jv(e,t,n){const{tokens:s,walk:r}=t,o=t.parent,i=o.body.at(-1),l=s[t.nextIndex];if(!n.isCheckingRangeEnd&&i&&i.type!=="CharacterClass"&&i.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){const a=r(o,{...n,isCheckingRangeEnd:!0});if(i.type==="Character"&&a.type==="Character")return o.body.pop(),s_(i,a);throw new Error("Invalid character class range")}return zr(ts("-"))}function Yv({negate:e},t,n){const{tokens:s,walk:r}=t,o=s[t.nextIndex],i=[or()];let l=ba(o);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")i.push(or()),t.nextIndex++;else{const c=i.at(-1);c.body.push(r(c,n))}l=ba(s[t.nextIndex],o)}const a=or({negate:e});return i.length===1?a.body=i[0].body:(a.kind="intersection",a.body=i.map(c=>c.body.length===1?c.body[0]:c)),t.nextIndex++,a}function Qv({kind:e,negate:t,value:n},s){const{normalizeUnknownPropertyNames:r,skipPropertyNameValidation:o,unicodePropertyMap:i}=s;if(e==="property"){const l=Kr(n);if(Gi.has(l)&&!(i!=null&&i.has(l)))e="posix",n=l;else return jn(n,{negate:t,normalizeUnknownPropertyNames:r,skipPropertyNameValidation:o,unicodePropertyMap:i})}return e==="posix"?l_(n,{negate:t}):si(e,{negate:t})}function Zv(e,t,n){const{tokens:s,capturingGroups:r,namedGroupsByName:o,skipLookbehindValidation:i,walk:l}=t,a=c_(e),c=a.type==="AbsenceFunction",u=_a(a),f=u&&a.negate;if(a.type==="CapturingGroup"&&(r.push(a),a.name&&Cv(o,a.name,[]).push(a)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=wa(s[t.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")a.body.push($n()),t.nextIndex++;else{const h=a.body.at(-1),g=l(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||f});if(h.body.push(g),(u||n.isInLookbehind)&&!i){const v="Lookbehind includes a pattern not allowed by Oniguruma";if(f||n.isInNegLookbehind){if(va(g)||g.type==="CapturingGroup")throw new Error(v)}else if(va(g)||_a(g)&&g.negate)throw new Error(v)}}d=wa(s[t.nextIndex])}return t.nextIndex++,a}function e_({kind:e,min:t,max:n},s){const r=s.parent,o=r.body.at(-1);if(!o||!qv(o))throw new Error("Quantifier requires a repeatable token");const i=Uu(e,t,n,o);return r.body.pop(),i}function t_({raw:e},t){const{capturingGroups:n,subroutines:s}=t;let r=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(r);if(o){const l=+o.groups.num,a=n.length;if(t.hasNumberedRef=!0,r={"":l,"+":a+l,"-":a+1-l}[o.groups.sign],r<1)throw new Error("Invalid subroutine number")}else r==="0"&&(r=0);const i=Wu(r);return s.push(i),i}function n_(e,t){return{type:"AbsenceFunction",kind:e,body:Fs(t==null?void 0:t.body)}}function $n(e){return{type:"Alternative",body:Hu(e==null?void 0:e.body)}}function ti(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function ni(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function Fu(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!u_(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Fs(t==null?void 0:t.body)}}function zr(e,t){const n={useLastValid:!1,...t};if(e>1114111){const s=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${s}}"`):new Error(`Invalid code point out of range in JS "\\x{${s}}"`)}return{type:"Character",value:e}}function or(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Hu(e==null?void 0:e.body)}}function s_(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function si(e,t){const n=!!(t!=null&&t.negate),s={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(s.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(s.variableLength=!0),s}function r_(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:ns(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function o_(e){return{type:"Flags",...e}}function wt(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Fs(e==null?void 0:e.body)}}function wn(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Fs(e==null?void 0:e.body)}}function i_(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function l_(e,t){const n=!!(t!=null&&t.negate);if(!Gi.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function Uu(e,t,n,s){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:s}}function a_(e,t){return{type:"Regex",body:Fs(t==null?void 0:t.body),flags:e}}function Wu(e){return{type:"Subroutine",ref:e}}function jn(e,t){var r;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let s=(r=n.unicodePropertyMap)==null?void 0:r.get(Kr(e));if(!s){if(n.normalizeUnknownPropertyNames)s=f_(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Ue`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:s??e,negate:n.negate}}function c_({flags:e,kind:t,name:n,negate:s,number:r}){switch(t){case"absence_repeater":return n_("repeater");case"atomic":return wt({atomic:!0});case"capturing":return Fu(r,{name:n});case"group":return wt({flags:e});case"lookahead":case"lookbehind":return wn({behind:t==="lookbehind",negate:s});default:throw new Error(`Unexpected group kind "${t}"`)}}function Fs(e){if(e===void 0)e=[$n()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function Hu(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function va(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function _a(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function u_(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function f_(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Kr(e){return e.replace(/[- _]+/g,"").toLowerCase()}function ba(e,t){return ns(e,`${(t==null?void 0:t.type)==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function wa(e){return ns(e,"Unclosed group")}function ws(e,t,n=null){function s(o,i){for(let l=0;l<o.length;l++){const a=r(o[l],i,l,o);l=Math.max(-1,l+a)}}function r(o,i=null,l=null,a=null){var S,A;let c=0,u=!1;const f={node:o,parent:i,key:l,container:a,root:e,remove(){Xs(a).splice(Math.max(0,Tn(l)+c),1),c--,u=!0},removeAllNextSiblings(){return Xs(a).splice(Tn(l)+1)},removeAllPrevSiblings(){const w=Tn(l)+c;return c-=w,Xs(a).splice(0,Math.max(0,w))},replaceWith(w,I={}){const V=!!I.traverse;a?a[Math.max(0,Tn(l)+c)]=w:ns(i,"Can't replace root node")[l]=w,V&&r(w,i,l,a),u=!0},replaceWithMultiple(w,I={}){const V=!!I.traverse;if(Xs(a).splice(Math.max(0,Tn(l)+c),1,...w),c+=w.length-1,V){let N=0;for(let C=0;C<w.length;C++)N+=r(w[C],i,Tn(l)+C+N,a)}u=!0},skip(){u=!0}},{type:d}=o,h=t["*"],g=t[d],v=typeof h=="function"?h:h==null?void 0:h.enter,x=typeof g=="function"?g:g==null?void 0:g.enter;if(v==null||v(f,n),x==null||x(f,n),!u)switch(d){case"AbsenceFunction":case"CapturingGroup":case"Group":s(o.body,o);break;case"Alternative":case"CharacterClass":s(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":r(o.min,o,"min"),r(o.max,o,"max");break;case"LookaroundAssertion":s(o.body,o);break;case"Quantifier":r(o.body,o,"body");break;case"Regex":s(o.body,o),r(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return(S=g==null?void 0:g.exit)==null||S.call(g,f,n),(A=h==null?void 0:h.exit)==null||A.call(h,f,n),c}return r(e),e}function Xs(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Tn(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const d_=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function h_(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function p_(e,t,n,s){return e.slice(0,t)+s+e.slice(t+n.length)}const mt=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Fi(e,t,n,s){const r=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let i=0,l="";for(const a of e.matchAll(r)){const{0:c,groups:{$skip:u}}=a;if(!u&&(!s||s===mt.DEFAULT==!i)){n instanceof Function?l+=n(a,{context:i?mt.CHAR_CLASS:mt.DEFAULT,negated:o[o.length-1]}):l+=n;continue}c[0]==="["?(i++,o.push(c[1]==="^")):c==="]"&&i&&(i--,o.pop()),l+=c}return l}function Vu(e,t,n,s){Fi(e,t,n,s)}function g_(e,t,n=0,s){if(!new RegExp(t,"su").test(e))return null;const r=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");r.lastIndex=n;let o=0,i;for(;i=r.exec(e);){const{0:l,groups:{$skip:a}}=i;if(!a&&(!s||s===mt.DEFAULT==!o))return i;l==="["?o++:l==="]"&&o&&o--,r.lastIndex==i.index&&r.lastIndex++}return null}function Js(e,t,n){return!!g_(e,t,0,n)}function m_(e,t){const n=/\\?./gsu;n.lastIndex=t;let s=e.length,r=0,o=1,i;for(;i=n.exec(e);){const[l]=i;if(l==="[")r++;else if(r)l==="]"&&r--;else if(l==="(")o++;else if(l===")"&&(o--,!o)){s=i.index;break}}return e.slice(t,s)}const Ca=new RegExp(String.raw`(?<noncapturingStart>${d_})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function y_(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let s=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:s,hiddenCaptures:n};const r="(?>",o="(?:(?=(",i=[0],l=[];let a=0,c=0,u=NaN,f;do{f=!1;let d=0,h=0,g=!1,v;for(Ca.lastIndex=Number.isNaN(u)?0:u+o.length;v=Ca.exec(e);){const{0:x,index:S,groups:{capturingStart:A,noncapturingStart:w}}=v;if(x==="[")d++;else if(d)x==="]"&&d--;else if(x===r&&!g)u=S,g=!0;else if(g&&w)h++;else if(A)g?h++:(a++,i.push(a+c));else if(x===")"&&g){if(!h){c++;const I=a+c;if(e=`${e.slice(0,u)}${o}${e.slice(u+r.length,S)}))<$$${I}>)${e.slice(S+1)}`,f=!0,l.push(I),h_(n,I),s.size){const V=new Map;s.forEach((N,C)=>{V.set(C>=I?C+1:C,N.map(z=>z>=I?z+1:z))}),s=V}break}h--}}}while(f);return n.push(...l),e=Fi(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:h,wrappedBackrefNum:g}})=>{if(h){const v=+h;if(v>i.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${i[v]}`}return`\\${g}`},mt.DEFAULT),{pattern:e,captureTransfers:s,hiddenCaptures:n}}const qu=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Co=new RegExp(String.raw`
69
+ \\(?: \d+
70
+ | c[A-Za-z]
71
+ | [gk]<[^>]+>
72
+ | [pPu]\{[^\}]+\}
73
+ | u[A-Fa-f\d]{4}
74
+ | x[A-Fa-f\d]{2}
75
+ )
76
+ | \((?: \? (?: [:=!>]
77
+ | <(?:[=!]|[^>]+>)
78
+ | [A-Za-z\-]+:
79
+ | \(DEFINE\)
80
+ ))?
81
+ | (?<qBase>${qu})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
82
+ | \\?.
83
+ `.replace(/\s+/g,""),"gsu");function v_(e){if(!new RegExp(`${qu}\\+`).test(e))return{pattern:e};const t=[];let n=null,s=null,r="",o=0,i;for(Co.lastIndex=0;i=Co.exec(e);){const{0:l,index:a,groups:{qBase:c,qMod:u,invalidQ:f}}=i;if(l==="[")o||(s=a),o++;else if(l==="]")o?o--:s=null;else if(!o)if(u==="+"&&r&&!r.startsWith("(")){if(f)throw new Error(`Invalid quantifier "${l}"`);let d=-1;if(/^\{\d+\}$/.test(c))e=p_(e,a+c.length,u,"");else{if(r===")"||r==="]"){const h=r===")"?n:s;if(h===null)throw new Error(`Invalid unmatched "${r}"`);e=`${e.slice(0,h)}(?>${e.slice(h,a)}${c})${e.slice(a+l.length)}`}else e=`${e.slice(0,a-r.length)}(?>${r}${c})${e.slice(a+l.length)}`;d+=4}Co.lastIndex+=d}else l[0]==="("?t.push(a):l===")"&&(n=t.length?t.pop():null);r=l}return{pattern:e}}const pt=String.raw,__=pt`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,ri=pt`\(\?R=(?<rDepth>[^\)]+)\)|${__}`,Xr=pt`\(\?<(?![=!])(?<captureName>[^>]+)>`,zu=pt`${Xr}|(?<unnamed>\()(?!\?)`,vn=new RegExp(pt`${Xr}|${ri}|\(\?|\\?.`,"gsu"),ko="Cannot use multiple overlapping recursions";function b_(e,t){const{hiddenCaptures:n,mode:s}={hiddenCaptures:[],mode:"plugin",...t};let r=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(ri,"su").test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};if(s==="plugin"&&Js(e,pt`\(\?\(DEFINE\)`,mt.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],i=Js(e,pt`\\[1-9]`,mt.DEFAULT),l=new Map,a=[];let c=!1,u=0,f=0,d;for(vn.lastIndex=0;d=vn.exec(e);){const{0:h,groups:{captureName:g,rDepth:v,gRNameOrNum:x,gRDepth:S}}=d;if(h==="[")u++;else if(u)h==="]"&&u--;else if(v){if(ka(v),c)throw new Error(ko);if(i)throw new Error(`${s==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const A=e.slice(0,d.index),w=e.slice(vn.lastIndex);if(Js(w,ri,mt.DEFAULT))throw new Error(ko);const I=+v-1;e=xa(A,w,I,!1,n,o,f),r=Ea(r,A,I,o.length,0,f);break}else if(x){ka(S);let A=!1;for(const j of a)if(j.name===x||j.num===+x){if(A=!0,j.hasRecursedWithin)throw new Error(ko);break}if(!A)throw new Error(pt`Recursive \g cannot be used outside the referenced group "${s==="external"?x:pt`\g<${x}&R=${S}>`}"`);const w=l.get(x),I=m_(e,w);if(i&&Js(I,pt`${Xr}|\((?!\?)`,mt.DEFAULT))throw new Error(`${s==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const V=e.slice(w,d.index),N=I.slice(V.length+h.length),C=o.length,z=+S-1,se=xa(V,N,z,!0,n,o,f);r=Ea(r,V,z,o.length-C,C,f);const F=e.slice(0,w),ie=e.slice(w+I.length);e=`${F}${se}${ie}`,vn.lastIndex+=se.length-h.length-V.length-N.length,a.forEach(j=>j.hasRecursedWithin=!0),c=!0}else if(g)f++,l.set(String(f),vn.lastIndex),l.set(g,vn.lastIndex),a.push({num:f,name:g});else if(h[0]==="("){const A=h==="(";A&&(f++,l.set(String(f),vn.lastIndex)),a.push(A?{num:f}:{})}else h===")"&&a.pop()}return n.push(...o),{pattern:e,captureTransfers:r,hiddenCaptures:n}}function ka(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function xa(e,t,n,s,r,o,i){const l=new Set;s&&Vu(e+t,Xr,({groups:{captureName:c}})=>{l.add(c)},mt.DEFAULT);const a=[n,s?l:null,r,o,i];return`${e}${Sa(`(?:${e}`,"forward",...a)}(?:)${Sa(`${t})`,"backward",...a)}${t}`}function Sa(e,t,n,s,r,o,i){const a=u=>t==="forward"?u+2:n-u+2-1;let c="";for(let u=0;u<n;u++){const f=a(u);c+=Fi(e,pt`${zu}|\\k<(?<backref>[^>]+)>`,({0:d,groups:{captureName:h,unnamed:g,backref:v}})=>{if(v&&s&&!s.has(v))return d;const x=`_$${f}`;if(g||h){const S=i+o.length+1;return o.push(S),w_(r,S),g?d:`(?<${h}${x}>`}return pt`\k<${v}${x}>`},mt.DEFAULT)}return c}function w_(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Ea(e,t,n,s,r,o){if(e.size&&s){let i=0;Vu(t,zu,()=>i++,mt.DEFAULT);const l=o-i+r,a=new Map;return e.forEach((c,u)=>{const f=(s-i*n)/n,d=i*n,h=u>l+i?u+s:u,g=[];for(const v of c)if(v<=l)g.push(v);else if(v>l+i+f)g.push(v+s);else if(v<=l+i)for(let x=0;x<=n;x++)g.push(v+i*x);else for(let x=0;x<=n;x++)g.push(v+d+f*x);a.set(h,g)}),a}return e}var Ge=String.fromCodePoint,ae=String.raw,xt={},Jr=globalThis.RegExp;xt.flagGroups=(()=>{try{new Jr("(?i:)")}catch{return!1}return!0})();xt.unicodeSets=(()=>{try{new Jr("[[]]","v")}catch{return!1}return!0})();xt.bugFlagVLiteralHyphenIsRange=xt.unicodeSets?(()=>{try{new Jr(ae`[\d\-a]`,"v")}catch{return!0}return!1})():!1;xt.bugNestedClassIgnoresNegation=xt.unicodeSets&&new Jr("[[^a]]","v").test("a");function $r(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function Ps(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function oi(e,t){return Aa[e]>=Aa[t]}function C_(e,t){if(e==null)throw new Error(t??"Value expected");return e}var Aa={ES2025:2025,ES2024:2024,ES2018:2018},k_={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function Ku(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!k_[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=xt.flagGroups?"ES2025":xt.unicodeSets?"ES2024":"ES2018"),t}var x_="[ -\r ]",S_=new Set([Ge(304),Ge(305)]),Ut=ae`[\p{L}\p{M}\p{N}\p{Pc}]`;function Xu(e){if(S_.has(e))return[e];const t=new Set,n=e.toLowerCase(),s=n.toUpperCase(),r=R_.get(n),o=E_.get(n),i=A_.get(n);return[...s].length===1&&t.add(s),i&&t.add(i),r&&t.add(r),t.add(n),o&&t.add(o),[...t]}var Ui=new Map(`C Other
84
+ Cc Control cntrl
85
+ Cf Format
86
+ Cn Unassigned
87
+ Co Private_Use
88
+ Cs Surrogate
89
+ L Letter
90
+ LC Cased_Letter
91
+ Ll Lowercase_Letter
92
+ Lm Modifier_Letter
93
+ Lo Other_Letter
94
+ Lt Titlecase_Letter
95
+ Lu Uppercase_Letter
96
+ M Mark Combining_Mark
97
+ Mc Spacing_Mark
98
+ Me Enclosing_Mark
99
+ Mn Nonspacing_Mark
100
+ N Number
101
+ Nd Decimal_Number digit
102
+ Nl Letter_Number
103
+ No Other_Number
104
+ P Punctuation punct
105
+ Pc Connector_Punctuation
106
+ Pd Dash_Punctuation
107
+ Pe Close_Punctuation
108
+ Pf Final_Punctuation
109
+ Pi Initial_Punctuation
110
+ Po Other_Punctuation
111
+ Ps Open_Punctuation
112
+ S Symbol
113
+ Sc Currency_Symbol
114
+ Sk Modifier_Symbol
115
+ Sm Math_Symbol
116
+ So Other_Symbol
117
+ Z Separator
118
+ Zl Line_Separator
119
+ Zp Paragraph_Separator
120
+ Zs Space_Separator
121
+ ASCII
122
+ ASCII_Hex_Digit AHex
123
+ Alphabetic Alpha
124
+ Any
125
+ Assigned
126
+ Bidi_Control Bidi_C
127
+ Bidi_Mirrored Bidi_M
128
+ Case_Ignorable CI
129
+ Cased
130
+ Changes_When_Casefolded CWCF
131
+ Changes_When_Casemapped CWCM
132
+ Changes_When_Lowercased CWL
133
+ Changes_When_NFKC_Casefolded CWKCF
134
+ Changes_When_Titlecased CWT
135
+ Changes_When_Uppercased CWU
136
+ Dash
137
+ Default_Ignorable_Code_Point DI
138
+ Deprecated Dep
139
+ Diacritic Dia
140
+ Emoji
141
+ Emoji_Component EComp
142
+ Emoji_Modifier EMod
143
+ Emoji_Modifier_Base EBase
144
+ Emoji_Presentation EPres
145
+ Extended_Pictographic ExtPict
146
+ Extender Ext
147
+ Grapheme_Base Gr_Base
148
+ Grapheme_Extend Gr_Ext
149
+ Hex_Digit Hex
150
+ IDS_Binary_Operator IDSB
151
+ IDS_Trinary_Operator IDST
152
+ ID_Continue IDC
153
+ ID_Start IDS
154
+ Ideographic Ideo
155
+ Join_Control Join_C
156
+ Logical_Order_Exception LOE
157
+ Lowercase Lower
158
+ Math
159
+ Noncharacter_Code_Point NChar
160
+ Pattern_Syntax Pat_Syn
161
+ Pattern_White_Space Pat_WS
162
+ Quotation_Mark QMark
163
+ Radical
164
+ Regional_Indicator RI
165
+ Sentence_Terminal STerm
166
+ Soft_Dotted SD
167
+ Terminal_Punctuation Term
168
+ Unified_Ideograph UIdeo
169
+ Uppercase Upper
170
+ Variation_Selector VS
171
+ White_Space space
172
+ XID_Continue XIDC
173
+ XID_Start XIDS`.split(/\s/).map(e=>[Kr(e),e])),E_=new Map([["s",Ge(383)],[Ge(383),"s"]]),A_=new Map([[Ge(223),Ge(7838)],[Ge(107),Ge(8490)],[Ge(229),Ge(8491)],[Ge(969),Ge(8486)]]),R_=new Map([rn(453),rn(456),rn(459),rn(498),...xo(8072,8079),...xo(8088,8095),...xo(8104,8111),rn(8124),rn(8140),rn(8188)]),$_=new Map([["alnum",ae`[\p{Alpha}\p{Nd}]`],["alpha",ae`\p{Alpha}`],["ascii",ae`\p{ASCII}`],["blank",ae`[\p{Zs}\t]`],["cntrl",ae`\p{Cc}`],["digit",ae`\p{Nd}`],["graph",ae`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ae`\p{Lower}`],["print",ae`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ae`[\p{P}\p{S}]`],["space",ae`\p{space}`],["upper",ae`\p{Upper}`],["word",ae`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ae`\p{AHex}`]]);function I_(e,t){const n=[];for(let s=e;s<=t;s++)n.push(s);return n}function rn(e){const t=Ge(e);return[t.toLowerCase(),t]}function xo(e,t){return I_(e,t).map(n=>rn(n))}var Ju=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function N_(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};Yu(e);const s={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:oi(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};ws(e,P_,s);const r={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:r,prevFlags:null,globalFlags:r,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:s.subroutineRefMap};ws(e,T_,o);const i={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return ws(e,O_,i),e._originMap=o.groupOriginByCopy,e._strategy=s.strategy,e}var P_={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:s,kind:r}=e;if(r==="repeater"){const o=wt();o.body[0].body.push(wn({negate:!0,body:s}),jn("Any"));const i=wt();i.body[0].body.push(Uu("greedy",0,1/0,o)),n(Te(i,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:s}){const r=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const i=t.body[o];Ps(s,i,[]).push(...r)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const s=Zu(t.get(e));if(s){const r=wt({flags:s});r.body[0].body=e.body,e.body=[Te(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:s,root:r,remove:o,replaceWith:i},l){const{kind:a,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:f,supportedGNodes:d,wordIsAscii:h}=l;if(a==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(a==="line_end")i(Te(wn({body:[$n({body:[ti("string_end")]}),$n({body:[zr(10)]})]}),t));else if(a==="line_start")i(Te(Wt(ae`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(a==="search_start")if(d.has(e))r.flags.sticky=!0,o();else{const g=s[n-1];if(g&&B_(g))i(Te(wn({negate:!0}),t));else{if(f)throw new Error(ae`Uses "\G" in a way that requires a subclass`);i(on(ti("string_start"),t)),l.strategy="clip_search"}}else if(!(a==="string_end"||a==="string_start"))if(a==="string_end_newline")i(Te(Wt(ae`(?=\n?\z)`),t));else if(a==="word_boundary"){if(!h&&!u){const g=`(?:(?<=${Ut})(?!${Ut})|(?<!${Ut})(?=${Ut}))`,v=`(?:(?<=${Ut})(?=${Ut})|(?<!${Ut})(?!${Ut}))`;i(Te(Wt(c?v:g),t))}}else throw new Error(`Unexpected assertion kind "${a}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Eo(n)&&(n=So(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:s}=e;s&&!Eo(s)&&(s=So(s,t),e.name=s),n.set(e.number,e),s&&n.set(s,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const s=or({body:[e]});n(Te(s,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:s,minTargetEs2024:r,digitIsAscii:o,spaceIsAscii:i,wordIsAscii:l}){const{kind:a,negate:c,value:u}=e;if(o&&(a==="digit"||u==="digit")){n(on(si("digit",{negate:c}),t));return}if(i&&(a==="space"||u==="space")){n(Te(Ao(Wt(x_),c),t));return}if(l&&(a==="word"||u==="word")){n(on(si("word",{negate:c}),t));return}if(a==="any")n(on(jn("Any"),t));else if(a==="digit")n(on(jn("Nd",{negate:c}),t));else if(a!=="dot")if(a==="text_segment"){if(s==="strict")throw new Error(ae`Use of "\X" requires non-strict accuracy`);const f="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",d=ae`\p{RI}{2}|${f}(?:\u200D${f})*`;n(Te(Wt(ae`(?>\r\n|${r?ae`\p{RGI_Emoji}`:d}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(a==="hex")n(on(jn("AHex",{negate:c}),t));else if(a==="newline")n(Te(Wt(c?`[^
174
+ ]`:`(?>\r
175
+ ?|[
176
+ \v\f…\u2028\u2029])`),t));else if(a==="posix")if(!r&&(u==="graph"||u==="print")){if(s==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let f={graph:"!-~",print:" -~"}[u];c&&(f=`\0-${Ge(f.codePointAt(0)-1)}${Ge(f.codePointAt(2)+1)}-􏿿`),n(Te(Wt(`[${f}]`),t))}else n(Te(Ao(Wt($_.get(u)),c),t));else if(a==="property")Ui.has(Kr(u))||(e.key="sc");else if(a==="space")n(on(jn("space",{negate:c}),t));else if(a==="word")n(Te(Ao(Wt(Ut),c),t));else throw new Error(`Unexpected character set kind "${a}"`)},Directive({node:e,parent:t,root:n,remove:s,replaceWith:r,removeAllPrevSiblings:o,removeAllNextSiblings:i}){const{kind:l,flags:a}=e;if(l==="flags")if(!a.enable&&!a.disable)s();else{const c=wt({flags:a});c.body[0].body=i(),r(Te(c,t),{traverse:!0})}else if(l==="keep"){const c=n.body[0],f=n.body.length===1&&Gu(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(t.parent!==f||f.body.length>1)throw new Error(ae`Uses "\K" in a way that's unsupported`);const d=wn({behind:!0});d.body[0].body=o(),r(Te(d,t))}else throw new Error(`Unexpected directive kind "${l}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:s}=e;if(s==="fail")n(Te(wn({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${s.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=wt();t.body[0].body.push(e.body),e.body=Te(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let s=!1,r=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const i=tf(o.body);i?(s=!0,Array.isArray(i)?n.push(...i):n.push(i)):r=!0}s&&!r&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:s}){if(t==="strict"&&n&&s)throw new Error(ae`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Eo(n)&&(n=So(n,t),e.ref=n)}},T_={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:s,ref:r}=e;s||n.set(e,[...t.get(r).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:s},{groupOriginByCopy:r,groupsByName:o,multiplexCapturesToLeftByRef:i,openRefs:l,reffedNodesByReferencer:a}){const c=r.get(e);if(c&&l.has(e.number)){const f=on(Ra(e.number),t);a.set(f,l.get(e.number)),n(f);return}l.set(e.number,e),i.set(e.number,[]),e.name&&Ps(i,e.name,[]);const u=i.get(e.name??e.number);for(let f=0;f<u.length;f++){const d=u[f];if(c===d.node||c&&c===d.origin||e===d.origin){u.splice(f,1);break}}if(i.get(e.number).push({node:e,origin:c}),e.name&&i.get(e.name).push({node:e,origin:c}),e.name){const f=Ps(o,e.name,new Map);let d=!1;if(c)d=!0;else for(const h of f.values())if(!h.hasDuplicateNameToRemove){d=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:d})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=$r(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},s){const{isRecursive:r,ref:o}=e;if(r){let u=t;for(;(u=u.parent)&&!(u.type==="CapturingGroup"&&(u.name===o||u.number===o)););s.reffedNodesByReferencer.set(e,u);return}const i=s.subroutineRefMap.get(o),l=o===0,a=l?Ra(0):Qu(i,s.groupOriginByCopy,null);let c=a;if(!l){const u=Zu(D_(i,d=>d.type==="Group"&&!!d.flags)),f=u?$r(s.globalFlags,u):s.globalFlags;M_(f,s.currentFlags)||(c=wt({flags:j_(f)}),c.body[0].body.push(a))}n(Te(c,t),{traverse:!l})}},O_={Backreference({node:e,parent:t,replaceWith:n},s){if(e.orphan){s.highestOrphanBackref=Math.max(s.highestOrphanBackref,e.ref);return}const o=s.reffedNodesByReferencer.get(e).filter(i=>L_(i,e));if(!o.length)n(Te(wn({negate:!0}),t));else if(o.length>1){const i=wt({atomic:!0,body:o.reverse().map(l=>$n({body:[ni(l.number)]}))});n(Te(i,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let s=0;s<n;s++){const r=Fu();e.body.at(-1).body.push(r)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Yu(e){ws(e,{"*"({node:t,parent:n}){t.parent=n}})}function M_(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function L_(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const s=ef(n.parent);for(const r of s){if(r===n)break;if(r===e||nf(r,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function Qu(e,t,n,s){const r=Array.isArray(e)?[]:{};for(const[o,i]of Object.entries(e))o==="parent"?r.parent=Array.isArray(n)?s:n:i&&typeof i=="object"?r[o]=Qu(i,t,r,n):(o==="type"&&i==="CapturingGroup"&&t.set(r,t.get(e)??e),r[o]=i);return r}function Ra(e){const t=Wu(e);return t.isRecursive=!0,t}function D_(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function So(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function Zu(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:s})=>{t.forEach(r=>{var o,i;(o=s.enable)!=null&&o[r]&&(delete n.disable[r],n.enable[r]=!0),(i=s.disable)!=null&&i[r]&&(n.disable[r]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function j_({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function ef(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function tf(e){const t=e.find(n=>n.kind==="search_start"||F_(n,{negate:!1})||!G_(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const s of t.body){const r=tf(s.body);if(!r)return null;Array.isArray(r)?n.push(...r):n.push(r)}return n}return null}function nf(e,t){const n=ef(e)??[];for(const s of n)if(s===t||nf(s,t))return!0;return!1}function G_({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function B_(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function F_(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Gu(e.body[0],{type:"Assertion",kind:"search_start"})}function Eo(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Wt(e,t){const s=Bu(e,{...t,unicodePropertyMap:Ui}).body;return s.length>1||s[0].body.length>1?wt({body:s}):s[0].body[0]}function Ao(e,t){return e.negate=t,e}function on(e,t){return e.parent=t,e}function Te(e,t){return Yu(e),e.parent=t,e}function U_(e,t){const n=Ku(t),s=oi(n.target,"ES2024"),r=oi(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let i=null,l=null;if(!r){const h=[e.flags.ignoreCase];ws(e,W_,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(g){h.push(g)},setHasCasedChar(){h.at(-1)?i=!0:l=!0}})}const a={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||i)&&!l)};let c=e;const u={accuracy:n.accuracy,appliedGlobalFlags:a,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!r&&i&&l),useFlagMods:r,useFlagV:s,verbose:n.verbose};function f(h){return u.lastNode=c,c=h,C_(H_[h.type],`Unexpected node type "${h.type}"`)(h,u,f)}const d={pattern:e.body.map(f).join("|"),flags:f(e.flags),options:{...e.options}};return s||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],u.captureMap.forEach((h,g)=>{h.hidden&&d._hiddenCaptures.push(g),h.transferTo&&Ps(d._captureTransfers,h.transferTo,[]).push(g)}),d}var W_={"*":{enter({node:e},t){if(Ia(e)){const n=t.getCurrentModI();t.pushModI(e.flags?$r({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){Ia(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Wi(Ge(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),sf(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&Ju.has(e.value)&&t.setHasCasedChar()}},H_={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?ae`\B`:ae`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:s,name:r,number:o}=e,i={ignoreCase:t.currentFlags.ignoreCase},l=t.originMap.get(e);return l&&(i.hidden=!0,o>l.number&&(i.transferTo=l.number)),t.captureMap.set(o,i),`(${r?`?<${r}>`:""}${s.map(n).join("|")})`},Character({value:e},t){const n=Ge(e),s=On(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(s!==n)return s;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Wi(n)){const r=Xu(n);return t.inCharClass?r.join(""):r.length>1?`[${r.join("")}]`:r[0]}return n},CharacterClass(e,t,n){const{kind:s,negate:r,parent:o}=e;let{body:i}=e;if(s==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");xt.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&i.some(Na)&&(i=[zr(45),...i.filter(c=>!Na(c))]);const l=()=>`[${r?"^":""}${i.map(n).join(s==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||xt.bugNestedClassIgnoresNegation)&&!r){const u=i.filter(f=>f.type==="CharacterClass"&&f.kind==="union"&&f.negate);if(u.length){const f=wt(),d=f.body[0];return f.parent=o,d.parent=f,i=i.filter(h=>!u.includes(h)),e.body=i,i.length?(e.parent=d,d.body.push(e)):f.body.pop(),u.forEach(h=>{const g=$n({body:[h]});h.parent=g,g.parent=f,f.body.push(g)}),n(f)}}t.inCharClass=!0;const c=l();return t.inCharClass=!1,c}const a=i[0];if(s==="union"&&!r&&a&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(xt.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&i.length===1&&a.type!=="CharacterClassRange"))return i.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return l()},CharacterClassRange(e,t){const n=e.min.value,s=e.max.value,r={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=On(n,r),i=On(s,r),l=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const a=sf(e);X_(a).forEach(u=>{l.add(Array.isArray(u)?`${On(u[0],r)}-${On(u[1],r)}`:On(u,r))})}return`${o}-${i}${[...l].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:s},r){if(e==="dot")return r.currentFlags.dotAll?r.appliedGlobalFlags.dotAll||r.useFlagMods?".":"[^]":ae`[^\n]`;if(e==="digit")return t?ae`\D`:ae`\d`;if(e==="property"){if(r.useAppliedIgnoreCase&&r.currentFlags.ignoreCase&&Ju.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?ae`\P`:ae`\p`}{${s?`${s}=`:""}${n}}`}if(e==="word")return t?ae`\W`:ae`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:s},r,o){const i=r.currentFlags;n&&(r.currentFlags=$r(i,n));const l=t.map(o).join("|"),a=!r.verbose&&t.length===1&&s.type!=="Quantifier"&&!e&&(!r.useFlagMods||!n)?l:`(?${J_(e,n,r.useFlagMods)}${l})`;return r.currentFlags=i,a},LookaroundAssertion({body:e,kind:t,negate:n},s,r){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(r).join("|")})`},Quantifier(e,t,n){return n(e.body)+Y_(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const s=n.recursionLimit;return t===0?`(?R=${s})`:ae`\g<${t}&R=${s}>`}},V_=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),q_=new Set(["-","\\","]","^","["]),z_=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),$a=new Map([[9,ae`\t`],[10,ae`\n`],[11,ae`\v`],[12,ae`\f`],[13,ae`\r`],[8232,ae`\u2028`],[8233,ae`\u2029`],[65279,ae`\uFEFF`]]),K_=new RegExp("^\\p{Cased}$","u");function Wi(e){return K_.test(e)}function sf(e,t){const n=!!(t!=null&&t.firstOnly),s=e.min.value,r=e.max.value,o=[];if(s<65&&(r===65535||r>=131071)||s===65536&&r>=131071)return o;for(let i=s;i<=r;i++){const l=Ge(i);if(!Wi(l))continue;const a=Xu(l).filter(c=>{const u=c.codePointAt(0);return u<s||u>r});if(a.length&&(o.push(...a),n))break}return o}function On(e,{escDigit:t,inCharClass:n,useFlagV:s}){if($a.has(e))return $a.get(e);if(e<32||e>126&&e<160||e>262143||t&&Q_(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const r=n?s?z_:q_:V_,o=Ge(e);return(r.has(o)?"\\":"")+o}function X_(e){const t=e.map(r=>r.codePointAt(0)).sort((r,o)=>r-o),n=[];let s=null;for(let r=0;r<t.length;r++)t[r+1]===t[r]+1?s??(s=t[r]):s===null?n.push(t[r]):(n.push([s,t[r]]),s=null);return n}function J_(e,t,n){if(e)return">";let s="";if(t&&n){const{enable:r,disable:o}=t;s=(r!=null&&r.ignoreCase?"i":"")+(r!=null&&r.dotAll?"s":"")+(o?"-":"")+(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")}return`${s}:`}function Y_({kind:e,max:t,min:n}){let s;return!n&&t===1?s="?":!n&&t===1/0?s="*":n===1&&t===1/0?s="+":n===t?s=`{${n}}`:s=`{${n},${t===1/0?"":t}}`,s+{greedy:"",lazy:"?",possessive:"+"}[e]}function Ia({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function Q_(e){return e>47&&e<58}function Na({type:e,value:t}){return e==="Character"&&t===45}var cn,qt,Sn,un,En,Ts,ii,hn,Z_=(hn=class extends RegExp{constructor(n,s,r){var t=(...rx)=>(super(...rx),gn(this,Ts),gn(this,cn,new Map),gn(this,qt,null),gn(this,Sn),gn(this,un,null),gn(this,En,null),P(this,"rawOptions",{}),this);const o=!!(r!=null&&r.lazyCompile);if(n instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const i=n;t(i,s),bt(this,Sn,i.source),i instanceof hn&&(bt(this,cn,Je(i,cn)),bt(this,un,Je(i,un)),bt(this,En,Je(i,En)),this.rawOptions=i.rawOptions)}else{const i={hiddenCaptures:[],strategy:null,transfers:[],...r};t(o?"":n,s),bt(this,Sn,n),bt(this,cn,tb(i.hiddenCaptures,i.transfers)),bt(this,En,i.strategy),this.rawOptions=r??{}}o||bt(this,qt,this)}get source(){return Je(this,Sn)||"(?:)"}exec(n){if(!Je(this,qt)){const{lazyCompile:o,...i}=this.rawOptions;bt(this,qt,new hn(Je(this,Sn),this.flags,i))}const s=this.global||this.sticky,r=this.lastIndex;if(Je(this,En)==="clip_search"&&s&&r){this.lastIndex=0;const o=Qr(this,Ts,ii).call(this,n.slice(r));return o&&(eb(o,r,n,this.hasIndices),this.lastIndex+=r),o}return Qr(this,Ts,ii).call(this,n)}},cn=new WeakMap,qt=new WeakMap,Sn=new WeakMap,un=new WeakMap,En=new WeakMap,Ts=new WeakSet,ii=function(n){Je(this,qt).lastIndex=this.lastIndex;const s=Ki(hn.prototype,this,"exec").call(Je(this,qt),n);if(this.lastIndex=Je(this,qt).lastIndex,!s||!Je(this,cn).size)return s;const r=[...s];s.length=1;let o;this.hasIndices&&(o=[...s.indices],s.indices.length=1);const i=[0];for(let l=1;l<r.length;l++){const{hidden:a,transferTo:c}=Je(this,cn).get(l)??{};if(a?i.push(null):(i.push(s.length),s.push(r[l]),this.hasIndices&&s.indices.push(o[l])),c&&r[l]!==void 0){const u=i[c];if(!u)throw new Error(`Invalid capture transfer to "${u}"`);if(s[u]=r[l],this.hasIndices&&(s.indices[u]=o[l]),s.groups){Je(this,un)||bt(this,un,nb(this.source));const f=Je(this,un).get(c);f&&(s.groups[f]=r[l],this.hasIndices&&(s.indices.groups[f]=o[l]))}}}return s},hn);function eb(e,t,n,s){if(e.index+=t,e.input=n,s){const r=e.indices;for(let i=0;i<r.length;i++){const l=r[i];l&&(r[i]=[l[0]+t,l[1]+t])}const o=r.groups;o&&Object.keys(o).forEach(i=>{const l=o[i];l&&(o[i]=[l[0]+t,l[1]+t])})}}function tb(e,t){const n=new Map;for(const s of e)n.set(s,{hidden:!0});for(const[s,r]of t)for(const o of r)Ps(n,o,{}).transferTo=s;return n}function nb(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let s=0,r=0,o;for(;o=t.exec(e);){const{0:i,groups:{capture:l,name:a}}=o;i==="["?s++:s?i==="]"&&s--:l&&(r++,a&&n.set(r,a))}return n}function sb(e,t){const n=rb(e,t);return n.options?new Z_(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function rb(e,t){const n=Ku(t),s=Bu(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Ui}),r=N_(s,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=U_(r,n),i=b_(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),l=v_(i.pattern),a=y_(l.pattern,{captureTransfers:i.captureTransfers,hiddenCaptures:i.hiddenCaptures}),c={pattern:a.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const u=a.hiddenCaptures.sort((g,v)=>g-v),f=Array.from(a.captureTransfers),d=r._strategy,h=c.pattern.length>=n.lazyCompileLength;(u.length||f.length||d||h)&&(c.options={...u.length&&{hiddenCaptures:u},...f.length&&{transfers:f},...d&&{strategy:d},...h&&{lazyCompile:h}})}return c}const Pa=4294967295;class ob{constructor(t,n={}){P(this,"regexps");this.patterns=t,this.options=n;const{forgiving:s=!1,cache:r,regexConstructor:o}=n;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(i=>{if(typeof i!="string")return i;const l=r==null?void 0:r.get(i);if(l){if(l instanceof RegExp)return l;if(s)return null;throw l}try{const a=o(i);return r==null||r.set(i,a),a}catch(a){if(r==null||r.set(i,a),s)return null;throw a}})}findNextMatchSync(t,n,s){const r=typeof t=="string"?t:t.content,o=[];function i(l,a,c=0){return{index:l,captureIndices:a.indices.map(u=>u==null?{start:Pa,end:Pa,length:0}:{start:u[0]+c,end:u[1]+c,length:u[1]-u[0]})}}for(let l=0;l<this.regexps.length;l++){const a=this.regexps[l];if(a)try{a.lastIndex=n;const c=a.exec(r);if(!c)continue;if(c.index===n)return i(l,c,0);o.push([l,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(o.length){const l=Math.min(...o.map(a=>a[1].index));for(const[a,c,u]of o)if(c.index===l)return i(a,c,u)}return null}}function ib(e,t){return sb(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function lb(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>ib(n,{target:t.target})),{createScanner(n){return new ob(n,t)},createString(n){return{content:n}}}}const ab=Object.freeze(JSON.parse('{"displayName":"JSON","name":"json","patterns":[{"include":"#value"}],"repository":{"array":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.array.begin.json"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.array.end.json"}},"name":"meta.structure.array.json","patterns":[{"include":"#value"},{"match":",","name":"punctuation.separator.array.json"},{"match":"[^]\\\\s]","name":"invalid.illegal.expected-array-separator.json"}]},"comments":{"patterns":[{"begin":"/\\\\*\\\\*(?!/)","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.documentation.json"},{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.json"},{"captures":{"1":{"name":"punctuation.definition.comment.json"}},"match":"(//).*$\\\\n?","name":"comment.line.double-slash.js"}]},"constant":{"match":"\\\\b(?:true|false|null)\\\\b","name":"constant.language.json"},"number":{"match":"-?(?:0|[1-9]\\\\d*)(?:(?:\\\\.\\\\d+)?(?:[Ee][-+]?\\\\d+)?)?","name":"constant.numeric.json"},"object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.json"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.json"}},"name":"meta.structure.dictionary.json","patterns":[{"include":"#objectkey"},{"include":"#comments"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.dictionary.key-value.json"}},"end":"(,)|(?=})","endCaptures":{"1":{"name":"punctuation.separator.dictionary.pair.json"}},"name":"meta.structure.dictionary.value.json","patterns":[{"include":"#value"},{"match":"[^,\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json"}]},{"match":"[^}\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json"}]},"objectkey":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.support.type.property-name.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.support.type.property-name.end.json"}},"name":"string.json support.type.property-name.json","patterns":[{"include":"#stringcontent"}]},"string":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.json"}},"name":"string.quoted.double.json","patterns":[{"include":"#stringcontent"}]},"stringcontent":{"patterns":[{"match":"\\\\\\\\(?:[\\"/\\\\\\\\bfnrt]|u\\\\h{4})","name":"constant.character.escape.json"},{"match":"\\\\\\\\.","name":"invalid.illegal.unrecognized-string-escape.json"}]},"value":{"patterns":[{"include":"#constant"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"},{"include":"#comments"}]}},"scopeName":"source.json"}')),cb=[ab],li=ue(null),rf=ue(!1);let Ys=null;const ub={name:"prsm-devtools",type:"dark",bg:"transparent",fg:"#d4d4d4",settings:[{scope:["string"],settings:{foreground:"#a5d6a7"}},{scope:["constant.numeric"],settings:{foreground:"#4dd0e1"}},{scope:["constant.language.boolean","constant.language"],settings:{foreground:"#ce93d8"}},{scope:["constant.language.null"],settings:{foreground:"#666666"}},{scope:["support.type.property-name"],settings:{foreground:"#b0b0b0"}},{scope:["punctuation"],settings:{foreground:"#555555"}}]};function fb(){return Ys||(Ys=wv({themes:[ub],langs:[cb],engine:lb()}).then(e=>(li.value=e,rf.value=!0,e)),Ys)}function db(){vt(fb);function e(t){const n=typeof t=="string"?t:JSON.stringify(t,null,2);return n?li.value?li.value.codeToHtml(n,{lang:"json",theme:"prsm-devtools"}):hb(n):""}return{highlight:e,ready:rf}}function hb(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const pb={key:0,class:"text-view"},gb=["innerHTML"],mb={__name:"JsonView",props:{data:{default:null}},setup(e){const t=e,{highlight:n}=db(),s=fe(()=>typeof t.data=="string"),r=fe(()=>t.data===null||t.data===void 0?'<span style="color: var(--syn-null)">null</span>':n(t.data));return(o,i)=>s.value?(_(),b("pre",pb,E(t.data),1)):(_(),b("div",{key:1,class:"json-view",innerHTML:r.value},null,8,gb))}},gt=Gt(mb,[["__scopeId","data-v-5a4270db"]]),yb={key:0,class:"limiter-list"},vb={key:1,class:"empty",style:{"text-align":"left",padding:"0"}},_b={key:2},bb=["value"],wb=["disabled"],Cb={key:0,class:"card",style:{"margin-top":"12px"}},kb={class:"card-body"},xb={key:1,class:"error"},Sb={__name:"Limits",setup(e){const t=ue([]),n=ue(""),s=ue(""),r=ue(null),o=ue(null);vt(async()=>{const l=await fetch(We("/limits"));if(l.ok){const a=await l.json();t.value=a.limiters,a.limiters.length&&(n.value=a.limiters[0])}});async function i(){if(!n.value||!s.value)return;o.value=null,r.value=null;const l=await fetch(We(`/limits/${n.value}/peek/${encodeURIComponent(s.value)}`));if(l.ok)r.value=await l.json();else{const a=await l.json();o.value=a.error}}return(l,a)=>(_(),b("div",null,[a[4]||(a[4]=p("div",{class:"section-title"},"registered limiters",-1)),t.value.length?(_(),b("div",yb,[(_(!0),b(ee,null,he(t.value,c=>(_(),b("div",{key:c,class:"tag accent",style:{padding:"6px 14px","font-size":"11px"}},E(c),1))),128))])):(_(),b("p",vb,"no limiters registered")),t.value.length?(_(),b("section",_b,[a[2]||(a[2]=p("div",{class:"section-title"},"peek",-1)),a[3]||(a[3]=p("p",{class:"desc"},"inspect a key without consuming",-1)),p("form",{onSubmit:us(i,["prevent"]),class:"peek-form"},[cr(p("select",{"onUpdate:modelValue":a[0]||(a[0]=c=>n.value=c),class:"select"},[(_(!0),b(ee,null,he(t.value,c=>(_(),b("option",{key:c,value:c},E(c),9,bb))),128))],512),[[Go,n.value]]),cr(p("input",{"onUpdate:modelValue":a[1]||(a[1]=c=>s.value=c),placeholder:"key",class:"input"},null,512),[[Rh,s.value]]),p("button",{type:"submit",disabled:!s.value,class:"btn"},"peek",8,wb)],32),r.value?(_(),b("div",Cb,[p("div",kb,[ye(gt,{data:r.value},null,8,["data"])])])):Z("",!0),o.value?(_(),b("p",xb,E(o.value),1)):Z("",!0)])):Z("",!0)]))}},Eb=Gt(Sb,[["__scopeId","data-v-22c855ec"]]),Ab={class:"graph-controls"},Rb=["viewBox"],$b=["d"],Ib=["x","y"],Nb=["onClick"],Pb=["x","y","width","height"],Tb=["x","y"],Ob=["x","y"],Mb=["x","y"],Lb=["x","y"],Db={__name:"WorkflowGraph",props:{graph:{type:Object,required:!0},execution:{type:Object,default:null},selectedStep:{type:String,default:null}},emits:["select-step"],setup(e,{emit:t}){const n=e,s=t,r=ue(null),o=ue(!1),i=ue(0),l=ue(0),a=ue(1);let c=!1,u=!1,f=0,d=0;function h(F){F.preventDefault();const ie=F.deltaY>0?.96:1.04,j=Math.min(3,Math.max(.3,a.value*ie)),pe=r.value.getBoundingClientRect(),le=F.clientX-pe.left,Ee=F.clientY-pe.top;i.value=le-(le-i.value)*(j/a.value),l.value=Ee-(Ee-l.value)*(j/a.value),a.value=j}function g(F){F.button===0&&(c=!0,u=!1,f=F.clientX,d=F.clientY)}function v(F){if(!c)return;const ie=F.clientX-f,j=F.clientY-d;(ie!==0||j!==0)&&(u=!0),i.value+=ie,l.value+=j,f=F.clientX,d=F.clientY}function x(){c=!1}function S(F){u||s("select-step",F)}function A(){i.value=0,l.value=0,a.value=1}function w(){o.value=!o.value,A()}function I(F){F.key==="Escape"&&o.value&&(o.value=!1,A())}vt(()=>window.addEventListener("keydown",I)),nn(()=>window.removeEventListener("keydown",I));function V(F){const ie=(F==null?void 0:F.nodes)??[],j=(F==null?void 0:F.edges)??[],pe=new Map(ie.map(ne=>[ne.name,0])),le=new Map(ie.map(ne=>[ne.name,[]]));for(const ne of j)pe.has(ne.to)&&pe.set(ne.to,pe.get(ne.to)+1),le.has(ne.from)&&le.get(ne.from).push(ne);const Ee=[F.start],D=new Map([[F.start,0]]);for(;Ee.length;){const ne=Ee.shift();for(const R of le.get(ne)??[]){const H=(D.get(ne)??0)+1;(!D.has(R.to)||H>D.get(R.to))&&D.set(R.to,H),pe.set(R.to,Math.max(0,(pe.get(R.to)??0)-1)),pe.get(R.to)===0&&Ee.push(R.to)}}const T=[];for(const ne of ie){const R=D.get(ne.name)??0;T[R]=T[R]??[],T[R].push(ne)}const $=[],Y=220,be=92,ve=90,Pe=34,De=32;for(let ne=0;ne<T.length;ne++){const R=T[ne]??[];R.sort((W,J)=>W.name.localeCompare(J.name));const H=R.length*be+Math.max(0,R.length-1)*Pe;for(let W=0;W<R.length;W++){const J=R[W];$.push({...J,x:De+ne*(Y+ve),y:De+W*(be+Pe)+Math.max(0,(380-H)/2),width:Y,height:be})}}const nt=new Map($.map(ne=>[ne.name,ne])),_t=j.map(ne=>{const R=nt.get(ne.from),H=nt.get(ne.to);return!R||!H?null:{...ne,x1:R.x+R.width,y1:R.y+R.height/2,x2:H.x,y2:H.y+H.height/2,mx:(R.x+R.width+H.x)/2,my:(R.y+R.height/2+H.y+H.height/2)/2}}).filter(Boolean);return{nodes:$,edges:_t,width:Math.max(760,...$.map(ne=>ne.x+ne.width+De)),height:Math.max(420,...$.map(ne=>ne.y+ne.height+De))}}const N=fe(()=>V(n.graph));function C(F){var ie,j;return((j=(ie=n.execution)==null?void 0:ie.steps)==null?void 0:j[F])??null}function z(F,ie){var pe,le;const j=C(F);return((pe=n.execution)==null?void 0:pe.currentStep)===F&&n.execution.status==="running"?"running":(j==null?void 0:j.status)==="succeeded"?ie==="decision"?"decision-success":"succeeded":(j==null?void 0:j.status)==="failed"?"failed":((le=n.execution)==null?void 0:le.currentStep)===F?"current":"idle"}function se(F){var j;if(!n.execution)return"edge";const ie=C(F.from);return ie!=null&&ie.route&&ie.route===F.label?"edge edge-active":((j=C(F.from))==null?void 0:j.status)==="succeeded"&&C(F.to)?"edge edge-seen":"edge"}return(F,ie)=>(_(),b("div",{ref_key:"container",ref:r,class:_e(["graph-shell",{fullscreen:o.value}]),onWheel:us(h,["prevent"]),onPointerdown:g,onPointermove:v,onPointerup:x},[p("div",Ab,[p("button",{onClick:us(A,["stop"]),title:"reset view"},"1:1"),p("button",{onClick:us(w,["stop"]),title:"fullscreen"},E(o.value?"exit":"expand"),1)]),(_(),b("svg",{viewBox:`0 0 ${N.value.width} ${N.value.height}`,class:"graph",style:Yt({transform:`translate(${i.value}px, ${l.value}px) scale(${a.value})`,transformOrigin:"0 0"})},[p("g",null,[(_(!0),b(ee,null,he(N.value.edges,j=>(_(),b("path",{key:`${j.from}:${j.to}:${j.label}`,d:`M ${j.x1} ${j.y1} C ${(j.x1+j.x2)/2} ${j.y1}, ${(j.x1+j.x2)/2} ${j.y2}, ${j.x2} ${j.y2}`,class:_e(se(j))},null,10,$b))),128)),(_(!0),b(ee,null,he(N.value.edges,j=>(_(),b("text",{key:`${j.from}:${j.to}:${j.label}:label`,x:j.mx,y:j.my-8,class:"edge-label","text-anchor":"middle"},E(j.label),9,Ib))),128))]),(_(!0),b(ee,null,he(N.value.nodes,j=>{var pe,le;return _(),b("g",{key:j.name,class:_e(["node",[j.type,z(j.name,j.type),{selected:e.selectedStep===j.name}]]),onClick:us(Ee=>S(j.name),["stop"])},[p("rect",{x:j.x,y:j.y,width:j.width,height:j.height,rx:"10"},null,8,Pb),p("text",{x:j.x+16,y:j.y+28,class:"node-name"},E(j.label||j.name),9,Tb),p("text",{x:j.x+16,y:j.y+50,class:"node-type"},E(j.type),9,Ob),(pe=C(j.name))!=null&&pe.attempts?(_(),b("text",{key:0,x:j.x+16,y:j.y+72,class:"node-meta"}," attempts "+E(C(j.name).attempts),9,Mb)):((le=j.retry)==null?void 0:le.maxAttempts)>1?(_(),b("text",{key:1,x:j.x+16,y:j.y+72,class:"node-meta"}," retries "+E(j.retry.maxAttempts),9,Lb)):Z("",!0)],10,Nb)}),128))],12,Rb))],34))}},of=Gt(Db,[["__scopeId","data-v-6098c89d"]]),jb={key:0,class:"empty",style:{"text-align":"left",padding:"0"}},Gb={key:1,class:"empty",style:{"text-align":"left",padding:"0"}},Bb={key:2,class:"workflow-layout"},Fb={class:"wf-sidebar"},Ub=["onClick"],Wb={class:"card-header"},Hb={class:"name"},Vb={class:"badge"},qb={class:"card-body"},zb={class:"kv-row"},Kb={class:"kv-value"},Xb={class:"kv-row"},Jb={class:"kv-value"},Yb={key:0,class:"detail"},Qb={class:"headline"},Zb={class:"headline-name"},ew={class:"headline-sub"},tw={class:"headline-stats"},nw={key:0,class:"card"},sw={class:"card-header"},rw={class:"name"},ow={class:"card-body"},iw={class:"kv-row"},lw={class:"kv-value"},aw={class:"kv-row"},cw={class:"kv-value"},uw={class:"kv-row"},fw={class:"kv-value"},dw={key:0,style:{"margin-top":"8px",color:"#666","font-size":"11px"}},hw={__name:"Workflows",setup(e){const t=Hr(),n=Ri(),s=ue([]),r=ue(""),o=ue(""),i=ue(null);async function l(){const u=await fetch(We("/workflows"));if(!u.ok){i.value="failed to load workflows";return}const f=await u.json();s.value=f.workflows;const d=typeof t.query.workflow=="string"?t.query.workflow:"",h=s.value[0]?`${s.value[0].name}@${s.value[0].version}`:"";r.value=s.value.some(g=>`${g.name}@${g.version}`===d)?d:h}vt(l),et(r,u=>{var d;if(!u)return;n.replace({query:{workflow:u}});const f=(d=a.value)==null?void 0:d.graph;o.value=(f==null?void 0:f.start)??""}),et(()=>t.query.workflow,u=>{typeof u=="string"&&u!==r.value&&(r.value=u)});const a=fe(()=>s.value.find(u=>`${u.name}@${u.version}`===r.value)??null),c=fe(()=>{var u,f,d;return((d=(f=(u=a.value)==null?void 0:u.graph)==null?void 0:f.nodes)==null?void 0:d.find(h=>h.name===o.value))??null});return(u,f)=>{var d;return _(),b("div",null,[f[6]||(f[6]=p("div",{class:"section-title"},"workflows",-1)),i.value?(_(),b("div",jb,E(i.value),1)):s.value.length?(_(),b("div",Bb,[p("aside",Fb,[(_(!0),b(ee,null,he(s.value,h=>(_(),b("div",{key:`${h.name}@${h.version}`,class:_e(["card",{active:`${h.name}@${h.version}`===r.value}]),style:{cursor:"pointer"},onClick:g=>r.value=`${h.name}@${h.version}`},[p("div",Wb,[p("span",Hb,E(h.name),1),p("span",Vb,"v"+E(h.version),1)]),p("div",qb,[p("div",zb,[f[1]||(f[1]=p("span",{class:"kv-key"},"steps",-1)),p("span",Kb,E(h.graph.nodes.length),1)]),p("div",Xb,[f[2]||(f[2]=p("span",{class:"kv-key"},"start",-1)),p("span",Jb,E(h.graph.start),1)])])],10,Ub))),128))]),a.value?(_(),b("section",Yb,[p("div",Qb,[p("div",null,[p("div",Zb,E(a.value.name),1),p("div",ew,"version "+E(a.value.version),1)]),p("div",tw,[p("span",null,E(a.value.graph.nodes.length)+" steps",1),p("span",null,E(a.value.graph.edges.length)+" edges",1)])]),ye(of,{graph:a.value.graph,"selected-step":o.value,onSelectStep:f[0]||(f[0]=h=>o.value=h)},null,8,["graph","selected-step"]),c.value?(_(),b("div",nw,[p("div",sw,[p("span",rw,E(c.value.name),1)]),p("div",ow,[p("div",iw,[f[3]||(f[3]=p("span",{class:"kv-key"},"type",-1)),p("span",lw,E(c.value.type),1)]),p("div",aw,[f[4]||(f[4]=p("span",{class:"kv-key"},"timeout",-1)),p("span",cw,E(c.value.timeout??"-"),1)]),p("div",uw,[f[5]||(f[5]=p("span",{class:"kv-key"},"retries",-1)),p("span",fw,E(((d=c.value.retry)==null?void 0:d.maxAttempts)??1),1)]),c.value.description?(_(),b("p",dw,E(c.value.description),1)):Z("",!0)])])):Z("",!0)])):Z("",!0)])):(_(),b("div",Gb,"no workflows registered"))])}}},pw=Gt(hw,[["__scopeId","data-v-124a0c49"]]),gw={class:"filters"},mw=["value"],yw={key:0,class:"headline"},vw={class:"headline-name"},_w={class:"headline-sub"},bw={class:"execution-layout"},ww={class:"list"},Cw=["onClick"],kw={class:"execution-main"},xw={class:"execution-workflow"},Sw={class:"execution-id"},Ew={class:"execution-meta"},Aw={key:0,class:"empty"},Rw={key:0,class:"center"},$w={key:0,class:"card"},Iw={class:"card-body"},Nw={key:1,class:"card"},Pw={class:"card-body"},Tw={key:2,class:"card"},Ow={class:"card-body"},Mw={key:1,class:"inspector"},Lw={class:"card"},Dw={class:"card-body"},jw={class:"kv-row"},Gw={class:"kv-value"},Bw={class:"kv-row"},Fw={class:"kv-value"},Uw={class:"kv-row"},Ww={class:"kv-value"},Hw={class:"kv-row"},Vw={class:"kv-value"},qw={key:0,class:"card"},zw={class:"card-header"},Kw={class:"name"},Xw={class:"card-body"},Jw={class:"kv-row"},Yw={class:"kv-value"},Qw={class:"kv-row"},Zw={class:"kv-value"},e0={key:0,class:"kv-row"},t0={class:"kv-value"},n0={key:1,class:"kv-row"},s0={class:"kv-value"},r0={key:2,class:"kv-row"},o0={class:"kv-value"},i0={key:3,style:{"margin-top":"8px"}},l0={key:4,style:{"margin-top":"8px"}},a0={class:"card"},c0={class:"card-body",style:{padding:"0"}},u0={class:"timeline"},f0={class:"timeline-type"},d0={class:"timeline-step"},h0={class:"timeline-time"},p0={__name:"WorkflowExecutions",setup(e){const t=Hr(),n=Ri(),s=js(),r=ue([]),o=ue([]),i=ue(""),l=ue(null),a=ue(""),c=ue(typeof t.query.status=="string"?t.query.status:""),u=ue(typeof t.query.workflow=="string"?t.query.workflow:"");let f=null;async function d(){const N=await fetch(We("/workflows"));if(!N.ok)return;const C=await N.json();r.value=C.workflows}async function h(){var se;const N=new URLSearchParams;c.value&&N.set("status",c.value),u.value&&N.set("workflow",u.value),N.set("limit","100");const C=await fetch(We(`/workflow/executions?${N.toString()}`));if(!C.ok)return;const z=await C.json();o.value=z.executions,!i.value&&o.value[0]&&(i.value=o.value[0].id),i.value&&!o.value.some(F=>F.id===i.value)&&(i.value=((se=o.value[0])==null?void 0:se.id)??"")}async function g(N){if(!N){l.value=null;return}const C=await fetch(We(`/workflow/executions/${N}`));if(!C.ok)return;const z=await C.json();l.value=z.execution,(!a.value||!z.execution.steps[a.value])&&(a.value=z.execution.currentStep||Object.keys(z.execution.steps)[0]||"")}function v(N){if(!N)return"-";const C=Date.now()-N;return C<1e3?"now":C<6e4?`${Math.floor(C/1e3)}s ago`:C<36e5?`${Math.floor(C/6e4)}m ago`:`${Math.floor(C/36e5)}h ago`}function x(N){return(N==null?void 0:N.slice(0,8))??""}function S(){const N={};u.value&&(N.workflow=u.value),c.value&&(N.status=c.value),i.value&&(N.execution=i.value),n.replace({query:N})}vt(async()=>{await d(),await h(),i.value=typeof t.query.execution=="string"?t.query.execution:i.value,await g(i.value),f=setInterval(async()=>{await h(),i.value&&await g(i.value)},2e3)}),nn(()=>{f&&clearInterval(f)}),et([c,u],async()=>{S(),await h(),i.value&&await g(i.value)}),et(i,async N=>{S(),await g(N)}),et(()=>s.value[0],async N=>{var C;(C=N==null?void 0:N.type)!=null&&C.startsWith("workflow:")&&(await h(),i.value&&await g(i.value))});const A=fe(()=>l.value?r.value.find(N=>N.name===l.value.workflow&&N.version===l.value.workflowVersion)??null:null);et([l,A],([N,C])=>{!N||!C||a.value&&N.steps[a.value]||(a.value=N.currentStep||Object.keys(N.steps)[0]||C.graph.start)});const w=fe(()=>{var N,C;return((C=(N=l.value)==null?void 0:N.steps)==null?void 0:C[a.value])??null}),I=fe(()=>{var N;return(((N=l.value)==null?void 0:N.journal)??[]).slice().sort((C,z)=>z.at-C.at)}),V=fe(()=>r.value.map(N=>N.name));return(N,C)=>(_(),b("div",null,[C[22]||(C[22]=p("div",{class:"section-title"},"workflow executions",-1)),p("div",gw,[cr(p("select",{"onUpdate:modelValue":C[0]||(C[0]=z=>u.value=z),class:"select"},[C[3]||(C[3]=p("option",{value:""},"all workflows",-1)),(_(!0),b(ee,null,he(V.value,z=>(_(),b("option",{key:z,value:z},E(z),9,mw))),128))],512),[[Go,u.value]]),cr(p("select",{"onUpdate:modelValue":C[1]||(C[1]=z=>c.value=z),class:"select"},[...C[4]||(C[4]=[Oc('<option value="" data-v-24631062>all statuses</option><option value="queued" data-v-24631062>queued</option><option value="waiting" data-v-24631062>waiting</option><option value="running" data-v-24631062>running</option><option value="succeeded" data-v-24631062>succeeded</option><option value="failed" data-v-24631062>failed</option><option value="canceled" data-v-24631062>canceled</option>',7)])],512),[[Go,c.value]])]),l.value?(_(),b("div",yw,[p("div",vw,E(l.value.workflow),1),p("div",_w,E(l.value.status)+" - "+E(l.value.id),1)])):Z("",!0),p("div",bw,[p("aside",ww,[(_(!0),b(ee,null,he(o.value,z=>(_(),b("div",{key:z.id,class:_e(["execution-row",[z.status,{active:z.id===i.value}]]),onClick:se=>i.value=z.id},[p("div",kw,[p("span",xw,E(z.workflow),1),p("span",Sw,E(x(z.id)),1)]),p("div",Ew,[p("span",null,E(z.status),1),p("span",null,E(z.currentStep||"-"),1),p("span",null,E(v(z.updatedAt)),1)])],10,Cw))),128)),o.value.length?Z("",!0):(_(),b("p",Aw,"no executions"))]),l.value&&A.value?(_(),b("section",Rw,[ye(of,{graph:A.value.graph,execution:l.value,"selected-step":a.value,onSelectStep:C[2]||(C[2]=z=>a.value=z)},null,8,["graph","execution","selected-step"]),l.value.input!=null?(_(),b("div",$w,[C[5]||(C[5]=p("div",{class:"card-header"},[p("span",{class:"name"},"input")],-1)),p("div",Iw,[ye(gt,{data:l.value.input},null,8,["data"])])])):Z("",!0),l.value.output!=null?(_(),b("div",Nw,[C[6]||(C[6]=p("div",{class:"card-header"},[p("span",{class:"name"},"output")],-1)),p("div",Pw,[ye(gt,{data:l.value.output},null,8,["data"])])])):Z("",!0),l.value.error?(_(),b("div",Tw,[C[7]||(C[7]=p("div",{class:"card-header"},[p("span",{class:"name",style:{color:"var(--color-red)"}},"error")],-1)),p("div",Ow,[ye(gt,{data:l.value.error},null,8,["data"])])])):Z("",!0)])):Z("",!0),l.value&&A.value?(_(),b("aside",Mw,[p("div",Lw,[C[12]||(C[12]=p("div",{class:"card-header"},[p("span",{class:"name"},"execution")],-1)),p("div",Dw,[p("div",jw,[C[8]||(C[8]=p("span",{class:"kv-key"},"status",-1)),p("span",Gw,E(l.value.status),1)]),p("div",Bw,[C[9]||(C[9]=p("span",{class:"kv-key"},"current",-1)),p("span",Fw,E(l.value.currentStep||"terminal"),1)]),p("div",Uw,[C[10]||(C[10]=p("span",{class:"kv-key"},"created",-1)),p("span",Ww,E(new Date(l.value.createdAt).toLocaleString()),1)]),p("div",Hw,[C[11]||(C[11]=p("span",{class:"kv-key"},"updated",-1)),p("span",Vw,E(new Date(l.value.updatedAt).toLocaleString()),1)])])]),w.value?(_(),b("div",qw,[p("div",zw,[p("span",Kw,"step: "+E(a.value),1)]),p("div",Xw,[C[20]||(C[20]=p("p",{class:"step-hint"},"click a node in the graph to inspect",-1)),p("div",Jw,[C[13]||(C[13]=p("span",{class:"kv-key"},"status",-1)),p("span",Yw,E(w.value.status),1)]),p("div",Qw,[C[14]||(C[14]=p("span",{class:"kv-key"},"attempts",-1)),p("span",Zw,E(w.value.attempts),1)]),w.value.route?(_(),b("div",e0,[C[15]||(C[15]=p("span",{class:"kv-key"},"route",-1)),p("span",t0,E(w.value.route),1)])):Z("",!0),w.value.startedAt?(_(),b("div",n0,[C[16]||(C[16]=p("span",{class:"kv-key"},"started",-1)),p("span",s0,E(new Date(w.value.startedAt).toLocaleTimeString()),1)])):Z("",!0),w.value.endedAt?(_(),b("div",r0,[C[17]||(C[17]=p("span",{class:"kv-key"},"ended",-1)),p("span",o0,E(new Date(w.value.endedAt).toLocaleTimeString()),1)])):Z("",!0),w.value.output!=null&&w.value.output!==w.value.route?(_(),b("div",i0,[C[18]||(C[18]=p("div",{class:"section-title"},"output",-1)),ye(gt,{data:w.value.output},null,8,["data"])])):Z("",!0),w.value.error?(_(),b("div",l0,[C[19]||(C[19]=p("div",{class:"section-title",style:{color:"var(--color-red)"}},"error",-1)),ye(gt,{data:w.value.error},null,8,["data"])])):Z("",!0)])])):Z("",!0),p("div",a0,[C[21]||(C[21]=p("div",{class:"card-header"},[p("span",{class:"name"},"journal")],-1)),p("div",c0,[p("div",u0,[(_(!0),b(ee,null,he(I.value,(z,se)=>(_(),b("div",{key:se,class:"timeline-row"},[p("span",f0,E(z.type),1),p("span",d0,E(z.step||z.route||"-"),1),p("span",h0,E(new Date(z.at).toLocaleTimeString()),1)]))),128))])])])])):Z("",!0)])]))}},g0=Gt(p0,[["__scopeId","data-v-24631062"]]);function m0(e=1e3){const t=ue(null),n=ue(null),s=ue(null),r=ue(null),o=Qn({});let i=null,l=null;async function a(){try{const v=await fetch(We("/realtime/state"));if(!v.ok)throw new Error(`${v.status}`);t.value=await v.json(),r.value=null}catch(v){r.value=v.message}}async function c(v){try{const x=await fetch(We(`/realtime/connection/${v}`));if(!x.ok)throw new Error(`${x.status}`);n.value=await x.json()}catch{}}async function u(v){try{const x=await fetch(We(`/realtime/record/${encodeURIComponent(v)}`));if(!x.ok)throw new Error(`${x.status}`);const S=await x.json();o[v]=S.data}catch{o[v]=null}}function f(v){delete o[v]}async function d(v,x){try{const S=await fetch(We(`/realtime/collection/${encodeURIComponent(v)}/records?connId=${encodeURIComponent(x)}`));if(!S.ok)throw new Error(`${S.status}`);return await S.json()}catch{return{recordIds:[],records:[]}}}async function h(v){s.value=v,v?await c(v):n.value=null}async function g(){await a(),s.value&&await c(s.value)}return vt(()=>{g(),i=setInterval(g,e),l=new EventSource(We("/events")),l.addEventListener("realtime:record:update",v=>{const{recordId:x,data:S}=JSON.parse(v.data);x in o&&(o[x]=S)}),l.addEventListener("realtime:record:removed",v=>{const{recordId:x}=JSON.parse(v.data);x in o&&(o[x]=null)})}),nn(()=>{i&&clearInterval(i),l&&l.close()}),{state:t,connectionDetail:n,selectedConnectionId:s,error:r,selectConnection:h,watchedRecords:o,watchRecord:u,unwatchRecord:f,fetchCollectionRecords:d}}const y0={class:"sidebar-section"},v0={key:0,class:"badge"},_0=["onClick"],b0=["title"],w0={key:0,class:"meta"},C0={__name:"ConnectionPicker",props:{connections:{type:Array,default:()=>[]},selectedId:{type:String,default:null}},emits:["select"],setup(e){return(t,n)=>(_(),b("div",y0,[n[2]||(n[2]=p("div",{class:"sidebar-header"},"connections",-1)),p("div",{class:_e(["sidebar-item",{active:!e.selectedId}]),onClick:n[0]||(n[0]=s=>t.$emit("select",null))},[n[1]||(n[1]=p("span",{class:"label"},"all connections",-1)),e.connections.length?(_(),b("span",v0,E(e.connections.length),1)):Z("",!0)],2),(_(!0),b(ee,null,he(e.connections,s=>(_(),b("div",{key:s.id,class:_e(["sidebar-item",{active:e.selectedId===s.id}]),onClick:r=>t.$emit("select",s.id)},[p("span",{class:"label",title:s.id},E(s.id.slice(0,8)),9,b0),s.latency!==null?(_(),b("span",w0,E(s.latency)+"ms",1)):Z("",!0)],10,_0))),128))]))}},k0={class:"realtime-shell"},x0={class:"tab-bar"},S0={key:0,class:"count"},E0={class:"tab-bar-right"},A0={key:0,class:"instance-id"},R0={class:"rt-main"},$0={class:"sidebar"},I0={key:0,class:"sidebar-section"},N0={style:{float:"right","font-size":"9px"}},P0={class:"exposed-label"},T0={class:"content"},O0={__name:"Realtime",setup(e){const t=Hr(),n=Ri(),s=ue(!0),r={channels:"channels",records:"records",writableRecords:"writable",collections:"collections",presence:"presence",commands:"commands"};function o(N){return r[N]||N}function i(N){f(N),n.push("/realtime/metadata")}const{state:l,connectionDetail:a,selectedConnectionId:c,error:u,selectConnection:f,watchedRecords:d,watchRecord:h,unwatchRecord:g,fetchCollectionRecords:v}=m0(),x=fe(()=>{var N;return(N=l.value)!=null&&N.rooms?c.value?l.value.rooms.filter(C=>C.members.includes(c.value)):l.value.rooms:[]}),S=fe(()=>{var C;if(!((C=l.value)!=null&&C.channels))return{};if(!c.value)return l.value.channels;const N={};for(const[z,se]of Object.entries(l.value.channels))se.includes(c.value)&&(N[z]=se);return N}),A=fe(()=>{var C;if(!((C=l.value)!=null&&C.collections))return{};if(!c.value)return l.value.collections;const N={};for(const[z,se]of Object.entries(l.value.collections))se.subscribers[c.value]&&(N[z]=se);return N}),w=fe(()=>{var C;if(!((C=l.value)!=null&&C.records))return{};if(!c.value)return l.value.records;const N={};for(const[z,se]of Object.entries(l.value.records))se.subscribers[c.value]&&(N[z]=se);return N}),I=fe(()=>{var C;if(!((C=l.value)!=null&&C.exposed))return{};const N={};for(const[z,se]of Object.entries(l.value.exposed))se.length&&(N[z]=se);return N}),V=fe(()=>[{id:"rooms",label:"rooms",count:x.value.length},{id:"channels",label:"channels",count:Object.keys(S.value).length},{id:"collections",label:"collections",count:Object.keys(A.value).length},{id:"records",label:"records",count:Object.keys(w.value).length},{id:"metadata",label:"metadata"}]);return(N,C)=>{var F,ie,j,pe;const z=fr("router-link"),se=fr("router-view");return _(),b("div",k0,[p("div",x0,[(_(!0),b(ee,null,he(V.value,le=>(_(),pr(z,{key:le.id,to:`/realtime/${le.id}`,class:_e(["tab",{active:Oe(t).path===`/realtime/${le.id}`}])},{default:wi(()=>[fn(E(le.label),1),le.count!==void 0?(_(),b("span",S0,E(le.count),1)):Z("",!0)]),_:2},1032,["to","class"]))),128)),p("div",E0,[p("span",{class:_e(["pulse",{disconnected:!!Oe(u)}])},null,2),Oe(l)?(_(),b("span",A0,"instance "+E((F=Oe(l).instanceId)==null?void 0:F.slice(0,8)),1)):Z("",!0)])]),p("div",R0,[p("div",$0,[ye(C0,{connections:((ie=Oe(l))==null?void 0:ie.connections)||[],"selected-id":Oe(c),onSelect:Oe(f)},null,8,["connections","selected-id","onSelect"]),(j=Oe(l))!=null&&j.exposed?(_(),b("div",I0,[p("div",{class:"sidebar-header",style:{cursor:"pointer","user-select":"none"},onClick:C[0]||(C[0]=le=>s.value=!s.value)},[C[1]||(C[1]=p("span",null,"registered",-1)),p("span",N0,E(s.value?"-":"+"),1)]),s.value?(_(!0),b(ee,{key:0},he(I.value,(le,Ee)=>(_(),b("div",{key:Ee,class:"exposed-row"},[p("span",P0,E(o(Ee)),1),(_(!0),b(ee,null,he(le,D=>(_(),b("span",{class:"tag",key:D},E(D),1))),128))]))),128)):Z("",!0)])):Z("",!0)]),p("div",T0,[ye(se,{rooms:x.value,channels:S.value,collections:A.value,records:w.value,detail:Oe(a),connections:((pe=Oe(l))==null?void 0:pe.connections)||[],"fetch-records":Oe(v),"watched-records":Oe(d),"watch-record":Oe(h),"unwatch-record":Oe(g),onNavigate:i},null,8,["rooms","channels","collections","records","detail","connections","fetch-records","watched-records","watch-record","unwatch-record"])])])])}}},M0=Gt(O0,[["__scopeId","data-v-d6b8bed2"]]),L0={class:"cells-page"},D0={class:"cells-toolbar"},j0={class:"left-group"},G0={key:0,class:"graph-tabs"},B0=["onClick"],F0={class:"view-toggle"},U0={class:"stats"},W0={key:0,class:"dot"},H0={key:1,style:{color:"var(--color-blue)"}},V0={key:2,class:"dot"},q0={key:3,style:{color:"var(--color-red)"}},z0={class:"cells-layout"},K0={class:"cells-main"},X0={key:0,class:"card"},J0=["onClick"],Y0={class:"col-name"},Q0=["title"],Z0={class:"col-deps"},e1={class:"col-updated"},t1={key:0,class:"empty"},n1=["width","height"],s1=["d","marker-end"],r1=["transform","onClick"],o1=["width","height"],i1=["fill"],l1=["id"],a1=["width","height"],c1=["clip-path"],u1=["x"],f1=["x"],d1={key:0,class:"empty"},h1={key:0,class:"cells-detail"},p1={class:"detail-header"},g1={class:"detail-name"},m1={class:"detail-grid"},y1={class:"detail-main"},v1={class:"detail-card span-2"},_1={class:"detail-content scroll-y"},b1={key:0,class:"detail-card span-2"},w1={class:"detail-pre"},C1={class:"detail-card"},k1={class:"detail-label"},x1={key:0,class:"detail-label-meta"},S1={key:0,class:"history-list"},E1={class:"history-time"},A1=["title"],R1={key:0,class:"empty-small"},$1={key:1,class:"history-disabled"},I1={key:1,class:"detail-card"},N1={class:"detail-content",style:{color:"var(--color-red)"}},P1={key:2,class:"detail-card"},T1={class:"kv-list"},O1={class:"kv-list-key"},M1={class:"kv-list-val"},L1={key:3,class:"detail-card"},D1={class:"kv-list"},j1={class:"kv-list-key"},G1={class:"kv-list-val"},B1={class:"detail-side"},F1={class:"detail-card"},U1={class:"kv-list"},W1={class:"kv-list-row"},H1={class:"kv-list-val"},V1={class:"kv-list-row"},q1={class:"kv-list-val"},z1={key:0,class:"kv-list-row"},K1={class:"kv-list-val"},X1={class:"kv-list-row"},J1={class:"kv-list-val"},Y1=80,as=20,Q1={__name:"Cells",props:{config:Object},setup(e){const t=e,n=fe(()=>{var D;return((D=t.config)==null?void 0:D.cells)??[]}),s=ue(null),r=ue([]),o=ue("table"),i=ue(null),l=ue(0);let a=null;const c=ue(null),u=fe(()=>c.value?r.value.find(D=>D.name===c.value)??null:null),f=ue([]),d=js();let h=null,g=null,v=0;const x=ue(new Map);et(n,D=>{D.length&&!D.includes(s.value)&&(s.value=D[0])},{immediate:!0}),et(s,()=>{r.value=[],c.value=null,f.value=[],x.value.clear(),v=Date.now(),S()});async function S(){if(!s.value)return;const D=await fetch(We(`/cells/${encodeURIComponent(s.value)}`));if(D.ok){const T=await D.json();r.value=T.cells}}async function A(D){if(!s.value)return;const T=await fetch(We(`/cells/${encodeURIComponent(s.value)}/${encodeURIComponent(D)}/history?limit=50`));if(T.ok){const $=await T.json();c.value===D&&(f.value=$.entries)}}vt(()=>{S(),h=setInterval(S,1500),g=setInterval(()=>{const D=Date.now(),T=[];for(const[$,Y]of x.value)D-Y>800&&T.push($);for(const $ of T)x.value.delete($)},200)}),nn(()=>{h&&clearInterval(h),g&&clearInterval(g),a&&a.disconnect()}),et(i,D=>{a&&(a.disconnect(),a=null),D&&(a=new ResizeObserver(T=>{l.value=T[0].contentRect.width}),a.observe(D),l.value=D.clientWidth)}),et(d,D=>{if(!s.value)return;const T=D.filter(Y=>Y.type==="cells:change"&&Y.ts>v&&Y.data.graph===s.value);if(T.length===0)return;v=Math.max(...T.map(Y=>Y.ts));for(const Y of T)x.value.set(Y.data.name,Y.ts);const $=r.value;for(const Y of T){const be=$.findIndex(ve=>ve.name===Y.data.name);be>=0&&($[be]={...$[be],value:Y.data.value,status:Y.data.status,updatedAt:Y.data.updatedAt})}c.value&&T.some(Y=>Y.data.name===c.value)&&A(c.value)},{deep:!0});function w(D){c.value=D.name,f.value=[],(D==null?void 0:D.historyLimit)>0&&A(D.name)}function I(){c.value=null,f.value=[]}function V(D,T){return D=String(D??""),D.length>T?D.slice(0,T-1)+"…":D}function N(D){if(D===void 0)return"—";if(D===null)return"null";if(typeof D=="string")return D.length>80?D.slice(0,80)+"…":D;if(typeof D=="number"||typeof D=="boolean")return String(D);try{const T=JSON.stringify(D);return T.length>80?T.slice(0,80)+"…":T}catch{return String(D)}}function C(D){if(!D)return"—";const T=Date.now()-D;return T<1e3?"just now":T<6e4?`${Math.floor(T/1e3)}s ago`:T<36e5?`${Math.floor(T/6e4)}m ago`:new Date(D).toLocaleTimeString()}const z=fe(()=>{const D=new Map;for(const T of r.value)D.set(T.name,T);return D}),se=fe(()=>{const D=z.value,T=new Set(D.keys()),$=new Set,Y=[];for(;T.size>0;){const be=[];for(const ve of T)D.get(ve).deps.every(nt=>!T.has(nt)||$.has(nt))&&be.push(ve);if(be.length===0)break;for(const ve of be)T.delete(ve),$.add(ve);Y.push(be)}return Y}),F={w:160,h:56},ie={y:24},j=fe(()=>{const D=new Map,T=se.value;if(T.length===0)return{positions:D,width:0,height:0};const $=T.length*F.w+(T.length-1)*Y1+as*2,Y=Math.max($,l.value||$),be=T.length>1?(Y-as*2-F.w)/(T.length-1):0;let ve=0;const Pe=Math.max(...T.map(De=>De.length*F.h+(De.length-1)*ie.y));return T.forEach((De,nt)=>{const _t=De.length*F.h+(De.length-1)*ie.y,ne=Math.max(0,(Pe-_t)/2);De.forEach((R,H)=>{const W=nt*be+as,J=ne+H*(F.h+ie.y)+as;D.set(R,{x:W,y:J}),J+F.h>ve&&(ve=J+F.h)})}),{positions:D,width:Y,height:ve+as}}),pe=fe(()=>{const D=j.value.positions,T=[];for(const $ of r.value){const Y=D.get($.name);if(Y)for(const be of $.deps){const ve=D.get(be);ve&&T.push({x1:ve.x+F.w,y1:ve.y+F.h/2,x2:Y.x,y2:Y.y+F.h/2,from:be,to:$.name})}}return T});function le(D){return x.value.has(D)}function Ee(D){switch(D){case"current":return"var(--color-green)";case"pending":return"var(--color-blue)";case"stale":return"var(--color-yellow)";case"error":return"var(--color-red)";default:return"var(--text-muted)"}}return(D,T)=>(_(),b("div",L0,[p("div",D0,[p("div",j0,[n.value.length>1?(_(),b("div",G0,[(_(!0),b(ee,null,he(n.value,$=>(_(),b("button",{key:$,class:_e({active:$===s.value}),onClick:Y=>s.value=$},E($),11,B0))),128))])):Z("",!0),p("div",F0,[p("button",{class:_e({active:o.value==="table"}),onClick:T[0]||(T[0]=$=>o.value="table")},"table",2),p("button",{class:_e({active:o.value==="graph"}),onClick:T[1]||(T[1]=$=>o.value="graph")},"graph",2)])]),p("div",U0,[p("span",null,E(r.value.length)+" cells",1),T[2]||(T[2]=p("span",{class:"dot"},null,-1)),p("span",null,E(r.value.filter($=>$.status==="current").length)+" current",1),r.value.filter($=>$.status==="pending").length?(_(),b("span",W0)):Z("",!0),r.value.filter($=>$.status==="pending").length?(_(),b("span",H0,E(r.value.filter($=>$.status==="pending").length)+" pending",1)):Z("",!0),r.value.filter($=>$.status==="error").length?(_(),b("span",V0)):Z("",!0),r.value.filter($=>$.status==="error").length?(_(),b("span",q0,E(r.value.filter($=>$.status==="error").length)+" error",1)):Z("",!0)])]),p("div",z0,[p("div",K0,[o.value==="table"?(_(),b("div",X0,[T[3]||(T[3]=Oc('<div class="cell-row header" data-v-183abe97><span class="col-name" data-v-183abe97>name</span><span class="col-value" data-v-183abe97>value</span><span class="col-deps" data-v-183abe97>deps</span><span class="col-status" data-v-183abe97>status</span><span class="col-updated" data-v-183abe97>updated</span></div>',1)),(_(!0),b(ee,null,he(r.value,$=>{var Y;return _(),b("div",{key:$.name,class:_e(["cell-row",{selected:((Y=u.value)==null?void 0:Y.name)===$.name,recent:le($.name)}]),onClick:be=>w($)},[p("span",Y0,E($.name),1),p("span",{class:"col-value",title:JSON.stringify($.value)},E(N($.value)),9,Q0),p("span",Z0,E($.deps.length?$.deps.join(", "):"—"),1),p("span",{class:"col-status",style:Yt({color:Ee($.status)})},E($.status==="current"?"":$.status),5),p("span",e1,E(C($.updatedAt)),1)],10,J0)}),128)),r.value.length?Z("",!0):(_(),b("div",t1,"no cells in graph"))])):(_(),b("div",{key:1,class:"graph-wrap",ref_key:"graphWrap",ref:i},[(_(),b("svg",{width:j.value.width,height:j.value.height},[T[4]||(T[4]=p("defs",null,[p("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto"},[p("path",{d:"M0,0 L10,5 L0,10 z",fill:"var(--text-muted)"})]),p("marker",{id:"arrow-active",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto"},[p("path",{d:"M0,0 L10,5 L0,10 z",fill:"var(--accent)"})])],-1)),p("g",null,[(_(!0),b(ee,null,he(pe.value,$=>(_(),b("path",{key:`${$.from}->${$.to}`,d:`M${$.x1},${$.y1} C${$.x1+30},${$.y1} ${$.x2-30},${$.y2} ${$.x2},${$.y2}`,fill:"none","stroke-width":"1",class:_e(["edge-line",{recent:le($.from)}]),"marker-end":le($.from)?"url(#arrow-active)":"url(#arrow)"},null,10,s1))),128))]),(_(!0),b(ee,null,he(r.value,$=>{var Y,be,ve;return _(),b("g",{key:$.name,transform:`translate(${((Y=j.value.positions.get($.name))==null?void 0:Y.x)??0}, ${((be=j.value.positions.get($.name))==null?void 0:be.y)??0})`,class:_e(["node-group",{selected:((ve=u.value)==null?void 0:ve.name)===$.name,recent:le($.name)}]),onClick:Pe=>w($)},[p("rect",{width:F.w,height:F.h,rx:"4"},null,8,o1),p("circle",{cx:10,cy:10,r:"3",fill:Ee($.status)},null,8,i1),p("clipPath",{id:`clip-${$.name}`},[p("rect",{width:F.w-8,height:F.h-4,x:"4",y:"2"},null,8,a1)],8,l1),p("g",{"clip-path":`url(#clip-${$.name})`},[p("text",{x:F.w/2,y:24,"text-anchor":"middle",class:"node-name"},E(V($.name,22)),9,u1),p("text",{x:F.w/2,y:42,"text-anchor":"middle",class:"node-value"},E(V(N($.value),22)),9,f1)],8,c1)],10,r1)}),128))],8,n1)),r.value.length?Z("",!0):(_(),b("div",d1,"no cells in graph"))],512))])]),u.value?(_(),b("div",h1,[p("div",p1,[p("span",g1,E(u.value.name),1),u.value.status!=="current"?(_(),b("span",{key:0,class:"detail-status",style:Yt({color:Ee(u.value.status)})},E(u.value.status),5)):Z("",!0),p("span",{class:"detail-close",onClick:I},"×")]),p("div",m1,[p("div",y1,[p("div",v1,[T[5]||(T[5]=p("div",{class:"detail-label"},"value",-1)),p("div",_1,[ye(gt,{data:u.value.value},null,8,["data"])])]),u.value.template?(_(),b("div",b1,[T[6]||(T[6]=p("div",{class:"detail-label"},"template",-1)),p("pre",w1,E(u.value.template),1)])):Z("",!0),p("div",C1,[p("div",k1,[T[7]||(T[7]=fn(" history ",-1)),u.value.historyLimit>0?(_(),b("span",x1,E(f.value.length)+" / "+E(u.value.historyLimit),1)):Z("",!0)]),u.value.historyLimit>0?(_(),b("div",S1,[(_(!0),b(ee,null,he(f.value.slice().reverse(),$=>(_(),b("div",{key:$.timestamp,class:"history-entry"},[p("span",E1,E(C($.timestamp)),1),p("span",{class:"history-value",title:JSON.stringify($.value)},E(N($.value)),9,A1)]))),128)),f.value.length?Z("",!0):(_(),b("div",R1,"no entries yet"))])):(_(),b("div",$1,[...T[8]||(T[8]=[fn(" History is not enabled for this cell. To capture recent values, define it with ",-1),p("code",null,"{ history: true }",-1),fn(" or ",-1),p("code",null,"{ history: N }",-1),fn(". ",-1)])]))]),u.value.error?(_(),b("div",I1,[T[9]||(T[9]=p("div",{class:"detail-label"},"error",-1)),p("div",N1,E(u.value.error),1)])):Z("",!0),u.value.source?(_(),b("div",P1,[T[10]||(T[10]=p("div",{class:"detail-label"},"source",-1)),p("div",T1,[(_(!0),b(ee,null,he(u.value.source,($,Y)=>(_(),b("div",{key:Y,class:"kv-list-row"},[p("span",O1,E(Y),1),p("span",M1,E(typeof $=="object"?JSON.stringify($):String($)),1)]))),128))])])):Z("",!0),u.value.metadata?(_(),b("div",L1,[T[11]||(T[11]=p("div",{class:"detail-label"},"metadata",-1)),p("div",D1,[(_(!0),b(ee,null,he(u.value.metadata,($,Y)=>(_(),b("div",{key:Y,class:"kv-list-row"},[p("span",j1,E(Y),1),p("span",G1,E(typeof $=="object"?JSON.stringify($):String($)),1)]))),128))])])):Z("",!0)]),p("div",B1,[p("div",F1,[T[16]||(T[16]=p("div",{class:"detail-label"},"graph",-1)),p("div",U1,[p("div",W1,[T[12]||(T[12]=p("span",{class:"kv-list-key"},"deps",-1)),p("span",H1,E(u.value.deps.length?u.value.deps.join(", "):"—"),1)]),p("div",V1,[T[13]||(T[13]=p("span",{class:"kv-list-key"},"dependents",-1)),p("span",q1,E(u.value.dependents.length?u.value.dependents.join(", "):"—"),1)]),u.value.computeTime!==null&&u.value.computeTime!==void 0?(_(),b("div",z1,[T[14]||(T[14]=p("span",{class:"kv-list-key"},"last compute",-1)),p("span",K1,E(u.value.computeTime)+"ms",1)])):Z("",!0),p("div",X1,[T[15]||(T[15]=p("span",{class:"kv-list-key"},"updated",-1)),p("span",J1,E(C(u.value.updatedAt)),1)])])])])])])):Z("",!0)]))}},Z1=Gt(Q1,[["__scopeId","data-v-183abe97"]]),eC={key:0,class:"empty"},tC={class:"card-header"},nC={class:"name"},sC={class:"badge accent"},rC=["title","onClick"],oC={key:0,class:"member-presence"},iC={key:1,class:"no-presence"},lC={__name:"RoomsView",props:{rooms:{type:Array,default:()=>[]}},emits:["navigate"],setup(e){function t(n){if(typeof n=="string")return n;if(typeof n=="object"&&n!==null){const s=Object.keys(n);return s.length<=3?s.map(r=>`${r}: ${JSON.stringify(n[r])}`).join(", "):`{${s.length} fields}`}return String(n)}return(n,s)=>e.rooms.length?(_(),b(ee,{key:1},[s[0]||(s[0]=p("div",{class:"view-hint"},"active rooms, their members, and each member's presence state",-1)),(_(!0),b(ee,null,he(e.rooms,r=>(_(),b("div",{key:r.name,class:"card"},[p("div",tC,[p("span",nC,E(r.name),1),p("span",sC,E(r.members.length)+" "+E(r.members.length===1?"member":"members"),1)]),(_(!0),b(ee,null,he(r.members,o=>(_(),b("div",{key:o,class:"member-row"},[p("span",{class:"member-id conn-link",title:o,onClick:i=>n.$emit("navigate",o)},E(o.slice(0,8)),9,rC),r.presence[o]?(_(),b("span",oC,E(t(r.presence[o])),1)):(_(),b("span",iC,"no presence"))]))),128))]))),128))],64)):(_(),b("div",eC,"no rooms"))}},aC={key:0,class:"empty"},cC={class:"card-header"},uC={class:"name"},fC={class:"badge accent"},dC=["title","onClick"],hC={__name:"ChannelsView",props:{channels:{type:Object,default:()=>({})}},emits:["navigate"],setup(e){const t=e,n=fe(()=>Object.entries(t.channels));return(s,r)=>n.value.length?(_(),b(ee,{key:1},[r[0]||(r[0]=p("div",{class:"view-hint"},"channels with active subscribers on this server instance",-1)),(_(!0),b(ee,null,he(n.value,([o,i])=>(_(),b("div",{key:o,class:"card"},[p("div",cC,[p("span",uC,E(o),1),p("span",fC,E(i.length)+" "+E(i.length===1?"subscriber":"subscribers"),1)]),(_(!0),b(ee,null,he(i,l=>(_(),b("div",{key:l,class:"member-row"},[p("span",{class:"member-id conn-link",title:l,onClick:a=>s.$emit("navigate",l)},E(l.slice(0,8)),9,dC)]))),128))]))),128))],64)):(_(),b("div",aC,"no channel subscriptions"))}},pC={key:0,class:"empty"},gC={class:"card-header"},mC={class:"name"},yC={class:"badge accent"},vC={class:"card-body",style:{"border-top":"1px solid var(--border-subtle)"}},_C={class:"kv-row"},bC=["title","onClick"],wC={class:"kv-value"},CC=["onClick"],kC={key:0,class:"card-body",style:{"border-top":"1px solid var(--border-subtle)","padding-left":"24px"}},xC={class:"section-title"},SC={style:{"font-size":"10px",color:"var(--text-muted)","margin-bottom":"2px"}},EC={key:0,class:"empty",style:{padding:"8px"}},AC={__name:"CollectionsView",props:{collections:{type:Object,default:()=>({})},fetchRecords:{type:Function,required:!0}},emits:["navigate"],setup(e){const t=e,n=fe(()=>Object.entries(t.collections)),s=Qn({});function r(i,l){return`${i}::${l}`}async function o(i,l){const a=r(i,l);if(s[a]){delete s[a];return}s[a]=await t.fetchRecords(i,l)}return(i,l)=>n.value.length?(_(),b(ee,{key:1},[l[0]||(l[0]=p("div",{class:"view-hint"},'collections with active subscribers - click "records" to see what the resolver returns for that connection',-1)),(_(!0),b(ee,null,he(n.value,([a,c])=>(_(),b("div",{key:a,class:"card"},[p("div",gC,[p("span",mC,E(a),1),p("span",yC,E(Object.keys(c.subscribers).length)+" "+E(Object.keys(c.subscribers).length===1?"subscriber":"subscribers"),1)]),(_(!0),b(ee,null,he(c.subscribers,(u,f)=>(_(),b("div",{key:f},[p("div",vC,[p("div",_C,[p("span",{class:"kv-key conn-link",title:f,onClick:d=>i.$emit("navigate",f)},E(f.slice(0,8)),9,bC),p("span",wC,"v"+E(u.version),1),p("span",{class:"tag accent",style:{"margin-left":"8px",cursor:"pointer"},onClick:d=>o(a,f)},E(s[r(a,f)]?"hide":"records"),9,CC)])]),s[r(a,f)]?(_(),b("div",kC,[p("div",xC,"resolved records ("+E(s[r(a,f)].recordIds.length)+")",1),(_(!0),b(ee,null,he(s[r(a,f)].records,d=>(_(),b("div",{key:d.id,style:{"margin-bottom":"8px"}},[p("div",SC,E(d.id),1),ye(gt,{data:d.data},null,8,["data"])]))),128)),s[r(a,f)].records.length?Z("",!0):(_(),b("div",EC,"no records"))])):Z("",!0)]))),128))]))),128))],64)):(_(),b("div",pC,"no collection subscriptions"))}},RC={key:0,class:"empty"},$C={class:"card-header"},IC={class:"name"},NC=["onClick"],PC={class:"badge accent"},TC={key:0,class:"card-body",style:{"border-bottom":"1px solid var(--border-subtle)"}},OC={class:"card-body"},MC=["title","onClick"],LC={__name:"RecordsView",props:{records:{type:Object,default:()=>({})},watchedRecords:{type:Object,required:!0},watchRecord:{type:Function,required:!0},unwatchRecord:{type:Function,required:!0}},emits:["navigate"],setup(e){const t=e,n=fe(()=>Object.entries(t.records));function s(r){r in t.watchedRecords?t.unwatchRecord(r):t.watchRecord(r)}return(r,o)=>n.value.length?(_(),b(ee,{key:1},[o[0]||(o[0]=p("div",{class:"view-hint"},"records being watched by at least one connection, and their subscription mode",-1)),(_(!0),b(ee,null,he(n.value,([i,l])=>(_(),b("div",{key:i,class:"card"},[p("div",$C,[p("span",IC,E(i),1),p("div",null,[p("span",{class:"tag accent",style:{cursor:"pointer","margin-right":"4px"},onClick:a=>s(i)},E(i in e.watchedRecords?"hide":"view"),9,NC),p("span",PC,E(Object.keys(l.subscribers).length)+" "+E(Object.keys(l.subscribers).length===1?"subscriber":"subscribers"),1)])]),i in e.watchedRecords?(_(),b("div",TC,[ye(gt,{data:e.watchedRecords[i]},null,8,["data"])])):Z("",!0),p("div",OC,[(_(!0),b(ee,null,he(l.subscribers,(a,c)=>(_(),b("div",{key:c,class:"kv-row"},[p("span",{class:"kv-key conn-link",title:c,onClick:u=>r.$emit("navigate",c)},E(c.slice(0,8)),9,MC),p("span",{class:_e(["tag",a==="full"?"accent":""])},E(a),3)]))),128))])]))),128))],64)):(_(),b("div",RC,"no record subscriptions"))}},DC={key:0},jC={class:"section"},GC={class:"card"},BC={class:"card-body"},FC={class:"kv-row"},UC={class:"kv-value"},WC={class:"kv-row"},HC={class:"kv-row"},VC={class:"kv-value"},qC={class:"kv-row"},zC={key:0,class:"kv-row"},KC={class:"kv-value"},XC={class:"section"},JC={class:"card"},YC={class:"card-body"},QC={key:0,class:"section"},ZC={class:"section-title"},ek={class:"pattern-list"},tk={key:1,class:"section"},nk={class:"section-title"},sk={class:"pattern-list"},rk={key:2,class:"section"},ok={class:"section-title"},ik={class:"pattern-list"},lk={key:3,class:"section"},ak={class:"section-title"},ck={class:"kv-key"},uk={class:"kv-value"},fk={key:4,class:"section"},dk={class:"card-header"},hk={class:"name"},pk={class:"card-body"},gk={key:1},mk={class:"card-header"},yk={class:"name"},vk={class:"meta",style:{"font-size":"10px"}},_k={key:0,style:{"margin-right":"8px"}},bk={key:0,class:"card-body"},wk={key:2,class:"empty"},Ck={__name:"MetadataView",props:{detail:{type:Object,default:null},connections:{type:Array,default:()=>[]}},setup(e){return(t,n)=>{var s,r,o,i;return e.detail?(_(),b("div",DC,[p("div",jC,[n[5]||(n[5]=p("div",{class:"section-title"},"connection",-1)),p("div",GC,[p("div",BC,[p("div",FC,[n[0]||(n[0]=p("span",{class:"kv-key"},"id",-1)),p("span",UC,E(e.detail.id),1)]),p("div",WC,[n[1]||(n[1]=p("span",{class:"kv-key"},"local",-1)),p("span",{class:"kv-value",style:Yt({color:e.detail.local?"var(--accent)":"var(--text-muted)"})},E(e.detail.local),5)]),p("div",HC,[n[2]||(n[2]=p("span",{class:"kv-key"},"latency",-1)),p("span",VC,E(e.detail.latency!==null?e.detail.latency+"ms":"-"),1)]),p("div",qC,[n[3]||(n[3]=p("span",{class:"kv-key"},"alive",-1)),p("span",{class:"kv-value",style:Yt({color:e.detail.alive?"var(--accent)":"var(--syn-boolean)"})},E(e.detail.alive),5)]),e.detail.remoteAddress?(_(),b("div",zC,[n[4]||(n[4]=p("span",{class:"kv-key"},"address",-1)),p("span",KC,E(e.detail.remoteAddress),1)])):Z("",!0)])])]),p("div",XC,[n[6]||(n[6]=p("div",{class:"section-title"},"metadata",-1)),p("div",JC,[p("div",YC,[ye(gt,{data:e.detail.metadata},null,8,["data"])])])]),(s=e.detail.rooms)!=null&&s.length?(_(),b("div",QC,[p("div",ZC,"rooms ("+E(e.detail.rooms.length)+")",1),p("div",ek,[(_(!0),b(ee,null,he(e.detail.rooms,l=>(_(),b("span",{class:"tag accent",key:l},E(l),1))),128))])])):Z("",!0),(r=e.detail.channels)!=null&&r.length?(_(),b("div",tk,[p("div",nk,"channels ("+E(e.detail.channels.length)+")",1),p("div",sk,[(_(!0),b(ee,null,he(e.detail.channels,l=>(_(),b("span",{class:"tag accent",key:l},E(l),1))),128))])])):Z("",!0),(o=e.detail.collections)!=null&&o.length?(_(),b("div",rk,[p("div",ok,"collections ("+E(e.detail.collections.length)+")",1),p("div",ik,[(_(!0),b(ee,null,he(e.detail.collections,l=>(_(),b("span",{class:"tag accent",key:l.id},E(l.id)+" v"+E(l.version),1))),128))])])):Z("",!0),(i=e.detail.records)!=null&&i.length?(_(),b("div",lk,[p("div",ak,"record subscriptions ("+E(e.detail.records.length)+")",1),(_(!0),b(ee,null,he(e.detail.records,l=>(_(),b("div",{key:l.id,class:"kv-row"},[p("span",ck,E(l.id),1),p("span",uk,E(l.mode),1)]))),128))])):Z("",!0),e.detail.presence&&Object.keys(e.detail.presence).length?(_(),b("div",fk,[n[7]||(n[7]=p("div",{class:"section-title"},"presence state",-1)),(_(!0),b(ee,null,he(e.detail.presence,(l,a)=>(_(),b("div",{key:a,class:"card"},[p("div",dk,[p("span",hk,E(a),1)]),p("div",pk,[ye(gt,{data:l},null,8,["data"])])]))),128))])):Z("",!0)])):e.connections.length?(_(),b("div",gk,[n[8]||(n[8]=p("div",{class:"section-title",style:{"margin-bottom":"12px"}},"all connections",-1)),(_(!0),b(ee,null,he(e.connections,l=>{var a,c;return _(),b("div",{key:l.id,class:"card"},[p("div",mk,[p("span",yk,E(((a=l.metadata)==null?void 0:a.name)||((c=l.metadata)==null?void 0:c.username)||l.id.slice(0,8)),1),p("span",vk,[l.latency!==null?(_(),b("span",_k,E(l.latency)+"ms",1)):Z("",!0),p("span",{style:Yt({color:l.alive?"var(--accent)":"var(--syn-boolean)"})},E(l.alive?"alive":"dead"),5)])]),l.metadata?(_(),b("div",bk,[ye(gt,{data:l.metadata},null,8,["data"])])):Z("",!0)])}),128))])):(_(),b("div",wk,"no connections"))}}},kk=Fp({history:_p(Yc),routes:[{path:"/",component:ag},{path:"/realtime",component:M0,redirect:"/realtime/rooms",children:[{path:"rooms",component:lC},{path:"channels",component:hC},{path:"collections",component:AC},{path:"records",component:LC},{path:"metadata",component:Ck}]},{path:"/cells",component:Z1},{path:"/queue",component:wg},{path:"/cron",component:Ng},{path:"/limits",component:Eb},{path:"/workflows",component:pw},{path:"/executions",component:g0}]});Th(Xp).use(kk).mount("#app");