@prsm/realtime 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +9 -0
  2. package/package.json +2 -7
  3. package/src/adapters/postgres.js +3 -3
  4. package/src/client/client.js +10 -10
  5. package/src/client/connection.js +1 -1
  6. package/src/client/subscriptions/channels.js +3 -3
  7. package/src/client/subscriptions/collections.js +2 -2
  8. package/src/client/subscriptions/presence.js +5 -5
  9. package/src/client/subscriptions/records.js +3 -3
  10. package/src/client/subscriptions/rooms.js +3 -3
  11. package/src/server/managers/channels.js +4 -4
  12. package/src/server/managers/collections.js +5 -5
  13. package/src/server/managers/connections.js +3 -3
  14. package/src/server/managers/instance.js +20 -20
  15. package/src/server/managers/presence.js +7 -7
  16. package/src/server/managers/pubsub.js +14 -14
  17. package/src/server/managers/rooms.js +7 -7
  18. package/src/server/server.js +26 -26
  19. package/src/server/utils/constants.js +4 -4
  20. package/src/shared/logger.js +1 -1
  21. package/src/devtools/client/dist/assets/index-CGm1NqOQ.css +0 -1
  22. package/src/devtools/client/dist/assets/index-w2FI7RvC.js +0 -168
  23. package/src/devtools/client/dist/index.html +0 -16
  24. package/src/devtools/client/index.html +0 -15
  25. package/src/devtools/client/package.json +0 -17
  26. package/src/devtools/client/src/App.vue +0 -173
  27. package/src/devtools/client/src/components/ConnectionPicker.vue +0 -38
  28. package/src/devtools/client/src/components/JsonView.vue +0 -18
  29. package/src/devtools/client/src/composables/useApi.js +0 -71
  30. package/src/devtools/client/src/composables/useHighlight.js +0 -57
  31. package/src/devtools/client/src/main.js +0 -5
  32. package/src/devtools/client/src/style.css +0 -440
  33. package/src/devtools/client/src/views/ChannelsView.vue +0 -27
  34. package/src/devtools/client/src/views/CollectionsView.vue +0 -61
  35. package/src/devtools/client/src/views/MetadataView.vue +0 -108
  36. package/src/devtools/client/src/views/RecordsView.vue +0 -30
  37. package/src/devtools/client/src/views/RoomsView.vue +0 -39
  38. package/src/devtools/client/vite.config.js +0 -17
  39. package/src/devtools/demo/server.js +0 -144
  40. package/src/devtools/index.js +0 -186
