scream-code 0.14.9 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-2Dd57a5d.mjs → app-CPu6R7nd.mjs} +1138 -50
- package/dist/{dispatch-CJPpI4gm.mjs → dispatch-BPcn43Vw.mjs} +1 -1
- package/dist/{dispatch-1ojfKMwf.mjs → dispatch-D8ovLbmr.mjs} +259 -142
- package/dist/main.mjs +1 -1
- package/dist/public/assets/index-BfVIY6UW.css +1 -0
- package/dist/public/assets/index-CYmwuyd8.js +93 -0
- package/dist/public/assets/index-CYmwuyd8.js.map +1 -0
- package/dist/public/assets/logo-v2-ChmPAIbI.svg +1 -0
- package/dist/public/gateway.html +156 -0
- package/dist/public/index.html +2 -2
- package/package.json +8 -2
- package/dist/public/assets/index-CopRDlgZ.js +0 -90
- package/dist/public/assets/index-CopRDlgZ.js.map +0 -1
- package/dist/public/assets/index-CyGAkekh.css +0 -1
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var Qu=Object.defineProperty;var ef=(e,t,n)=>t in e?Qu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var T=(e,t,n)=>ef(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/**
|
|
2
|
-
* @vue/shared v3.5.40
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**/function ai(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Be={},Kn=[],jt=()=>{},Sa=()=>!1,Br=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Gr=e=>e.startsWith("onUpdate:"),Xe=Object.assign,ci=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},tf=Object.prototype.hasOwnProperty,Ee=(e,t)=>tf.call(e,t),ue=Array.isArray,Zn=e=>Bs(e)==="[object Map]",jr=e=>Bs(e)==="[object Set]",nl=e=>Bs(e)==="[object Date]",ve=e=>typeof e=="function",ze=e=>typeof e=="string",Ut=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",_a=e=>(Pe(e)||ve(e))&&ve(e.then)&&ve(e.catch),xa=Object.prototype.toString,Bs=e=>xa.call(e),nf=e=>Bs(e).slice(8,-1),Ca=e=>Bs(e)==="[object Object]",ui=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,vs=ai(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zr=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},sf=/-\w/g,wt=zr(e=>e.replace(sf,t=>t.slice(1).toUpperCase())),rf=/\B([A-Z])/g,Tn=zr(e=>e.replace(rf,"-$1").toLowerCase()),Fr=zr(e=>e.charAt(0).toUpperCase()+e.slice(1)),co=zr(e=>e?`on${Fr(e)}`:""),en=(e,t)=>!Object.is(e,t),ir=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},$a=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Ur=e=>{const t=parseFloat(e);return isNaN(t)?e:t},of=e=>{const t=ze(e)?Number(e):NaN;return isNaN(t)?e:t};let sl;const Hr=()=>sl||(sl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gn(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=ze(s)?uf(s):gn(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(ze(e)||Pe(e))return e}const lf=/;(?![^(]*\))/g,af=/:([^]+)/,cf=/\/\*[^]*?\*\//g;function uf(e){const t={};return e.replace(cf,"").split(lf).forEach(n=>{if(n){const s=n.split(af);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function be(e){let t="";if(ze(e))t=e;else if(ue(e))for(let n=0;n<e.length;n++){const s=be(e[n]);s&&(t+=s+" ")}else if(Pe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const ff="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",df=ai(ff);function Ta(e){return!!e||e===""}function hf(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Gs(e[s],t[s]);return n}function Gs(e,t){if(e===t)return!0;let n=nl(e),s=nl(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Ut(e),s=Ut(t),n||s)return e===t;if(n=ue(e),s=ue(t),n||s)return n&&s?hf(e,t):!1;if(n=Pe(e),s=Pe(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const i in e){const l=e.hasOwnProperty(i),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!Gs(e[i],t[i]))return!1}}return String(e)===String(t)}function pf(e,t){return e.findIndex(n=>Gs(n,t))}const Ra=e=>!!(e&&e.__v_isRef===!0),E=e=>ze(e)?e:e==null?"":ue(e)||Pe(e)&&(e.toString===xa||!ve(e.toString))?Ra(e)?E(e.value):JSON.stringify(e,Aa,2):String(e),Aa=(e,t)=>Ra(t)?Aa(e,t.value):Zn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[uo(s,o)+" =>"]=r,n),{})}:jr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>uo(n))}:Ut(t)?uo(t):Pe(t)&&!ue(t)&&!Ca(t)?String(t):t,uo=(e,t="")=>{var n;return Ut(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function gf(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/**
|
|
6
|
-
* @vue/reactivity v3.5.40
|
|
7
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
-
* @license MIT
|
|
9
|
-
**/let it;class mf{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&it&&(it.active?(this.parent=it,this.index=(it.scopes||(it.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[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){const r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=it;try{return it=this,t()}finally{it=n}}}on(){++this._on===1&&(this.prevScope=it,it=this)}off(){if(this._on>0&&--this._on===0){if(it===this)it=this.prevScope;else{let t=it;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const r=this.scopes.slice();for(n=0,s=r.length;n<s;n++)r[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function vf(){return it}let Ge;const fo=new WeakSet;class Ea{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,it&&(it.active?it.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,fo.has(this)&&(fo.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||La(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,rl(this),Pa(this);const t=Ge,n=zt;Ge=this,zt=!0;try{return this.fn()}finally{Ma(this),Ge=t,zt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)hi(t);this.deps=this.depsTail=void 0,rl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?fo.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Lo(this)&&this.run()}get dirty(){return Lo(this)}}let Ia=0,ys,bs;function La(e,t=!1){if(e.flags|=8,t){e.next=bs,bs=e;return}e.next=ys,ys=e}function fi(){Ia++}function di(){if(--Ia>0)return;if(bs){let t=bs;for(bs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ys;){let t=ys;for(ys=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Pa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ma(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),hi(s),yf(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Lo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Na(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Na(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Cs)||(e.globalVersion=Cs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Lo(e))))return;e.flags|=2;const t=e.dep,n=Ge,s=zt;Ge=e,zt=!0;try{Pa(e);const r=e.fn(e._value);(t.version===0||en(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ge=n,zt=s,Ma(e),e.flags&=-3}}function hi(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)hi(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function yf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let zt=!0;const Oa=[];function vn(){Oa.push(zt),zt=!1}function yn(){const e=Oa.pop();zt=e===void 0?!0:e}function rl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ge;Ge=void 0;try{t()}finally{Ge=n}}}let Cs=0;class bf{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 pi{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(!Ge||!zt||Ge===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ge)n=this.activeLink=new bf(Ge,this),Ge.deps?(n.prevDep=Ge.depsTail,Ge.depsTail.nextDep=n,Ge.depsTail=n):Ge.deps=Ge.depsTail=n,Da(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ge.depsTail,n.nextDep=void 0,Ge.depsTail.nextDep=n,Ge.depsTail=n,Ge.deps===n&&(Ge.deps=s)}return n}trigger(t){this.version++,Cs++,this.notify(t)}notify(t){fi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{di()}}}function Da(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Da(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Po=new WeakMap,On=Symbol(""),Mo=Symbol(""),$s=Symbol("");function ut(e,t,n){if(zt&&Ge){let s=Po.get(e);s||Po.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new pi),r.map=s,r.key=n),r.track()}}function cn(e,t,n,s,r,o){const i=Po.get(e);if(!i){Cs++;return}const l=a=>{a&&a.trigger()};if(fi(),t==="clear")i.forEach(l);else{const a=ue(e),c=a&&ui(n);if(a&&n==="length"){const u=Number(s);i.forEach((h,g)=>{(g==="length"||g===$s||!Ut(g)&&g>=u)&&l(h)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),c&&l(i.get($s)),t){case"add":a?c&&l(i.get("length")):(l(i.get(On)),Zn(e)&&l(i.get(Mo)));break;case"delete":a||(l(i.get(On)),Zn(e)&&l(i.get(Mo)));break;case"set":Zn(e)&&l(i.get(On));break}}di()}function Hn(e){const t=Ae(e);return t===e?t:(ut(t,"iterate",$s),Nt(e)?t:t.map(Ht))}function qr(e){return ut(e=Ae(e),"iterate",$s),e}function Xt(e,t){return bn(e)?ts(Dn(e)?Ht(t):t):Ht(t)}const kf={__proto__:null,[Symbol.iterator](){return ho(this,Symbol.iterator,e=>Xt(this,e))},concat(...e){return Hn(this).concat(...e.map(t=>ue(t)?Hn(t):t))},entries(){return ho(this,"entries",e=>(e[1]=Xt(this,e[1]),e))},every(e,t){return on(this,"every",e,t,void 0,arguments)},filter(e,t){return on(this,"filter",e,t,n=>n.map(s=>Xt(this,s)),arguments)},find(e,t){return on(this,"find",e,t,n=>Xt(this,n),arguments)},findIndex(e,t){return on(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return on(this,"findLast",e,t,n=>Xt(this,n),arguments)},findLastIndex(e,t){return on(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return on(this,"forEach",e,t,void 0,arguments)},includes(...e){return po(this,"includes",e)},indexOf(...e){return po(this,"indexOf",e)},join(e){return Hn(this).join(e)},lastIndexOf(...e){return po(this,"lastIndexOf",e)},map(e,t){return on(this,"map",e,t,void 0,arguments)},pop(){return is(this,"pop")},push(...e){return is(this,"push",e)},reduce(e,...t){return ol(this,"reduce",e,t)},reduceRight(e,...t){return ol(this,"reduceRight",e,t)},shift(){return is(this,"shift")},some(e,t){return on(this,"some",e,t,void 0,arguments)},splice(...e){return is(this,"splice",e)},toReversed(){return Hn(this).toReversed()},toSorted(e){return Hn(this).toSorted(e)},toSpliced(...e){return Hn(this).toSpliced(...e)},unshift(...e){return is(this,"unshift",e)},values(){return ho(this,"values",e=>Xt(this,e))}};function ho(e,t,n){const s=qr(e),r=s[t]();return s!==e&&!Nt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const wf=Array.prototype;function on(e,t,n,s,r,o){const i=qr(e),l=i!==e&&!Nt(e),a=i[t];if(a!==wf[t]){const h=a.apply(e,o);return l?Ht(h):h}let c=n;i!==e&&(l?c=function(h,g){return n.call(this,Xt(e,h),g,e)}:n.length>2&&(c=function(h,g){return n.call(this,h,g,e)}));const u=a.call(i,c,s);return l&&r?r(u):u}function ol(e,t,n,s){const r=qr(e),o=r!==e&&!Nt(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(c,u,h){return l&&(l=!1,c=Xt(e,c)),n.call(this,c,Xt(e,u),h,e)}):n.length>3&&(i=function(c,u,h){return n.call(this,c,u,h,e)}));const a=r[t](i,...s);return l?Xt(e,a):a}function po(e,t,n){const s=Ae(e);ut(s,"iterate",$s);const r=s[t](...n);return(r===-1||r===!1)&&yi(n[0])?(n[0]=Ae(n[0]),s[t](...n)):r}function is(e,t,n=[]){vn(),fi();const s=Ae(e)[t].apply(e,n);return di(),yn(),s}const Sf=ai("__proto__,__v_isRef,__isVue"),Ba=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ut));function _f(e){Ut(e)||(e=String(e));const t=Ae(this);return ut(t,"has",e),t.hasOwnProperty(e)}class Ga{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Pf:Ua:o?Fa:za).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=ue(t);if(!r){let a;if(i&&(a=kf[n]))return a;if(n==="hasOwnProperty")return _f}const l=Reflect.get(t,n,pt(t)?t:s);if((Ut(n)?Ba.has(n):Sf(n))||(r||ut(t,"get",n),o))return l;if(pt(l)){const a=i&&ui(n)?l:l.value;return r&&Pe(a)?Oo(a):a}return Pe(l)?r?Oo(l):mi(l):l}}class ja extends Ga{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=ue(t)&&ui(n);if(!this._isShallow){const c=bn(o);if(!Nt(s)&&!bn(s)&&(o=Ae(o),s=Ae(s)),!i&&pt(o)&&!pt(s))return c||(o.value=s),!0}const l=i?Number(n)<t.length:Ee(t,n),a=Reflect.set(t,n,s,pt(t)?t:r);return t===Ae(r)&&a&&(l?en(s,o)&&cn(t,"set",n,s):cn(t,"add",n,s)),a}deleteProperty(t,n){const s=Ee(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&cn(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Ut(n)||!Ba.has(n))&&ut(t,"has",n),s}ownKeys(t){return ut(t,"iterate",ue(t)?"length":On),Reflect.ownKeys(t)}}class xf extends Ga{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Cf=new ja,$f=new xf,Tf=new ja(!0);const No=e=>e,Zs=e=>Reflect.getPrototypeOf(e);function Rf(e,t,n){return function(...s){const r=this.__v_raw,o=Ae(r),i=Zn(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...s),u=n?No:t?ts:Ht;return!t&&ut(o,"iterate",a?Mo:On),Xe(Object.create(c),{next(){const{value:h,done:g}=c.next();return g?{value:h,done:g}:{value:l?[u(h[0]),u(h[1])]:u(h),done:g}}})}}function Ys(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Af(e,t){const n={get(r){const o=this.__v_raw,i=Ae(o),l=Ae(r);e||(en(r,l)&&ut(i,"get",r),ut(i,"get",l));const{has:a}=Zs(i),c=t?No:e?ts:Ht;if(a.call(i,r))return c(o.get(r));if(a.call(i,l))return c(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&ut(Ae(r),"iterate",On),r.size},has(r){const o=this.__v_raw,i=Ae(o),l=Ae(r);return e||(en(r,l)&&ut(i,"has",r),ut(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,a=Ae(l),c=t?No:e?ts:Ht;return!e&&ut(a,"iterate",On),l.forEach((u,h)=>r.call(o,c(u),c(h),i))}};return Xe(n,e?{add:Ys("add"),set:Ys("set"),delete:Ys("delete"),clear:Ys("clear")}:{add(r){const o=Ae(this),i=Zs(o),l=Ae(r),a=!t&&!Nt(r)&&!bn(r)?l:r;return i.has.call(o,a)||en(r,a)&&i.has.call(o,r)||en(l,a)&&i.has.call(o,l)||(o.add(a),cn(o,"add",a,a)),this},set(r,o){!t&&!Nt(o)&&!bn(o)&&(o=Ae(o));const i=Ae(this),{has:l,get:a}=Zs(i);let c=l.call(i,r);c||(r=Ae(r),c=l.call(i,r));const u=a.call(i,r);return i.set(r,o),c?en(o,u)&&cn(i,"set",r,o):cn(i,"add",r,o),this},delete(r){const o=Ae(this),{has:i,get:l}=Zs(o);let a=i.call(o,r);a||(r=Ae(r),a=i.call(o,r)),l&&l.call(o,r);const c=o.delete(r);return a&&cn(o,"delete",r,void 0),c},clear(){const r=Ae(this),o=r.size!==0,i=r.clear();return o&&cn(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Rf(r,e,t)}),n}function gi(e,t){const n=Af(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Ee(n,r)&&r in s?n:s,r,o)}const Ef={get:gi(!1,!1)},If={get:gi(!1,!0)},Lf={get:gi(!0,!1)};const za=new WeakMap,Fa=new WeakMap,Ua=new WeakMap,Pf=new WeakMap;function Mf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function mi(e){return bn(e)?e:vi(e,!1,Cf,Ef,za)}function Nf(e){return vi(e,!1,Tf,If,Fa)}function Oo(e){return vi(e,!0,$f,Lf,Ua)}function vi(e,t,n,s,r){if(!Pe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=r.get(e);if(o)return o;const i=Mf(nf(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function Dn(e){return bn(e)?Dn(e.__v_raw):!!(e&&e.__v_isReactive)}function bn(e){return!!(e&&e.__v_isReadonly)}function Nt(e){return!!(e&&e.__v_isShallow)}function yi(e){return e?!!e.__v_raw:!1}function Ae(e){const t=e&&e.__v_raw;return t?Ae(t):e}function Of(e){return!Ee(e,"__v_skip")&&Object.isExtensible(e)&&$a(e,"__v_skip",!0),e}const Ht=e=>Pe(e)?mi(e):e,ts=e=>Pe(e)?Oo(e):e;function pt(e){return e?e.__v_isRef===!0:!1}function F(e){return Df(e,!1)}function Df(e,t){return pt(e)?e:new Bf(e,t)}class Bf{constructor(t,n){this.dep=new pi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ae(t),this._value=n?t:Ht(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Nt(t)||bn(t);t=s?t:Ae(t),en(t,n)&&(this._rawValue=t,this._value=s?t:Ht(t),this.dep.trigger())}}function X(e){return pt(e)?e.value:e}function Gf(e){return ve(e)?e():X(e)}const jf={get:(e,t,n)=>t==="__v_raw"?e:X(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return pt(r)&&!pt(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Ha(e){return Dn(e)?e:new Proxy(e,jf)}class zf{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new pi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Cs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ge!==this)return La(this,!0),!0}get value(){const t=this.dep.track();return Na(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ff(e,t,n=!1){let s,r;return ve(e)?s=e:(s=e.get,r=e.set),new zf(s,r,n)}const Js={},dr=new WeakMap;let In;function Uf(e,t=!1,n=In){if(n){let s=dr.get(n);s||dr.set(n,s=[]),s.push(e)}}function Hf(e,t,n=Be){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=n,c=w=>r?w:Nt(w)||r===!1||r===0?un(w,1):un(w);let u,h,g,p,d=!1,m=!1;if(pt(e)?(h=()=>e.value,d=Nt(e)):Dn(e)?(h=()=>c(e),d=!0):ue(e)?(m=!0,d=e.some(w=>Dn(w)||Nt(w)),h=()=>e.map(w=>{if(pt(w))return w.value;if(Dn(w))return c(w);if(ve(w))return a?a(w,2):w()})):ve(e)?t?h=a?()=>a(e,2):e:h=()=>{if(g){vn();try{g()}finally{yn()}}const w=In;In=u;try{return a?a(e,3,[p]):e(p)}finally{In=w}}:h=jt,t&&r){const w=h,M=r===!0?1/0:r;h=()=>un(w(),M)}const S=vf(),b=()=>{u.stop(),S&&S.active&&ci(S.effects,u)};if(o&&t){const w=t;t=(...M)=>{const K=w(...M);return b(),K}}let C=m?new Array(e.length).fill(Js):Js;const $=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(t){const M=u.run();if(w||r||d||(m?M.some((K,B)=>en(K,C[B])):en(M,C))){g&&g();const K=In;In=u;try{const B=[M,C===Js?void 0:m&&C[0]===Js?[]:C,p];C=M,a?a(t,3,B):t(...B)}finally{In=K}}}else u.run()};return l&&l($),u=new Ea(h),u.scheduler=i?()=>i($,!1):$,p=w=>Uf(w,!1,u),g=u.onStop=()=>{const w=dr.get(u);if(w){if(a)a(w,4);else for(const M of w)M();dr.delete(u)}},t?s?$(!0):C=u.run():i?i($.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}function un(e,t=1/0,n){if(t<=0||!Pe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,pt(e))un(e.value,t,n);else if(ue(e))for(let s=0;s<e.length;s++)un(e[s],t,n);else if(jr(e)||Zn(e))e.forEach(s=>{un(s,t,n)});else if(Ca(e)){for(const s in e)un(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&un(e[s],t,n)}return e}/**
|
|
10
|
-
* @vue/runtime-core v3.5.40
|
|
11
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
-
* @license MIT
|
|
13
|
-
**/function js(e,t,n,s){try{return s?e(...s):e()}catch(r){Wr(r,t,n)}}function Ot(e,t,n,s){if(ve(e)){const r=js(e,t,n,s);return r&&_a(r)&&r.catch(o=>{Wr(o,t,n)}),r}if(ue(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Ot(e[o],t,n,s));return r}}function Wr(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Be;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 h=0;h<u.length;h++)if(u[h](e,a,c)===!1)return}l=l.parent}if(o){vn(),js(o,null,10,[e,a,c]),yn();return}}qf(e,n,r,s,i)}function qf(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const bt=[];let Jt=-1;const Yn=[];let xn=null,qn=0;const qa=Promise.resolve();let hr=null;function Gt(e){const t=hr||qa;return e?t.then(this?e.bind(this):e):t}function Wf(e){let t=Jt+1,n=bt.length;for(;t<n;){const s=t+n>>>1,r=bt[s],o=Ts(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function bi(e){if(!(e.flags&1)){const t=Ts(e),n=bt[bt.length-1];!n||!(e.flags&2)&&t>=Ts(n)?bt.push(e):bt.splice(Wf(t),0,e),e.flags|=1,Wa()}}function Wa(){hr||(hr=qa.then(Za))}function Va(e){ue(e)?Yn.push(...e):xn&&e.id===-1?xn.splice(qn+1,0,e):e.flags&1||(Yn.push(e),e.flags|=1),Wa()}function il(e,t,n=Jt+1){for(;n<bt.length;n++){const s=bt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;bt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Ka(e){if(Yn.length){const t=[...new Set(Yn)].sort((n,s)=>Ts(n)-Ts(s));if(Yn.length=0,xn){xn.push(...t);return}for(xn=t,qn=0;qn<xn.length;qn++){const n=xn[qn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}xn=null,qn=0}}const Ts=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Za(e){try{for(Jt=0;Jt<bt.length;Jt++){const t=bt[Jt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),js(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Jt<bt.length;Jt++){const t=bt[Jt];t&&(t.flags&=-2)}Jt=-1,bt.length=0,Ka(),hr=null,(bt.length||Yn.length)&&Za()}}let lt=null,Ya=null;function pr(e){const t=lt;return lt=e,Ya=e&&e.type.__scopeId||null,t}function at(e,t=lt,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&vr(-1);const o=pr(t),i=mn.length;let l;try{l=e(...r)}finally{for(let a=mn.length;a>i;a--)Ci();pr(o),s._d&&vr(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Qe(e,t){if(lt===null)return e;const n=Qr(lt),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,l,a=Be]=t[r];o&&(ve(o)&&(o={mounted:o,updated:o}),o.deep&&un(i),s.push({dir:o,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function Rn(e,t,n,s){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];o&&(l.oldValue=o[i].value);let a=l.dir[s];a&&(vn(),Ot(a,n,8,[e.el,l,e,t]),yn())}}function Bn(e,t){if(dt){let n=dt.provides;const s=dt.parent&&dt.parent.provides;s===n&&(n=dt.provides=Object.create(s)),n[e]=t}}function Ft(e,t,n=!1){const s=Xr();if(s||Xn){let r=Xn?Xn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&ve(t)?t.call(s&&s.proxy):t}}const Vf=Symbol.for("v-scx"),Kf=()=>Ft(Vf);function Ne(e,t,n){return Ja(e,t,n)}function Ja(e,t,n=Be){const{immediate:s,deep:r,flush:o,once:i}=n,l=Xe({},n),a=t&&s||!t&&o!=="post";let c;if(Is){if(o==="sync"){const p=Kf();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=jt,p.resume=jt,p.pause=jt,p}}const u=dt;l.call=(p,d,m)=>Ot(p,u,d,m);let h=!1;o==="post"?l.scheduler=p=>{vt(p,u&&u.suspense)}:o!=="sync"&&(h=!0,l.scheduler=(p,d)=>{d?p():bi(p)}),l.augmentJob=p=>{t&&(p.flags|=4),h&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const g=Hf(e,t,l);return Is&&(c?c.push(g):a&&g()),g}function Zf(e,t,n){const s=this.proxy,r=ze(e)?e.includes(".")?Xa(s,e):()=>s[e]:e.bind(s,s);let o;ve(t)?o=t:(o=t.handler,n=t);const i=zs(this),l=Ja(r,o.bind(s),n);return i(),l}function Xa(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const Sn=new WeakMap,Qa=Symbol("_vte"),ec=e=>e.__isTeleport,Ln=e=>e&&(e.disabled||e.disabled===""),Yf=e=>e&&(e.defer||e.defer===""),ll=e=>typeof SVGElement<"u"&&e instanceof SVGElement,al=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Do=(e,t)=>{const n=e&&e.to;return ze(n)?t?t(n):null:n},Jf={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,a,c){const{mc:u,pc:h,pbc:g,o:{insert:p,querySelector:d,createText:m,createComment:S,parentNode:b}}=c,C=Ln(t.props);let{dynamicChildren:$}=t;const w=(B,ce,q)=>{B.shapeFlag&16&&u(B.children,ce,q,r,o,i,l,a)},M=(B=t)=>{const ce=Ln(B.props),q=B.target=Do(B.props,d),re=Bo(q,B,m,p);q&&(i!=="svg"&&ll(q)?i="svg":i!=="mathml"&&al(q)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(q),ce||(w(B,q,re),hs(B,!1)))},K=B=>{const ce=()=>{if(Sn.get(B)===ce){if(Sn.delete(B),Ln(B.props)){const q=b(B.el)||n;w(B,q,B.anchor),hs(B,!0)}M(B)}};Sn.set(B,ce),vt(ce,o)};if(e==null){const B=t.el=m(""),ce=t.anchor=m("");if(p(B,n,s),p(ce,n,s),Yf(t.props)||o&&o.pendingBranch){K(t);return}C&&(w(t,n,ce),hs(t,!0)),M()}else{t.el=e.el;const B=t.anchor=e.anchor,ce=Sn.get(e);if(ce){ce.flags|=8,Sn.delete(e),K(t);return}t.targetStart=e.targetStart;const q=t.target=e.target,re=t.targetAnchor=e.targetAnchor,pe=Ln(e.props),j=pe?n:q,ge=pe?B:re;if(i==="svg"||ll(q)?i="svg":(i==="mathml"||al(q))&&(i="mathml"),$?(g(e.dynamicChildren,$,j,r,o,i,l),xi(e,t,!0)):a||h(e,t,j,ge,r,o,i,l,!1),C)pe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Xs(t,n,B,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const N=Do(t.props,d);N&&(t.target=N,Xs(t,N,null,c,0))}else pe&&Xs(t,q,re,c,1);hs(t,C)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:a,targetStart:c,targetAnchor:u,target:h,props:g}=e,p=Ln(g),d=o||!p,m=Sn.get(e);if(m&&(m.flags|=8,Sn.delete(e)),h&&(r(c),r(u)),o&&r(a),!m&&(p||h)&&i&16)for(let S=0;S<l.length;S++){const b=l[S];s(b,t,n,d,!!b.dynamicChildren)}},move:Xs,hydrate:Xf};function Xs(e,t,n,{o:{insert:s},m:r},o=2){o===0&&s(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:a,children:c,props:u}=e,h=o===2;if(h&&s(i,t,n),!Sn.has(e)&&(!h||Ln(u))&&a&16)for(let g=0;g<c.length;g++)r(c[g],t,n,2);h&&s(l,t,n)}function Xf(e,t,n,s,r,o,{o:{nextSibling:i,parentNode:l,querySelector:a,insert:c,createText:u}},h){function g(S,b){let C=b;for(;C;){if(C&&C.nodeType===8){if(C.data==="teleport start anchor")t.targetStart=C;else if(C.data==="teleport anchor"){t.targetAnchor=C,S._lpa=t.targetAnchor&&i(t.targetAnchor);break}}C=i(C)}}function p(S,b){b.anchor=h(i(S),b,l(S),n,s,r,o)}const d=t.target=Do(t.props,a),m=Ln(t.props);if(d){const S=d._lpa||d.firstChild;t.shapeFlag&16&&(m?(p(e,t),g(d,S),t.targetAnchor||Bo(d,t,u,c,l(e)===d?e:null)):(t.anchor=i(e),g(d,S),t.targetAnchor||Bo(d,t,u,c),h(S&&i(S),t,d,n,s,r,o))),hs(t,m)}else m&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const ki=Jf;function hs(e,t){const n=e.ctx;if(n&&n.ut){let s,r;for(t?(s=e.el,r=e.anchor):(s=e.targetStart,r=e.targetAnchor);s&&s!==r;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function Bo(e,t,n,s,r=null){const o=t.targetStart=n(""),i=t.targetAnchor=n("");return o[Qa]=i,e&&(s(o,e,r),s(i,e,r)),i}const Pt=Symbol("_leaveCb"),ls=Symbol("_enterCb");function tc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return tn(()=>{e.isMounted=!0}),nn(()=>{e.isUnmounting=!0}),e}const Et=[Function,Array],nc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Et,onEnter:Et,onAfterEnter:Et,onEnterCancelled:Et,onBeforeLeave:Et,onLeave:Et,onAfterLeave:Et,onLeaveCancelled:Et,onBeforeAppear:Et,onAppear:Et,onAfterAppear:Et,onAppearCancelled:Et},sc=e=>{const t=e.subTree;return t.component?sc(t.component):t},Qf={name:"BaseTransition",props:nc,setup(e,{slots:t}){const n=Xr(),s=tc();return()=>{const r=t.default&&wi(t.default(),!0),o=r&&r.length?rc(r):n.subTree?W():void 0;if(!o)return;const i=Ae(e),{mode:l}=i;if(s.isLeaving)return go(o);const a=cl(o);if(!a)return go(o);let c=Rs(a,i,s,n,h=>c=h);a.type!==ft&&jn(a,c);let u=n.subTree&&cl(n.subTree);if(u&&u.type!==ft&&!Pn(u,a)&&sc(n).type!==ft){let h=Rs(u,i,s,n);if(jn(u,h),l==="out-in"&&a.type!==ft)return s.isLeaving=!0,h.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,u=void 0},go(o);l==="in-out"&&a.type!==ft?h.delayLeave=(g,p,d)=>{const m=oc(s,u);m[String(u.key)]=u,g[Pt]=()=>{p(),g[Pt]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{d(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function rc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ft){t=n;break}}return t}const ed=Qf;function oc(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Rs(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:h,onBeforeLeave:g,onLeave:p,onAfterLeave:d,onLeaveCancelled:m,onBeforeAppear:S,onAppear:b,onAfterAppear:C,onAppearCancelled:$}=t,w=String(e.key),M=oc(n,e),K=(q,re)=>{q&&Ot(q,s,9,re)},B=(q,re)=>{const pe=re[1];K(q,re),ue(q)?q.every(j=>j.length<=1)&&pe():q.length<=1&&pe()},ce={mode:i,persisted:l,beforeEnter(q){let re=a;if(!n.isMounted)if(o)re=S||a;else return;q[Pt]&&q[Pt](!0);const pe=M[w];pe&&Pn(e,pe)&&pe.el[Pt]&&pe.el[Pt](),K(re,[q])},enter(q){if(M[w]===e)return;let re=c,pe=u,j=h;if(!n.isMounted)if(o)re=b||c,pe=C||u,j=$||h;else return;let ge=!1;q[ls]=R=>{ge||(ge=!0,R?K(j,[q]):K(pe,[q]),ce.delayedLeave&&ce.delayedLeave(),q[ls]=void 0)};const N=q[ls].bind(null,!1);re?B(re,[q,N]):N()},leave(q,re){const pe=String(e.key);if(q[ls]&&q[ls](!0),n.isUnmounting)return re();K(g,[q]);let j=!1;q[Pt]=N=>{j||(j=!0,re(),N?K(m,[q]):K(d,[q]),q[Pt]=void 0,M[pe]===e&&delete M[pe])};const ge=q[Pt].bind(null,!1);M[pe]=e,p?B(p,[q,ge]):ge()},clone(q){const re=Rs(q,t,n,s,r);return r&&r(re),re}};return ce}function go(e){if(Vr(e))return e=$n(e),e.children=null,e}function cl(e){if(!Vr(e))return ec(e.type)&&e.children?rc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ve(n.default))return n.default()}}function jn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,jn(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 wi(e,t=!1,n){let s=[],r=0;for(let o=0;o<e.length;o++){let i=e[o];const l=n==null?i.key:String(n)+String(i.key!=null?i.key:o);i.type===Q?(i.patchFlag&128&&r++,s=s.concat(wi(i.children,t,l))):(t||i.type!==ft)&&s.push(l!=null?$n(i,{key:l}):i)}if(r>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function xe(e,t){return ve(e)?Xe({name:e.name},t,{setup:e}):e}function ic(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ul(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const gr=new WeakMap;function ks(e,t,n,s,r=!1){if(ue(e)){e.forEach((m,S)=>ks(m,t&&(ue(t)?t[S]:t),n,s,r));return}if(Jn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ks(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?Qr(s.component):s.el,i=r?null:o,{i:l,r:a}=e,c=t&&t.r,u=l.refs===Be?l.refs={}:l.refs,h=l.setupState,g=Ae(h),p=h===Be?Sa:m=>ul(u,m)?!1:Ee(g,m),d=(m,S)=>!(S&&ul(u,S));if(c!=null&&c!==a){if(fl(t),ze(c))u[c]=null,p(c)&&(h[c]=null);else if(pt(c)){const m=t;d(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(ve(a))js(a,l,12,[i,u]);else{const m=ze(a),S=pt(a);if(m||S){const b=()=>{if(e.f){const C=m?p(a)?h[a]:u[a]:d()||!e.k?a.value:u[e.k];if(r)ue(C)&&ci(C,o);else if(ue(C))C.includes(o)||C.push(o);else if(m)u[a]=[o],p(a)&&(h[a]=u[a]);else{const $=[o];d(a,e.k)&&(a.value=$),e.k&&(u[e.k]=$)}}else m?(u[a]=i,p(a)&&(h[a]=i)):S&&(d(a,e.k)&&(a.value=i),e.k&&(u[e.k]=i))};if(i){const C=()=>{b(),gr.delete(e)};C.id=-1,gr.set(e,C),vt(C,n)}else fl(e),b()}}}function fl(e){const t=gr.get(e);t&&(t.flags|=8,gr.delete(e))}Hr().requestIdleCallback;Hr().cancelIdleCallback;const Jn=e=>!!e.type.__asyncLoader,Vr=e=>e.type.__isKeepAlive;function td(e,t){lc(e,"a",t)}function nd(e,t){lc(e,"da",t)}function lc(e,t,n=dt){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Kr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Vr(r.parent.vnode)&&sd(s,t,n,r),r=r.parent}}function sd(e,t,n,s){const r=Kr(t,e,s,!0);Zr(()=>{ci(s[t],r)},n)}function Kr(e,t,n=dt,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{vn();const l=zs(n),a=Ot(t,n,e,i);return l(),yn(),a});return s?r.unshift(o):r.push(o),o}}const kn=e=>(t,n=dt)=>{(!Is||e==="sp")&&Kr(e,(...s)=>t(...s),n)},rd=kn("bm"),tn=kn("m"),ac=kn("bu"),cc=kn("u"),nn=kn("bum"),Zr=kn("um"),od=kn("sp"),id=kn("rtg"),ld=kn("rtc");function ad(e,t=dt){Kr("ec",e,t)}const cd="components",uc=Symbol.for("v-ndc");function ud(e){return ze(e)?fd(cd,e,!1)||e:e||uc}function fd(e,t,n=!0,s=!1){const r=lt||dt;if(r){const o=r.type;{const l=Zd(o,!1);if(l&&(l===t||l===wt(t)||l===Fr(wt(t))))return o}const i=dl(r[e]||o[e],t)||dl(r.appContext[e],t);return!i&&s?o:i}}function dl(e,t){return e&&(e[t]||e[wt(t)]||e[Fr(wt(t))])}function Je(e,t,n,s){let r;const o=n,i=ue(e);if(i||ze(e)){const l=i&&Dn(e);let a=!1,c=!1;l&&(a=!Nt(e),c=bn(e),e=qr(e)),r=new Array(e.length);for(let u=0,h=e.length;u<h;u++)r[u]=t(a?c?ts(Ht(e[u])):Ht(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,o)}else if(Pe(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,c=l.length;a<c;a++){const u=l[a];r[a]=t(e[u],u,a,o)}}else r=[];return r}function lr(e,t,n={},s,r,o){if(lt.ce||lt.parent&&Jn(lt.parent)&<.parent.ce){const c=n,u=Object.keys(c).length>0;return t!=="default"&&(c.name=t),y(),Ve(Q,null,[H("slot",c,s&&s())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=mn.length;y();let a;try{const c=i&&fc(i(n)),u=n.key||o||c&&c.key;a=Ve(Q,{key:(u&&!Ut(u)?u:`_${t}`)+(!c&&s?"_fb":"")},c||(s?s():[]),c&&e._===1?64:-2)}catch(c){for(let u=mn.length;u>l;u--)Ci();throw c}finally{i&&i._c&&(i._d=!0)}return a}function fc(e){return e.some(t=>Es(t)?!(t.type===ft||t.type===Q&&!fc(t.children)):!0)?e:null}const Go=e=>e?Ec(e)?Qr(e):Go(e.parent):null,ws=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=>Go(e.parent),$root:e=>Go(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>hc(e),$forceUpdate:e=>e.f||(e.f=()=>{bi(e.update)}),$nextTick:e=>e.n||(e.n=Gt.bind(e.proxy)),$watch:e=>Zf.bind(e)}),mo=(e,t)=>e!==Be&&!e.__isScriptSetup&&Ee(e,t),dd={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(mo(s,t))return i[t]=1,s[t];if(r!==Be&&Ee(r,t))return i[t]=2,r[t];if(Ee(o,t))return i[t]=3,o[t];if(n!==Be&&Ee(n,t))return i[t]=4,n[t];jo&&(i[t]=0)}}const c=ws[t];let u,h;if(c)return t==="$attrs"&&ut(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==Be&&Ee(n,t))return i[t]=4,n[t];if(h=a.config.globalProperties,Ee(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return mo(r,t)?(r[t]=n,!0):s!==Be&&Ee(s,t)?(s[t]=n,!0):Ee(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let a;return!!(n[l]||e!==Be&&l[0]!=="$"&&Ee(e,l)||mo(t,l)||Ee(o,l)||Ee(s,l)||Ee(ws,l)||Ee(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ee(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function hl(e){return ue(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let jo=!0;function hd(e){const t=hc(e),n=e.proxy,s=e.ctx;jo=!1,t.beforeCreate&&pl(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:h,mounted:g,beforeUpdate:p,updated:d,activated:m,deactivated:S,beforeDestroy:b,beforeUnmount:C,destroyed:$,unmounted:w,render:M,renderTracked:K,renderTriggered:B,errorCaptured:ce,serverPrefetch:q,expose:re,inheritAttrs:pe,components:j,directives:ge,filters:N}=t;if(c&&pd(c,s,null),i)for(const ae in i){const oe=i[ae];ve(oe)&&(s[ae]=oe.bind(n))}if(r){const ae=r.call(n,n);Pe(ae)&&(e.data=mi(ae))}if(jo=!0,o)for(const ae in o){const oe=o[ae],Ze=ve(oe)?oe.bind(n,n):ve(oe.get)?oe.get.bind(n,n):jt,Ke=!ve(oe)&&ve(oe.set)?oe.set.bind(n):jt,Fe=ee({get:Ze,set:Ke});Object.defineProperty(s,ae,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:Ue=>Fe.value=Ue})}if(l)for(const ae in l)dc(l[ae],s,n,ae);if(a){const ae=ve(a)?a.call(n):a;Reflect.ownKeys(ae).forEach(oe=>{Bn(oe,ae[oe])})}u&&pl(u,e,"c");function Y(ae,oe){ue(oe)?oe.forEach(Ze=>ae(Ze.bind(n))):oe&&ae(oe.bind(n))}if(Y(rd,h),Y(tn,g),Y(ac,p),Y(cc,d),Y(td,m),Y(nd,S),Y(ad,ce),Y(ld,K),Y(id,B),Y(nn,C),Y(Zr,w),Y(od,q),ue(re))if(re.length){const ae=e.exposed||(e.exposed={});re.forEach(oe=>{Object.defineProperty(ae,oe,{get:()=>n[oe],set:Ze=>n[oe]=Ze,enumerable:!0})})}else e.exposed||(e.exposed={});M&&e.render===jt&&(e.render=M),pe!=null&&(e.inheritAttrs=pe),j&&(e.components=j),ge&&(e.directives=ge),q&&ic(e)}function pd(e,t,n=jt){ue(e)&&(e=zo(e));for(const s in e){const r=e[s];let o;Pe(r)?"default"in r?o=Ft(r.from||s,r.default,!0):o=Ft(r.from||s):o=Ft(r),pt(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function pl(e,t,n){Ot(ue(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function dc(e,t,n,s){let r=s.includes(".")?Xa(n,s):()=>n[s];if(ze(e)){const o=t[e];ve(o)&&Ne(r,o)}else if(ve(e))Ne(r,e.bind(n));else if(Pe(e))if(ue(e))e.forEach(o=>dc(o,t,n,s));else{const o=ve(e.handler)?e.handler.bind(n):t[e.handler];ve(o)&&Ne(r,o,e)}}function hc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!r.length&&!n&&!s?a=t:(a={},r.length&&r.forEach(c=>mr(a,c,i,!0)),mr(a,t,i)),Pe(t)&&o.set(t,a),a}function mr(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&mr(e,o,n,!0),r&&r.forEach(i=>mr(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=gd[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const gd={data:gl,props:ml,emits:ml,methods:ps,computed:ps,beforeCreate:mt,created:mt,beforeMount:mt,mounted:mt,beforeUpdate:mt,updated:mt,beforeDestroy:mt,beforeUnmount:mt,destroyed:mt,unmounted:mt,activated:mt,deactivated:mt,errorCaptured:mt,serverPrefetch:mt,components:ps,directives:ps,watch:vd,provide:gl,inject:md};function gl(e,t){return t?e?function(){return Xe(ve(e)?e.call(this,this):e,ve(t)?t.call(this,this):t)}:t:e}function md(e,t){return ps(zo(e),zo(t))}function zo(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function mt(e,t){return e?[...new Set([].concat(e,t))]:t}function ps(e,t){return e?Xe(Object.create(null),e,t):t}function ml(e,t){return e?ue(e)&&ue(t)?[...new Set([...e,...t])]:Xe(Object.create(null),hl(e),hl(t??{})):t}function vd(e,t){if(!e)return t;if(!t)return e;const n=Xe(Object.create(null),e);for(const s in t)n[s]=mt(e[s],t[s]);return n}function pc(){return{app:null,config:{isNativeTag:Sa,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 yd=0;function bd(e,t){return function(s,r=null){ve(s)||(s=Xe({},s)),r!=null&&!Pe(r)&&(r=null);const o=pc(),i=new WeakSet,l=[];let a=!1;const c=o.app={_uid:yd++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:Jd,get config(){return o.config},set config(u){},use(u,...h){return i.has(u)||(u&&ve(u.install)?(i.add(u),u.install(c,...h)):ve(u)&&(i.add(u),u(c,...h))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,h){return h?(o.components[u]=h,c):o.components[u]},directive(u,h){return h?(o.directives[u]=h,c):o.directives[u]},mount(u,h,g){if(!a){const p=c._ceVNode||H(s,r);return p.appContext=o,g===!0?g="svg":g===!1&&(g=void 0),e(p,u,g),a=!0,c._container=u,u.__vue_app__=c,Qr(p.component)}},onUnmount(u){l.push(u)},unmount(){a&&(Ot(l,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,h){return o.provides[u]=h,c},runWithContext(u){const h=Xn;Xn=c;try{return u()}finally{Xn=h}}};return c}}let Xn=null;const kd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${wt(t)}Modifiers`]||e[`${Tn(t)}Modifiers`];function wd(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Be;let r=n;const o=t.startsWith("update:"),i=o&&kd(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>ze(u)?u.trim():u)),i.number&&(r=n.map(Ur)));let l,a=s[l=co(t)]||s[l=co(wt(t))];!a&&o&&(a=s[l=co(Tn(t))]),a&&Ot(a,e,6,r);const c=s[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ot(c,e,6,r)}}const Sd=new WeakMap;function gc(e,t,n=!1){const s=n?Sd:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!ve(e)){const a=c=>{const u=gc(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?(Pe(e)&&s.set(e,null),null):(ue(o)?o.forEach(a=>i[a]=null):Xe(i,o),Pe(e)&&s.set(e,i),i)}function Yr(e,t){return!e||!Br(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ee(e,t[0].toLowerCase()+t.slice(1))||Ee(e,Tn(t))||Ee(e,t))}function vl(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:h,data:g,setupState:p,ctx:d,inheritAttrs:m}=e,S=pr(e);let b,C;try{if(n.shapeFlag&4){const w=r||s,M=w;b=Qt(c.call(M,w,u,h,p,g,d)),C=l}else{const w=t;b=Qt(w.length>1?w(h,{attrs:l,slots:i,emit:a}):w(h,null)),C=t.props?l:_d(l)}}catch(w){mn.length=0,Wr(w,e,1),b=H(ft)}let $=b;if(C&&m!==!1){const w=Object.keys(C),{shapeFlag:M}=$;w.length&&M&7&&(o&&w.some(Gr)&&(C=xd(C,o)),$=$n($,C,!1,!0))}return n.dirs&&($=$n($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(n.dirs):n.dirs),n.transition&&jn($,n.transition),b=$,pr(S),b}const _d=e=>{let t;for(const n in e)(n==="class"||n==="style"||Br(n))&&((t||(t={}))[n]=e[n]);return t},xd=(e,t)=>{const n={};for(const s in e)(!Gr(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Cd(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:a}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?yl(s,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const g=u[h];if(mc(i,s,g)&&!Yr(c,g))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?yl(s,i,c):!0:!!i;return!1}function yl(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const o=s[r];if(mc(t,e,o)&&!Yr(n,o))return!0}return!1}function mc(e,t,n){const s=e[n],r=t[n];return n==="style"&&Pe(s)&&Pe(r)?!Gs(s,r):s!==r}function $d({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const vc={},yc=()=>Object.create(vc),bc=e=>Object.getPrototypeOf(e)===vc;function Td(e,t,n,s=!1){const r={},o=yc();e.propsDefaults=Object.create(null),kc(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Nf(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Rd(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=Ae(r),[a]=e.propsOptions;let c=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let g=u[h];if(Yr(e.emitsOptions,g))continue;const p=t[g];if(a)if(Ee(o,g))p!==o[g]&&(o[g]=p,c=!0);else{const d=wt(g);r[d]=Fo(a,l,d,p,e,!1)}else p!==o[g]&&(o[g]=p,c=!0)}}}else{kc(e,t,r,o)&&(c=!0);let u;for(const h in l)(!t||!Ee(t,h)&&((u=Tn(h))===h||!Ee(t,u)))&&(a?n&&(n[h]!==void 0||n[u]!==void 0)&&(r[h]=Fo(a,l,h,void 0,e,!0)):delete r[h]);if(o!==l)for(const h in o)(!t||!Ee(t,h))&&(delete o[h],c=!0)}c&&cn(e.attrs,"set","")}function kc(e,t,n,s){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(vs(a))continue;const c=t[a];let u;r&&Ee(r,u=wt(a))?!o||!o.includes(u)?n[u]=c:(l||(l={}))[u]=c:Yr(e.emitsOptions,a)||(!(a in s)||c!==s[a])&&(s[a]=c,i=!0)}if(o){const a=Ae(n),c=l||Be;for(let u=0;u<o.length;u++){const h=o[u];n[h]=Fo(r,a,h,c[h],e,!Ee(c,h))}}return i}function Fo(e,t,n,s,r,o){const i=e[n];if(i!=null){const l=Ee(i,"default");if(l&&s===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&ve(a)){const{propsDefaults:c}=r;if(n in c)s=c[n];else{const u=zs(r);s=c[n]=a.call(null,t),u()}}else s=a;r.ce&&r.ce._setProp(n,s)}i[0]&&(o&&!l?s=!1:i[1]&&(s===""||s===Tn(n))&&(s=!0))}return s}const Ad=new WeakMap;function wc(e,t,n=!1){const s=n?Ad:t.propsCache,r=s.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!ve(e)){const u=h=>{a=!0;const[g,p]=wc(h,t,!0);Xe(i,g),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return Pe(e)&&s.set(e,Kn),Kn;if(ue(o))for(let u=0;u<o.length;u++){const h=wt(o[u]);bl(h)&&(i[h]=Be)}else if(o)for(const u in o){const h=wt(u);if(bl(h)){const g=o[u],p=i[h]=ue(g)||ve(g)?{type:g}:Xe({},g),d=p.type;let m=!1,S=!0;if(ue(d))for(let b=0;b<d.length;++b){const C=d[b],$=ve(C)&&C.name;if($==="Boolean"){m=!0;break}else $==="String"&&(S=!1)}else m=ve(d)&&d.name==="Boolean";p[0]=m,p[1]=S,(m||Ee(p,"default"))&&l.push(h)}}const c=[i,l];return Pe(e)&&s.set(e,c),c}function bl(e){return e[0]!=="$"&&!vs(e)}const Si=e=>e==="_"||e==="_ctx"||e==="$stable",_i=e=>ue(e)?e.map(Qt):[Qt(e)],Ed=(e,t,n)=>{if(t._n)return t;const s=at((...r)=>_i(t(...r)),n);return s._c=!1,s},Sc=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Si(r))continue;const o=e[r];if(ve(o))t[r]=Ed(r,o,s);else if(o!=null){const i=_i(o);t[r]=()=>i}}},_c=(e,t)=>{const n=_i(t);e.slots.default=()=>n},xc=(e,t,n)=>{for(const s in t)(n||!Si(s))&&(e[s]=t[s])},Id=(e,t,n)=>{const s=e.slots=yc();if(e.vnode.shapeFlag&32){const r=t._;r?(xc(s,t,n),n&&$a(s,"_",r,!0)):Sc(t,s)}else t&&_c(e,t)},Ld=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=Be;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:xc(r,t,n):(o=!t.$stable,Sc(t,r)),i=t}else t&&(_c(e,t),i={default:1});if(o)for(const l in r)!Si(l)&&i[l]==null&&delete r[l]},vt=Dd;function Pd(e){return Md(e)}function Md(e,t){const n=Hr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:h,nextSibling:g,setScopeId:p=jt,insertStaticContent:d}=e,m=(v,x,A,D=null,I=null,P=null,V=void 0,Z=null,U=!!x.dynamicChildren)=>{if(v===x)return;v&&!Pn(v,x)&&(D=Tt(v),Ue(v,I,P,!0),v=null),x.patchFlag===-2&&(U=!1,x.dynamicChildren=null);const{type:L,ref:le,shapeFlag:J}=x;switch(L){case Jr:S(v,x,A,D);break;case ft:b(v,x,A,D);break;case Ss:v==null&&C(x,A,D,V);break;case Q:j(v,x,A,D,I,P,V,Z,U);break;default:J&1?M(v,x,A,D,I,P,V,Z,U):J&6?ge(v,x,A,D,I,P,V,Z,U):(J&64||J&128)&&L.process(v,x,A,D,I,P,V,Z,U,te)}le!=null&&I?ks(le,v&&v.ref,P,x||v,!x):le==null&&v&&v.ref!=null&&ks(v.ref,null,P,v,!0)},S=(v,x,A,D)=>{if(v==null)s(x.el=l(x.children),A,D);else{const I=x.el=v.el;x.children!==v.children&&c(I,x.children)}},b=(v,x,A,D)=>{v==null?s(x.el=a(x.children||""),A,D):x.el=v.el},C=(v,x,A,D)=>{[v.el,v.anchor]=d(v.children,x,A,D,v.el,v.anchor)},$=({el:v,anchor:x},A,D)=>{let I;for(;v&&v!==x;)I=g(v),s(v,A,D),v=I;s(x,A,D)},w=({el:v,anchor:x})=>{let A;for(;v&&v!==x;)A=g(v),r(v),v=A;r(x)},M=(v,x,A,D,I,P,V,Z,U)=>{if(x.type==="svg"?V="svg":x.type==="math"&&(V="mathml"),v==null)K(x,A,D,I,P,V,Z,U);else{const L=v.el&&v.el._isVueCE?v.el:null;try{L&&L._beginPatch(),q(v,x,I,P,V,Z,U)}finally{L&&L._endPatch()}}},K=(v,x,A,D,I,P,V,Z)=>{let U,L;const{props:le,shapeFlag:J,transition:ne,dirs:ie}=v;if(U=v.el=i(v.type,P,le&&le.is,le),J&8?u(U,v.children):J&16&&ce(v.children,U,null,D,I,vo(v,P),V,Z),ie&&Rn(v,null,D,"created"),B(U,v,v.scopeId,V,D),le){for(const Re in le)Re!=="value"&&!vs(Re)&&o(U,Re,null,le[Re],P,D);"value"in le&&o(U,"value",null,le.value,P),(L=le.onVnodeBeforeMount)&&Wt(L,D,v)}ie&&Rn(v,null,D,"beforeMount");const ke=Nd(I,ne);ke&&ne.beforeEnter(U),s(U,x,A),((L=le&&le.onVnodeMounted)||ke||ie)&&vt(()=>{try{L&&Wt(L,D,v),ke&&ne.enter(U),ie&&Rn(v,null,D,"mounted")}finally{}},I)},B=(v,x,A,D,I)=>{if(A&&p(v,A),D)for(let P=0;P<D.length;P++)p(v,D[P]);if(I){let P=I.subTree;if(x===P||Tc(P.type)&&(P.ssContent===x||P.ssFallback===x)){const V=I.vnode;B(v,V,V.scopeId,V.slotScopeIds,I.parent)}}},ce=(v,x,A,D,I,P,V,Z,U=0)=>{for(let L=U;L<v.length;L++){const le=v[L]=Z?an(v[L]):Qt(v[L]);m(null,le,x,A,D,I,P,V,Z)}},q=(v,x,A,D,I,P,V)=>{const Z=x.el=v.el;let{patchFlag:U,dynamicChildren:L,dirs:le}=x;U|=v.patchFlag&16;const J=v.props||Be,ne=x.props||Be;let ie;if(A&&An(A,!1),(ie=ne.onVnodeBeforeUpdate)&&Wt(ie,A,x,v),le&&Rn(x,v,A,"beforeUpdate"),A&&An(A,!0),L&&(!v.dynamicChildren||v.dynamicChildren.length!==L.length)&&(U=0,V=!1,L=null),(J.innerHTML&&ne.innerHTML==null||J.textContent&&ne.textContent==null)&&u(Z,""),L?re(v.dynamicChildren,L,Z,A,D,vo(x,I),P):V||oe(v,x,Z,null,A,D,vo(x,I),P,!1),U>0){if(U&16)pe(Z,J,ne,A,I);else if(U&2&&J.class!==ne.class&&o(Z,"class",null,ne.class,I),U&4&&o(Z,"style",J.style,ne.style,I),U&8){const ke=x.dynamicProps;for(let Re=0;Re<ke.length;Re++){const we=ke[Re],qe=J[we],Oe=ne[we];(Oe!==qe||we==="value")&&o(Z,we,qe,Oe,I,A)}}U&1&&v.children!==x.children&&u(Z,x.children)}else!V&&L==null&&pe(Z,J,ne,A,I);((ie=ne.onVnodeUpdated)||le)&&vt(()=>{ie&&Wt(ie,A,x,v),le&&Rn(x,v,A,"updated")},D)},re=(v,x,A,D,I,P,V)=>{for(let Z=0;Z<x.length;Z++){const U=v[Z],L=x[Z],le=U.el&&(U.type===Q||!Pn(U,L)||U.shapeFlag&198)?h(U.el):A;m(U,L,le,null,D,I,P,V,!0)}},pe=(v,x,A,D,I)=>{if(x!==A){if(x!==Be)for(const P in x)!vs(P)&&!(P in A)&&o(v,P,x[P],null,I,D);for(const P in A){if(vs(P))continue;const V=A[P],Z=x[P];V!==Z&&P!=="value"&&o(v,P,Z,V,I,D)}"value"in A&&o(v,"value",x.value,A.value,I)}},j=(v,x,A,D,I,P,V,Z,U)=>{const L=x.el=v?v.el:l(""),le=x.anchor=v?v.anchor:l("");let{patchFlag:J,dynamicChildren:ne,slotScopeIds:ie}=x;ie&&(Z=Z?Z.concat(ie):ie),v==null?(s(L,A,D),s(le,A,D),ce(x.children||[],A,le,I,P,V,Z,U)):J>0&&J&64&&ne&&v.dynamicChildren&&v.dynamicChildren.length===ne.length?(re(v.dynamicChildren,ne,A,I,P,V,Z),(x.key!=null||I&&x===I.subTree)&&xi(v,x,!0)):oe(v,x,A,le,I,P,V,Z,U)},ge=(v,x,A,D,I,P,V,Z,U)=>{x.slotScopeIds=Z,v==null?x.shapeFlag&512?I.ctx.activate(x,A,D,V,U):N(x,A,D,I,P,V,U):R(v,x,U)},N=(v,x,A,D,I,P,V)=>{const Z=v.component=Hd(v,D,I);if(Vr(v)&&(Z.ctx.renderer=te),qd(Z,!1,V),Z.asyncDep){if(I&&I.registerDep(Z,Y,V),!v.el){const U=Z.subTree=H(ft);b(null,U,x,A),v.placeholder=U.el}}else Y(Z,v,x,A,I,P,V)},R=(v,x,A)=>{const D=x.component=v.component;if(Cd(v,x,A))if(D.asyncDep&&!D.asyncResolved){ae(D,x,A);return}else D.next=x,D.update();else x.el=v.el,D.vnode=x},Y=(v,x,A,D,I,P,V)=>{const Z=()=>{if(v.isMounted){let{next:J,bu:ne,u:ie,parent:ke,vnode:Re}=v;{const ye=Cc(v);if(ye){J&&(J.el=Re.el,ae(v,J,V)),ye.asyncDep.then(()=>{vt(()=>{v.isUnmounted||L()},I)});return}}let we=J,qe;An(v,!1),J?(J.el=Re.el,ae(v,J,V)):J=Re,ne&&ir(ne),(qe=J.props&&J.props.onVnodeBeforeUpdate)&&Wt(qe,ke,J,Re),An(v,!0);const Oe=vl(v),de=v.subTree;v.subTree=Oe,m(de,Oe,h(de.el),Tt(de),v,I,P),J.el=Oe.el,we===null&&$d(v,Oe.el),ie&&vt(ie,I),(qe=J.props&&J.props.onVnodeUpdated)&&vt(()=>Wt(qe,ke,J,Re),I)}else{let J;const{el:ne,props:ie}=x,{bm:ke,m:Re,parent:we,root:qe,type:Oe}=v,de=Jn(x);An(v,!1),ke&&ir(ke),!de&&(J=ie&&ie.onVnodeBeforeMount)&&Wt(J,we,x),An(v,!0);{qe.ce&&qe.ce._hasShadowRoot()&&qe.ce._injectChildStyle(Oe,v.parent?v.parent.type:void 0);const ye=v.subTree=vl(v);m(null,ye,A,D,v,I,P),x.el=ye.el}if(Re&&vt(Re,I),!de&&(J=ie&&ie.onVnodeMounted)){const ye=x;vt(()=>Wt(J,we,ye),I)}(x.shapeFlag&256||we&&Jn(we.vnode)&&we.vnode.shapeFlag&256)&&v.a&&vt(v.a,I),v.isMounted=!0,x=A=D=null}};v.scope.on();const U=v.effect=new Ea(Z);v.scope.off();const L=v.update=U.run.bind(U),le=v.job=U.runIfDirty.bind(U);le.i=v,le.id=v.uid,U.scheduler=()=>bi(le),An(v,!0),L()},ae=(v,x,A)=>{x.component=v;const D=v.vnode.props;v.vnode=x,v.next=null,Rd(v,x.props,D,A),Ld(v,x.children,A),vn(),il(v),yn()},oe=(v,x,A,D,I,P,V,Z,U=!1)=>{const L=v&&v.children,le=v?v.shapeFlag:0,J=x.children,{patchFlag:ne,shapeFlag:ie}=x;if(ne>0){if(ne&128){Ke(L,J,A,D,I,P,V,Z,U);return}else if(ne&256){Ze(L,J,A,D,I,P,V,Z,U);return}}ie&8?(le&16&&nt(L,I,P),J!==L&&u(A,J)):le&16?ie&16?Ke(L,J,A,D,I,P,V,Z,U):nt(L,I,P,!0):(le&8&&u(A,""),ie&16&&ce(J,A,D,I,P,V,Z,U))},Ze=(v,x,A,D,I,P,V,Z,U)=>{v=v||Kn,x=x||Kn;const L=v.length,le=x.length,J=Math.min(L,le);let ne;for(ne=0;ne<J;ne++){const ie=x[ne]=U?an(x[ne]):Qt(x[ne]);m(v[ne],ie,A,null,I,P,V,Z,U)}L>le?nt(v,I,P,!0,!1,J):ce(x,A,D,I,P,V,Z,U,J)},Ke=(v,x,A,D,I,P,V,Z,U)=>{let L=0;const le=x.length;let J=v.length-1,ne=le-1;for(;L<=J&&L<=ne;){const ie=v[L],ke=x[L]=U?an(x[L]):Qt(x[L]);if(Pn(ie,ke))m(ie,ke,A,null,I,P,V,Z,U);else break;L++}for(;L<=J&&L<=ne;){const ie=v[J],ke=x[ne]=U?an(x[ne]):Qt(x[ne]);if(Pn(ie,ke))m(ie,ke,A,null,I,P,V,Z,U);else break;J--,ne--}if(L>J){if(L<=ne){const ie=ne+1,ke=ie<le?x[ie].el:D;for(;L<=ne;)m(null,x[L]=U?an(x[L]):Qt(x[L]),A,ke,I,P,V,Z,U),L++}}else if(L>ne)for(;L<=J;)Ue(v[L],I,P,!0),L++;else{const ie=L,ke=L,Re=new Map;for(L=ke;L<=ne;L++){const gt=x[L]=U?an(x[L]):Qt(x[L]);gt.key!=null&&Re.set(gt.key,L)}let we,qe=0;const Oe=ne-ke+1;let de=!1,ye=0;const st=new Array(Oe);for(L=0;L<Oe;L++)st[L]=0;for(L=ie;L<=J;L++){const gt=v[L];if(qe>=Oe){Ue(gt,I,P,!0);continue}let xt;if(gt.key!=null)xt=Re.get(gt.key);else for(we=ke;we<=ne;we++)if(st[we-ke]===0&&Pn(gt,x[we])){xt=we;break}xt===void 0?Ue(gt,I,P,!0):(st[xt-ke]=L+1,xt>=ye?ye=xt:de=!0,m(gt,x[xt],A,null,I,P,V,Z,U),qe++)}const _t=de?Od(st):Kn;for(we=_t.length-1,L=Oe-1;L>=0;L--){const gt=ke+L,xt=x[gt],qs=x[gt+1],sn=gt+1<le?qs.el||$c(qs):D;st[L]===0?m(null,xt,A,sn,I,P,V,Z,U):de&&(we<0||L!==_t[we]?Fe(xt,A,sn,2):we--)}}},Fe=(v,x,A,D,I=null)=>{const{el:P,type:V,transition:Z,children:U,shapeFlag:L}=v;if(L&6){Fe(v.component.subTree,x,A,D);return}if(L&128){v.suspense.move(x,A,D);return}if(L&64){V.move(v,x,A,te);return}if(V===Q){s(P,x,A);for(let J=0;J<U.length;J++)Fe(U[J],x,A,D);s(v.anchor,x,A);return}if(V===Ss){$(v,x,A);return}if(D!==2&&L&1&&Z)if(D===0)Z.persisted&&!P[Pt]?s(P,x,A):(Z.beforeEnter(P),s(P,x,A),vt(()=>Z.enter(P),I));else{const{leave:J,delayLeave:ne,afterLeave:ie}=Z,ke=()=>{v.ctx.isUnmounted?r(P):s(P,x,A)},Re=()=>{const we=P._isLeaving||!!P[Pt];P._isLeaving&&P[Pt](!0),Z.persisted&&!we?ke():J(P,()=>{ke(),ie&&ie()})};ne?ne(P,ke,Re):Re()}else s(P,x,A)},Ue=(v,x,A,D=!1,I=!1)=>{const{type:P,props:V,ref:Z,children:U,dynamicChildren:L,shapeFlag:le,patchFlag:J,dirs:ne,cacheIndex:ie,memo:ke}=v;if(J===-2&&(I=!1),Z!=null&&(vn(),ks(Z,null,A,v,!0),yn()),ie!=null&&(x.renderCache[ie]=void 0),le&256){x.ctx.deactivate(v);return}const Re=le&1&&ne,we=!Jn(v);let qe;if(we&&(qe=V&&V.onVnodeBeforeUnmount)&&Wt(qe,x,v),le&6)Bt(v.component,A,D);else{if(le&128){v.suspense.unmount(A,D);return}Re&&Rn(v,null,x,"beforeUnmount"),le&64?v.type.remove(v,x,A,te,D):L&&!L.hasOnce&&(P!==Q||J>0&&J&64)?nt(L,x,A,!1,!0):(P===Q&&J&384||!I&&le&16)&&nt(U,x,A),D&&He(v)}const Oe=ke!=null&&ie==null;(we&&(qe=V&&V.onVnodeUnmounted)||Re||Oe)&&vt(()=>{qe&&Wt(qe,x,v),Re&&Rn(v,null,x,"unmounted"),Oe&&(v.el=null)},A)},He=v=>{const{type:x,el:A,anchor:D,transition:I}=v;if(x===Q){Dt(A,D);return}if(x===Ss){w(v);return}const P=()=>{r(A),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(v.shapeFlag&1&&I&&!I.persisted){const{leave:V,delayLeave:Z}=I,U=()=>V(A,P);Z?Z(v.el,P,U):U()}else P()},Dt=(v,x)=>{let A;for(;v!==x;)A=g(v),r(v),v=A;r(x)},Bt=(v,x,A)=>{const{bum:D,scope:I,job:P,subTree:V,um:Z,m:U,a:L}=v;kl(U),kl(L),D&&ir(D),I.stop(),P&&(P.flags|=8,Ue(V,v,x,A)),Z&&vt(Z,x),vt(()=>{v.isUnmounted=!0},x)},nt=(v,x,A,D=!1,I=!1,P=0)=>{for(let V=P;V<v.length;V++)Ue(v[V],x,A,D,I)},Tt=v=>{if(v.shapeFlag&6)return Tt(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();const x=g(v.anchor||v.el),A=x&&x[Qa];return A?g(A):x};let Rt=!1;const O=(v,x,A)=>{let D;v==null?x._vnode&&(Ue(x._vnode,null,null,!0),D=x._vnode.component):m(x._vnode||null,v,x,null,null,null,A),x._vnode=v,Rt||(Rt=!0,il(D),Ka(),Rt=!1)},te={p:m,um:Ue,m:Fe,r:He,mt:N,mc:ce,pc:oe,pbc:re,n:Tt,o:e};return{render:O,hydrate:void 0,createApp:bd(O)}}function vo({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 An({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Nd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function xi(e,t,n=!1){const s=e.children,r=t.children;if(ue(s)&&ue(r))for(let o=0;o<s.length;o++){const i=s[o];let l=r[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[o]=an(r[o]),l.el=i.el),!n&&l.patchFlag!==-2&&xi(i,l)),l.type===Jr&&(l.patchFlag===-1&&(l=r[o]=an(l)),l.el=i.el),l.type===ft&&!l.el&&(l.el=i.el)}}function Od(e){const t=e.slice(),n=[0];let s,r,o,i,l;const a=e.length;for(s=0;s<a;s++){const c=e[s];if(c!==0){if(r=n[n.length-1],e[r]<c){t[s]=r,n.push(s);continue}for(o=0,i=n.length-1;o<i;)l=o+i>>1,e[n[l]]<c?o=l+1:i=l;c<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Cc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Cc(t)}function kl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function $c(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?$c(t.subTree):null}const Tc=e=>e.__isSuspense;function Dd(e,t){t&&t.pendingBranch?ue(e)?t.effects.push(...e):t.effects.push(e):Va(e)}const Q=Symbol.for("v-fgt"),Jr=Symbol.for("v-txt"),ft=Symbol.for("v-cmt"),Ss=Symbol.for("v-stc"),mn=[];let $t=null;function y(e=!1){mn.push($t=e?null:[])}function Ci(){mn.pop(),$t=mn[mn.length-1]||null}let As=1;function vr(e,t=!1){As+=e,e<0&&$t&&t&&($t.hasOnce=!0)}function Rc(e){return e.dynamicChildren=As>0?$t||Kn:null,Ci(),As>0&&$t&&$t.push(e),e}function k(e,t,n,s,r,o){return Rc(f(e,t,n,s,r,o,!0))}function Ve(e,t,n,s,r){return Rc(H(e,t,n,s,r,!0))}function Es(e){return e?e.__v_isVNode===!0:!1}function Pn(e,t){return e.type===t.type&&e.key===t.key}const Ac=({key:e})=>e??null,ar=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ze(e)||pt(e)||ve(e)?{i:lt,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,s=0,r=null,o=e===Q?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ac(t),ref:t&&ar(t),scopeId:Ya,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:lt};return l?(yr(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=ze(n)?8:16),As>0&&!i&&$t&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&$t.push(a),a}const H=Bd;function Bd(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===uc)&&(e=ft),Es(e)){const l=$n(e,t,!0);return n&&yr(l,n),As>0&&!o&&$t&&(l.shapeFlag&6?$t[$t.indexOf(e)]=l:$t.push(l)),l.patchFlag=-2,l}if(Yd(e)&&(e=e.__vccOpts),t){t=Gd(t);let{class:l,style:a}=t;l&&!ze(l)&&(t.class=be(l)),Pe(a)&&(yi(a)&&!ue(a)&&(a=Xe({},a)),t.style=gn(a))}const i=ze(e)?1:Tc(e)?128:ec(e)?64:Pe(e)?4:ve(e)?2:0;return f(e,t,n,s,r,i,o,!0)}function Gd(e){return e?yi(e)||bc(e)?Xe({},e):e:null}function $n(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?zd(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Ac(c),ref:t&&t.ref?n&&o?ue(o)?o.concat(ar(t)):[o,ar(t)]:ar(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!==Q?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&&s&&jn(u,a.clone(u)),u}function _e(e=" ",t=0){return H(Jr,null,e,t)}function jd(e,t){const n=H(Ss,null,e);return n.staticCount=t,n}function W(e="",t=!1){return t?(y(),Ve(ft,null,e)):H(ft,null,e)}function Qt(e){return e==null||typeof e=="boolean"?H(ft):ue(e)?H(Q,null,e.slice()):Es(e)?an(e):H(Jr,null,String(e))}function an(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:$n(e)}function yr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ue(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),yr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!bc(t)?t._ctx=lt:r===3&<&&(lt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(ve(t)){if(s&65){yr(e,{default:t});return}t={default:t,_ctx:lt},n=32}else t=String(t),s&64?(n=16,t=[_e(t)]):n=8;e.children=t,e.shapeFlag|=n}function zd(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=be([t.class,s.class]));else if(r==="style")t.style=gn([t.style,s.style]);else if(Br(r)){const o=t[r],i=s[r];i&&o!==i&&!(ue(o)&&o.includes(i))?t[r]=o?[].concat(o,i):i:i==null&&o==null&&!Gr(r)&&(t[r]=i)}else r!==""&&(t[r]=s[r])}return t}function Wt(e,t,n,s=null){Ot(e,t,7,[n,s])}const Fd=pc();let Ud=0;function Hd(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Fd,o={uid:Ud++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new mf(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wc(s,r),emitsOptions:gc(s,r),emit:null,emitted:null,propsDefaults:Be,inheritAttrs:s.inheritAttrs,ctx:Be,data:Be,props:Be,attrs:Be,slots:Be,refs:Be,setupState:Be,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=wd.bind(null,o),e.ce&&e.ce(o),o}let dt=null;const Xr=()=>dt||lt;let br,Uo;{const e=Hr(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};br=t("__VUE_INSTANCE_SETTERS__",n=>dt=n),Uo=t("__VUE_SSR_SETTERS__",n=>Is=n)}const zs=e=>{const t=dt;return br(e),e.scope.on(),()=>{e.scope.off(),br(t)}},wl=()=>{dt&&dt.scope.off(),br(null)};function Ec(e){return e.vnode.shapeFlag&4}let Is=!1;function qd(e,t=!1,n=!1){t&&Uo(t);const{props:s,children:r}=e.vnode,o=Ec(e);Td(e,s,o,t),Id(e,r,n||t);const i=o?Wd(e,t):void 0;return t&&Uo(!1),i}function Wd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,dd);const{setup:s}=n;if(s){vn();const r=e.setupContext=s.length>1?Kd(e):null,o=zs(e),i=js(s,e,0,[e.props,r]),l=_a(i);if(yn(),o(),(l||e.sp)&&!Jn(e)&&ic(e),l){if(i.then(wl,wl),t)return i.then(a=>{Sl(e,a)}).catch(a=>{Wr(a,e,0)});e.asyncDep=i}else Sl(e,i)}else Ic(e)}function Sl(e,t,n){ve(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=Ha(t)),Ic(e)}function Ic(e,t,n){const s=e.type;e.render||(e.render=s.render||jt);{const r=zs(e);vn();try{hd(e)}finally{yn(),r()}}}const Vd={get(e,t){return ut(e,"get",""),e[t]}};function Kd(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Vd),slots:e.slots,emit:e.emit,expose:t}}function Qr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ha(Of(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ws)return ws[n](e)},has(t,n){return n in t||n in ws}})):e.proxy}function Zd(e,t=!0){return ve(e)?e.displayName||e.name:e.name||t&&e.__name}function Yd(e){return ve(e)&&"__vccOpts"in e}const ee=(e,t)=>Ff(e,t,Is);function Ie(e,t,n){try{vr(-1);const s=arguments.length;return s===2?Pe(t)&&!ue(t)?Es(t)?H(e,null,[t]):H(e,t):H(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Es(n)&&(n=[n]),H(e,t,n))}finally{vr(1)}}const Jd="3.5.40";/**
|
|
14
|
-
* @vue/runtime-dom v3.5.40
|
|
15
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
-
* @license MIT
|
|
17
|
-
**/let Ho;const _l=typeof window<"u"&&window.trustedTypes;if(_l)try{Ho=_l.createPolicy("vue",{createHTML:e=>e})}catch{}const Lc=Ho?e=>Ho.createHTML(e):e=>e,Xd="http://www.w3.org/2000/svg",Qd="http://www.w3.org/1998/Math/MathML",ln=typeof document<"u"?document:null,xl=ln&&ln.createElement("template"),eh={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?ln.createElementNS(Xd,e):t==="mathml"?ln.createElementNS(Qd,e):n?ln.createElement(e,{is:n}):ln.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>ln.createTextNode(e),createComment:e=>ln.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ln.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{xl.innerHTML=Lc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=xl.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},wn="transition",as="animation",ns=Symbol("_vtc"),Pc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Mc=Xe({},nc,Pc),th=e=>(e.displayName="Transition",e.props=Mc,e),$i=th((e,{slots:t})=>Ie(ed,Nc(e),t)),En=(e,t=[])=>{ue(e)?e.forEach(n=>n(...t)):e&&e(...t)},Cl=e=>e?ue(e)?e.some(t=>t.length>1):e.length>1:!1;function Nc(e){const t={};for(const j in e)j in Pc||(t[j]=e[j]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:c=i,appearToClass:u=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,d=nh(r),m=d&&d[0],S=d&&d[1],{onBeforeEnter:b,onEnter:C,onEnterCancelled:$,onLeave:w,onLeaveCancelled:M,onBeforeAppear:K=b,onAppear:B=C,onAppearCancelled:ce=$}=t,q=(j,ge,N,R)=>{j._enterCancelled=R,_n(j,ge?u:l),_n(j,ge?c:i),N&&N()},re=(j,ge)=>{j._isLeaving=!1,_n(j,h),_n(j,p),_n(j,g),ge&&ge()},pe=j=>(ge,N)=>{const R=j?B:C,Y=()=>q(ge,j,N);En(R,[ge,Y]),$l(()=>{_n(ge,j?a:o),Vt(ge,j?u:l),Cl(R)||Tl(ge,s,m,Y)})};return Xe(t,{onBeforeEnter(j){En(b,[j]),Vt(j,o),Vt(j,i)},onBeforeAppear(j){En(K,[j]),Vt(j,a),Vt(j,c)},onEnter:pe(!1),onAppear:pe(!0),onLeave(j,ge){j._isLeaving=!0;const N=()=>re(j,ge);Vt(j,h),j._enterCancelled?(Vt(j,g),qo(j)):(qo(j),Vt(j,g)),$l(()=>{j._isLeaving&&(_n(j,h),Vt(j,p),Cl(w)||Tl(j,s,S,N))}),En(w,[j,N])},onEnterCancelled(j){q(j,!1,void 0,!0),En($,[j])},onAppearCancelled(j){q(j,!0,void 0,!0),En(ce,[j])},onLeaveCancelled(j){re(j),En(M,[j])}})}function nh(e){if(e==null)return null;if(Pe(e))return[yo(e.enter),yo(e.leave)];{const t=yo(e);return[t,t]}}function yo(e){return of(e)}function Vt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ns]||(e[ns]=new Set)).add(t)}function _n(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[ns];n&&(n.delete(t),n.size||(e[ns]=void 0))}function $l(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let sh=0;function Tl(e,t,n,s){const r=e._endId=++sh,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:l,propCount:a}=Oc(e,t);if(!i)return s();const c=i+"end";let u=0;const h=()=>{e.removeEventListener(c,g),o()},g=p=>{p.target===e&&++u>=a&&h()};setTimeout(()=>{u<a&&h()},l+1),e.addEventListener(c,g)}function Oc(e,t){const n=window.getComputedStyle(e),s=d=>(n[d]||"").split(", "),r=s(`${wn}Delay`),o=s(`${wn}Duration`),i=Rl(r,o),l=s(`${as}Delay`),a=s(`${as}Duration`),c=Rl(l,a);let u=null,h=0,g=0;t===wn?i>0&&(u=wn,h=i,g=o.length):t===as?c>0&&(u=as,h=c,g=a.length):(h=Math.max(i,c),u=h>0?i>c?wn:as:null,g=u?u===wn?o.length:a.length:0);const p=u===wn&&/\b(?:transform|all)(?:,|$)/.test(s(`${wn}Property`).toString());return{type:u,timeout:h,propCount:g,hasTransform:p}}function Rl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>Al(n)+Al(e[s])))}function Al(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function qo(e){return(e?e.ownerDocument:document).body.offsetHeight}function rh(e,t,n){const s=e[ns];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const kr=Symbol("_vod"),Ti=Symbol("_vsh"),Dc={name:"show",beforeMount(e,{value:t},{transition:n}){e[kr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):cs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),cs(e,!0),s.enter(e)):s.leave(e,()=>{cs(e,!1)}):cs(e,t))},beforeUnmount(e,{value:t}){cs(e,t)}};function cs(e,t){e.style.display=t?e[kr]:"none",e[Ti]=!t}const Bc=Symbol("");function oh(e){const t=Xr();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>wr(o,r))},s=()=>{const r=e(t.proxy);t.ce?wr(t.ce,r):Wo(t.subTree,r),n(r)};ac(()=>{Va(s)}),tn(()=>{Ne(s,jt,{flush:"post"});const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),Zr(()=>r.disconnect())})}function Wo(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Wo(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)wr(e.el,t);else if(e.type===Q)e.children.forEach(n=>Wo(n,t));else if(e.type===Ss){let{el:n,anchor:s}=e;for(;n&&(wr(n,t),n!==s);)n=n.nextSibling}}function wr(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const r in t){const o=gf(t[r]);n.setProperty(`--${r}`,o),s+=`--${r}: ${o};`}n[Bc]=s}}const ih=/(?:^|;)\s*display\s*:/;function lh(e,t,n){const s=e.style,r=ze(n);let o=!1;if(n&&!r){if(t)if(ze(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&gs(s,l,"")}else for(const i in t)n[i]==null&&gs(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?ch(e,i,!ze(t)&&t?t[i]:void 0,l)||gs(s,i,l):gs(s,i,"")}}else if(r){if(t!==n){const i=s[Bc];i&&(n+=";"+i),s.cssText=n,o=ih.test(n)}}else t&&e.removeAttribute("style");kr in e&&(e[kr]=o?s.display:"",e[Ti]&&(s.display="none"))}const El=/\s*!important$/;function gs(e,t,n){if(ue(n))n.forEach(s=>gs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=ah(e,t);El.test(n)?e.setProperty(Tn(s),n.replace(El,""),"important"):e[s]=n}}const Il=["Webkit","Moz","ms"],bo={};function ah(e,t){const n=bo[t];if(n)return n;let s=wt(t);if(s!=="filter"&&s in e)return bo[t]=s;s=Fr(s);for(let r=0;r<Il.length;r++){const o=Il[r]+s;if(o in e)return bo[t]=o}return t}function ch(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&ze(s)&&n===s}const Ll="http://www.w3.org/1999/xlink";function Pl(e,t,n,s,r,o=df(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ll,t.slice(6,t.length)):e.setAttributeNS(Ll,t,n):n==null||o&&!Ta(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Ut(n)?String(n):n)}function Ml(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Lc(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=Ta(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(r||t)}function Mn(e,t,n,s){e.addEventListener(t,n,s)}function uh(e,t,n,s){e.removeEventListener(t,n,s)}const Nl=Symbol("_vei");function fh(e,t,n,s,r=null){const o=e[Nl]||(e[Nl]={}),i=o[t];if(s&&i)i.value=s;else{const[l,a]=ph(t);if(s){const c=o[t]=vh(s,r);Mn(e,l,c,a)}else i&&(uh(e,l,i,a),o[t]=void 0)}}const dh=/(Once|Passive|Capture)$/,hh=/^on:?(?:Once|Passive|Capture)$/;function ph(e){let t,n;for(;(n=e.match(dh))&&!hh.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Tn(e.slice(2)),t]}let ko=0;const gh=Promise.resolve(),mh=()=>ko||(gh.then(()=>ko=0),ko=Date.now());function vh(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(ue(r)){const o=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{o.call(s),s._stopped=!0};const i=r.slice(),l=[s];for(let a=0;a<i.length&&!s._stopped;a++){const c=i[a];c&&Ot(c,t,5,l)}}else Ot(r,t,5,[s])};return n.value=e,n.attached=mh(),n}const Ol=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,yh=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?rh(e,s,i):t==="style"?lh(e,n,s):Br(t)?Gr(t)||fh(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bh(e,t,s,i))?(Ml(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Pl(e,t,s,i,o,t!=="value")):e._isVueCE&&(kh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ze(s)))?Ml(e,wt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Pl(e,t,s,i))};function bh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ol(t)&&ve(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Ol(t)&&ze(n)?!1:t in e}function kh(e,t){const n=e._def.props;if(!n)return!1;const s=wt(t);return Array.isArray(n)?n.some(r=>wt(r)===s):Object.keys(n).some(r=>wt(r)===s)}const Gc=new WeakMap,jc=new WeakMap,Sr=Symbol("_moveCb"),Dl=Symbol("_enterCb"),wh=e=>(delete e.props.mode,e),Sh=wh({name:"TransitionGroup",props:Xe({},Mc,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Xr(),s=tc();let r,o;return cc(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!Th(r[0].el,n.vnode.el,i)){r=[];return}r.forEach(xh),r.forEach(Ch);const l=r.filter($h);qo(n.vnode.el),l.forEach(a=>{const c=a.el,u=c.style;Vt(c,i),u.transform=u.webkitTransform=u.transitionDuration="";const h=c[Sr]=g=>{g&&g.target!==c||(!g||g.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",h),c[Sr]=null,_n(c,i))};c.addEventListener("transitionend",h)}),r=[]}),()=>{const i=Ae(e),l=Nc(i);let a=i.tag||Q;if(r=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&!u.el[Ti]&&(r.push(u),jn(u,Rs(u,l,s,n)),Gc.set(u,zc(u.el)))}o=t.default?wi(t.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&jn(u,Rs(u,l,s,n))}return H(a,null,o)}}}),_h=Sh;function xh(e){const t=e.el;t[Sr]&&t[Sr](),t[Dl]&&t[Dl]()}function Ch(e){jc.set(e,zc(e.el))}function $h(e){const t=Gc.get(e),n=jc.get(e),s=t.left-n.left,r=t.top-n.top;if(s||r){const o=e.el,i=o.style,l=o.getBoundingClientRect();let a=1,c=1;return o.offsetWidth&&(a=l.width/o.offsetWidth),o.offsetHeight&&(c=l.height/o.offsetHeight),(!Number.isFinite(a)||a===0)&&(a=1),(!Number.isFinite(c)||c===0)&&(c=1),Math.abs(a-1)<.01&&(a=1),Math.abs(c-1)<.01&&(c=1),i.transform=i.webkitTransform=`translate(${s/a}px,${r/c}px)`,i.transitionDuration="0s",e}}function zc(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function Th(e,t,n){const s=e.cloneNode(),r=e[ns];r&&r.forEach(l=>{l.split(/\s+/).forEach(a=>a&&s.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(s);const{hasTransform:i}=Oc(s);return o.removeChild(s),i}const _r=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ue(t)?n=>ir(t,n):t};function Rh(e){e.target.composing=!0}function Bl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Qn=Symbol("_assign");function Gl(e,t,n){return t&&(e=e.trim()),n&&(e=Ur(e)),e}const yt={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Qn]=_r(r);const o=s||r.props&&r.props.type==="number";Mn(e,t?"change":"input",i=>{i.target.composing||e[Qn](Gl(e.value,n,o))}),(n||o)&&Mn(e,"change",()=>{e.value=Gl(e.value,n,o)}),t||(Mn(e,"compositionstart",Rh),Mn(e,"compositionend",Bl),Mn(e,"change",Bl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Qn]=_r(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Ur(e.value):e.value,a=t??"";if(l===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===a)||(e.value=a)}},jl={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Mn(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Ur(xr(o)):xr(o));e[Qn](e.multiple?jr(e._modelValue)?new Set(r):r:r[0]),e._assigning=!0,Gt(()=>{e._assigning=!1})}),e[Qn]=_r(s)},mounted(e,{value:t}){zl(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Qn]=_r(n)},updated(e,{value:t}){e._assigning||zl(e,t)}};function zl(e,t){const n=e.multiple,s=ue(t);if(!(n&&!s&&!jr(t))){for(let r=0,o=e.options.length;r<o;r++){const i=e.options[r],l=xr(i);if(n)if(s){const a=typeof l;a==="string"||a==="number"?i.selected=t.some(c=>String(c)===String(l)):i.selected=pf(t,l)>-1}else i.selected=t.has(l);else if(Gs(xr(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function xr(e){return"_value"in e?e._value:e.value}const Ah=["ctrl","shift","alt","meta"],Eh={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ah.some(n=>e[`${n}Key`]&&!t.includes(n))},qt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...o)=>{for(let i=0;i<t.length;i++){const l=Eh[t[i]];if(l&&l(r,t))return}return e(r,...o)}))},Ih={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ls=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const o=Tn(r.key);if(t.some(i=>i===o||Ih[i]===o))return e(r)}))},Lh=Xe({patchProp:yh},eh);let Fl;function Ph(){return Fl||(Fl=Pd(Lh))}const Mh=((...e)=>{const t=Ph().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Oh(s);if(!r)return;const o=t._component;!ve(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,Nh(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function Nh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Oh(e){return ze(e)?document.querySelector(e):e}function Qs(e,t,n,s){return e===n&&t===s}function Dh(e){return e.currentSessionId===e.targetSessionId&&e.snapshot.sessionId===e.targetSessionId&&e.currentSessionGeneration===e.targetSessionGeneration&&e.currentConnectionGeneration===e.targetConnectionGeneration&&e.currentPromptGeneration===e.targetPromptGeneration&&e.currentLiveGeneration===e.targetLiveGeneration&&(e.currentEpoch===0||e.snapshot.epoch===e.currentEpoch)&&(e.snapshot.epoch!==e.currentEpoch||e.snapshot.seq>=e.currentSeq)}function Bh(e){return{objective:e.objective,completionCriterion:e.completionCriterion,replace:e.replace,budgets:e.budgets}}function Gh(e){return{objective:e.objective,budgets:e.budgets}}function jh(e,t,n){return e!==0&&n.epoch!==e?"resync":n.seq<=t?"duplicate":"apply"}function zh(e,t){return t.type==="goal.updated"?{...e,goal:t.snapshot}:t.type==="todo.updated"?{...e,todos:t.todos}:e}function Fh(e){const t=[],n=new Map;for(const s of e){const r=s.phase??null;let o=n.get(r);o===void 0&&(o=t.length,n.set(r,o),t.push({phase:r,items:[]})),t[o].items.push(s)}return t}const Ps=F([]);let Uh=0;function Hh(e,t="info",n=3500){const s=`toast_${++Uh}`;Ps.value=[...Ps.value,{id:s,type:t,message:e}],n>0&&window.setTimeout(()=>Fc(s),n)}function Fc(e){Ps.value=Ps.value.filter(t=>t.id!==e)}function Uc(){return{toasts:Ps,showToast:Hh,removeToast:Fc}}function qh(e){let t=null;return{schedule:()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,e()}))},flushNow:()=>{t!==null&&(cancelAnimationFrame(t),t=null),e()},dispose:()=>{t!==null&&(cancelAnimationFrame(t),t=null)}}}const It="/api/v1",Wh=2*3e4;function Vh(){const{showToast:e}=Uc(),t=F("connecting"),n=F([]),s=F([]),r=F({busy:!1}),o=F(null),i=F([]),l=F(!1),a=F(null),c=F(!1),u=F(null),h=F(null),g=F(null),p=ee(()=>r.value.busy||c.value),d=F([]),m=F(null),S=F(!1),b=ee(()=>h.value!==null&&!S.value),C=F(null),$=F([]);let w=null,M=null,K=null,B=null,ce=Date.now(),q=0,re=0,pe=0,j=0,ge=0,N=0,R=0,Y=0,ae=0,oe=null,Ze=!1,Ke=null,Fe=!1,Ue=!1;const He=new Map;let Dt=0,Bt=0,nt=null,Tt=0;const Rt=new Map;function O(){const G=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/v1/ws`;return m.value?`${G}?sessionId=${encodeURIComponent(m.value)}`:G}function te(_){t.value=_}function Te(_){(w==null?void 0:w.readyState)===WebSocket.OPEN&&w.send(JSON.stringify(_))}function v(){l.value=Ze||oe!==null}function x(){ae++,oe=null,Ze=!1,Ke=null,l.value=!1,a.value=null}function A(_,G){if(_!==null&&typeof _=="object"){const he=_.message;if(typeof he=="string")return he}return G}function D(){Ue||B!==null||(B=window.setTimeout(()=>{B=null;const _=Ke;Ke=null,I(_??void 0)},250))}async function I(_){const G=h.value;if(!G)return;const he=j,se=ge,Se=N,$e=R;try{const We=await fetch(`${It}/sessions/${G}/snapshot`);if(!We.ok){_!==void 0&&(oe==null?void 0:oe.generation)===_&&(Ke=_,D());return}const je=await We.json();if(!Dh({snapshot:je,targetSessionId:G,currentSessionId:h.value,targetSessionGeneration:he,currentSessionGeneration:j,targetConnectionGeneration:se,currentConnectionGeneration:ge,targetPromptGeneration:Se,currentPromptGeneration:N,targetLiveGeneration:$e,currentLiveGeneration:R,currentEpoch:re,currentSeq:q})){_!==void 0&&(Ke=_),D();return}P(je,_)}catch{_!==void 0&&(oe==null?void 0:oe.generation)===_&&(Ke=_,D())}}function P(_,G){var tl;J="",ne="",ie.clear();const he=n.value.filter(At=>At.local),se=He.keys().next().value,Se=se?He.get(se):void 0,$e=Se?n.value.find(At=>At.id===Se.messageId):void 0,We=!!(se&&_.messages.some(At=>At.clientMessageId===se)),je=!!(Se&&!We&&Se.connectionGeneration<ge);je&&$e&&($e.isError=!0);const rn=$e&&!We?[$e]:[];n.value=[..._.messages.map(At=>({...At,id:At.id??V()})),...he,...rn];for(let At=n.value.length-1;At>=0;At--){const Ks=(tl=n.value[At])==null?void 0:tl.turnStats;if(Ks&&typeof Ks.turn=="number"&&Ks.turn>0){Dt=Ks.turn;break}}s.value=_.pendingApprovals,r.value={..._.status,busy:_.busy},o.value=_.goal,i.value=_.todos,G!==void 0&&oe!==null&&oe.generation===G&&ae===G&&(oe=null,v()),(We||je)&&(c.value=!1,Fe=!1,He.clear(),je&&e("消息未送达,已恢复连接。","error")),q=_.seq,re=_.epoch,g.value=_.workDir}function V(){return`msg_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function Z(_){U(),ce=Date.now(),M=window.setInterval(()=>{if(Date.now()-ce>Wh){w==null||w.close();return}Te({type:"ping"})},_)}function U(){M!==null&&(clearInterval(M),M=null)}function L(){if(Ue||K!==null)return;te("reconnecting"),pe++;const _=Math.min(1e3*2**pe,3e4);K=window.setTimeout(()=>{K=null,de()},_)}function le(_){switch(_.type){case"server_hello":{const G=_;h.value=G.sessionId,g.value=G.workDir,m.value=G.sessionId,S.value=G.active;const he=re;re=G.epoch,Z(G.heartbeat_ms),Te({type:"client_hello",lastSeq:q,epoch:he}),he!==0&&he!==G.epoch&&(q=0),te("connected"),pe=0,G.active?(I(),sn(),Ws()):Gu(G.sessionId).then(se=>{se&&h.value===G.sessionId&&(S.value=!0),I(),sn(),Ws()});break}case"event":{const G=jh(re,q,_);if(G==="resync"){re=_.epoch,q=0,I();break}if(G==="duplicate")break;q=_.seq,re=_.epoch,R++,qe(_.payload);break}case"user_message":{if(R++,_.clientMessageId&&He.has(_.clientMessageId)){Fe=!0;break}n.value.push({id:V(),role:"user",content:_.text,clientMessageId:_.clientMessageId,tools:[],ts:Date.now()});break}case"approval_request":{R++,s.value=[...s.value,{id:_.id,toolName:_.toolName,action:_.action,display:_.display}];break}case"approval_resolved":{R++,s.value=s.value.filter(G=>G.id!==_.id);break}case"command_result":{const G=_.pendingMsgId?n.value.findIndex(he=>he.id===_.pendingMsgId):-1;if(G>=0){const he=n.value[G];n.value[G]={...he,content:_.message,isError:!_.ok,pending:!1}}else n.value.push({id:V(),role:"system",content:_.message,tools:[],isError:!_.ok,ts:Date.now(),local:!0});(_.command==="fork"||_.command==="title")&&sn(),_.ok&&_.command==="compact"&&I();break}case"resync_required":{q=0,I();break}case"status":{R++,r.value={...r.value,..._.status};break}case"error":{if(u.value=_.message,_.clientMessageId){const G=He.get(_.clientMessageId);if(G){He.delete(_.clientMessageId),c.value=!1,Fe=!1;const he=n.value.find(se=>se.id===G.messageId);he&&(he.isError=!0),e(`消息未发送:${_.message}`,"error")}}break}case"server_empty":{te("idle");break}}}let J="",ne="";const ie=new Map;let ke=!1;function Re(){if(ke)return;const _=Oe();if(!_){J="",ne="",ie.clear();return}if(J&&(_.content+=J,J=""),ne){const G=_.tools.find(he=>he.name==="thinking");G?G.output=(G.output??"")+ne:_.tools.push({toolCallId:"thinking",name:"thinking",output:ne}),ne=""}if(ie.size>0){for(const[G,he]of ie){const se=_.tools.find(Se=>Se.toolCallId===G);se&&(se.output=he)}ie.clear()}}const we=qh(Re);function qe(_){var he;const G=zh({goal:o.value,todos:i.value},_);switch(o.value=G.goal,i.value=G.todos,_.type==="goal.updated"&&oe!==null&&oe.generation===ae&&(oe=null,Ke=null,v()),_.type){case"turn.started":{Fe&&(c.value=!1,Fe=!1,He.clear()),we.flushNow(),r.value={...r.value,busy:!0},Dt+=1,Bt=Date.now(),nt=null,Tt=0,Rt.clear(),n.value.push({id:V(),role:"assistant",content:"",tools:[],ts:Date.now(),turnStats:{turn:Dt,step:0,status:"running",firstTokenMs:null,llmMs:0,toolMs:0,tokens:null,tokensPerSec:null}});break}case"assistant.delta":{nt===null&&(nt=Date.now()),J+=String(_.delta),we.schedule();break}case"thinking.delta":{nt===null&&(nt=Date.now()),ne+=String(_.delta),we.schedule();break}case"tool.call.started":{const se=Oe();se&&(se.tools.push({toolCallId:String(_.toolCallId),name:String(_.name),args:_.args}),se.turnStats&&(se.turnStats.step+=1)),Rt.set(String(_.toolCallId),Date.now());break}case"tool.result":{ie.delete(String(_.toolCallId));const se=Rt.get(String(_.toolCallId));se!==void 0&&(Tt+=Date.now()-se,Rt.delete(String(_.toolCallId)));const Se=Oe();if(Se){const $e=Se.tools.find(We=>We.toolCallId===_.toolCallId);$e&&($e.output=String(_.output),$e.isError=!!_.isError)}break}case"tool.progress":{ie.set(String(_.toolCallId),String(_.message??_.output)),we.schedule();break}case"turn.ended":{if(we.flushNow(),r.value={...r.value,busy:!1},_.reason==="failed"){const je=Oe();je&&(je.isError=!0),u.value=A(_.error,"Turn failed")}const se=Oe(),Se=Date.now()-Bt,$e=(he=r.value.usage)==null?void 0:he.currentTurn,We=$e?$e.inputOther+$e.output+$e.inputCacheRead+$e.inputCacheCreation:null;se&&se.turnStats&&(se.turnStats.status="done",se.turnStats.llmMs=Se,se.turnStats.toolMs=Tt,se.turnStats.firstTokenMs=nt!==null?nt-Bt:null,se.turnStats.tokens=We,se.turnStats.tokensPerSec=We!==null&&Se>0?Math.round(We/Se*1e3):null),sn(),Ws();break}case"session.meta.updated":{const se={};_.model!==void 0&&(se.model=_.model),_.contextTokens!==void 0&&(se.contextTokens=_.contextTokens),_.maxContextTokens!==void 0&&(se.maxContextTokens=_.maxContextTokens),_.contextUsage!==void 0&&(se.contextUsage=_.contextUsage),r.value={...r.value,...se};break}case"agent.status.updated":{const se={};if(_.model!==void 0&&(se.model=_.model),_.thinkingLevel!==void 0&&(se.thinkingLevel=_.thinkingLevel),_.contextTokens!==void 0&&(se.contextTokens=_.contextTokens),_.maxContextTokens!==void 0&&(se.maxContextTokens=_.maxContextTokens),_.contextUsage!==void 0&&(se.contextUsage=_.contextUsage),_.usage!==void 0){se.usage=_.usage;const Se=_.usage;if(Se!=null&&Se.currentTurn){const $e=Oe(),We=Se.currentTurn.inputOther+Se.currentTurn.output+Se.currentTurn.inputCacheRead+Se.currentTurn.inputCacheCreation;$e!=null&&$e.turnStats&&$e.turnStats.status==="done"&&$e.turnStats.tokens===null&&($e.turnStats.tokens=We,$e.turnStats.tokensPerSec=$e.turnStats.llmMs?Math.round(We/$e.turnStats.llmMs*1e3):null)}}r.value={...r.value,...se};break}case"error":{u.value=A(_.error,"Unknown error");break}}}function Oe(){for(let _=n.value.length-1;_>=0;_--)if(n.value[_].role==="assistant")return n.value[_];return null}function de(){if(Ue||w&&(w.readyState===WebSocket.CONNECTING||w.readyState===WebSocket.OPEN))return;te("connecting"),u.value=null,x(),ge++;const _=new WebSocket(O());w=_,_.onclose=G=>{if(w===_&&(w=null,U(),t.value!=="idle")){if(G.code===1008){j++,x(),h.value=null,m.value=null,S.value=!1,o.value=null,i.value=[],te("idle");return}te("disconnected"),L()}},_.onerror=()=>{w===_&&te("reconnecting")},_.onmessage=G=>{if(w!==_)return;ce=Date.now();let he;try{he=JSON.parse(G.data)}catch{return}le(he)}}function ye(_){if(!_||p.value)return;if(t.value==="idle"){e("暂无会话,请先新建会话。","warning");return}if(t.value!=="connected"){e("连接已断开,正在尝试重连...","error"),de();return}const G=`client_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,he=V();He.set(G,{messageId:he,connectionGeneration:ge}),N++,Fe=!1,c.value=!0,n.value.push({id:he,role:"user",content:_,clientMessageId:G,tools:[],ts:Date.now()}),Te({type:"prompt",text:_,clientMessageId:G})}function st(){Te({type:"abort"})}function _t(_,G){if(t.value==="idle"){e("暂无会话,请先新建会话。","warning");return}if(t.value!=="connected"){e("连接已断开,命令未发送。","error"),de();return}if(p.value&&_!=="btw"){e(`会话忙碌中,无法执行 /${_},请稍后再试。`,"warning");return}const he=["compact","plan","auto","yes","fork","title"];let se=null;he.includes(_)&&(se=V(),n.value.push({id:se,role:"system",content:`正在执行 /${_}${G?` ${G}`:""}...`,tools:[],pending:!0,ts:Date.now(),local:!0})),Te({type:"command",command:_,...G?{args:G}:{},...se?{pendingMsgId:se}:{}})}function gt(){n.value=[],s.value=[]}function xt(_){n.value.push({id:V(),role:"system",content:_,tools:[],ts:Date.now(),local:!0})}function qs(_,G,he,se){if(t.value!=="connected"){e("连接已断开,审批结果未发送。","error"),de();return}s.value=s.value.filter(Se=>Se.id!==_),Te({type:"approval_response",id:_,decision:G,...he?{feedback:he}:{},...se?{scope:se}:{}})}async function sn(){try{const _=await fetch(`${It}/sessions`);if(!_.ok)return;d.value=await _.json()}catch{}}async function Gu(_){const G=j,he=ge;try{return(await fetch(`${It}/sessions/${_}/activate`,{method:"POST"})).ok&&ge===he&&Qs(h.value,j,_,G)}catch{return!1}}async function Ws(){try{const _=await fetch(`${It}/git/status`);if(!_.ok)return;const G=await _.json();C.value=G.isRepo?G:null}catch{}}async function Ji(){try{const _=await fetch(`${It}/models`);if(!_.ok)return;const G=await _.json();$.value=G.models}catch{}}const io=F({});async function ju(){try{const _=await fetch(`${It}/like`);if(!_.ok)return;io.value=await _.json()}catch{}}async function zu(_){try{return(await fetch(`${It}/like`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(_)})).ok?(io.value=_,!0):!1}catch{return!1}}async function Xi(_,G,he){const se=h.value;if(!se)return;const Se=j,$e=ge,We=++Y;try{const je=await fetch(`${It}/sessions/${se}/${_}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G)}),rn=await je.json();if(h.value!==se||j!==Se||ge!==$e||Y!==We)return;if(!je.ok){e(rn.message??`请求失败(HTTP ${je.status})`,"error");return}rn.status&&(r.value={...r.value,...rn.status}),xt(he)}catch(je){if(h.value!==se||j!==Se||ge!==$e||Y!==We)return;e(`请求失败:${je instanceof Error?je.message:String(je)}`,"error")}}async function Fu(_){_!==r.value.model&&await Xi("model",{model:_},`已切换模型:${_}`)}async function Uu(_){_!==r.value.thinkingLevel&&await Xi("thinking",{level:_},`思考强度已切换为 ${_}`)}async function Vs(_,G,he,se){const Se=h.value;if(!Se)return a.value="暂无可操作的会话。",null;if(t.value!=="connected")return a.value="连接已断开,请等待重连后再试。",null;if(b.value)return a.value="当前会话已归档,无法修改 Goal。",null;if(Ze)return a.value="正在处理上一个请求,请稍候。",null;oe!==null&&(oe=null,v());const $e=j,We=++ae;Ze=!0,v(),a.value=null;try{const je=await fetch(`${It}/sessions/${Se}/goal${_}`,{method:G,headers:{"Content-Type":"application/json"},body:JSON.stringify(he)}),rn=await je.json().catch(()=>({}));return!Qs(h.value,j,Se,$e)||ae!==We?null:je.ok?(se&&(oe={generation:We},Ke=We),rn):(a.value=typeof rn.message=="string"?rn.message:`请求失败(HTTP ${je.status})`,null)}catch(je){return Qs(h.value,j,Se,$e)&&ae===We&&(a.value=`请求失败:${je instanceof Error?je.message:String(je)}`),null}finally{Qs(h.value,j,Se,$e)&&ae===We&&(Ze=!1,v())}}async function Hu(_){const G=await Vs("/refine","POST",{description:_},!1);return typeof(G==null?void 0:G.objective)=="string"?G.objective:null}async function qu(_){return await Vs("","POST",Bh(_),!0)===null?!1:(oe!==null&&I(oe.generation),!0)}async function Wu(_){return await Vs("","PATCH",Gh(_),!0)===null?!1:(oe!==null&&I(oe.generation),!0)}async function lo(_){return await Vs(_,"POST",{},!0)===null?!1:(oe!==null&&I(oe.generation),!0)}function Vu(){return lo("/pause")}function Ku(){return lo("/resume")}function Zu(){return lo("/cancel")}async function Yu(){try{const _=await fetch(`${It}/sessions`,{method:"POST"});if(!_.ok){e(`新建会话失败(HTTP ${_.status})`,"error");return}const G=await _.json();d.value=[G,...d.value],await ao(G.sessionId)}catch(_){e(`新建会话失败:${_ instanceof Error?_.message:String(_)}`,"error")}}async function ao(_){m.value===_&&t.value==="connected"||(m.value=_,h.value=_,j++,x(),q=0,re=0,n.value=[],s.value=[],r.value={busy:!1},o.value=null,i.value=[],S.value=!1,c.value=!1,Fe=!1,He.clear(),K!==null&&(clearTimeout(K),K=null),B!==null&&(clearTimeout(B),B=null),w&&(w.onclose=null,w.close(),w=null),U(),de())}async function Ju(_){try{const G=await fetch(`${It}/sessions/${_}`,{method:"DELETE"});if(!G.ok){e(`删除会话失败(HTTP ${G.status})`,"error");return}if(d.value=d.value.filter(he=>he.sessionId!==_),m.value===_){const he=d.value[0];he?await ao(he.sessionId):(j++,x(),h.value=null,m.value=null,S.value=!1,q=0,re=0,n.value=[],s.value=[],r.value={busy:!1},o.value=null,i.value=[],c.value=!1,Fe=!1,He.clear(),w&&(w.onclose=null,w.close(),w=null),U(),te("idle"))}}catch(G){e(`删除会话失败:${G instanceof Error?G.message:String(G)}`,"error")}}async function Xu(_){try{const G=await fetch(`${It}/sessions/${_}/export`);if(!G.ok){e(`导出会话失败(HTTP ${G.status})`,"error");return}const he=await G.blob(),se=URL.createObjectURL(he),Se=document.createElement("a");Se.href=se,Se.download=`${_}.md`,Se.click(),URL.revokeObjectURL(se)}catch(G){e(`导出会话失败:${G instanceof Error?G.message:String(G)}`,"error")}}de(),sn(),Ji();const Qi=()=>{de()},el=()=>{!document.hidden&&t.value!=="connected"&&de()};return window.addEventListener("online",Qi),document.addEventListener("visibilitychange",el),nn(()=>{Ue=!0,ke=!0,we.dispose(),window.removeEventListener("online",Qi),document.removeEventListener("visibilitychange",el),U(),K!==null&&(clearTimeout(K),K=null),B!==null&&(clearTimeout(B),B=null),w&&(w.onclose=null,w.close(),w=null)}),{connectionStatus:t,messages:n,pendingApprovals:s,status:r,goal:o,todos:i,goalRequestPending:l,goalRequestError:a,error:u,sessionId:h,workDir:g,isBusy:p,isArchived:b,sessions:d,currentSessionId:m,gitStatus:C,models:$,like:io,fetchLike:ju,updateLike:zu,sendPrompt:ye,sendCommand:_t,clearMessages:gt,appendSystemMessage:xt,abort:st,resolveApproval:qs,fetchSessions:sn,fetchGitStatus:Ws,fetchModels:Ji,switchModel:Fu,switchThinking:Uu,refineGoal:Hu,createGoal:qu,updateGoal:Wu,pauseGoal:Vu,resumeGoal:Ku,cancelGoal:Zu,createSession:Yu,switchSession:ao,deleteSession:Ju,exportSession:Xu,fetchSnapshot:I}}function Kh(e){const{storageKey:t,defaultWidth:n,min:s,max:r}=e;function o(C){return Number.isFinite(C)?Math.min(Gf(r),Math.max(s,Math.round(C))):n}function i(){try{const C=localStorage.getItem(t);if(C===null)return n;const $=Number(C);return Number.isFinite($)?o($):n}catch{return n}}function l(C){try{localStorage.setItem(t,String(C))}catch{}}const a=F(i()),c=F(!1);function u(C){const $=o(C);a.value=$,l($)}let h=0,g=0,p=null,d=-1;function m(C){if(!c.value)return;const $=C.clientX-h;u(g+$)}function S(){if(c.value){if(c.value=!1,document.body.style.userSelect="",document.body.style.cursor="",p){try{p.releasePointerCapture(d)}catch{}p.removeEventListener("pointermove",m),p.removeEventListener("pointerup",S),p.removeEventListener("pointercancel",S)}p=null,d=-1}}function b(C){C.preventDefault(),c.value=!0,h=C.clientX,g=o(a.value),p=C.currentTarget,d=C.pointerId,document.body.style.userSelect="none",document.body.style.cursor="col-resize";try{p.setPointerCapture(C.pointerId)}catch{}p.addEventListener("pointermove",m),p.addEventListener("pointerup",S),p.addEventListener("pointercancel",S)}return nn(S),{width:a,dragging:c,clamp:o,setWidth:u,onPointerDown:b}}const Ri=[{name:"compact",description:"压缩会话上下文",target:"backend"},{name:"model",description:"切换模型 / 思考强度",target:"local"},{name:"clear",description:"清空本地消息列表",target:"local"},{name:"new",description:"新建会话",target:"local"},{name:"help",description:"显示可用命令",target:"local"},{name:"auto",description:"切换为 auto 权限模式",target:"backend"},{name:"yes",description:"切换为 yolo 权限模式",target:"backend",aliases:["yolo"]},{name:"plan",description:"切换计划模式",target:"backend"},{name:"fork",description:"复制当前会话为新分支",target:"backend"},{name:"title",description:"重命名当前会话",target:"backend",aliases:["rename"],acceptsInput:!0},{name:"status",description:"查看会话状态",target:"local"},{name:"usage",description:"查看 Token 用量",target:"local"},{name:"btw",description:"快速侧问(不打断当前回合)",target:"backend",acceptsInput:!0}];function Zh(e){const t=e.toLowerCase();return Ri.filter(n=>{var s;return n.name.startsWith(t)||((s=n.aliases)==null?void 0:s.some(r=>r.startsWith(t)))})}function Yh(e){const t=e.toLowerCase(),n=Ri.find(s=>{var r;return s.name===t||((r=s.aliases)==null?void 0:r.includes(t))});return(n==null?void 0:n.name)??t}function Jh(){return["可用命令:",...Ri.map(t=>{var s;return`${(s=t.aliases)!=null&&s.length?[t.name,...t.aliases].map(r=>`/${r}`).join(", "):`/${t.name}`} - ${t.description}`})].join(`
|
|
18
|
-
`)}const Xh=["width","height"],Qh={key:0,d:"M4 7h16M4 12h16M4 17h16"},ep={key:1,d:"M12 5v14M5 12h14"},tp={key:5,d:"M4 6h16M7 12h10M10 18h4"},np={key:6,d:"M12 3v12m0 0 4-4m-4 4-4-4M5 20h14"},sp={key:7,d:"M4 7h16M9 7V4h6v3m3 0-1 13H7L6 7m4 4v5m4-5v5"},rp={key:8,d:"M3 12h4l2-7 4 14 2-7h6"},op={key:10,d:"m15 18-6-6 6-6"},ip={key:11,d:"m9 18 6-6-6-6"},lp={key:12,d:"m6 9 6 6 6-6"},ap={key:16,d:"M20 15.5A8.5 8.5 0 0 1 8.5 4 8.5 8.5 0 1 0 20 15.5Z"},cp={key:18,d:"M5 9a11 11 0 0 1 14 0M8.5 12.5a6 6 0 0 1 7 0M12 17h.01"},up={key:19,d:"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z"},fp={key:20,d:"M12 16V4m0 0-4 4m4-4 4 4M5 20h14"},dp={key:21,d:"m15 4 5 5M17.5 6.5 10 14m-2-2 4 4-3 4H3l1-6Z"},hp={key:22,d:"M9 6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3Z"},pp={key:24,d:"m22 2-7 20-4-9-9-4ZM22 2 11 13"},gp={key:25,x:"6",y:"6",width:"12",height:"12",rx:"2"},mp={key:26,d:"m8 3 4 4 4-4M8 21l4-4 4 4M12 7v10"},vp={key:27,d:"M9.5 4.5A3 3 0 0 0 5 7a3 3 0 0 0 .5 5.5A3 3 0 0 0 9 17v2a2 2 0 0 0 4 0V5a2.5 2.5 0 0 0-3.5-.5ZM13 6a3 3 0 0 1 5 2 3 3 0 0 1 .5 5.5A3 3 0 0 1 15 18"},yp={key:30,d:"M21 12a8 8 0 0 1-9 8 9 9 0 0 1-4-.9L3 21l1.7-4A9 9 0 1 1 21 12Z"},bp={key:31,d:"M20 13 13 20l-9-9V4h7ZM8.5 8.5h.01"},kp={key:32,d:"m12 3 1.3 3.7L17 8l-3.7 1.3L12 13l-1.3-3.7L7 8l3.7-1.3ZM5 15l.8 2.2L8 18l-2.2.8L5 21l-.8-2.2L2 18l2.2-.8ZM19 14l.7 1.8 1.8.7-1.8.7L19 19l-.7-1.8-1.8-.7 1.8-.7Z"},wp={key:34,d:"M3 6h7l2 2h9v11H3Z"},Sp={key:35,d:"m5 12 4 4L19 6"},_p={key:39,d:"M21 12a9 9 0 1 1-2.6-6.4M21 3v6h-6"},xp=xe({__name:"SvgIcon",props:{name:{},size:{default:20}},setup(e){return(t,n)=>(y(),k("svg",{class:"svg-icon",width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e.name==="menu"?(y(),k("path",Qh)):e.name==="plus"?(y(),k("path",ep)):e.name==="panel-left"?(y(),k(Q,{key:2},[n[0]||(n[0]=f("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[1]||(n[1]=f("path",{d:"M9 4v16"},null,-1))],64)):e.name==="panel-right"?(y(),k(Q,{key:3},[n[2]||(n[2]=f("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[3]||(n[3]=f("path",{d:"M15 4v16"},null,-1))],64)):e.name==="search"?(y(),k(Q,{key:4},[n[4]||(n[4]=f("circle",{cx:"11",cy:"11",r:"7"},null,-1)),n[5]||(n[5]=f("path",{d:"m20 20-4-4"},null,-1))],64)):e.name==="filter"?(y(),k("path",tp)):e.name==="download"?(y(),k("path",np)):e.name==="trash"?(y(),k("path",sp)):e.name==="activity"?(y(),k("path",rp)):e.name==="help"?(y(),k(Q,{key:9},[n[6]||(n[6]=f("circle",{cx:"12",cy:"12",r:"9"},null,-1)),n[7]||(n[7]=f("path",{d:"M9.7 9a2.5 2.5 0 1 1 3.5 2.3c-.8.4-1.2 1-1.2 1.7M12 17h.01"},null,-1))],64)):e.name==="chevron-left"?(y(),k("path",op)):e.name==="chevron-right"?(y(),k("path",ip)):e.name==="chevron-down"?(y(),k("path",lp)):e.name==="bot"?(y(),k(Q,{key:13},[n[8]||(n[8]=f("rect",{x:"4",y:"7",width:"16",height:"12",rx:"3"},null,-1)),n[9]||(n[9]=f("path",{d:"M12 3v4M8 12h.01M16 12h.01M9 16h6"},null,-1))],64)):e.name==="git-branch"?(y(),k(Q,{key:14},[n[10]||(n[10]=f("circle",{cx:"6",cy:"5",r:"2"},null,-1)),n[11]||(n[11]=f("circle",{cx:"18",cy:"7",r:"2"},null,-1)),n[12]||(n[12]=f("circle",{cx:"6",cy:"19",r:"2"},null,-1)),n[13]||(n[13]=f("path",{d:"M6 7v10M8 10c5 0 3-3 8-3"},null,-1))],64)):e.name==="sun"?(y(),k(Q,{key:15},[n[14]||(n[14]=f("circle",{cx:"12",cy:"12",r:"4"},null,-1)),n[15]||(n[15]=f("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3 1.42-1.42"},null,-1))],64)):e.name==="moon"?(y(),k("path",ap)):e.name==="monitor"?(y(),k(Q,{key:17},[n[16]||(n[16]=f("rect",{x:"3",y:"4",width:"18",height:"13",rx:"2"},null,-1)),n[17]||(n[17]=f("path",{d:"M8 21h8M12 17v4"},null,-1))],64)):e.name==="wifi"?(y(),k("path",cp)):e.name==="edit"?(y(),k("path",up)):e.name==="upload"?(y(),k("path",fp)):e.name==="broom"?(y(),k("path",dp)):e.name==="command"?(y(),k("path",hp)):e.name==="at"?(y(),k(Q,{key:23},[n[18]||(n[18]=f("circle",{cx:"12",cy:"12",r:"4"},null,-1)),n[19]||(n[19]=f("path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.5 7"},null,-1))],64)):e.name==="send"?(y(),k("path",pp)):e.name==="stop"?(y(),k("rect",gp)):e.name==="compact"?(y(),k("path",mp)):e.name==="brain"?(y(),k("path",vp)):e.name==="clipboard"?(y(),k(Q,{key:28},[n[20]||(n[20]=f("rect",{x:"5",y:"4",width:"14",height:"17",rx:"2"},null,-1)),n[21]||(n[21]=f("path",{d:"M9 4V2h6v2M9 10h6M9 14h6"},null,-1))],64)):e.name==="fork"?(y(),k(Q,{key:29},[n[22]||(n[22]=f("circle",{cx:"6",cy:"4",r:"2"},null,-1)),n[23]||(n[23]=f("circle",{cx:"18",cy:"6",r:"2"},null,-1)),n[24]||(n[24]=f("circle",{cx:"6",cy:"20",r:"2"},null,-1)),n[25]||(n[25]=f("path",{d:"M6 6v12M8 10c6 0 4-4 8-4"},null,-1))],64)):e.name==="message-circle"?(y(),k("path",yp)):e.name==="tag"?(y(),k("path",bp)):e.name==="sparkles"?(y(),k("path",kp)):e.name==="terminal"?(y(),k(Q,{key:33},[n[26]||(n[26]=f("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[27]||(n[27]=f("path",{d:"m7 9 3 3-3 3m5 0h5"},null,-1))],64)):e.name==="folder"?(y(),k("path",wp)):e.name==="check"?(y(),k("path",Sp)):e.name==="speaker"?(y(),k(Q,{key:36},[n[28]||(n[28]=f("path",{d:"M11 5 6 9H3v6h3l5 4V5z"},null,-1)),n[29]||(n[29]=f("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"},null,-1)),n[30]||(n[30]=f("path",{d:"M18 6a8.5 8.5 0 0 1 0 12"},null,-1))],64)):e.name==="speaker-off"?(y(),k(Q,{key:37},[n[31]||(n[31]=f("path",{d:"M11 5 6 9H3v6h3l5 4V5z"},null,-1)),n[32]||(n[32]=f("path",{d:"m16 9 5 6M21 9l-5 6"},null,-1))],64)):e.name==="copy"?(y(),k(Q,{key:38},[n[33]||(n[33]=f("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1)),n[34]||(n[34]=f("path",{d:"M16 8V4H4v12h4"},null,-1))],64)):e.name==="refresh"?(y(),k("path",_p)):e.name==="target"?(y(),k(Q,{key:40},[n[35]||(n[35]=f("circle",{cx:"12",cy:"12",r:"9"},null,-1)),n[36]||(n[36]=f("circle",{cx:"12",cy:"12",r:"5"},null,-1)),n[37]||(n[37]=f("circle",{cx:"12",cy:"12",r:"1"},null,-1))],64)):W("",!0)],8,Xh))}}),Ce=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},fe=Ce(xp,[["__scopeId","data-v-97731562"]]),Cp={class:"chat-header"},$p={class:"title-area"},Tp=["onKeydown"],Rp={key:1,class:"title-copy"},Ap={class:"title-line"},Ep=["title"],Ip={class:"status-line"},Lp={class:"header-actions"},Pp=["title"],Mp=["title"],Np=xe({__name:"ChatHeader",props:{title:{default:null},busy:{type:Boolean,default:!1}},emits:["rename","export","clear","toggle-rightbar","menu"],setup(e,{emit:t}){const n=e,s=t,r=F(!1),o=F(""),i=F(null);Ne(()=>n.title,()=>{r.value||(o.value=n.title??"")},{immediate:!0});function l(){o.value=n.title??"",r.value=!0,Gt(()=>{var g,p;(g=i.value)==null||g.focus(),(p=i.value)==null||p.select()})}function a(){r.value=!1;const g=o.value.trim();g&&g!==n.title?s("rename",g):o.value=n.title??""}function c(){r.value=!1,o.value=n.title??""}const u=Ft("showThinking",F(!0)),h=Ft("showTools",F(!0));return(g,p)=>(y(),k("div",Cp,[f("button",{class:"mobile-menu","aria-label":"打开会话列表",title:"打开会话列表",onClick:p[0]||(p[0]=d=>s("menu"))},[H(fe,{name:"menu"})]),f("div",$p,[r.value?Qe((y(),k("input",{key:0,id:"session-title-input",ref_key:"inputRef",ref:i,"onUpdate:modelValue":p[1]||(p[1]=d=>o.value=d),name:"session-title",class:"title-input",maxlength:"80",onKeydown:[Ls(qt(a,["prevent"]),["enter"]),Ls(qt(c,["prevent"]),["esc"])],onBlur:a},null,40,Tp)),[[yt,o.value]]):(y(),k("div",Rp,[f("div",Ap,[f("h1",{title:e.title??void 0},E(e.title||"新会话"),9,Ep),f("button",{class:"icon-action edit",title:"重命名会话","aria-label":"重命名会话",onClick:l},[H(fe,{name:"edit",size:17})])]),f("div",Ip,[f("span",{class:be(["status-dot",{busy:e.busy}])},null,2),_e(E(e.busy?"Agent 正在运行并处理工具调用":"Agent 已就绪"),1)])]))]),f("div",Lp,[f("button",{class:"text-action",title:"导出会话为 Markdown",onClick:p[2]||(p[2]=d=>s("export"))},[H(fe,{name:"upload",size:18}),p[7]||(p[7]=f("span",null,"导出",-1))]),f("button",{class:"text-action",title:"清空本地消息列表",onClick:p[3]||(p[3]=d=>s("clear"))},[H(fe,{name:"broom",size:18}),p[8]||(p[8]=f("span",null,"清空",-1))]),f("button",{class:be(["text-action",{dimmed:!X(u)}]),title:X(u)?"隐藏思考链":"显示思考链",onClick:p[4]||(p[4]=d=>u.value=!X(u))},[H(fe,{name:"brain",size:18}),p[9]||(p[9]=f("span",null,"思考",-1))],10,Pp),f("button",{class:be(["text-action",{dimmed:!X(h)}]),title:X(h)?"隐藏工具链":"显示工具链",onClick:p[5]||(p[5]=d=>h.value=!X(h))},[H(fe,{name:"terminal",size:18}),p[10]||(p[10]=f("span",null,"工具",-1))],10,Mp),f("button",{class:"icon-action rightbar-action",title:"显示或隐藏右侧面板","aria-label":"显示或隐藏右侧面板",onClick:p[6]||(p[6]=d=>s("toggle-rightbar"))},[H(fe,{name:"panel-right",size:19})])])]))}}),Op=Ce(Np,[["__scopeId","data-v-56b72ade"]]),Ai=""+new URL("../icon.ico",import.meta.url).href;function Ei(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Fn=Ei();function Hc(e){Fn=e}var _s={exec:()=>null};function Me(e,t=""){let n=typeof e=="string"?e:e.source;const s={replace:(r,o)=>{let i=typeof o=="string"?o:o.source;return i=i.replace(kt.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,t)};return s}var kt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Dp=/^(?:[ \t]*(?:\n|$))+/,Bp=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Gp=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jp=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ii=/(?:[*+-]|\d{1,9}[.)])/,qc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wc=Me(qc).replace(/bull/g,Ii).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),zp=Me(qc).replace(/bull/g,Ii).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Li=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Fp=/^[^\n]+/,Pi=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Up=Me(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Pi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Hp=Me(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ii).getRegex(),eo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Mi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,qp=Me("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Mi).replace("tag",eo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Vc=Me(Li).replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",eo).getRegex(),Wp=Me(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Vc).getRegex(),Ni={blockquote:Wp,code:Bp,def:Up,fences:Gp,heading:jp,hr:Fs,html:qp,lheading:Wc,list:Hp,newline:Dp,paragraph:Vc,table:_s,text:Fp},Ul=Me("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",eo).getRegex(),Vp={...Ni,lheading:zp,table:Ul,paragraph:Me(Li).replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ul).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",eo).getRegex()},Kp={...Ni,html:Me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Mi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Me(Li).replace("hr",Fs).replace("heading",` *#{1,6} *[^
|
|
19
|
-
]`).replace("lheading",Wc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Zp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Yp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Kc=/^( {2,}|\\)\n(?!\s*$)/,Jp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,to=/[\p{P}\p{S}]/u,Oi=/[\s\p{P}\p{S}]/u,Zc=/[^\s\p{P}\p{S}]/u,Xp=Me(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Oi).getRegex(),Yc=/(?!~)[\p{P}\p{S}]/u,Qp=/(?!~)[\s\p{P}\p{S}]/u,eg=/(?:[^\s\p{P}\p{S}]|~)/u,tg=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Jc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ng=Me(Jc,"u").replace(/punct/g,to).getRegex(),sg=Me(Jc,"u").replace(/punct/g,Yc).getRegex(),Xc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",rg=Me(Xc,"gu").replace(/notPunctSpace/g,Zc).replace(/punctSpace/g,Oi).replace(/punct/g,to).getRegex(),og=Me(Xc,"gu").replace(/notPunctSpace/g,eg).replace(/punctSpace/g,Qp).replace(/punct/g,Yc).getRegex(),ig=Me("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Zc).replace(/punctSpace/g,Oi).replace(/punct/g,to).getRegex(),lg=Me(/\\(punct)/,"gu").replace(/punct/g,to).getRegex(),ag=Me(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),cg=Me(Mi).replace("(?:-->|$)","-->").getRegex(),ug=Me("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",cg).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Cr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,fg=Me(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Cr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qc=Me(/^!?\[(label)\]\[(ref)\]/).replace("label",Cr).replace("ref",Pi).getRegex(),eu=Me(/^!?\[(ref)\](?:\[\])?/).replace("ref",Pi).getRegex(),dg=Me("reflink|nolink(?!\\()","g").replace("reflink",Qc).replace("nolink",eu).getRegex(),Di={_backpedal:_s,anyPunctuation:lg,autolink:ag,blockSkip:tg,br:Kc,code:Yp,del:_s,emStrongLDelim:ng,emStrongRDelimAst:rg,emStrongRDelimUnd:ig,escape:Zp,link:fg,nolink:eu,punctuation:Xp,reflink:Qc,reflinkSearch:dg,tag:ug,text:Jp,url:_s},hg={...Di,link:Me(/^!?\[(label)\]\((.*?)\)/).replace("label",Cr).getRegex(),reflink:Me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cr).getRegex()},Vo={...Di,emStrongRDelimAst:og,emStrongLDelim:sg,url:Me(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},pg={...Vo,br:Me(Kc).replace("{2,}","*").getRegex(),text:Me(Vo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},er={normal:Ni,gfm:Vp,pedantic:Kp},us={normal:Di,gfm:Vo,breaks:pg,pedantic:hg},gg={"&":"&","<":"<",">":">",'"':""","'":"'"},Hl=e=>gg[e];function Kt(e,t){if(t){if(kt.escapeTest.test(e))return e.replace(kt.escapeReplace,Hl)}else if(kt.escapeTestNoEncode.test(e))return e.replace(kt.escapeReplaceNoEncode,Hl);return e}function ql(e){try{e=encodeURI(e).replace(kt.percentDecode,"%")}catch{return null}return e}function Wl(e,t){var o;const n=e.replace(kt.findPipe,(i,l,a)=>{let c=!1,u=l;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),s=n.split(kt.splitPipe);let r=0;if(s[0].trim()||s.shift(),s.length>0&&!((o=s.at(-1))!=null&&o.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(kt.slashPipe,"|");return s}function fs(e,t,n){const s=e.length;if(s===0)return"";let r=0;for(;r<s&&e.charAt(s-r-1)===t;)r++;return e.slice(0,s-r)}function mg(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let s=0;s<e.length;s++)if(e[s]==="\\")s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return n>0?-2:-1}function Vl(e,t,n,s,r){const o=t.href,i=t.title||null,l=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;const a={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,a}function vg(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(s===null)return t;const r=s[1];return t.split(`
|
|
20
|
-
`).map(o=>{const i=o.match(n.other.beginningSpace);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(`
|
|
21
|
-
`)}var $r=class{constructor(e){T(this,"options");T(this,"rules");T(this,"lexer");this.options=e||Fn}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:fs(n,`
|
|
22
|
-
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=vg(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const s=fs(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:fs(t[0],`
|
|
23
|
-
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=fs(t[0],`
|
|
24
|
-
`).split(`
|
|
25
|
-
`),s="",r="";const o=[];for(;n.length>0;){let i=!1;const l=[];let a;for(a=0;a<n.length;a++)if(this.rules.other.blockquoteStart.test(n[a]))l.push(n[a]),i=!0;else if(!i)l.push(n[a]);else break;n=n.slice(a);const c=l.join(`
|
|
26
|
-
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
27
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
28
|
-
${c}`:c,r=r?`${r}
|
|
29
|
-
${u}`:u;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=h,n.length===0)break;const g=o.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const p=g,d=p.raw+`
|
|
30
|
-
`+n.join(`
|
|
31
|
-
`),m=this.blockquote(d);o[o.length-1]=m,s=s.substring(0,s.length-p.raw.length)+m.raw,r=r.substring(0,r.length-p.text.length)+m.text;break}else if((g==null?void 0:g.type)==="list"){const p=g,d=p.raw+`
|
|
32
|
-
`+n.join(`
|
|
33
|
-
`),m=this.list(d);o[o.length-1]=m,s=s.substring(0,s.length-g.raw.length)+m.raw,r=r.substring(0,r.length-p.raw.length)+m.raw,n=d.substring(o.at(-1).raw.length).split(`
|
|
34
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let i=!1;for(;e;){let a=!1,c="",u="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let h=t[2].split(`
|
|
35
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),g=e.split(`
|
|
36
|
-
`,1)[0],p=!h.trim(),d=0;if(this.options.pedantic?(d=2,u=h.trimStart()):p?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,u=h.slice(d),d+=t[1].length),p&&this.rules.other.blankLine.test(g)&&(c+=g+`
|
|
37
|
-
`,e=e.substring(g.length+1),a=!0),!a){const b=this.rules.other.nextBulletRegex(d),C=this.rules.other.hrRegex(d),$=this.rules.other.fencesBeginRegex(d),w=this.rules.other.headingBeginRegex(d),M=this.rules.other.htmlBeginRegex(d);for(;e;){const K=e.split(`
|
|
38
|
-
`,1)[0];let B;if(g=K,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),B=g):B=g.replace(this.rules.other.tabCharGlobal," "),$.test(g)||w.test(g)||M.test(g)||b.test(g)||C.test(g))break;if(B.search(this.rules.other.nonSpaceChar)>=d||!g.trim())u+=`
|
|
39
|
-
`+B.slice(d);else{if(p||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||$.test(h)||w.test(h)||C.test(h))break;u+=`
|
|
40
|
-
`+g}!p&&!g.trim()&&(p=!0),c+=K+`
|
|
41
|
-
`,e=e.substring(K.length+1),h=B.slice(d)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0));let m=null,S;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(S=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:c,task:!!m,checked:S,loose:!1,text:u,tokens:[]}),r.raw+=c}const l=r.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let a=0;a<r.items.length;a++)if(this.lexer.state.top=!1,r.items[a].tokens=this.lexer.blockTokens(r.items[a].text,[]),!r.loose){const c=r.items[a].tokens.filter(h=>h.type==="space"),u=c.length>0&&c.some(h=>this.rules.other.anyLine.test(h.raw));r.loose=u}if(r.loose)for(let a=0;a<r.items.length;a++)r.items[a].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:r}}}table(e){var i;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const n=Wl(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(i=t[3])!=null&&i.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
42
|
-
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<n.length;l++)o.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:o.align[l]});for(const l of r)o.rows.push(Wl(l,o.header.length).map((a,c)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[c]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
|
|
43
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const o=fs(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=mg(t[2],"()");if(o===-2)return;if(o>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),Vl(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Vl(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...s[0]].length-1;let i,l,a=o,c=0;const u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);(s=u.exec(t))!=null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(l=[...i].length,s[3]||s[4]){a+=l;continue}else if((s[5]||s[6])&&o%3&&!((o+l)%3)){c+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+c);const h=[...s[0]][0].length,g=e.slice(0,o+s.index+h+l);if(Math.min(o,l)%2){const d=g.slice(1,-1);return{type:"em",raw:g,text:d,tokens:this.lexer.inlineTokens(d)}}const p=g.slice(2,-2);return{type:"strong",raw:g,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let s,r;if(t[2]==="@")s=t[0],r="mailto:"+s;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);s=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},dn=class Ko{constructor(t){T(this,"tokens");T(this,"options");T(this,"state");T(this,"tokenizer");T(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Fn,this.options.tokenizer=this.options.tokenizer||new $r,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:kt,block:er.normal,inline:us.normal};this.options.pedantic?(n.block=er.pedantic,n.inline=us.pedantic):this.options.gfm&&(n.block=er.gfm,this.options.breaks?n.inline=us.breaks:n.inline=us.gfm),this.tokenizer.rules=n}static get rules(){return{block:er,inline:us}}static lex(t,n){return new Ko(n).lex(t)}static lexInline(t,n){return new Ko(n).inlineTokens(t)}lex(t){t=t.replace(kt.carriageReturn,`
|
|
44
|
-
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],s=!1){var r,o,i;for(this.options.pedantic&&(t=t.replace(kt.tabCharGlobal," ").replace(kt.spaceLine,""));t;){let l;if((o=(r=this.options.extensions)==null?void 0:r.block)!=null&&o.some(c=>(l=c.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const c=n.at(-1);l.raw.length===1&&c!==void 0?c.raw+=`
|
|
45
|
-
`:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
46
|
-
`+l.raw,c.text+=`
|
|
47
|
-
`+l.text,this.inlineQueue.at(-1).src=c.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
48
|
-
`+l.raw,c.text+=`
|
|
49
|
-
`+l.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let a=t;if((i=this.options.extensions)!=null&&i.startBlock){let c=1/0;const u=t.slice(1);let h;this.options.extensions.startBlock.forEach(g=>{h=g.call({lexer:this},u),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(a=t.substring(0,c+1))}if(this.state.top&&(l=this.tokenizer.paragraph(a))){const c=n.at(-1);s&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=`
|
|
50
|
-
`+l.raw,c.text+=`
|
|
51
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(l),s=a.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
52
|
-
`+l.raw,c.text+=`
|
|
53
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(l);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,a,c;let s=t,r=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,i="";for(;t;){o||(i=""),o=!1;let u;if((a=(l=this.options.extensions)==null?void 0:l.inline)!=null&&a.some(g=>(u=g.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);const g=n.at(-1);u.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=u.raw,g.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,s,i)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let h=t;if((c=this.options.extensions)!=null&&c.startInline){let g=1/0;const p=t.slice(1);let d;this.options.extensions.startInline.forEach(m=>{d=m.call({lexer:this},p),typeof d=="number"&&d>=0&&(g=Math.min(g,d))}),g<1/0&&g>=0&&(h=t.substring(0,g+1))}if(u=this.tokenizer.inlineText(h)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(i=u.raw.slice(-1)),o=!0;const g=n.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=u.raw,g.text+=u.text):n.push(u);continue}if(t){const g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return n}},Tr=class{constructor(e){T(this,"options");T(this,"parser");this.options=e||Fn}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const s=(o=(t||"").match(kt.notSpaceStart))==null?void 0:o[0],r=e.replace(kt.endingNewline,"")+`
|
|
54
|
-
`;return s?'<pre><code class="language-'+Kt(s)+'">'+(n?r:Kt(r,!0))+`</code></pre>
|
|
55
|
-
`:"<pre><code>"+(n?r:Kt(r,!0))+`</code></pre>
|
|
56
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
57
|
-
${this.parser.parse(e)}</blockquote>
|
|
58
|
-
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
59
|
-
`}hr(e){return`<hr>
|
|
60
|
-
`}list(e){const t=e.ordered,n=e.start;let s="";for(let i=0;i<e.items.length;i++){const l=e.items[i];s+=this.listitem(l)}const r=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+r+o+`>
|
|
61
|
-
`+s+"</"+r+`>
|
|
62
|
-
`}listitem(e){var n;let t="";if(e.task){const s=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=s+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=s+" "+Kt(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):t+=s+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
63
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
64
|
-
`}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s="";for(let r=0;r<e.rows.length;r++){const o=e.rows[r];n="";for(let i=0;i<o.length;i++)n+=this.tablecell(o[i]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
65
|
-
<thead>
|
|
66
|
-
`+t+`</thead>
|
|
67
|
-
`+s+`</table>
|
|
68
|
-
`}tablerow({text:e}){return`<tr>
|
|
69
|
-
${e}</tr>
|
|
70
|
-
`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
71
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Kt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),r=ql(e);if(r===null)return s;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+Kt(t)+'"'),o+=">"+s+"</a>",o}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));const r=ql(e);if(r===null)return Kt(n);e=r;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${Kt(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Kt(e.text)}},Bi=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},hn=class Zo{constructor(t){T(this,"options");T(this,"renderer");T(this,"textRenderer");this.options=t||Fn,this.options.renderer=this.options.renderer||new Tr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bi}static parse(t,n){return new Zo(n).parse(t)}static parseInline(t,n){return new Zo(n).parseInline(t)}parse(t,n=!0){var r,o;let s="";for(let i=0;i<t.length;i++){const l=t[i];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[l.type]){const c=l,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){s+=u||"";continue}}const a=l;switch(a.type){case"space":{s+=this.renderer.space(a);continue}case"hr":{s+=this.renderer.hr(a);continue}case"heading":{s+=this.renderer.heading(a);continue}case"code":{s+=this.renderer.code(a);continue}case"table":{s+=this.renderer.table(a);continue}case"blockquote":{s+=this.renderer.blockquote(a);continue}case"list":{s+=this.renderer.list(a);continue}case"html":{s+=this.renderer.html(a);continue}case"paragraph":{s+=this.renderer.paragraph(a);continue}case"text":{let c=a,u=this.renderer.text(c);for(;i+1<t.length&&t[i+1].type==="text";)c=t[++i],u+=`
|
|
72
|
-
`+this.renderer.text(c);n?s+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):s+=u;continue}default:{const c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}parseInline(t,n=this.renderer){var r,o;let s="";for(let i=0;i<t.length;i++){const l=t[i];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[l.type]){const c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=c||"";continue}}const a=l;switch(a.type){case"escape":{s+=n.text(a);break}case"html":{s+=n.html(a);break}case"link":{s+=n.link(a);break}case"image":{s+=n.image(a);break}case"strong":{s+=n.strong(a);break}case"em":{s+=n.em(a);break}case"codespan":{s+=n.codespan(a);break}case"br":{s+=n.br(a);break}case"del":{s+=n.del(a);break}case"text":{s+=n.text(a);break}default:{const c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}},Io,cr=(Io=class{constructor(e){T(this,"options");T(this,"block");this.options=e||Fn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?dn.lex:dn.lexInline}provideParser(){return this.block?hn.parse:hn.parseInline}},T(Io,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Io),yg=class{constructor(...e){T(this,"defaults",Ei());T(this,"options",this.setOptions);T(this,"parse",this.parseMarkdown(!0));T(this,"parseInline",this.parseMarkdown(!1));T(this,"Parser",hn);T(this,"Renderer",Tr);T(this,"TextRenderer",Bi);T(this,"Lexer",dn);T(this,"Tokenizer",$r);T(this,"Hooks",cr);this.use(...e)}walkTokens(e,t){var s,r;let n=[];for(const o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{const i=o;for(const l of i.header)n=n.concat(this.walkTokens(l.tokens,t));for(const l of i.rows)for(const a of l)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{const i=o;n=n.concat(this.walkTokens(i.items,t));break}default:{const i=o;(r=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&r[i.type]?this.defaults.extensions.childTokens[i.type].forEach(l=>{const a=i[l].flat(1/0);n=n.concat(this.walkTokens(a,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const o=t.renderers[r.name];o?t.renderers[r.name]=function(...i){let l=r.renderer.apply(this,i);return l===!1&&(l=o.apply(this,i)),l}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){const r=this.defaults.renderer||new Tr(this.defaults);for(const o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const i=o,l=n.renderer[i],a=r[i];r[i]=(...c)=>{let u=l.apply(r,c);return u===!1&&(u=a.apply(r,c)),u||""}}s.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new $r(this.defaults);for(const o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const i=o,l=n.tokenizer[i],a=r[i];r[i]=(...c)=>{let u=l.apply(r,c);return u===!1&&(u=a.apply(r,c)),u}}s.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new cr;for(const o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const i=o,l=n.hooks[i],a=r[i];cr.passThroughHooks.has(o)?r[i]=c=>{if(this.defaults.async)return Promise.resolve(l.call(r,c)).then(h=>a.call(r,h));const u=l.call(r,c);return a.call(r,u)}:r[i]=(...c)=>{let u=l.apply(r,c);return u===!1&&(u=a.apply(r,c)),u}}s.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(i){let l=[];return l.push(o.call(this,i)),r&&(l=l.concat(r.call(this,i))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return dn.lex(e,t??this.defaults)}parser(e,t){return hn.parse(e,t??this.defaults)}parseMarkdown(e){return(n,s)=>{const r={...s},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?dn.lex:dn.lexInline,a=o.hooks?o.hooks.provideParser():e?hn.parse:hn.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>a(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(i);try{o.hooks&&(n=o.hooks.preprocess(n));let c=l(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let u=a(c,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(c){return i(c)}}}onError(e,t){return n=>{if(n.message+=`
|
|
73
|
-
Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An error occurred:</p><pre>"+Kt(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},zn=new yg;function Le(e,t){return zn.parse(e,t)}Le.options=Le.setOptions=function(e){return zn.setOptions(e),Le.defaults=zn.defaults,Hc(Le.defaults),Le};Le.getDefaults=Ei;Le.defaults=Fn;Le.use=function(...e){return zn.use(...e),Le.defaults=zn.defaults,Hc(Le.defaults),Le};Le.walkTokens=function(e,t){return zn.walkTokens(e,t)};Le.parseInline=zn.parseInline;Le.Parser=hn;Le.parser=hn.parse;Le.Renderer=Tr;Le.TextRenderer=Bi;Le.Lexer=dn;Le.lexer=dn.lex;Le.Tokenizer=$r;Le.Hooks=cr;Le.parse=Le;Le.options;Le.setOptions;Le.use;Le.walkTokens;Le.parseInline;hn.parse;dn.lex;const bg="modulepreload",kg=function(e,t){return new URL(e,t).href},Kl={},tr=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(h=>Promise.resolve(h).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};const l=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=kg(u,s),u in Kl)return;Kl[u]=!0;const h=u.endsWith(".css"),g=h?'[rel="stylesheet"]':"";if(!!s)for(let m=l.length-1;m>=0;m--){const S=l[m];if(S.href===u&&(!h||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${g}`))return;const d=document.createElement("link");if(d.rel=h?"stylesheet":bg,h||(d.as="script"),d.crossOrigin="",d.href=u,c&&d.setAttribute("nonce",c),document.head.appendChild(d),h)return new Promise((m,S)=>{d.addEventListener("load",m),d.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};let ot=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function wg(e){return Gi(e)}function Gi(e){return Array.isArray(e)?Sg(e):e instanceof RegExp?e:typeof e=="object"?_g(e):e}function Sg(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=Gi(e[n]);return t}function _g(e){let t={};for(let n in e)t[n]=Gi(e[n]);return t}function tu(e,...t){return t.forEach(n=>{for(let s in n)e[s]=n[s]}),e}function nu(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?nu(e.substring(0,e.length-1)):e.substr(~t+1)}var wo=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,nr=class{static hasCaptures(e){return e===null?!1:(wo.lastIndex=0,wo.test(e))}static replaceCaptures(e,t,n){return e.replace(wo,(s,r,o,i)=>{let l=n[parseInt(r||o,10)];if(l){let a=t.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return s})}};function su(e,t){return e<t?-1:e>t?1:0}function ru(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let r=0;r<n;r++){let o=su(e[r],t[r]);if(o!==0)return o}return 0}return n-s}function Zl(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 ou(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var iu=class{constructor(e){T(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}},Rr=class{constructor(e,t,n){T(this,"_cachedMatchRoot",new iu(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme($g(e),t)}static createFromParsedTheme(e,t){return Rg(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,s=this._cachedMatchRoot.get(t).find(r=>xg(e.parent,r.parentScopes));return s?new lu(s.fontStyle,s.foreground,s.background):null}},So=class ur{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const s of n)t=new ur(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new ur(n,t[s]);return n}push(t){return new ur(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let s=this;for(;s&&s!==t;)n.push(s.scopeName),s=s.parent;return s===t?n.reverse():void 0}};function xg(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let s=t[n],r=!1;if(s===">"){if(n===t.length-1)return!1;s=t[++n],r=!0}for(;e&&!Cg(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Cg(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var lu=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function $g(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let r=0,o=t.length;r<o;r++){let i=t[r];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let h=i.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let h=i.settings.fontStyle.split(" ");for(let g=0,p=h.length;g<p;g++)switch(h[g]){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"&&Zl(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&Zl(i.settings.background)&&(u=i.settings.background);for(let h=0,g=l.length;h<g;h++){let d=l[h].trim().split(" "),m=d[d.length-1],S=null;d.length>1&&(S=d.slice(0,d.length-1),S.reverse()),n[s++]=new Tg(m,S,r,a,c,u)}}return n}var Tg=class{constructor(e,t,n,s,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=o}},ht=(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))(ht||{});function Rg(e,t){e.sort((a,c)=>{let u=su(a.scope,c.scope);return u!==0||(u=ru(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,s="#000000",r="#ffffff";for(;e.length>=1&&e[0].scope==="";){let a=e.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(s=a.foreground),a.background!==null&&(r=a.background)}let o=new Ag(t),i=new lu(n,o.getId(s),o.getId(r)),l=new Ig(new Yo(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 Rr(o,i,l)}var Ag=class{constructor(e){T(this,"_isFrozen");T(this,"_lastColorId");T(this,"_id2color");T(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)}},Eg=Object.freeze([]),Yo=class au{constructor(t,n,s,r,o){T(this,"scopeDepth");T(this,"parentScopes");T(this,"fontStyle");T(this,"foreground");T(this,"background");this.scopeDepth=t,this.parentScopes=n||Eg,this.fontStyle=s,this.foreground=r,this.background=o}clone(){return new au(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let s=0,r=t.length;s<r;s++)n[s]=t[s].clone();return n}acceptOverwrite(t,n,s,r){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},Ig=class Jo{constructor(t,n=[],s={}){T(this,"_rulesWithParentScopes");this._mainRule=t,this._children=s,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let s=0,r=0;for(;t.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=t.parentScopes.length||r>=n.parentScopes.length);){const o=n.parentScopes[r].length-t.parentScopes[s].length;if(o!==0)return o;s++,r++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let s=t.indexOf("."),r,o;if(s===-1?(r=t,o=""):(r=t.substring(0,s),o=t.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Jo._cmpBySpecificity),n}insert(t,n,s,r,o,i){if(n===""){this._doInsertHere(t,s,r,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Jo(this._mainRule.clone(),Yo.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,c,s,r,o,i)}_doInsertHere(t,n,s,r,o){if(n===null){this._mainRule.acceptOverwrite(t,s,r,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(ru(a.parentScopes,n)===0){a.acceptOverwrite(t,s,r,o);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Yo(t,n,s,r,o))}},ss=class Lt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Lt.getLanguageId(t),s=Lt.getTokenType(t),r=Lt.getFontStyle(t),o=Lt.getForeground(t),i=Lt.getBackground(t);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:o,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,s,r,o,i,l){let a=Lt.getLanguageId(t),c=Lt.getTokenType(t),u=Lt.containsBalancedBrackets(t)?1:0,h=Lt.getFontStyle(t),g=Lt.getForeground(t),p=Lt.getBackground(t);return n!==0&&(a=n),s!==8&&(c=s),r!==null&&(u=r?1:0),o!==-1&&(h=o),i!==0&&(g=i),l!==0&&(p=l),(a<<0|c<<8|u<<10|h<<11|g<<15|p<<24)>>>0}};function Ar(e,t){const n=[],s=Lg(e);let r=s.next();for(;r!==null;){let a=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let c=i();if(n.push({matcher:c,priority:a}),r!==",")break;r=s.next()}return n;function o(){if(r==="-"){r=s.next();const a=o();return c=>!!a&&!a(c)}if(r==="("){r=s.next();const a=l();return r===")"&&(r=s.next()),a}if(Yl(r)){const a=[];do a.push(r),r=s.next();while(Yl(r));return c=>t(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");c=i()}return u=>a.some(h=>h(u))}}function Yl(e){return!!e&&!!e.match(/[\w\.:]+/)}function Lg(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}function cu(e){typeof e.dispose=="function"&&e.dispose()}var Ms=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Pg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Mg=class{constructor(){T(this,"_references",[]);T(this,"_seenReferenceKeys",new Set);T(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))}},Ng=class{constructor(e,t){T(this,"seenFullScopeRequests",new Set);T(this,"seenPartialScopeRequests",new Set);T(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ms(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Mg;for(const n of e)Og(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ms){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 Og(e,t,n,s){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Ms?fr({baseGrammar:o,selfGrammar:r},s):Xo(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},s);const i=n.injections(e.scopeName);if(i)for(const l of i)s.add(new Ms(l))}function Xo(e,t,n){if(t.repository&&t.repository[e]){const s=t.repository[e];Er([s],t,n)}}function fr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Er(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Er(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Er(e,t,n){for(const s of e){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?tu({},t.repository,s.repository):t.repository;Array.isArray(s.patterns)&&Er(s.patterns,{...t,repository:r},n);const o=s.include;if(!o)continue;const i=uu(o);switch(i.kind){case 0:fr({...t,selfGrammar:t.baseGrammar},n);break;case 1:fr(t,n);break;case 2:Xo(i.ruleName,{...t,repository:r},n);break;case 3:case 4:const l=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const a={baseGrammar:t.baseGrammar,selfGrammar:l,repository:r};i.kind===4?Xo(i.ruleName,a,n):fr(a,n)}else i.kind===4?n.add(new Pg(i.scopeName,i.ruleName)):n.add(new Ms(i.scopeName));break}}}var Dg=class{constructor(){T(this,"kind",0)}},Bg=class{constructor(){T(this,"kind",1)}},Gg=class{constructor(e){T(this,"kind",2);this.ruleName=e}},jg=class{constructor(e){T(this,"kind",3);this.scopeName=e}},zg=class{constructor(e,t){T(this,"kind",4);this.scopeName=e,this.ruleName=t}};function uu(e){if(e==="$base")return new Dg;if(e==="$self")return new Bg;const t=e.indexOf("#");if(t===-1)return new jg(e);if(t===0)return new Gg(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new zg(n,s)}}var Fg=/\\(\d+)/,Jl=/\\(\d+)/g,Ug=-1,fu=-2;var Us=class{constructor(e,t,n,s){T(this,"$location");T(this,"id");T(this,"_nameIsCapturing");T(this,"_name");T(this,"_contentNameIsCapturing");T(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=nr.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=nr.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${nu(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:nr.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:nr.replaceCaptures(this._contentName,e,t)}},Hg=class extends Us{constructor(t,n,s,r,o){super(t,n,s,r);T(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,s,r){throw new Error("Not supported!")}},qg=class extends Us{constructor(t,n,s,r,o){super(t,n,s,null);T(this,"_match");T(this,"captures");T(this,"_cachedCompiledPatterns");this._match=new Ns(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Os,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Xl=class extends Us{constructor(t,n,s,r,o){super(t,n,s,r);T(this,"hasMissingPatterns");T(this,"patterns");T(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const s of this.patterns)t.getRule(s).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Os,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Qo=class extends Us{constructor(t,n,s,r,o,i,l,a,c,u){super(t,n,s,r);T(this,"_begin");T(this,"beginCaptures");T(this,"_end");T(this,"endHasBackReferences");T(this,"endCaptures");T(this,"applyEndPatternLast");T(this,"hasMissingPatterns");T(this,"patterns");T(this,"_cachedCompiledPatterns");this._begin=new Ns(o,this.id),this.beginCaptures=i,this._end=new Ns(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t,n).compileAG(t,s,r)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Os;for(const s of this.patterns)t.getRule(s).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Ir=class extends Us{constructor(t,n,s,r,o,i,l,a,c){super(t,n,s,r);T(this,"_begin");T(this,"beginCaptures");T(this,"whileCaptures");T(this,"_while");T(this,"whileHasBackReferences");T(this,"hasMissingPatterns");T(this,"patterns");T(this,"_cachedCompiledPatterns");T(this,"_cachedCompiledWhilePatterns");this._begin=new Ns(o,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new Ns(l,fu),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Os;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,s,r){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,s,r)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Os,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},du=class ct{static createCaptureRule(t,n,s,r,o){return t.registerRule(i=>new Hg(n,i,s,r,o))}static getCompiledRuleId(t,n,s){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new qg(t.$vscodeTextmateLocation,t.id,t.name,t.match,ct._compileCaptures(t.captures,n,s));if(typeof t.begin>"u"){t.repository&&(s=tu({},s,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Xl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,ct._compilePatterns(o,n,s))}return t.while?new Ir(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ct._compileCaptures(t.beginCaptures||t.captures,n,s),t.while,ct._compileCaptures(t.whileCaptures||t.captures,n,s),ct._compilePatterns(t.patterns,n,s)):new Qo(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ct._compileCaptures(t.beginCaptures||t.captures,n,s),t.end,ct._compileCaptures(t.endCaptures||t.captures,n,s),t.applyEndPatternLast,ct._compilePatterns(t.patterns,n,s))}),t.id}static _compileCaptures(t,n,s){let r=[];if(t){let o=0;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)r[i]=null;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;t[i].patterns&&(a=ct.getCompiledRuleId(t[i],n,s)),r[l]=ct.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return r}static _compilePatterns(t,n,s){let r=[];if(t)for(let o=0,i=t.length;o<i;o++){const l=t[o];let a=-1;if(l.include){const c=uu(l.include);switch(c.kind){case 0:case 1:a=ct.getCompiledRuleId(s[l.include],n,s);break;case 2:let u=s[c.ruleName];u&&(a=ct.getCompiledRuleId(u,n,s));break;case 3:case 4:const h=c.scopeName,g=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(h,s);if(p)if(g){let d=p.repository[g];d&&(a=ct.getCompiledRuleId(d,n,p.repository))}else a=ct.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else a=ct.getCompiledRuleId(l,n,s);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof Xl||c instanceof Qo||c instanceof Ir)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},Ns=class hu{constructor(t,n){T(this,"source");T(this,"ruleId");T(this,"hasAnchor");T(this,"hasBackReferences");T(this,"_anchorCache");if(t&&typeof t=="string"){const s=t.length;let r=0,o=[],i=!1;for(let l=0;l<s;l++)if(t.charAt(l)==="\\"&&l+1<s){const c=t.charAt(l+1);c==="z"?(o.push(t.substring(r,l)),o.push("$(?!\\n)(?<!\\n)"),r=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,r===0?this.source=t:(o.push(t.substring(r,s)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Fg.test(this.source):this.hasBackReferences=!1}clone(){return new hu(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let s=n.map(r=>t.substring(r.start,r.end));return Jl.lastIndex=0,this.source.replace(Jl,(r,o)=>ou(s[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],s=[],r=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),t[o]=l,n[o]=l,s[o]=l,r[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(t[o+1]="",n[o+1]="",s[o+1]="A",r[o+1]="A"):a==="G"?(t[o+1]="",n[o+1]="G",s[o+1]="",r[o+1]="G"):(t[o+1]=a,n[o+1]=a,s[o+1]=a,r[o+1]=a),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Os=class{constructor(){T(this,"_items");T(this,"_hasAnchors");T(this,"_cached");T(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 Ql(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map(r=>r.resolveAnchors(t,n));return new Ql(e,s,this._items.map(r=>r.ruleId))}},Ql=class{constructor(e,t,n){T(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(`
|
|
74
|
-
`)}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},_o=class{constructor(e,t){this.languageId=e,this.tokenType=t}},fn,Wg=(fn=class{constructor(t,n){T(this,"_defaultAttributes");T(this,"_embeddedLanguagesMatcher");T(this,"_getBasicScopeAttributes",new iu(t=>{const n=this._scopeToLanguage(t),s=this._toStandardTokenType(t);return new _o(n,s)}));this._defaultAttributes=new _o(t,8),this._embeddedLanguagesMatcher=new Vg(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?fn._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(fn.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!")}},T(fn,"_NULL_SCOPE_METADATA",new _o(0,0)),T(fn,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),fn),Vg=class{constructor(e){T(this,"values");T(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,s])=>ou(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])}},ea=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function pu(e,t,n,s,r,o,i,l){const a=t.content.length;let c=!1,u=-1;if(i){const p=Kg(e,t,n,s,r,o);r=p.stack,s=p.linePos,n=p.isFirstLine,u=p.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new ea(r,!0);g()}return new ea(r,!1);function g(){const p=Zg(e,t,n,s,r,u);if(!p){o.produce(r,a),c=!0;return}const d=p.captureIndices,m=p.matchedRuleId,S=d&&d.length>0?d[0].end>s:!1;if(m===Ug){const b=r.getRule(e);o.produce(r,d[0].start),r=r.withContentNameScopesList(r.nameScopesList),ms(e,t,n,r,o,b.endCaptures,d),o.produce(r,d[0].end);const C=r;if(r=r.parent,u=C.getAnchorPos(),!S&&C.getEnterPos()===s){r=C,o.produce(r,a),c=!0;return}}else{const b=e.getRule(m);o.produce(r,d[0].start);const C=r,$=b.getName(t.content,d),w=r.contentNameScopesList.pushAttributed($,e);if(r=r.push(m,s,u,d[0].end===a,null,w,w),b instanceof Qo){const M=b;ms(e,t,n,r,o,M.beginCaptures,d),o.produce(r,d[0].end),u=d[0].end;const K=M.getContentName(t.content,d),B=w.pushAttributed(K,e);if(r=r.withContentNameScopesList(B),M.endHasBackReferences&&(r=r.withEndRule(M.getEndWithResolvedBackReferences(t.content,d))),!S&&C.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(b instanceof Ir){const M=b;ms(e,t,n,r,o,M.beginCaptures,d),o.produce(r,d[0].end),u=d[0].end;const K=M.getContentName(t.content,d),B=w.pushAttributed(K,e);if(r=r.withContentNameScopesList(B),M.whileHasBackReferences&&(r=r.withEndRule(M.getWhileWithResolvedBackReferences(t.content,d))),!S&&C.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(ms(e,t,n,r,o,b.captures,d),o.produce(r,d[0].end),r=r.pop(),!S){r=r.safePop(),o.produce(r,a),c=!0;return}}d[0].end>s&&(s=d[0].end,n=!1)}}function Kg(e,t,n,s,r,o){let i=r.beginRuleCapturedEOL?0:-1;const l=[];for(let a=r;a;a=a.pop()){const c=a.getRule(e);c instanceof Ir&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=Xg(a.rule,e,a.stack.endRule,n,s===i),h=c.findNextMatchSync(t,s,u);if(h){if(h.ruleId!==fu){r=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(o.produce(a.stack,h.captureIndices[0].start),ms(e,t,n,a.stack,o,a.rule.whileCaptures,h.captureIndices),o.produce(a.stack,h.captureIndices[0].end),i=h.captureIndices[0].end,h.captureIndices[0].end>s&&(s=h.captureIndices[0].end,n=!1))}else{r=a.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}function Zg(e,t,n,s,r,o){const i=Yg(e,t,n,s,r,o),l=e.getInjections();if(l.length===0)return i;const a=Jg(l,e,t,n,s,r,o);if(!a)return i;if(!i)return a;const c=i.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:i}function Yg(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:l,findOptions:a}=gu(i,e,r.endRule,n,s===o),c=l.findNextMatchSync(t,s,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Jg(e,t,n,s,r,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const h=o.contentNameScopesList.getScopeNames();for(let g=0,p=e.length;g<p;g++){const d=e[g];if(!d.matcher(h))continue;const m=t.getRule(d.ruleId),{ruleScanner:S,findOptions:b}=gu(m,t,null,s,r===i),C=S.findNextMatchSync(n,r,b);if(!C)continue;const $=C.captureIndices[0].start;if(!($>=l)&&(l=$,a=C.captureIndices,c=C.ruleId,u=d.priority,l===r))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function gu(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function Xg(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function ms(e,t,n,s,r,o,i){if(o.length===0)return;const l=t.content,a=Math.min(o.length,i.length),c=[],u=i[0].end;for(let h=0;h<a;h++){const g=o[h];if(g===null)continue;const p=i[h];if(p.length===0)continue;if(p.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=p.start;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?r.produceFromScopes(c[c.length-1].scopes,p.start):r.produce(s,p.start),g.retokenizeCapturedWithRuleId){const m=g.getName(l,i),S=s.contentNameScopesList.pushAttributed(m,e),b=g.getContentName(l,i),C=S.pushAttributed(b,e),$=s.push(g.retokenizeCapturedWithRuleId,p.start,-1,!1,null,S,C),w=e.createOnigString(l.substring(0,p.end));pu(e,w,n&&p.start===0,p.start,$,r,!1,0),cu(w);continue}const d=g.getName(l,i);if(d!==null){const S=(c.length>0?c[c.length-1].scopes:s.contentNameScopesList).pushAttributed(d,e);c.push(new Qg(S,p.end))}}for(;c.length>0;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Qg=class{constructor(e,t){T(this,"scopes");T(this,"endPos");this.scopes=e,this.endPos=t}};function em(e,t,n,s,r,o,i,l){return new nm(e,t,n,s,r,o,i,l)}function ta(e,t,n,s,r){const o=Ar(t,Lr),i=du.getCompiledRuleId(n,s,r.repository);for(const l of o)e.push({debugSelector:t,matcher:l.matcher,ruleId:i,grammar:r,priority:l.priority})}function Lr(e,t){if(t.length<e.length)return!1;let n=0;return e.every(s=>{for(let r=n;r<t.length;r++)if(tm(t[r],s))return n=r+1,!0;return!1})}function tm(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 nm=class{constructor(e,t,n,s,r,o,i,l){T(this,"_rootId");T(this,"_lastRuleId");T(this,"_ruleId2desc");T(this,"_includedGrammars");T(this,"_grammarRepository");T(this,"_grammar");T(this,"_injections");T(this,"_basicScopeAttributesProvider");T(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new Wg(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=na(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const a of Object.keys(r)){const c=Ar(a,Lr);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:r[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},t=[],n=this._rootScopeName,s=e.lookup(n);if(s){const r=s.injections;if(r)for(let i in r)ta(t,i,r[i],this,s);const o=this._grammarRepository.injections(n);o&&o.forEach(i=>{const l=this.getExternalGrammar(i);if(l){const a=l.injectionSelector;a&&ta(t,a,l,this,l)}})}return t.sort((r,o)=>r.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=na(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){this._rootId===-1&&(this._rootId=du.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!t||t===ei.NULL){r=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=ss.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),g=this.getRule(this._rootId).getName(null,null);let p;g?p=xs.createRootAndLookUpScopeName(g,h,this):p=xs.createRoot("unknown",h),t=new ei(null,this._rootId,-1,-1,!1,null,p,p)}else r=!1,t.reset();e=e+`
|
|
75
|
-
`;const o=this.createOnigString(e),i=o.content.length,l=new rm(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=pu(this,o,r,0,t,l,!0,s);return cu(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function na(e,t){return e=wg(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 xs=class Zt{constructor(t,n,s){this.parent=t,this.scopePath=n,this.tokenAttributes=s}static fromExtension(t,n){let s=t,r=(t==null?void 0:t.scopePath)??null;for(const o of n)r=So.push(r,o.scopeNames),s=new Zt(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new Zt(null,new So(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new So(null,t),i=s.themeProvider.themeMatch(o),l=Zt.mergeAttributes(n,r,i);return new Zt(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Zt.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,s){let r=-1,o=0,i=0;return s!==null&&(r=s.fontStyle,o=s.foregroundId,i=s.backgroundId),ss.set(t,n.languageId,n.tokenType,null,r,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Zt._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=Zt._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,s){const r=s.getMetadataForScope(n),o=t.scopePath.push(n),i=s.themeProvider.themeMatch(o),l=Zt.mergeAttributes(t.tokenAttributes,r,i);return new Zt(t,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var r;const n=[];let s=this;for(;s&&s!==t;)n.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(((r=s.parent)==null?void 0:r.scopePath)??null)}),s=s.parent;return s===t?n.reverse():void 0}},Mt,ei=(Mt=class{constructor(t,n,s,r,o,i,l,a){T(this,"_stackElementBrand");T(this,"_enterPos");T(this,"_anchorPos");T(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}equals(t){return t===null?!1:Mt._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?xs.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(){Mt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,l){return new Mt(this,t,n,s,r,o,i,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var s,r;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(s=this.nameScopesList)==null?void 0:s.toString()}, ${(r=this.contentNameScopesList)==null?void 0:r.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Mt(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,s;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((s=this.contentNameScopesList)==null?void 0:s.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const s=xs.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new Mt(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,xs.fromExtension(s,n.contentNameScopesList))}},T(Mt,"NULL",new Mt(null,0,0,0,!1,null,null,null)),Mt),sm=class{constructor(e,t){T(this,"balancedBracketScopes");T(this,"unbalancedBracketScopes");T(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ar(n,Lr).map(s=>s.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ar(n,Lr).map(s=>s.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},rm=class{constructor(e,t,n,s){T(this,"_emitBinaryTokens");T(this,"_lineText");T(this,"_tokens");T(this,"_binaryTokens");T(this,"_lastTokenEndIndex");T(this,"_tokenTypeOverrides");this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var s;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((s=this.balancedBracketSelectors)!=null&&s.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=(e==null?void 0:e.getScopeNames())??[];for(const l of this._tokenTypeOverrides)l.matcher(i)&&(r=ss.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=ss.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},om=class{constructor(e,t){T(this,"_grammars",new Map);T(this,"_rawGrammars",new Map);T(this,"_injectionGrammars",new Map);T(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,s,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,em(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},im=class{constructor(t){T(this,"_options");T(this,"_syncRegistry");T(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new om(Rr.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Rr.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,s){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:s})}loadGrammarWithConfiguration(t,n,s){return this._loadGrammar(t,n,s.embeddedLanguages,s.tokenTypes,new sm(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,s,r,o){const i=new Ng(this._syncRegistry,t);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(t,n,s,r,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const s=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(t,n=[],s=0,r=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,s,r)}_grammarForScopeName(t,n=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,s,r,o)}},ti=ei.NULL;const lm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Hs{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}Hs.prototype.normal={};Hs.prototype.property={};Hs.prototype.space=void 0;function mu(e,t){const n={},s={};for(const r of e)Object.assign(n,r.property),Object.assign(s,r.normal);return new Hs(n,s,t)}function ni(e){return e.toLowerCase()}class St{constructor(t,n){this.attribute=n,this.property=t}}St.prototype.attribute="";St.prototype.booleanish=!1;St.prototype.boolean=!1;St.prototype.commaOrSpaceSeparated=!1;St.prototype.commaSeparated=!1;St.prototype.defined=!1;St.prototype.mustUseProperty=!1;St.prototype.number=!1;St.prototype.overloadedBoolean=!1;St.prototype.property="";St.prototype.spaceSeparated=!1;St.prototype.space=void 0;let am=0;const me=Un(),Ye=Un(),si=Un(),z=Un(),De=Un(),Gn=Un(),Ct=Un();function Un(){return 2**++am}const ri=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:Ye,commaOrSpaceSeparated:Ct,commaSeparated:Gn,number:z,overloadedBoolean:si,spaceSeparated:De},Symbol.toStringTag,{value:"Module"})),xo=Object.keys(ri);class ji extends St{constructor(t,n,s,r){let o=-1;if(super(t,n),sa(this,"space",r),typeof s=="number")for(;++o<xo.length;){const i=xo[o];sa(this,xo[o],(s&ri[i])===ri[i])}}}ji.prototype.defined=!0;function sa(e,t,n){n&&(e[t]=n)}function rs(e){const t={},n={};for(const[s,r]of Object.entries(e.properties)){const o=new ji(s,e.transform(e.attributes||{},s),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[ni(s)]=s,n[ni(o.attribute)]=s}return new Hs(t,n,e.space)}const vu=rs({properties:{ariaActiveDescendant:null,ariaAtomic:Ye,ariaAutoComplete:null,ariaBusy:Ye,ariaChecked:Ye,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:De,ariaCurrent:null,ariaDescribedBy:De,ariaDetails:null,ariaDisabled:Ye,ariaDropEffect:De,ariaErrorMessage:null,ariaExpanded:Ye,ariaFlowTo:De,ariaGrabbed:Ye,ariaHasPopup:null,ariaHidden:Ye,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:De,ariaLevel:z,ariaLive:null,ariaModal:Ye,ariaMultiLine:Ye,ariaMultiSelectable:Ye,ariaOrientation:null,ariaOwns:De,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:Ye,ariaReadOnly:Ye,ariaRelevant:null,ariaRequired:Ye,ariaRoleDescription:De,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:Ye,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function yu(e,t){return t in e?e[t]:t}function bu(e,t){return yu(e,t.toLowerCase())}const cm=rs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Gn,acceptCharset:De,accessKey:De,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alpha:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:De,autoFocus:me,autoPlay:me,blocking:De,capture:null,charSet:null,checked:me,cite:null,className:De,closedBy:null,colorSpace:null,cols:z,colSpan:z,command:null,commandFor:null,content:null,contentEditable:Ye,controls:me,controlsList:De,coords:z|Gn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:si,draggable:Ye,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:De,height:z,hidden:si,high:z,href:null,hrefLang:null,htmlFor:De,httpEquiv:De,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:De,itemRef:De,itemScope:me,itemType:De,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,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:me,optimum:z,pattern:null,ping:De,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:De,required:me,reversed:me,rows:z,rowSpan:z,sandbox:De,scope:null,scoped:me,seamless:me,selected:me,shadowRootClonable:me,shadowRootCustomElementRegistry:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shadowRootSerializable:me,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:Ye,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:Ye,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:De,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:Ye,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:me,disablePictureInPicture:me,disableRemotePlayback:me,exportParts:Gn,part:De,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:bu}),um=rs({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",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ct,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:De,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:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,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:Gn,g2:Gn,glyphName:Gn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:Ct,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:z,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:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:De,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ct,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ct,rev:Ct,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ct,requiredFeatures:Ct,requiredFonts:Ct,requiredFormats:Ct,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:Ct,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ct,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ct,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yu}),ku=rs({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()}}),wu=rs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bu}),Su=rs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fm=/[A-Z]/g,ra=/-[a-z]/g,dm=/^data[-\w.:]+$/i;function hm(e,t){const n=ni(t);let s=t,r=St;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&dm.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ra,gm);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ra.test(o)){let i=o.replace(fm,pm);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}r=ji}return new r(s,t)}function pm(e){return"-"+e.toLowerCase()}function gm(e){return e.charAt(1).toUpperCase()}const mm=mu([vu,cm,ku,wu,Su],"html"),_u=mu([vu,um,ku,wu,Su],"svg"),oa={}.hasOwnProperty;function vm(e,t){const n=t||{};function s(r,...o){let i=s.invalid;const l=s.handlers;if(r&&oa.call(r,e)){const a=String(r[e]);i=oa.call(l,a)?l[a]:s.unknown}if(i)return i.call(this,r,...o)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}const ym=/["&'<>`]/g,bm=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,km=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,wm=/[|\\{}()[\]^$+*?.]/g,ia=new WeakMap;function Sm(e,t){if(e=e.replace(t.subset?_m(t.subset):ym,s),t.subset||t.escapeOnly)return e;return e.replace(bm,n).replace(km,s);function n(r,o,i){return t.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),t)}function s(r,o,i){return t.format(r.charCodeAt(0),i.charCodeAt(o+1),t)}}function _m(e){let t=ia.get(e);return t||(t=xm(e),ia.set(e,t)),t}function xm(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(wm,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Cm=/[\dA-Fa-f]/;function $m(e,t,n){const s="&#x"+e.toString(16).toUpperCase();return n&&t&&!Cm.test(String.fromCharCode(t))?s:s+";"}const Tm=/\d/;function Rm(e,t,n){const s="&#"+String(e);return n&&t&&!Tm.test(String.fromCharCode(t))?s:s+";"}const Am=["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"],Co={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:"€"},Em=["cent","copy","divide","gt","lt","not","para","times"],xu={}.hasOwnProperty,oi={};let sr;for(sr in Co)xu.call(Co,sr)&&(oi[Co[sr]]=sr);const Im=/[^\dA-Za-z]/;function Lm(e,t,n,s){const r=String.fromCharCode(e);if(xu.call(oi,r)){const o=oi[r],i="&"+o;return n&&Am.includes(o)&&!Em.includes(o)&&(!s||t&&t!==61&&Im.test(String.fromCharCode(t)))?i:i+";"}return""}function Pm(e,t,n){let s=$m(e,t,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=Lm(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const o=Rm(e,t,n.omitOptionalSemicolons);o.length<s.length&&(s=o)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function es(e,t){return Sm(e,Object.assign({format:Pm},t))}const Mm=/^>|^->|<!--|-->|--!>|<!-$/g,Nm=[">"],Om=["<",">"];function Dm(e,t,n,s){return s.settings.bogusComments?"<?"+es(e.value,Object.assign({},s.settings.characterReferences,{subset:Nm}))+">":"<!--"+e.value.replace(Mm,r)+"-->";function r(o){return es(o,Object.assign({},s.settings.characterReferences,{subset:Om}))}}function Bm(e,t,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}function la(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,r=n.indexOf(t);for(;r!==-1;)s++,r=n.indexOf(t,r+t.length);return s}function Gm(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function jm(e){return e.join(" ").trim()}const zm=/[ \t\n\f\r]/g;function zi(e){return typeof e=="object"?e.type==="text"?aa(e.value):!1:aa(e)}function aa(e){return e.replace(zm,"")===""}const tt=$u(1),Cu=$u(-1),Fm=[];function $u(e){return t;function t(n,s,r){const o=n?n.children:Fm;let i=(s||0)+e,l=o[i];if(!r)for(;l&&zi(l);)i+=e,l=o[i];return l}}const Um={}.hasOwnProperty;function Tu(e){return t;function t(n,s,r){return Um.call(e,n.tagName)&&e[n.tagName](n,s,r)}}const Fi=Tu({body:qm,caption:$o,colgroup:$o,dd:Zm,dt:Km,head:$o,html:Hm,li:Vm,optgroup:Ym,option:Jm,p:Wm,rp:ca,rt:ca,tbody:Qm,td:ua,tfoot:ev,th:ua,thead:Xm,tr:tv});function $o(e,t,n){const s=tt(n,t,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&zi(s.value.charAt(0)))}function Hm(e,t,n){const s=tt(n,t);return!s||s.type!=="comment"}function qm(e,t,n){const s=tt(n,t);return!s||s.type!=="comment"}function Wm(e,t,n){const s=tt(n,t);return s?s.type==="element"&&(s.tagName==="address"||s.tagName==="article"||s.tagName==="aside"||s.tagName==="blockquote"||s.tagName==="details"||s.tagName==="div"||s.tagName==="dl"||s.tagName==="fieldset"||s.tagName==="figcaption"||s.tagName==="figure"||s.tagName==="footer"||s.tagName==="form"||s.tagName==="h1"||s.tagName==="h2"||s.tagName==="h3"||s.tagName==="h4"||s.tagName==="h5"||s.tagName==="h6"||s.tagName==="header"||s.tagName==="hgroup"||s.tagName==="hr"||s.tagName==="main"||s.tagName==="menu"||s.tagName==="nav"||s.tagName==="ol"||s.tagName==="p"||s.tagName==="pre"||s.tagName==="section"||s.tagName==="table"||s.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Vm(e,t,n){const s=tt(n,t);return!s||s.type==="element"&&s.tagName==="li"}function Km(e,t,n){const s=tt(n,t);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function Zm(e,t,n){const s=tt(n,t);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function ca(e,t,n){const s=tt(n,t);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function Ym(e,t,n){const s=tt(n,t);return!s||s.type==="element"&&s.tagName==="optgroup"}function Jm(e,t,n){const s=tt(n,t);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function Xm(e,t,n){const s=tt(n,t);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function Qm(e,t,n){const s=tt(n,t);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function ev(e,t,n){return!tt(n,t)}function tv(e,t,n){const s=tt(n,t);return!s||s.type==="element"&&s.tagName==="tr"}function ua(e,t,n){const s=tt(n,t);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const nv=Tu({body:ov,colgroup:iv,head:rv,html:sv,tbody:lv});function sv(e){const t=tt(e,-1);return!t||t.type!=="comment"}function rv(e){const t=new Set;for(const s of e.children)if(s.type==="element"&&(s.tagName==="base"||s.tagName==="title")){if(t.has(s.tagName))return!1;t.add(s.tagName)}const n=e.children[0];return!n||n.type==="element"}function ov(e){const t=tt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&zi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function iv(e,t,n){const s=Cu(n,t),r=tt(e,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&Fi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function lv(e,t,n){const s=Cu(n,t),r=tt(e,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&Fi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const rr={name:[[`
|
|
76
|
-
\f\r &/=>`.split(""),`
|
|
77
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
78
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
79
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
80
|
-
\f\r &>`.split(""),`\0
|
|
81
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
82
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
83
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function av(e,t,n,s){const r=s.schema,o=r.space==="svg"?!1:s.settings.omitOptionalTags;let i=r.space==="svg"?s.settings.closeEmptyElements:s.settings.voids.includes(e.tagName.toLowerCase());const l=[];let a;r.space==="html"&&e.tagName==="svg"&&(s.schema=_u);const c=cv(s,e.properties),u=s.all(r.space==="html"&&e.tagName==="template"?e.content:e);return s.schema=r,u&&(i=!1),(c||!o||!nv(e,t,n))&&(l.push("<",e.tagName,c?" "+c:""),i&&(r.space==="svg"||s.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!s.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!i&&(!o||!Fi(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function cv(e,t){const n=[];let s=-1,r;if(t){for(r in t)if(t[r]!==null&&t[r]!==void 0){const o=uv(e,r,t[r]);o&&n.push(o)}}for(;++s<n.length;){const o=e.settings.tightAttributes?n[s].charAt(n[s].length-1):void 0;s!==n.length-1&&o!=='"'&&o!=="'"&&(n[s]+=" ")}return n.join("")}function uv(e,t,n){const s=hm(e.schema,t),r=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let i=e.quote,l;if(s.overloadedBoolean&&(n===s.attribute||n==="")?n=!0:(s.boolean||s.overloadedBoolean)&&(typeof n!="string"||n===s.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=es(s.attribute,Object.assign({},e.settings.characterReferences,{subset:rr.name[r][o]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?Gm:jm)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(l=es(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:rr.unquoted[r][o]}))),l!==n&&(e.settings.quoteSmart&&la(n,i)>la(n,e.alternative)&&(i=e.alternative),l=i+es(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?rr.single:rr.double)[r][o],attribute:!0}))+i),a+(l&&"="+l))}const fv=["<","&"];function Ru(e,t,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:es(e.value,Object.assign({},s.settings.characterReferences,{subset:fv}))}function dv(e,t,n,s){return s.settings.allowDangerousHtml?e.value:Ru(e,t,n,s)}function hv(e,t,n,s){return s.all(e)}const pv=vm("type",{invalid:gv,unknown:mv,handlers:{comment:Dm,doctype:Bm,element:av,raw:dv,root:hv,text:Ru}});function gv(e){throw new Error("Expected node, not `"+e+"`")}function mv(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const vv={},yv={},bv=[];function kv(e,t){const n=t||vv,s=n.quote||'"',r=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:wv,all:Sv,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||lm,characterReferences:n.characterReferences||yv,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?_u:mm,quote:s,alternative:r}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function wv(e,t,n){return pv(e,t,n,this)}function Sv(e){const t=[],n=e&&e.children||bv;let s=-1;for(;++s<n.length;)t[s]=this.one(n[s],s,e);return t.join("")}function Pr(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},s=typeof e=="string"?e:e.name;for(const[r,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[r]=o:r===s&&Object.assign(n,o);return n}function Cn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function _v(e){return Array.isArray(e)?e:[e]}async function Au(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Ui(e){return!e||["plaintext","txt","text","plain"].includes(e)}function xv(e){return e==="ansi"||Ui(e)}function Hi(e){return e==="none"}function Cv(e){return Hi(e)}function Eu(e,t){var s;if(!t)return e;e.properties||(e.properties={}),(s=e.properties).class||(s.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function no(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let s=0;const r=[];for(let i=0;i<n.length;i+=2){const l=t?n[i]+(n[i+1]||""):n[i];r.push([l,s]),s+=n[i].length,s+=((o=n[i+1])==null?void 0:o.length)||0}return r}function $v(e){const t=no(e,!0).map(([r])=>r);function n(r){if(r===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=r,i=0;for(const l of t){if(o<l.length)break;o-=l.length,i++}return{line:i,character:o}}function s(r,o){let i=0;for(let l=0;l<r;l++)i+=t[l].length;return i+=o,i}return{lines:t,indexToPos:n,posToIndex:s}}const qi="light-dark()",Tv=["color","background-color"];function Rv(e,t){let n=0;const s=[];for(const r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s}function Av(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((s,r)=>s-r);return n.length?e.map(s=>s.flatMap(r=>{const o=n.filter(i=>r.offset<i&&i<r.offset+r.content.length).map(i=>i-r.offset).sort((i,l)=>i-l);return o.length?Rv(r,o):r})):e}function Ev(e,t,n,s,r="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},i=t.map(u=>Mr(e.variants[u])),l=new Set(i.flatMap(u=>Object.keys(u))),a={},c=(u,h)=>{const g=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return n+t[u]+(h==="color"?"":g)};return i.forEach((u,h)=>{for(const g of l){const p=u[g]||"inherit";if(h===0&&s&&Tv.includes(g))if(s===qi&&i.length>1){const d=t.findIndex(C=>C==="light"),m=t.findIndex(C=>C==="dark");if(d===-1||m===-1)throw new ot('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const S=i[d][g]||"inherit",b=i[m][g]||"inherit";a[g]=`light-dark(${S}, ${b})`,r==="css-vars"&&(a[c(h,g)]=p)}else a[g]=p;else r==="css-vars"&&(a[c(h,g)]=p)}}),o.htmlStyle=a,o}function Mr(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&ht.Italic&&(t["font-style"]="italic"),e.fontStyle&ht.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&ht.Underline&&n.push("underline"),e.fontStyle&ht.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function ii(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Iu=new WeakMap;function so(e,t){Iu.set(e,t)}function Ds(e){return Iu.get(e)}class os{constructor(...t){T(this,"_stacks",{});T(this,"lang");if(t.length===2){const[n,s]=t;this.lang=s,this._stacks=n}else{const[n,s,r]=t;this.lang=s,this._stacks={[r]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new os(Object.fromEntries(_v(n).map(s=>[s,ti])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Iv(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Iv(e){const t=[],n=new Set;function s(r){var i;if(n.has(r))return;n.add(r);const o=(i=r==null?void 0:r.nameScopesList)==null?void 0:i.scopeName;o&&t.push(o),r.parent&&s(r.parent)}return s(e),t}function Lv(e,t){if(!(e instanceof os))throw new ot("Invalid grammar state");return e.getInternalStack(t)}function Pv(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let s=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new ot(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...r.indexToPos(i),offset:i}}else{const l=r.lines[i.line];if(l===void 0)throw new ot(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${r.lines.length}`);let a=i.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new ot(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${l.length}`);return{...i,character:a,offset:r.posToIndex(i.line,a)}}};const r=$v(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));Mv(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var i;if(!((i=this.options.decorations)!=null&&i.length))return;const r=t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return Av(n,r)},code(n){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const s=t(this),r=Array.from(n.children).filter(h=>h.type==="element"&&h.tagName==="span");if(r.length!==s.converter.lines.length)throw new ot(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function o(h,g,p,d){const m=r[h];let S="",b=-1,C=-1;if(g===0&&(b=0),p===0&&(C=0),p===Number.POSITIVE_INFINITY&&(C=m.children.length),b===-1||C===-1)for(let w=0;w<m.children.length;w++)S+=Lu(m.children[w]),b===-1&&S.length===g&&(b=w+1),C===-1&&S.length===p&&(C=w+1);if(b===-1)throw new ot(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);if(C===-1)throw new ot(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);const $=m.children.slice(b,C);if(!d.alwaysWrap&&$.length===m.children.length)l(m,d,"line");else if(!d.alwaysWrap&&$.length===1&&$[0].type==="element")l($[0],d,"token");else{const w={type:"element",tagName:"span",properties:{},children:$};l(w,d,"wrapper"),m.children.splice(b,$.length,w)}}function i(h,g){r[h]=l(r[h],g,"line")}function l(h,g,p){var S;const d=g.properties||{},m=g.transform||(b=>b);return h.tagName=g.tagName||"span",h.properties={...h.properties,...d,class:h.properties.class},(S=g.properties)!=null&&S.class&&Eu(h,g.properties.class),h=m(h,p)||h,h}const a=[],c=s.decorations.sort((h,g)=>g.start.offset-h.start.offset||h.end.offset-g.end.offset);for(const h of c){const{start:g,end:p}=h;if(g.line===p.line)o(g.line,g.character,p.character,h);else if(g.line<p.line){o(g.line,g.character,Number.POSITIVE_INFINITY,h);for(let d=g.line+1;d<p.line;d++)a.unshift(()=>i(d,h));o(p.line,0,p.character,h)}}a.forEach(h=>h())}}}function Mv(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new ot(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let s=t+1;s<e.length;s++){const r=e[s],o=n.start.offset<=r.start.offset&&r.start.offset<n.end.offset,i=n.start.offset<r.end.offset&&r.end.offset<=n.end.offset,l=r.start.offset<=n.start.offset&&n.start.offset<r.end.offset,a=r.start.offset<n.end.offset&&n.end.offset<=r.end.offset;if(o||i||l||a){if(o&&i||l&&a||l&&n.start.offset===n.end.offset||i&&r.start.offset===r.end.offset)continue;throw new ot(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function Lu(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Lu).join(""):""}const Nv=[Pv()];function Nr(e){const t=Ov(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Nv]}function Ov(e){const t=[],n=[],s=[];for(const r of e)switch(r.enforce){case"pre":t.push(r);break;case"post":n.push(r);break;default:s.push(r)}return{pre:t,post:n,normal:s}}var Nn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],To={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Dv(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const s=e.indexOf("m",n);if(s!==-1)return{sequence:e.substring(n+2,s).split(";"),startPosition:n,position:s+1}}return{position:e.length}}function fa(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(s=>Number.parseInt(s));return n.length!==3||n.some(s=>Number.isNaN(s))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function Bv(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(s===0)t.push({type:"resetAll"});else if(s<=9)To[s]&&t.push({type:"setDecoration",value:To[s]});else if(s<=29){const r=To[s-20];r&&(t.push({type:"resetDecoration",value:r}),r==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Nn[s-30]}});else if(s===38){const r=fa(e);r&&t.push({type:"setForegroundColor",value:r})}else if(s===39)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Nn[s-40]}});else if(s===48){const r=fa(e);r&&t.push({type:"setBackgroundColor",value:r})}else s===49?t.push({type:"resetBackgroundColor"}):s===53?t.push({type:"setDecoration",value:"overline"}):s===55?t.push({type:"resetDecoration",value:"overline"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Nn[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Nn[s-100+8]}})}return t}function Gv(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let o=0;do{const i=Dv(s,o),l=i.sequence?s.substring(o,i.startPosition):s.substring(o);if(l.length>0&&r.push({value:l,foreground:e,background:t,decorations:new Set(n)}),i.sequence){const a=Bv(i.sequence);for(const c of a)c.type==="resetAll"?(e=null,t=null,n.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of a)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&n.add(c.value)}o=i.position}while(o<s.length);return r}}}var jv={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 zv(e=jv){function t(l){return e[l]}function n(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let s;function r(){if(s)return s;s=[];for(let c=0;c<Nn.length;c++)s.push(t(Nn[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 h=0;h<6;h++)s.push(n([l[c],l[u],l[h]]));let a=8;for(let c=0;c<24;c++,a+=10)s.push(n([a,a,a]));return s}function o(l){return r()[l]}function i(l){switch(l.type){case"named":return t(l.name);case"rgb":return n(l.rgb);case"table":return o(l.index)}}return{value:i}}const Fv={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 Uv(e,t,n){const s=Pr(e,n),r=no(t),o=Object.fromEntries(Nn.map(a=>{var h;const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=(h=e.colors)==null?void 0:h[c];return[a,u||Fv[a]]})),i=zv(o),l=Gv();return r.map(a=>l.parse(a[0]).map(c=>{let u,h;c.decorations.has("reverse")?(u=c.background?i.value(c.background):e.bg,h=c.foreground?i.value(c.foreground):e.fg):(u=c.foreground?i.value(c.foreground):e.fg,h=c.background?i.value(c.background):void 0),u=Cn(u,s),h=Cn(h,s),c.decorations.has("dim")&&(u=Hv(u));let g=ht.None;return c.decorations.has("bold")&&(g|=ht.Bold),c.decorations.has("italic")&&(g|=ht.Italic),c.decorations.has("underline")&&(g|=ht.Underline),c.decorations.has("strikethrough")&&(g|=ht.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:h,fontStyle:g}}))}function Hv(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const s=t[1];if(s.length===8){const r=Math.round(Number.parseInt(s.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${s.slice(0,6)}${r}`}else{if(s.length===6)return`#${s}80`;if(s.length===4){const r=s[0],o=s[1],i=s[2],l=s[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${r}${r}${o}${o}${i}${i}${a}`}else if(s.length===3){const r=s[0],o=s[1],i=s[2];return`#${r}${r}${o}${o}${i}${i}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Wi(e,t,n={}){const{theme:s=e.getLoadedThemes()[0]}=n,r=e.resolveLangAlias(n.lang||"text");if(Ui(r)||Hi(s))return no(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:i}=e.setTheme(s);if(r==="ansi")return Uv(o,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new ot(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new ot(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return Wv(t,l,o,i,n)}function qv(...e){if(e.length===2)return Ds(e[1]);const[t,n,s={}]=e,{lang:r="text",theme:o=t.getLoadedThemes()[0]}=s;if(Ui(r)||Hi(o))throw new ot("Plain language does not have grammar state");if(r==="ansi")throw new ot("ANSI language does not have grammar state");const{theme:i,colorMap:l}=t.setTheme(o),a=t.getLanguage(r);return new os(Vi(n,a,i,l,s).stateStack,a.name,i.name)}function Wv(e,t,n,s,r){const o=Vi(e,t,n,s,r),i=new os(o.stateStack,t.name,n.name);return so(o.tokens,i),o.tokens}function Vi(e,t,n,s,r){const o=Pr(n,r),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500}=r,a=no(e);let c=r.grammarState?Lv(r.grammarState,n.name)??ti:r.grammarContextCode!=null?Vi(r.grammarContextCode,t,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:ti,u=[];const h=[];for(let g=0,p=a.length;g<p;g++){const[d,m]=a[g];if(d===""){u=[],h.push([]);continue}if(i>0&&d.length>=i){u=[],h.push([{content:d,offset:m,color:"",fontStyle:0}]);continue}let S,b,C;r.includeExplanation&&(S=t.tokenizeLine(d,c,l),b=S.tokens,C=0);const $=t.tokenizeLine2(d,c,l),w=$.tokens.length/2;for(let M=0;M<w;M++){const K=$.tokens[2*M],B=M+1<w?$.tokens[2*M+2]:d.length;if(K===B)continue;const ce=$.tokens[2*M+1],q=Cn(s[ss.getForeground(ce)],o),re=ss.getFontStyle(ce),pe={content:d.substring(K,B),offset:m+K,color:q,fontStyle:re};if(r.includeExplanation){const j=[];if(r.includeExplanation!=="scopeName")for(const N of n.settings){let R;switch(typeof N.scope){case"string":R=N.scope.split(/,/).map(Y=>Y.trim());break;case"object":R=N.scope;break;default:continue}j.push({settings:N,selectors:R.map(Y=>Y.split(/ /))})}pe.explanation=[];let ge=0;for(;K+ge<B;){const N=b[C],R=d.substring(N.startIndex,N.endIndex);ge+=R.length,pe.explanation.push({content:R,scopes:r.includeExplanation==="scopeName"?Vv(N.scopes):Kv(j,N.scopes)}),C+=1}}u.push(pe)}h.push(u),u=[],c=$.ruleStack}return{tokens:h,stateStack:c}}function Vv(e){return e.map(t=>({scopeName:t}))}function Kv(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const o=t[s];n[s]={scopeName:o,themeMatches:Yv(e,o,t.slice(0,s))}}return n}function da(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Zv(e,t,n){if(!da(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)da(e[s],n[r])&&(s-=1),r-=1;return s===-1}function Yv(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const i of r)if(Zv(i,t,n)){s.push(o);break}return s}function Pu(e,t,n){const s=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),r=s.map(a=>{const c=Wi(e,t,{...n,theme:a.theme}),u=Ds(c),h=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:h}}),o=Jv(...r.map(a=>a.tokens)),i=o[0].map((a,c)=>a.map((u,h)=>{const g={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=u.explanation),o.forEach((p,d)=>{const{content:m,explanation:S,offset:b,...C}=p[c][h];g.variants[s[d].color]=C}),g})),l=r[0].state?new os(Object.fromEntries(r.map(a=>{var c;return[a.theme,(c=a.state)==null?void 0:c.getInternalStack(a.theme)]})),r[0].state.lang):void 0;return l&&so(i,l),i}function Jv(...e){const t=e.map(()=>[]),n=e.length;for(let s=0;s<e[0].length;s++){const r=e.map(a=>a[s]),o=t.map(()=>[]);t.forEach((a,c)=>a.push(o[c]));const i=r.map(()=>0),l=r.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(o[c].push(u),i[c]+=1,l[c]=r[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return t}function Or(e,t,n){let s,r,o,i,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=n,g=Object.entries(n.themes).filter(b=>b[1]).map(b=>({color:b[0],theme:b[1]})).sort((b,C)=>b.color===c?-1:C.color===c?1:0);if(g.length===0)throw new ot("`themes` option must not be empty");const p=Pu(e,t,n);if(a=Ds(p),c&&qi!==c&&!g.find(b=>b.color===c))throw new ot(`\`themes\` option must contain the defaultColor key \`${c}\``);const d=g.map(b=>e.getTheme(b.theme)),m=g.map(b=>b.color);o=p.map(b=>b.map(C=>Ev(C,m,u,c,h))),a&&so(o,a);const S=g.map(b=>Pr(b.theme,n));r=ha(g,d,S,u,c,"fg",h),s=ha(g,d,S,u,c,"bg",h),i=`shiki-themes ${d.map(b=>b.name).join(" ")}`,l=c?void 0:[r,s].join(";")}else if("theme"in n){const c=Pr(n.theme,n);o=Wi(e,t,n);const u=e.getTheme(n.theme);s=Cn(u.bg,c),r=Cn(u.fg,c),i=u.name,a=Ds(o)}else throw new ot("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:r,bg:s,themeName:i,rootStyle:l,grammarState:a}}function ha(e,t,n,s,r,o,i){return e.map((l,a)=>{const c=Cn(t[a][o],n[a])||"inherit",u=`${s+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&r){if(r===qi&&e.length>1){const h=e.findIndex(m=>m.color==="light"),g=e.findIndex(m=>m.color==="dark");if(h===-1||g===-1)throw new ot('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const p=Cn(t[h][o],n[h])||"inherit",d=Cn(t[g][o],n[g])||"inherit";return`light-dark(${p}, ${d});${u}`}return c}return i==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Dr(e,t,n,s={meta:{},options:n,codeToHast:(r,o)=>Dr(e,r,o),codeToTokens:(r,o)=>Or(e,r,o)}){var d,m;let r=t;for(const S of Nr(n))r=((d=S.preprocess)==null?void 0:d.call(s,r,n))||r;let{tokens:o,fg:i,bg:l,themeName:a,rootStyle:c,grammarState:u}=Or(e,r,n);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:g=!1}=n;h===!0?o=Qv(o):h==="never"&&(o=ey(o)),g&&(o=ty(o));const p={...s,get source(){return r}};for(const S of Nr(n))o=((m=S.tokens)==null?void 0:m.call(p,o))||o;return Xv(o,{...n,fg:i,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},p,u)}function Xv(e,t,n,s=Ds(e)){var m,S,b,C;const r=Nr(t),o=[],i={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[$,w]of Object.entries(t.meta||{}))$.startsWith("_")||(c[$]=w);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},h={type:"element",tagName:"code",properties:{},children:o};const g=[],p={...n,structure:l,addClassToHast:Eu,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return h},get lines(){return g}};if(e.forEach(($,w)=>{var B,ce;w&&(l==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
|
|
84
|
-
`}));let M={type:"element",tagName:"span",properties:{class:"line"},children:[]},K=0;for(const q of $){let re={type:"element",tagName:"span",properties:{...q.htmlAttrs},children:[{type:"text",value:q.content}]};const pe=ii(q.htmlStyle||Mr(q));pe&&(re.properties.style=pe);for(const j of r)re=((B=j==null?void 0:j.span)==null?void 0:B.call(p,re,w+1,K,M,q))||re;l==="inline"?i.children.push(re):l==="classic"&&M.children.push(re),K+=q.content.length}if(l==="classic"){for(const q of r)M=((ce=q==null?void 0:q.line)==null?void 0:ce.call(p,M,w+1))||M;g.push(M),o.push(M)}else l==="inline"&&g.push(M)}),l==="classic"){for(const $ of r)h=((m=$==null?void 0:$.code)==null?void 0:m.call(p,h))||h;u.children.push(h);for(const $ of r)u=((S=$==null?void 0:$.pre)==null?void 0:S.call(p,u))||u;i.children.push(u)}else if(l==="inline"){const $=[];let w={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const B of i.children)B.type==="element"&&B.tagName==="br"?($.push(w),w={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(B.type==="element"||B.type==="text")&&w.children.push(B);$.push(w);let K={type:"element",tagName:"code",properties:{},children:$};for(const B of r)K=((b=B==null?void 0:B.code)==null?void 0:b.call(p,K))||K;i.children=[];for(let B=0;B<K.children.length;B++){B>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const ce=K.children[B];ce.type==="element"&&i.children.push(...ce.children)}}let d=i;for(const $ of r)d=((C=$==null?void 0:$.root)==null?void 0:C.call(p,d))||d;return s&&so(d,s),d}function Qv(e){return e.map(t=>{const n=[];let s="",r;return t.forEach((o,i)=>{const a=!(o.fontStyle&&(o.fontStyle&ht.Underline||o.fontStyle&ht.Strikethrough));a&&o.content.match(/^\s+$/)&&t[i+1]?(r===void 0&&(r=o.offset),s+=o.content):s?(a?n.push({...o,offset:r,content:s+o.content}):n.push({content:s,offset:r},o),r=void 0,s=""):n.push(o)}),n})}function ey(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const s=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!s)return n;const[,r,o,i]=s;if(!r&&!i)return n;const l=[{...n,offset:n.offset+r.length,content:o}];return r&&l.unshift({content:r,offset:n.offset}),i&&l.push({content:i,offset:n.offset+r.length+o.length}),l}))}function ty(e){return e.map(t=>{const n=[];for(const s of t){if(n.length===0){n.push({...s});continue}const r=n[n.length-1],o=ii(r.htmlStyle||Mr(r)),i=ii(s.htmlStyle||Mr(s)),l=r.fontStyle&&(r.fontStyle&ht.Underline||r.fontStyle&ht.Strikethrough),a=s.fontStyle&&(s.fontStyle&ht.Underline||s.fontStyle&ht.Strikethrough);!l&&!a&&o===i?r.content+=s.content:n.push({...s})}return n})}const ny=kv;function sy(e,t,n){var o;const s={meta:{},options:n,codeToHast:(i,l)=>Dr(e,i,l),codeToTokens:(i,l)=>Or(e,i,l)};let r=ny(Dr(e,t,n,s));for(const i of Nr(n))r=((o=i.postprocess)==null?void 0:o.call(s,r,n))||r;return r}const pa={light:"#333333",dark:"#bbbbbb"},ga={light:"#fffffe",dark:"#1e1e1e"},ma="__shiki_resolved";function Ki(e){var l,a,c,u,h;if(e!=null&&e[ma])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:s}=t;if(!n||!s){const g=t.settings?t.settings.find(p=>!p.name&&!p.scope):void 0;(l=g==null?void 0:g.settings)!=null&&l.foreground&&(s=g.settings.foreground),(a=g==null?void 0:g.settings)!=null&&a.background&&(n=g.settings.background),!s&&((c=t==null?void 0:t.colors)!=null&&c["editor.foreground"])&&(s=t.colors["editor.foreground"]),!n&&((u=t==null?void 0:t.colors)!=null&&u["editor.background"])&&(n=t.colors["editor.background"]),s||(s=t.type==="light"?pa.light:pa.dark),n||(n=t.type==="light"?ga.light:ga.dark),t.fg=s,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let r=0;const o=new Map;function i(g){var d;if(o.has(g))return o.get(g);r+=1;const p=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(d=t.colorReplacements)!=null&&d[`#${p}`]?i(g):(o.set(g,p),p)}t.settings=t.settings.map(g=>{var S,b;const p=((S=g.settings)==null?void 0:S.foreground)&&!g.settings.foreground.startsWith("#"),d=((b=g.settings)==null?void 0:b.background)&&!g.settings.background.startsWith("#");if(!p&&!d)return g;const m={...g,settings:{...g.settings}};if(p){const C=i(g.settings.foreground);t.colorReplacements[C]=g.settings.foreground,m.settings.foreground=C}if(d){const C=i(g.settings.background);t.colorReplacements[C]=g.settings.background,m.settings.background=C}return m});for(const g of Object.keys(t.colors||{}))if((g==="editor.foreground"||g==="editor.background"||g.startsWith("terminal.ansi"))&&!((h=t.colors[g])!=null&&h.startsWith("#"))){const p=i(t.colors[g]);t.colorReplacements[p]=t.colors[g],t.colors[g]=p}return Object.defineProperty(t,ma,{enumerable:!1,writable:!1,value:!0}),t}async function Mu(e){return Array.from(new Set((await Promise.all(e.filter(t=>!xv(t)).map(async t=>await Au(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Nu(e){return(await Promise.all(e.map(async n=>Cv(n)?null:Ki(await Au(n))))).filter(n=>!!n)}let ry=3;function oy(e,t=3){t>ry||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Wn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Ou(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 Wn(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class iy extends im{constructor(n,s,r,o={}){super(n);T(this,"_resolvedThemes",new Map);T(this,"_resolvedGrammars",new Map);T(this,"_langMap",new Map);T(this,"_langGraph",new Map);T(this,"_textmateThemeCache",new WeakMap);T(this,"_loadedThemesCache",null);T(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=s,this._langs=r,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const s=Ki(n);return s.name&&(this._resolvedThemes.set(s.name,s),this._loadedThemesCache=null),s}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let s=this._textmateThemeCache.get(n);s||(s=Rr.createFromRawTheme(n),this._textmateThemeCache.set(n,s)),this._syncRegistry.setTheme(s)}getGrammar(n){return n=Ou(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var i,l,a,c;if(this.getGrammar(n.name))return;const s=new Set([...this._langMap.values()].filter(u=>{var h;return(h=u.embeddedLangsLazy)==null?void 0:h.includes(n.name)}));this._resolver.addLanguage(n);const r={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,r);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(u=>{this._alias[u]=n.name}),this._loadedLanguagesCache=null,s.size)for(const u of s)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(l=(i=this._syncRegistry)==null?void 0:i._injectionGrammars)==null||l.delete(u.scopeName),(c=(a=this._syncRegistry)==null?void 0:a._grammars)==null||c.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const s=Array.from(this._langGraph.entries()),r=s.filter(([o,i])=>!i);if(r.length){const o=s.filter(([i,l])=>{if(!l)return!1;const a=l.embeddedLanguages||l.embeddedLangs;return a==null?void 0:a.some(c=>r.map(([u])=>u).includes(c))}).filter(i=>!r.includes(i));throw new Wn(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of s)this._resolver.addLanguage(i);for(const[o,i]of s)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const s=n.embeddedLanguages??n.embeddedLangs;if(s)for(const r of s)this._langGraph.set(r,this._langMap.get(r))}}class ly{constructor(t,n){T(this,"_langs",new Map);T(this,"_scopeToLang",new Map);T(this,"_injections",new Map);T(this,"_onigLib");this._onigLib={createOnigScanner:s=>t.createScanner(s),createOnigString:s=>t.createString(s)},n.forEach(s=>this.addLanguage(s))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let s=[];for(let r=1;r<=n.length;r++){const o=n.slice(0,r).join(".");s=[...s,...this._injections.get(o)||[]]}return s}}let ds=0;function ay(e){ds+=1,e.warnings!==!1&&ds>=10&&ds%10===0&&console.warn(`[Shiki] ${ds} 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 Wn("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(Ki),r=new ly(e.engine,n),o=new iy(r,s,n,e.langAlias);let i;function l($){return Ou($,e.langAlias)}function a($){b();const w=o.getGrammar(typeof $=="string"?$:$.name);if(!w)throw new Wn(`Language \`${$}\` not found, you may need to load it first`);return w}function c($){if($==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const w=o.getTheme($);if(!w)throw new Wn(`Theme \`${$}\` not found, you may need to load it first`);return w}function u($){b();const w=c($);i!==$&&(o.setTheme(w),i=$);const M=o.getColorMap();return{theme:w,colorMap:M}}function h(){return b(),o.getLoadedThemes()}function g(){return b(),o.getLoadedLanguages()}function p(...$){b(),o.loadLanguages($.flat(1))}async function d(...$){return p(await Mu($))}function m(...$){b();for(const w of $.flat(1))o.loadTheme(w)}async function S(...$){return b(),m(await Nu($))}function b(){if(t)throw new Wn("Shiki instance has been disposed")}function C(){t||(t=!0,o.dispose(),ds-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:h,getLoadedLanguages:g,resolveLangAlias:l,loadLanguage:d,loadLanguageSync:p,loadTheme:S,loadThemeSync:m,dispose:C,[Symbol.dispose]:C}}async function cy(e){e.engine||oy("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,s]=await Promise.all([Nu(e.themes||[]),Mu(e.langs||[]),e.engine]);return ay({...e,themes:t,langs:n,engine:s})}async function uy(e){const t=await cy(e);return{getLastGrammarState:(...n)=>qv(t,...n),codeToTokensBase:(n,s)=>Wi(t,n,s),codeToTokensWithThemes:(n,s)=>Pu(t,n,s),codeToTokens:(n,s)=>Or(t,n,s),codeToHast:(n,s)=>Dr(t,n,s),codeToHtml:(n,s)=>sy(t,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}class Zi extends Error{constructor(t){super(t),this.name="ShikiError"}}function fy(){return 2147483648}function dy(){return typeof performance<"u"?performance.now():Date.now()}const hy=(e,t)=>e+(t-e%t)%t;async function py(e){let t,n;const s={};function r(p){n=p,s.HEAPU8=new Uint8Array(p),s.HEAPU32=new Uint32Array(p)}function o(p,d,m){s.HEAPU8.copyWithin(p,d,d+m)}function i(p){try{return t.grow(p-n.byteLength+65535>>>16),r(t.buffer),1}catch{}}function l(p){const d=s.HEAPU8.length;p=p>>>0;const m=fy();if(p>m)return!1;for(let S=1;S<=4;S*=2){let b=d*(1+.2/S);b=Math.min(b,p+100663296);const C=Math.min(m,hy(Math.max(p,b),65536));if(i(C))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(p,d,m=1024){const S=d+m;let b=d;for(;p[b]&&!(b>=S);)++b;if(b-d>16&&p.buffer&&a)return a.decode(p.subarray(d,b));let C="";for(;d<b;){let $=p[d++];if(!($&128)){C+=String.fromCharCode($);continue}const w=p[d++]&63;if(($&224)===192){C+=String.fromCharCode(($&31)<<6|w);continue}const M=p[d++]&63;if(($&240)===224?$=($&15)<<12|w<<6|M:$=($&7)<<18|w<<12|M<<6|p[d++]&63,$<65536)C+=String.fromCharCode($);else{const K=$-65536;C+=String.fromCharCode(55296|K>>10,56320|K&1023)}}return C}function u(p,d){return p?c(s.HEAPU8,p,d):""}const h={emscripten_get_now:dy,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function g(){const d=await e({env:h,wasi_snapshot_preview1:h});t=d.memory,r(t.buffer),Object.assign(s,d),s.UTF8ToString=u}return await g(),s}var gy=Object.defineProperty,my=(e,t,n)=>t in e?gy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,et=(e,t,n)=>my(e,typeof t!="symbol"?t+"":t,n);let rt=null;function vy(e){throw new Zi(e.UTF8ToString(e.getLastOnigError()))}class ro{constructor(t){et(this,"utf16Length"),et(this,"utf8Length"),et(this,"utf16Value"),et(this,"utf8Value"),et(this,"utf16OffsetToUtf8"),et(this,"utf8OffsetToUtf16");const n=t.length,s=ro._utf8ByteLength(t),r=s!==n,o=r?new Uint32Array(n+1):null;r&&(o[n]=s);const i=r?new Uint32Array(s+1):null;r&&(i[s]=n);const l=new Uint8Array(s);let a=0;for(let c=0;c<n;c++){const u=t.charCodeAt(c);let h=u,g=!1;if(u>=55296&&u<=56319&&c+1<n){const p=t.charCodeAt(c+1);p>=56320&&p<=57343&&(h=(u-55296<<10)+65536|p-56320,g=!0)}r&&(o[c]=a,g&&(o[c+1]=a),h<=127?i[a+0]=c:h<=2047?(i[a+0]=c,i[a+1]=c):h<=65535?(i[a+0]=c,i[a+1]=c,i[a+2]=c):(i[a+0]=c,i[a+1]=c,i[a+2]=c,i[a+3]=c)),h<=127?l[a++]=h:h<=2047?(l[a++]=192|(h&1984)>>>6,l[a++]=128|(h&63)>>>0):h<=65535?(l[a++]=224|(h&61440)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0):(l[a++]=240|(h&1835008)>>>18,l[a++]=128|(h&258048)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0),g&&c++}this.utf16Length=n,this.utf8Length=s,this.utf16Value=t,this.utf8Value=l,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let s=0,r=t.length;s<r;s++){const o=t.charCodeAt(s);let i=o,l=!1;if(o>=55296&&o<=56319&&s+1<r){const a=t.charCodeAt(s+1);a>=56320&&a<=57343&&(i=(o-55296<<10)+65536|a-56320,l=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,l&&s++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const oo=class Yt{constructor(t){if(et(this,"id",++Yt.LAST_ID),et(this,"_onigBinding"),et(this,"content"),et(this,"utf16Length"),et(this,"utf8Length"),et(this,"utf16OffsetToUtf8"),et(this,"utf8OffsetToUtf16"),et(this,"ptr"),!rt)throw new Zi("Must invoke loadWasm first.");this._onigBinding=rt,this.content=t;const n=new ro(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Yt._sharedPtrInUse?(Yt._sharedPtr||(Yt._sharedPtr=rt.omalloc(1e4)),Yt._sharedPtrInUse=!0,rt.HEAPU8.set(n.utf8Value,Yt._sharedPtr),this.ptr=Yt._sharedPtr):this.ptr=n.createString(rt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Yt._sharedPtr?Yt._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};et(oo,"LAST_ID",0);et(oo,"_sharedPtr",0);et(oo,"_sharedPtrInUse",!1);let Du=oo;class yy{constructor(t){if(et(this,"_onigBinding"),et(this,"_ptr"),!rt)throw new Zi("Must invoke loadWasm first.");const n=[],s=[];for(let l=0,a=t.length;l<a;l++){const c=new ro(t[l]);n[l]=c.createString(rt),s[l]=c.utf8Length}const r=rt.omalloc(4*t.length);rt.HEAPU32.set(n,r/4);const o=rt.omalloc(4*t.length);rt.HEAPU32.set(s,o/4);const i=rt.createOnigScanner(r,o,t.length);for(let l=0,a=t.length;l<a;l++)rt.ofree(n[l]);rt.ofree(o),rt.ofree(r),i===0&&vy(rt),this._onigBinding=rt,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,s){let r=0;if(typeof s=="number"&&(r=s),typeof t=="string"){t=new Du(t);const o=this._findNextMatchSync(t,n,!1,r);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,r)}_findNextMatchSync(t,n,s,r){const o=this._onigBinding,i=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),r);if(i===0)return null;const l=o.HEAPU32;let a=i/4;const c=l[a++],u=l[a++],h=[];for(let g=0;g<u;g++){const p=t.convertUtf8OffsetToUtf16(l[a++]),d=t.convertUtf8OffsetToUtf16(l[a++]);h[g]={start:p,end:d,length:d-p}}return{index:c,captureIndices:h}}}function by(e){return typeof e.instantiator=="function"}function ky(e){return typeof e.default=="function"}function wy(e){return typeof e.data<"u"}function Sy(e){return typeof Response<"u"&&e instanceof Response}function _y(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let or;function xy(e){if(or)return or;async function t(){rt=await py(async n=>{let s=e;return s=await s,typeof s=="function"&&(s=await s(n)),typeof s=="function"&&(s=await s(n)),by(s)?s=await s.instantiator(n):ky(s)?s=await s.default(n):(wy(s)&&(s=s.data),Sy(s)?typeof WebAssembly.instantiateStreaming=="function"?s=await Cy(s)(n):s=await $y(s)(n):_y(s)?s=await Ro(s)(n):s instanceof WebAssembly.Module?s=await Ro(s)(n):"default"in s&&s.default instanceof WebAssembly.Module&&(s=await Ro(s.default)(n))),"instance"in s&&(s=s.instance),"exports"in s&&(s=s.exports),s})}return or=t(),or}function Ro(e){return t=>WebAssembly.instantiate(e,t)}function Cy(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $y(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function Ty(e){return e&&await xy(e),{createScanner(t){return new yy(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Du(t)}}}const Ry={class:"code-block"},Ay={class:"code-header"},Ey={class:"code-lang"},Iy=["innerHTML"],Ly=xe({__name:"CodeBlock",props:{code:{},lang:{},streaming:{type:Boolean}},setup(e){const t=e,n=Ft("effectiveTheme",F(typeof document<"u"&&document.documentElement.dataset.theme==="dark"?"dark":"light")),s=F(""),r=F(""),o=F(!1);let i=null;const l=new Set,a=new Map,c={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",shscript:"bash","shell-script":"bash",yml:"yaml",md:"markdown",rs:"rust",rb:"ruby",go:"go",java:"java",c:"c",cpp:"cpp","c++":"cpp",cs:"csharp","c#":"csharp",kt:"kotlin",kts:"kotlin",scala:"scala",swift:"swift",dart:"dart",lua:"lua",r:"r",sql:"sql",toml:"toml",ini:"ini",xml:"xml",svelte:"svelte",astro:"astro",dockerfile:"docker",makefile:"make",graphql:"graphql",proto:"protobuf",pl:"perl",pm:"perl"};async function u(){if(i)return i;const[S,b]=await Promise.all([tr(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url),tr(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url)]);return i=await uy({themes:[S.default,b.default],langs:[],engine:Ty(()=>tr(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))}),i}async function h(S){if(l.has(S))return!0;if(a.has(S))return await a.get(S),l.has(S);const b=(async()=>{try{const C=await u(),$=await tr(()=>import(`shiki/langs/${S}.mjs`),[],import.meta.url);await C.loadLanguage($.default),l.add(S)}catch{}})();return a.set(S,b),await b,a.delete(S),l.has(S)}function g(S){const b=S.toLowerCase();return c[b]??b}async function p(){var $;const S=(($=t.lang)==null?void 0:$.toLowerCase())??"text",b=g(S),C=n.value==="light"?"github-light":"github-dark";try{const w=await u();await h(b)?s.value=w.codeToHtml(t.code,{lang:b,theme:C}):s.value=`<pre class="shiki-fallback"><code>${d(t.code)}</code></pre>`}catch{s.value=`<pre class="shiki-fallback"><code>${d(t.code)}</code></pre>`}}function d(S){return S.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}function m(){navigator.clipboard.writeText(t.code).then(()=>{o.value=!0,setTimeout(()=>o.value=!1,1500)})}return Ne(()=>[t.code,t.lang,n.value],([S])=>{t.streaming?r.value=`<pre class="shiki-fallback"><code>${d(S)}</code></pre>`:p()},{immediate:!0}),Ne(()=>t.streaming,(S,b)=>{b&&!S&&p()}),(S,b)=>(y(),k("div",Ry,[f("div",Ay,[f("span",Ey,E(e.lang||"text"),1),f("button",{class:"code-copy",onClick:m},E(o.value?"已复制":"复制"),1)]),f("div",{class:"code-content",innerHTML:t.streaming?r.value:s.value||r.value},null,8,Iy)]))}}),Py=Ce(Ly,[["__scopeId","data-v-95a13158"]]);Le.setOptions({gfm:!0,breaks:!1});const My=xe({props:{content:{type:String,required:!0},streaming:{type:Boolean,default:!1}},setup(e){const t=F(e.content);let n=null;Ne(()=>e.content,r=>{if(!e.streaming){t.value=r;return}n===null&&(n=requestAnimationFrame(()=>{n=null,t.value=e.content}))}),Ne(()=>e.streaming,(r,o)=>{o&&!r&&(n!==null&&(cancelAnimationFrame(n),n=null),t.value=e.content)});const s=ee(()=>{const r=Ny(t.value);return Le.lexer(r).flatMap(i=>li(i,e.streaming))});return()=>Ie("div",{class:"markdown-body"},s.value)}});function Ny(e){const t=/^(`{3,})/gm;let n=null,s=-1,r=0,o;for(;(o=t.exec(e))!==null;){const i=o[1];n===null?(n=i,s=o.index,r=i.length):i.length>=r&&(n=null)}return n!==null?e.substring(0,s).trimEnd():e}function li(e,t=!1){switch(e.type){case"paragraph":return[Ie("p",{class:"md-p"},pn(e.tokens))];case"heading":return[Ie(`h${e.depth}`,{class:`md-h${e.depth}`},pn(e.tokens))];case"code":return[Ie(Py,{code:e.text,lang:e.lang??"text",streaming:t})];case"blockquote":return[Ie("blockquote",{class:"md-blockquote"},e.tokens.flatMap(n=>li(n,t)))];case"list":{const n=e.items.map(s=>{const r=[];return s.task&&r.push(Ie("input",{type:"checkbox",checked:s.checked,disabled:!0,class:"md-checkbox"})),r.push(...s.tokens.flatMap(o=>li(o,t))),Ie("li",{class:["md-li",s.task?"md-task":""]},r)});return[Ie(e.ordered?"ol":"ul",{class:e.ordered?"md-ol":"md-ul"},n)]}case"hr":return[Ie("hr",{class:"md-hr"})];case"space":return[];case"html":return[Ie("div",{class:"md-html",innerHTML:e.text})];case"table":return[Ie("div",{class:"md-table-wrap",style:"overflow-x:auto"},[Oy(e)])];case"br":return[Ie("br")];case"text":return[Ie("span",{class:"md-text"},e.tokens?pn(e.tokens):e.text)];case"def":return[];default:return[Ie("p",{class:"md-p"},e.raw??"")]}}function Oy(e){const t=e,n=(t.header??[]).map((r,o)=>{var l;const i=(l=t.align)==null?void 0:l[o];return Ie("th",{class:"md-th",style:i?`text-align:${i}`:""},r.tokens?pn(r.tokens):String(r.text??""))}),s=(t.rows??[]).map(r=>Ie("tr",{},r.map((o,i)=>{var a;const l=(a=t.align)==null?void 0:a[i];return Ie("td",{class:"md-td",style:l?`text-align:${l}`:""},o.tokens?pn(o.tokens):String(o.text??""))})));return Ie("table",{class:"md-table"},[Ie("thead",{},[Ie("tr",{},n)]),Ie("tbody",{},s)])}function pn(e){return e.map(t=>{switch(t.type){case"text":return t.text;case"codespan":return Ie("code",{class:"md-code"},t.text);case"strong":return Ie("strong",{class:"md-strong"},pn(t.tokens));case"em":return Ie("em",{class:"md-em"},pn(t.tokens));case"del":return Ie("del",{class:"md-del"},pn(t.tokens));case"link":{const n=t.href;return n&&!/^(https?:|mailto:|#|\/)/i.test(n)?t.raw??"":Ie("a",{class:"md-a",href:n,target:"_blank",rel:"noopener"},pn(t.tokens))}case"image":return Ie("img",{class:"md-img",src:t.href,alt:t.text??"",loading:"lazy"});case"br":return Ie("br");case"html":return Ie("span",{innerHTML:t.text});case"escape":return t.text;default:return t.raw??""}})}const Dy=Ce(My,[["__scopeId","data-v-fbbbffca"]]),By=new Set(["edit","str_replace","replace","write","multi_edit","create_file","edit_file","apply_patch"]);function Gy(e){return By.has(e.toLowerCase())}function va(e){return e.suspended?"suspended":e.isError?"error":e.output===void 0?"running":"ok"}function jy(e){return e.some(t=>va(t)==="running")?"running":e.some(t=>va(t)==="error")?"error":"ok"}const zy=["onKeydown"],Fy={class:"tool-name"},Uy=["title"],Hy={class:"tool-collapse-inner"},qy={class:"tool-body"},Wy={key:0,class:"tool-args"},Vy={key:1,class:"tool-result"},Ky={key:2,class:"tool-running-hint"},Zy=xe({__name:"GenericToolCard",props:{tool:{}},setup(e){const t=e,n=ee(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=ee(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=F(!1);let o=!1;Ne(n,u=>{o||(r.value=u==="running")},{immediate:!0});function i(){o=!0,r.value=!r.value}const l=ee(()=>{const u=t.tool.args;if(!u||typeof u!="object")return u===void 0?"":String(u);const h=[];for(const[g,p]of Object.entries(u)){let d;if(typeof p=="string")d=p.length>40?`${p.slice(0,40)}…`:p;else{try{d=JSON.stringify(p)}catch{d=String(p)}d.length>40&&(d=`${d.slice(0,40)}…`)}if(h.push(`${g}=${d}`),h.length>=3)break}return h.join(" ")});function a(){if(!t.tool.args)return"";try{return JSON.stringify(t.tool.args,null,2)}catch{return String(t.tool.args)}}function c(u){return u??""}return(u,h)=>(y(),k("div",{class:be(["tool-card",`is-${n.value}`])},[f("div",{class:"tool-header",role:"button",tabindex:"0",onClick:i,onKeydown:Ls(qt(i,["prevent"]),["enter"])},[f("span",{class:be(["status-dot",n.value])},[s.value?(y(),k(Q,{key:0},[_e(E(s.value),1)],64)):W("",!0)],2),f("span",Fy,E(e.tool.name),1),l.value?(y(),k("span",{key:0,class:"tool-params",title:l.value},E(l.value),9,Uy)):W("",!0),f("span",{class:be(["tool-chevron",{open:r.value}])},"▸",2)],40,zy),f("div",{class:be(["tool-collapse",{open:r.value}])},[f("div",Hy,[f("div",qy,[a()?(y(),k("pre",Wy,[f("code",null,E(a()),1)])):W("",!0),e.tool.output!==void 0?(y(),k("pre",Vy,[f("code",null,E(c(e.tool.output)||"(无输出)"),1)])):(y(),k("div",Ky,"执行中…"))])])],2)],2))}}),Yy=Ce(Zy,[["__scopeId","data-v-5d0f42c5"]]),Jy=500;function Xy(e,t){const n=e.length,s=t.length,r=Array.from({length:n+1},()=>new Array(s+1).fill(0));for(let o=1;o<=n;o++)for(let i=1;i<=s;i++)r[o][i]=e[o-1]===t[i-1]?r[o-1][i-1]+1:Math.max(r[o-1][i],r[o][i-1]);return r}function Qy(e,t,n,s,r){const o=[];for(;s>0||r>0;)s>0&&r>0&&t[s-1]===n[r-1]?(o.unshift({type:"context",text:t[s-1],oldNo:s,newNo:r}),s--,r--):r>0&&(s===0||e[s][r-1]>=e[s-1][r])?(o.unshift({type:"add",text:n[r-1],newNo:r}),r--):(o.unshift({type:"del",text:t[s-1],oldNo:s}),s--);return o}function eb(e,t){const n=e.split(`
|
|
85
|
-
`),s=t.split(`
|
|
86
|
-
`);if(n.length+s.length>Jy){const o=[];return n.forEach((i,l)=>o.push({type:"del",text:i,oldNo:l+1})),s.forEach((i,l)=>o.push({type:"add",text:i,newNo:l+1})),o}const r=Xy(n,s);return Qy(r,n,s,n.length,s.length)}function tb(e){let t=0,n=0;for(const s of e)s.type==="add"?t++:s.type==="del"&&n++;return{added:t,removed:n}}const nb=["old_string","oldString","old_str","old_text","oldText","old","search"],sb=["new_string","newString","new_str","new_text","newText","new","replace","content"],rb=["path","file_path","filePath","file","filename"];function Ao(e,t){for(const n of t){const s=e[n];if(typeof s=="string"&&s.length>0)return s}}function ob(e){if(!e||typeof e!="object")return null;const t=e,n=Ao(t,rb),s=Ao(t,nb),r=Ao(t,sb);if(!r&&!s)return null;const o=eb(s??"",r??""),i=tb(o);return{path:n,diff:o,stats:i}}const ib={class:"diff-lines"},lb={class:"dl-gutter old"},ab={class:"dl-gutter new"},cb={class:"dl-sign"},ub={class:"dl-text"},fb=xe({__name:"DiffLines",props:{lines:{}},setup(e){return(t,n)=>(y(),k("div",ib,[(y(!0),k(Q,null,Je(e.lines,(s,r)=>(y(),k("div",{key:r,class:be(["dl",`dl-${s.type}`])},[f("span",lb,E(s.oldNo??""),1),f("span",ab,E(s.newNo??""),1),f("span",cb,E(s.type==="add"?"+":s.type==="del"?"−":" "),1),f("span",ub,E(s.text),1)],2))),128))]))}}),db=Ce(fb,[["__scopeId","data-v-147edc06"]]),hb=["onKeydown"],pb={class:"tool-name"},gb=["title"],mb={key:1,class:"diff-chip"},vb={class:"tool-collapse-inner"},yb={class:"tool-body"},bb={key:1,class:"tool-result"},kb={key:2,class:"tool-running-hint"},wb=xe({__name:"EditToolCard",props:{tool:{}},setup(e){const t=e,n=ee(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=ee(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=ee(()=>ob(t.tool.args)),o=ee(()=>{const g=r.value;if(!g||n.value==="error")return"";const{added:p,removed:d}=g.stats;return!p&&!d?"":`+${p} −${d}`}),i=ee(()=>{var g;return(g=r.value)==null?void 0:g.path}),l=F(!1);let a=!1;Ne(n,g=>{a||(l.value=g==="running")},{immediate:!0});function c(){a=!0,l.value=!l.value}const u=ee(()=>{var g;return((g=r.value)==null?void 0:g.diff)??[]}),h=ee(()=>u.value.length>0);return(g,p)=>(y(),k("div",{class:be(["tool-card",`is-${n.value}`,"edit-tool-card"])},[f("div",{class:"tool-header",role:"button",tabindex:"0",onClick:c,onKeydown:Ls(qt(c,["prevent"]),["enter"])},[f("span",{class:be(["status-dot",n.value])},[s.value?(y(),k(Q,{key:0},[_e(E(s.value),1)],64)):W("",!0)],2),f("span",pb,E(e.tool.name),1),i.value?(y(),k("span",{key:0,class:"tool-filepath",title:i.value},E(i.value),9,gb)):W("",!0),o.value?(y(),k("span",mb,E(o.value),1)):W("",!0),f("span",{class:be(["tool-chevron",{open:l.value}])},"▸",2)],40,hb),f("div",{class:be(["tool-collapse",{open:l.value}])},[f("div",vb,[f("div",yb,[h.value?(y(),Ve(db,{key:0,lines:u.value},null,8,["lines"])):W("",!0),e.tool.output!==void 0?(y(),k("pre",bb,[f("code",null,E(e.tool.output||"(无输出)"),1)])):(y(),k("div",kb,"执行中…"))])])],2)],2))}}),Sb=Ce(wb,[["__scopeId","data-v-95ab1624"]]),_b=["aria-expanded"],xb={class:"process-copy"},Cb=["title"],$b={class:"count"},Tb={class:"process-collapse"},Rb={class:"process-inner"},Ab=xe({__name:"ToolGroup",props:{name:{},tools:{}},setup(e){const t=e,n=F(!1),s=F(!1),r=ee(()=>jy(t.tools)),o=ee(()=>t.tools.filter(l=>l.output!==void 0&&!l.isError).length);Ne(r,l=>{!s.value&&l==="running"&&(n.value=!0)},{immediate:!0});function i(){s.value=!0,n.value=!n.value}return(l,a)=>(y(),k("section",{class:be(["tool-process",{open:n.value,error:r.value==="error"}])},[f("button",{class:"process-head",type:"button","aria-expanded":n.value,onClick:i},[f("span",{class:be(["process-icon",r.value])},[H(fe,{name:r.value==="ok"?"check":"terminal",size:18},null,8,["name"])],2),f("span",xb,[a[0]||(a[0]=f("strong",null,"工具调用过程",-1)),f("small",null,E(r.value==="running"?"正在执行":r.value==="error"?"包含失败调用":`已完成 ${o.value} 项`),1)]),f("span",{class:"tool-names",title:e.tools.map(c=>c.name).join("、")},E(e.tools.map(c=>c.name).join(" · ")),9,Cb),f("span",$b,E(e.tools.length),1),H(fe,{name:"chevron-down",size:17,class:"chevron"})],8,_b),f("div",Tb,[f("div",Rb,[(y(!0),k(Q,null,Je(e.tools,c=>(y(),Ve(ud(X(Gy)(c.name)?Sb:Yy),{key:c.toolCallId,tool:c},null,8,["tool"]))),128))])])],2))}}),Eb=Ce(Ab,[["__scopeId","data-v-a044c3b3"]]),Ib={class:"thinking-block"},Lb={class:"teaser-text"},Pb={key:1,class:"thinking-stream"},Mb={class:"thinking-panel",role:"dialog","aria-label":"思考过程"},Nb={class:"panel-body"},Ob=xe({__name:"ThinkingBlock",props:{tool:{},active:{type:Boolean,default:!1}},setup(e){const t=e,n=F(!1),s=F(null),r=ee(()=>t.tool.output??""),o=ee(()=>r.value.split(/\n+/).map(c=>c.trim()).filter(Boolean).at(-1)??"");Ne(r,()=>{t.active&&Gt(()=>{const a=s.value;a&&(a.scrollTop=a.scrollHeight)})});function i(){n.value=!0}function l(){n.value=!1}return(a,c)=>(y(),k("div",Ib,[e.active?(y(),k("div",Pb,[c[2]||(c[2]=f("div",{class:"stream-header"},[f("span",{class:"stream-icon"},"💭"),f("span",{class:"stream-title"},"思考中…"),f("span",{class:"stream-dot"})],-1)),f("div",{ref_key:"streamRef",ref:s,class:"stream-body"},E(r.value),513)])):(y(),k("button",{key:0,class:"thinking-teaser",title:"点击查看完整思考过程",onClick:i},[c[0]||(c[0]=f("span",{class:"teaser-icon"},"💭",-1)),f("span",Lb,E(o.value||"思考过程"),1),c[1]||(c[1]=f("span",{class:"teaser-open"},"展开",-1))])),(y(),Ve(ki,{to:"body"},[n.value?(y(),k("div",{key:0,class:"thinking-overlay",onClick:qt(l,["self"])},[f("aside",Mb,[f("header",{class:"panel-header"},[c[3]||(c[3]=f("span",null,"💭 思考过程",-1)),f("button",{class:"panel-close","aria-label":"关闭",onClick:l},"✕")]),f("div",Nb,E(r.value||"(空)"),1)])])):W("",!0)]))]))}}),Db=Ce(Ob,[["__scopeId","data-v-890e0460"]]),Bb={key:0,class:"clock"},Gb={class:"stat"},jb={class:"stat"},zb={class:"stat"},Fb={class:"stat"},Ub={class:"stat"},Hb={class:"stat"},qb=xe({__name:"TurnStats",props:{stats:{}},setup(e){const t=e,n=F(null);let s=null;function r(){s!==null&&(clearInterval(s),s=null)}function o(){r();const a=t.stats.llmMs??0,c=Date.now();n.value=a,s=setInterval(()=>{n.value=a+(Date.now()-c)},300)}Ne(()=>t.stats.status,a=>{a==="running"?o():r()},{immediate:!0}),nn(r);function i(a){return a==null?"—":a<1e3?`${Math.round(a)}ms`:`${(a/1e3).toFixed(1)}s`}function l(a){return a==null?"—":a>=1e3?`${(a/1e3).toFixed(1)}k`:`${a}`}return(a,c)=>(y(),k("div",{class:be(["turn-stats",`is-${e.stats.status}`]),"aria-live":"polite"},[e.stats.status==="running"?(y(),k(Q,{key:0},[c[0]||(c[0]=f("span",{class:"badge-gradient"},"正在思考",-1)),n.value!==null?(y(),k("span",Bb,E(i(n.value)),1)):W("",!0)],64)):(y(),k(Q,{key:1},[f("span",Gb,E(e.stats.turn)+" 轮 · "+E(e.stats.step)+" 步",1),c[10]||(c[10]=f("span",{class:"dot"},"·",-1)),f("span",jb,[c[1]||(c[1]=f("span",{class:"k"},"LLM",-1)),_e(" "+E(i(e.stats.llmMs)),1)]),e.stats.toolMs?(y(),k(Q,{key:0},[c[3]||(c[3]=f("span",{class:"dot"},"·",-1)),f("span",zb,[c[2]||(c[2]=f("span",{class:"k"},"工具",-1)),_e(" "+E(i(e.stats.toolMs)),1)])],64)):W("",!0),e.stats.firstTokenMs!==null&&e.stats.firstTokenMs!==void 0?(y(),k(Q,{key:1},[c[5]||(c[5]=f("span",{class:"dot"},"·",-1)),f("span",Fb,[c[4]||(c[4]=f("span",{class:"k"},"首token",-1)),_e(" "+E(i(e.stats.firstTokenMs)),1)])],64)):W("",!0),e.stats.tokens!==null&&e.stats.tokens!==void 0?(y(),k(Q,{key:2},[c[7]||(c[7]=f("span",{class:"dot"},"·",-1)),f("span",Ub,[c[6]||(c[6]=f("span",{class:"k"},"tokens",-1)),_e(" "+E(l(e.stats.tokens)),1)])],64)):W("",!0),e.stats.tokensPerSec!==null&&e.stats.tokensPerSec!==void 0?(y(),k(Q,{key:3},[c[9]||(c[9]=f("span",{class:"dot"},"·",-1)),f("span",Hb,[c[8]||(c[8]=f("span",{class:"k"},"tok/s",-1)),_e(" "+E(e.stats.tokensPerSec),1)])],64)):W("",!0)],64))],2))}}),Wb=Ce(qb,[["__scopeId","data-v-783b99fe"]]),Vb={key:0,class:"user-wrap"},Kb={class:"user-bubble"},Zb={class:"message-meta user-meta"},Yb={key:0},Jb={key:1,class:"assistant-wrap"},Xb={key:0,class:"assistant-brand"},Qb={class:"assistant-avatar"},e1={key:0},t1={class:"assistant-body"},n1={key:3,class:"streaming-cursor","aria-label":"正在生成"},s1={key:5,class:"message-meta"},r1=["title"],o1=["title"],i1=xe({__name:"MessageItem",props:{message:{},isLatestUser:{type:Boolean,default:!1},idle:{type:Boolean,default:!0},streaming:{type:Boolean,default:!1}},emits:["edit"],setup(e,{emit:t}){const n=e,s=t,r=F(!1);let o=null;const i=ee(()=>n.message.role==="user"),l=ee(()=>n.message.role==="assistant"),a=ee(()=>n.message.tools.filter(C=>C.name==="thinking")),c=ee(()=>n.message.tools.filter(C=>C.name!=="thinking")),u=ee(()=>n.message.ts?new Date(n.message.ts).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):""),h=ee(()=>i.value&&n.isLatestUser&&n.idle),g=Ft("showThinking",F(!0)),p=Ft("showTools",F(!0)),d=F(!1);let m=null;function S(){if(typeof window>"u"||!("speechSynthesis"in window))return;if(d.value){window.speechSynthesis.cancel(),d.value=!1,m=null;return}const C=n.message.content;if(!C)return;const $=new SpeechSynthesisUtterance(C);$.lang="zh-CN";const w=()=>{m===w&&(d.value=!1,m=null)};m=w,$.addEventListener("end",w),$.addEventListener("error",w),window.speechSynthesis.cancel(),requestAnimationFrame(()=>{window.speechSynthesis.speak($)}),d.value=!0}nn(()=>{d.value&&"speechSynthesis"in window&&window.speechSynthesis.cancel()});async function b(){try{await navigator.clipboard.writeText(n.message.content)}catch{const C=document.createElement("textarea");C.value=n.message.content,document.body.append(C),C.select(),document.execCommand("copy"),C.remove()}r.value=!0,o!==null&&clearTimeout(o),o=window.setTimeout(()=>{r.value=!1},1500)}return(C,$)=>(y(),k("article",{class:be(["message",e.message.role,{error:e.message.isError}])},[i.value?(y(),k("div",Vb,[f("div",Kb,E(e.message.content),1),f("div",Zb,[u.value?(y(),k("span",Yb,E(u.value),1)):W("",!0),h.value?(y(),k("button",{key:1,title:"编辑并重新发送",onClick:$[0]||($[0]=w=>s("edit",e.message.content))},[H(fe,{name:"edit",size:14}),$[3]||($[3]=_e("编辑重发",-1))])):W("",!0)])])):(y(),k("div",Jb,[l.value?(y(),k("div",Xb,[f("span",Qb,[f("img",{src:Ai,alt:"",draggable:"false",onError:$[1]||($[1]=w=>w.target.style.visibility="hidden"),onLoad:$[2]||($[2]=w=>w.target.style.visibility="visible"),style:{visibility:"hidden"}},null,32)]),f("div",null,[$[4]||($[4]=f("strong",null,"Scream Code",-1)),f("span",null,[f("i",{class:be({streaming:e.streaming})},null,2),_e(E(e.streaming?"正在生成回复":"Agent 回复"),1)])]),u.value?(y(),k("time",e1,E(u.value),1)):W("",!0)])):W("",!0),f("div",t1,[X(g)?(y(!0),k(Q,{key:0},Je(a.value,w=>(y(),Ve(Db,{key:w.toolCallId,tool:w,active:e.streaming},null,8,["tool","active"]))),128)):W("",!0),c.value.length&&X(p)?(y(),Ve(Eb,{key:1,name:"工具调用过程",tools:c.value},null,8,["tools"])):W("",!0),e.message.content?(y(),Ve(Dy,{key:2,class:"assistant-content",content:e.message.content,streaming:e.streaming},null,8,["content","streaming"])):e.streaming?(y(),k("span",n1)):W("",!0),e.message.turnStats?(y(),Ve(Wb,{key:4,stats:e.message.turnStats},null,8,["stats"])):W("",!0),e.message.content?(y(),k("div",s1,[f("button",{title:r.value?"已复制":"复制内容",onClick:b},[H(fe,{name:r.value?"check":"copy",size:14},null,8,["name"]),_e(E(r.value?"已复制":"复制"),1)],8,r1),f("button",{title:d.value?"停止朗读":"朗读",onClick:S},[H(fe,{name:d.value?"speaker-off":"speaker",size:14},null,8,["name"]),_e(E(d.value?"停止":"朗读"),1)],8,o1)])):W("",!0)])]))],2))}}),l1=Ce(i1,[["__scopeId","data-v-0ee34ba8"]]),a1={class:"empty-state"},c1={class:"suggestions"},u1=["onClick"],f1={class:"suggestion-icon"},d1={class:"suggestion-title"},h1=["title"],p1={class:"workdir-path"},g1={class:"empty-status","aria-label":"连接与模型状态"},m1={class:"status-item"},v1={class:"status-item"},y1={class:"status-item"},b1=xe({__name:"EmptyState",props:{workDir:{default:null},model:{default:null},contextUsage:{default:null},connected:{type:Boolean,default:!1}},emits:["pick"],setup(e,{emit:t}){const n=t,s=[{icon:"edit",title:"帮我写一个函数",prompt:"帮我写一个函数"},{icon:"clipboard",title:"解释这段代码",prompt:"解释这段代码"},{icon:"activity",title:"调试这个问题",prompt:"调试这个问题"}];function r(o){if(o==null)return"—";const i=o<=1?Math.round(o*100):Math.round(o);return`${Math.min(i,100)}%`}return(o,i)=>(y(),k("div",a1,[i[3]||(i[3]=f("div",{class:"empty-logo"},[f("img",{src:Ai,alt:"Scream",class:"logo-img"})],-1)),i[4]||(i[4]=f("h1",{class:"empty-title"},"Scream Web UI",-1)),i[5]||(i[5]=f("p",{class:"empty-subtitle"},"给 Scream 发消息,开始处理你的任务",-1)),f("div",c1,[(y(),k(Q,null,Je(s,l=>f("button",{key:l.title,class:"suggestion-card",onClick:a=>n("pick",l.prompt)},[f("span",f1,[H(fe,{name:l.icon,size:22},null,8,["name"])]),f("span",d1,E(l.title),1)],8,u1)),64))]),e.workDir?(y(),k("div",{key:0,class:"empty-workdir",title:e.workDir},[i[0]||(i[0]=f("span",{class:"workdir-label"},"工作目录",-1)),f("span",p1,E(e.workDir),1)],8,h1)):W("",!0),f("div",g1,[f("span",{class:be(["status-dot",e.connected?"on":"off"])},null,2),f("span",m1,E(e.connected?"已连接":"未连接"),1),e.model?(y(),k(Q,{key:0},[i[1]||(i[1]=f("span",{class:"status-sep"},"·",-1)),f("span",v1,"模型 "+E(e.model),1)],64)):W("",!0),e.contextUsage!==null&&e.contextUsage!==void 0?(y(),k(Q,{key:1},[i[2]||(i[2]=f("span",{class:"status-sep"},"·",-1)),f("span",y1,"上下文 "+E(r(e.contextUsage)),1)],64)):W("",!0)]),i[6]||(i[6]=f("div",{class:"empty-shortcuts","aria-hidden":"true"},[f("span",null,[f("kbd",null,"⌘K"),_e(" 搜索会话")]),f("span",null,[f("kbd",null,"⌘N"),_e(" 新建会话")])],-1))]))}}),k1=Ce(b1,[["__scopeId","data-v-cc2342f3"]]),w1={class:"message-list-wrapper"},S1={key:1,class:"message-skeleton","aria-hidden":"true"},_1=xe({__name:"MessageList",props:{messages:{},busy:{type:Boolean,default:!1},workDir:{default:null},sessionId:{default:""},model:{default:null},contextUsage:{default:null},connected:{type:Boolean,default:!1}},emits:["edit","pick"],setup(e,{emit:t}){const n=e,s=t,r=F(null),o=ee(()=>{for(let w=n.messages.length-1;w>=0;w--)if(n.messages[w].role==="user")return n.messages[w].id;return null}),i=ee(()=>{var w;return((w=n.messages.at(-1))==null?void 0:w.id)??null}),l=ee(()=>{var K;const w=n.messages.at(-1);if(!w)return 0;let M=w.content.length;for(const B of w.tools)M+=((K=B.output)==null?void 0:K.length)??0;return M});let a=!1;const c=F(!1);function u(){const w=r.value;return w?w.scrollHeight-w.scrollTop-w.clientHeight<80:!0}function h(){return typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function g(w){requestAnimationFrame(()=>{const M=r.value;if(!M)return;const K=h()?"auto":w;M.scrollTo({top:M.scrollHeight,behavior:K})})}let p=null;function d(){const w=r.value,M=n.sessionId;!w||!M||p===null&&(p=requestAnimationFrame(()=>{p=null;try{localStorage.setItem(`scream-scroll:${M}`,String(w.scrollTop))}catch{}}))}function m(){const w=r.value,M=n.sessionId;if(!w||!M)return;let K=null;try{K=localStorage.getItem(`scream-scroll:${M}`)}catch{}K&&(w.scrollTop=Number(K))}function S(){const w=r.value;if(!w)return;const M=w.scrollHeight-w.scrollTop-w.clientHeight>80;c.value=M,M&&a&&(a=!1),n.busy||d()}let b="";Ne(()=>n.sessionId,()=>{b=""}),Ne(()=>[n.messages.length,l.value],([w],[M])=>{if(w!==M){if(w>0&&b!==n.sessionId){b=n.sessionId,requestAnimationFrame(()=>requestAnimationFrame(m));return}a=!0,c.value=!1,g("smooth");return}!a&&!u()||g("auto")}),Ne(()=>n.busy,w=>{w||(a=!1)});function C(){a=!0,c.value=!1,g("smooth")}const $=ee(()=>!n.busy||n.messages.length===0?!1:n.messages.at(-1).role==="user");return tn(()=>{var w;(w=r.value)==null||w.addEventListener("scroll",S,{passive:!0}),requestAnimationFrame(()=>requestAnimationFrame(m))}),Zr(()=>{var w;(w=r.value)==null||w.removeEventListener("scroll",S),p!==null&&(cancelAnimationFrame(p),p=null)}),(w,M)=>(y(),k("div",w1,[f("div",{ref_key:"listRef",ref:r,class:"message-list"},[e.messages.length===0?(y(),Ve(k1,{key:0,"work-dir":e.workDir,model:e.model,"context-usage":e.contextUsage,connected:e.connected,onPick:M[0]||(M[0]=K=>s("pick",K))},null,8,["work-dir","model","context-usage","connected"])):W("",!0),(y(!0),k(Q,null,Je(e.messages,K=>(y(),Ve(l1,{key:K.id,message:K,"is-latest-user":K.id===o.value,idle:!e.busy,streaming:e.busy&&K.id===i.value&&K.role==="assistant",onEdit:M[1]||(M[1]=B=>s("edit",B))},null,8,["message","is-latest-user","idle","streaming"]))),128)),$.value?(y(),k("div",S1,[...M[2]||(M[2]=[jd('<div class="sk-avatar" data-v-a19d8c94></div><div class="sk-body" data-v-a19d8c94><div class="sk-line sk-w-60" data-v-a19d8c94></div><div class="sk-line sk-w-90" data-v-a19d8c94></div><div class="sk-line sk-w-40" data-v-a19d8c94></div></div>',2)])])):W("",!0)],512),H($i,{name:"scroll-btn"},{default:at(()=>[c.value?(y(),k("button",{key:0,class:"scroll-to-bottom",title:"滚动到最新消息",onClick:C},[H(fe,{name:"chevron-down",size:18})])):W("",!0)]),_:1})]))}}),x1=Ce(_1,[["__scopeId","data-v-a19d8c94"]]),C1=["title","aria-label"],$1=["width","height","viewBox"],T1=["cx","cy","r"],R1=["cx","cy","r","stroke-dasharray","stroke-dashoffset","transform"],Eo=2,A1=xe({__name:"ContextRing",props:{usage:{default:void 0},size:{default:16}},setup(e){oh(a=>({v1d95ffa8:l.value}));const t=e,n=ee(()=>{if(t.usage===void 0||Number.isNaN(t.usage))return 0;const a=t.usage>1?t.usage/100:t.usage;return Math.min(1,Math.max(0,a))}),s=ee(()=>Math.round(n.value*100)),r=ee(()=>(t.size-Eo)/2),o=ee(()=>2*Math.PI*r.value),i=ee(()=>o.value*(1-n.value)),l=ee(()=>n.value>=.9?"var(--color-danger)":n.value>=.7?"var(--color-warning)":"var(--color-accent)");return(a,c)=>(y(),k("span",{class:"context-ring",role:"img",title:`上下文占用 ${s.value}%`,"aria-label":`上下文占用 ${s.value}%`},[(y(),k("svg",{width:e.size,height:e.size,viewBox:`0 0 ${e.size} ${e.size}`},[f("circle",{class:"ring-track",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":Eo,fill:"none"},null,8,T1),f("circle",{class:"ring-value",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":Eo,fill:"none","stroke-linecap":"round","stroke-dasharray":o.value,"stroke-dashoffset":i.value,transform:`rotate(-90 ${e.size/2} ${e.size/2})`},null,8,R1)],8,$1))],8,C1))}}),Bu=Ce(A1,[["__scopeId","data-v-3ffc343b"]]),E1={class:"model-picker-root"},I1={class:"picker-list"},L1={key:0,class:"picker-empty"},P1={class:"picker-group-title"},M1=["onClick"],N1={class:"row-main"},O1={class:"row-name"},D1={class:"row-alias"},B1={class:"row-meta"},G1={key:0,class:"row-check"},j1={class:"picker-thinking"},z1={class:"thinking-options"},F1=["onClick"],U1=xe({__name:"ModelPicker",props:{models:{},currentModel:{},currentThinking:{}},emits:["apply-model","apply-thinking","close"],setup(e,{emit:t}){const n=e,s=t,r=["off","low","medium","high"],o={off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"},i=F(""),l=F(null);tn(()=>{var b;(b=l.value)==null||b.focus()});const a=ee(()=>{const b=i.value.trim().toLowerCase();return b?n.models.filter(C=>C.alias.toLowerCase().includes(b)||C.provider.toLowerCase().includes(b)||(C.displayName??"").toLowerCase().includes(b)):n.models}),c=ee(()=>{const b=new Map;for(const C of a.value){const $=b.get(C.provider)??[];$.push(C),b.set(C.provider,$)}return[...b.entries()].map(([C,$])=>({provider:C,models:$}))}),u=ee(()=>n.models.find(b=>b.alias===n.currentModel)),h=ee(()=>{var b;return((b=u.value)==null?void 0:b.thinkingLevels)??r});function g(b){return o[b]??b}function p(b){return b>=1e3?`${Math.round(b/1e3)}k`:String(b)}function d(b){return b.displayName??b.model}function m(b){b!==n.currentModel&&s("apply-model",b),s("close")}function S(b){b!==n.currentThinking&&s("apply-thinking",b)}return(b,C)=>(y(),k("div",E1,[f("div",{class:"picker-backdrop",onClick:C[0]||(C[0]=$=>s("close"))}),f("div",{class:"model-picker",role:"dialog","aria-label":"模型选择",onKeydown:C[2]||(C[2]=Ls($=>s("close"),["esc"]))},[Qe(f("input",{ref_key:"searchRef",ref:l,"onUpdate:modelValue":C[1]||(C[1]=$=>i.value=$),class:"picker-search",type:"text",placeholder:"搜索模型…",id:"model-search-input",name:"model-search",autocomplete:"off",spellcheck:"false"},null,512),[[yt,i.value]]),f("div",I1,[c.value.length===0?(y(),k("div",L1,"无匹配模型")):W("",!0),(y(!0),k(Q,null,Je(c.value,$=>(y(),k("div",{key:$.provider,class:"picker-group"},[f("div",P1,E($.provider),1),(y(!0),k(Q,null,Je($.models,w=>(y(),k("button",{key:w.alias,class:be(["picker-row",{active:w.alias===e.currentModel}]),onClick:M=>m(w.alias)},[f("span",N1,[f("span",O1,E(d(w)),1),f("span",D1,E(w.alias),1)]),f("span",B1,E(p(w.maxContextSize)),1),w.alias===e.currentModel?(y(),k("span",G1,"✓")):W("",!0)],10,M1))),128))]))),128))]),f("div",j1,[C[3]||(C[3]=f("span",{class:"thinking-label"},"思考强度",-1)),f("div",z1,[(y(!0),k(Q,null,Je(h.value,$=>(y(),k("button",{key:$,class:be(["thinking-btn",{active:$===e.currentThinking}]),onClick:w=>S($)},E(g($)),11,F1))),128))])])],32)]))}}),H1=Ce(U1,[["__scopeId","data-v-51b6c399"]]),q1={class:"slash-menu",role:"listbox","aria-label":"斜杠命令"},W1=["aria-selected","onMousedown","onMouseenter"],V1={class:"slash-name"},K1={key:0,class:"slash-aliases"},Z1={class:"slash-desc"},Y1={key:0,class:"slash-badge slash-badge-input"},J1={key:1,class:"slash-badge"},X1=xe({__name:"SlashMenu",props:{commands:{},activeIndex:{}},emits:["select","hover"],setup(e,{emit:t}){const n=t;return(s,r)=>(y(),k("div",q1,[(y(!0),k(Q,null,Je(e.commands,(o,i)=>{var l;return y(),k("button",{key:o.name,class:be(["slash-item",{active:i===e.activeIndex}]),role:"option","aria-selected":i===e.activeIndex,onMousedown:qt(a=>n("select",o),["prevent"]),onMouseenter:a=>n("hover",i)},[f("span",V1,[_e("/"+E(o.name),1),(l=o.aliases)!=null&&l.length?(y(),k("span",K1,E(o.aliases.map(a=>`/${a}`).join(" ")),1)):W("",!0)]),f("span",Z1,E(o.description),1),o.acceptsInput?(y(),k("span",Y1,"输入参数")):W("",!0),o.target==="backend"?(y(),k("span",J1,"服务端")):W("",!0)],42,W1)}),128)),r[0]||(r[0]=f("div",{class:"slash-hint"},"↑↓ 选择 · Enter/Tab 执行 · Esc 关闭",-1))]))}}),Q1=Ce(X1,[["__scopeId","data-v-54d5c512"]]),ek={class:"composer"},tk=["placeholder"],nk={class:"composer-footer"},sk={class:"composer-quick-actions"},rk=["title"],ok={key:1,class:"queue-label",title:"运行结束后自动发送"},ik={class:"composer-actions"},lk=["disabled","title"],ak={key:1,class:"context-label",title:"上下文使用率"},ck=["disabled"],uk=xe({__name:"Composer",props:{busy:{type:Boolean},status:{default:void 0},sessionId:{default:null},models:{default:()=>[]}},emits:["send","abort","command","switch-model","switch-thinking"],setup(e,{expose:t,emit:n}){const s=e,r=n,o=F(""),i=F(null),l=F(0),a=F(!1),c=ee(()=>{const O=o.value;return!O.startsWith("/")||O.includes(`
|
|
87
|
-
`)||/\s/.test(O.slice(1))?null:O.slice(1)}),u=ee(()=>c.value===null?[]:Zh(c.value)),h=ee(()=>c.value!==null&&u.value.length>0&&!a.value);Ne(c,()=>{l.value=0,a.value=!1});function g(O){const te=O??u.value[l.value];if(te){if(te.acceptsInput){o.value=`/${te.name} `,a.value=!0,Gt(()=>{var Te;(Te=i.value)==null||Te.focus(),B()});return}$(`/${te.name}`),ce(),r("command",te.name)}}const p=F([]);Ne(()=>s.sessionId,()=>{p.value=[]}),Ne(()=>s.busy,O=>{if(!O&&p.value.length>0){const[te,...Te]=p.value;p.value=Te,te&&r("send",te)}});const d=F([]),m=F(-1),S=F("");function b(){return`scream-history:${s.sessionId??"default"}`}function C(){try{const O=localStorage.getItem(b());d.value=O?JSON.parse(O):[]}catch{d.value=[]}m.value=-1}function $(O){if(d.value.at(-1)!==O){d.value=[...d.value,O].slice(-50);try{localStorage.setItem(b(),JSON.stringify(d.value))}catch{}}m.value=-1,S.value=""}function w(O,te){const Te=i.value;if(!Te)return;const v=Te.value.slice(0,Te.selectionStart??0),x=Te.value.slice(Te.selectionEnd??0);if(!(O===-1&&v.includes(`
|
|
88
|
-
`))&&!(O===1&&x.includes(`
|
|
89
|
-
`))){if(O===-1){if(d.value.length===0)return;te.preventDefault(),m.value===-1?(S.value=o.value,m.value=d.value.length-1):m.value>0&&m.value--,o.value=d.value[m.value]??""}else{if(m.value===-1)return;te.preventDefault(),m.value<d.value.length-1?(m.value++,o.value=d.value[m.value]??""):(m.value=-1,o.value=S.value)}Gt(()=>{Te.selectionStart=Te.selectionEnd=Te.value.length})}}function M(){return`scream-draft:${s.sessionId??"default"}`}let K;Ne(o,()=>{B(),clearTimeout(K),K=setTimeout(()=>{try{o.value?localStorage.setItem(M(),o.value):localStorage.removeItem(M())}catch{}},300)}),Ne(()=>s.sessionId,()=>{clearTimeout(K),C();let O="";try{O=localStorage.getItem(M())??""}catch{O=""}o.value=O,Gt(B)},{immediate:!0});function B(){const O=i.value;if(!O)return;O.style.height="auto";const te=Math.round(window.innerHeight*.25);O.style.height=`${Math.min(Math.max(O.scrollHeight,36),te)}px`}function ce(){o.value="",Gt(()=>{i.value&&(i.value.style.height="auto")})}function q(){const O=o.value.trim();if(O){if(O.startsWith("/")){const te=O.indexOf(" "),Te=(te===-1?O.slice(1):O.slice(1,te)).toLowerCase(),v=Yh(Te),x=te===-1?"":O.slice(te+1).trim();$(O),r("command",v,x),ce();return}if(s.busy){re();return}$(O),r("send",O),ce()}}function re(){const O=o.value.trim();O&&(p.value=[...p.value,O],ce())}function pe(O){if(h.value){if(O.key==="ArrowUp"){O.preventDefault(),l.value=(l.value-1+u.value.length)%u.value.length;return}if(O.key==="ArrowDown"){O.preventDefault(),l.value=(l.value+1)%u.value.length;return}if(O.key==="Tab"||O.key==="Enter"&&!O.shiftKey){if(O.key==="Enter"&&O.isComposing)return;O.preventDefault(),g();return}if(O.key==="Escape"){O.preventDefault(),a.value=!0;return}}if((O.ctrlKey||O.metaKey)&&O.key.toLowerCase()==="s"){O.preventDefault(),re();return}if(O.key==="Enter"&&!O.shiftKey){if(O.isComposing)return;O.preventDefault(),q();return}O.key==="ArrowUp"?w(-1,O):O.key==="ArrowDown"&&w(1,O)}function j(){p.value=[],r("abort")}function ge(O){o.value=O,Gt(()=>{var te;B(),(te=i.value)==null||te.focus()})}function N(O){o.value+=O,Gt(()=>{var te;B(),(te=i.value)==null||te.focus()})}t({insertText:ge,openModelPicker:He});const R=ee(()=>{var O;return(O=s.status)==null?void 0:O.model}),Y=ee(()=>{var O;return(O=s.status)==null?void 0:O.permission}),ae=ee(()=>{var O;return(O=s.status)==null?void 0:O.contextUsage}),oe=F(!1),Ze={off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"},Ke=ee(()=>{var O;return(O=s.status)==null?void 0:O.thinkingLevel}),Fe=ee(()=>{const O=Ke.value;return!O||O==="none"?"":Ze[O]??O}),Ue=ee(()=>s.models.length>0);function He(){return Ue.value?(oe.value=!0,!0):!1}function Dt(){Ue.value&&(oe.value=!oe.value)}function Bt(O){r("switch-model",O)}function nt(O){r("switch-thinking",O)}const Tt=ee(()=>{switch(Y.value){case"auto":return"perm-auto";case"yolo":return"perm-yolo";default:return"perm-manual"}}),Rt=ee(()=>{switch(Y.value){case"auto":return"自动";case"yolo":return"YOLO";default:return"手动"}});return(O,te)=>(y(),k("div",ek,[H($i,{name:"picker"},{default:at(()=>[oe.value?(y(),Ve(H1,{key:0,models:e.models,"current-model":R.value,"current-thinking":Ke.value,onApplyModel:Bt,onApplyThinking:nt,onClose:te[0]||(te[0]=Te=>oe.value=!1)},null,8,["models","current-model","current-thinking"])):W("",!0)]),_:1}),h.value?(y(),Ve(Q1,{key:0,commands:u.value,"active-index":l.value,onSelect:g,onHover:te[1]||(te[1]=Te=>l.value=Te)},null,8,["commands","active-index"])):W("",!0),Qe(f("textarea",{ref_key:"textareaRef",ref:i,"onUpdate:modelValue":te[2]||(te[2]=Te=>o.value=Te),id:"composer-input",name:"message",class:"composer-input",rows:"1",placeholder:e.busy?"回合进行中:Enter/Ctrl+S 排队消息,随下一轮注入":"输入消息,@ 提及,/ 触发指令",onKeydown:pe},null,40,tk),[[yt,o.value]]),f("div",nk,[f("div",sk,[f("button",{class:"quick-action",title:"插入 @ 提及",onClick:te[3]||(te[3]=Te=>N("@"))},[H(fe,{name:"at",size:18}),te[5]||(te[5]=f("span",null,"提及",-1))]),f("button",{class:"quick-action",title:"插入 / 触发指令",onClick:te[4]||(te[4]=Te=>N("/"))},[H(fe,{name:"command",size:18}),te[6]||(te[6]=f("span",null,"指令",-1))]),Y.value?(y(),k("span",{key:0,class:be(["permission-label",Tt.value]),title:`权限模式:${Y.value}`},E(Rt.value),11,rk)):W("",!0),p.value.length?(y(),k("span",ok,"已排队 "+E(p.value.length)+" 条",1)):W("",!0)]),f("div",ik,[R.value?(y(),k("button",{key:0,class:be(["model-select",{clickable:Ue.value}]),disabled:!Ue.value,title:`当前模型:${R.value}`,onClick:Dt},[H(fe,{name:"brain",size:17}),f("span",null,E(R.value),1),Fe.value?(y(),k(Q,{key:0},[_e(" · "+E(Fe.value),1)],64)):W("",!0),Ue.value?(y(),Ve(fe,{key:1,name:"chevron-down",size:14})):W("",!0)],10,lk)):W("",!0),ae.value!==void 0?(y(),k("span",ak,[H(Bu,{usage:ae.value,size:17},null,8,["usage"])])):W("",!0),e.busy?(y(),k("button",{key:2,class:"stop-btn",title:"停止当前回合",onClick:j},[H(fe,{name:"stop",size:17}),te[7]||(te[7]=f("span",null,"停止",-1))])):(y(),k("button",{key:3,class:"send-btn",disabled:!o.value.trim(),title:"发送 (Enter)","aria-label":"发送",onClick:q},[H(fe,{name:"send",size:19})],8,ck))])])]))}}),fk=Ce(uk,[["__scopeId","data-v-b2a28cd1"]]),dk=["type","disabled"],hk=xe({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(y(),k("button",{class:be(["ui-btn",[`ui-btn--${e.variant}`,`ui-btn--${e.size}`]]),type:e.type,disabled:e.disabled},[lr(t.$slots,"default",{},void 0)],10,dk))}}),Vn=Ce(hk,[["__scopeId","data-v-e28e57b8"]]),pk={key:0,class:"approval-card"},gk={class:"approval-header"},mk={class:"approval-title"},vk={class:"tool-name"},yk={class:"action-summary"},bk={key:0,class:"approval-count"},kk={class:"approval-action"},wk={key:0,class:"feedback-area"},Sk={class:"approval-buttons"},_k={key:0,class:"busy-indicator","aria-label":"处理中"},xk=xe({__name:"ApprovalCard",props:{approvals:{}},emits:["resolve"],setup(e,{emit:t}){const n=e,s=t,r=F(!1),o=F(!1),i=F(""),l=F(new Set),a=ee(()=>n.approvals[0]);Ne(()=>n.approvals.map(d=>d.id).join(","),()=>{o.value=!1,i.value="";const d=new Set(n.approvals.map(m=>m.id));l.value=new Set([...l.value].filter(m=>d.has(m)))});function c(d){return typeof d.display=="string"?d.display:d.display&&typeof d.display=="object"&&"description"in d.display?String(d.display.description??""):d.action??"执行该操作"}function u(d){return l.value.has(d)}function h(d,m,S){const b=a.value;!b||u(b.id)||(l.value=new Set([...l.value,b.id]),s("resolve",b.id,d,m,S))}function g(){const d=i.value.trim();d&&h("rejected",d)}function p(d){if(!a.value||r.value)return;const S=d.target;if(S&&(S.tagName==="TEXTAREA"||S.tagName==="INPUT")){o.value&&d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),g());return}switch(d.key){case"1":d.preventDefault(),h("approved",void 0,"once");break;case"2":d.preventDefault(),h("approved",void 0,"session");break;case"3":d.preventDefault(),h("rejected");break;case"4":d.preventDefault(),o.value=!o.value;break}}return tn(()=>window.addEventListener("keydown",p)),nn(()=>window.removeEventListener("keydown",p)),(d,m)=>e.approvals.length?(y(),k("div",pk,[r.value?(y(),k("button",{key:0,class:"approval-minibar",onClick:m[0]||(m[0]=S=>r.value=!1)}," ⚠ "+E(e.approvals.length)+" 个待审批请求 — 点击展开 ",1)):a.value?(y(),k(Q,{key:1},[f("div",gk,[m[7]||(m[7]=f("span",{class:"approval-icon"},"⚠",-1)),f("span",mk,[f("span",vk,E(a.value.toolName),1),f("span",yk,E(c(a.value)),1)]),e.approvals.length>1?(y(),k("span",bk,"+"+E(e.approvals.length-1),1)):W("",!0),f("button",{class:"icon-btn",title:"最小化","aria-label":"最小化",onClick:m[1]||(m[1]=S=>r.value=!0)},"—")]),f("pre",kk,E(c(a.value)),1),o.value?(y(),k("div",wk,[Qe(f("textarea",{"onUpdate:modelValue":m[2]||(m[2]=S=>i.value=S),class:"feedback-input",rows:"2",name:"approval-feedback","aria-label":"拒绝反馈",placeholder:"输入反馈,Enter 提交(将作为拒绝原因反馈给 Agent)"},null,512),[[yt,i.value]])])):W("",!0),f("div",Sk,[H(Vn,{variant:"primary",disabled:u(a.value.id),onClick:m[3]||(m[3]=S=>h("approved",void 0,"once"))},{default:at(()=>[...m[8]||(m[8]=[f("kbd",null,"1",-1),_e(" 批准 ",-1)])]),_:1},8,["disabled"]),H(Vn,{variant:"secondary",disabled:u(a.value.id),onClick:m[4]||(m[4]=S=>h("approved",void 0,"session"))},{default:at(()=>[...m[9]||(m[9]=[f("kbd",null,"2",-1),_e(" 会话批准 ",-1)])]),_:1},8,["disabled"]),H(Vn,{variant:"danger",disabled:u(a.value.id),onClick:m[5]||(m[5]=S=>h("rejected"))},{default:at(()=>[...m[10]||(m[10]=[f("kbd",null,"3",-1),_e(" 拒绝 ",-1)])]),_:1},8,["disabled"]),H(Vn,{variant:"secondary",class:be({"feedback-active":o.value}),disabled:u(a.value.id),onClick:m[6]||(m[6]=S=>o.value=!o.value)},{default:at(()=>[...m[11]||(m[11]=[f("kbd",null,"4",-1),_e(" 反馈 ",-1)])]),_:1},8,["class","disabled"]),u(a.value.id)?(y(),k("span",_k,[...m[12]||(m[12]=[f("span",{class:"spinner"},null,-1),_e(" 处理中… ",-1)])])):W("",!0)])],64)):W("",!0)])):W("",!0)}}),Ck=Ce(xk,[["__scopeId","data-v-6023ed00"]]),$k={key:0,class:"ui-dialog-header"},Tk={class:"ui-dialog-title"},Rk={class:"ui-dialog-body"},Ak={key:1,class:"ui-dialog-footer"},Ek=xe({__name:"Dialog",props:{open:{type:Boolean},title:{default:void 0},closable:{type:Boolean,default:!0},maxWidth:{default:void 0}},emits:["close"],setup(e,{emit:t}){const n=e,s=t;function r(o){o.key==="Escape"&&n.open&&n.closable!==!1&&(o.stopPropagation(),s("close"))}return tn(()=>window.addEventListener("keydown",r,!0)),nn(()=>window.removeEventListener("keydown",r,!0)),(o,i)=>(y(),Ve(ki,{to:"body"},[H($i,{name:"dialog"},{default:at(()=>[e.open?(y(),k("div",{key:0,class:"ui-dialog-overlay",onClick:i[1]||(i[1]=qt(l=>e.closable!==!1&&s("close"),["self"]))},[f("div",{class:"ui-dialog",style:gn(e.maxWidth?{maxWidth:e.maxWidth}:void 0),role:"dialog","aria-modal":"true"},[e.title||o.$slots.header?(y(),k("div",$k,[lr(o.$slots,"header",{},()=>[f("span",Tk,E(e.title),1)],!0),e.closable!==!1?(y(),k("button",{key:0,class:"ui-dialog-close","aria-label":"关闭",onClick:i[0]||(i[0]=l=>s("close"))},"✕")):W("",!0)])):W("",!0),f("div",Rk,[lr(o.$slots,"default",{},void 0,!0)]),o.$slots.footer?(y(),k("div",Ak,[lr(o.$slots,"footer",{},void 0,!0)])):W("",!0)],4)])):W("",!0)]),_:3})]))}}),Yi=Ce(Ek,[["__scopeId","data-v-4562f775"]]),Ik={class:"brand-head"},Lk=["title","aria-label"],Pk={class:"primary-actions"},Mk={class:"search-row"},Nk={class:"list-heading"},Ok={class:"session-list"},Dk={class:"group-label"},Bk=["title","onClick"],Gk={class:"session-icon"},jk={class:"session-info"},zk={class:"session-title-row"},Fk={class:"session-meta"},Uk={key:0,class:"live"},Hk=["onClick"],qk=["onClick"],Wk={key:0,class:"empty"},Vk={class:"agent-card"},Kk={class:"agent-card-head"},Zk={class:"agent-avatar"},Yk={key:0},Jk=["title"],Xk={key:1},Qk=["title"],e0={key:0,class:"usage-track"},t0={class:"sidebar-footer","aria-label":"辅助导航"},n0=xe({__name:"SessionSidebar",props:{sessions:{},currentSessionId:{},status:{default:void 0},busy:{type:Boolean,default:!1},collapsed:{type:Boolean,default:!1},mobileOpen:{type:Boolean,default:!1}},emits:["create","switch","delete","export","toggle","open-search","show-info","help"],setup(e,{emit:t}){const n=e,s=t,r=F(null),o=ee(()=>{const p=new Date,d=new Date(p.getFullYear(),p.getMonth(),p.getDate()).getTime(),m=d-864e5,S=new Map;for(const b of n.sessions){const C=new Date(b.createdAt),$=b.createdAt>=d?"今天":b.createdAt>=m?"昨天":`${String(C.getMonth()+1).padStart(2,"0")}-${String(C.getDate()).padStart(2,"0")}`;S.set($,[...S.get($)??[],b])}return[...S].map(([b,C])=>({label:b,items:C}))});function i(p){const d=new Date(p);return d.toDateString()===new Date().toDateString()?d.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):d.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}const l=ee(()=>{var d;const p=(d=n.status)==null?void 0:d.contextUsage;return p===void 0?null:Math.round((p>1?p/100:p)*100)});function a(p){return p?p.inputOther+p.output+p.inputCacheRead+p.inputCacheCreation:0}const c=ee(()=>{var p,d;return a((d=(p=n.status)==null?void 0:p.usage)==null?void 0:d.total)});function u(p){return p>=1e6?`${(p/1e6).toFixed(1)}M`:p>=1e3?`${(p/1e3).toFixed(1)}k`:String(p)}const h=ee(()=>{var p;return((p=n.status)==null?void 0:p.contextTokens)!==void 0&&n.status.maxContextTokens!==void 0?`${u(n.status.contextTokens)} / ${u(n.status.maxContextTokens)}`:""});function g(){r.value&&(s("delete",r.value),r.value=null)}return(p,d)=>{var m;return y(),k("aside",{class:be(["sidebar",{collapsed:e.collapsed,"mobile-open":e.mobileOpen}])},[f("div",Ik,[d[12]||(d[12]=f("div",{class:"brand-symbol"},[f("img",{src:Ai,alt:""})],-1)),d[13]||(d[13]=f("div",{class:"brand-copy"},[f("strong",null,"Scream Code"),f("span",null,"智能开发工作台")],-1)),f("button",{class:"collapse-btn",title:e.collapsed?"展开侧栏":"收起侧栏","aria-label":e.collapsed?"展开侧栏":"收起侧栏",onClick:d[0]||(d[0]=S=>s("toggle"))},[H(fe,{name:e.collapsed?"panel-right":"panel-left",size:e.collapsed?18:16},null,8,["name","size"])],8,Lk)]),f("div",Pk,[f("button",{class:"new-session",title:"新建会话",onClick:d[1]||(d[1]=S=>s("create"))},[H(fe,{name:"plus",size:21}),d[14]||(d[14]=f("span",null,"新建会话",-1))]),f("button",{class:"square-action",title:"搜索会话","aria-label":"搜索会话",onClick:d[2]||(d[2]=S=>s("open-search"))},[H(fe,{name:"search"})])]),f("div",Mk,[f("button",{class:"search-box",title:"搜索会话 (⌘K)",onClick:d[3]||(d[3]=S=>s("open-search"))},[H(fe,{name:"search",size:18}),d[15]||(d[15]=f("span",null,"搜索会话",-1)),d[16]||(d[16]=f("kbd",null,"⌘K",-1))]),f("button",{class:"filter-btn",title:"筛选和搜索会话","aria-label":"筛选和搜索会话",onClick:d[4]||(d[4]=S=>s("open-search"))},[H(fe,{name:"filter",size:18})])]),f("div",Nk,[d[17]||(d[17]=f("span",null,"最近会话",-1)),f("span",null,E(e.sessions.length),1)]),f("div",Ok,[(y(!0),k(Q,null,Je(o.value,S=>(y(),k(Q,{key:S.label},[f("div",Dk,E(S.label),1),(y(!0),k(Q,null,Je(S.items,b=>(y(),k("article",{key:b.sessionId,class:be(["session-item",{active:b.sessionId===e.currentSessionId}]),title:b.title||"新会话",onClick:C=>s("switch",b.sessionId)},[f("span",Gk,[H(fe,{name:"message-circle",size:18})]),f("div",jk,[f("div",zk,[f("strong",null,E(b.title||"新会话"),1),f("time",null,E(i(b.createdAt)),1)]),f("div",Fk,[f("span",null,E(b.messageCount)+" 条消息",1),b.active?(y(),k("span",Uk,[...d[18]||(d[18]=[f("i",null,null,-1),_e("活跃",-1)])])):W("",!0)])]),f("div",{class:"session-actions",onClick:d[5]||(d[5]=qt(()=>{},["stop"]))},[f("button",{title:"导出 Markdown","aria-label":"导出 Markdown",onClick:C=>s("export",b.sessionId)},[H(fe,{name:"download",size:16})],8,Hk),f("button",{class:"danger",title:"删除会话","aria-label":"删除会话",onClick:C=>r.value=b.sessionId},[H(fe,{name:"trash",size:16})],8,qk)])],10,Bk))),128))],64))),128)),e.sessions.length===0?(y(),k("div",Wk,[H(fe,{name:"message-circle",size:28}),d[19]||(d[19]=f("strong",null,"暂无会话",-1)),d[20]||(d[20]=f("span",null,"新建会话后将在这里显示",-1))])):W("",!0),e.sessions.length?(y(),k("button",{key:1,class:"view-all",onClick:d[6]||(d[6]=S=>s("open-search"))},[d[21]||(d[21]=_e("查看全部会话 ",-1)),H(fe,{name:"chevron-right",size:16})])):W("",!0)]),f("section",Vk,[f("div",Kk,[f("span",Zk,[H(fe,{name:"bot",size:20})]),f("div",null,[d[22]||(d[22]=f("strong",null,"Scream Agent",-1)),f("span",null,[f("i",{class:be({busy:e.busy})},null,2),_e(E(e.busy?"正在运行":"当前空闲"),1)])])]),f("dl",null,[(m=e.status)!=null&&m.model?(y(),k("div",Yk,[d[23]||(d[23]=f("dt",null,"当前模型",-1)),f("dd",{title:e.status.model},E(e.status.model),9,Jk)])):W("",!0),l.value!==null?(y(),k("div",Xk,[d[24]||(d[24]=f("dt",null,"上下文",-1)),f("dd",{title:h.value||void 0},E(l.value)+"%",9,Qk)])):W("",!0),f("div",null,[d[25]||(d[25]=f("dt",null,"Token 消耗",-1)),f("dd",null,E(c.value?u(c.value):"-"),1)])]),l.value!==null?(y(),k("div",e0,[f("i",{style:gn({width:`${l.value}%`})},null,4)])):W("",!0),f("button",{onClick:d[7]||(d[7]=S=>s("show-info","status"))},[H(fe,{name:"activity",size:17}),d[26]||(d[26]=_e("查看详细状态",-1))])]),f("nav",t0,[f("button",{onClick:d[8]||(d[8]=S=>s("show-info","usage"))},[H(fe,{name:"activity",size:19}),d[27]||(d[27]=f("span",null,"用量",-1))]),f("button",{onClick:d[9]||(d[9]=S=>s("help"))},[H(fe,{name:"help",size:19}),d[28]||(d[28]=f("span",null,"帮助",-1))])]),H(Yi,{open:r.value!==null,title:"删除会话",onClose:d[11]||(d[11]=S=>r.value=null)},{footer:at(()=>[H(Vn,{variant:"ghost",size:"sm",onClick:d[10]||(d[10]=S=>r.value=null)},{default:at(()=>[...d[29]||(d[29]=[_e("取消",-1)])]),_:1}),H(Vn,{variant:"danger",size:"sm",onClick:g},{default:at(()=>[...d[30]||(d[30]=[_e("删除",-1)])]),_:1})]),default:at(()=>[d[31]||(d[31]=f("p",{class:"dialog-copy"},"确定删除这个会话吗?此操作不可恢复。",-1))]),_:1},8,["open"])],2)}}}),s0=Ce(n0,[["__scopeId","data-v-e48d515f"]]),r0={class:"panel-section git-panel"},o0={class:"panel-head-row"},i0=["aria-expanded"],l0={class:"head-icon"},a0={key:0,class:"head-count"},c0={class:"panel-body"},u0={class:"status-row"},f0={class:"row-value"},d0={key:0,class:"status-row"},h0={class:"row-value"},p0={key:1,class:"diff-block"},g0={key:0,class:"diff-body"},m0={key:1,class:"diff-empty"},v0={key:2,class:"diff-empty"},y0={key:1,class:"diff-empty"},ya="scream-panel-git-open",b0=xe({__name:"GitPanel",props:{gitStatus:{default:null}},emits:["refresh"],setup(e,{emit:t}){const n=t,s=F(!0);try{s.value=localStorage.getItem(ya)!=="0"}catch{}function r(){s.value=!s.value;try{localStorage.setItem(ya,s.value?"1":"0")}catch{}}function o(){n("refresh")}return(i,l)=>(y(),k("section",r0,[f("div",o0,[f("button",{class:"panel-head","aria-expanded":s.value,onClick:r},[f("span",l0,[H(fe,{name:"git-branch",size:16})]),l[0]||(l[0]=f("span",{class:"head-title"},"Git 变更",-1)),e.gitStatus?(y(),k("span",a0,E(e.gitStatus.changed),1)):W("",!0),H(fe,{class:be(["chevron",{rotated:s.value}]),name:"chevron-down",size:16},null,8,["class"])],8,i0),f("button",{class:"icon-btn",title:"刷新","aria-label":"刷新 Git 状态",onClick:o},[H(fe,{name:"refresh",size:14})])]),Qe(f("div",c0,[e.gitStatus?(y(),k(Q,{key:0},[f("div",u0,[l[1]||(l[1]=f("span",{class:"row-label"},"分支",-1)),f("span",f0,E(e.gitStatus.branch??"detached"),1)]),e.gitStatus.ahead||e.gitStatus.behind?(y(),k("div",d0,[l[2]||(l[2]=f("span",{class:"row-label"},"同步",-1)),f("span",h0,[e.gitStatus.ahead?(y(),k(Q,{key:0},[_e("↑"+E(e.gitStatus.ahead),1)],64)):W("",!0),e.gitStatus.ahead&&e.gitStatus.behind?(y(),k(Q,{key:1},[_e(" · ")],64)):W("",!0),e.gitStatus.behind?(y(),k(Q,{key:2},[_e("↓"+E(e.gitStatus.behind),1)],64)):W("",!0)])])):W("",!0),e.gitStatus.changed?(y(),k("div",p0,[e.gitStatus.diffStat?(y(),k("pre",g0,E(e.gitStatus.diffStat),1)):(y(),k("div",m0,E(e.gitStatus.changed)+" 项变更",1))])):(y(),k("div",v0,"工作区干净,没有变更。"))],64)):(y(),k("div",y0,"Git 状态不可用。"))],512),[[Dc,s.value]])]))}}),k0=Ce(b0,[["__scopeId","data-v-94bdfce9"]]),w0={class:"goal-panel panel-section"},S0={class:"section-heading"},_0={key:0,class:"empty-state"},x0=["disabled"],C0={class:"refine-row"},$0=["disabled"],T0={key:0},R0=["disabled"],A0={class:"budget-grid"},E0=["disabled"],I0=["disabled"],L0={class:"time-budget"},P0=["disabled"],M0=["disabled"],N0=["disabled"],O0={key:0,class:"goal-summary"},D0={class:"objective"},B0={class:"criterion"},G0={key:0,class:"reason"},j0={class:"metrics"},z0={class:"metric"},F0={key:0},U0={class:"metric"},H0={key:0},q0={class:"metric"},W0={key:0},V0={key:1,class:"budget-warning"},K0={key:2,class:"notes"},Z0={class:"actions"},Y0=["disabled"],J0=["disabled"],X0=["disabled"],Q0=["disabled"],ew=["disabled"],tw={class:"budget-grid"},nw=["disabled"],sw=["disabled"],rw={class:"time-budget"},ow=["disabled"],iw=["disabled"],lw={class:"edit-actions"},aw=["disabled"],cw=["disabled"],uw={key:3,class:"form-error"},fw={key:4,class:"pending-copy"},dw=xe({__name:"GoalPanel",props:{goal:{},sessionId:{default:null},connectionStatus:{},busy:{type:Boolean,default:!1},archived:{type:Boolean,default:!1},pending:{type:Boolean,default:!1},error:{default:null},refineGoal:{},createGoal:{},updateGoal:{},pauseGoal:{},resumeGoal:{},cancelGoal:{}},setup(e){const t=e,n=F(""),s=F(""),r=F(""),o=F(""),i=F(""),l=F("minutes"),a=F(!1),c=F(null),u=F(!1),h=ee(()=>t.connectionStatus==="connected"),g=ee(()=>!t.sessionId||!h.value||t.archived||t.pending),p=ee(()=>g.value),d=ee(()=>{var N;return{active:"进行中",paused:"已暂停",blocked:"受阻",complete:"已完成"}[((N=t.goal)==null?void 0:N.status)??"active"]}),m=ee(()=>t.sessionId?t.archived?"归档会话为只读状态":h.value?t.pending?"正在提交请求…":t.goal?"状态由核心事件实时同步":"创建后 Agent 将自动开始执行":"连接恢复后可继续管理":"选择或新建会话后即可配置");Ne(()=>t.sessionId,()=>{a.value=!1,S()}),Ne(()=>{var N;return(N=t.goal)==null?void 0:N.goalId},(N,R)=>{a.value=!1,N!==R&&S()});function S(){n.value="",s.value="",r.value="",o.value="",i.value="",l.value="minutes",u.value=!1,c.value=null}function b(N,R){const Y=N.trim();if(!Y)return null;const ae=Number(Y);if(!Number.isSafeInteger(ae)||ae<=0){c.value=`${R}必须是正整数。`;return}return ae}function C(){c.value=null;const N=b(r.value,"轮次预算");if(N===void 0)return null;const R=b(o.value,"Token 预算");if(R===void 0)return null;const Y=b(i.value,"时间预算");if(Y===void 0)return null;const ae=[];return N!==null&&ae.push({value:N,unit:"turns"}),R!==null&&ae.push({value:R,unit:"tokens"}),Y!==null&&ae.push({value:Y,unit:l.value}),ae}async function $(){const N=n.value.trim();if(!N){c.value="请先输入需要优化的目标描述。";return}c.value=null,u.value=!1;const R=await t.refineGoal(N);R!==null&&(n.value=R,u.value=!0)}async function w(){const N=n.value.trim();if(!N){c.value="目标内容不能为空。";return}const R=C();if(R===null)return;await t.createGoal({objective:N,completionCriterion:s.value.trim()||void 0,replace:!1,budgets:R})&&(u.value=!1)}function M(N){N===null?(i.value="",l.value="minutes"):N%36e5===0?(i.value=String(N/36e5),l.value="hours"):N%6e4===0?(i.value=String(N/6e4),l.value="minutes"):N%1e3===0?(i.value=String(N/1e3),l.value="seconds"):(i.value=String(N),l.value="milliseconds")}function K(){const N=t.goal;N&&(n.value=N.objective,r.value=N.budget.turnBudget===null?"":String(N.budget.turnBudget),o.value=N.budget.tokenBudget===null?"":String(N.budget.tokenBudget),M(N.budget.wallClockBudgetMs),c.value=null,a.value=!0)}function B(N,R){return R==="hours"?N*36e5:R==="minutes"?N*6e4:R==="seconds"?N*1e3:N}async function ce(){const N=t.goal;if(!N)return;const R=n.value.trim();if(!R){c.value="目标内容不能为空。";return}const Y=C();if(Y===null)return;const ae=b(r.value,"轮次预算"),oe=b(o.value,"Token 预算"),Ze=b(i.value,"时间预算");if(ae===void 0||oe===void 0||Ze===void 0)return;if(N.budget.turnBudget!==null&&ae===null){c.value="当前协议不支持清除已有轮次预算,请填写新的正整数。";return}if(N.budget.tokenBudget!==null&&oe===null){c.value="当前协议不支持清除已有 Token 预算,请填写新的正整数。";return}if(N.budget.wallClockBudgetMs!==null&&Ze===null){c.value="当前协议不支持清除已有时间预算,请填写新的正整数。";return}const Ke=Y.filter(He=>He.unit==="turns"?He.value!==N.budget.turnBudget:He.unit==="tokens"?He.value!==N.budget.tokenBudget:B(He.value,He.unit)!==N.budget.wallClockBudgetMs),Fe=R===N.objective?void 0:R;if(Fe===void 0&&Ke.length===0){c.value="目标与预算没有变化。";return}await t.updateGoal({objective:Fe,budgets:Ke})&&(a.value=!1)}async function q(N){c.value=null,!(N==="cancel"&&!window.confirm("确定取消当前 Goal?当前 Goal 状态将被清除。"))&&(N==="pause"?await t.pauseGoal():N==="resume"?await t.resumeGoal():await t.cancelGoal())}function re(N){return N.toLocaleString("zh-CN")}function pe(N){if(N<1e3)return`${N} 毫秒`;const R=Math.floor(N/1e3);if(R<60)return`${R} 秒`;const Y=Math.floor(R/3600),ae=Math.floor(R%3600/60);return Y>0?`${Y} 小时 ${ae} 分钟`:`${ae} 分钟`}function j(N,R){return R===null||R<=0?0:Math.min(100,Math.round(N/R*100))}function ge(N){return new Date(N).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}return(N,R)=>(y(),k("section",w0,[f("div",S0,[f("div",null,[R[15]||(R[15]=f("span",null,"Goal 管理",-1)),f("small",null,E(m.value),1)]),e.goal?(y(),k("span",{key:0,class:be(["status-pill",`is-${e.goal.status}`])},E(d.value),3)):(y(),Ve(fe,{key:1,name:"activity",size:19}))]),e.sessionId?e.goal?(y(),k(Q,{key:2},[a.value?(y(),k("form",{key:1,class:"goal-form edit-form",onSubmit:qt(ce,["prevent"])},[f("label",null,[R[31]||(R[31]=f("span",null,"目标内容",-1)),Qe(f("textarea",{"onUpdate:modelValue":R[9]||(R[9]=Y=>n.value=Y),rows:"3",maxlength:"4000",disabled:g.value||e.busy},null,8,ew),[[yt,n.value]])]),R[36]||(R[36]=f("div",{class:"budget-title"},[_e("更新预算 "),f("small",null,"仅提交发生变化的预算")],-1)),f("div",tw,[f("label",null,[R[32]||(R[32]=f("span",null,"轮次",-1)),Qe(f("input",{"onUpdate:modelValue":R[10]||(R[10]=Y=>r.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value||e.busy},null,8,nw),[[yt,r.value]])]),f("label",null,[R[33]||(R[33]=f("span",null,"Token",-1)),Qe(f("input",{"onUpdate:modelValue":R[11]||(R[11]=Y=>o.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value||e.busy},null,8,sw),[[yt,o.value]])])]),f("div",rw,[f("label",null,[R[34]||(R[34]=f("span",null,"时间",-1)),Qe(f("input",{"onUpdate:modelValue":R[12]||(R[12]=Y=>i.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value||e.busy},null,8,ow),[[yt,i.value]])]),Qe(f("select",{"onUpdate:modelValue":R[13]||(R[13]=Y=>l.value=Y),"aria-label":"时间预算单位",disabled:g.value||e.busy},[...R[35]||(R[35]=[f("option",{value:"minutes"},"分钟",-1),f("option",{value:"hours"},"小时",-1),f("option",{value:"seconds"},"秒",-1),f("option",{value:"milliseconds"},"毫秒",-1)])],8,iw),[[jl,l.value]])]),f("div",lw,[f("button",{type:"button",class:"secondary",disabled:e.pending,onClick:R[14]||(R[14]=Y=>a.value=!1)},"返回",8,aw),f("button",{class:"primary small",type:"submit",disabled:g.value||e.busy},"保存修改",8,cw)])],32)):(y(),k("div",O0,[f("div",D0,[R[24]||(R[24]=f("small",null,"目标",-1)),f("p",null,E(e.goal.objective),1)]),f("div",B0,[R[25]||(R[25]=f("small",null,"完成标准",-1)),f("p",null,E(e.goal.completionCriterion??"未设置,由 Agent 根据目标判断完成。"),1)]),e.goal.terminalReason?(y(),k("div",G0,[R[26]||(R[26]=f("strong",null,"状态原因",-1)),f("span",null,E(e.goal.terminalReason),1)])):W("",!0),f("div",j0,[f("div",z0,[f("div",null,[R[27]||(R[27]=f("span",null,"轮次",-1)),f("strong",null,E(e.goal.turnsUsed)+" / "+E(e.goal.budget.turnBudget??"不限"),1)]),e.goal.budget.turnBudget!==null?(y(),k("i",F0,[f("b",{style:gn({width:`${j(e.goal.turnsUsed,e.goal.budget.turnBudget)}%`})},null,4)])):W("",!0)]),f("div",U0,[f("div",null,[R[28]||(R[28]=f("span",null,"Token",-1)),f("strong",null,E(re(e.goal.tokensUsed))+" / "+E(e.goal.budget.tokenBudget===null?"不限":re(e.goal.budget.tokenBudget)),1)]),e.goal.budget.tokenBudget!==null?(y(),k("i",H0,[f("b",{style:gn({width:`${j(e.goal.tokensUsed,e.goal.budget.tokenBudget)}%`})},null,4)])):W("",!0)]),f("div",q0,[f("div",null,[R[29]||(R[29]=f("span",null,"时间",-1)),f("strong",null,E(pe(e.goal.wallClockMs))+" / "+E(e.goal.budget.wallClockBudgetMs===null?"不限":pe(e.goal.budget.wallClockBudgetMs)),1)]),e.goal.budget.wallClockBudgetMs!==null?(y(),k("i",W0,[f("b",{style:gn({width:`${j(e.goal.wallClockMs,e.goal.budget.wallClockBudgetMs)}%`})},null,4)])):W("",!0)])]),e.goal.budget.overBudget?(y(),k("div",V0,"已达到或超过执行预算。")):W("",!0),e.goal.notes.length?(y(),k("details",K0,[f("summary",null,"工作记录("+E(e.goal.notes.length)+")",1),f("ol",null,[(y(!0),k(Q,null,Je(e.goal.notes,Y=>(y(),k("li",{key:`${Y.time}-${Y.content}`},[f("time",null,E(ge(Y.time)),1),f("span",null,E(Y.content),1)]))),128))])])):W("",!0),f("div",Z0,[e.goal.status!=="complete"?(y(),k("button",{key:0,class:"secondary",disabled:g.value||e.busy,onClick:K},[H(fe,{name:"edit",size:15}),R[30]||(R[30]=_e("编辑",-1))],8,Y0)):W("",!0),e.goal.status==="active"?(y(),k("button",{key:1,class:"secondary",disabled:g.value,onClick:R[6]||(R[6]=Y=>q("pause"))},"暂停",8,J0)):W("",!0),e.goal.status==="paused"||e.goal.status==="blocked"?(y(),k("button",{key:2,class:"primary small",disabled:g.value||e.busy,onClick:R[7]||(R[7]=Y=>q("resume"))},"继续",8,X0)):W("",!0),f("button",{class:"danger",disabled:g.value,onClick:R[8]||(R[8]=Y=>q("cancel"))},"取消 Goal",8,Q0)])]))],64)):(y(),k("form",{key:1,class:"goal-form",onSubmit:qt(w,["prevent"])},[f("label",null,[R[16]||(R[16]=f("span",null,"目标内容",-1)),Qe(f("textarea",{"onUpdate:modelValue":R[0]||(R[0]=Y=>n.value=Y),rows:"3",maxlength:"4000",placeholder:"描述希望 Agent 持续完成的目标",disabled:p.value},null,8,x0),[[yt,n.value]])]),f("div",C0,[f("button",{type:"button",class:"secondary",disabled:p.value||!n.value.trim(),onClick:$},[H(fe,{name:"sparkles",size:15}),R[17]||(R[17]=_e(" AI 优化 ",-1))],8,$0),u.value?(y(),k("small",T0,"已优化,请确认或继续编辑后再创建。")):W("",!0)]),f("label",null,[R[18]||(R[18]=f("span",null,[_e("完成标准 "),f("small",null,"可选")],-1)),Qe(f("textarea",{"onUpdate:modelValue":R[1]||(R[1]=Y=>s.value=Y),rows:"2",placeholder:"例如:聚焦测试、类型检查与 Web 构建全部通过",disabled:p.value},null,8,R0),[[yt,s.value]])]),R[23]||(R[23]=f("div",{class:"budget-title"},[_e("执行预算 "),f("small",null,"留空表示不限制")],-1)),f("div",A0,[f("label",null,[R[19]||(R[19]=f("span",null,"轮次",-1)),Qe(f("input",{"onUpdate:modelValue":R[2]||(R[2]=Y=>r.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:p.value},null,8,E0),[[yt,r.value]])]),f("label",null,[R[20]||(R[20]=f("span",null,"Token",-1)),Qe(f("input",{"onUpdate:modelValue":R[3]||(R[3]=Y=>o.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:p.value},null,8,I0),[[yt,o.value]])])]),f("div",L0,[f("label",null,[R[21]||(R[21]=f("span",null,"时间",-1)),Qe(f("input",{"onUpdate:modelValue":R[4]||(R[4]=Y=>i.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:p.value},null,8,P0),[[yt,i.value]])]),Qe(f("select",{"onUpdate:modelValue":R[5]||(R[5]=Y=>l.value=Y),"aria-label":"时间预算单位",disabled:p.value},[...R[22]||(R[22]=[f("option",{value:"minutes"},"分钟",-1),f("option",{value:"hours"},"小时",-1),f("option",{value:"seconds"},"秒",-1),f("option",{value:"milliseconds"},"毫秒",-1)])],8,M0),[[jl,l.value]])]),f("button",{class:"primary",type:"submit",disabled:p.value||!n.value.trim()},E(e.pending?"正在创建…":"创建并开始执行"),9,N0)],32)):(y(),k("div",_0,"暂无会话,Goal 管理暂不可用。")),c.value||e.error?(y(),k("p",uw,E(c.value??e.error),1)):e.pending?(y(),k("p",fw,"请求处理中,状态将在核心事件到达后同步。")):W("",!0)]))}}),hw=Ce(dw,[["__scopeId","data-v-de9e6346"]]),pw={class:"panel-section like-section"},gw={class:"section-heading"},mw={class:"like-fields"},vw={class:"like-label"},yw={class:"like-value"},bw={class:"dialog"},kw=["onUpdate:modelValue","placeholder"],ww={key:0,class:"dialog-error"},Sw={class:"dialog-actions"},_w=["disabled"],xw=xe({__name:"LikePanel",props:{like:{},updateLike:{type:Function}},setup(e){const t=e,n=F(!1),s=F(!1),r=F(""),o=F({}),i=[{key:"nickname",label:"昵称",placeholder:"用户称呼,如:老板"},{key:"tone",label:"语气",placeholder:"AI 风格,如:专业不拖沓"},{key:"other",label:"偏好",placeholder:"其他用户偏好"},{key:"doNot",label:"禁止",placeholder:"用户明确不让做的事"}];function l(){o.value={...t.like},r.value="",n.value=!0}async function a(){s.value=!0,r.value="";const c=await t.updateLike(o.value);s.value=!1,c?n.value=!1:r.value="保存失败"}return(c,u)=>(y(),k("section",pw,[f("div",gw,[u[2]||(u[2]=f("div",null,[f("span",null,"偏好设置"),f("small",null,"/like 用户偏好")],-1)),H(fe,{name:"heart",size:19})]),f("div",mw,[(y(),k(Q,null,Je(i,h=>f("div",{key:h.key,class:"like-field"},[f("span",vw,E(h.label),1),f("span",yw,E((e.like[h.key]??"").trim()||"未设置"),1)])),64))]),f("button",{class:"like-edit",onClick:l},"编辑偏好"),n.value?(y(),k("div",{key:0,class:"dialog-overlay",onClick:u[1]||(u[1]=qt(h=>n.value=!1,["self"]))},[f("div",bw,[u[3]||(u[3]=f("div",{class:"dialog-title"},"编辑用户偏好",-1)),(y(),k(Q,null,Je(i,h=>f("label",{key:h.key,class:"dialog-field"},[f("span",null,E(h.label),1),Qe(f("input",{"onUpdate:modelValue":g=>o.value[h.key]=g,placeholder:h.placeholder},null,8,kw),[[yt,o.value[h.key]]])])),64)),r.value?(y(),k("div",ww,E(r.value),1)):W("",!0),f("div",Sw,[f("button",{onClick:u[0]||(u[0]=h=>n.value=!1)},"取消"),f("button",{disabled:s.value,onClick:a},E(s.value?"保存中…":"确认"),9,_w)])])])):W("",!0)]))}}),Cw=Ce(xw,[["__scopeId","data-v-a384266d"]]),$w={class:"panel-section run-status"},Tw=["aria-expanded"],Rw={class:"head-icon"},Aw={key:0,class:"live-dot",title:"Agent 正在处理"},Ew={class:"panel-body"},Iw={class:"status-row"},Lw={class:"status-label"},Pw={class:"status-row"},Mw={class:"status-row"},Nw=["title"],Ow={key:1,class:"row-value faint"},Dw={class:"status-row"},Bw={class:"row-value faint"},ba="scream-panel-runstatus-open",Gw=xe({__name:"RunStatusPanel",props:{status:{},busy:{type:Boolean,default:!1},connectionStatus:{}},setup(e){const t=e,n=F(!0);try{n.value=localStorage.getItem(ba)!=="0"}catch{}function s(){n.value=!n.value;try{localStorage.setItem(ba,n.value?"1":"0")}catch{}}const r=ee(()=>{const i=t.status.contextUsage;return i===void 0?null:Math.round((i>1?i/100:i)*100)}),o=ee(()=>{var i,l;return`Tokens: ${((i=t.status.contextTokens)==null?void 0:i.toLocaleString())??"-"} / ${((l=t.status.maxContextTokens)==null?void 0:l.toLocaleString())??"-"}`});return Ne(()=>t.busy,()=>{t.busy&&!n.value&&(n.value=!0)}),(i,l)=>{var a,c;return y(),k("section",$w,[f("button",{class:"panel-head","aria-expanded":n.value,onClick:s},[f("span",Rw,[H(fe,{name:"activity",size:16})]),l[0]||(l[0]=f("span",{class:"head-title"},"运行状态",-1)),e.busy?(y(),k("span",Aw)):W("",!0),H(fe,{class:be(["chevron",{rotated:n.value}]),name:"chevron-down",size:16},null,8,["class"])],8,Tw),Qe(f("div",Ew,[f("div",Iw,[f("span",{class:be(["pulse",{busy:e.busy}])},null,2),f("span",Lw,E(e.busy?"正在处理会话":"已就绪,等待任务"),1)]),f("div",Pw,[l[1]||(l[1]=f("span",{class:"row-label"},"连接",-1)),f("span",{class:be(["row-value",["conn",e.connectionStatus]])},E(e.connectionStatus==="connected"?"已连接":e.connectionStatus==="connecting"?"连接中":e.connectionStatus==="reconnecting"?"重连中":e.connectionStatus==="disconnected"?"已断开":"空闲"),3)]),f("div",Mw,[l[2]||(l[2]=f("span",{class:"row-label"},"上下文",-1)),r.value!==null?(y(),k("span",{key:0,class:"row-value",title:o.value},[H(Bu,{usage:e.status.contextUsage,size:16},null,8,["usage"]),_e(E(r.value)+"% ",1)],8,Nw)):(y(),k("span",Ow,"—"))]),f("div",Dw,[l[3]||(l[3]=f("span",{class:"row-label"},"Token",-1)),f("span",Bw,E(((a=e.status.contextTokens)==null?void 0:a.toLocaleString())??"-")+" / "+E(((c=e.status.maxContextTokens)==null?void 0:c.toLocaleString())??"-"),1)])],512),[[Dc,n.value]])])}}}),jw=Ce(Gw,[["__scopeId","data-v-f7ab53fd"]]),zw={class:"todo-panel panel-section"},Fw={class:"section-heading"},Uw={class:"count-pill"},Hw={key:0,class:"empty-state"},qw={key:1,class:"todo-groups"},Ww=["title"],Vw={class:"todo-title"},Kw=xe({__name:"TodoPanel",props:{todos:{}},setup(e){const t=e,n=ee(()=>Fh(t.todos)),s=ee(()=>t.todos.filter(o=>o.status==="done").length),r={pending:{label:"待处理",symbol:"○"},in_progress:{label:"进行中",symbol:"●"},done:{label:"已完成",symbol:"✓"}};return(o,i)=>(y(),k("section",zw,[f("div",Fw,[i[0]||(i[0]=f("div",null,[f("span",null,"核心 Todo"),f("small",null,"直接来自 Agent 核心状态")],-1)),f("span",Uw,E(s.value)+"/"+E(e.todos.length),1)]),e.todos.length===0?(y(),k("div",Hw,[H(fe,{name:"check",size:18}),i[1]||(i[1]=f("span",null,"暂无 Todo",-1)),i[2]||(i[2]=f("small",null,"Agent 创建任务清单后会在这里实时显示。",-1))])):(y(),k("div",qw,[(y(!0),k(Q,null,Je(n.value,(l,a)=>(y(),k("section",{key:l.phase??`unphased-${a}`,class:"todo-group"},[f("h4",null,E(l.phase??"未分阶段"),1),f("ol",null,[(y(!0),k(Q,null,Je(l.items,(c,u)=>(y(),k("li",{key:`${a}-${u}-${c.title}`,class:be(`is-${c.status}`)},[f("span",{class:"status-symbol",title:r[c.status].label},E(r[c.status].symbol),9,Ww),f("span",Vw,E(c.title),1),f("small",null,E(r[c.status].label),1)],2))),128))])]))),128))]))]))}}),Zw=Ce(Kw,[["__scopeId","data-v-e8a85d5d"]]),Yw={class:"rightbar"},Jw={class:"rightbar-toolbar"},Xw=xe({__name:"RightPanel",props:{busy:{type:Boolean,default:!1},sessionId:{default:null},connectionStatus:{},archived:{type:Boolean,default:!1},goal:{},todos:{},like:{},updateLike:{},goalRequestPending:{type:Boolean,default:!1},goalRequestError:{default:null},refineGoal:{},createGoal:{},updateGoal:{},pauseGoal:{},resumeGoal:{},cancelGoal:{},status:{default:void 0},gitStatus:{default:null}},emits:["insert","refresh-git","toggle"],setup(e,{emit:t}){const n=t;return(s,r)=>(y(),k("aside",Yw,[f("div",Jw,[f("button",{class:"collapse-btn",title:"收起面板","aria-label":"收起右侧面板",onClick:r[0]||(r[0]=o=>n("toggle"))},[H(fe,{name:"panel-right",size:18})])]),H(jw,{status:e.status??{},busy:e.busy,"connection-status":e.connectionStatus},null,8,["status","busy","connection-status"]),H(k0,{"git-status":e.gitStatus,onRefresh:r[1]||(r[1]=o=>n("refresh-git"))},null,8,["git-status"]),H(Zw,{todos:e.todos},null,8,["todos"]),H(Cw,{like:e.like,"update-like":e.updateLike},null,8,["like","update-like"]),H(hw,{goal:e.goal,"session-id":e.sessionId,"connection-status":e.connectionStatus,busy:e.busy,archived:e.archived,pending:e.goalRequestPending,error:e.goalRequestError,"refine-goal":e.refineGoal,"create-goal":e.createGoal,"update-goal":e.updateGoal,"pause-goal":e.pauseGoal,"resume-goal":e.resumeGoal,"cancel-goal":e.cancelGoal},null,8,["goal","session-id","connection-status","busy","archived","pending","error","refine-goal","create-goal","update-goal","pause-goal","resume-goal","cancel-goal"])]))}}),Qw=Ce(Xw,[["__scopeId","data-v-07553858"]]),eS={class:"right-rail",role:"toolbar","aria-label":"右侧功能区"},tS={class:"rail-stack"},nS={class:"rail-group"},sS=["title","aria-label","onClick"],rS={key:0,class:"live-dot"},oS=["title","aria-label"],iS=xe({__name:"RightRail",props:{theme:{},busy:{type:Boolean,default:!1}},emits:["expand","select","cycle-theme"],setup(e,{emit:t}){const n=t,s=[{key:"run",icon:"activity",label:"运行状态"},{key:"git",icon:"git-branch",label:"Git 变更"},{key:"todo",icon:"check",label:"核心 Todo"},{key:"like",icon:"sparkles",label:"偏好设置"},{key:"goal",icon:"target",label:"Goal 管理"}],r={light:"sun",dark:"moon",system:"monitor"};return(o,i)=>(y(),k("div",eS,[f("div",tS,[f("button",{class:"rail-btn rail-toggle",title:"展开面板","aria-label":"展开右侧面板",onClick:i[0]||(i[0]=l=>n("expand"))},[H(fe,{name:"panel-left",size:18})]),f("div",nS,[(y(),k(Q,null,Je(s,l=>f("button",{key:l.key,class:"rail-btn",title:l.label,"aria-label":l.label,onClick:a=>n("select",l.key)},[H(fe,{name:l.icon,size:20},null,8,["name"]),l.key==="run"&&e.busy?(y(),k("span",rS)):W("",!0)],8,sS)),64))])]),f("button",{class:"rail-btn",title:`切换主题(当前 ${e.theme})`,"aria-label":`切换主题(当前 ${e.theme})`,onClick:i[1]||(i[1]=l=>n("cycle-theme"))},[H(fe,{name:r[e.theme],size:20},null,8,["name"])],8,oS)]))}}),lS=Ce(iS,[["__scopeId","data-v-e4a3d61f"]]),aS={class:"info-row"},cS={class:"info-val mono"},uS={class:"info-row"},fS={class:"info-val mono"},dS={class:"info-row"},hS={class:"info-val"},pS={class:"info-row"},gS={class:"info-val"},mS={class:"info-row"},vS={class:"info-val"},yS={class:"info-row"},bS={class:"info-val"},kS={class:"info-row"},wS={class:"info-val"},SS={class:"info-row"},_S={class:"info-val"},xS={class:"info-row"},CS={class:"info-val"},$S={class:"info-row"},TS={class:"info-val"},RS={key:0,class:"info-row"},AS={class:"info-val"},ES={key:1,class:"info-row"},IS={class:"info-val"},LS={class:"info-val mono"},PS={class:"info-val"},MS={key:3,class:"info-empty"},NS=xe({__name:"InfoPanel",props:{mode:{},status:{},sessionId:{},workDir:{}},emits:["close"],setup(e,{emit:t}){const n=e,s=t,r=ee(()=>n.mode==="status"?"会话状态":"Token 用量");function o(p){switch(p){case"auto":return"自动 (auto)";case"yolo":return"YOLO";case"manual":return"手动 (manual)";default:return p??"-"}}function i(p){return p?"开启":"关闭"}function l(p){return p!=null}function a(p){return l(p)?p.toLocaleString():"-"}function c(p){return l(p)?`${(p>1?p:p*100).toFixed(1)}%`:"-"}function u(p){return p?p.inputOther+p.output+p.inputCacheRead+p.inputCacheCreation:0}function h(p){return p!=null&&p.byModel?Object.entries(p.byModel).map(([d,m])=>({model:d,tokens:u(m),output:m.output,cacheRead:m.inputCacheRead})):[]}const g=ee(()=>l(n.status.usage)||l(n.status.contextTokens));return(p,d)=>(y(),Ve(Yi,{open:!0,title:r.value,onClose:d[0]||(d[0]=m=>s("close"))},{default:at(()=>{var m,S;return[e.mode==="status"?(y(),k(Q,{key:0},[f("div",aS,[d[1]||(d[1]=f("span",{class:"info-key"},"会话 ID",-1)),f("span",cS,E(e.sessionId??"-"),1)]),f("div",uS,[d[2]||(d[2]=f("span",{class:"info-key"},"工作目录",-1)),f("span",fS,E(e.workDir??"-"),1)]),f("div",dS,[d[3]||(d[3]=f("span",{class:"info-key"},"模型",-1)),f("span",hS,E(e.status.model??"-"),1)]),f("div",pS,[d[4]||(d[4]=f("span",{class:"info-key"},"权限模式",-1)),f("span",gS,E(o(e.status.permission)),1)]),f("div",mS,[d[5]||(d[5]=f("span",{class:"info-key"},"思考级别",-1)),f("span",vS,E(e.status.thinkingLevel??"-"),1)]),f("div",yS,[d[6]||(d[6]=f("span",{class:"info-key"},"计划模式",-1)),f("span",bS,E(i(e.status.planMode)),1)]),f("div",kS,[d[7]||(d[7]=f("span",{class:"info-key"},"WolfPack 模式",-1)),f("span",wS,E(i(e.status.wolfpackMode)),1)]),f("div",SS,[d[8]||(d[8]=f("span",{class:"info-key"},"上下文",-1)),f("span",_S,E(a(e.status.contextTokens))+" / "+E(a(e.status.maxContextTokens))+" ("+E(c(e.status.contextUsage))+")",1)])],64)):(y(),k(Q,{key:1},[f("div",xS,[d[9]||(d[9]=f("span",{class:"info-key"},"上下文 Token",-1)),f("span",CS,E(a(e.status.contextTokens))+" / "+E(a(e.status.maxContextTokens)),1)]),f("div",$S,[d[10]||(d[10]=f("span",{class:"info-key"},"上下文占比",-1)),f("span",TS,E(c(e.status.contextUsage)),1)]),(m=e.status.usage)!=null&&m.total?(y(),k("div",RS,[d[11]||(d[11]=f("span",{class:"info-key"},"累计 Token",-1)),f("span",AS,E(a(u(e.status.usage.total))),1)])):W("",!0),(S=e.status.usage)!=null&&S.currentTurn?(y(),k("div",ES,[d[12]||(d[12]=f("span",{class:"info-key"},"当前回合",-1)),f("span",IS,E(a(u(e.status.usage.currentTurn))),1)])):W("",!0),h(e.status.usage).length?(y(),k(Q,{key:2},[d[13]||(d[13]=f("div",{class:"info-subhead"},"按模型",-1)),(y(!0),k(Q,null,Je(h(e.status.usage),b=>(y(),k("div",{key:b.model,class:"info-row info-row-model"},[f("span",LS,E(b.model),1),f("span",PS,E(a(b.tokens))+"(输出 "+E(a(b.output))+" · 缓存读 "+E(a(b.cacheRead))+")",1)]))),128))],64)):W("",!0),g.value?W("",!0):(y(),k("div",MS,"暂无用量数据"))],64))]}),_:1},8,["title"]))}}),OS=Ce(NS,[["__scopeId","data-v-407030a3"]]),DS={class:"sd-search-wrap"},BS={class:"sd-icon"},GS=["aria-selected","onClick","onMousemove"],jS={class:"sd-title"},zS={class:"sd-meta"},FS={class:"sd-time"},US={class:"sd-count"},HS={key:0,class:"sd-active"},qS={key:0,class:"sd-empty"},WS=xe({__name:"SearchSessionsDialog",props:{sessions:{},activeId:{}},emits:["select","close"],setup(e,{emit:t}){const n=e,s=t,r=F(""),o=F(null),i=F(null),l=ee(()=>{const m=r.value.trim().toLowerCase();return m?n.sessions.filter(S=>S.title.toLowerCase().includes(m)||S.sessionId.toLowerCase().includes(m)):n.sessions}),a=F(0);Ne(r,()=>{a.value=0}),Ne(l,()=>{a.value=0});function c(m){const S=l.value.length;return S===0?0:Math.max(0,Math.min(S-1,m))}async function u(){var S;await Gt();const m=(S=i.value)==null?void 0:S.querySelector('[aria-selected="true"]');m==null||m.scrollIntoView({block:"nearest"})}function h(m){a.value=c(a.value+m),u()}function g(){const m=l.value[a.value];m&&(s("select",m.sessionId),s("close"))}function p(m){m.key==="ArrowDown"?(m.preventDefault(),h(1)):m.key==="ArrowUp"?(m.preventDefault(),h(-1)):m.key==="Enter"&&(m.preventDefault(),g())}function d(m){const S=new Date(m),b=new Date;return S.toDateString()===b.toDateString()?S.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):S.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}return tn(()=>{var m;(m=o.value)==null||m.focus()}),(m,S)=>(y(),Ve(Yi,{open:!0,onClose:S[1]||(S[1]=b=>s("close"))},{header:at(()=>[f("div",DS,[f("span",BS,[H(fe,{name:"search",size:19})]),Qe(f("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":S[0]||(S[0]=b=>r.value=b),class:"sd-input",type:"text",placeholder:"搜索会话...",id:"session-search-input",name:"session-search",autocomplete:"off",spellcheck:"false",onKeydown:p},null,544),[[yt,r.value]])])]),footer:at(()=>[...S[2]||(S[2]=[f("span",{class:"sd-hint"},"↑↓ 导航 · Enter 切换 · Esc 关闭",-1)])]),default:at(()=>[f("div",{ref_key:"listRef",ref:i,class:"sd-list",role:"listbox"},[(y(!0),k(Q,null,Je(l.value,(b,C)=>(y(),k("button",{key:b.sessionId,class:be(["sd-row",{on:C===a.value,active:b.sessionId===e.activeId}]),role:"option","aria-selected":C===a.value,onClick:$=>{s("select",b.sessionId),s("close")},onMousemove:$=>a.value=C},[f("span",jS,E(b.title||"New Session"),1),f("span",zS,[f("span",FS,E(d(b.createdAt)),1),f("span",US,E(b.messageCount)+" 条",1),b.active?(y(),k("span",HS,"●")):W("",!0)])],42,GS))),128)),l.value.length===0?(y(),k("div",qS,"没有匹配的会话")):W("",!0)],512)]),_:1}))}}),VS=Ce(WS,[["__scopeId","data-v-62760c4c"]]),KS=xe({__name:"ResizeHandle",props:{dragging:{type:Boolean}},setup(e){return(t,n)=>(y(),k("div",{class:be(["resize-handle",{dragging:e.dragging}]),role:"separator","aria-orientation":"vertical","aria-label":"拖拽调整宽度"},null,2))}}),ZS=Ce(KS,[["__scopeId","data-v-11060aea"]]),YS={class:"workbench-body"},JS={class:"chat-main chat-inset"},XS={class:"composer-dock"},QS={key:1,class:"rightbar-open"},ka="scream-sidebar-collapsed-v2",wa="scream-rightbar-collapsed-v2",e_=xe({__name:"ChatView",setup(e){const{connectionStatus:t,messages:n,pendingApprovals:s,status:r,goal:o,todos:i,goalRequestPending:l,goalRequestError:a,sessionId:c,workDir:u,isBusy:h,isArchived:g,sessions:p,currentSessionId:d,gitStatus:m,models:S,sendPrompt:b,sendCommand:C,clearMessages:$,appendSystemMessage:w,abort:M,resolveApproval:K,createSession:B,switchSession:ce,deleteSession:q,exportSession:re,fetchGitStatus:pe,fetchSnapshot:j,switchModel:ge,switchThinking:N,refineGoal:R,createGoal:Y,updateGoal:ae,pauseGoal:oe,resumeGoal:Ze,cancelGoal:Ke,like:Fe,fetchLike:Ue,updateLike:He}=Vh(),Dt=F(null),Bt=F(!1),nt=F("status"),Tt=ee(()=>S.value.length>0);Bn("modelSwitchable",Tt);const Rt=ee(()=>{const de=p.value.find(_t=>_t.sessionId===d.value),ye=de==null?void 0:de.title;if(ye&&ye!=="新会话"&&ye!=="New Session")return ye;const st=n.value.find(_t=>_t.role==="user");if(st){const _t=st.content.replace(/\s+/g," ").trim();if(_t)return _t.length>24?`${_t.slice(0,24)}…`:_t}return ye??null}),O=F(!0),te=F(!1);try{O.value=localStorage.getItem(ka)!=="0"}catch{}function Te(){return window.innerWidth<=640}function v(){if(Te()){te.value=!te.value;return}O.value=!O.value;try{localStorage.setItem(ka,O.value?"1":"0")}catch{}}function x(de){te.value=!1,ce(de)}const A=F(!1);try{A.value=localStorage.getItem(wa)==="1"}catch{}function D(){A.value=!A.value;try{localStorage.setItem(wa,A.value?"1":"0")}catch{}}const I=Ft("theme",F("system")),P=Ft("setTheme",()=>{});function V(){const de=["light","dark","system"],ye=de[(de.indexOf(I.value)+1)%de.length];P(ye)}const Z=F(!0),U=F(!0);Bn("showThinking",Z),Bn("showTools",U);const L=F(!1);function le(de){(de.metaKey||de.ctrlKey)&&de.key==="k"?(de.preventDefault(),L.value=!L.value):(de.metaKey||de.ctrlKey)&&de.key==="n"&&(de.preventDefault(),ke())}tn(()=>{window.addEventListener("keydown",le),Ue()}),nn(()=>window.removeEventListener("keydown",le));const{width:J,dragging:ne,onPointerDown:ie}=Kh({storageKey:"scream-sidebar-width",defaultWidth:360,min:300,max:440});function ke(){te.value=!1,B()}function Re(de){var ye;(ye=Dt.value)==null||ye.insertText(de)}function we(de){j(),nt.value=de,Bt.value=!0}function qe(){var ye;(((ye=Dt.value)==null?void 0:ye.openModelPicker())??!1)||w(`当前模型:${r.value.model??"unknown"}`)}function Oe(de,ye){switch(de){case"compact":C("compact");break;case"model":qe();break;case"clear":$();break;case"new":B();break;case"help":w(Jh());break;case"auto":case"yes":case"plan":case"fork":case"title":case"btw":C(de,ye);break;case"status":we("status");break;case"usage":we("usage");break;default:w(`未知命令:/${de}`)}}return(de,ye)=>(y(),k("div",{class:be(["workbench",{"sidebar-is-collapsed":O.value}]),style:gn({"--sidebar-width":X(J)+"px"})},[H(s0,{sessions:X(p),"current-session-id":X(d),status:X(r),busy:X(h),collapsed:O.value,"mobile-open":te.value,onCreate:ke,onSwitch:x,onDelete:X(q),onExport:X(re),onToggle:v,onOpenSearch:ye[0]||(ye[0]=st=>L.value=!0),onShowInfo:we,onHelp:ye[1]||(ye[1]=st=>Oe("help"))},null,8,["sessions","current-session-id","status","busy","collapsed","mobile-open","onDelete","onExport"]),O.value?W("",!0):(y(),Ve(ZS,{key:0,class:"sidebar-resize",dragging:X(ne),onPointerdown:X(ie)},null,8,["dragging","onPointerdown"])),te.value?(y(),k("div",{key:1,class:"sidebar-backdrop","aria-hidden":"true",onClick:ye[2]||(ye[2]=st=>te.value=!1)})):W("",!0),f("main",YS,[f("div",JS,[H(Op,{title:Rt.value,busy:X(h),onRename:ye[3]||(ye[3]=st=>X(C)("title",st)),onExport:ye[4]||(ye[4]=st=>X(d)&&X(re)(X(d))),onClear:X($),onToggleRightbar:D,onMenu:v},null,8,["title","busy","onClear"]),H(x1,{messages:X(n),busy:X(h),"work-dir":X(u),"session-id":X(d)??"",model:X(r).model??null,"context-usage":X(r).contextUsage??null,connected:X(t)==="connected",onEdit:Re,onPick:X(b)},null,8,["messages","busy","work-dir","session-id","model","context-usage","connected","onPick"]),f("div",XS,[H(Ck,{approvals:X(s),onResolve:X(K)},null,8,["approvals","onResolve"]),H(fk,{ref_key:"composerRef",ref:Dt,busy:X(h),status:X(r),"session-id":X(c),models:X(S),onSend:X(b),onAbort:X(M),onCommand:Oe,onSwitchModel:X(ge),onSwitchThinking:X(N)},null,8,["busy","status","session-id","models","onSend","onAbort","onSwitchModel","onSwitchThinking"])])]),f("div",{class:be(["rightbar-host",{"rightbar-collapsed":!A.value}])},[A.value?(y(),k("div",QS,[H(Qw,{busy:X(h),"session-id":X(c),"connection-status":X(t),archived:X(g),goal:X(o),todos:X(i),"goal-request-pending":X(l),"goal-request-error":X(a),"refine-goal":X(R),"create-goal":X(Y),"update-goal":X(ae),"pause-goal":X(oe),"resume-goal":X(Ze),"cancel-goal":X(Ke),like:X(Fe),"update-like":X(He),status:X(r),"git-status":X(m),onRefreshGit:X(pe),onToggle:D,onInsert:Re},null,8,["busy","session-id","connection-status","archived","goal","todos","goal-request-pending","goal-request-error","refine-goal","create-goal","update-goal","pause-goal","resume-goal","cancel-goal","like","update-like","status","git-status","onRefreshGit"])])):(y(),Ve(lS,{key:0,theme:X(I),busy:X(h),onExpand:D,onSelect:D,onCycleTheme:V},null,8,["theme","busy"]))],2)]),Bt.value?(y(),Ve(OS,{key:2,mode:nt.value,status:X(r),"session-id":X(c),"work-dir":X(u),onClose:ye[5]||(ye[5]=st=>Bt.value=!1)},null,8,["mode","status","session-id","work-dir"])):W("",!0),L.value?(y(),Ve(VS,{key:3,sessions:X(p),"active-id":X(d),onSelect:x,onClose:ye[6]||(ye[6]=st=>L.value=!1)},null,8,["sessions","active-id"])):W("",!0)],6))}}),t_=Ce(e_,[["__scopeId","data-v-c53cacb6"]]),n_={class:"toast-container"},s_=["onClick"],r_={class:"toast-icon"},o_={class:"toast-msg"},i_=xe({__name:"Toast",setup(e){const{toasts:t,removeToast:n}=Uc(),s={info:"ℹ",success:"✓",error:"✗",warning:"⚠"};return(r,o)=>(y(),Ve(ki,{to:"body"},[f("div",n_,[H(_h,{name:"toast"},{default:at(()=>[(y(!0),k(Q,null,Je(X(t),i=>(y(),k("div",{key:i.id,class:be(["toast",`toast--${i.type}`]),onClick:l=>X(n)(i.id)},[f("span",r_,E(s[i.type]),1),f("span",o_,E(i.message),1)],10,s_))),128))]),_:1})])]))}}),l_=Ce(i_,[["__scopeId","data-v-7200727f"]]),a_={class:"app"},c_=xe({__name:"App",setup(e){const t=F("system"),n=F("dark");Bn("effectiveTheme",n),Bn("theme",t);const s={light:"#f7f8f7",dark:"#0d1117"};function r(){const a=document.documentElement,c=window.matchMedia("(prefers-color-scheme: dark)").matches,u=t.value==="system"?c?"dark":"light":t.value;n.value=u,a.dataset.theme=u;const h=document.querySelector('meta[name="theme-color"]');h&&h.setAttribute("content",s[u])}let o=null;function i(a){t.value=a;try{localStorage.setItem("scream-theme",a)}catch{}const c=document.documentElement;c.classList.add("theme-transition"),r(),o!==null&&clearTimeout(o),o=window.setTimeout(()=>c.classList.remove("theme-transition"),320)}Bn("setTheme",i),tn(()=>{try{const a=localStorage.getItem("scream-theme");(a==="light"||a==="dark"||a==="system")&&(t.value=a)}catch{}r()}),Ne(t,r);const l=window.matchMedia("(prefers-color-scheme: dark)");return l.addEventListener("change",r),nn(()=>{l.removeEventListener("change",r),o!==null&&clearTimeout(o),document.documentElement.classList.remove("theme-transition")}),(a,c)=>(y(),k("div",a_,[H(t_),H(l_)]))}}),u_=Ce(c_,[["__scopeId","data-v-ba168d5b"]]);function f_(){const e=window.matchMedia("(prefers-reduced-motion: reduce)");document.addEventListener("pointerdown",t=>{if(e.matches||t.button!==0)return;const n=t.target instanceof Element?t.target:null,s=n==null?void 0:n.closest('button:not(:disabled), [role="button"]');if(!(s instanceof HTMLElement))return;const r=s.getBoundingClientRect();if(r.width===0||r.height===0)return;const o=Math.max(r.width,r.height)*2,i=document.createElement("span");i.className="ripple-ink",i.style.width=i.style.height=`${o}px`,i.style.left=`${t.clientX-r.left-o/2}px`,i.style.top=`${t.clientY-r.top-o/2}px`,s.classList.add("ripple-host"),s.append(i),i.addEventListener("animationend",()=>i.remove(),{once:!0})},{passive:!0})}f_();Mh(u_).mount("#app");
|
|
90
|
-
//# sourceMappingURL=index-CopRDlgZ.js.map
|