@@ -1,168 +0,0 @@
1
- var Ec=Object.defineProperty;var Ac=Object.getPrototypeOf;var Rc=Reflect.get;var qo=e=>{throw TypeError(e)};var Ic=(e,t,n)=>t in e?Ec(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var w=(e,t,n)=>Ic(e,typeof t!="symbol"?t+"":t,n),ns=(e,t,n)=>t.has(e)||qo("Cannot "+n);var ke=(e,t,n)=>(ns(e,t,"read from private field"),n?n.call(e):t.get(e)),Bt=(e,t,n)=>t.has(e)?qo("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ze=(e,t,n,r)=>(ns(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),rs=(e,t,n)=>(ns(e,t,"access private method"),n);var Ko=(e,t,n)=>Rc(Ac(e),n,t);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/**
2
- * @vue/shared v3.5.30
3
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
- * @license MIT
5
- **/function io(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const oe={},fn=[],ct=()=>{},dl=()=>!1,Br=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),lo=e=>e.startsWith("onUpdate:"),xe=Object.assign,ao=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},$c=Object.prototype.hasOwnProperty,Z=(e,t)=>$c.call(e,t),H=Array.isArray,hn=e=>Qn(e)==="[object Map]",pl=e=>Qn(e)==="[object Set]",Xo=e=>Qn(e)==="[object Date]",V=e=>typeof e=="function",he=e=>typeof e=="string",ut=e=>typeof e=="symbol",ee=e=>e!==null&&typeof e=="object",gl=e=>(ee(e)||V(e))&&V(e.then)&&V(e.catch),ml=Object.prototype.toString,Qn=e=>ml.call(e),Nc=e=>Qn(e).slice(8,-1),yl=e=>Qn(e)==="[object Object]",co=e=>he(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Tn=io(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ur=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Pc=/-\w/g,Xe=Ur(e=>e.replace(Pc,t=>t.slice(1).toUpperCase())),Tc=/\B([A-Z])/g,en=Ur(e=>e.replace(Tc,"-$1").toLowerCase()),bl=Ur(e=>e.charAt(0).toUpperCase()+e.slice(1)),ss=Ur(e=>e?`on${bl(e)}`:""),lt=(e,t)=>!Object.is(e,t),os=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},_l=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Oc=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Jo;const Hr=()=>Jo||(Jo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function dn(e){if(H(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=he(r)?Fc(r):dn(r);if(s)for(const o in s)t[o]=s[o]}return t}else if(he(e)||ee(e))return e}const Mc=/;(?![^(]*\))/g,Lc=/:([^]+)/,Dc=/\/\*[^]*?\*\//g;function Fc(e){const t={};return e.replace(Dc,"").split(Mc).forEach(n=>{if(n){const r=n.split(Lc);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Lt(e){let t="";if(he(e))t=e;else if(H(e))for(let n=0;n<e.length;n++){const r=Lt(e[n]);r&&(t+=r+" ")}else if(ee(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const jc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Gc=io(jc);function wl(e){return!!e||e===""}function Bc(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=uo(e[r],t[r]);return n}function uo(e,t){if(e===t)return!0;let n=Xo(e),r=Xo(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=ut(e),r=ut(t),n||r)return e===t;if(n=H(e),r=H(t),n||r)return n&&r?Bc(e,t):!1;if(n=ee(e),r=ee(t),n||r){if(!n||!r)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const i in e){const l=e.hasOwnProperty(i),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!uo(e[i],t[i]))return!1}}return String(e)===String(t)}const Cl=e=>!!(e&&e.__v_isRef===!0),G=e=>he(e)?e:e==null?"":H(e)||ee(e)&&(e.toString===ml||!V(e.toString))?Cl(e)?G(e.value):JSON.stringify(e,vl,2):String(e),vl=(e,t)=>Cl(t)?vl(e,t.value):hn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[is(r,o)+" =>"]=s,n),{})}:pl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>is(n))}:ut(t)?is(t):ee(t)&&!H(t)&&!yl(t)?String(t):t,is=(e,t="")=>{var n;return ut(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 Te;class Uc{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=Te,!t&&Te&&(this.index=(Te.scopes||(Te.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=Te;try{return Te=this,t()}finally{Te=n}}}on(){++this._on===1&&(this.prevScope=Te,Te=this)}off(){this._on>0&&--this._on===0&&(Te=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Hc(){return Te}let se;const ls=new WeakSet;class Sl{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,Te&&Te.active&&Te.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ls.has(this)&&(ls.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||kl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Yo(this),El(this);const t=se,n=Je;se=this,Je=!0;try{return this.fn()}finally{Al(this),se=t,Je=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)po(t);this.deps=this.depsTail=void 0,Yo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ls.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){$s(this)&&this.run()}get dirty(){return $s(this)}}let xl=0,On,Mn;function kl(e,t=!1){if(e.flags|=8,t){e.next=Mn,Mn=e;return}e.next=On,On=e}function fo(){xl++}function ho(){if(--xl>0)return;if(Mn){let t=Mn;for(Mn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;On;){let t=On;for(On=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function El(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Al(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),po(r),Wc(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function $s(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Rl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Rl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Un)||(e.globalVersion=Un,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!$s(e))))return;e.flags|=2;const t=e.dep,n=se,r=Je;se=e,Je=!0;try{El(e);const s=e.fn(e._value);(t.version===0||lt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{se=n,Je=r,Al(e),e.flags&=-3}}function po(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)po(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Wc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Je=!0;const Il=[];function St(){Il.push(Je),Je=!1}function xt(){const e=Il.pop();Je=e===void 0?!0:e}function Yo(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=se;se=void 0;try{t()}finally{se=n}}}let Un=0;class zc{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 go{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(!se||!Je||se===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==se)n=this.activeLink=new zc(se,this),se.deps?(n.prevDep=se.depsTail,se.depsTail.nextDep=n,se.depsTail=n):se.deps=se.depsTail=n,$l(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=se.depsTail,n.nextDep=void 0,se.depsTail.nextDep=n,se.depsTail=n,se.deps===n&&(se.deps=r)}return n}trigger(t){this.version++,Un++,this.notify(t)}notify(t){fo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ho()}}}function $l(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)$l(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ns=new WeakMap,Yt=Symbol(""),Ps=Symbol(""),Hn=Symbol("");function Ce(e,t,n){if(Je&&se){let r=Ns.get(e);r||Ns.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new go),s.map=r,s.key=n),s.track()}}function _t(e,t,n,r,s,o){const i=Ns.get(e);if(!i){Un++;return}const l=a=>{a&&a.trigger()};if(fo(),t==="clear")i.forEach(l);else{const a=H(e),c=a&&co(n);if(a&&n==="length"){const u=Number(r);i.forEach((f,h)=>{(h==="length"||h===Hn||!ut(h)&&h>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),c&&l(i.get(Hn)),t){case"add":a?c&&l(i.get("length")):(l(i.get(Yt)),hn(e)&&l(i.get(Ps)));break;case"delete":a||(l(i.get(Yt)),hn(e)&&l(i.get(Ps)));break;case"set":hn(e)&&l(i.get(Yt));break}}ho()}function nn(e){const t=Y(e);return t===e?t:(Ce(t,"iterate",Hn),We(e)?t:t.map(Ye))}function Wr(e){return Ce(e=Y(e),"iterate",Hn),e}function ot(e,t){return kt(e)?bn(Zt(e)?Ye(t):t):Ye(t)}const Vc={__proto__:null,[Symbol.iterator](){return as(this,Symbol.iterator,e=>ot(this,e))},concat(...e){return nn(this).concat(...e.map(t=>H(t)?nn(t):t))},entries(){return as(this,"entries",e=>(e[1]=ot(this,e[1]),e))},every(e,t){return dt(this,"every",e,t,void 0,arguments)},filter(e,t){return dt(this,"filter",e,t,n=>n.map(r=>ot(this,r)),arguments)},find(e,t){return dt(this,"find",e,t,n=>ot(this,n),arguments)},findIndex(e,t){return dt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return dt(this,"findLast",e,t,n=>ot(this,n),arguments)},findLastIndex(e,t){return dt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return dt(this,"forEach",e,t,void 0,arguments)},includes(...e){return cs(this,"includes",e)},indexOf(...e){return cs(this,"indexOf",e)},join(e){return nn(this).join(e)},lastIndexOf(...e){return cs(this,"lastIndexOf",e)},map(e,t){return dt(this,"map",e,t,void 0,arguments)},pop(){return Rn(this,"pop")},push(...e){return Rn(this,"push",e)},reduce(e,...t){return Zo(this,"reduce",e,t)},reduceRight(e,...t){return Zo(this,"reduceRight",e,t)},shift(){return Rn(this,"shift")},some(e,t){return dt(this,"some",e,t,void 0,arguments)},splice(...e){return Rn(this,"splice",e)},toReversed(){return nn(this).toReversed()},toSorted(e){return nn(this).toSorted(e)},toSpliced(...e){return nn(this).toSpliced(...e)},unshift(...e){return Rn(this,"unshift",e)},values(){return as(this,"values",e=>ot(this,e))}};function as(e,t,n){const r=Wr(e),s=r[t]();return r!==e&&!We(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const qc=Array.prototype;function dt(e,t,n,r,s,o){const i=Wr(e),l=i!==e&&!We(e),a=i[t];if(a!==qc[t]){const f=a.apply(e,o);return l?Ye(f):f}let c=n;i!==e&&(l?c=function(f,h){return n.call(this,ot(e,f),h,e)}:n.length>2&&(c=function(f,h){return n.call(this,f,h,e)}));const u=a.call(i,c,r);return l&&s?s(u):u}function Zo(e,t,n,r){const s=Wr(e),o=s!==e&&!We(e);let i=n,l=!1;s!==e&&(o?(l=r.length===0,i=function(c,u,f){return l&&(l=!1,c=ot(e,c)),n.call(this,c,ot(e,u),f,e)}):n.length>3&&(i=function(c,u,f){return n.call(this,c,u,f,e)}));const a=s[t](i,...r);return l?ot(e,a):a}function cs(e,t,n){const r=Y(e);Ce(r,"iterate",Hn);const s=r[t](...n);return(s===-1||s===!1)&&bo(n[0])?(n[0]=Y(n[0]),r[t](...n)):s}function Rn(e,t,n=[]){St(),fo();const r=Y(e)[t].apply(e,n);return ho(),xt(),r}const Kc=io("__proto__,__v_isRef,__isVue"),Nl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ut));function Xc(e){ut(e)||(e=String(e));const t=Y(this);return Ce(t,"has",e),t.hasOwnProperty(e)}class Pl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?ou:Ll:o?Ml:Ol).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=H(t);if(!s){let a;if(i&&(a=Vc[n]))return a;if(n==="hasOwnProperty")return Xc}const l=Reflect.get(t,n,Se(t)?t:r);if((ut(n)?Nl.has(n):Kc(n))||(s||Ce(t,"get",n),o))return l;if(Se(l)){const a=i&&co(n)?l:l.value;return s&&ee(a)?Os(a):a}return ee(l)?s?Os(l):zr(l):l}}class Tl extends Pl{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];const i=H(t)&&co(n);if(!this._isShallow){const c=kt(o);if(!We(r)&&!kt(r)&&(o=Y(o),r=Y(r)),!i&&Se(o)&&!Se(r))return c||(o.value=r),!0}const l=i?Number(n)<t.length:Z(t,n),a=Reflect.set(t,n,r,Se(t)?t:s);return t===Y(s)&&(l?lt(r,o)&&_t(t,"set",n,r):_t(t,"add",n,r)),a}deleteProperty(t,n){const r=Z(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&_t(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!ut(n)||!Nl.has(n))&&Ce(t,"has",n),r}ownKeys(t){return Ce(t,"iterate",H(t)?"length":Yt),Reflect.ownKeys(t)}}class Jc extends Pl{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Yc=new Tl,Zc=new Jc,Qc=new Tl(!0);const Ts=e=>e,lr=e=>Reflect.getPrototypeOf(e);function eu(e,t,n){return function(...r){const s=this.__v_raw,o=Y(s),i=hn(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=s[e](...r),u=n?Ts:t?bn:Ye;return!t&&Ce(o,"iterate",a?Ps:Yt),xe(Object.create(c),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:l?[u(f[0]),u(f[1])]:u(f),done:h}}})}}function ar(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function tu(e,t){const n={get(s){const o=this.__v_raw,i=Y(o),l=Y(s);e||(lt(s,l)&&Ce(i,"get",s),Ce(i,"get",l));const{has:a}=lr(i),c=t?Ts:e?bn:Ye;if(a.call(i,s))return c(o.get(s));if(a.call(i,l))return c(o.get(l));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&Ce(Y(s),"iterate",Yt),s.size},has(s){const o=this.__v_raw,i=Y(o),l=Y(s);return e||(lt(s,l)&&Ce(i,"has",s),Ce(i,"has",l)),s===l?o.has(s):o.has(s)||o.has(l)},forEach(s,o){const i=this,l=i.__v_raw,a=Y(l),c=t?Ts:e?bn:Ye;return!e&&Ce(a,"iterate",Yt),l.forEach((u,f)=>s.call(o,c(u),c(f),i))}};return xe(n,e?{add:ar("add"),set:ar("set"),delete:ar("delete"),clear:ar("clear")}:{add(s){const o=Y(this),i=lr(o),l=Y(s),a=!t&&!We(s)&&!kt(s)?l:s;return i.has.call(o,a)||lt(s,a)&&i.has.call(o,s)||lt(l,a)&&i.has.call(o,l)||(o.add(a),_t(o,"add",a,a)),this},set(s,o){!t&&!We(o)&&!kt(o)&&(o=Y(o));const i=Y(this),{has:l,get:a}=lr(i);let c=l.call(i,s);c||(s=Y(s),c=l.call(i,s));const u=a.call(i,s);return i.set(s,o),c?lt(o,u)&&_t(i,"set",s,o):_t(i,"add",s,o),this},delete(s){const o=Y(this),{has:i,get:l}=lr(o);let a=i.call(o,s);a||(s=Y(s),a=i.call(o,s)),l&&l.call(o,s);const c=o.delete(s);return a&&_t(o,"delete",s,void 0),c},clear(){const s=Y(this),o=s.size!==0,i=s.clear();return o&&_t(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=eu(s,e,t)}),n}function mo(e,t){const n=tu(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Z(n,s)&&s in r?n:r,s,o)}const nu={get:mo(!1,!1)},ru={get:mo(!1,!0)},su={get:mo(!0,!1)};const Ol=new WeakMap,Ml=new WeakMap,Ll=new WeakMap,ou=new WeakMap;function iu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lu(e){return e.__v_skip||!Object.isExtensible(e)?0:iu(Nc(e))}function zr(e){return kt(e)?e:yo(e,!1,Yc,nu,Ol)}function au(e){return yo(e,!1,Qc,ru,Ml)}function Os(e){return yo(e,!0,Zc,su,Ll)}function yo(e,t,n,r,s){if(!ee(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=lu(e);if(o===0)return e;const i=s.get(e);if(i)return i;const l=new Proxy(e,o===2?r:n);return s.set(e,l),l}function Zt(e){return kt(e)?Zt(e.__v_raw):!!(e&&e.__v_isReactive)}function kt(e){return!!(e&&e.__v_isReadonly)}function We(e){return!!(e&&e.__v_isShallow)}function bo(e){return e?!!e.__v_raw:!1}function Y(e){const t=e&&e.__v_raw;return t?Y(t):e}function cu(e){return!Z(e,"__v_skip")&&Object.isExtensible(e)&&_l(e,"__v_skip",!0),e}const Ye=e=>ee(e)?zr(e):e,bn=e=>ee(e)?Os(e):e;function Se(e){return e?e.__v_isRef===!0:!1}function Tt(e){return uu(e,!1)}function uu(e,t){return Se(e)?e:new fu(e,t)}class fu{constructor(t,n){this.dep=new go,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Y(t),this._value=n?t:Ye(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||We(t)||kt(t);t=r?t:Y(t),lt(t,n)&&(this._rawValue=t,this._value=r?t:Ye(t),this.dep.trigger())}}function Ve(e){return Se(e)?e.value:e}const hu={get:(e,t,n)=>t==="__v_raw"?e:Ve(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Se(s)&&!Se(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Dl(e){return Zt(e)?e:new Proxy(e,hu)}class du{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new go(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Un-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&se!==this)return kl(this,!0),!0}get value(){const t=this.dep.track();return Rl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function pu(e,t,n=!1){let r,s;return V(e)?r=e:(r=e.get,s=e.set),new du(r,s,n)}const cr={},xr=new WeakMap;let zt;function gu(e,t=!1,n=zt){if(n){let r=xr.get(n);r||xr.set(n,r=[]),r.push(e)}}function mu(e,t,n=oe){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:l,call:a}=n,c=v=>s?v:We(v)||s===!1||s===0?$t(v,1):$t(v);let u,f,h,d,g=!1,b=!1;if(Se(e)?(f=()=>e.value,g=We(e)):Zt(e)?(f=()=>c(e),g=!0):H(e)?(b=!0,g=e.some(v=>Zt(v)||We(v)),f=()=>e.map(v=>{if(Se(v))return v.value;if(Zt(v))return c(v);if(V(v))return a?a(v,2):v()})):V(e)?t?f=a?()=>a(e,2):e:f=()=>{if(h){St();try{h()}finally{xt()}}const v=zt;zt=u;try{return a?a(e,3,[d]):e(d)}finally{zt=v}}:f=ct,t&&s){const v=f,T=s===!0?1/0:s;f=()=>$t(v(),T)}const R=Hc(),S=()=>{u.stop(),R&&R.active&&ao(R.effects,u)};if(o&&t){const v=t;t=(...T)=>{v(...T),S()}}let C=b?new Array(e.length).fill(cr):cr;const y=v=>{if(!(!(u.flags&1)||!u.dirty&&!v))if(t){const T=u.run();if(s||g||(b?T.some((q,j)=>lt(q,C[j])):lt(T,C))){h&&h();const q=zt;zt=u;try{const j=[T,C===cr?void 0:b&&C[0]===cr?[]:C,d];C=T,a?a(t,3,j):t(...j)}finally{zt=q}}}else u.run()};return l&&l(y),u=new Sl(f),u.scheduler=i?()=>i(y,!1):y,d=v=>gu(v,!1,u),h=u.onStop=()=>{const v=xr.get(u);if(v){if(a)a(v,4);else for(const T of v)T();xr.delete(u)}},t?r?y(!0):C=u.run():i?i(y.bind(null,!0),!0):u.run(),S.pause=u.pause.bind(u),S.resume=u.resume.bind(u),S.stop=S,S}function $t(e,t=1/0,n){if(t<=0||!ee(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Se(e))$t(e.value,t,n);else if(H(e))for(let r=0;r<e.length;r++)$t(e[r],t,n);else if(pl(e)||hn(e))e.forEach(r=>{$t(r,t,n)});else if(yl(e)){for(const r in e)$t(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&$t(e[r],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 er(e,t,n,r){try{return r?e(...r):e()}catch(s){Vr(s,t,n)}}function ft(e,t,n,r){if(V(e)){const s=er(e,t,n,r);return s&&gl(s)&&s.catch(o=>{Vr(o,t,n)}),s}if(H(e)){const s=[];for(let o=0;o<e.length;o++)s.push(ft(e[o],t,n,r));return s}}function Vr(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||oe;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){St(),er(o,null,10,[e,a,c]),xt();return}}yu(e,n,s,r,i)}function yu(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const Ae=[];let st=-1;const pn=[];let It=null,on=0;const Fl=Promise.resolve();let kr=null;function bu(e){const t=kr||Fl;return e?t.then(this?e.bind(this):e):t}function _u(e){let t=st+1,n=Ae.length;for(;t<n;){const r=t+n>>>1,s=Ae[r],o=Wn(s);o<e||o===e&&s.flags&2?t=r+1:n=r}return t}function _o(e){if(!(e.flags&1)){const t=Wn(e),n=Ae[Ae.length-1];!n||!(e.flags&2)&&t>=Wn(n)?Ae.push(e):Ae.splice(_u(t),0,e),e.flags|=1,jl()}}function jl(){kr||(kr=Fl.then(Bl))}function wu(e){H(e)?pn.push(...e):It&&e.id===-1?It.splice(on+1,0,e):e.flags&1||(pn.push(e),e.flags|=1),jl()}function Qo(e,t,n=st+1){for(;n<Ae.length;n++){const r=Ae[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Ae.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Gl(e){if(pn.length){const t=[...new Set(pn)].sort((n,r)=>Wn(n)-Wn(r));if(pn.length=0,It){It.push(...t);return}for(It=t,on=0;on<It.length;on++){const n=It[on];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}It=null,on=0}}const Wn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Bl(e){try{for(st=0;st<Ae.length;st++){const t=Ae[st];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),er(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;st<Ae.length;st++){const t=Ae[st];t&&(t.flags&=-2)}st=-1,Ae.length=0,Gl(),kr=null,(Ae.length||pn.length)&&Bl()}}let at=null,Ul=null;function Er(e){const t=at;return at=e,Ul=e&&e.type.__scopeId||null,t}function Cu(e,t=at,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&ui(-1);const o=Er(t);let i;try{i=e(...s)}finally{Er(o),r._d&&ui(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Ut(e,t,n,r){const s=e.dirs,o=t&&t.dirs;for(let i=0;i<s.length;i++){const l=s[i];o&&(l.oldValue=o[i].value);let a=l.dir[r];a&&(St(),ft(a,n,8,[e.el,l,e,t]),xt())}}function vu(e,t){if(Re){let n=Re.provides;const r=Re.parent&&Re.parent.provides;r===n&&(n=Re.provides=Object.create(r)),n[e]=t}}function yr(e,t,n=!1){const r=Cf();if(r||gn){let s=gn?gn._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&V(t)?t.call(r&&r.proxy):t}}const Su=Symbol.for("v-scx"),xu=()=>yr(Su);function us(e,t,n){return Hl(e,t,n)}function Hl(e,t,n=oe){const{immediate:r,deep:s,flush:o,once:i}=n,l=xe({},n),a=t&&r||!t&&o!=="post";let c;if(Vn){if(o==="sync"){const d=xu();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!a){const d=()=>{};return d.stop=ct,d.resume=ct,d.pause=ct,d}}const u=Re;l.call=(d,g,b)=>ft(d,u,g,b);let f=!1;o==="post"?l.scheduler=d=>{Pe(d,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(d,g)=>{g?d():_o(d)}),l.augmentJob=d=>{t&&(d.flags|=4),f&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const h=mu(e,t,l);return Vn&&(c?c.push(h):a&&h()),h}function ku(e,t,n){const r=this.proxy,s=he(e)?e.includes(".")?Wl(r,e):()=>r[e]:e.bind(r,r);let o;V(t)?o=t:(o=t.handler,n=t);const i=tr(this),l=Hl(s,o.bind(r),n);return i(),l}function Wl(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const Eu=Symbol("_vte"),Au=e=>e.__isTeleport,Ru=Symbol("_leaveCb");function wo(e,t){e.shapeFlag&6&&e.component?(e.transition=t,wo(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 zl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ei(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Ar=new WeakMap;function Ln(e,t,n,r,s=!1){if(H(e)){e.forEach((b,R)=>Ln(b,t&&(H(t)?t[R]:t),n,r,s));return}if(Dn(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ln(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Eo(r.component):r.el,i=s?null:o,{i:l,r:a}=e,c=t&&t.r,u=l.refs===oe?l.refs={}:l.refs,f=l.setupState,h=Y(f),d=f===oe?dl:b=>ei(u,b)?!1:Z(h,b),g=(b,R)=>!(R&&ei(u,R));if(c!=null&&c!==a){if(ti(t),he(c))u[c]=null,d(c)&&(f[c]=null);else if(Se(c)){const b=t;g(c,b.k)&&(c.value=null),b.k&&(u[b.k]=null)}}if(V(a))er(a,l,12,[i,u]);else{const b=he(a),R=Se(a);if(b||R){const S=()=>{if(e.f){const C=b?d(a)?f[a]:u[a]:g()||!e.k?a.value:u[e.k];if(s)H(C)&&ao(C,o);else if(H(C))C.includes(o)||C.push(o);else if(b)u[a]=[o],d(a)&&(f[a]=u[a]);else{const y=[o];g(a,e.k)&&(a.value=y),e.k&&(u[e.k]=y)}}else b?(u[a]=i,d(a)&&(f[a]=i)):R&&(g(a,e.k)&&(a.value=i),e.k&&(u[e.k]=i))};if(i){const C=()=>{S(),Ar.delete(e)};C.id=-1,Ar.set(e,C),Pe(C,n)}else ti(e),S()}}}function ti(e){const t=Ar.get(e);t&&(t.flags|=8,Ar.delete(e))}Hr().requestIdleCallback;Hr().cancelIdleCallback;const Dn=e=>!!e.type.__asyncLoader,Vl=e=>e.type.__isKeepAlive;function Iu(e,t){ql(e,"a",t)}function $u(e,t){ql(e,"da",t)}function ql(e,t,n=Re){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(qr(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Vl(s.parent.vnode)&&Nu(r,t,n,s),s=s.parent}}function Nu(e,t,n,r){const s=qr(t,e,r,!0);vo(()=>{ao(r[t],s)},n)}function qr(e,t,n=Re,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{St();const l=tr(n),a=ft(t,n,e,i);return l(),xt(),a});return r?s.unshift(o):s.push(o),o}}const Et=e=>(t,n=Re)=>{(!Vn||e==="sp")&&qr(e,(...r)=>t(...r),n)},Pu=Et("bm"),Co=Et("m"),Tu=Et("bu"),Ou=Et("u"),Mu=Et("bum"),vo=Et("um"),Lu=Et("sp"),Du=Et("rtg"),Fu=Et("rtc");function ju(e,t=Re){qr("ec",e,t)}const Gu=Symbol.for("v-ndc");function ge(e,t,n,r){let s;const o=n,i=H(e);if(i||he(e)){const l=i&&Zt(e);let a=!1,c=!1;l&&(a=!We(e),c=kt(e),e=Wr(e)),s=new Array(e.length);for(let u=0,f=e.length;u<f;u++)s[u]=t(a?c?bn(Ye(e[u])):Ye(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){s=new Array(e);for(let l=0;l<e;l++)s[l]=t(l+1,l,void 0,o)}else if(ee(e))if(e[Symbol.iterator])s=Array.from(e,(l,a)=>t(l,a,void 0,o));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,c=l.length;a<c;a++){const u=l[a];s[a]=t(e[u],u,a,o)}}else s=[];return s}const Ms=e=>e?pa(e)?Eo(e):Ms(e.parent):null,Fn=xe(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=>Ms(e.parent),$root:e=>Ms(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xl(e),$forceUpdate:e=>e.f||(e.f=()=>{_o(e.update)}),$nextTick:e=>e.n||(e.n=bu.bind(e.proxy)),$watch:e=>ku.bind(e)}),fs=(e,t)=>e!==oe&&!e.__isScriptSetup&&Z(e,t),Bu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(fs(r,t))return i[t]=1,r[t];if(s!==oe&&Z(s,t))return i[t]=2,s[t];if(Z(o,t))return i[t]=3,o[t];if(n!==oe&&Z(n,t))return i[t]=4,n[t];Ls&&(i[t]=0)}}const c=Fn[t];let u,f;if(c)return t==="$attrs"&&Ce(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==oe&&Z(n,t))return i[t]=4,n[t];if(f=a.config.globalProperties,Z(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return fs(s,t)?(s[t]=n,!0):r!==oe&&Z(r,t)?(r[t]=n,!0):Z(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,props:o,type:i}},l){let a;return!!(n[l]||e!==oe&&l[0]!=="$"&&Z(e,l)||fs(t,l)||Z(o,l)||Z(r,l)||Z(Fn,l)||Z(s.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Z(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ni(e){return H(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ls=!0;function Uu(e){const t=Xl(e),n=e.proxy,r=e.ctx;Ls=!1,t.beforeCreate&&ri(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:d,updated:g,activated:b,deactivated:R,beforeDestroy:S,beforeUnmount:C,destroyed:y,unmounted:v,render:T,renderTracked:q,renderTriggered:j,errorCaptured:K,serverPrefetch:ie,expose:ae,inheritAttrs:Ie,components:_e,directives:Ft,filters:Le}=t;if(c&&Hu(c,r,null),i)for(const le in i){const te=i[le];V(te)&&(r[le]=te.bind(n))}if(s){const le=s.call(n,n);ee(le)&&(e.data=zr(le))}if(Ls=!0,o)for(const le in o){const te=o[le],jt=V(te)?te.bind(n,n):V(te.get)?te.get.bind(n,n):ct,or=!V(te)&&V(te.set)?te.set.bind(n):ct,Gt=qe({get:jt,set:or});Object.defineProperty(r,le,{enumerable:!0,configurable:!0,get:()=>Gt.value,set:Ze=>Gt.value=Ze})}if(l)for(const le in l)Kl(l[le],r,n,le);if(a){const le=V(a)?a.call(n):a;Reflect.ownKeys(le).forEach(te=>{vu(te,le[te])})}u&&ri(u,e,"c");function de(le,te){H(te)?te.forEach(jt=>le(jt.bind(n))):te&&le(te.bind(n))}if(de(Pu,f),de(Co,h),de(Tu,d),de(Ou,g),de(Iu,b),de($u,R),de(ju,K),de(Fu,q),de(Du,j),de(Mu,C),de(vo,v),de(Lu,ie),H(ae))if(ae.length){const le=e.exposed||(e.exposed={});ae.forEach(te=>{Object.defineProperty(le,te,{get:()=>n[te],set:jt=>n[te]=jt,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===ct&&(e.render=T),Ie!=null&&(e.inheritAttrs=Ie),_e&&(e.components=_e),Ft&&(e.directives=Ft),ie&&zl(e)}function Hu(e,t,n=ct){H(e)&&(e=Ds(e));for(const r in e){const s=e[r];let o;ee(s)?"default"in s?o=yr(s.from||r,s.default,!0):o=yr(s.from||r):o=yr(s),Se(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function ri(e,t,n){ft(H(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Kl(e,t,n,r){let s=r.includes(".")?Wl(n,r):()=>n[r];if(he(e)){const o=t[e];V(o)&&us(s,o)}else if(V(e))us(s,e.bind(n));else if(ee(e))if(H(e))e.forEach(o=>Kl(o,t,n,r));else{const o=V(e.handler)?e.handler.bind(n):t[e.handler];V(o)&&us(s,o,e)}}function Xl(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!s.length&&!n&&!r?a=t:(a={},s.length&&s.forEach(c=>Rr(a,c,i,!0)),Rr(a,t,i)),ee(t)&&o.set(t,a),a}function Rr(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&Rr(e,o,n,!0),s&&s.forEach(i=>Rr(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const l=Wu[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Wu={data:si,props:oi,emits:oi,methods:Nn,computed:Nn,beforeCreate:Ee,created:Ee,beforeMount:Ee,mounted:Ee,beforeUpdate:Ee,updated:Ee,beforeDestroy:Ee,beforeUnmount:Ee,destroyed:Ee,unmounted:Ee,activated:Ee,deactivated:Ee,errorCaptured:Ee,serverPrefetch:Ee,components:Nn,directives:Nn,watch:Vu,provide:si,inject:zu};function si(e,t){return t?e?function(){return xe(V(e)?e.call(this,this):e,V(t)?t.call(this,this):t)}:t:e}function zu(e,t){return Nn(Ds(e),Ds(t))}function Ds(e){if(H(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ee(e,t){return e?[...new Set([].concat(e,t))]:t}function Nn(e,t){return e?xe(Object.create(null),e,t):t}function oi(e,t){return e?H(e)&&H(t)?[...new Set([...e,...t])]:xe(Object.create(null),ni(e),ni(t??{})):t}function Vu(e,t){if(!e)return t;if(!t)return e;const n=xe(Object.create(null),e);for(const r in t)n[r]=Ee(e[r],t[r]);return n}function Jl(){return{app:null,config:{isNativeTag:dl,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 qu=0;function Ku(e,t){return function(r,s=null){V(r)||(r=xe({},r)),s!=null&&!ee(s)&&(s=null);const o=Jl(),i=new WeakSet,l=[];let a=!1;const c=o.app={_uid:qu++,_component:r,_props:s,_container:null,_context:o,_instance:null,version:Af,get config(){return o.config},set config(u){},use(u,...f){return i.has(u)||(u&&V(u.install)?(i.add(u),u.install(c,...f)):V(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,h){if(!a){const d=c._ceVNode||Oe(r,s);return d.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),e(d,u,h),a=!0,c._container=u,u.__vue_app__=c,Eo(d.component)}},onUnmount(u){l.push(u)},unmount(){a&&(ft(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=gn;gn=c;try{return u()}finally{gn=f}}};return c}}let gn=null;const Xu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Xe(t)}Modifiers`]||e[`${en(t)}Modifiers`];function Ju(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||oe;let s=n;const o=t.startsWith("update:"),i=o&&Xu(r,t.slice(7));i&&(i.trim&&(s=n.map(u=>he(u)?u.trim():u)),i.number&&(s=n.map(Oc)));let l,a=r[l=ss(t)]||r[l=ss(Xe(t))];!a&&o&&(a=r[l=ss(en(t))]),a&&ft(a,e,6,s);const c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ft(c,e,6,s)}}const Yu=new WeakMap;function Yl(e,t,n=!1){const r=n?Yu:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},l=!1;if(!V(e)){const a=c=>{const u=Yl(c,t,!0);u&&(l=!0,xe(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(ee(e)&&r.set(e,null),null):(H(o)?o.forEach(a=>i[a]=null):xe(i,o),ee(e)&&r.set(e,i),i)}function Kr(e,t){return!e||!Br(t)?!1:(t=t.slice(2).replace(/Once$/,""),Z(e,t[0].toLowerCase()+t.slice(1))||Z(e,en(t))||Z(e,t))}function ii(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:f,data:h,setupState:d,ctx:g,inheritAttrs:b}=e,R=Er(e);let S,C;try{if(n.shapeFlag&4){const v=s||r,T=v;S=it(c.call(T,v,u,f,d,h,g)),C=l}else{const v=t;S=it(v.length>1?v(f,{attrs:l,slots:i,emit:a}):v(f,null)),C=t.props?l:Zu(l)}}catch(v){jn.length=0,Vr(v,e,1),S=Oe(Dt)}let y=S;if(C&&b!==!1){const v=Object.keys(C),{shapeFlag:T}=y;v.length&&T&7&&(o&&v.some(lo)&&(C=Qu(C,o)),y=_n(y,C,!1,!0))}return n.dirs&&(y=_n(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&wo(y,n.transition),S=y,Er(R),S}const Zu=e=>{let t;for(const n in e)(n==="class"||n==="style"||Br(n))&&((t||(t={}))[n]=e[n]);return t},Qu=(e,t)=>{const n={};for(const r in e)(!lo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ef(e,t,n){const{props:r,children:s,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 r?li(r,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const h=u[f];if(Zl(i,r,h)&&!Kr(c,h))return!0}}}else return(s||l)&&(!l||!l.$stable)?!0:r===i?!1:r?i?li(r,i,c):!0:!!i;return!1}function li(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const o=r[s];if(Zl(t,e,o)&&!Kr(n,o))return!0}return!1}function Zl(e,t,n){const r=e[n],s=t[n];return n==="style"&&ee(r)&&ee(s)?!uo(r,s):r!==s}function tf({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Ql={},ea=()=>Object.create(Ql),ta=e=>Object.getPrototypeOf(e)===Ql;function nf(e,t,n,r=!1){const s={},o=ea();e.propsDefaults=Object.create(null),na(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:au(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function rf(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,l=Y(s),[a]=e.propsOptions;let c=!1;if((r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let h=u[f];if(Kr(e.emitsOptions,h))continue;const d=t[h];if(a)if(Z(o,h))d!==o[h]&&(o[h]=d,c=!0);else{const g=Xe(h);s[g]=Fs(a,l,g,d,e,!1)}else d!==o[h]&&(o[h]=d,c=!0)}}}else{na(e,t,s,o)&&(c=!0);let u;for(const f in l)(!t||!Z(t,f)&&((u=en(f))===f||!Z(t,u)))&&(a?n&&(n[f]!==void 0||n[u]!==void 0)&&(s[f]=Fs(a,l,f,void 0,e,!0)):delete s[f]);if(o!==l)for(const f in o)(!t||!Z(t,f))&&(delete o[f],c=!0)}c&&_t(e.attrs,"set","")}function na(e,t,n,r){const[s,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(Tn(a))continue;const c=t[a];let u;s&&Z(s,u=Xe(a))?!o||!o.includes(u)?n[u]=c:(l||(l={}))[u]=c:Kr(e.emitsOptions,a)||(!(a in r)||c!==r[a])&&(r[a]=c,i=!0)}if(o){const a=Y(n),c=l||oe;for(let u=0;u<o.length;u++){const f=o[u];n[f]=Fs(s,a,f,c[f],e,!Z(c,f))}}return i}function Fs(e,t,n,r,s,o){const i=e[n];if(i!=null){const l=Z(i,"default");if(l&&r===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&V(a)){const{propsDefaults:c}=s;if(n in c)r=c[n];else{const u=tr(s);r=c[n]=a.call(null,t),u()}}else r=a;s.ce&&s.ce._setProp(n,r)}i[0]&&(o&&!l?r=!1:i[1]&&(r===""||r===en(n))&&(r=!0))}return r}const sf=new WeakMap;function ra(e,t,n=!1){const r=n?sf:t.propsCache,s=r.get(e);if(s)return s;const o=e.props,i={},l=[];let a=!1;if(!V(e)){const u=f=>{a=!0;const[h,d]=ra(f,t,!0);xe(i,h),d&&l.push(...d)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return ee(e)&&r.set(e,fn),fn;if(H(o))for(let u=0;u<o.length;u++){const f=Xe(o[u]);ai(f)&&(i[f]=oe)}else if(o)for(const u in o){const f=Xe(u);if(ai(f)){const h=o[u],d=i[f]=H(h)||V(h)?{type:h}:xe({},h),g=d.type;let b=!1,R=!0;if(H(g))for(let S=0;S<g.length;++S){const C=g[S],y=V(C)&&C.name;if(y==="Boolean"){b=!0;break}else y==="String"&&(R=!1)}else b=V(g)&&g.name==="Boolean";d[0]=b,d[1]=R,(b||Z(d,"default"))&&l.push(f)}}const c=[i,l];return ee(e)&&r.set(e,c),c}function ai(e){return e[0]!=="$"&&!Tn(e)}const So=e=>e==="_"||e==="_ctx"||e==="$stable",xo=e=>H(e)?e.map(it):[it(e)],of=(e,t,n)=>{if(t._n)return t;const r=Cu((...s)=>xo(t(...s)),n);return r._c=!1,r},sa=(e,t,n)=>{const r=e._ctx;for(const s in e){if(So(s))continue;const o=e[s];if(V(o))t[s]=of(s,o,r);else if(o!=null){const i=xo(o);t[s]=()=>i}}},oa=(e,t)=>{const n=xo(t);e.slots.default=()=>n},ia=(e,t,n)=>{for(const r in t)(n||!So(r))&&(e[r]=t[r])},lf=(e,t,n)=>{const r=e.slots=ea();if(e.vnode.shapeFlag&32){const s=t._;s?(ia(r,t,n),n&&_l(r,"_",s,!0)):sa(t,r)}else t&&oa(e,t)},af=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=oe;if(r.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:ia(s,t,n):(o=!t.$stable,sa(t,s)),i=t}else t&&(oa(e,t),i={default:1});if(o)for(const l in s)!So(l)&&i[l]==null&&delete s[l]},Pe=df;function cf(e){return uf(e)}function uf(e,t){const n=Hr();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:d=ct,insertStaticContent:g}=e,b=(p,m,_,A=null,x=null,k=null,M=void 0,P=null,N=!!m.dynamicChildren)=>{if(p===m)return;p&&!In(p,m)&&(A=ir(p),Ze(p,x,k,!0),p=null),m.patchFlag===-2&&(N=!1,m.dynamicChildren=null);const{type:E,ref:B,shapeFlag:L}=m;switch(E){case Xr:R(p,m,_,A);break;case Dt:S(p,m,_,A);break;case ds:p==null&&C(m,_,A,M);break;case J:_e(p,m,_,A,x,k,M,P,N);break;default:L&1?T(p,m,_,A,x,k,M,P,N):L&6?Ft(p,m,_,A,x,k,M,P,N):(L&64||L&128)&&E.process(p,m,_,A,x,k,M,P,N,En)}B!=null&&x?Ln(B,p&&p.ref,k,m||p,!m):B==null&&p&&p.ref!=null&&Ln(p.ref,null,k,p,!0)},R=(p,m,_,A)=>{if(p==null)r(m.el=l(m.children),_,A);else{const x=m.el=p.el;m.children!==p.children&&c(x,m.children)}},S=(p,m,_,A)=>{p==null?r(m.el=a(m.children||""),_,A):m.el=p.el},C=(p,m,_,A)=>{[p.el,p.anchor]=g(p.children,m,_,A,p.el,p.anchor)},y=({el:p,anchor:m},_,A)=>{let x;for(;p&&p!==m;)x=h(p),r(p,_,A),p=x;r(m,_,A)},v=({el:p,anchor:m})=>{let _;for(;p&&p!==m;)_=h(p),s(p),p=_;s(m)},T=(p,m,_,A,x,k,M,P,N)=>{if(m.type==="svg"?M="svg":m.type==="math"&&(M="mathml"),p==null)q(m,_,A,x,k,M,P,N);else{const E=p.el&&p.el._isVueCE?p.el:null;try{E&&E._beginPatch(),ie(p,m,x,k,M,P,N)}finally{E&&E._endPatch()}}},q=(p,m,_,A,x,k,M,P)=>{let N,E;const{props:B,shapeFlag:L,transition:F,dirs:U}=p;if(N=p.el=i(p.type,k,B&&B.is,B),L&8?u(N,p.children):L&16&&K(p.children,N,null,A,x,hs(p,k),M,P),U&&Ut(p,null,A,"created"),j(N,p,p.scopeId,M,A),B){for(const ne in B)ne!=="value"&&!Tn(ne)&&o(N,ne,null,B[ne],k,A);"value"in B&&o(N,"value",null,B.value,k),(E=B.onVnodeBeforeMount)&&nt(E,A,p)}U&&Ut(p,null,A,"beforeMount");const X=ff(x,F);X&&F.beforeEnter(N),r(N,m,_),((E=B&&B.onVnodeMounted)||X||U)&&Pe(()=>{E&&nt(E,A,p),X&&F.enter(N),U&&Ut(p,null,A,"mounted")},x)},j=(p,m,_,A,x)=>{if(_&&d(p,_),A)for(let k=0;k<A.length;k++)d(p,A[k]);if(x){let k=x.subTree;if(m===k||ua(k.type)&&(k.ssContent===m||k.ssFallback===m)){const M=x.vnode;j(p,M,M.scopeId,M.slotScopeIds,x.parent)}}},K=(p,m,_,A,x,k,M,P,N=0)=>{for(let E=N;E<p.length;E++){const B=p[E]=P?yt(p[E]):it(p[E]);b(null,B,m,_,A,x,k,M,P)}},ie=(p,m,_,A,x,k,M)=>{const P=m.el=p.el;let{patchFlag:N,dynamicChildren:E,dirs:B}=m;N|=p.patchFlag&16;const L=p.props||oe,F=m.props||oe;let U;if(_&&Ht(_,!1),(U=F.onVnodeBeforeUpdate)&&nt(U,_,m,p),B&&Ut(m,p,_,"beforeUpdate"),_&&Ht(_,!0),(L.innerHTML&&F.innerHTML==null||L.textContent&&F.textContent==null)&&u(P,""),E?ae(p.dynamicChildren,E,P,_,A,hs(m,x),k):M||te(p,m,P,null,_,A,hs(m,x),k,!1),N>0){if(N&16)Ie(P,L,F,_,x);else if(N&2&&L.class!==F.class&&o(P,"class",null,F.class,x),N&4&&o(P,"style",L.style,F.style,x),N&8){const X=m.dynamicProps;for(let ne=0;ne<X.length;ne++){const Q=X[ne],$e=L[Q],Ne=F[Q];(Ne!==$e||Q==="value")&&o(P,Q,$e,Ne,x,_)}}N&1&&p.children!==m.children&&u(P,m.children)}else!M&&E==null&&Ie(P,L,F,_,x);((U=F.onVnodeUpdated)||B)&&Pe(()=>{U&&nt(U,_,m,p),B&&Ut(m,p,_,"updated")},A)},ae=(p,m,_,A,x,k,M)=>{for(let P=0;P<m.length;P++){const N=p[P],E=m[P],B=N.el&&(N.type===J||!In(N,E)||N.shapeFlag&198)?f(N.el):_;b(N,E,B,null,A,x,k,M,!0)}},Ie=(p,m,_,A,x)=>{if(m!==_){if(m!==oe)for(const k in m)!Tn(k)&&!(k in _)&&o(p,k,m[k],null,x,A);for(const k in _){if(Tn(k))continue;const M=_[k],P=m[k];M!==P&&k!=="value"&&o(p,k,P,M,x,A)}"value"in _&&o(p,"value",m.value,_.value,x)}},_e=(p,m,_,A,x,k,M,P,N)=>{const E=m.el=p?p.el:l(""),B=m.anchor=p?p.anchor:l("");let{patchFlag:L,dynamicChildren:F,slotScopeIds:U}=m;U&&(P=P?P.concat(U):U),p==null?(r(E,_,A),r(B,_,A),K(m.children||[],_,B,x,k,M,P,N)):L>0&&L&64&&F&&p.dynamicChildren&&p.dynamicChildren.length===F.length?(ae(p.dynamicChildren,F,_,x,k,M,P),(m.key!=null||x&&m===x.subTree)&&la(p,m,!0)):te(p,m,_,B,x,k,M,P,N)},Ft=(p,m,_,A,x,k,M,P,N)=>{m.slotScopeIds=P,p==null?m.shapeFlag&512?x.ctx.activate(m,_,A,M,N):Le(m,_,A,x,k,M,N):ht(p,m,N)},Le=(p,m,_,A,x,k,M)=>{const P=p.component=wf(p,A,x);if(Vl(p)&&(P.ctx.renderer=En),vf(P,!1,M),P.asyncDep){if(x&&x.registerDep(P,de,M),!p.el){const N=P.subTree=Oe(Dt);S(null,N,m,_),p.placeholder=N.el}}else de(P,p,m,_,x,k,M)},ht=(p,m,_)=>{const A=m.component=p.component;if(ef(p,m,_))if(A.asyncDep&&!A.asyncResolved){le(A,m,_);return}else A.next=m,A.update();else m.el=p.el,A.vnode=m},de=(p,m,_,A,x,k,M)=>{const P=()=>{if(p.isMounted){let{next:L,bu:F,u:U,parent:X,vnode:ne}=p;{const et=aa(p);if(et){L&&(L.el=ne.el,le(p,L,M)),et.asyncDep.then(()=>{Pe(()=>{p.isUnmounted||E()},x)});return}}let Q=L,$e;Ht(p,!1),L?(L.el=ne.el,le(p,L,M)):L=ne,F&&os(F),($e=L.props&&L.props.onVnodeBeforeUpdate)&&nt($e,X,L,ne),Ht(p,!0);const Ne=ii(p),Qe=p.subTree;p.subTree=Ne,b(Qe,Ne,f(Qe.el),ir(Qe),p,x,k),L.el=Ne.el,Q===null&&tf(p,Ne.el),U&&Pe(U,x),($e=L.props&&L.props.onVnodeUpdated)&&Pe(()=>nt($e,X,L,ne),x)}else{let L;const{el:F,props:U}=m,{bm:X,m:ne,parent:Q,root:$e,type:Ne}=p,Qe=Dn(m);Ht(p,!1),X&&os(X),!Qe&&(L=U&&U.onVnodeBeforeMount)&&nt(L,Q,m),Ht(p,!0);{$e.ce&&$e.ce._hasShadowRoot()&&$e.ce._injectChildStyle(Ne,p.parent?p.parent.type:void 0);const et=p.subTree=ii(p);b(null,et,_,A,p,x,k),m.el=et.el}if(ne&&Pe(ne,x),!Qe&&(L=U&&U.onVnodeMounted)){const et=m;Pe(()=>nt(L,Q,et),x)}(m.shapeFlag&256||Q&&Dn(Q.vnode)&&Q.vnode.shapeFlag&256)&&p.a&&Pe(p.a,x),p.isMounted=!0,m=_=A=null}};p.scope.on();const N=p.effect=new Sl(P);p.scope.off();const E=p.update=N.run.bind(N),B=p.job=N.runIfDirty.bind(N);B.i=p,B.id=p.uid,N.scheduler=()=>_o(B),Ht(p,!0),E()},le=(p,m,_)=>{m.component=p;const A=p.vnode.props;p.vnode=m,p.next=null,rf(p,m.props,A,_),af(p,m.children,_),St(),Qo(p),xt()},te=(p,m,_,A,x,k,M,P,N=!1)=>{const E=p&&p.children,B=p?p.shapeFlag:0,L=m.children,{patchFlag:F,shapeFlag:U}=m;if(F>0){if(F&128){or(E,L,_,A,x,k,M,P,N);return}else if(F&256){jt(E,L,_,A,x,k,M,P,N);return}}U&8?(B&16&&kn(E,x,k),L!==E&&u(_,L)):B&16?U&16?or(E,L,_,A,x,k,M,P,N):kn(E,x,k,!0):(B&8&&u(_,""),U&16&&K(L,_,A,x,k,M,P,N))},jt=(p,m,_,A,x,k,M,P,N)=>{p=p||fn,m=m||fn;const E=p.length,B=m.length,L=Math.min(E,B);let F;for(F=0;F<L;F++){const U=m[F]=N?yt(m[F]):it(m[F]);b(p[F],U,_,null,x,k,M,P,N)}E>B?kn(p,x,k,!0,!1,L):K(m,_,A,x,k,M,P,N,L)},or=(p,m,_,A,x,k,M,P,N)=>{let E=0;const B=m.length;let L=p.length-1,F=B-1;for(;E<=L&&E<=F;){const U=p[E],X=m[E]=N?yt(m[E]):it(m[E]);if(In(U,X))b(U,X,_,null,x,k,M,P,N);else break;E++}for(;E<=L&&E<=F;){const U=p[L],X=m[F]=N?yt(m[F]):it(m[F]);if(In(U,X))b(U,X,_,null,x,k,M,P,N);else break;L--,F--}if(E>L){if(E<=F){const U=F+1,X=U<B?m[U].el:A;for(;E<=F;)b(null,m[E]=N?yt(m[E]):it(m[E]),_,X,x,k,M,P,N),E++}}else if(E>F)for(;E<=L;)Ze(p[E],x,k,!0),E++;else{const U=E,X=E,ne=new Map;for(E=X;E<=F;E++){const De=m[E]=N?yt(m[E]):it(m[E]);De.key!=null&&ne.set(De.key,E)}let Q,$e=0;const Ne=F-X+1;let Qe=!1,et=0;const An=new Array(Ne);for(E=0;E<Ne;E++)An[E]=0;for(E=U;E<=L;E++){const De=p[E];if($e>=Ne){Ze(De,x,k,!0);continue}let tt;if(De.key!=null)tt=ne.get(De.key);else for(Q=X;Q<=F;Q++)if(An[Q-X]===0&&In(De,m[Q])){tt=Q;break}tt===void 0?Ze(De,x,k,!0):(An[tt-X]=E+1,tt>=et?et=tt:Qe=!0,b(De,m[tt],_,null,x,k,M,P,N),$e++)}const Wo=Qe?hf(An):fn;for(Q=Wo.length-1,E=Ne-1;E>=0;E--){const De=X+E,tt=m[De],zo=m[De+1],Vo=De+1<B?zo.el||ca(zo):A;An[E]===0?b(null,tt,_,Vo,x,k,M,P,N):Qe&&(Q<0||E!==Wo[Q]?Gt(tt,_,Vo,2):Q--)}}},Gt=(p,m,_,A,x=null)=>{const{el:k,type:M,transition:P,children:N,shapeFlag:E}=p;if(E&6){Gt(p.component.subTree,m,_,A);return}if(E&128){p.suspense.move(m,_,A);return}if(E&64){M.move(p,m,_,En);return}if(M===J){r(k,m,_);for(let L=0;L<N.length;L++)Gt(N[L],m,_,A);r(p.anchor,m,_);return}if(M===ds){y(p,m,_);return}if(A!==2&&E&1&&P)if(A===0)P.beforeEnter(k),r(k,m,_),Pe(()=>P.enter(k),x);else{const{leave:L,delayLeave:F,afterLeave:U}=P,X=()=>{p.ctx.isUnmounted?s(k):r(k,m,_)},ne=()=>{k._isLeaving&&k[Ru](!0),L(k,()=>{X(),U&&U()})};F?F(k,X,ne):ne()}else r(k,m,_)},Ze=(p,m,_,A=!1,x=!1)=>{const{type:k,props:M,ref:P,children:N,dynamicChildren:E,shapeFlag:B,patchFlag:L,dirs:F,cacheIndex:U}=p;if(L===-2&&(x=!1),P!=null&&(St(),Ln(P,null,_,p,!0),xt()),U!=null&&(m.renderCache[U]=void 0),B&256){m.ctx.deactivate(p);return}const X=B&1&&F,ne=!Dn(p);let Q;if(ne&&(Q=M&&M.onVnodeBeforeUnmount)&&nt(Q,m,p),B&6)kc(p.component,_,A);else{if(B&128){p.suspense.unmount(_,A);return}X&&Ut(p,null,m,"beforeUnmount"),B&64?p.type.remove(p,m,_,En,A):E&&!E.hasOnce&&(k!==J||L>0&&L&64)?kn(E,m,_,!1,!0):(k===J&&L&384||!x&&B&16)&&kn(N,m,_),A&&Uo(p)}(ne&&(Q=M&&M.onVnodeUnmounted)||X)&&Pe(()=>{Q&&nt(Q,m,p),X&&Ut(p,null,m,"unmounted")},_)},Uo=p=>{const{type:m,el:_,anchor:A,transition:x}=p;if(m===J){xc(_,A);return}if(m===ds){v(p);return}const k=()=>{s(_),x&&!x.persisted&&x.afterLeave&&x.afterLeave()};if(p.shapeFlag&1&&x&&!x.persisted){const{leave:M,delayLeave:P}=x,N=()=>M(_,k);P?P(p.el,k,N):N()}else k()},xc=(p,m)=>{let _;for(;p!==m;)_=h(p),s(p),p=_;s(m)},kc=(p,m,_)=>{const{bum:A,scope:x,job:k,subTree:M,um:P,m:N,a:E}=p;ci(N),ci(E),A&&os(A),x.stop(),k&&(k.flags|=8,Ze(M,p,m,_)),P&&Pe(P,m),Pe(()=>{p.isUnmounted=!0},m)},kn=(p,m,_,A=!1,x=!1,k=0)=>{for(let M=k;M<p.length;M++)Ze(p[M],m,_,A,x)},ir=p=>{if(p.shapeFlag&6)return ir(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const m=h(p.anchor||p.el),_=m&&m[Eu];return _?h(_):m};let ts=!1;const Ho=(p,m,_)=>{let A;p==null?m._vnode&&(Ze(m._vnode,null,null,!0),A=m._vnode.component):b(m._vnode||null,p,m,null,null,null,_),m._vnode=p,ts||(ts=!0,Qo(A),Gl(),ts=!1)},En={p:b,um:Ze,m:Gt,r:Uo,mt:Le,mc:K,pc:te,pbc:ae,n:ir,o:e};return{render:Ho,hydrate:void 0,createApp:Ku(Ho)}}function hs({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 Ht({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ff(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function la(e,t,n=!1){const r=e.children,s=t.children;if(H(r)&&H(s))for(let o=0;o<r.length;o++){const i=r[o];let l=s[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=s[o]=yt(s[o]),l.el=i.el),!n&&l.patchFlag!==-2&&la(i,l)),l.type===Xr&&(l.patchFlag===-1&&(l=s[o]=yt(l)),l.el=i.el),l.type===Dt&&!l.el&&(l.el=i.el)}}function hf(e){const t=e.slice(),n=[0];let r,s,o,i,l;const a=e.length;for(r=0;r<a;r++){const c=e[r];if(c!==0){if(s=n[n.length-1],e[s]<c){t[r]=s,n.push(r);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[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function aa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:aa(t)}function ci(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ca(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ca(t.subTree):null}const ua=e=>e.__isSuspense;function df(e,t){t&&t.pendingBranch?H(e)?t.effects.push(...e):t.effects.push(e):wu(e)}const J=Symbol.for("v-fgt"),Xr=Symbol.for("v-txt"),Dt=Symbol.for("v-cmt"),ds=Symbol.for("v-stc"),jn=[];let je=null;function O(e=!1){jn.push(je=e?null:[])}function pf(){jn.pop(),je=jn[jn.length-1]||null}let zn=1;function ui(e,t=!1){zn+=e,e<0&&je&&t&&(je.hasOnce=!0)}function fa(e){return e.dynamicChildren=zn>0?je||fn:null,pf(),zn>0&&je&&je.push(e),e}function D(e,t,n,r,s,o){return fa($(e,t,n,r,s,o,!0))}function ln(e,t,n,r,s){return fa(Oe(e,t,n,r,s,!0))}function ha(e){return e?e.__v_isVNode===!0:!1}function In(e,t){return e.type===t.type&&e.key===t.key}const da=({key:e})=>e??null,br=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?he(e)||Se(e)||V(e)?{i:at,r:e,k:t,f:!!n}:e:null);function $(e,t=null,n=null,r=0,s=null,o=e===J?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&da(t),ref:t&&br(t),scopeId:Ul,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:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:at};return l?(ko(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=he(n)?8:16),zn>0&&!i&&je&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&je.push(a),a}const Oe=gf;function gf(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Gu)&&(e=Dt),ha(e)){const l=_n(e,t,!0);return n&&ko(l,n),zn>0&&!o&&je&&(l.shapeFlag&6?je[je.indexOf(e)]=l:je.push(l)),l.patchFlag=-2,l}if(Ef(e)&&(e=e.__vccOpts),t){t=mf(t);let{class:l,style:a}=t;l&&!he(l)&&(t.class=Lt(l)),ee(a)&&(bo(a)&&!H(a)&&(a=xe({},a)),t.style=dn(a))}const i=he(e)?1:ua(e)?128:Au(e)?64:ee(e)?4:V(e)?2:0;return $(e,t,n,r,s,i,o,!0)}function mf(e){return e?bo(e)||ta(e)?xe({},e):e:null}function _n(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?yf(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&da(c),ref:t&&t.ref?n&&o?H(o)?o.concat(br(t)):[o,br(t)]:br(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!==J?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&&_n(e.ssContent),ssFallback:e.ssFallback&&_n(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&wo(u,a.clone(u)),u}function js(e=" ",t=0){return Oe(Xr,null,e,t)}function ue(e="",t=!1){return t?(O(),ln(Dt,null,e)):Oe(Dt,null,e)}function it(e){return e==null||typeof e=="boolean"?Oe(Dt):H(e)?Oe(J,null,e.slice()):ha(e)?yt(e):Oe(Xr,null,String(e))}function yt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_n(e)}function ko(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(H(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ko(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!ta(t)?t._ctx=at:s===3&&at&&(at.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else V(t)?(t={default:t,_ctx:at},n=32):(t=String(t),r&64?(n=16,t=[js(t)]):n=8);e.children=t,e.shapeFlag|=n}function yf(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=Lt([t.class,r.class]));else if(s==="style")t.style=dn([t.style,r.style]);else if(Br(s)){const o=t[s],i=r[s];i&&o!==i&&!(H(o)&&o.includes(i))&&(t[s]=o?[].concat(o,i):i)}else s!==""&&(t[s]=r[s])}return t}function nt(e,t,n,r=null){ft(e,t,7,[n,r])}const bf=Jl();let _f=0;function wf(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||bf,o={uid:_f++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Uc(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ra(r,s),emitsOptions:Yl(r,s),emit:null,emitted:null,propsDefaults:oe,inheritAttrs:r.inheritAttrs,ctx:oe,data:oe,props:oe,attrs:oe,slots:oe,refs:oe,setupState:oe,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=Ju.bind(null,o),e.ce&&e.ce(o),o}let Re=null;const Cf=()=>Re||at;let Ir,Gs;{const e=Hr(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};Ir=t("__VUE_INSTANCE_SETTERS__",n=>Re=n),Gs=t("__VUE_SSR_SETTERS__",n=>Vn=n)}const tr=e=>{const t=Re;return Ir(e),e.scope.on(),()=>{e.scope.off(),Ir(t)}},fi=()=>{Re&&Re.scope.off(),Ir(null)};function pa(e){return e.vnode.shapeFlag&4}let Vn=!1;function vf(e,t=!1,n=!1){t&&Gs(t);const{props:r,children:s}=e.vnode,o=pa(e);nf(e,r,o,t),lf(e,s,n||t);const i=o?Sf(e,t):void 0;return t&&Gs(!1),i}function Sf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Bu);const{setup:r}=n;if(r){St();const s=e.setupContext=r.length>1?kf(e):null,o=tr(e),i=er(r,e,0,[e.props,s]),l=gl(i);if(xt(),o(),(l||e.sp)&&!Dn(e)&&zl(e),l){if(i.then(fi,fi),t)return i.then(a=>{hi(e,a)}).catch(a=>{Vr(a,e,0)});e.asyncDep=i}else hi(e,i)}else ga(e)}function hi(e,t,n){V(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ee(t)&&(e.setupState=Dl(t)),ga(e)}function ga(e,t,n){const r=e.type;e.render||(e.render=r.render||ct);{const s=tr(e);St();try{Uu(e)}finally{xt(),s()}}}const xf={get(e,t){return Ce(e,"get",""),e[t]}};function kf(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,xf),slots:e.slots,emit:e.emit,expose:t}}function Eo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Dl(cu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Fn)return Fn[n](e)},has(t,n){return n in t||n in Fn}})):e.proxy}function Ef(e){return V(e)&&"__vccOpts"in e}const qe=(e,t)=>pu(e,t,Vn),Af="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 Bs;const di=typeof window<"u"&&window.trustedTypes;if(di)try{Bs=di.createPolicy("vue",{createHTML:e=>e})}catch{}const ma=Bs?e=>Bs.createHTML(e):e=>e,Rf="http://www.w3.org/2000/svg",If="http://www.w3.org/1998/Math/MathML",mt=typeof document<"u"?document:null,pi=mt&&mt.createElement("template"),$f={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?mt.createElementNS(Rf,e):t==="mathml"?mt.createElementNS(If,e):n?mt.createElement(e,{is:n}):mt.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>mt.createTextNode(e),createComment:e=>mt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{pi.innerHTML=ma(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const l=pi.content;if(r==="svg"||r==="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]}},Nf=Symbol("_vtc");function Pf(e,t,n){const r=e[Nf];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const gi=Symbol("_vod"),Tf=Symbol("_vsh"),Of=Symbol(""),Mf=/(?:^|;)\s*display\s*:/;function Lf(e,t,n){const r=e.style,s=he(n);let o=!1;if(n&&!s){if(t)if(he(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&_r(r,l,"")}else for(const i in t)n[i]==null&&_r(r,i,"");for(const i in n)i==="display"&&(o=!0),_r(r,i,n[i])}else if(s){if(t!==n){const i=r[Of];i&&(n+=";"+i),r.cssText=n,o=Mf.test(n)}}else t&&e.removeAttribute("style");gi in e&&(e[gi]=o?r.display:"",e[Tf]&&(r.display="none"))}const mi=/\s*!important$/;function _r(e,t,n){if(H(n))n.forEach(r=>_r(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Df(e,t);mi.test(n)?e.setProperty(en(r),n.replace(mi,""),"important"):e[r]=n}}const yi=["Webkit","Moz","ms"],ps={};function Df(e,t){const n=ps[t];if(n)return n;let r=Xe(t);if(r!=="filter"&&r in e)return ps[t]=r;r=bl(r);for(let s=0;s<yi.length;s++){const o=yi[s]+r;if(o in e)return ps[t]=o}return t}const bi="http://www.w3.org/1999/xlink";function _i(e,t,n,r,s,o=Gc(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(bi,t.slice(6,t.length)):e.setAttributeNS(bi,t,n):n==null||o&&!wl(n)?e.removeAttribute(t):e.setAttribute(t,o?"":ut(n)?String(n):n)}function wi(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ma(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=wl(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(s||t)}function Ff(e,t,n,r){e.addEventListener(t,n,r)}function jf(e,t,n,r){e.removeEventListener(t,n,r)}const Ci=Symbol("_vei");function Gf(e,t,n,r,s=null){const o=e[Ci]||(e[Ci]={}),i=o[t];if(r&&i)i.value=r;else{const[l,a]=Bf(t);if(r){const c=o[t]=Wf(r,s);Ff(e,l,c,a)}else i&&(jf(e,l,i,a),o[t]=void 0)}}const vi=/(?:Once|Passive|Capture)$/;function Bf(e){let t;if(vi.test(e)){t={};let r;for(;r=e.match(vi);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):en(e.slice(2)),t]}let gs=0;const Uf=Promise.resolve(),Hf=()=>gs||(Uf.then(()=>gs=0),gs=Date.now());function Wf(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;ft(zf(r,n.value),t,5,[r])};return n.value=e,n.attached=Hf(),n}function zf(e,t){if(H(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Si=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Vf=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?Pf(e,r,i):t==="style"?Lf(e,n,r):Br(t)?lo(t)||Gf(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):qf(e,t,r,i))?(wi(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&_i(e,t,r,i,o,t!=="value")):e._isVueCE&&(Kf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!he(r)))?wi(e,Xe(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),_i(e,t,r,i))};function qf(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Si(t)&&V(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 s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Si(t)&&he(n)?!1:t in e}function Kf(e,t){const n=e._def.props;if(!n)return!1;const r=Xe(t);return Array.isArray(n)?n.some(s=>Xe(s)===r):Object.keys(n).some(s=>Xe(s)===r)}const Xf=xe({patchProp:Vf},$f);let xi;function Jf(){return xi||(xi=cf(Xf))}const Yf=((...e)=>{const t=Jf().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Qf(r);if(!s)return;const o=t._component;!V(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,Zf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t});function Zf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Qf(e){return he(e)?document.querySelector(e):e}function eh(e=1e3){const t=Tt(null),n=Tt(null),r=Tt(null),s=Tt(null);let o=null;const i=".";async function l(){try{const h=await fetch(`${i}/api/state`);if(!h.ok)throw new Error(`${h.status}`);t.value=await h.json(),s.value=null}catch(h){s.value=h.message}}async function a(h){try{const d=await fetch(`${i}/api/connection/${h}`);if(!d.ok)throw new Error(`${d.status}`);n.value=await d.json()}catch{n.value=null}}async function c(h,d){try{const g=await fetch(`${i}/api/collection/${encodeURIComponent(h)}/records?connId=${encodeURIComponent(d)}`);if(!g.ok)throw new Error(`${g.status}`);return await g.json()}catch{return{recordIds:[],records:[]}}}async function u(h){r.value=h,h?await a(h):n.value=null}async function f(){await l(),r.value&&await a(r.value)}return Co(()=>{f(),o=setInterval(f,e)}),vo(()=>{o&&clearInterval(o)}),{state:t,connectionDetail:n,selectedConnectionId:r,error:s,selectConnection:u,fetchCollectionRecords:c}}const th={class:"sidebar-section"},nh={key:0,class:"badge"},rh=["onClick"],sh=["title"],oh={key:0,class:"meta"},ih={__name:"ConnectionPicker",props:{connections:{type:Array,default:()=>[]},selectedId:{type:String,default:null}},emits:["select"],setup(e){return(t,n)=>(O(),D("div",th,[n[2]||(n[2]=$("div",{class:"sidebar-header"},"connections",-1)),$("div",{class:Lt(["sidebar-item",{active:!e.selectedId}]),onClick:n[0]||(n[0]=r=>t.$emit("select",null))},[n[1]||(n[1]=$("span",{class:"label"},"all connections",-1)),e.connections.length?(O(),D("span",nh,G(e.connections.length),1)):ue("",!0)],2),(O(!0),D(J,null,ge(e.connections,r=>(O(),D("div",{key:r.id,class:Lt(["sidebar-item",{active:e.selectedId===r.id}]),onClick:s=>t.$emit("select",r.id)},[$("span",{class:"label",title:r.id},G(r.id.slice(0,8)),9,sh),r.latency!==null?(O(),D("span",oh,G(r.latency)+"ms",1)):ue("",!0)],10,rh))),128))]))}},lh={key:0,class:"empty"},ah={class:"card-header"},ch={class:"name"},uh={class:"badge accent"},fh=["title","onClick"],hh={key:0,class:"member-presence"},dh={key:1,class:"no-presence"},ph={__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 r=Object.keys(n);return r.length<=3?r.map(s=>`${s}: ${JSON.stringify(n[s])}`).join(", "):`{${r.length} fields}`}return String(n)}return(n,r)=>e.rooms.length?(O(),D(J,{key:1},[r[0]||(r[0]=$("div",{class:"view-hint"},"active rooms, their members, and each member's presence state",-1)),(O(!0),D(J,null,ge(e.rooms,s=>(O(),D("div",{key:s.name,class:"card"},[$("div",ah,[$("span",ch,G(s.name),1),$("span",uh,G(s.members.length)+" "+G(s.members.length===1?"member":"members"),1)]),(O(!0),D(J,null,ge(s.members,o=>(O(),D("div",{key:o,class:"member-row"},[$("span",{class:"member-id conn-link",title:o,onClick:i=>n.$emit("navigate",o)},G(o.slice(0,8)),9,fh),s.presence[o]?(O(),D("span",hh,G(t(s.presence[o])),1)):(O(),D("span",dh,"no presence"))]))),128))]))),128))],64)):(O(),D("div",lh,"no rooms"))}},gh={key:0,class:"empty"},mh={class:"card-header"},yh={class:"name"},bh={class:"badge accent"},_h=["title","onClick"],wh={__name:"ChannelsView",props:{channels:{type:Object,default:()=>({})}},emits:["navigate"],setup(e){const t=e,n=qe(()=>Object.entries(t.channels));return(r,s)=>n.value.length?(O(),D(J,{key:1},[s[0]||(s[0]=$("div",{class:"view-hint"},"channels with active subscribers on this server instance",-1)),(O(!0),D(J,null,ge(n.value,([o,i])=>(O(),D("div",{key:o,class:"card"},[$("div",mh,[$("span",yh,G(o),1),$("span",bh,G(i.length)+" "+G(i.length===1?"subscriber":"subscribers"),1)]),(O(!0),D(J,null,ge(i,l=>(O(),D("div",{key:l,class:"member-row"},[$("span",{class:"member-id conn-link",title:l,onClick:a=>r.$emit("navigate",l)},G(l.slice(0,8)),9,_h)]))),128))]))),128))],64)):(O(),D("div",gh,"no channel subscriptions"))}};let ye=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Ch(e){return Ao(e)}function Ao(e){return Array.isArray(e)?vh(e):e instanceof RegExp?e:typeof e=="object"?Sh(e):e}function vh(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Ao(e[n]);return t}function Sh(e){let t={};for(let n in e)t[n]=Ao(e[n]);return t}function ya(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function ba(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?ba(e.substring(0,e.length-1)):e.substr(~t+1)}var ms=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ur=class{static hasCaptures(e){return e===null?!1:(ms.lastIndex=0,ms.test(e))}static replaceCaptures(e,t,n){return e.replace(ms,(r,s,o,i)=>{let l=n[parseInt(s||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 r})}};function _a(e,t){return e<t?-1:e>t?1:0}function wa(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let s=0;s<n;s++){let o=_a(e[s],t[s]);if(o!==0)return o}return 0}return n-r}function ki(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 Ca(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var va=class{constructor(e){w(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){w(this,"_cachedMatchRoot",new va(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Eh(e),t)}static createFromParsedTheme(e,t){return Rh(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(s=>xh(e.parent,s.parentScopes));return r?new Sa(r.fontStyle,r.foreground,r.background):null}},ys=class wr{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new wr(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new wr(n,t[r]);return n}push(t){return new wr(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 r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function xh(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],s=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],s=!0}for(;e&&!kh(e.scopeName,r);){if(s)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function kh(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Sa=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Eh(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let s=0,o=t.length;s<o;s++){let i=t[s];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 h=0,d=f.length;h<d;h++)switch(f[h]){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"&&ki(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&ki(i.settings.background)&&(u=i.settings.background);for(let f=0,h=l.length;f<h;f++){let g=l[f].trim().split(" "),b=g[g.length-1],R=null;g.length>1&&(R=g.slice(0,g.length-1),R.reverse()),n[r++]=new Ah(b,R,s,a,c,u)}}return n}var Ah=class{constructor(e,t,n,r,s,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}},ve=(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))(ve||{});function Rh(e,t){e.sort((a,c)=>{let u=_a(a.scope,c.scope);return u!==0||(u=wa(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",s="#ffffff";for(;e.length>=1&&e[0].scope==="";){let a=e.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(s=a.background)}let o=new Ih(t),i=new Sa(n,o.getId(r),o.getId(s)),l=new Nh(new Us(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 Ih=class{constructor(e){w(this,"_isFrozen");w(this,"_lastColorId");w(this,"_id2color");w(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)}},$h=Object.freeze([]),Us=class xa{constructor(t,n,r,s,o){w(this,"scopeDepth");w(this,"parentScopes");w(this,"fontStyle");w(this,"foreground");w(this,"background");this.scopeDepth=t,this.parentScopes=n||$h,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new xa(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,s=t.length;r<s;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,s){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Nh=class Hs{constructor(t,n=[],r={}){w(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,s=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=t.parentScopes.length||s>=n.parentScopes.length);){const o=n.parentScopes[s].length-t.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),s,o;if(r===-1?(s=t,o=""):(s=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Hs._cmpBySpecificity),n}insert(t,n,r,s,o,i){if(n===""){this._doInsertHere(t,r,s,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 Hs(this._mainRule.clone(),Us.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,c,r,s,o,i)}_doInsertHere(t,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(t,r,s,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(wa(a.parentScopes,n)===0){a.acceptOverwrite(t,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Us(t,n,r,s,o))}},wn=class Ge{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Ge.getLanguageId(t),r=Ge.getTokenType(t),s=Ge.getFontStyle(t),o=Ge.getForeground(t),i=Ge.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:s,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,r,s,o,i,l){let a=Ge.getLanguageId(t),c=Ge.getTokenType(t),u=Ge.containsBalancedBrackets(t)?1:0,f=Ge.getFontStyle(t),h=Ge.getForeground(t),d=Ge.getBackground(t);return n!==0&&(a=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(f=o),i!==0&&(h=i),l!==0&&(d=l),(a<<0|c<<8|u<<10|f<<11|h<<15|d<<24)>>>0}};function Nr(e,t){const n=[],r=Ph(e);let s=r.next();for(;s!==null;){let a=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:a}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();const a=o();return c=>!!a&&!a(c)}if(s==="("){s=r.next();const a=l();return s===")"&&(s=r.next()),a}if(Ei(s)){const a=[];do a.push(s),s=r.next();while(Ei(s));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),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>a.some(f=>f(u))}}function Ei(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ph(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function ka(e){typeof e.dispose=="function"&&e.dispose()}var qn=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Th=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Oh=class{constructor(){w(this,"_references",[]);w(this,"_seenReferenceKeys",new Set);w(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))}},Mh=class{constructor(e,t){w(this,"seenFullScopeRequests",new Set);w(this,"seenPartialScopeRequests",new Set);w(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new qn(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Oh;for(const n of e)Lh(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof qn){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 Lh(e,t,n,r){const s=n.lookup(e.scopeName);if(!s){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof qn?Cr({baseGrammar:o,selfGrammar:s},r):Ws(e.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);const i=n.injections(e.scopeName);if(i)for(const l of i)r.add(new qn(l))}function Ws(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Pr([r],t,n)}}function Cr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Pr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Pr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Pr(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?ya({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Pr(r.patterns,{...t,repository:s},n);const o=r.include;if(!o)continue;const i=Ea(o);switch(i.kind){case 0:Cr({...t,selfGrammar:t.baseGrammar},n);break;case 1:Cr(t,n);break;case 2:Ws(i.ruleName,{...t,repository:s},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:s};i.kind===4?Ws(i.ruleName,a,n):Cr(a,n)}else i.kind===4?n.add(new Th(i.scopeName,i.ruleName)):n.add(new qn(i.scopeName));break}}}var Dh=class{constructor(){w(this,"kind",0)}},Fh=class{constructor(){w(this,"kind",1)}},jh=class{constructor(e){w(this,"kind",2);this.ruleName=e}},Gh=class{constructor(e){w(this,"kind",3);this.scopeName=e}},Bh=class{constructor(e,t){w(this,"kind",4);this.scopeName=e,this.ruleName=t}};function Ea(e){if(e==="$base")return new Dh;if(e==="$self")return new Fh;const t=e.indexOf("#");if(t===-1)return new Gh(e);if(t===0)return new jh(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new Bh(n,r)}}var Uh=/\\(\d+)/,Ai=/\\(\d+)/g,Hh=-1,Aa=-2;var nr=class{constructor(e,t,n,r){w(this,"$location");w(this,"id");w(this,"_nameIsCapturing");w(this,"_name");w(this,"_contentNameIsCapturing");w(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=ur.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=ur.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${ba(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:ur.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ur.replaceCaptures(this._contentName,e,t)}},Wh=class extends nr{constructor(t,n,r,s,o){super(t,n,r,s);w(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,r,s){throw new Error("Not supported!")}},zh=class extends nr{constructor(t,n,r,s,o){super(t,n,r,null);w(this,"_match");w(this,"captures");w(this,"_cachedCompiledPatterns");this._match=new Kn(s,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,r,s){return this._getCachedCompiledPatterns(t).compileAG(t,r,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Xn,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ri=class extends nr{constructor(t,n,r,s,o){super(t,n,r,s);w(this,"hasMissingPatterns");w(this,"patterns");w(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 r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,s){return this._getCachedCompiledPatterns(t).compileAG(t,r,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Xn,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zs=class extends nr{constructor(t,n,r,s,o,i,l,a,c,u){super(t,n,r,s);w(this,"_begin");w(this,"beginCaptures");w(this,"_end");w(this,"endHasBackReferences");w(this,"endCaptures");w(this,"applyEndPatternLast");w(this,"hasMissingPatterns");w(this,"patterns");w(this,"_cachedCompiledPatterns");this._begin=new Kn(o,this.id),this.beginCaptures=i,this._end=new Kn(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,r,s){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,s)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Xn;for(const r of this.patterns)t.getRule(r).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}},Tr=class extends nr{constructor(t,n,r,s,o,i,l,a,c){super(t,n,r,s);w(this,"_begin");w(this,"beginCaptures");w(this,"whileCaptures");w(this,"_while");w(this,"whileHasBackReferences");w(this,"hasMissingPatterns");w(this,"patterns");w(this,"_cachedCompiledPatterns");w(this,"_cachedCompiledWhilePatterns");this._begin=new Kn(o,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new Kn(l,Aa),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,r,s){return this._getCachedCompiledPatterns(t).compileAG(t,r,s)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Xn;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,r,s){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,s)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Xn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},Ra=class we{static createCaptureRule(t,n,r,s,o){return t.registerRule(i=>new Wh(n,i,r,s,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(s=>{if(t.id=s,t.match)return new zh(t.$vscodeTextmateLocation,t.id,t.name,t.match,we._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=ya({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Ri(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,we._compilePatterns(o,n,r))}return t.while?new Tr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,we._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,we._compileCaptures(t.whileCaptures||t.captures,n,r),we._compilePatterns(t.patterns,n,r)):new zs(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,we._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,we._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,we._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let s=[];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++)s[i]=null;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;t[i].patterns&&(a=we.getCompiledRuleId(t[i],n,r)),s[l]=we.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return s}static _compilePatterns(t,n,r){let s=[];if(t)for(let o=0,i=t.length;o<i;o++){const l=t[o];let a=-1;if(l.include){const c=Ea(l.include);switch(c.kind){case 0:case 1:a=we.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=we.getCompiledRuleId(u,n,r));break;case 3:case 4:const f=c.scopeName,h=c.kind===4?c.ruleName:null,d=n.getExternalGrammar(f,r);if(d)if(h){let g=d.repository[h];g&&(a=we.getCompiledRuleId(g,n,d.repository))}else a=we.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else a=we.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof Ri||c instanceof zs||c instanceof Tr)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(a)}}return{patterns:s,hasMissingPatterns:(t?t.length:0)!==s.length}}},Kn=class Ia{constructor(t,n){w(this,"source");w(this,"ruleId");w(this,"hasAnchor");w(this,"hasBackReferences");w(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let s=0,o=[],i=!1;for(let l=0;l<r;l++)if(t.charAt(l)==="\\"&&l+1<r){const c=t.charAt(l+1);c==="z"?(o.push(t.substring(s,l)),o.push("$(?!\\n)(?<!\\n)"),s=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,s===0?this.source=t:(o.push(t.substring(s,r)),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=Uh.test(this.source):this.hasBackReferences=!1}clone(){return new Ia(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 r=n.map(s=>t.substring(s.start,s.end));return Ai.lastIndex=0,this.source.replace(Ai,(s,o)=>Ca(r[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=[],r=[],s=[],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,r[o]=l,s[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",s[o+1]="A"):a==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",s[o+1]="G"):(t[o+1]=a,n[o+1]=a,r[o+1]=a,s[o+1]=a),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.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}},Xn=class{constructor(){w(this,"_items");w(this,"_hasAnchors");w(this,"_cached");w(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 Ii(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 r=this._items.map(s=>s.resolveAnchors(t,n));return new Ii(e,r,this._items.map(s=>s.ruleId))}},Ii=class{constructor(e,t,n){w(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(`
18
- `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},bs=class{constructor(e,t){this.languageId=e,this.tokenType=t}},wt,Vh=(wt=class{constructor(t,n){w(this,"_defaultAttributes");w(this,"_embeddedLanguagesMatcher");w(this,"_getBasicScopeAttributes",new va(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new bs(n,r)}));this._defaultAttributes=new bs(t,8),this._embeddedLanguagesMatcher=new qh(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?wt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(wt.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!")}},w(wt,"_NULL_SCOPE_METADATA",new bs(0,0)),w(wt,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),wt),qh=class{constructor(e){w(this,"values");w(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Ca(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])}},$i=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function $a(e,t,n,r,s,o,i,l){const a=t.content.length;let c=!1,u=-1;if(i){const d=Kh(e,t,n,r,s,o);s=d.stack,r=d.linePos,n=d.isFirstLine,u=d.anchorPosition}const f=Date.now();for(;!c;){if(l!==0&&Date.now()-f>l)return new $i(s,!0);h()}return new $i(s,!1);function h(){const d=Xh(e,t,n,r,s,u);if(!d){o.produce(s,a),c=!0;return}const g=d.captureIndices,b=d.matchedRuleId,R=g&&g.length>0?g[0].end>r:!1;if(b===Hh){const S=s.getRule(e);o.produce(s,g[0].start),s=s.withContentNameScopesList(s.nameScopesList),Pn(e,t,n,s,o,S.endCaptures,g),o.produce(s,g[0].end);const C=s;if(s=s.parent,u=C.getAnchorPos(),!R&&C.getEnterPos()===r){s=C,o.produce(s,a),c=!0;return}}else{const S=e.getRule(b);o.produce(s,g[0].start);const C=s,y=S.getName(t.content,g),v=s.contentNameScopesList.pushAttributed(y,e);if(s=s.push(b,r,u,g[0].end===a,null,v,v),S instanceof zs){const T=S;Pn(e,t,n,s,o,T.beginCaptures,g),o.produce(s,g[0].end),u=g[0].end;const q=T.getContentName(t.content,g),j=v.pushAttributed(q,e);if(s=s.withContentNameScopesList(j),T.endHasBackReferences&&(s=s.withEndRule(T.getEndWithResolvedBackReferences(t.content,g))),!R&&C.hasSameRuleAs(s)){s=s.pop(),o.produce(s,a),c=!0;return}}else if(S instanceof Tr){const T=S;Pn(e,t,n,s,o,T.beginCaptures,g),o.produce(s,g[0].end),u=g[0].end;const q=T.getContentName(t.content,g),j=v.pushAttributed(q,e);if(s=s.withContentNameScopesList(j),T.whileHasBackReferences&&(s=s.withEndRule(T.getWhileWithResolvedBackReferences(t.content,g))),!R&&C.hasSameRuleAs(s)){s=s.pop(),o.produce(s,a),c=!0;return}}else if(Pn(e,t,n,s,o,S.captures,g),o.produce(s,g[0].end),s=s.pop(),!R){s=s.safePop(),o.produce(s,a),c=!0;return}}g[0].end>r&&(r=g[0].end,n=!1)}}function Kh(e,t,n,r,s,o){let i=s.beginRuleCapturedEOL?0:-1;const l=[];for(let a=s;a;a=a.pop()){const c=a.getRule(e);c instanceof Tr&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=Zh(a.rule,e,a.stack.endRule,n,r===i),f=c.findNextMatchSync(t,r,u);if(f){if(f.ruleId!==Aa){s=a.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(o.produce(a.stack,f.captureIndices[0].start),Pn(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>r&&(r=f.captureIndices[0].end,n=!1))}else{s=a.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:i,isFirstLine:n}}function Xh(e,t,n,r,s,o){const i=Jh(e,t,n,r,s,o),l=e.getInjections();if(l.length===0)return i;const a=Yh(l,e,t,n,r,s,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 Jh(e,t,n,r,s,o){const i=s.getRule(e),{ruleScanner:l,findOptions:a}=Na(i,e,s.endRule,n,r===o),c=l.findNextMatchSync(t,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Yh(e,t,n,r,s,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const f=o.contentNameScopesList.getScopeNames();for(let h=0,d=e.length;h<d;h++){const g=e[h];if(!g.matcher(f))continue;const b=t.getRule(g.ruleId),{ruleScanner:R,findOptions:S}=Na(b,t,null,r,s===i),C=R.findNextMatchSync(n,s,S);if(!C)continue;const y=C.captureIndices[0].start;if(!(y>=l)&&(l=y,a=C.captureIndices,c=C.ruleId,u=g.priority,l===s))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function Na(e,t,n,r,s){return{ruleScanner:e.compileAG(t,n,r,s),findOptions:0}}function Zh(e,t,n,r,s){return{ruleScanner:e.compileWhileAG(t,n,r,s),findOptions:0}}function Pn(e,t,n,r,s,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 h=o[f];if(h===null)continue;const d=i[f];if(d.length===0)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?s.produceFromScopes(c[c.length-1].scopes,d.start):s.produce(r,d.start),h.retokenizeCapturedWithRuleId){const b=h.getName(l,i),R=r.contentNameScopesList.pushAttributed(b,e),S=h.getContentName(l,i),C=R.pushAttributed(S,e),y=r.push(h.retokenizeCapturedWithRuleId,d.start,-1,!1,null,R,C),v=e.createOnigString(l.substring(0,d.end));$a(e,v,n&&d.start===0,d.start,y,s,!1,0),ka(v);continue}const g=h.getName(l,i);if(g!==null){const R=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);c.push(new Qh(R,d.end))}}for(;c.length>0;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Qh=class{constructor(e,t){w(this,"scopes");w(this,"endPos");this.scopes=e,this.endPos=t}};function ed(e,t,n,r,s,o,i,l){return new nd(e,t,n,r,s,o,i,l)}function Ni(e,t,n,r,s){const o=Nr(t,Or),i=Ra.getCompiledRuleId(n,r,s.repository);for(const l of o)e.push({debugSelector:t,matcher:l.matcher,ruleId:i,grammar:s,priority:l.priority})}function Or(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let s=n;s<t.length;s++)if(td(t[s],r))return n=s+1,!0;return!1})}function td(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 nd=class{constructor(e,t,n,r,s,o,i,l){w(this,"_rootId");w(this,"_lastRuleId");w(this,"_ruleId2desc");w(this,"_includedGrammars");w(this,"_grammarRepository");w(this,"_grammar");w(this,"_injections");w(this,"_basicScopeAttributesProvider");w(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new Vh(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=Pi(t,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const a of Object.keys(s)){const c=Nr(a,Or);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[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:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const s=r.injections;if(s)for(let i in s)Ni(t,i,s[i],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(i=>{const l=this.getExternalGrammar(i);if(l){const a=l.injectionSelector;a&&Ni(t,a,l,this,l)}})}return t.sort((s,o)=>s.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]=Pi(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Ra.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!t||t===Vs.NULL){s=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),f=wn.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),h=this.getRule(this._rootId).getName(null,null);let d;h?d=Gn.createRootAndLookUpScopeName(h,f,this):d=Gn.createRoot("unknown",f),t=new Vs(null,this._rootId,-1,-1,!1,null,d,d)}else s=!1,t.reset();e=e+`
19
- `;const o=this.createOnigString(e),i=o.content.length,l=new sd(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=$a(this,o,s,0,t,l,!0,r);return ka(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Pi(e,t){return e=Ch(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 Gn=class rt{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,s=(t==null?void 0:t.scopePath)??null;for(const o of n)s=ys.push(s,o.scopeNames),r=new rt(r,s,o.encodedTokenAttributes);return r}static createRoot(t,n){return new rt(null,new ys(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const s=r.getMetadataForScope(t),o=new ys(null,t),i=r.themeProvider.themeMatch(o),l=rt.mergeAttributes(n,s,i);return new rt(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return rt.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,r){let s=-1,o=0,i=0;return r!==null&&(s=r.fontStyle,o=r.foregroundId,i=r.backgroundId),wn.set(t,n.languageId,n.tokenType,null,s,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return rt._pushAttributed(this,t,n);const r=t.split(/ /g);let s=this;for(const o of r)s=rt._pushAttributed(s,o,n);return s}static _pushAttributed(t,n,r){const s=r.getMetadataForScope(n),o=t.scopePath.push(n),i=r.themeProvider.themeMatch(o),l=rt.mergeAttributes(t.tokenAttributes,s,i);return new rt(t,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var s;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((s=r.parent)==null?void 0:s.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},Be,Vs=(Be=class{constructor(t,n,r,s,o,i,l,a){w(this,"_stackElementBrand");w(this,"_enterPos");w(this,"_anchorPos");w(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=r,this._anchorPos=s}equals(t){return t===null?!1:Be._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Gn.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(){Be._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,s,o,i,l){return new Be(this,t,n,r,s,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 r,s;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(s=this.contentNameScopesList)==null?void 0:s.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 Be(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,r;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:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=Gn.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new Be(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Gn.fromExtension(r,n.contentNameScopesList))}},w(Be,"NULL",new Be(null,0,0,0,!1,null,null,null)),Be),rd=class{constructor(e,t){w(this,"balancedBracketScopes");w(this,"unbalancedBracketScopes");w(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Nr(n,Or).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Nr(n,Or).map(r=>r.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}},sd=class{constructor(e,t,n,r){w(this,"_emitBinaryTokens");w(this,"_lineText");w(this,"_tokens");w(this,"_binaryTokens");w(this,"_lastTokenEndIndex");w(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,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 r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let s=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((r=this.balancedBracketSelectors)!=null&&r.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)&&(s=wn.set(s,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(s=wn.set(s,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(s),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 r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},od=class{constructor(e,t){w(this,"_grammars",new Map);w(this,"_rawGrammars",new Map);w(this,"_injectionGrammars",new Map);w(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,r,s){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,ed(e,o,t,n,r,s,this,this._onigLib))}return this._grammars.get(e)}},id=class{constructor(t){w(this,"_options");w(this,"_syncRegistry");w(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new od($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,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new rd(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,s,o){const i=new Mh(this._syncRegistry,t);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(t,n,r,s,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 r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,s=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,s)}_grammarForScopeName(t,n=0,r=null,s=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,s,o)}},qs=Vs.NULL;const ld=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class rr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}rr.prototype.normal={};rr.prototype.property={};rr.prototype.space=void 0;function Pa(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new rr(n,r,t)}function Ks(e){return e.toLowerCase()}class Me{constructor(t,n){this.attribute=n,this.property=t}}Me.prototype.attribute="";Me.prototype.booleanish=!1;Me.prototype.boolean=!1;Me.prototype.commaOrSpaceSeparated=!1;Me.prototype.commaSeparated=!1;Me.prototype.defined=!1;Me.prototype.mustUseProperty=!1;Me.prototype.number=!1;Me.prototype.overloadedBoolean=!1;Me.prototype.property="";Me.prototype.spaceSeparated=!1;Me.prototype.space=void 0;let ad=0;const z=tn(),fe=tn(),Xs=tn(),I=tn(),re=tn(),mn=tn(),Fe=tn();function tn(){return 2**++ad}const Js=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:fe,commaOrSpaceSeparated:Fe,commaSeparated:mn,number:I,overloadedBoolean:Xs,spaceSeparated:re},Symbol.toStringTag,{value:"Module"})),_s=Object.keys(Js);class Ro extends Me{constructor(t,n,r,s){let o=-1;if(super(t,n),Ti(this,"space",s),typeof r=="number")for(;++o<_s.length;){const i=_s[o];Ti(this,_s[o],(r&Js[i])===Js[i])}}}Ro.prototype.defined=!0;function Ti(e,t,n){n&&(e[t]=n)}function Cn(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const o=new Ro(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Ks(r)]=r,n[Ks(o.attribute)]=r}return new rr(t,n,e.space)}const Ta=Cn({properties:{ariaActiveDescendant:null,ariaAtomic:fe,ariaAutoComplete:null,ariaBusy:fe,ariaChecked:fe,ariaColCount:I,ariaColIndex:I,ariaColSpan:I,ariaControls:re,ariaCurrent:null,ariaDescribedBy:re,ariaDetails:null,ariaDisabled:fe,ariaDropEffect:re,ariaErrorMessage:null,ariaExpanded:fe,ariaFlowTo:re,ariaGrabbed:fe,ariaHasPopup:null,ariaHidden:fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:re,ariaLevel:I,ariaLive:null,ariaModal:fe,ariaMultiLine:fe,ariaMultiSelectable:fe,ariaOrientation:null,ariaOwns:re,ariaPlaceholder:null,ariaPosInSet:I,ariaPressed:fe,ariaReadOnly:fe,ariaRelevant:null,ariaRequired:fe,ariaRoleDescription:re,ariaRowCount:I,ariaRowIndex:I,ariaRowSpan:I,ariaSelected:fe,ariaSetSize:I,ariaSort:null,ariaValueMax:I,ariaValueMin:I,ariaValueNow:I,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Oa(e,t){return t in e?e[t]:t}function Ma(e,t){return Oa(e,t.toLowerCase())}const cd=Cn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:mn,acceptCharset:re,accessKey:re,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:re,autoFocus:z,autoPlay:z,blocking:re,capture:null,charSet:null,checked:z,cite:null,className:re,cols:I,colSpan:null,content:null,contentEditable:fe,controls:z,controlsList:re,coords:I|mn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:Xs,draggable:fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:re,height:I,hidden:Xs,high:I,href:null,hrefLang:null,htmlFor:re,httpEquiv:re,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:re,itemRef:re,itemScope:z,itemType:re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:I,manifest:null,max:null,maxLength:I,media:null,method:null,min:null,minLength:I,multiple:z,muted:z,name:null,nonce:null,noModule:z,noValidate:z,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:z,optimum:I,pattern:null,ping:re,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:re,required:z,reversed:z,rows:I,rowSpan:I,sandbox:re,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shape:null,size:I,sizes:null,slot:null,span:I,spellCheck:fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:I,step:null,style:null,tabIndex:I,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:fe,width:I,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:re,axis:null,background:null,bgColor:null,border:I,borderColor:null,bottomMargin:I,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z,declare:z,event:null,face:null,frame:null,frameBorder:null,hSpace:I,leftMargin:I,link:null,longDesc:null,lowSrc:null,marginHeight:I,marginWidth:I,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:I,rules:null,scheme:null,scrolling:fe,standby:null,summary:null,text:null,topMargin:I,valueType:null,version:null,vAlign:null,vLink:null,vSpace:I,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:z,disableRemotePlayback:z,prefix:null,property:null,results:I,security:null,unselectable:null},space:"html",transform:Ma}),ud=Cn({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:Fe,accentHeight:I,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:I,amplitude:I,arabicForm:null,ascent:I,attributeName:null,attributeType:null,azimuth:I,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:I,by:null,calcMode:null,capHeight:I,className:re,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:I,diffuseConstant:I,direction:null,display:null,dur:null,divisor:I,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:I,enableBackground:null,end:null,event:null,exponent:I,externalResourcesRequired:null,fill:null,fillOpacity:I,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:mn,g2:mn,glyphName:mn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:I,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:I,horizOriginX:I,horizOriginY:I,id:null,ideographic:I,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:I,k:I,k1:I,k2:I,k3:I,k4:I,kernelMatrix:Fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:I,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:I,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:I,overlineThickness:I,paintOrder:null,panose1:null,path:null,pathLength:I,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:I,pointsAtY:I,pointsAtZ:I,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Fe,rev:Fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Fe,requiredFeatures:Fe,requiredFonts:Fe,requiredFormats:Fe,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:I,specularExponent:I,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:I,strikethroughThickness:I,string:null,stroke:null,strokeDashArray:Fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:I,strokeOpacity:I,strokeWidth:null,style:null,surfaceScale:I,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Fe,tabIndex:I,tableValues:null,target:null,targetX:I,targetY:I,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:I,underlineThickness:I,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:I,values:null,vAlphabetic:I,vMathematical:I,vectorEffect:null,vHanging:I,vIdeographic:I,version:null,vertAdvY:I,vertOriginX:I,vertOriginY:I,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:I,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Oa}),La=Cn({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()}}),Da=Cn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ma}),Fa=Cn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fd=/[A-Z]/g,Oi=/-[a-z]/g,hd=/^data[-\w.:]+$/i;function dd(e,t){const n=Ks(t);let r=t,s=Me;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hd.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Oi,gd);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Oi.test(o)){let i=o.replace(fd,pd);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}s=Ro}return new s(r,t)}function pd(e){return"-"+e.toLowerCase()}function gd(e){return e.charAt(1).toUpperCase()}const md=Pa([Ta,cd,La,Da,Fa],"html"),ja=Pa([Ta,ud,La,Da,Fa],"svg"),Mi={}.hasOwnProperty;function yd(e,t){const n=t||{};function r(s,...o){let i=r.invalid;const l=r.handlers;if(s&&Mi.call(s,e)){const a=String(s[e]);i=Mi.call(l,a)?l[a]:r.unknown}if(i)return i.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const bd=/["&'<>`]/g,_d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wd=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Cd=/[|\\{}()[\]^$+*?.]/g,Li=new WeakMap;function vd(e,t){if(e=e.replace(t.subset?Sd(t.subset):bd,r),t.subset||t.escapeOnly)return e;return e.replace(_d,n).replace(wd,r);function n(s,o,i){return t.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),t)}function r(s,o,i){return t.format(s.charCodeAt(0),i.charCodeAt(o+1),t)}}function Sd(e){let t=Li.get(e);return t||(t=xd(e),Li.set(e,t)),t}function xd(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Cd,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const kd=/[\dA-Fa-f]/;function Ed(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!kd.test(String.fromCharCode(t))?r:r+";"}const Ad=/\d/;function Rd(e,t,n){const r="&#"+String(e);return n&&t&&!Ad.test(String.fromCharCode(t))?r:r+";"}const Id=["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"],ws={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:"€"},$d=["cent","copy","divide","gt","lt","not","para","times"],Ga={}.hasOwnProperty,Ys={};let fr;for(fr in ws)Ga.call(ws,fr)&&(Ys[ws[fr]]=fr);const Nd=/[^\dA-Za-z]/;function Pd(e,t,n,r){const s=String.fromCharCode(e);if(Ga.call(Ys,s)){const o=Ys[s],i="&"+o;return n&&Id.includes(o)&&!$d.includes(o)&&(!r||t&&t!==61&&Nd.test(String.fromCharCode(t)))?i:i+";"}return""}function Td(e,t,n){let r=Ed(e,t,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=Pd(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const o=Rd(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function yn(e,t){return vd(e,Object.assign({format:Td},t))}const Od=/^>|^->|<!--|-->|--!>|<!-$/g,Md=[">"],Ld=["<",">"];function Dd(e,t,n,r){return r.settings.bogusComments?"<?"+yn(e.value,Object.assign({},r.settings.characterReferences,{subset:Md}))+">":"<!--"+e.value.replace(Od,s)+"-->";function s(o){return yn(o,Object.assign({},r.settings.characterReferences,{subset:Ld}))}}function Fd(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Di(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function jd(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Gd(e){return e.join(" ").trim()}const Bd=/[ \t\n\f\r]/g;function Io(e){return typeof e=="object"?e.type==="text"?Fi(e.value):!1:Fi(e)}function Fi(e){return e.replace(Bd,"")===""}const me=Ua(1),Ba=Ua(-1),Ud=[];function Ua(e){return t;function t(n,r,s){const o=n?n.children:Ud;let i=(r||0)+e,l=o[i];if(!s)for(;l&&Io(l);)i+=e,l=o[i];return l}}const Hd={}.hasOwnProperty;function Ha(e){return t;function t(n,r,s){return Hd.call(e,n.tagName)&&e[n.tagName](n,r,s)}}const $o=Ha({body:zd,caption:Cs,colgroup:Cs,dd:Xd,dt:Kd,head:Cs,html:Wd,li:qd,optgroup:Jd,option:Yd,p:Vd,rp:ji,rt:ji,tbody:Qd,td:Gi,tfoot:ep,th:Gi,thead:Zd,tr:tp});function Cs(e,t,n){const r=me(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Io(r.value.charAt(0)))}function Wd(e,t,n){const r=me(n,t);return!r||r.type!=="comment"}function zd(e,t,n){const r=me(n,t);return!r||r.type!=="comment"}function Vd(e,t,n){const r=me(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.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 qd(e,t,n){const r=me(n,t);return!r||r.type==="element"&&r.tagName==="li"}function Kd(e,t,n){const r=me(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Xd(e,t,n){const r=me(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ji(e,t,n){const r=me(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Jd(e,t,n){const r=me(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function Yd(e,t,n){const r=me(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Zd(e,t,n){const r=me(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Qd(e,t,n){const r=me(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function ep(e,t,n){return!me(n,t)}function tp(e,t,n){const r=me(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Gi(e,t,n){const r=me(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const np=Ha({body:op,colgroup:ip,head:sp,html:rp,tbody:lp});function rp(e){const t=me(e,-1);return!t||t.type!=="comment"}function sp(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function op(e){const t=me(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Io(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function ip(e,t,n){const r=Ba(n,t),s=me(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&$o(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function lp(e,t,n){const r=Ba(n,t),s=me(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&$o(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const hr={name:[[`
20
- \f\r &/=>`.split(""),`
21
- \f\r "&'/=>\``.split("")],[`\0
22
- \f\r "&'/<=>`.split(""),`\0
23
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
24
- \f\r &>`.split(""),`\0
25
- \f\r "&'<=>\``.split("")],[`\0
26
- \f\r "&'<=>\``.split(""),`\0
27
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function ap(e,t,n,r){const s=r.schema,o=s.space==="svg"?!1:r.settings.omitOptionalTags;let i=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const l=[];let a;s.space==="html"&&e.tagName==="svg"&&(r.schema=ja);const c=cp(r,e.properties),u=r.all(s.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=s,u&&(i=!1),(c||!o||!np(e,t,n))&&(l.push("<",e.tagName,c?" "+c:""),i&&(s.space==="svg"||r.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!i&&(!o||!$o(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function cp(e,t){const n=[];let r=-1,s;if(t){for(s in t)if(t[s]!==null&&t[s]!==void 0){const o=up(e,s,t[s]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function up(e,t,n){const r=dd(e.schema,t),s=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let i=e.quote,l;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=yn(r.attribute,Object.assign({},e.settings.characterReferences,{subset:hr.name[s][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?jd:Gd)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(l=yn(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:hr.unquoted[s][o]}))),l!==n&&(e.settings.quoteSmart&&Di(n,i)>Di(n,e.alternative)&&(i=e.alternative),l=i+yn(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?hr.single:hr.double)[s][o],attribute:!0}))+i),a+(l&&"="+l))}const fp=["<","&"];function Wa(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:yn(e.value,Object.assign({},r.settings.characterReferences,{subset:fp}))}function hp(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Wa(e,t,n,r)}function dp(e,t,n,r){return r.all(e)}const pp=yd("type",{invalid:gp,unknown:mp,handlers:{comment:Dd,doctype:Fd,element:ap,raw:hp,root:dp,text:Wa}});function gp(e){throw new Error("Expected node, not `"+e+"`")}function mp(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const yp={},bp={},_p=[];function wp(e,t){const n=t||yp,r=n.quote||'"',s=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Cp,all:vp,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||ld,characterReferences:n.characterReferences||bp,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?ja:md,quote:r,alternative:s}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Cp(e,t,n){return pp(e,t,n,this)}function vp(e){const t=[],n=e&&e.children||_p;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Mr(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[s,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[s]=o:s===r&&Object.assign(n,o);return n}function Ot(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function Sp(e){return Array.isArray(e)?e:[e]}async function za(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function No(e){return!e||["plaintext","txt","text","plain"].includes(e)}function xp(e){return e==="ansi"||No(e)}function Po(e){return e==="none"}function kp(e){return Po(e)}function Va(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.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 s of n)s&&!e.properties.class.includes(s)&&e.properties.class.push(s);return e}function Jr(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const s=[];for(let i=0;i<n.length;i+=2){const l=t?n[i]+(n[i+1]||""):n[i];s.push([l,r]),r+=n[i].length,r+=((o=n[i+1])==null?void 0:o.length)||0}return s}function Ep(e){const t=Jr(e,!0).map(([s])=>s);function n(s){if(s===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=s,i=0;for(const l of t){if(o<l.length)break;o-=l.length,i++}return{line:i,character:o}}function r(s,o){let i=0;for(let l=0;l<s;l++)i+=t[l].length;return i+=o,i}return{lines:t,indexToPos:n,posToIndex:r}}const To="light-dark()",Ap=["color","background-color"];function Rp(e,t){let n=0;const r=[];for(const s of t)s>n&&r.push({...e,content:e.content.slice(n,s),offset:e.offset+n}),n=s;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Ip(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,s)=>r-s);return n.length?e.map(r=>r.flatMap(s=>{const o=n.filter(i=>s.offset<i&&i<s.offset+s.content.length).map(i=>i-s.offset).sort((i,l)=>i-l);return o.length?Rp(s,o):s})):e}function $p(e,t,n,r,s="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},i=t.map(u=>Lr(e.variants[u])),l=new Set(i.flatMap(u=>Object.keys(u))),a={},c=(u,f)=>{const h=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+t[u]+(f==="color"?"":h)};return i.forEach((u,f)=>{for(const h of l){const d=u[h]||"inherit";if(f===0&&r&&Ap.includes(h))if(r===To&&i.length>1){const g=t.findIndex(C=>C==="light"),b=t.findIndex(C=>C==="dark");if(g===-1||b===-1)throw new ye('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const R=i[g][h]||"inherit",S=i[b][h]||"inherit";a[h]=`light-dark(${R}, ${S})`,s==="css-vars"&&(a[c(f,h)]=d)}else a[h]=d;else s==="css-vars"&&(a[c(f,h)]=d)}}),o.htmlStyle=a,o}function Lr(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&ve.Italic&&(t["font-style"]="italic"),e.fontStyle&ve.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&ve.Underline&&n.push("underline"),e.fontStyle&ve.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Zs(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const qa=new WeakMap;function Yr(e,t){qa.set(e,t)}function Jn(e){return qa.get(e)}class vn{constructor(...t){w(this,"_stacks",{});w(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,s]=t;this.lang=r,this._stacks={[s]: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 vn(Object.fromEntries(Sp(n).map(r=>[r,qs])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Np(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Np(e){const t=[],n=new Set;function r(s){var i;if(n.has(s))return;n.add(s);const o=(i=s==null?void 0:s.nameScopesList)==null?void 0:i.scopeName;o&&t.push(o),s.parent&&r(s.parent)}return r(e),t}function Pp(e,t){if(!(e instanceof vn))throw new ye("Invalid grammar state");return e.getInternalStack(t)}function Tp(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new ye(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...s.indexToPos(i),offset:i}}else{const l=s.lines[i.line];if(l===void 0)throw new ye(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${s.lines.length}`);let a=i.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new ye(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${l.length}`);return{...i,character:a,offset:s.posToIndex(i.line,a)}}};const s=Ep(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:r(i.start),end:r(i.end)}));Op(o),e.set(n.meta,{decorations:o,converter:s,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 s=t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return Ip(n,s)},code(n){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const r=t(this),s=Array.from(n.children).filter(f=>f.type==="element"&&f.tagName==="span");if(s.length!==r.converter.lines.length)throw new ye(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(f,h,d,g){const b=s[f];let R="",S=-1,C=-1;if(h===0&&(S=0),d===0&&(C=0),d===Number.POSITIVE_INFINITY&&(C=b.children.length),S===-1||C===-1)for(let v=0;v<b.children.length;v++)R+=Ka(b.children[v]),S===-1&&R.length===h&&(S=v+1),C===-1&&R.length===d&&(C=v+1);if(S===-1)throw new ye(`Failed to find start index for decoration ${JSON.stringify(g.start)}`);if(C===-1)throw new ye(`Failed to find end index for decoration ${JSON.stringify(g.end)}`);const y=b.children.slice(S,C);if(!g.alwaysWrap&&y.length===b.children.length)l(b,g,"line");else if(!g.alwaysWrap&&y.length===1&&y[0].type==="element")l(y[0],g,"token");else{const v={type:"element",tagName:"span",properties:{},children:y};l(v,g,"wrapper"),b.children.splice(S,y.length,v)}}function i(f,h){s[f]=l(s[f],h,"line")}function l(f,h,d){var R;const g=h.properties||{},b=h.transform||(S=>S);return f.tagName=h.tagName||"span",f.properties={...f.properties,...g,class:f.properties.class},(R=h.properties)!=null&&R.class&&Va(f,h.properties.class),f=b(f,d)||f,f}const a=[],c=r.decorations.sort((f,h)=>h.start.offset-f.start.offset||f.end.offset-h.end.offset);for(const f of c){const{start:h,end:d}=f;if(h.line===d.line)o(h.line,h.character,d.character,f);else if(h.line<d.line){o(h.line,h.character,Number.POSITIVE_INFINITY,f);for(let g=h.line+1;g<d.line;g++)a.unshift(()=>i(g,f));o(d.line,0,d.character,f)}}a.forEach(f=>f())}}}function Op(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new ye(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const s=e[r],o=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,i=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,l=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,a=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(o||i||l||a){if(o&&i||l&&a||l&&n.start.offset===n.end.offset||i&&s.start.offset===s.end.offset)continue;throw new ye(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function Ka(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Ka).join(""):""}const Mp=[Tp()];function Dr(e){const t=Lp(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Mp]}function Lp(e){const t=[],n=[],r=[];for(const s of e)switch(s.enforce){case"pre":t.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:t,post:n,normal:r}}var qt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],vs={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Dp(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function Bi(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function Fp(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)vs[r]&&t.push({type:"setDecoration",value:vs[r]});else if(r<=29){const s=vs[r-20];s&&(t.push({type:"resetDecoration",value:s}),s==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:qt[r-30]}});else if(r===38){const s=Bi(e);s&&t.push({type:"setForegroundColor",value:s})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:qt[r-40]}});else if(r===48){const s=Bi(e);s&&t.push({type:"setBackgroundColor",value:s})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:qt[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:qt[r-100+8]}})}return t}function jp(){let e=null,t=null,n=new Set;return{parse(r){const s=[];let o=0;do{const i=Dp(r,o),l=i.sequence?r.substring(o,i.startPosition):r.substring(o);if(l.length>0&&s.push({value:l,foreground:e,background:t,decorations:new Set(n)}),i.sequence){const a=Fp(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<r.length);return s}}}var Gp={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 Bp(e=Gp){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 r;function s(){if(r)return r;r=[];for(let c=0;c<qt.length;c++)r.push(t(qt[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++)r.push(n([l[c],l[u],l[f]]));let a=8;for(let c=0;c<24;c++,a+=10)r.push(n([a,a,a]));return r}function o(l){return s()[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 Up={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 Hp(e,t,n){const r=Mr(e,n),s=Jr(t),o=Object.fromEntries(qt.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||Up[a]]})),i=Bp(o),l=jp();return s.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=Ot(u,r),f=Ot(f,r),c.decorations.has("dim")&&(u=Wp(u));let h=ve.None;return c.decorations.has("bold")&&(h|=ve.Bold),c.decorations.has("italic")&&(h|=ve.Italic),c.decorations.has("underline")&&(h|=ve.Underline),c.decorations.has("strikethrough")&&(h|=ve.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:f,fontStyle:h}}))}function Wp(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const s=r[0],o=r[1],i=r[2],l=r[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${s}${s}${o}${o}${i}${i}${a}`}else if(r.length===3){const s=r[0],o=r[1],i=r[2];return`#${s}${s}${o}${o}${i}${i}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Oo(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,s=e.resolveLangAlias(n.lang||"text");if(No(s)||Po(r))return Jr(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:i}=e.setTheme(r);if(s==="ansi")return Hp(o,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new ye(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new ye(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return Vp(t,l,o,i,n)}function zp(...e){if(e.length===2)return Jn(e[1]);const[t,n,r={}]=e,{lang:s="text",theme:o=t.getLoadedThemes()[0]}=r;if(No(s)||Po(o))throw new ye("Plain language does not have grammar state");if(s==="ansi")throw new ye("ANSI language does not have grammar state");const{theme:i,colorMap:l}=t.setTheme(o),a=t.getLanguage(s);return new vn(Mo(n,a,i,l,r).stateStack,a.name,i.name)}function Vp(e,t,n,r,s){const o=Mo(e,t,n,r,s),i=new vn(o.stateStack,t.name,n.name);return Yr(o.tokens,i),o.tokens}function Mo(e,t,n,r,s){const o=Mr(n,s),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500}=s,a=Jr(e);let c=s.grammarState?Pp(s.grammarState,n.name)??qs:s.grammarContextCode!=null?Mo(s.grammarContextCode,t,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:qs,u=[];const f=[];for(let h=0,d=a.length;h<d;h++){const[g,b]=a[h];if(g===""){u=[],f.push([]);continue}if(i>0&&g.length>=i){u=[],f.push([{content:g,offset:b,color:"",fontStyle:0}]);continue}let R,S,C;s.includeExplanation&&(R=t.tokenizeLine(g,c,l),S=R.tokens,C=0);const y=t.tokenizeLine2(g,c,l),v=y.tokens.length/2;for(let T=0;T<v;T++){const q=y.tokens[2*T],j=T+1<v?y.tokens[2*T+2]:g.length;if(q===j)continue;const K=y.tokens[2*T+1],ie=Ot(r[wn.getForeground(K)],o),ae=wn.getFontStyle(K),Ie={content:g.substring(q,j),offset:b+q,color:ie,fontStyle:ae};if(s.includeExplanation){const _e=[];if(s.includeExplanation!=="scopeName")for(const Le of n.settings){let ht;switch(typeof Le.scope){case"string":ht=Le.scope.split(/,/).map(de=>de.trim());break;case"object":ht=Le.scope;break;default:continue}_e.push({settings:Le,selectors:ht.map(de=>de.split(/ /))})}Ie.explanation=[];let Ft=0;for(;q+Ft<j;){const Le=S[C],ht=g.substring(Le.startIndex,Le.endIndex);Ft+=ht.length,Ie.explanation.push({content:ht,scopes:s.includeExplanation==="scopeName"?qp(Le.scopes):Kp(_e,Le.scopes)}),C+=1}}u.push(Ie)}f.push(u),u=[],c=y.ruleStack}return{tokens:f,stateStack:c}}function qp(e){return e.map(t=>({scopeName:t}))}function Kp(e,t){const n=[];for(let r=0,s=t.length;r<s;r++){const o=t[r];n[r]={scopeName:o,themeMatches:Jp(e,o,t.slice(0,r))}}return n}function Ui(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Xp(e,t,n){if(!Ui(e[e.length-1],t))return!1;let r=e.length-2,s=n.length-1;for(;r>=0&&s>=0;)Ui(e[r],n[s])&&(r-=1),s-=1;return r===-1}function Jp(e,t,n){const r=[];for(const{selectors:s,settings:o}of e)for(const i of s)if(Xp(i,t,n)){r.push(o);break}return r}function Xa(e,t,n){const r=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),s=r.map(a=>{const c=Oo(e,t,{...n,theme:a.theme}),u=Jn(c),f=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:f}}),o=Yp(...s.map(a=>a.tokens)),i=o[0].map((a,c)=>a.map((u,f)=>{const h={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=u.explanation),o.forEach((d,g)=>{const{content:b,explanation:R,offset:S,...C}=d[c][f];h.variants[r[g].color]=C}),h})),l=s[0].state?new vn(Object.fromEntries(s.map(a=>{var c;return[a.theme,(c=a.state)==null?void 0:c.getInternalStack(a.theme)]})),s[0].state.lang):void 0;return l&&Yr(i,l),i}function Yp(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const s=e.map(a=>a[r]),o=t.map(()=>[]);t.forEach((a,c)=>a.push(o[c]));const i=s.map(()=>0),l=s.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]=s[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 Fr(e,t,n){let r,s,o,i,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:f="css-vars"}=n,h=Object.entries(n.themes).filter(S=>S[1]).map(S=>({color:S[0],theme:S[1]})).sort((S,C)=>S.color===c?-1:C.color===c?1:0);if(h.length===0)throw new ye("`themes` option must not be empty");const d=Xa(e,t,n);if(a=Jn(d),c&&To!==c&&!h.find(S=>S.color===c))throw new ye(`\`themes\` option must contain the defaultColor key \`${c}\``);const g=h.map(S=>e.getTheme(S.theme)),b=h.map(S=>S.color);o=d.map(S=>S.map(C=>$p(C,b,u,c,f))),a&&Yr(o,a);const R=h.map(S=>Mr(S.theme,n));s=Hi(h,g,R,u,c,"fg",f),r=Hi(h,g,R,u,c,"bg",f),i=`shiki-themes ${g.map(S=>S.name).join(" ")}`,l=c?void 0:[s,r].join(";")}else if("theme"in n){const c=Mr(n.theme,n);o=Oo(e,t,n);const u=e.getTheme(n.theme);r=Ot(u.bg,c),s=Ot(u.fg,c),i=u.name,a=Jn(o)}else throw new ye("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:s,bg:r,themeName:i,rootStyle:l,grammarState:a}}function Hi(e,t,n,r,s,o,i){return e.map((l,a)=>{const c=Ot(t[a][o],n[a])||"inherit",u=`${r+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&s){if(s===To&&e.length>1){const f=e.findIndex(b=>b.color==="light"),h=e.findIndex(b=>b.color==="dark");if(f===-1||h===-1)throw new ye('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=Ot(t[f][o],n[f])||"inherit",g=Ot(t[h][o],n[h])||"inherit";return`light-dark(${d}, ${g});${u}`}return c}return i==="css-vars"?u:null}).filter(l=>!!l).join(";")}function jr(e,t,n,r={meta:{},options:n,codeToHast:(s,o)=>jr(e,s,o),codeToTokens:(s,o)=>Fr(e,s,o)}){var g,b;let s=t;for(const R of Dr(n))s=((g=R.preprocess)==null?void 0:g.call(r,s,n))||s;let{tokens:o,fg:i,bg:l,themeName:a,rootStyle:c,grammarState:u}=Fr(e,s,n);const{mergeWhitespaces:f=!0,mergeSameStyleTokens:h=!1}=n;f===!0?o=Qp(o):f==="never"&&(o=eg(o)),h&&(o=tg(o));const d={...r,get source(){return s}};for(const R of Dr(n))o=((b=R.tokens)==null?void 0:b.call(d,o))||o;return Zp(o,{...n,fg:i,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},d,u)}function Zp(e,t,n,r=Jn(e)){var b,R,S,C;const s=Dr(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[y,v]of Object.entries(t.meta||{}))y.startsWith("_")||(c[y]=v);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},f={type:"element",tagName:"code",properties:{},children:o};const h=[],d={...n,structure:l,addClassToHast:Va,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 h}};if(e.forEach((y,v)=>{var j,K;v&&(l==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
28
- `}));let T={type:"element",tagName:"span",properties:{class:"line"},children:[]},q=0;for(const ie of y){let ae={type:"element",tagName:"span",properties:{...ie.htmlAttrs},children:[{type:"text",value:ie.content}]};const Ie=Zs(ie.htmlStyle||Lr(ie));Ie&&(ae.properties.style=Ie);for(const _e of s)ae=((j=_e==null?void 0:_e.span)==null?void 0:j.call(d,ae,v+1,q,T,ie))||ae;l==="inline"?i.children.push(ae):l==="classic"&&T.children.push(ae),q+=ie.content.length}if(l==="classic"){for(const ie of s)T=((K=ie==null?void 0:ie.line)==null?void 0:K.call(d,T,v+1))||T;h.push(T),o.push(T)}else l==="inline"&&h.push(T)}),l==="classic"){for(const y of s)f=((b=y==null?void 0:y.code)==null?void 0:b.call(d,f))||f;u.children.push(f);for(const y of s)u=((R=y==null?void 0:y.pre)==null?void 0:R.call(d,u))||u;i.children.push(u)}else if(l==="inline"){const y=[];let v={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const j of i.children)j.type==="element"&&j.tagName==="br"?(y.push(v),v={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(j.type==="element"||j.type==="text")&&v.children.push(j);y.push(v);let q={type:"element",tagName:"code",properties:{},children:y};for(const j of s)q=((S=j==null?void 0:j.code)==null?void 0:S.call(d,q))||q;i.children=[];for(let j=0;j<q.children.length;j++){j>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const K=q.children[j];K.type==="element"&&i.children.push(...K.children)}}let g=i;for(const y of s)g=((C=y==null?void 0:y.root)==null?void 0:C.call(d,g))||g;return r&&Yr(g,r),g}function Qp(e){return e.map(t=>{const n=[];let r="",s;return t.forEach((o,i)=>{const a=!(o.fontStyle&&(o.fontStyle&ve.Underline||o.fontStyle&ve.Strikethrough));a&&o.content.match(/^\s+$/)&&t[i+1]?(s===void 0&&(s=o.offset),r+=o.content):r?(a?n.push({...o,offset:s,content:r+o.content}):n.push({content:r,offset:s},o),s=void 0,r=""):n.push(o)}),n})}function eg(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,s,o,i]=r;if(!s&&!i)return n;const l=[{...n,offset:n.offset+s.length,content:o}];return s&&l.unshift({content:s,offset:n.offset}),i&&l.push({content:i,offset:n.offset+s.length+o.length}),l}))}function tg(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const s=n[n.length-1],o=Zs(s.htmlStyle||Lr(s)),i=Zs(r.htmlStyle||Lr(r)),l=s.fontStyle&&(s.fontStyle&ve.Underline||s.fontStyle&ve.Strikethrough),a=r.fontStyle&&(r.fontStyle&ve.Underline||r.fontStyle&ve.Strikethrough);!l&&!a&&o===i?s.content+=r.content:n.push({...r})}return n})}const ng=wp;function rg(e,t,n){var o;const r={meta:{},options:n,codeToHast:(i,l)=>jr(e,i,l),codeToTokens:(i,l)=>Fr(e,i,l)};let s=ng(jr(e,t,n,r));for(const i of Dr(n))s=((o=i.postprocess)==null?void 0:o.call(r,s,n))||s;return s}const Wi={light:"#333333",dark:"#bbbbbb"},zi={light:"#fffffe",dark:"#1e1e1e"},Vi="__shiki_resolved";function Lo(e){var l,a,c,u,f;if(e!=null&&e[Vi])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:r}=t;if(!n||!r){const h=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;(l=h==null?void 0:h.settings)!=null&&l.foreground&&(r=h.settings.foreground),(a=h==null?void 0:h.settings)!=null&&a.background&&(n=h.settings.background),!r&&((c=t==null?void 0:t.colors)!=null&&c["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((u=t==null?void 0:t.colors)!=null&&u["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Wi.light:Wi.dark),n||(n=t.type==="light"?zi.light:zi.dark),t.fg=r,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 s=0;const o=new Map;function i(h){var g;if(o.has(h))return o.get(h);s+=1;const d=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return(g=t.colorReplacements)!=null&&g[`#${d}`]?i(h):(o.set(h,d),d)}t.settings=t.settings.map(h=>{var R,S;const d=((R=h.settings)==null?void 0:R.foreground)&&!h.settings.foreground.startsWith("#"),g=((S=h.settings)==null?void 0:S.background)&&!h.settings.background.startsWith("#");if(!d&&!g)return h;const b={...h,settings:{...h.settings}};if(d){const C=i(h.settings.foreground);t.colorReplacements[C]=h.settings.foreground,b.settings.foreground=C}if(g){const C=i(h.settings.background);t.colorReplacements[C]=h.settings.background,b.settings.background=C}return b});for(const h of Object.keys(t.colors||{}))if((h==="editor.foreground"||h==="editor.background"||h.startsWith("terminal.ansi"))&&!((f=t.colors[h])!=null&&f.startsWith("#"))){const d=i(t.colors[h]);t.colorReplacements[d]=t.colors[h],t.colors[h]=d}return Object.defineProperty(t,Vi,{enumerable:!1,writable:!1,value:!0}),t}async function Ja(e){return Array.from(new Set((await Promise.all(e.filter(t=>!xp(t)).map(async t=>await za(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Ya(e){return(await Promise.all(e.map(async n=>kp(n)?null:Lo(await za(n))))).filter(n=>!!n)}let sg=3;function og(e,t=3){t>sg||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class un extends Error{constructor(t){super(t),this.name="ShikiError"}}function Za(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 un(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class ig extends id{constructor(n,r,s,o={}){super(n);w(this,"_resolvedThemes",new Map);w(this,"_resolvedGrammars",new Map);w(this,"_langMap",new Map);w(this,"_langGraph",new Map);w(this,"_textmateThemeCache",new WeakMap);w(this,"_loadedThemesCache",null);w(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=s,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 r=Lo(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=$r.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=Za(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var i,l,a,c;if(this.getGrammar(n.name))return;const r=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 s={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,s);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,r.size)for(const u of r)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 r=Array.from(this._langGraph.entries()),s=r.filter(([o,i])=>!i);if(s.length){const o=r.filter(([i,l])=>{if(!l)return!1;const a=l.embeddedLanguages||l.embeddedLangs;return a==null?void 0:a.some(c=>s.map(([u])=>u).includes(c))}).filter(i=>!s.includes(i));throw new un(`Missing languages ${s.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of r)this._resolver.addLanguage(i);for(const[o,i]of r)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 r=n.embeddedLanguages??n.embeddedLangs;if(r)for(const s of r)this._langGraph.set(s,this._langMap.get(s))}}class lg{constructor(t,n){w(this,"_langs",new Map);w(this,"_scopeToLang",new Map);w(this,"_injections",new Map);w(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}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 r=[];for(let s=1;s<=n.length;s++){const o=n.slice(0,s).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let $n=0;function ag(e){$n+=1,e.warnings!==!1&&$n>=10&&$n%10===0&&console.warn(`[Shiki] ${$n} 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 un("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Lo),s=new lg(e.engine,n),o=new ig(s,r,n,e.langAlias);let i;function l(y){return Za(y,e.langAlias)}function a(y){S();const v=o.getGrammar(typeof y=="string"?y:y.name);if(!v)throw new un(`Language \`${y}\` not found, you may need to load it first`);return v}function c(y){if(y==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};S();const v=o.getTheme(y);if(!v)throw new un(`Theme \`${y}\` not found, you may need to load it first`);return v}function u(y){S();const v=c(y);i!==y&&(o.setTheme(v),i=y);const T=o.getColorMap();return{theme:v,colorMap:T}}function f(){return S(),o.getLoadedThemes()}function h(){return S(),o.getLoadedLanguages()}function d(...y){S(),o.loadLanguages(y.flat(1))}async function g(...y){return d(await Ja(y))}function b(...y){S();for(const v of y.flat(1))o.loadTheme(v)}async function R(...y){return S(),b(await Ya(y))}function S(){if(t)throw new un("Shiki instance has been disposed")}function C(){t||(t=!0,o.dispose(),$n-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:f,getLoadedLanguages:h,resolveLangAlias:l,loadLanguage:g,loadLanguageSync:d,loadTheme:R,loadThemeSync:b,dispose:C,[Symbol.dispose]:C}}async function cg(e){e.engine||og("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Ya(e.themes||[]),Ja(e.langs||[]),e.engine]);return ag({...e,themes:t,langs:n,engine:r})}async function ug(e){const t=await cg(e);return{getLastGrammarState:(...n)=>zp(t,...n),codeToTokensBase:(n,r)=>Oo(t,n,r),codeToTokensWithThemes:(n,r)=>Xa(t,n,r),codeToTokens:(n,r)=>Fr(t,n,r),codeToHast:(n,r)=>jr(t,n,r),codeToHtml:(n,r)=>rg(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Sn(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function fg(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Do=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),be=String.raw;function xn(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Qa=be`\[\^?`,ec=`c.? | C(?:-.?)?|${be`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${be`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${be`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${be`o\{[^\}]*\}?`}|${be`\d{1,3}`}`,Fo=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,dr=new RegExp(be`
29
- \\ (?:
30
- ${ec}
31
- | [gk]<[^>]*>?
32
- | [gk]'[^']*'?
33
- | .
34
- )
35
- | \( (?:
36
- \? (?:
37
- [:=!>({]
38
- | <[=!]
39
- | <[^>]*>
40
- | '[^']*'
41
- | ~\|?
42
- | #(?:[^)\\]|\\.?)*
43
- | [^:)]*[:)]
44
- )?
45
- | \*[^\)]*\)?
46
- )?
47
- | (?:${Fo.source})+
48
- | ${Qa}
49
- | .
50
- `.replace(/\s+/g,""),"gsu"),Ss=new RegExp(be`
51
- \\ (?:
52
- ${ec}
53
- | .
54
- )
55
- | \[:(?:\^?\p{Alpha}+|\^):\]
56
- | ${Qa}
57
- | &&
58
- | .
59
- `.replace(/\s+/g,""),"gsu");function hg(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 r=Ng(n.flags),s=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(f){s.push(f)},replaceCurrentModX(f){s[s.length-1]=f},singleline:n.rules.singleline};let i=[],l;for(dr.lastIndex=0;l=dr.exec(e);){const f=dg(o,e,l[0],dr.lastIndex);f.tokens?i.push(...f.tokens):f.token&&i.push(f.token),f.lastIndex!==void 0&&(dr.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,h)=>{f.kind="capturing",f.number=h+1});const u=c||a.length;return{tokens:i.map(f=>f.type==="EscapedNumber"?Tg(f,u):f).flat(),flags:r}}function dg(e,t,n,r){const[s,o]=n;if(n==="["||n==="[^"){const i=pg(t,n,r);return{tokens:i.tokens,lastIndex:i.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(o))return{token:qi(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:xg(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:nc(n)}}if(o==="K")return{token:rc("keep",n)};if(o==="N"||o==="R")return{token:Kt("newline",n,{negate:o==="N"})};if(o==="O")return{token:Kt("any",n)};if(o==="X")return{token:Kt("text_segment",n)};const i=tc(n,{inCharClass:!1});return Array.isArray(i)?{tokens:i}:{token:i}}if(s==="("){if(o==="*")return{token:Rg(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Ag(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:an("group",n)};if(n==="(?>")return{token:an("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:an(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:an("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:an("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:Cg(n)}}if(e.getCurrentModX()){if(n==="#"){const i=t.indexOf(`
60
- `,r);return{lastIndex:i===-1?t.length:i}}if(/^\s$/.test(n)){const i=/\s+/y;return i.lastIndex=r,{lastIndex:i.exec(t)?i.lastIndex:r}}}if(n===".")return{token:Kt("dot",n)};if(n==="^"||n==="$"){const i=e.singleline?{"^":be`\A`,$:be`\Z`}[n]:n;return{token:qi(i,n)}}return n==="|"?{token:mg(n)}:Fo.test(n)?{tokens:Og(n)}:{token:Ct(Sn(n),n)}}function pg(e,t,n){const r=[Ki(t[1]==="^",t)];let s=1,o;for(Ss.lastIndex=n;o=Ss.exec(e);){const i=o[0];if(i[0]==="["&&i[1]!==":")s++,r.push(Ki(i[1]==="^",i));else if(i==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Ct(93,i));else if(s--,r.push(yg(i)),!s)break}else{const l=gg(i);Array.isArray(l)?r.push(...l):r.push(l)}}return{tokens:r,lastIndex:Ss.lastIndex||e.length}}function gg(e){if(e[0]==="\\")return tc(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Do.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Kt("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?bg(e):e==="&&"?_g(e):Ct(Sn(e),e)}function tc(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Eg(e);if("dDhHsSwW".includes(n))return Ig(e);if(e.startsWith(be`\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 $g(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(i=>parseInt(i,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...s].map(i=>{const l=[...o.encode(i)].map(a=>`\\x${a.toString(16)}`).join("");return Ct(Sn(i),l)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Ct(Pg(e),e);if(Xi.has(n))return Ct(Xi.get(n),e);if(/\d/.test(n))return wg(t,e);if(e==="\\")throw new Error(be`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Ct(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function mg(e){return{type:"Alternator",raw:e}}function qi(e,t){return{type:"Assertion",kind:e,raw:t}}function nc(e){return{type:"Backreference",raw:e}}function Ct(e,t){return{type:"Character",value:e,raw:t}}function yg(e){return{type:"CharacterClassClose",raw:e}}function bg(e){return{type:"CharacterClassHyphen",raw:e}}function _g(e){return{type:"CharacterClassIntersector",raw:e}}function Ki(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Kt(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function rc(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:xn(n.flags),raw:t}}function wg(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Cg(e){return{type:"GroupClose",raw:e}}function an(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function vg(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function Sg(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function xg(e){return{type:"Subroutine",raw:e}}const kg=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Xi=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Eg(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 Ct(Sn(t.toUpperCase())-64,e)}function Ag(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const s=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=Yi(n),i=Yi(r),l={};if(o&&(l.enable=o),i&&(l.disable=i),e.endsWith(")"))return t.replaceCurrentModX(s),rc("flags",e,{flags:l});if(e.endsWith(":"))return t.pushModX(s),t.numOpenGroups++,an("group",e,{...(o||i)&&{flags:l}});throw new Error(`Unexpected flag modifier "${e}"`)}function Rg(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:r,args:s}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=s?s.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[i,l,a]=o,c=kg.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 vg(c,r??null,(s==null?void 0:s.split(","))??null,e)}function Ji(e){let t=null,n,r;if(e[0]==="{"){const{minStr:s,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,i=1e5;if(+s>i||o&&+o>i)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+s,r=o===void 0?+s:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,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,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Sg(t,n,r,e)}function Ig(e){const t=e[1].toLowerCase();return Kt({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function $g(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Kt("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function Yi(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 Ng(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 r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="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"}[r]]=!0}return t}function Pg(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 Tg(e,t){const{raw:n,inCharClass:r}=e,s=n.slice(1);if(!r&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=t))return[nc(n)];const o=[],i=s.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(be`Octal encoded byte above 177 unsupported "${n}"`)}else c=Sn(a);o.push(Ct(c,(l===0?"\\":"")+a))}return o}function Og(e){const t=[],n=new RegExp(Fo,"gy");let r;for(;r=n.exec(e);){const s=r[0];if(s[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(o){const{min:i,max:l}=o.groups;if(+i>+l&&s.endsWith("?")){n.lastIndex--,t.push(Ji(s.slice(0,-1)));continue}}}t.push(Ji(s))}return t}function sc(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(r=>t[r]===n[r])}function Mg(e){return Lg.has(e.type)}const Lg=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function oc(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=hg(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),s=(h,d)=>{const g=r.tokens[o.nextIndex];switch(o.parent=h,o.nextIndex++,g.type){case"Alternator":return Qt();case"Assertion":return Dg(g);case"Backreference":return Fg(g,o);case"Character":return Zr(g.value,{useLastValid:!!d.isCheckingRangeEnd});case"CharacterClassHyphen":return jg(g,o,d);case"CharacterClassOpen":return Gg(g,o,d);case"CharacterSet":return Bg(g,o);case"Directive":return qg(g.kind,{flags:g.flags});case"GroupOpen":return Ug(g,o,d);case"NamedCallout":return Xg(g.kind,g.tag,g.arguments);case"Quantifier":return Hg(g,o);case"Subroutine":return Wg(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:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:s},i=Yg(Kg(r.flags));let l=i.body[0];for(;o.nextIndex<r.tokens.length;){const h=s(l,{});h.type==="Alternative"?(i.body.push(h),l=h):l.body.push(h)}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:h}of f)if(typeof h=="number"){if(h>a.length)throw new Error("Subroutine uses a group number that's not defined");h&&(a[h-1].isSubroutined=!0)}else if(u.has(h)){if(u.get(h).length>1)throw new Error(be`Subroutine uses a duplicate group name "\g<${h}>"`);u.get(h)[0].isSubroutined=!0}else throw new Error(be`Subroutine uses a group name that's not defined "\g<${h}>"`);return i}function Dg({kind:e}){return Qs(xn({"^":"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===be`\B`||e===be`\Y`})}function Fg({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),s=(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,eo(i?l+1-o:o,{orphan:a})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return s(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return eo(r)}return s(+r)}function jg(e,t,n){const{tokens:r,walk:s}=t,o=t.parent,i=o.body.at(-1),l=r[t.nextIndex];if(!n.isCheckingRangeEnd&&i&&i.type!=="CharacterClass"&&i.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){const a=s(o,{...n,isCheckingRangeEnd:!0});if(i.type==="Character"&&a.type==="Character")return o.body.pop(),Vg(i,a);throw new Error("Invalid character class range")}return Zr(Sn("-"))}function Gg({negate:e},t,n){const{tokens:r,walk:s}=t,o=r[t.nextIndex],i=[vr()];let l=el(o);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")i.push(vr()),t.nextIndex++;else{const c=i.at(-1);c.body.push(s(c,n))}l=el(r[t.nextIndex],o)}const a=vr({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 Bg({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:i}=r;if(e==="property"){const l=Qr(n);if(Do.has(l)&&!(i!=null&&i.has(l)))e="posix",n=l;else return cn(n,{negate:t,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:i})}return e==="posix"?Jg(n,{negate:t}):to(e,{negate:t})}function Ug(e,t,n){const{tokens:r,capturingGroups:s,namedGroupsByName:o,skipLookbehindValidation:i,walk:l}=t,a=Zg(e),c=a.type==="AbsenceFunction",u=Qi(a),f=u&&a.negate;if(a.type==="CapturingGroup"&&(s.push(a),a.name&&fg(o,a.name,[]).push(a)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let h=tl(r[t.nextIndex]);for(;h.type!=="GroupClose";){if(h.type==="Alternator")a.body.push(Qt()),t.nextIndex++;else{const d=a.body.at(-1),g=l(d,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||f});if(d.body.push(g),(u||n.isInLookbehind)&&!i){const b="Lookbehind includes a pattern not allowed by Oniguruma";if(f||n.isInNegLookbehind){if(Zi(g)||g.type==="CapturingGroup")throw new Error(b)}else if(Zi(g)||Qi(g)&&g.negate)throw new Error(b)}}h=tl(r[t.nextIndex])}return t.nextIndex++,a}function Hg({kind:e,min:t,max:n},r){const s=r.parent,o=s.body.at(-1);if(!o||!Mg(o))throw new Error("Quantifier requires a repeatable token");const i=lc(e,t,n,o);return s.body.pop(),i}function Wg({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let s=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(o){const l=+o.groups.num,a=n.length;if(t.hasNumberedRef=!0,s={"":l,"+":a+l,"-":a+1-l}[o.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);const i=ac(s);return r.push(i),i}function zg(e,t){return{type:"AbsenceFunction",kind:e,body:sr(t==null?void 0:t.body)}}function Qt(e){return{type:"Alternative",body:cc(e==null?void 0:e.body)}}function Qs(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function eo(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function ic(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Qg(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:sr(t==null?void 0:t.body)}}function Zr(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function vr(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:cc(e==null?void 0:e.body)}}function Vg(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function to(e,t){const n=!!(t!=null&&t.negate),r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function qg(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:xn(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function Kg(e){return{type:"Flags",...e}}function Ke(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:sr(e==null?void 0:e.body)}}function Vt(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:sr(e==null?void 0:e.body)}}function Xg(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function Jg(e,t){const n=!!(t!=null&&t.negate);if(!Do.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function lc(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function Yg(e,t){return{type:"Regex",body:sr(t==null?void 0:t.body),flags:e}}function ac(e){return{type:"Subroutine",ref:e}}function cn(e,t){var s;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(s=n.unicodePropertyMap)==null?void 0:s.get(Qr(e));if(!r){if(n.normalizeUnknownPropertyNames)r=em(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(be`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function Zg({flags:e,kind:t,name:n,negate:r,number:s}){switch(t){case"absence_repeater":return zg("repeater");case"atomic":return Ke({atomic:!0});case"capturing":return ic(s,{name:n});case"group":return Ke({flags:e});case"lookahead":case"lookbehind":return Vt({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function sr(e){if(e===void 0)e=[Qt()];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 cc(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 Zi(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Qi(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Qg(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function em(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 Qr(e){return e.replace(/[- _]+/g,"").toLowerCase()}function el(e,t){return xn(e,`${(t==null?void 0:t.type)==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function tl(e){return xn(e,"Unclosed group")}function Bn(e,t,n=null){function r(o,i){for(let l=0;l<o.length;l++){const a=s(o[l],i,l,o);l=Math.max(-1,l+a)}}function s(o,i=null,l=null,a=null){var S,C;let c=0,u=!1;const f={node:o,parent:i,key:l,container:a,root:e,remove(){pr(a).splice(Math.max(0,rn(l)+c),1),c--,u=!0},removeAllNextSiblings(){return pr(a).splice(rn(l)+1)},removeAllPrevSiblings(){const y=rn(l)+c;return c-=y,pr(a).splice(0,Math.max(0,y))},replaceWith(y,v={}){const T=!!v.traverse;a?a[Math.max(0,rn(l)+c)]=y:xn(i,"Can't replace root node")[l]=y,T&&s(y,i,l,a),u=!0},replaceWithMultiple(y,v={}){const T=!!v.traverse;if(pr(a).splice(Math.max(0,rn(l)+c),1,...y),c+=y.length-1,T){let q=0;for(let j=0;j<y.length;j++)q+=s(y[j],i,rn(l)+j+q,a)}u=!0},skip(){u=!0}},{type:h}=o,d=t["*"],g=t[h],b=typeof d=="function"?d:d==null?void 0:d.enter,R=typeof g=="function"?g:g==null?void 0:g.enter;if(b==null||b(f,n),R==null||R(f,n),!u)switch(h){case"AbsenceFunction":case"CapturingGroup":case"Group":r(o.body,o);break;case"Alternative":case"CharacterClass":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(o.min,o,"min"),s(o.max,o,"max");break;case"LookaroundAssertion":r(o.body,o);break;case"Quantifier":s(o.body,o,"body");break;case"Regex":r(o.body,o),s(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${h}"`)}return(S=g==null?void 0:g.exit)==null||S.call(g,f,n),(C=d==null?void 0:d.exit)==null||C.call(d,f,n),c}return s(e),e}function pr(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function rn(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const tm=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function nm(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function rm(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const He=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function jo(e,t,n,r){const s=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let i=0,l="";for(const a of e.matchAll(s)){const{0:c,groups:{$skip:u}}=a;if(!u&&(!r||r===He.DEFAULT==!i)){n instanceof Function?l+=n(a,{context:i?He.CHAR_CLASS:He.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 uc(e,t,n,r){jo(e,t,n,r)}function sm(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const s=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let o=0,i;for(;i=s.exec(e);){const{0:l,groups:{$skip:a}}=i;if(!a&&(!r||r===He.DEFAULT==!o))return i;l==="["?o++:l==="]"&&o&&o--,s.lastIndex==i.index&&s.lastIndex++}return null}function gr(e,t,n){return!!sm(e,t,0,n)}function om(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,s=0,o=1,i;for(;i=n.exec(e);){const[l]=i;if(l==="[")s++;else if(s)l==="]"&&s--;else if(l==="(")o++;else if(l===")"&&(o--,!o)){r=i.index;break}}return e.slice(t,r)}const nl=new RegExp(String.raw`(?<noncapturingStart>${tm})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function im(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let r=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const s="(?>",o="(?:(?=(",i=[0],l=[];let a=0,c=0,u=NaN,f;do{f=!1;let h=0,d=0,g=!1,b;for(nl.lastIndex=Number.isNaN(u)?0:u+o.length;b=nl.exec(e);){const{0:R,index:S,groups:{capturingStart:C,noncapturingStart:y}}=b;if(R==="[")h++;else if(h)R==="]"&&h--;else if(R===s&&!g)u=S,g=!0;else if(g&&y)d++;else if(C)g?d++:(a++,i.push(a+c));else if(R===")"&&g){if(!d){c++;const v=a+c;if(e=`${e.slice(0,u)}${o}${e.slice(u+s.length,S)}))<$$${v}>)${e.slice(S+1)}`,f=!0,l.push(v),nm(n,v),r.size){const T=new Map;r.forEach((q,j)=>{T.set(j>=v?j+1:j,q.map(K=>K>=v?K+1:K))}),r=T}break}d--}}}while(f);return n.push(...l),e=jo(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:h,groups:{backrefNum:d,wrappedBackrefNum:g}})=>{if(d){const b=+d;if(b>i.length-1)throw new Error(`Backref "${h}" greater than number of captures`);return`\\${i[b]}`}return`\\${g}`},He.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const fc=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,xs=new RegExp(String.raw`
61
- \\(?: \d+
62
- | c[A-Za-z]
63
- | [gk]<[^>]+>
64
- | [pPu]\{[^\}]+\}
65
- | u[A-Fa-f\d]{4}
66
- | x[A-Fa-f\d]{2}
67
- )
68
- | \((?: \? (?: [:=!>]
69
- | <(?:[=!]|[^>]+>)
70
- | [A-Za-z\-]+:
71
- | \(DEFINE\)
72
- ))?
73
- | (?<qBase>${fc})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
74
- | \\?.
75
- `.replace(/\s+/g,""),"gsu");function lm(e){if(!new RegExp(`${fc}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,s="",o=0,i;for(xs.lastIndex=0;i=xs.exec(e);){const{0:l,index:a,groups:{qBase:c,qMod:u,invalidQ:f}}=i;if(l==="[")o||(r=a),o++;else if(l==="]")o?o--:r=null;else if(!o)if(u==="+"&&s&&!s.startsWith("(")){if(f)throw new Error(`Invalid quantifier "${l}"`);let h=-1;if(/^\{\d+\}$/.test(c))e=rm(e,a+c.length,u,"");else{if(s===")"||s==="]"){const d=s===")"?n:r;if(d===null)throw new Error(`Invalid unmatched "${s}"`);e=`${e.slice(0,d)}(?>${e.slice(d,a)}${c})${e.slice(a+l.length)}`}else e=`${e.slice(0,a-s.length)}(?>${s}${c})${e.slice(a+l.length)}`;h+=4}xs.lastIndex+=h}else l[0]==="("?t.push(a):l===")"&&(n=t.length?t.pop():null);s=l}return{pattern:e}}const Ue=String.raw,am=Ue`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,no=Ue`\(\?R=(?<rDepth>[^\)]+)\)|${am}`,es=Ue`\(\?<(?![=!])(?<captureName>[^>]+)>`,hc=Ue`${es}|(?<unnamed>\()(?!\?)`,Wt=new RegExp(Ue`${es}|${no}|\(\?|\\?.`,"gsu"),ks="Cannot use multiple overlapping recursions";function cm(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let s=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(no,"su").test(e))return{pattern:e,captureTransfers:s,hiddenCaptures:n};if(r==="plugin"&&gr(e,Ue`\(\?\(DEFINE\)`,He.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],i=gr(e,Ue`\\[1-9]`,He.DEFAULT),l=new Map,a=[];let c=!1,u=0,f=0,h;for(Wt.lastIndex=0;h=Wt.exec(e);){const{0:d,groups:{captureName:g,rDepth:b,gRNameOrNum:R,gRDepth:S}}=h;if(d==="[")u++;else if(u)d==="]"&&u--;else if(b){if(rl(b),c)throw new Error(ks);if(i)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const C=e.slice(0,h.index),y=e.slice(Wt.lastIndex);if(gr(y,no,He.DEFAULT))throw new Error(ks);const v=+b-1;e=sl(C,y,v,!1,n,o,f),s=il(s,C,v,o.length,0,f);break}else if(R){rl(S);let C=!1;for(const _e of a)if(_e.name===R||_e.num===+R){if(C=!0,_e.hasRecursedWithin)throw new Error(ks);break}if(!C)throw new Error(Ue`Recursive \g cannot be used outside the referenced group "${r==="external"?R:Ue`\g<${R}&R=${S}>`}"`);const y=l.get(R),v=om(e,y);if(i&&gr(v,Ue`${es}|\((?!\?)`,He.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const T=e.slice(y,h.index),q=v.slice(T.length+d.length),j=o.length,K=+S-1,ie=sl(T,q,K,!0,n,o,f);s=il(s,T,K,o.length-j,j,f);const ae=e.slice(0,y),Ie=e.slice(y+v.length);e=`${ae}${ie}${Ie}`,Wt.lastIndex+=ie.length-d.length-T.length-q.length,a.forEach(_e=>_e.hasRecursedWithin=!0),c=!0}else if(g)f++,l.set(String(f),Wt.lastIndex),l.set(g,Wt.lastIndex),a.push({num:f,name:g});else if(d[0]==="("){const C=d==="(";C&&(f++,l.set(String(f),Wt.lastIndex)),a.push(C?{num:f}:{})}else d===")"&&a.pop()}return n.push(...o),{pattern:e,captureTransfers:s,hiddenCaptures:n}}function rl(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 sl(e,t,n,r,s,o,i){const l=new Set;r&&uc(e+t,es,({groups:{captureName:c}})=>{l.add(c)},He.DEFAULT);const a=[n,r?l:null,s,o,i];return`${e}${ol(`(?:${e}`,"forward",...a)}(?:)${ol(`${t})`,"backward",...a)}${t}`}function ol(e,t,n,r,s,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+=jo(e,Ue`${hc}|\\k<(?<backref>[^>]+)>`,({0:h,groups:{captureName:d,unnamed:g,backref:b}})=>{if(b&&r&&!r.has(b))return h;const R=`_$${f}`;if(g||d){const S=i+o.length+1;return o.push(S),um(s,S),g?h:`(?<${d}${R}>`}return Ue`\k<${b}${R}>`},He.DEFAULT)}return c}function um(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function il(e,t,n,r,s,o){if(e.size&&r){let i=0;uc(t,hc,()=>i++,He.DEFAULT);const l=o-i+s,a=new Map;return e.forEach((c,u)=>{const f=(r-i*n)/n,h=i*n,d=u>l+i?u+r:u,g=[];for(const b of c)if(b<=l)g.push(b);else if(b>l+i+f)g.push(b+r);else if(b<=l+i)for(let R=0;R<=n;R++)g.push(b+i*R);else for(let R=0;R<=n;R++)g.push(b+h+f*R);a.set(d,g)}),a}return e}var pe=String.fromCodePoint,W=String.raw,vt={flagGroups:(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{new RegExp("[[]]","v")}catch{return!1}return!0})()};vt.bugFlagVLiteralHyphenIsRange=vt.unicodeSets?(()=>{try{new RegExp(W`[\d\-a]`,"v")}catch{return!0}return!1})():!1;vt.bugNestedClassIgnoresNegation=vt.unicodeSets&&new RegExp("[[^a]]","v").test("a");function Gr(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 Yn(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function ro(e,t){return ll[e]>=ll[t]}function fm(e,t){if(e==null)throw new Error(t??"Value expected");return e}var ll={ES2025:2025,ES2024:2024,ES2018:2018},hm={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function dc(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!hm[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=vt.flagGroups?"ES2025":vt.unicodeSets?"ES2024":"ES2018"),t}var dm="[ -\r ]",pm=new Set([pe(304),pe(305)]),pt=W`[\p{L}\p{M}\p{N}\p{Pc}]`;function pc(e){if(pm.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),s=ym.get(n),o=gm.get(n),i=mm.get(n);return[...r].length===1&&t.add(r),i&&t.add(i),s&&t.add(s),t.add(n),o&&t.add(o),[...t]}var Go=new Map(`C Other
76
- Cc Control cntrl
77
- Cf Format
78
- Cn Unassigned
79
- Co Private_Use
80
- Cs Surrogate
81
- L Letter
82
- LC Cased_Letter
83
- Ll Lowercase_Letter
84
- Lm Modifier_Letter
85
- Lo Other_Letter
86
- Lt Titlecase_Letter
87
- Lu Uppercase_Letter
88
- M Mark Combining_Mark
89
- Mc Spacing_Mark
90
- Me Enclosing_Mark
91
- Mn Nonspacing_Mark
92
- N Number
93
- Nd Decimal_Number digit
94
- Nl Letter_Number
95
- No Other_Number
96
- P Punctuation punct
97
- Pc Connector_Punctuation
98
- Pd Dash_Punctuation
99
- Pe Close_Punctuation
100
- Pf Final_Punctuation
101
- Pi Initial_Punctuation
102
- Po Other_Punctuation
103
- Ps Open_Punctuation
104
- S Symbol
105
- Sc Currency_Symbol
106
- Sk Modifier_Symbol
107
- Sm Math_Symbol
108
- So Other_Symbol
109
- Z Separator
110
- Zl Line_Separator
111
- Zp Paragraph_Separator
112
- Zs Space_Separator
113
- ASCII
114
- ASCII_Hex_Digit AHex
115
- Alphabetic Alpha
116
- Any
117
- Assigned
118
- Bidi_Control Bidi_C
119
- Bidi_Mirrored Bidi_M
120
- Case_Ignorable CI
121
- Cased
122
- Changes_When_Casefolded CWCF
123
- Changes_When_Casemapped CWCM
124
- Changes_When_Lowercased CWL
125
- Changes_When_NFKC_Casefolded CWKCF
126
- Changes_When_Titlecased CWT
127
- Changes_When_Uppercased CWU
128
- Dash
129
- Default_Ignorable_Code_Point DI
130
- Deprecated Dep
131
- Diacritic Dia
132
- Emoji
133
- Emoji_Component EComp
134
- Emoji_Modifier EMod
135
- Emoji_Modifier_Base EBase
136
- Emoji_Presentation EPres
137
- Extended_Pictographic ExtPict
138
- Extender Ext
139
- Grapheme_Base Gr_Base
140
- Grapheme_Extend Gr_Ext
141
- Hex_Digit Hex
142
- IDS_Binary_Operator IDSB
143
- IDS_Trinary_Operator IDST
144
- ID_Continue IDC
145
- ID_Start IDS
146
- Ideographic Ideo
147
- Join_Control Join_C
148
- Logical_Order_Exception LOE
149
- Lowercase Lower
150
- Math
151
- Noncharacter_Code_Point NChar
152
- Pattern_Syntax Pat_Syn
153
- Pattern_White_Space Pat_WS
154
- Quotation_Mark QMark
155
- Radical
156
- Regional_Indicator RI
157
- Sentence_Terminal STerm
158
- Soft_Dotted SD
159
- Terminal_Punctuation Term
160
- Unified_Ideograph UIdeo
161
- Uppercase Upper
162
- Variation_Selector VS
163
- White_Space space
164
- XID_Continue XIDC
165
- XID_Start XIDS`.split(/\s/).map(e=>[Qr(e),e])),gm=new Map([["s",pe(383)],[pe(383),"s"]]),mm=new Map([[pe(223),pe(7838)],[pe(107),pe(8490)],[pe(229),pe(8491)],[pe(969),pe(8486)]]),ym=new Map([At(453),At(456),At(459),At(498),...Es(8072,8079),...Es(8088,8095),...Es(8104,8111),At(8124),At(8140),At(8188)]),bm=new Map([["alnum",W`[\p{Alpha}\p{Nd}]`],["alpha",W`\p{Alpha}`],["ascii",W`\p{ASCII}`],["blank",W`[\p{Zs}\t]`],["cntrl",W`\p{Cc}`],["digit",W`\p{Nd}`],["graph",W`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",W`\p{Lower}`],["print",W`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",W`[\p{P}\p{S}]`],["space",W`\p{space}`],["upper",W`\p{Upper}`],["word",W`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",W`\p{AHex}`]]);function _m(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function At(e){const t=pe(e);return[t.toLowerCase(),t]}function Es(e,t){return _m(e,t).map(n=>At(n))}var gc=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function wm(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};mc(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:ro(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};Bn(e,Cm,r);const s={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Bn(e,vm,o);const i={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return Bn(e,Sm,i),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var Cm={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:s}=e;if(s==="repeater"){const o=Ke();o.body[0].body.push(Vt({negate:!0,body:r}),cn("Any"));const i=Ke();i.body[0].body.push(lc("greedy",0,1/0,o)),n(ce(i,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const s=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const i=t.body[o];Yn(r,i,[]).push(...s)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=bc(t.get(e));if(r){const s=Ke({flags:r});s.body[0].body=e.body,e.body=[ce(s,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:s,remove:o,replaceWith:i},l){const{kind:a,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:f,supportedGNodes:h,wordIsAscii:d}=l;if(a==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(a==="line_end")i(ce(Vt({body:[Qt({body:[Qs("string_end")]}),Qt({body:[Zr(10)]})]}),t));else if(a==="line_start")i(ce(gt(W`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(a==="search_start")if(h.has(e))s.flags.sticky=!0,o();else{const g=r[n-1];if(g&&Im(g))i(ce(Vt({negate:!0}),t));else{if(f)throw new Error(W`Uses "\G" in a way that requires a subclass`);i(Rt(Qs("string_start"),t)),l.strategy="clip_search"}}else if(!(a==="string_end"||a==="string_start"))if(a==="string_end_newline")i(ce(gt(W`(?=\n?\z)`),t));else if(a==="word_boundary"){if(!d&&!u){const g=`(?:(?<=${pt})(?!${pt})|(?<!${pt})(?=${pt}))`,b=`(?:(?<=${pt})(?=${pt})|(?<!${pt})(?!${pt}))`;i(ce(gt(c?b:g),t))}}else throw new Error(`Unexpected assertion kind "${a}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Rs(n)&&(n=As(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Rs(r)&&(r=As(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=vr({body:[e]});n(ce(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:s,digitIsAscii:o,spaceIsAscii:i,wordIsAscii:l}){const{kind:a,negate:c,value:u}=e;if(o&&(a==="digit"||u==="digit")){n(Rt(to("digit",{negate:c}),t));return}if(i&&(a==="space"||u==="space")){n(ce(Is(gt(dm),c),t));return}if(l&&(a==="word"||u==="word")){n(Rt(to("word",{negate:c}),t));return}if(a==="any")n(Rt(cn("Any"),t));else if(a==="digit")n(Rt(cn("Nd",{negate:c}),t));else if(a!=="dot")if(a==="text_segment"){if(r==="strict")throw new Error(W`Use of "\X" requires non-strict accuracy`);const f="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",h=W`\p{RI}{2}|${f}(?:\u200D${f})*`;n(ce(gt(W`(?>\r\n|${s?W`\p{RGI_Emoji}`:h}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(a==="hex")n(Rt(cn("AHex",{negate:c}),t));else if(a==="newline")n(ce(gt(c?`[^
166
- ]`:`(?>\r
167
- ?|[
168
- \v\f…\u2028\u2029])`),t));else if(a==="posix")if(!s&&(u==="graph"||u==="print")){if(r==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let f={graph:"!-~",print:" -~"}[u];c&&(f=`\0-${pe(f.codePointAt(0)-1)}${pe(f.codePointAt(2)+1)}-􏿿`),n(ce(gt(`[${f}]`),t))}else n(ce(Is(gt(bm.get(u)),c),t));else if(a==="property")Go.has(Qr(u))||(e.key="sc");else if(a==="space")n(Rt(cn("space",{negate:c}),t));else if(a==="word")n(ce(Is(gt(pt),c),t));else throw new Error(`Unexpected character set kind "${a}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:s,removeAllPrevSiblings:o,removeAllNextSiblings:i}){const{kind:l,flags:a}=e;if(l==="flags")if(!a.enable&&!a.disable)r();else{const c=Ke({flags:a});c.body[0].body=i(),s(ce(c,t),{traverse:!0})}else if(l==="keep"){const c=n.body[0],f=n.body.length===1&&sc(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(t.parent!==f||f.body.length>1)throw new Error(W`Uses "\K" in a way that's unsupported`);const h=Vt({behind:!0});h.body[0].body=o(),s(ce(h,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:r}=e;if(r==="fail")n(ce(Vt({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Ke();t.body[0].body.push(e.body),e.body=ce(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,s=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const i=wc(o.body);i?(r=!0,Array.isArray(i)?n.push(...i):n.push(i)):s=!0}r&&!s&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(W`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Rs(n)&&(n=As(n,t),e.ref=n)}},vm={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:s}=e;r||n.set(e,[...t.get(s).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:s,groupsByName:o,multiplexCapturesToLeftByRef:i,openRefs:l,reffedNodesByReferencer:a}){const c=s.get(e);if(c&&l.has(e.number)){const f=Rt(al(e.number),t);a.set(f,l.get(e.number)),n(f);return}l.set(e.number,e),i.set(e.number,[]),e.name&&Yn(i,e.name,[]);const u=i.get(e.name??e.number);for(let f=0;f<u.length;f++){const h=u[f];if(c===h.node||c&&c===h.origin||e===h.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=Yn(o,e.name,new Map);let h=!1;if(c)h=!0;else for(const d of f.values())if(!d.hasDuplicateNameToRemove){h=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:h})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Gr(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:s,ref:o}=e;if(s){let u=t;for(;(u=u.parent)&&!(u.type==="CapturingGroup"&&(u.name===o||u.number===o)););r.reffedNodesByReferencer.set(e,u);return}const i=r.subroutineRefMap.get(o),l=o===0,a=l?al(0):yc(i,r.groupOriginByCopy,null);let c=a;if(!l){const u=bc(Em(i,h=>h.type==="Group"&&!!h.flags)),f=u?Gr(r.globalFlags,u):r.globalFlags;xm(f,r.currentFlags)||(c=Ke({flags:Am(f)}),c.body[0].body.push(a))}n(ce(c,t),{traverse:!l})}},Sm={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(i=>km(i,e));if(!o.length)n(ce(Vt({negate:!0}),t));else if(o.length>1){const i=Ke({atomic:!0,body:o.reverse().map(l=>Qt({body:[eo(l.number)]}))});n(ce(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 r=0;r<n;r++){const s=ic();e.body.at(-1).body.push(s)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function mc(e){Bn(e,{"*"({node:t,parent:n}){t.parent=n}})}function xm(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function km(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=_c(n.parent);for(const s of r){if(s===n)break;if(s===e||Cc(s,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function yc(e,t,n,r){const s=Array.isArray(e)?[]:{};for(const[o,i]of Object.entries(e))o==="parent"?s.parent=Array.isArray(n)?r:n:i&&typeof i=="object"?s[o]=yc(i,t,s,n):(o==="type"&&i==="CapturingGroup"&&t.set(s,t.get(e)??e),s[o]=i);return s}function al(e){const t=ac(e);return t.isRecursive=!0,t}function Em(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function As(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 bc(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(s=>{var o,i;(o=r.enable)!=null&&o[s]&&(delete n.disable[s],n.enable[s]=!0),(i=r.disable)!=null&&i[s]&&(n.disable[s]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Am({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 _c(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function wc(e){const t=e.find(n=>n.kind==="search_start"||$m(n,{negate:!1})||!Rm(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 r of t.body){const s=wc(r.body);if(!s)return null;Array.isArray(s)?n.push(...s):n.push(s)}return n}return null}function Cc(e,t){const n=_c(e)??[];for(const r of n)if(r===t||Cc(r,t))return!0;return!1}function Rm({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Im(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function $m(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&sc(e.body[0],{type:"Assertion",kind:"search_start"})}function Rs(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function gt(e,t){const r=oc(e,{...t,unicodePropertyMap:Go}).body;return r.length>1||r[0].body.length>1?Ke({body:r}):r[0].body[0]}function Is(e,t){return e.negate=t,e}function Rt(e,t){return e.parent=t,e}function ce(e,t){return mc(e),e.parent=t,e}function Nm(e,t){const n=dc(t),r=ro(n.target,"ES2024"),s=ro(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(!s){const d=[e.flags.ignoreCase];Bn(e,Pm,{getCurrentModI:()=>d.at(-1),popModI(){d.pop()},pushModI(g){d.push(g)},setHasCasedChar(){d.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:!!(!s&&i&&l),useFlagMods:s,useFlagV:r,verbose:n.verbose};function f(d){return u.lastNode=c,c=d,fm(Tm[d.type],`Unexpected node type "${d.type}"`)(d,u,f)}const h={pattern:e.body.map(f).join("|"),flags:f(e.flags),options:{...e.options}};return r||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],u.captureMap.forEach((d,g)=>{d.hidden&&h._hiddenCaptures.push(g),d.transferTo&&Yn(h._captureTransfers,d.transferTo,[]).push(g)}),h}var Pm={"*":{enter({node:e},t){if(ul(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Gr({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){ul(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Bo(pe(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),vc(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&gc.has(e.value)&&t.setHasCasedChar()}},Tm={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?W`\B`:W`\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:r,name:s,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),`(${s?`?<${s}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=pe(e),r=sn(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Bo(n)){const s=pc(n);return t.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:s,parent:o}=e;let{body:i}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");vt.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&i.some(fl)&&(i=[Zr(45),...i.filter(c=>!fl(c))]);const l=()=>`[${s?"^":""}${i.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||vt.bugNestedClassIgnoresNegation)&&!s){const u=i.filter(f=>f.type==="CharacterClass"&&f.kind==="union"&&f.negate);if(u.length){const f=Ke(),h=f.body[0];return f.parent=o,h.parent=f,i=i.filter(d=>!u.includes(d)),e.body=i,i.length?(e.parent=h,h.body.push(e)):f.body.pop(),u.forEach(d=>{const g=Qt({body:[d]});d.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(r==="union"&&!s&&a&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(vt.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,r=e.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=sn(n,s),i=sn(r,s),l=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const a=vc(e);Fm(a).forEach(u=>{l.add(Array.isArray(u)?`${sn(u[0],s)}-${sn(u[1],s)}`:sn(u,s))})}return`${o}-${i}${[...l].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},s){if(e==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":W`[^\n]`;if(e==="digit")return t?W`\D`:W`\d`;if(e==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&gc.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?W`\P`:W`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?W`\W`:W`\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:r},s,o){const i=s.currentFlags;n&&(s.currentFlags=Gr(i,n));const l=t.map(o).join("|"),a=!s.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!s.useFlagMods||!n)?l:`(?${jm(e,n,s.useFlagMods)}${l})`;return s.currentFlags=i,a},LookaroundAssertion({body:e,kind:t,negate:n},r,s){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(s).join("|")})`},Quantifier(e,t,n){return n(e.body)+Gm(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:W`\g<${t}&R=${r}>`}},Om=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Mm=new Set(["-","\\","]","^","["]),Lm=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),cl=new Map([[9,W`\t`],[10,W`\n`],[11,W`\v`],[12,W`\f`],[13,W`\r`],[8232,W`\u2028`],[8233,W`\u2029`],[65279,W`\uFEFF`]]),Dm=new RegExp("^\\p{Cased}$","u");function Bo(e){return Dm.test(e)}function vc(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,s=e.max.value,o=[];if(r<65&&(s===65535||s>=131071)||r===65536&&s>=131071)return o;for(let i=r;i<=s;i++){const l=pe(i);if(!Bo(l))continue;const a=pc(l).filter(c=>{const u=c.codePointAt(0);return u<r||u>s});if(a.length&&(o.push(...a),n))break}return o}function sn(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(cl.has(e))return cl.get(e);if(e<32||e>126&&e<160||e>262143||t&&Bm(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const s=n?r?Lm:Mm:Om,o=pe(e);return(s.has(o)?"\\":"")+o}function Fm(e){const t=e.map(s=>s.codePointAt(0)).sort((s,o)=>s-o),n=[];let r=null;for(let s=0;s<t.length;s++)t[s+1]===t[s]+1?r??(r=t[s]):r===null?n.push(t[s]):(n.push([r,t[s]]),r=null);return n}function jm(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:s,disable:o}=t;r=(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")+(o?"-":"")+(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")}return`${r}:`}function Gm({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function ul({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function Bm(e){return e>47&&e<58}function fl({type:e,value:t}){return e==="Character"&&t===45}var Nt,bt,Xt,Pt,Jt,Zn,so,Mt,Um=(Mt=class extends RegExp{constructor(n,r,s){var t=(...o_)=>(super(...o_),Bt(this,Zn),Bt(this,Nt,new Map),Bt(this,bt,null),Bt(this,Xt),Bt(this,Pt,null),Bt(this,Jt,null),w(this,"rawOptions",{}),this);const o=!!(s!=null&&s.lazyCompile);if(n instanceof RegExp){if(s)throw new Error("Cannot provide options when copying a regexp");const i=n;t(i,r),ze(this,Xt,i.source),i instanceof Mt&&(ze(this,Nt,ke(i,Nt)),ze(this,Pt,ke(i,Pt)),ze(this,Jt,ke(i,Jt)),this.rawOptions=i.rawOptions)}else{const i={hiddenCaptures:[],strategy:null,transfers:[],...s};t(o?"":n,r),ze(this,Xt,n),ze(this,Nt,Wm(i.hiddenCaptures,i.transfers)),ze(this,Jt,i.strategy),this.rawOptions=s??{}}o||ze(this,bt,this)}get source(){return ke(this,Xt)||"(?:)"}exec(n){if(!ke(this,bt)){const{lazyCompile:o,...i}=this.rawOptions;ze(this,bt,new Mt(ke(this,Xt),this.flags,i))}const r=this.global||this.sticky,s=this.lastIndex;if(ke(this,Jt)==="clip_search"&&r&&s){this.lastIndex=0;const o=rs(this,Zn,so).call(this,n.slice(s));return o&&(Hm(o,s,n,this.hasIndices),this.lastIndex+=s),o}return rs(this,Zn,so).call(this,n)}},Nt=new WeakMap,bt=new WeakMap,Xt=new WeakMap,Pt=new WeakMap,Jt=new WeakMap,Zn=new WeakSet,so=function(n){ke(this,bt).lastIndex=this.lastIndex;const r=Ko(Mt.prototype,this,"exec").call(ke(this,bt),n);if(this.lastIndex=ke(this,bt).lastIndex,!r||!ke(this,Nt).size)return r;const s=[...r];r.length=1;let o;this.hasIndices&&(o=[...r.indices],r.indices.length=1);const i=[0];for(let l=1;l<s.length;l++){const{hidden:a,transferTo:c}=ke(this,Nt).get(l)??{};if(a?i.push(null):(i.push(r.length),r.push(s[l]),this.hasIndices&&r.indices.push(o[l])),c&&s[l]!==void 0){const u=i[c];if(!u)throw new Error(`Invalid capture transfer to "${u}"`);if(r[u]=s[l],this.hasIndices&&(r.indices[u]=o[l]),r.groups){ke(this,Pt)||ze(this,Pt,zm(this.source));const f=ke(this,Pt).get(c);f&&(r.groups[f]=s[l],this.hasIndices&&(r.indices.groups[f]=o[l]))}}}return r},Mt);function Hm(e,t,n,r){if(e.index+=t,e.input=n,r){const s=e.indices;for(let i=0;i<s.length;i++){const l=s[i];l&&(s[i]=[l[0]+t,l[1]+t])}const o=s.groups;o&&Object.keys(o).forEach(i=>{const l=o[i];l&&(o[i]=[l[0]+t,l[1]+t])})}}function Wm(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,s]of t)for(const o of s)Yn(n,o,{}).transferTo=r;return n}function zm(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,s=0,o;for(;o=t.exec(e);){const{0:i,groups:{capture:l,name:a}}=o;i==="["?r++:r?i==="]"&&r--:l&&(s++,a&&n.set(s,a))}return n}function Vm(e,t){const n=qm(e,t);return n.options?new Um(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function qm(e,t){const n=dc(t),r=oc(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Go}),s=wm(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=Nm(s,n),i=cm(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),l=lm(i.pattern),a=im(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,b)=>g-b),f=Array.from(a.captureTransfers),h=s._strategy,d=c.pattern.length>=n.lazyCompileLength;(u.length||f.length||h||d)&&(c.options={...u.length&&{hiddenCaptures:u},...f.length&&{transfers:f},...h&&{strategy:h},...d&&{lazyCompile:d}})}return c}const hl=4294967295;class Km{constructor(t,n={}){w(this,"regexps");this.patterns=t,this.options=n;const{forgiving:r=!1,cache:s,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=s==null?void 0:s.get(i);if(l){if(l instanceof RegExp)return l;if(r)return null;throw l}try{const a=o(i);return s==null||s.set(i,a),a}catch(a){if(s==null||s.set(i,a),r)return null;throw a}})}findNextMatchSync(t,n,r){const s=typeof t=="string"?t:t.content,o=[];function i(l,a,c=0){return{index:l,captureIndices:a.indices.map(u=>u==null?{start:hl,end:hl,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(s);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 Xm(e,t){return Vm(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Jm(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>Xm(n,{target:t.target})),{createScanner(n){return new Km(n,t)},createString(n){return{content:n}}}}const Ym=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"}')),Zm=[Ym],oo=Tt(null),Sc=Tt(!1);let mr=null;const Qm={name:"mesh-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 ey(){return mr||(mr=ug({themes:[Qm],langs:[Zm],engine:Jm()}).then(e=>(oo.value=e,Sc.value=!0,e)),mr)}function ty(){Co(ey);function e(t){const n=typeof t=="string"?t:JSON.stringify(t,null,2);return n?oo.value?oo.value.codeToHtml(n,{lang:"json",theme:"mesh-devtools"}):ny(n):""}return{highlight:e,ready:Sc}}function ny(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const ry=["innerHTML"],Sr={__name:"JsonView",props:{data:{default:null}},setup(e){const t=e,{highlight:n}=ty(),r=qe(()=>t.data===null||t.data===void 0?'<span style="color: var(--syn-null)">null</span>':n(t.data));return(s,o)=>(O(),D("div",{class:"json-view",innerHTML:r.value},null,8,ry))}},sy={key:0,class:"empty"},oy={class:"card-header"},iy={class:"name"},ly={class:"badge accent"},ay={class:"card-body"},cy=["title","onClick"],uy={class:"kv-value"},fy=["onClick"],hy={key:0,class:"card-body",style:{"border-top":"1px solid var(--border-subtle)"}},dy={class:"section-title"},py={style:{"font-size":"10px",color:"var(--text-muted)","margin-bottom":"2px"}},gy={key:0,class:"empty",style:{padding:"8px"}},my={__name:"CollectionsView",props:{collections:{type:Object,default:()=>({})},fetchRecords:{type:Function,required:!0}},emits:["navigate"],setup(e){const t=e,n=qe(()=>Object.entries(t.collections)),r=zr({});async function s(o,i){if(r[o]){delete r[o];return}r[o]=await t.fetchRecords(o,i)}return(o,i)=>n.value.length?(O(),D(J,{key:1},[i[0]||(i[0]=$("div",{class:"view-hint"},'collections with active subscribers - click "records" to see what the resolver returns',-1)),(O(!0),D(J,null,ge(n.value,([l,a])=>(O(),D("div",{key:l,class:"card"},[$("div",oy,[$("span",iy,G(l),1),$("span",ly,G(Object.keys(a.subscribers).length)+" "+G(Object.keys(a.subscribers).length===1?"subscriber":"subscribers"),1)]),$("div",ay,[(O(!0),D(J,null,ge(a.subscribers,(c,u)=>(O(),D("div",{key:u,class:"kv-row"},[$("span",{class:"kv-key conn-link",title:u,onClick:f=>o.$emit("navigate",u)},G(u.slice(0,8)),9,cy),$("span",uy,"v"+G(c.version),1),$("span",{class:"tag accent",style:{"margin-left":"8px",cursor:"pointer"},onClick:f=>s(l,u)},G(r[l]?"hide":"records"),9,fy)]))),128))]),r[l]?(O(),D("div",hy,[$("div",dy,"resolved records ("+G(r[l].recordIds.length)+")",1),(O(!0),D(J,null,ge(r[l].records,c=>(O(),D("div",{key:c.id,style:{"margin-bottom":"8px"}},[$("div",py,G(c.id),1),Oe(Sr,{data:c.data},null,8,["data"])]))),128)),r[l].records.length?ue("",!0):(O(),D("div",gy,"no records"))])):ue("",!0)]))),128))],64)):(O(),D("div",sy,"no collection subscriptions"))}},yy={key:0,class:"empty"},by={class:"card-header"},_y={class:"name"},wy={class:"badge accent"},Cy={class:"card-body"},vy=["title","onClick"],Sy={__name:"RecordsView",props:{records:{type:Object,default:()=>({})}},emits:["navigate"],setup(e){const t=e,n=qe(()=>Object.entries(t.records));return(r,s)=>n.value.length?(O(),D(J,{key:1},[s[0]||(s[0]=$("div",{class:"view-hint"},"records being watched by at least one connection, and their subscription mode",-1)),(O(!0),D(J,null,ge(n.value,([o,i])=>(O(),D("div",{key:o,class:"card"},[$("div",by,[$("span",_y,G(o),1),$("span",wy,G(Object.keys(i.subscribers).length)+" "+G(Object.keys(i.subscribers).length===1?"subscriber":"subscribers"),1)]),$("div",Cy,[(O(!0),D(J,null,ge(i.subscribers,(l,a)=>(O(),D("div",{key:a,class:"kv-row"},[$("span",{class:"kv-key conn-link",title:a,onClick:c=>r.$emit("navigate",a)},G(a.slice(0,8)),9,vy),$("span",{class:Lt(["tag",l==="full"?"accent":""])},G(l),3)]))),128))])]))),128))],64)):(O(),D("div",yy,"no record subscriptions"))}},xy={key:0},ky={class:"section"},Ey={class:"card"},Ay={class:"card-body"},Ry={class:"kv-row"},Iy={class:"kv-value"},$y={class:"kv-row"},Ny={class:"kv-row"},Py={class:"kv-value"},Ty={class:"kv-row"},Oy={key:0,class:"kv-row"},My={class:"kv-value"},Ly={class:"section"},Dy={class:"card"},Fy={class:"card-body"},jy={key:0,class:"section"},Gy={class:"section-title"},By={class:"pattern-list"},Uy={key:1,class:"section"},Hy={class:"section-title"},Wy={class:"pattern-list"},zy={key:2,class:"section"},Vy={class:"section-title"},qy={class:"pattern-list"},Ky={key:3,class:"section"},Xy={class:"section-title"},Jy={class:"kv-key"},Yy={class:"kv-value"},Zy={key:4,class:"section"},Qy={class:"card-header"},eb={class:"name"},tb={class:"card-body"},nb={key:1},rb={class:"card-header"},sb={class:"name"},ob={class:"meta",style:{"font-size":"10px"}},ib={key:0,style:{"margin-right":"8px"}},lb={key:0,class:"card-body"},ab={key:2,class:"empty"},cb={__name:"MetadataView",props:{detail:{type:Object,default:null},connections:{type:Array,default:()=>[]}},setup(e){return(t,n)=>{var r,s,o,i;return e.detail?(O(),D("div",xy,[$("div",ky,[n[5]||(n[5]=$("div",{class:"section-title"},"connection",-1)),$("div",Ey,[$("div",Ay,[$("div",Ry,[n[0]||(n[0]=$("span",{class:"kv-key"},"id",-1)),$("span",Iy,G(e.detail.id),1)]),$("div",$y,[n[1]||(n[1]=$("span",{class:"kv-key"},"local",-1)),$("span",{class:"kv-value",style:dn({color:e.detail.local?"var(--accent)":"var(--text-muted)"})},G(e.detail.local),5)]),$("div",Ny,[n[2]||(n[2]=$("span",{class:"kv-key"},"latency",-1)),$("span",Py,G(e.detail.latency!==null?e.detail.latency+"ms":"-"),1)]),$("div",Ty,[n[3]||(n[3]=$("span",{class:"kv-key"},"alive",-1)),$("span",{class:"kv-value",style:dn({color:e.detail.alive?"var(--accent)":"var(--syn-boolean)"})},G(e.detail.alive),5)]),e.detail.remoteAddress?(O(),D("div",Oy,[n[4]||(n[4]=$("span",{class:"kv-key"},"address",-1)),$("span",My,G(e.detail.remoteAddress),1)])):ue("",!0)])])]),$("div",Ly,[n[6]||(n[6]=$("div",{class:"section-title"},"metadata",-1)),$("div",Dy,[$("div",Fy,[Oe(Sr,{data:e.detail.metadata},null,8,["data"])])])]),(r=e.detail.rooms)!=null&&r.length?(O(),D("div",jy,[$("div",Gy,"rooms ("+G(e.detail.rooms.length)+")",1),$("div",By,[(O(!0),D(J,null,ge(e.detail.rooms,l=>(O(),D("span",{class:"tag accent",key:l},G(l),1))),128))])])):ue("",!0),(s=e.detail.channels)!=null&&s.length?(O(),D("div",Uy,[$("div",Hy,"channels ("+G(e.detail.channels.length)+")",1),$("div",Wy,[(O(!0),D(J,null,ge(e.detail.channels,l=>(O(),D("span",{class:"tag accent",key:l},G(l),1))),128))])])):ue("",!0),(o=e.detail.collections)!=null&&o.length?(O(),D("div",zy,[$("div",Vy,"collections ("+G(e.detail.collections.length)+")",1),$("div",qy,[(O(!0),D(J,null,ge(e.detail.collections,l=>(O(),D("span",{class:"tag accent",key:l.id},G(l.id)+" v"+G(l.version),1))),128))])])):ue("",!0),(i=e.detail.records)!=null&&i.length?(O(),D("div",Ky,[$("div",Xy,"record subscriptions ("+G(e.detail.records.length)+")",1),(O(!0),D(J,null,ge(e.detail.records,l=>(O(),D("div",{key:l.id,class:"kv-row"},[$("span",Jy,G(l.id),1),$("span",Yy,G(l.mode),1)]))),128))])):ue("",!0),e.detail.presence&&Object.keys(e.detail.presence).length?(O(),D("div",Zy,[n[7]||(n[7]=$("div",{class:"section-title"},"presence state",-1)),(O(!0),D(J,null,ge(e.detail.presence,(l,a)=>(O(),D("div",{key:a,class:"card"},[$("div",Qy,[$("span",eb,G(a),1)]),$("div",tb,[Oe(Sr,{data:l},null,8,["data"])])]))),128))])):ue("",!0)])):e.connections.length?(O(),D("div",nb,[n[8]||(n[8]=$("div",{class:"section-title",style:{"margin-bottom":"12px"}},"all connections",-1)),(O(!0),D(J,null,ge(e.connections,l=>{var a,c;return O(),D("div",{key:l.id,class:"card"},[$("div",rb,[$("span",sb,G(((a=l.metadata)==null?void 0:a.name)||((c=l.metadata)==null?void 0:c.username)||l.id.slice(0,8)),1),$("span",ob,[l.latency!==null?(O(),D("span",ib,G(l.latency)+"ms",1)):ue("",!0),$("span",{style:dn({color:l.alive?"var(--accent)":"var(--syn-boolean)"})},G(l.alive?"alive":"dead"),5)])]),l.metadata?(O(),D("div",lb,[Oe(Sr,{data:l.metadata},null,8,["data"])])):ue("",!0)])}),128))])):(O(),D("div",ab,"no connections"))}}},ub={class:"app"},fb={class:"top-bar"},hb={class:"top-bar-right"},db={key:0,class:"instance-id"},pb={class:"tab-bar"},gb=["onClick"],mb={key:0,class:"count"},yb={class:"main"},bb={class:"sidebar"},_b={key:0,class:"sidebar-section"},wb={style:{float:"right","font-size":"9px"}},Cb={class:"exposed-label"},vb={class:"content"},Sb={__name:"App",setup(e){const t=Tt("rooms"),n=Tt(!0),r={channels:"channels",records:"records",writableRecords:"writable",collections:"collections",presence:"presence",commands:"commands"};function s(C){return r[C]||C}function o(C){u(C),t.value="metadata"}const{state:i,connectionDetail:l,selectedConnectionId:a,error:c,selectConnection:u,fetchCollectionRecords:f}=eh(),h=qe(()=>{var C;return(C=i.value)!=null&&C.rooms?a.value?i.value.rooms.filter(y=>y.members.includes(a.value)):i.value.rooms:[]}),d=qe(()=>{var y;if(!((y=i.value)!=null&&y.channels))return{};if(!a.value)return i.value.channels;const C={};for(const[v,T]of Object.entries(i.value.channels))T.includes(a.value)&&(C[v]=T);return C}),g=qe(()=>{var y;if(!((y=i.value)!=null&&y.collections))return{};if(!a.value)return i.value.collections;const C={};for(const[v,T]of Object.entries(i.value.collections))T.subscribers[a.value]&&(C[v]=T);return C}),b=qe(()=>{var y;if(!((y=i.value)!=null&&y.records))return{};if(!a.value)return i.value.records;const C={};for(const[v,T]of Object.entries(i.value.records))T.subscribers[a.value]&&(C[v]=T);return C}),R=qe(()=>{var y;if(!((y=i.value)!=null&&y.exposed))return{};const C={};for(const[v,T]of Object.entries(i.value.exposed))T.length&&(C[v]=T);return C}),S=qe(()=>[{id:"rooms",label:"rooms",count:h.value.length},{id:"channels",label:"channels",count:Object.keys(d.value).length},{id:"collections",label:"collections",count:Object.keys(g.value).length},{id:"records",label:"records",count:Object.keys(b.value).length},{id:"metadata",label:"metadata"}]);return(C,y)=>{var v,T,q,j;return O(),D("div",ub,[$("div",fb,[y[1]||(y[1]=$("div",{class:"top-bar-left"},[$("span",{class:"logo"},[js("mesh "),$("span",null,"devtools")])],-1)),$("div",hb,[$("span",{class:Lt(["pulse",{disconnected:!!Ve(c)}])},null,2),Ve(i)?(O(),D("span",db,"instance "+G((v=Ve(i).instanceId)==null?void 0:v.slice(0,8)),1)):ue("",!0)])]),$("div",pb,[(O(!0),D(J,null,ge(S.value,K=>(O(),D("div",{key:K.id,class:Lt(["tab",{active:t.value===K.id}]),onClick:ie=>t.value=K.id},[js(G(K.label),1),K.count!==void 0?(O(),D("span",mb,G(K.count),1)):ue("",!0)],10,gb))),128))]),$("div",yb,[$("div",bb,[Oe(ih,{connections:((T=Ve(i))==null?void 0:T.connections)||[],"selected-id":Ve(a),onSelect:Ve(u)},null,8,["connections","selected-id","onSelect"]),(q=Ve(i))!=null&&q.exposed?(O(),D("div",_b,[$("div",{class:"sidebar-header",style:{cursor:"pointer","user-select":"none"},onClick:y[0]||(y[0]=K=>n.value=!n.value)},[y[2]||(y[2]=$("span",null,"registered",-1)),$("span",wb,G(n.value?"−":"+"),1)]),n.value?(O(!0),D(J,{key:0},ge(R.value,(K,ie)=>(O(),D("div",{key:ie,class:"exposed-row"},[$("span",Cb,G(s(ie)),1),(O(!0),D(J,null,ge(K,ae=>(O(),D("span",{class:"tag",key:ae},G(ae),1))),128))]))),128)):ue("",!0)])):ue("",!0)]),$("div",vb,[t.value==="rooms"?(O(),ln(ph,{key:0,rooms:h.value,onNavigate:o},null,8,["rooms"])):ue("",!0),t.value==="channels"?(O(),ln(wh,{key:1,channels:d.value,onNavigate:o},null,8,["channels"])):ue("",!0),t.value==="collections"?(O(),ln(my,{key:2,collections:g.value,"fetch-records":Ve(f),onNavigate:o},null,8,["collections","fetch-records"])):ue("",!0),t.value==="records"?(O(),ln(Sy,{key:3,records:b.value,onNavigate:o},null,8,["records"])):ue("",!0),t.value==="metadata"?(O(),ln(cb,{key:4,detail:Ve(l),connections:((j=Ve(i))==null?void 0:j.connections)||[]},null,8,["detail","connections"])):ue("",!0)])])])}}};Yf(Sb).mount("#app");